Mitochondrial 3-hydroxymethyl-3-methylglutaryl-CoA lyase that catalyzes a cation-dependent cleavage of (S)-3-hydroxy-3-methylglutaryl-CoA into acetyl-CoA and acetoacetate, a key step in ketogenesis. Terminal step in leucine catabolism. Ketone bodies (beta-hydroxybutyrate, acetoacetate and acetone) are essential as an alternative source of energy to glucose, as lipid precursors and as regulators of metabolism.