Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; x86 gcc → From my compiler.
- power(int, unsigned int):
- push rbp
- mov rbp, rsp
- push rbx
- sub rsp, 24
- mov DWORD PTR [rbp-20], edi
- mov DWORD PTR [rbp-24], esi
- cmp DWORD PTR [rbp-24], 0
- jne .L2
- mov eax, 1
- jmp .L3
- .L2:
- mov eax, DWORD PTR [rbp-24]
- and eax, 1
- test eax, eax
- jne .L4
- mov eax, DWORD PTR [rbp-24]
- shr eax
- mov edx, eax
- mov eax, DWORD PTR [rbp-20]
- mov esi, edx
- mov edi, eax
- call power(int, unsigned int)
- mov ebx, eax
- mov eax, DWORD PTR [rbp-24]
- shr eax
- mov edx, eax
- mov eax, DWORD PTR [rbp-20]
- mov esi, edx
- mov edi, eax
- call power(int, unsigned int)
- imul eax, ebx
- jmp .L3
- .L4:
- mov eax, DWORD PTR [rbp-24]
- shr eax
- mov edx, eax
- mov eax, DWORD PTR [rbp-20]
- mov esi, edx
- mov edi, eax
- call power(int, unsigned int)
- imul eax, DWORD PTR [rbp-20]
- mov ebx, eax
- mov eax, DWORD PTR [rbp-24]
- shr eax
- mov edx, eax
- mov eax, DWORD PTR [rbp-20]
- mov esi, edx
- mov edi, eax
- call power(int, unsigned int)
- imul eax, ebx
- .L3:
- add rsp, 24
- pop rbx
- pop rbp
- ret
RAW Paste Data