Which outcome is the main function of the light-independent reactions of photosynthesis?

to produce oxygen

to use up water

to produce glucose

to use up excess carbon dioxide