Reduction of glucose to hexane with hydroiodic acid
Hydroiodic acid is a reducing agent.  As Wikipedia says:


  Although harsh by modern standards, HI was commonly employed as a reducing agent early on in the history of organic chemistry. Chemists in the 19th century attempted to prepare cyclohexane by HI reduction of benzene at high temperatures, but instead isolated the rearranged product, methylcyclopentane (see the article on cyclohexane). As first reported by Kiliani,[10] hydroiodic acid reduction of sugars and other polyols results in the reductive cleavage of several or even all hydroxy groups, although often with poor yield and/or reproducibility.[11] In the case of benzyl alcohols and alcohols with α-carbonyl groups, reduction by HI can provide synthetically useful yields of the corresponding hydrocarbon product (ROH + 2HI → RH + H
  2O + I2).[8] This process can be made catalytic in HI using red phosphorus to reduce the formed I2.[12]

When $\ce{HI}$ acts as a reducing agent, the oxidized product is $\ce{I2}$.  To regenerate $\ce{HI}$ from the $\ce{I2}$, phosphorus can be used.  Thus, phosphorus is not strictly required for the reaction, as long as you are OK with using $\ce{HI}$ in superstoichiometric amounts and/or getting very low yields.
The overall scheme for $\ce{HI}$ reduction of an alcohol to an alkane is first displacement of the (protonated) alcohol by iodide, leading to formation of alkyl iodide.  Then, $\ce{HI}$ catalyzes the reduction of the alkyl iodide to the alkane, leading to $\ce{I2}$ as a byproduct.  The reduction step apparently follows a radical mechanism, at least under some conditions.
I'm not 100% sure how $n$-hexane would form from glucose.  It is unclear to me how $\ce{HI}$ would catalyze the reduction of the glucose aldehydic (or anomeric) carbon to an alcohol.  But, that is only one carbon out of six.  The other carbons have bona fide hydroxyl groups, and as such can be deoxygenated and reduced by $\ce{HI}$ to form alkyl carbons.  For example, Lv et al. report that hydrocarbons can be obtained from the five-carbon sugar alcohol xylitol in yields above 60%.  Unlike glucose, xylitol has no aldehydic/anomeric carbon, and only has alcohol groups.  This process did use phosphorous acid as an in situ iodine recycling agent.  Also, Yang et al. were able to obtain 5-methylfurfural from fructose by using $\ce{HI}$, without using an in situ agent to recycle $\ce{}$ to $\ce{HI}$.