Government publishes 'damning' report on legal aid funding