if the 2nd amendmend was literally interpreted it would be (quoting from memory) “in order to form a well-ordered militia the right to bear arms shall not be infringed”
As in you cannot infringe the right to bear arms in a well ordered militia, but gun ownership might be regulated for example by the militia organization owning the arms. Nothing would speak against codifying in law what constitutes a well-ordered militia, etc.