// File: /workspace/github_cpp_makefile_star2_O1/taurheim[P]AgNES/irGenerator.cpp
// Function: IRGenerator::genTACStatement(ASTNode*)
void IRGenerator::genTACStatement(ASTNode * node) {
    StatementNode * statementNode = (StatementNode *)node;
    switch(statementNode->type) {
        case STMT_NES_WAITFORFRAME: {
            intermediateCode.push_back({ IR_NES_WAITFORFRAME });
            break;
        }
        case STMT_NES_SETSPRITEX: {
            IdentifierNode * globalIdentifier = (IdentifierNode*) node->children[0];
            std::string varName = globalIdentifier->name;

            intermediateCode.push_back({ IR_NES_SETSPRITEX, varName });
            break;
        }
        case STMT_NES_SETSPRITEY: {
            IdentifierNode * globalIdentifier = (IdentifierNode*) node->children[0];
            std::string varName = globalIdentifier->name;

            intermediateCode.push_back({ IR_NES_SETSPRITEY, varName });
            break;
        }
        case STMT_RETURN: {
            std::string returnValueRegister = genTACExpression(node->children[0]);
            intermediateCode.push_back({ IR_RETURN, returnValueRegister });
            break;
        }
        case STMT_FUNCTIONCALL: {
            IdentifierNode * functionIdentifier = (IdentifierNode*) node->children[0];
            std::string functionName = functionIdentifier->name;

            // Push params to the stack
            int parameterCount = 0;
            auto i = node->children.begin() + 1;
            while (i != node->children.end()) {
                ASTNode * argument = *i;
                std::string paramReg = genTACExpression(argument);
                intermediateCode.push_back({ IR_PUSHPARAM, paramReg });
                parameterCount++;
                i++;
            }

            // Call the function
            intermediateCode.push_back({ IR_CALL, functionName});

            // Pop the params off the stack
            intermediateCode.push_back({ IR_POPPARAMS, std::to_string(parameterCount)});
            break;
        }
        case (STMT_WHILE): {
            std::string labelBefore = genLabel();
            std::string labelAfter = genLabel();
            intermediateCode.push_back({ IR_NEWLABEL, labelBefore});
            std::string condition = genTACExpression(node->children[0]);
            intermediateCode.push_back({ IR_IFFALSEGOTO, condition, labelAfter });
            genTACStatement(node->children[1]);
            intermediateCode.push_back({ IR_GOTO, labelBefore });
            intermediateCode.push_back({ IR_NEWLABEL, labelAfter });
            break;
        }
        case (STMT_BLOCK): {
            for (auto & child : statementNode->children) {
                genTACStatement(child);
            }
            break;
        }
        case (STMT_ASSIGN): {
            ASTNode * assignmentNode = node->children[0];
            IdentifierNode * assignTo = (IdentifierNode*) assignmentNode->children[0];
            std::string tempRegister = genTACExpression(assignmentNode->children[1]);
            // TODO scope
            intermediateCode.push_back({ IR_ASSIGN, assignTo->name, tempRegister});
            break;
        }
        case (STMT_IF): {
            ASTNode * condition = node->children[0];
            ASTNode * ifBlock = node->children[1];
            ASTNode * elseBlock = nullptr;
            if (node->children.size() > 2) {
                // Future: handle more than just the else block
                elseBlock = node->children[2];
            }
            std::string falseLabel = genLabel();
            std::string outLabel = genLabel();
            std::string conditionRegister = genTACExpression(condition);
            intermediateCode.push_back({ IR_IFFALSEGOTO, conditionRegister, falseLabel });
            genTACStatement(ifBlock);
            intermediateCode.push_back({ IR_GOTO, outLabel });
            intermediateCode.push_back({ IR_NEWLABEL, falseLabel });
            if (elseBlock != nullptr) {
                genTACStatement(elseBlock);
            }
            intermediateCode.push_back({ IR_NEWLABEL, outLabel });
            break;
        }
        default: {
            return;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, -0x30(%rbp)
movl 0x20(%rsi), %eax
cmpq $0xa, %rax
ja 0xd64d
movq %rdi, %r13
leaq 0x5867(%rip), %rcx      # 0x1272c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0xe0c0
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0xe0c0
leaq -0x90(%rbp), %rdi
movl $0x3, -0x8(%rdi)
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
movq %r13, %rbx
leaq 0x10(%r13), %r15
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x98(%rbp), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xcf63
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xcf71
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xcf82
callq 0x3250
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq -0x100(%rbp), %rdi
movq %rbx, %rsi
callq 0xcada
leaq -0x90(%rbp), %rdi
movl $0x6, -0x8(%rdi)
movq %r14, (%rdi)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x70(%rbp), %rdi
movq %r13, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r12, 0x48(%rdx)
movq $0x0, 0x50(%rdx)
movb $0x0, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xd010
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xd01e
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xd02f
callq 0x3250
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xce96
leaq -0x90(%rbp), %rdi
movl $0x4, -0x8(%rdi)
movq %r14, (%rdi)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r13, 0x28(%rdx)
xorl %eax, %eax
movq %rax, 0x30(%rdx)
movb %al, 0x38(%rdx)
movq %r12, 0x48(%rdx)
movq %rax, 0x50(%rdx)
movb %al, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xd0a2
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xd0b0
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xd0c1
callq 0x3250
leaq -0x90(%rbp), %rdi
movl $0x3, -0x8(%rdi)
movq %r14, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r13, 0x28(%rdx)
xorl %eax, %eax
movq %rax, 0x30(%rdx)
movb %al, 0x38(%rdx)
movq %r12, 0x48(%rdx)
movq %rax, 0x50(%rdx)
movb %al, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xd120
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xd12e
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xd13f
callq 0x3250
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd154
callq 0x3250
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd169
callq 0x3250
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xd648
jmp 0xd64d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0xcada
leaq -0x90(%rbp), %rdi
movl $0xd, -0x8(%rdi)
leaq -0x80(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x6992
addq $0x10, %r13
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x98(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd208
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd216
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xd164
jmp 0xd169
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rbx
movq 0x10(%rax), %r14
cmpq %r14, %rbx
je 0xd64d
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xce96
addq $0x8, %rbx
jmp 0xd237
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jb 0xd65f
movq 0x10(%rax), %rcx
movq %rcx, -0x30(%rbp)
jmp 0xd667
addq $0x10, %r13
leaq -0x80(%rbp), %rbx
movl $0xe, -0x18(%rbx)
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x98(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd2d0
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd2de
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xd648
jmp 0xd64d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
callq 0x6992
leaq -0x90(%rbp), %rdi
movl $0xf, -0x8(%rdi)
leaq -0x80(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x6992
addq $0x10, %r13
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x98(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0xe44e
jmp 0xd60f
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq (%rcx), %rbx
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0xcada
leaq -0x90(%rbp), %rdi
movl $0x2, -0x8(%rdi)
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
addq $0x10, %r13
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x98(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd42f
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd43d
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
jne 0xd164
jmp 0xd169
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %rax
movq (%rax), %rax
leaq -0xa8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x6992
movq 0x8(%rbx), %r12
addq $0x8, %r12
cmpq 0x10(%rbx), %r12
movq %r13, -0xc0(%rbp)
je 0xd8f2
addq $0x10, %r13
leaq -0x40(%rbp), %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%r12), %rdx
leaq -0xe0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0xcada
movl $0xa, -0x98(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x6992
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rbx, -0x68(%rbp)
movb %bl, -0x60(%rbp)
movq %r14, -0x50(%rbp)
movq %rbx, -0x48(%rbp)
movb %bl, -0x40(%rbp)
movq %r13, %rdi
movq %r13, %rsi
leaq -0x98(%rbp), %rdx
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xd528
callq 0x3250
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xd53a
callq 0x3250
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xd54f
callq 0x3250
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0xd567
callq 0x3250
addq $0x8, %r12
incl %r15d
movq -0x30(%rbp), %rax
cmpq 0x10(%rax), %r12
jne 0xd4a5
jmp 0xd8f5
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
callq 0x6992
leaq -0x90(%rbp), %rdi
movl $0x10, -0x8(%rdi)
leaq -0x80(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x6992
addq $0x10, %r13
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x98(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xd61d
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd62b
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd63c
callq 0x3250
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0xd64d
callq 0x3250
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, -0x30(%rbp)
movq (%rax), %r15
movq 0x8(%rax), %r12
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0xe0c0
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0xe0c0
leaq -0x100(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xcada
leaq -0x90(%rbp), %rdi
movl $0x6, -0x8(%rdi)
leaq -0x80(%rbp), %rax
movq %rax, %rbx
movq %rax, -0x10(%rax)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
movq %r13, -0xc0(%rbp)
leaq 0x10(%r13), %r15
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq -0x98(%rbp), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd72f
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd73d
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd74e
callq 0x3250
movq -0xc0(%rbp), %rdi
movq %r12, %rsi
callq 0xce96
leaq -0x90(%rbp), %rdi
movl $0x4, -0x8(%rdi)
movq %rbx, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r14, 0x28(%rdx)
xorl %eax, %eax
movq %rax, 0x30(%rdx)
movb %al, 0x38(%rdx)
movq %r13, 0x48(%rdx)
movq %rax, 0x50(%rdx)
movb %al, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd7bc
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd7ca
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd7db
callq 0x3250
leaq -0x90(%rbp), %rdi
movl $0x3, -0x8(%rdi)
movq %rbx, (%rdi)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r14, 0x28(%rdx)
xorl %eax, %eax
movq %rax, 0x30(%rdx)
movb %al, 0x38(%rdx)
movq %r13, 0x48(%rdx)
movq %rax, 0x50(%rdx)
movb %al, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd83a
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd848
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd859
callq 0x3250
cmpq $0x0, -0x30(%rbp)
je 0xd870
movq -0xc0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xce96
leaq -0x90(%rbp), %rdi
movl $0x3, -0x8(%rdi)
movq %rbx, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
leaq -0x98(%rbp), %rdx
movq %r14, 0x28(%rdx)
xorl %eax, %eax
movq %rax, 0x30(%rdx)
movb %al, 0x38(%rdx)
movq %r13, 0x48(%rdx)
movq %rax, 0x50(%rdx)
movb %al, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd8cf
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd8dd
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xd13a
jmp 0xd13f
xorl %r15d, %r15d
leaq -0x90(%rbp), %rdi
movl $0x9, -0x8(%rdi)
leaq -0x80(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6992
movq -0xc0(%rbp), %rdi
addq $0x10, %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq -0x98(%rbp), %rdx
movq %rdi, -0xc0(%rbp)
movq %rdi, %rsi
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd971
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd97f
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xd990
callq 0x3250
leaq -0x90(%rbp), %rdi
movl $0xb, -0x8(%rdi)
movl $0x1, %r14d
cmpl $0xa, %r15d
jb 0xd9f4
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0xd9eb
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xd9f1
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xd9f4
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xd9b8
addl $-0x3, %r14d
jmp 0xd9f4
addl $-0x2, %r14d
jmp 0xd9f4
decl %r14d
movl %r14d, %esi
movq %r12, %rbx
movq %r12, -0x90(%rbp)
movl $0x2d, %edx
callq 0x32e0
leaq -0x98(%rbp), %r12
movq 0x8(%r12), %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0xa9d4
leaq -0x60(%rbp), %r14
movq %r14, 0x28(%r12)
xorl %eax, %eax
movq %rax, 0x30(%r12)
movb %al, 0x38(%r12)
movq %r13, 0x48(%r12)
movq %rax, 0x50(%r12)
movb %al, 0x58(%r12)
movq -0xc0(%rbp), %rdi
movq %rdi, %rsi
movq %r12, %rdx
callq 0xe44e
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xda66
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xda74
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xda85
callq 0x3250
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
jmp 0xd174
jmp 0xda9f
jmp 0xdc00
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdc31
jmp 0xdc00
jmp 0xdaf7
jmp 0xdaf7
jmp 0xdbc6
jmp 0xdbc6
jmp 0xdaf7
jmp 0xdaf7
jmp 0xdbc6
jmp 0xdbc6
jmp 0xdaf7
jmp 0xdbc6
jmp 0xdbc6
jmp 0xdaf7
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xdbc9
jmp 0xdb23
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdbc9
jmp 0xdbc6
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xdbc9
callq 0x3250
jmp 0xdbc9
jmp 0xdb88
jmp 0xdbc6
jmp 0xdb77
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdbde
jmp 0xdb66
jmp 0xdb88
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
jne 0xdbee
jmp 0xdbf3
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdb94
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdbf3
movq %rax, %r12
jmp 0xdbde
jmp 0xdb91
jmp 0xdbc1
movq %rax, %r12
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
jne 0xdc44
jmp 0xdc49
jmp 0xdbc1
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
jmp 0xdc49
jmp 0xdbc1
movq %rax, %r12
jmp 0xdbf3
movq %rax, %r12
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbde
callq 0x3250
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbf3
callq 0x3250
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xdc3f
movq %rax, %r12
jmp 0xdc31
movq %rax, %r12
jmp 0xdc19
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe35c
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0xdc31
callq 0x3250
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0xdc49
callq 0x3250
movq %r12, %rdi
callq 0x3420
nop