It should be called from main(), not from the other codegen function. Also, rename it for consistency.