According to the biogenic theory of hydrocarbon formation, hydrocarbons come from pressurized carbohydrates. 

I am looking for an explanation of what happens to the oxygen in the process. How could the oxygen break away from the hydroxyl groups of molecules like glucose to form hydrocarbons?