// File: /workspace/github_cpp_makefile_star2_O3/Merulo[P]CompilerJFTT/src/IRs/SecondIR.cpp
// Function: SecondIR::checkTwoMod(Line&, Block&, unsigned long)
void SecondIR::checkTwoMod(Line& l, Block& b, size_t i)
{
    if (!_symbolTable->isConst(l.two))
    {
        return;
    }
    std::string value = _symbolTable->getConstValue(l.two);
    if (value == "0")
    {
        l.operation = "CONST";
        std::string arg = l.two;
        l.two = "0";
        stripVariable(arg, b);
        return;
    }
    if (value != "2")
    {
        return;
    }
    Line copy = l;
    stripVariable(l.two, b);
    b.lines.insert(b.lines.begin() + i - 1, copy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, 0x70(%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %r13
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x40(%rsi), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rbp
movq %rbp, %rdi
callq 0xc7aa
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1a6f8
movl %eax, %ebp
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x22d4d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x42a0
testb %bpl, %bpl
je 0x22fc8
movq (%r12), %r12
leaq 0x108(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %r13
movq %r13, %rdi
callq 0xc7aa
leaq 0xb8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1afb8
movq 0xf8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x22db1
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x1477d(%rip), %rsi     # 0x37535
leaq 0xb8(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
je 0x22ee5
leaq 0x1596d(%rip), %rsi     # 0x38741
leaq 0xb8(%rsp), %rdi
callq 0x40d0
testl %eax, %eax
jne 0x22fa7
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xc7aa
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0xc7aa
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
callq 0xc7aa
movl 0x60(%r14), %eax
movl %eax, 0x68(%rsp)
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xc7aa
leaq 0x78(%rsp), %rsi
movq %rbx, %rdx
callq 0x21a1e
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x22e93
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x20(%rbx), %rax
addq $0x20, %rbx
imulq $0x68, 0x70(%rsp), %rcx
leaq (%rax,%rcx), %rsi
addq $-0x68, %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x23d72
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x22ecd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x22f90
movq 0x38(%rsp), %rsi
jmp 0x22f88
movq 0x8(%r14), %rdx
leaq 0x14631(%rip), %rcx     # 0x37521
movl $0x5, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x4440
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xc7aa
movq 0x48(%r14), %rdx
addq $0x40, %r14
leaq 0x14608(%rip), %rcx     # 0x37535
movl $0x1, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x4440
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0xc7aa
leaq 0x98(%rsp), %rsi
movq %rbx, %rdx
callq 0x21a1e
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x22f90
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x22fa7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x22fc8
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x42a0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22ffb
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x22ffe
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x22ffe
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xbca2
jmp 0x23065
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2304e
movq 0x38(%rsp), %rsi
jmp 0x2303a
jmp 0x2304b
jmp 0x23046
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x2304e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x2304e
jmp 0x23046
movq %rax, %rbx
jmp 0x23065
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23065
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0xc8(%rsp), %rbp
movq -0x10(%rbp), %rdi
jmp 0x2307e
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x230a9
movq (%rbp), %rsi
jmp 0x230a1
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x230a9
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x44c0
nop