Appeals court hears challenge of Illinois' gun and magazine ban