States brace for fight over gun laws after high court ruling