Intermediate code generation except for functions