Chemistry of fluid production in the subduction factory