Avoid the stack in assembly and use explicit registers

There is a 'red zone' which is 128 bytes beyond the stack, for scratch space which may be overwritten by other functions. Turns out, if the compiler uses this space in a function with an inline asm block, you basically can't use the stack, as you don't know what the stack pointer points to.

Workaround: allocate the temporaries outside of the assembly code, which has the extra advantage of potentially using the red zone optimization.