.align 8
#define ENTER \
pushl %ebp ;\
pushq %rbp ;\
movl %esp, %ebp ;\
movq %rsp, %rbp ;\
pushl %ebx ;\
pushq %rbx ;\
pushl %ecx ;\
pushq %rcx ;\
pushl %edx ;\
pushq %rdx ;\
pushl %edi ;\
pushq %rdi ;\
pushl %esi ;\
pushq %rsi ;\
movl data, %esi ;\
movl w, %ebx ;\
movl h, %edx
#define LEAVE \
4: ;\
emms ;\
popl %esi ;\
popq %rsi ;\
popl %edi ;\
popq %rdi ;\
popl %edx ;\
popq %rdx ;\
popl %ecx ;\
popq %rcx ;\
popl %ebx ;\
popq %rbx ;\
movl %ebp, %esp ;\
movq %rbp, %rsp ;\
popl %ebp ;\
popq %rbp ;\
ret