Chemical equilibrium in magmatic gases