Formation and diagenesis of inorganic Ca?Mg carbonates in the lacustrine environment