Correct IR generation with correct register allocataions