The splitting of carbon dioxide to form oxygen gas and carbon compounds occurs during
neither photosynthesis nor respiration.
Oxygen gas comes from the oxidation of water in photosynthesis and not at all from carbon dioxide. In respiration, carbon dioxide is evolved from chemical intermediates in the TCA / Citric Acid / Krebs cycle.