Lets just conveniently leave out the well regulated portion of the second amendment.
Why not? We leave out the shall not be infringed part already.
This amendment is a clusterfug.
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.
Well regulated means (roughly) disciplined and prepared. So this militia is necessary to the security of a free state but nothing more about this militia is ever described. So the militia may or may not exist despite being a necessity. The militia could be one person or a million people. This is not further expounded on at any point within the constitution.
However because it is a necessity the right of the people to keep and bear arms shall not be infringed. This statement stands on it's own whether the militia actually exists or not. Necessity does not actually imply existence. Additionally this right belongs to the people and not exclusively to the militia. These must be two different objects given the existence of both terms within the amendment.
Infringement means: The encroachment, breach, or violation of a right, law, regulation, or contract. source: West's Encyclopedia of American Law, edition
By this definition all laws restricting an American citizen's ability to keep or bear any weapon are unconstitutional. It has no bearing on the ease of obtaining these weapons though. So considering the meaning of the text as written there should be no mandatory registration and communities cannot outlaw handguns (or bazookas or grenades or...) as this would infringe on the right of the people to either keep or bear arms.
It seems clear to me this amendment is one of the most outdated parts (and personally I think it is poorly written) of the constitution and in my view it should be updated to reflect the requirements of modern times.