what roles do photosynthesis and cellular respiration play in the formation of carbon-based compounds