Where the carbon goes and where the ATP is actually made
Glycolysis, in the cytosol, splits one glucose into two pyruvate for a net gain of two ATP by substrate-level phosphorylation and two NADH. Pyruvate oxidation releases the first CO2 and gives acetyl-CoA. The citric acid cycle releases the remaining four CO2 and, per glucose, yields two ATP, six NADH and two FADH2. So all six carbons leave as carbon dioxide before oxidative phosphorylation begins, and almost no ATP has been made yet — the cycle's real product is reduced coenzymes. Oxidative phosphorylation then produces the large majority of the roughly 30 to 32 ATP per glucose. Quoting 38 is an older figure that ignores the cost of transporting cytosolic NADH into the mitochondrion.