See What Your C Function Compiles To
gcc.godbolt.org
gcc.godbolt.org
The code goes from something rather crazy looking, to something that a human would write. Its surprising that these compilers arnt clever enough already to produce the optimized output by default.
> Compiler options: -march=i686
> error: CPU you selected does not support x86-64 instruction set
Strange, I'm sure x86 is not x86_64