The chemical energy stored in ATP during photosynthesis is released during the dark phase to produce O2. This is the exchange cycle between the plants and animals. Animals give off carbon dioxide (CO2) as an excess waste while the plants give off oxygen (O2).