ASM refactoring

FWIW, I've updated this code (but have not yet tested it) for ARM64: https://github.com/dicej/avian/blob/master/src/compile-arm.S