// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
movq 0x28(%rsi), %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq -0x68(%r14), %rsi
movq -0x60(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xca12
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq -0x48(%r14), %rsi
movq -0x40(%r14), %rdx
addq %rsi, %rdx
callq 0xca12
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq -0x28(%r14), %rsi
movq -0x20(%r14), %rdx
addq %rsi, %rdx
callq 0xca12
movl -0x8(%r14), %eax
movl %eax, 0x60(%rsp)
movq (%rbx), %r14
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0xca12
leaq 0x108(%rsp), %rsi
movq %r14, %rdi
callq 0x1a9b6
movl %eax, %ebp
testb %al, %al
je 0x2f20b
movq (%rbx), %r14
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0xca12
leaq 0x148(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
movq %r14, %rsi
callq 0x1b276
leaq 0x933f(%rip), %rsi      # 0x38535
leaq 0x148(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0x2f425
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x2f235
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f235
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
testb %bpl, %bpl
je 0x2f27c
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f25b
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f27c
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f299
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
movb $0x1, %bpl
testb %r14b, %r14b
jne 0x2f3c3
movq (%rbx), %r14
leaq 0xd8(%rsp), %rax
movq %rax, %r13
movq %rax, -0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0xca12
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x1a9b6
movl %eax, %r14d
testb %al, %al
je 0x2f33c
movq (%rbx), %r15
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xca12
leaq 0x128(%rsp), %rdi
leaq 0x68(%rsp), %rdx
movq %r15, %rsi
callq 0x1b276
leaq 0x920e(%rip), %rsi      # 0x38535
leaq 0x128(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0x2f46c
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
je 0x2f365
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f365
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
testb %r14b, %r14b
je 0x2f3a6
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f38b
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f3a6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f3c3
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f3da
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2f3f6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2f411
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movl %ebp, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %r14
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xca12
leaq 0x88(%rsp), %rsi
movq %r14, %rdi
callq 0x1a9b6
movl %eax, %r14d
xorb $0x1, %r14b
movb $0x1, %al
jmp 0x2f210
movq (%rbx), %rbx
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0xca12
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1a9b6
movl %eax, %ebp
xorb $0x1, %bpl
movb $0x1, %al
jmp 0x2f340
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f4d7
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f4d7
movq %rax, %rbx
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f54d
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f54d
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2f527
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f527
movq %rax, %rbx
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f58e
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f58e
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2f570
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f570
jmp 0x2f56d
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f615
movq 0xd8(%rsp), %rsi
jmp 0x2f5c7
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f5b2
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f5b2
jmp 0x2f5af
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x2f615
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f615
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2f5f5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f5f5
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2f61d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2f61d
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbf10
movq %rbx, %rdi
callq 0x44c0
nop