Origin of precursors of organic molecules during evaporation of meteorites and mafic terrestrial rocks