Respiration and Photosynthesis as Shared Logic