Assignment 4 Intermediate Code Genaration Solution