// File: Merulo[P]CompilerJFTT/src/IRs/ThirdIR.cpp
// Function: ThirdIR::checkZeroJump(Block&)
bool ThirdIR::checkZeroJump(Block& b)
{
    Line lastLine = b.lines.back();
    if (_symbolTable->isConst(lastLine.one) && _symbolTable->getConstValue(lastLine.one) == "0" && !_symbolTable->isConst(lastLine.two))
    {
        return true;
    }
    if (_symbolTable->isConst(lastLine.two) && _symbolTable->getConstValue(lastLine.two) == "0" && !_symbolTable->isConst(lastLine.one))
    {
        return true;
    }    
    return false;
}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
movq %rdi, 0x208(%rsp)
movq %rsi, 0x200(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x200(%rsp), %rdi
addq $0x20, %rdi
callq 0x11660
movq %rax, %rsi
leaq 0x198(%rsp), %rdi
callq 0xfb20
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x60(%rsp)
leaq 0x1b8(%rsp), %rsi
movb $0x0, 0x127(%rsp)
movb $0x0, 0x126(%rsp)
movb $0x0, 0xff(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x4180
jmp 0x418d3
movq 0x60(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x20600
movb %al, 0x57(%rsp)
jmp 0x418eb
movb 0x57(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x56(%rsp)
jne 0x418ff
jmp 0x419cc
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x48(%rsp)
leaq 0x1b8(%rsp), %rsi
leaq 0x128(%rsp), %rdi
callq 0x4180
jmp 0x41925
movq 0x48(%rsp), %rsi
movb $0x1, 0x127(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rdx
callq 0x21240
jmp 0x41949
movb $0x1, 0x126(%rsp)
leaq 0xfc1e(%rip), %rsi      # 0x51576
leaq 0x148(%rsp), %rdi
callq 0xdd10
movb %al, 0x47(%rsp)
jmp 0x4196b
movb 0x47(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x56(%rsp)
jne 0x4197c
jmp 0x419cc
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x38(%rsp)
leaq 0x1d8(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x4180
jmp 0x419a2
movq 0x38(%rsp), %rdi
movb $0x1, 0xff(%rsp)
leaq 0x100(%rsp), %rsi
callq 0x20600
movb %al, 0x37(%rsp)
jmp 0x419c2
movb 0x37(%rsp), %al
xorb $-0x1, %al
movb %al, 0x56(%rsp)
movb 0x56(%rsp), %al
movb %al, 0x36(%rsp)
testb $0x1, 0xff(%rsp)
jne 0x419e0
jmp 0x419ed
leaq 0x100(%rsp), %rdi
callq 0x46e8
testb $0x1, 0x126(%rsp)
jne 0x419f9
jmp 0x41a06
leaq 0x148(%rsp), %rdi
callq 0x46e8
testb $0x1, 0x127(%rsp)
jne 0x41a12
jmp 0x41a1f
leaq 0x128(%rsp), %rdi
callq 0x46e8
leaq 0x178(%rsp), %rdi
callq 0x46e8
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x41a39
jmp 0x41b26
movb $0x1, 0x217(%rsp)
movl $0x1, 0xf8(%rsp)
jmp 0x41d96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41db4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41b14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41af9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41ade
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
testb $0x1, 0xff(%rsp)
jne 0x41acf
jmp 0x41adc
leaq 0x100(%rsp), %rdi
callq 0x46e8
jmp 0x41ade
testb $0x1, 0x126(%rsp)
jne 0x41aea
jmp 0x41af7
leaq 0x148(%rsp), %rdi
callq 0x46e8
jmp 0x41af9
testb $0x1, 0x127(%rsp)
jne 0x41b05
jmp 0x41b12
leaq 0x128(%rsp), %rdi
callq 0x46e8
jmp 0x41b14
leaq 0x178(%rsp), %rdi
callq 0x46e8
jmp 0x41db4
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x28(%rsp)
leaq 0x1d8(%rsp), %rsi
movb $0x0, 0x97(%rsp)
movb $0x0, 0x96(%rsp)
movb $0x0, 0x6f(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x4180
jmp 0x41b61
movq 0x28(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x20600
movb %al, 0x27(%rsp)
jmp 0x41b79
movb 0x27(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x26(%rsp)
jne 0x41b8d
jmp 0x41c51
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x18(%rsp)
leaq 0x1d8(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x4180
jmp 0x41bb3
movq 0x18(%rsp), %rsi
movb $0x1, 0x97(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x21240
jmp 0x41bd7
movb $0x1, 0x96(%rsp)
leaq 0xf990(%rip), %rsi      # 0x51576
leaq 0xb8(%rsp), %rdi
callq 0xdd10
movb %al, 0x17(%rsp)
jmp 0x41bf9
movb 0x17(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x26(%rsp)
jne 0x41c0a
jmp 0x41c51
movq 0x58(%rsp), %rdi
callq 0xdde0
movq %rax, 0x8(%rsp)
leaq 0x1b8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x4180
jmp 0x41c2d
movq 0x8(%rsp), %rdi
movb $0x1, 0x6f(%rsp)
leaq 0x70(%rsp), %rsi
callq 0x20600
movb %al, 0x7(%rsp)
jmp 0x41c47
movb 0x7(%rsp), %al
xorb $-0x1, %al
movb %al, 0x26(%rsp)
movb 0x26(%rsp), %al
movb %al, 0x6(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x41c62
jmp 0x41c6c
leaq 0x70(%rsp), %rdi
callq 0x46e8
testb $0x1, 0x96(%rsp)
jne 0x41c78
jmp 0x41c85
leaq 0xb8(%rsp), %rdi
callq 0x46e8
testb $0x1, 0x97(%rsp)
jne 0x41c91
jmp 0x41c9e
leaq 0x98(%rsp), %rdi
callq 0x46e8
leaq 0xd8(%rsp), %rdi
callq 0x46e8
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x41cb8
jmp 0x41d83
movb $0x1, 0x217(%rsp)
movl $0x1, 0xf8(%rsp)
jmp 0x41d96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41d74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41d59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x41d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x41d32
jmp 0x41d3c
leaq 0x70(%rsp), %rdi
callq 0x46e8
jmp 0x41d3e
testb $0x1, 0x96(%rsp)
jne 0x41d4a
jmp 0x41d57
leaq 0xb8(%rsp), %rdi
callq 0x46e8
jmp 0x41d59
testb $0x1, 0x97(%rsp)
jne 0x41d65
jmp 0x41d72
leaq 0x98(%rsp), %rdi
callq 0x46e8
jmp 0x41d74
leaq 0xd8(%rsp), %rdi
callq 0x46e8
jmp 0x41db4
movb $0x0, 0x217(%rsp)
movl $0x1, 0xf8(%rsp)
leaq 0x198(%rsp), %rdi
callq 0xd490
movb 0x217(%rsp), %al
andb $0x1, %al
addq $0x218, %rsp            # imm = 0x218
retq
leaq 0x198(%rsp), %rdi
callq 0xd490
movq 0x170(%rsp), %rdi
callq 0x45f0
nop