Code generator MGEN