modified templated compile_to_simplified_lowered_stmt