All of it, but it's dishonest to pretend that it doesn't exist.
Who's right shall not be infringed? The militia's? No. The people's. The militia is made up of the people. The militia has historically been comprised of people bringing their own arms to fight. How do you bring your own arms, when they're banned from personal ownership?
James Madison's original draft of the 2A mentioned that even those that wanted to bear arms privately for their own reasons should not be required to participate in a militia in order to do so.
“The right of the people to keep and bear arms shall not be infringed; a well armed and well regulated militia being the best security of a free country: but no person religiously scrupulous of bearing arms shall be compelled to render military service in person.
It was removed as "too verbose", but the intention still remains.
"A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed. "
"Because A, B". It is emphatically not, "B if A" or "B for the purposes of A".