Modified gen_code_statement to take in a function's local variable offsets, in order to allow return statements to deallocate local variables.