Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub main() {
- return if !(3 % 3) and 0 4 % 4
- else if 0 and 0 >= 1 2 + 7
- else if 0 or 2 < 3 3 + 5
- else if 0 and 2 <= 2 5 - 2
- else 6 * 2
- }
- turns...
- section .text
- ; main() > Integer
- global main:function (main.end - main)
- main:
- mov rax, 3
- push rax
- mov rax, 3
- pop rbx
- xor rdx, rdx
- idiv rbx
- mov rax, rdx
- cmp rax, 0
- je .neg1
- mov rax, 0
- jmp .negfinal1
- .neg1:
- mov rax, 1
- .negfinal1:
- cmp rax, 0
- jne .and2clause1
- xor rax, rax
- jmp .andend1
- .and2clause1:
- mov rax, 0
- cmp rax, 0
- jne .andsuccess1
- xor rax, rax
- jmp .andend1
- .andsuccess1:
- mov rax, 1
- .andend1:
- cmp rax, 0
- je .iffalse1
- mov rax, 4
- push rax
- mov rax, 4
- pop rbx
- xor rdx, rdx
- idiv rbx
- mov rax, rdx
- jmp .iffinal1
- .iffalse1:
- mov rax, 0
- cmp rax, 0
- jne .and2clause2
- xor rax, rax
- jmp .andend2
- .and2clause2:
- mov rax, 0
- push rax
- mov rax, 1
- pop rbx
- cmp rbx, rax
- jge .comparativetrue2
- xor rax, rax
- jmp .comparativeend2
- .comparativetrue2:
- mov rax, 1
- .comparativeend2:
- cmp rax, 0
- jne .andsuccess2
- xor rax, rax
- jmp .andend2
- .andsuccess2:
- mov rax, 1
- .andend2:
- cmp rax, 0
- je .iffalse2
- mov rax, 2
- push rax
- mov rax, 7
- pop rbx
- add rax, rbx
- jmp .iffinal2
- .iffalse2:
- mov rax, 0
- cmp rax, 0
- je .or2clause3
- mov rax, 1
- jmp .orend3
- .or2clause3:
- mov rax, 2
- push rax
- mov rax, 3
- pop rbx
- cmp rbx, rax
- jl .comparativetrue3
- xor rax, rax
- jmp .comparativeend3
- .comparativetrue3:
- mov rax, 1
- .comparativeend3:
- cmp rax, 0
- je .orfail3
- mov rax, 1
- jmp .orend3
- .orfail3:
- mov rax, 0
- .orend3:
- cmp rax, 0
- je .iffalse3
- mov rax, 3
- push rax
- mov rax, 5
- pop rbx
- add rax, rbx
- jmp .iffinal3
- .iffalse3:
- mov rax, 0
- cmp rax, 0
- jne .and2clause4
- xor rax, rax
- jmp .andend4
- .and2clause4:
- mov rax, 2
- push rax
- mov rax, 2
- pop rbx
- cmp rbx, rax
- jle .comparativetrue4
- xor rax, rax
- jmp .comparativeend4
- .comparativetrue4:
- mov rax, 1
- .comparativeend4:
- cmp rax, 0
- jne .andsuccess4
- xor rax, rax
- jmp .andend4
- .andsuccess4:
- mov rax, 1
- .andend4:
- cmp rax, 0
- je .iffalse4
- mov rax, 5
- push rax
- mov rax, 2
- pop rbx
- sub rax, rbx
- jmp .iffinal4
- .iffalse4:
- mov rax, 6
- push rax
- mov rax, 2
- pop rbx
- imul rax, rbx
- .iffinal4:
- .iffinal3:
- .iffinal2:
- .iffinal1:
- ret
- .end:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement