Sweeping reforms to gun laws and freedom of assembly have passed the lower house as the Greens and civil society groups mount a challenge.