Immigration bill would cost state $40 million a year