That's not the point. The energy used to refine gasoline comes from the oil itself. Gasoline doesn't hold all the energy from the oil consumed to produce it, but it's still a positive net energy transfer from the well to your fuel tank.
Producing hydrogen, by any method, requires an external energy source. Unless someone figures out a way to get energy from the water used to produce hydrogen by electrolysis, hydrogen production is a net energy sink. The last time I checked, such an energy source (nuclear fusion) was still many many decades away. And has been many decades away for decades now.
Look toward Purdue University the brains of the country...