// File: 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:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movq %rdx, 0x1c0(%rsp)
movq %rcx, 0x1b8(%rsp)
movq 0x1d0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xdde0
movq %rax, 0x38(%rsp)
movq 0x1c8(%rsp), %rsi
addq $0x40, %rsi
leaq 0x198(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x4180
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x20600
movb %al, 0x4f(%rsp)
jmp 0x2f6c1
movb 0x4f(%rsp), %al
xorb $-0x1, %al
movb %al, 0x2f(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x46e8
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x2f6e2
jmp 0x2f70d
jmp 0x2f9dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x46e8
jmp 0x2fa33
movq 0x30(%rsp), %rdi
callq 0xdde0
movq %rax, 0x18(%rsp)
movq 0x1c8(%rsp), %rsi
addq $0x40, %rsi
leaq 0x148(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4180
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x168(%rsp), %rdi
callq 0x21240
jmp 0x2f753
leaq 0x148(%rsp), %rdi
callq 0x46e8
leaq 0x21e0f(%rip), %rsi     # 0x51576
leaq 0x168(%rsp), %rdi
callq 0xdd10
movb %al, 0x17(%rsp)
jmp 0x2f77a
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x2f787
jmp 0x2f8b7
movq 0x1c8(%rsp), %rdi
leaq 0x21dcc(%rip), %rsi     # 0x51562
callq 0x44a0
jmp 0x2f79d
movq 0x1c8(%rsp), %rsi
addq $0x40, %rsi
leaq 0x128(%rsp), %rdi
callq 0x4180
jmp 0x2f7b8
movq 0x1c8(%rsp), %rdi
addq $0x40, %rdi
leaq 0x21dab(%rip), %rsi     # 0x51576
callq 0x44a0
jmp 0x2f7d2
leaq 0x108(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x4180
jmp 0x2f7e9
movq 0x30(%rsp), %rdi
movq 0x1c0(%rsp), %rdx
leaq 0x108(%rsp), %rsi
callq 0x2e010
jmp 0x2f805
leaq 0x108(%rsp), %rdi
callq 0x46e8
movl $0x1, 0x104(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x46e8
jmp 0x2f9d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x46e8
jmp 0x2fa33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
jmp 0x2fa26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
jmp 0x2f8a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x46e8
leaq 0x128(%rsp), %rdi
callq 0x46e8
jmp 0x2fa26
leaq 0x22f95(%rip), %rsi     # 0x52853
leaq 0x168(%rsp), %rdi
callq 0x310a0
movb %al, 0x16(%rsp)
jmp 0x2f8d1
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0x2f8db
jmp 0x2f8eb
movl $0x1, 0x104(%rsp)
jmp 0x2f9d0
movq 0x1c8(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0xfb20
jmp 0x2f902
movq 0x1c8(%rsp), %rsi
addq $0x40, %rsi
leaq 0x78(%rsp), %rdi
callq 0x4180
jmp 0x2f91a
movq 0x30(%rsp), %rdi
movq 0x1c0(%rsp), %rdx
leaq 0x78(%rsp), %rsi
callq 0x2e010
jmp 0x2f933
leaq 0x78(%rsp), %rdi
callq 0x46e8
movq 0x1c0(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, (%rsp)
callq 0xe3f0
movq %rax, 0x58(%rsp)
movq 0x1b8(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0xe510
movq %rax, 0x60(%rsp)
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0x118b0
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xe3b0
movq (%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x30e70
movq %rax, 0x8(%rsp)
jmp 0x2f9ae
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xd490
movl $0x0, 0x104(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x46e8
addq $0x1d8, %rsp            # imm = 0x1D8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
jmp 0x2fa19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x46e8
leaq 0x98(%rsp), %rdi
callq 0xd490
leaq 0x168(%rsp), %rdi
callq 0x46e8
movq 0x190(%rsp), %rdi
callq 0x45f0