Satiate my curiosity, please. I know caffeine is naturally occurring in many plants (coffee and tea being the most notable). But for things like energy drinks, soda, drink flavorings, and whatnot that we add caffeine to, where does it come from?

Do we synthesize it all , is it recovered from the decaffeination process we use for decaf coffee/tea? Something else?