beginning intermediary for producing ir code