As a colleague once said: "you write in C and debug in assembly".
That held true once when a simple C case structure failed for no apparent reason, but only on hardware. By inspecting the assembler code, it turned out the compiler had made an error, but the simulator had the exact same flaw that cancelled the error out in the simulation.
Just wait until the AIoT ... the artificial intell ... oh, you know what I mean.