@epilanthanomai You're definitely not wrong about all this. And a big thing about systems-level code is that it has to deal with hardware that was built on the constraints present in a completely different world of engineering, and was also often built for the convenience and cost savings of the hardware maker. And it was built by fallible humans. So, it's often written to target a data sheet that has 5 hidden errata and wasn't conceived of by people who think in terms of theory-first.