This code removal business is confusing not just me but many others. In this area, C has been a moving target for all the years. For years, people have been working on the assumption that asm is never optimised but this is now clearly wrong.
It's attitude problem, working with assumptions instead of facts. Really, just RTFM. asm is not standard C, it's compiler extension. Read the compiler manual.
Really, 10 seconds in google: "gcc asm keyword", first result leads to
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html , where mention of volatile qualifier fits in the first screenful of information.
All this rationalization and explaining takes 100x the effort compared to just checking instead of assuming. Really, the same principle applies to every field of engineering. RTFM, check, double-check, never assume.
I have never seen asm keyword used without volatile (except in rare context where optimizing it out
is allowable, i.e. part of hand-optimizing a calculation). It never ever crossed my mind to not use the volatile qualifier. Maybe I have been lucky, or maybe I did read the manual already 20 years ago; I don't remember. And it's not a moving target, I remember this asm volatile from 1990's.
Admitting mistakes and doing better next time is fastest way forward.