Sorry. The comparison doesn't work.
There is no prior restraint - they can't gag you to prevent you from yelling fire.
And the charge will not be for exercising your First Amendment rights but for the harm and hazard caused by shouting fire, creating a public disturbance, etc.
Pretty hard to distinguish. Exercising your right to cry fire doesn't mean anyone was required to react. There are numerous laws curbing "free speech", just as there are numerous laws curbing the ownership and use of firearms. Should a 6 year old be allowed to own and use a firearm? How about a felon? As long as the licensing doesn't prohibit reasonable ownership and use, it doesn't violate the 2d Amendment, and it will likely be held so.