If the militia is the entire adult male population it seems rather difficult to ensure that they are also well-trained unless we also restrict gun ownership to those who've been trained, no? Unless the militia is simply the National Guard as Henry posits.
The two halves of the amendment seem somewhat contradictory to me, or more succinctly that one doesn't follow from the other. Sorry if this is old hat to you guys.
I don't think they're contradictory.
The point of the Second Amendment is not to ensure that the militia is well-trained (or well-functioning). That wouldn't go in the Bill of Rights. The Bill of Rights is about preventing the federal government from overstepping its bounds and infringing the rights of the people or of the states. If the Constitution wanted to ensure anything about how the militia should be trained or organized, that would go somewhere else, not in the Bill of Rights.
And in fact, there are some clauses along those lines in Article I (which generally pertains to the powers of Congress). Article I gives Congress the power to call up state militias to have them fight on behalf of the federal government if there's a war or an insurrection or whatever. It also says that Congress has the power to organize the militias, but that training them should be left to the states.
There are a lot of compromises in the Constitution because the framers didn't agree on everything. The disputes between the Federalists and the Anti-Federalists took center stage on many issues, including those relating to the state militias.
In short, some of the framers were quite worried that the federal government, with its fancy army, would abuse its power and oppress the states. Others thought that fear was overblown. The first group didn't want the federal government to have the power to organize the state militias -- since the power to organize is the power to disarm. After all, the states may need to use their militias to revolt against the federal government if it got out of line. The second group said, "Relax, the state militias will be fine. It's not like the federal government has the power to take people's guns away. Here, have an Amendment to calm your nerves."
So the Second Amendment is part of a compromise giving the federal government a lot more power over the state militias than the Anti-Federalists would have liked, but not so much power that it could disarm the populace.
In my view, the question of whether the Second Amendment provides an individual right or a states' right was never considered by the framers, and didn't need to be. It was totally irrelevant because the Commerce Clause hadn't yet been stretched beyond all recognition, and the 14th Amendment hadn't yet been invented. Those two things made the question eventually matter, but for early-American-history purposes, the point was that the federal government didn't have the power to limit gun-ownership.
Now things are much more complicated, constitutionally, than they were in the 18th century, for all kinds of reasons, which is why people disagree so strongly about how the Second Amendment should be interpreted today. The answer is not crystal clear, and cannot be (barring further amendment).