It’s possible to use inline assembly in the Arduino IDE because it uses GCC to compile code.
There’s some good guides here:
If AVR Builder can output non-compiled assembly,
it would be possible to translate that into a GCC
asm volatile block.
I still do that sometimes if I’m trying to solve a particularly hard problem.