re the case statements (#37), from some of the folk I've spoken to in the industry, empty conditions or functions is by design - the hooks are left so either during testing, or in different models of the same ECU they can insert additional functions. It also allows for MC/DC testing which might be needed for safety certification. Again, I've worked on safety software in the past where you'd still have a statement in what should be an unused condition to allow for testing. If the higher level code was decently optimised, they wouldn't be able to do either of those. It's probably written in C and compiled, but with relatively low levels of optimisation, possibly with a bias to size rather than performance.