Wow, that is a cautionary story, glad you are OK!! It is scary to me to feel that your brain isn't working. I realized training for a century the importantance of regular intake; what I thought was lack of training was largely not taking in enough, my muscles would feel wasted, and I would get really bad leg and foot cramps afterward. I have a lot of food limitations, and cannot eat a lot of carbs like wheat and oatmeal and even soy. I have trouble with the gels that have a lot of sugar, and have done better with a Hammer gel that I found, plus protein plus fat in the am before riding (the latest is turkey bacon, which has some sugar, but I swear I can just feel it doing its work). The Larabars, which the food co-op has, seem pretty good, no additives.
The bicycle is the most civilized conveyance known to man. Other forms of transport grow daily more nightmarish. Only the bicycle remains pure in heart. ~Iris Murdoch, The Red and the Green