// File: taurheim[P]AgNES/./util/irUtil.h
// Function: printIRCode(std::__cxx11::list<TAC, std::allocator<TAC>>)
static void printIRCode(std::list<TAC> code) {
    for (auto & i : code) {
        switch(i.op) {
            case IR_ADD: {
                std::cout << "\t" <<  i.first << " := " << i.second << " + " << i.third;
                break;
            }
            case IR_SUBTRACT: {
                std::cout << "\t" << i.first << " := " << i.second << " - " << i.third;
                break;
            }
            case IR_ASSIGN: {
                std::cout << "\t" << i.first << " := " << i.second;
                break;
            }
            case IR_GOTO: {
                std::cout<< "\t"  << "Goto " << i.first;
                break;
            }
            case IR_IFTRUEGOTO: {
                std::cout << "\t" << "If " << i.first << " goto " << i.second;
                break;
            }
            case IR_IFFALSEGOTO: {
                std::cout << "\t" << "IfNot " << i.first << " goto " << i.second;
                break;
            }
            case IR_BEGINFUNC: {
                std::cout << "\t" << "BeginFunc " << i.first << " " << i.second;
                break;
            }
            case IR_ENDFUNC: {
                std::cout << "\t" << "EndFunc";
                break;
            }
            case IR_NEWLABEL: {
                std::cout << i.first << ":";
                break;
            }
            case IR_CALL: {
                std::cout << "\t" << "Call " << i.first;
                break;
            }
            case IR_PUSHPARAM: {
                std::cout << "\t" << "PushParam " << i.first;
                break;
            }
            case IR_POPPARAMS: {
                std::cout << "\t" << "PopParams " << i.first;
                break;
            }
            case IR_DECLARATION: {
                std::cout << "\t" << "Declare " << i.first << " as " << i.second;
                break;
            }
            case IR_RETURN: {
                std::cout << "\t" << "Return " << i.first;
                break;
            }
            case IR_NES_WAITFORFRAME: {
                std::cout << "\t" << "NES_WAITFORFRAME";
                break;
            }
            case IR_NES_SETSPRITEX: {
                std::cout << "\t" << "NES_SETSPRITEX " << i.first;
                break;
            }
            case IR_NES_SETSPRITEY: {
                std::cout << "\t" << "NES_SETSPRITEY " << i.first;
                break;
            }
            default: {
                std::cout << "\t" << "<IR NOT SUPPORTED BY irUtil>";
                break;
            }
        }
        std::cout << std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1e700
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xca00
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1e730
testb $0x1, %al
jne 0x1c600
jmp 0x1cad4
leaq -0x18(%rbp), %rdi
callq 0x1e4b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x30(%rbp)
subq $0x10, %rax
ja 0x1ca91
movq -0x30(%rbp), %rax
leaq 0x8190(%rip), %rcx      # 0x247bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x1898c(%rip), %rdi     # 0x34fc8
leaq 0x7ca8(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x81d4(%rip), %rsi      # 0x24836
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x81ba(%rip), %rsi      # 0x2483b
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x48, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18926(%rip), %rdi     # 0x34fc8
leaq 0x7c42(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x816e(%rip), %rsi      # 0x24836
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x8158(%rip), %rsi      # 0x2483f
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x48, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x188c0(%rip), %rdi     # 0x34fc8
leaq 0x7bdc(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x8108(%rip), %rsi      # 0x24836
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18879(%rip), %rdi     # 0x34fc8
leaq 0x7b95(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x80de(%rip), %rsi      # 0x24843
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18842(%rip), %rdi     # 0x34fc8
leaq 0x7b5e(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x80ad(%rip), %rsi      # 0x24849
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x8092(%rip), %rsi      # 0x2484d
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x187ec(%rip), %rdi     # 0x34fc8
leaq 0x7b08(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x8062(%rip), %rsi      # 0x24854
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x803c(%rip), %rsi      # 0x2484d
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18796(%rip), %rdi     # 0x34fc8
leaq 0x7ab2(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x8013(%rip), %rsi      # 0x2485b
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x80bf(%rip), %rsi      # 0x24926
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18740(%rip), %rdi     # 0x34fc8
leaq 0x7a5c(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7fc8(%rip), %rsi      # 0x24866
callq 0x32e0
jmp 0x1cab3
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
movq 0x18711(%rip), %rdi     # 0x34fc8
callq 0x32a0
movq %rax, %rdi
leaq 0x80c9(%rip), %rsi      # 0x2498f
callq 0x32e0
jmp 0x1cab3
movq 0x186f1(%rip), %rdi     # 0x34fc8
leaq 0x7a0d(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7f81(%rip), %rsi      # 0x2486e
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x186ba(%rip), %rdi     # 0x34fc8
leaq 0x79d6(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7f50(%rip), %rsi      # 0x24874
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18683(%rip), %rdi     # 0x34fc8
leaq 0x799f(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7f24(%rip), %rsi      # 0x2487f
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x1864c(%rip), %rdi     # 0x34fc8
leaq 0x7968(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7ef8(%rip), %rsi      # 0x2488a
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0x7ee2(%rip), %rsi      # 0x24893
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x185f6(%rip), %rdi     # 0x34fc8
leaq 0x7912(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7eb0(%rip), %rsi      # 0x24898
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x185bf(%rip), %rdi     # 0x34fc8
leaq 0x78db(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x769c(%rip), %rsi      # 0x240bb
callq 0x32e0
jmp 0x1cab3
movq 0x18598(%rip), %rdi     # 0x34fc8
leaq 0x78b4(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7e5a(%rip), %rsi      # 0x248a0
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18564(%rip), %rdi     # 0x34fc8
leaq 0x7880(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7e36(%rip), %rsi      # 0x248b0
callq 0x32e0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x32a0
jmp 0x1cab3
movq 0x18530(%rip), %rdi     # 0x34fc8
leaq 0x784c(%rip), %rsi      # 0x242eb
callq 0x32e0
movq %rax, %rdi
leaq 0x7e12(%rip), %rsi      # 0x248c0
callq 0x32e0
movq 0x1850e(%rip), %rdi     # 0x34fc8
movq 0x184f7(%rip), %rsi     # 0x34fb8
callq 0x3330
leaq -0x18(%rbp), %rdi
callq 0x1e760
jmp 0x1c5ea
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)