// File: /workspace/github_cpp_makefile_star2_O3/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 0xd4bc
movq %rdi, %r13
leaq 0x59f7(%rip), %rcx      # 0x1272c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0xdf32
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0xdf32
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xcdd3
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xcde1
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xcdf2
callq 0x3250
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq -0x100(%rbp), %rdi
movq %rbx, %rsi
callq 0xc952
leaq -0x90(%rbp), %rdi
movl $0x6, -0x8(%rdi)
movq %r14, (%rdi)
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
leaq -0x70(%rbp), %rdi
movq %r13, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
leaq -0x98(%rbp), %rdx
movq %r12, 0x48(%rdx)
movq $0x0, 0x50(%rdx)
movb $0x0, 0x58(%rdx)
movq %r15, %rdi
movq %r15, %rsi
callq 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xce80
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xce8e
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xce9f
callq 0x3250
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xcd06
leaq -0x90(%rbp), %rdi
movl $0x4, -0x8(%rdi)
movq %r14, (%rdi)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xcf12
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xcf20
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xcf31
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xcf90
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0xcf9e
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xcfaf
callq 0x3250
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcfc4
callq 0x3250
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcfd9
callq 0x3250
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xd4b7
jmp 0xd4bc
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0xc952
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd078
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd086
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xcfd4
jmp 0xcfd9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rbx
movq 0x10(%rax), %r14
cmpq %r14, %rbx
je 0xd4bc
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xcd06
addq $0x8, %rbx
jmp 0xd0a7
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jb 0xd4ce
movq 0x10(%rax), %rcx
movq %rcx, -0x30(%rbp)
jmp 0xd4d6
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd140
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd14e
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xd4b7
jmp 0xd4bc
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 0x6906
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 0x6906
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 0xe2c0
jmp 0xd47e
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rbx
movq 0x8(%rax), %rdx
leaq -0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0xc952
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 0x6906
leaq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xd29b
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd2a9
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
jne 0xcfd4
jmp 0xcfd9
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 0x6906
movq 0x8(%rbx), %r12
addq $0x8, %r12
cmpq 0x10(%rbx), %r12
movq %r13, -0xc0(%rbp)
je 0xd761
addq $0x10, %r13
leaq -0x40(%rbp), %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%r12), %rdx
leaq -0xe0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0xc952
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 0x6906
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %r14, -0x68(%rbp)
movb %r14b, -0x60(%rbp)
movq %rbx, -0x50(%rbp)
movq %r14, -0x48(%rbp)
movb %r14b, -0x40(%rbp)
movq %r13, %rdi
movq %r13, %rsi
leaq -0x98(%rbp), %rdx
callq 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd397
callq 0x3250
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xd3a9
callq 0x3250
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xd3be
callq 0x3250
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0xd3d6
callq 0x3250
addq $0x8, %r12
incl %r15d
movq -0x30(%rbp), %rax
cmpq 0x10(%rax), %r12
jne 0xd312
jmp 0xd764
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 0x6906
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xd48c
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd49a
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd4ab
callq 0x3250
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0xd4bc
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 0xdf32
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0xdf32
leaq -0x100(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xc952
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 0x6906
leaq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd59e
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd5ac
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd5bd
callq 0x3250
movq -0xc0(%rbp), %rdi
movq %r12, %rsi
callq 0xcd06
leaq -0x90(%rbp), %rdi
movl $0x4, -0x8(%rdi)
movq %rbx, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd62b
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd639
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd64a
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd6a9
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd6b7
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd6c8
callq 0x3250
cmpq $0x0, -0x30(%rbp)
je 0xd6df
movq -0xc0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xcd06
leaq -0x90(%rbp), %rdi
movl $0x3, -0x8(%rdi)
movq %rbx, (%rdi)
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
addq %rsi, %rdx
callq 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd73e
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd74c
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xcfaa
jmp 0xcfaf
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 0x6906
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd7e0
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd7ee
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0xd7ff
callq 0x3250
leaq -0x90(%rbp), %rdi
movl $0xb, -0x8(%rdi)
movl $0x1, %r14d
cmpl $0xa, %r15d
jb 0xd863
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0xd85a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xd860
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xd863
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xd827
addl $-0x3, %r14d
jmp 0xd863
addl $-0x2, %r14d
jmp 0xd863
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 0xa88a
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 0xe2c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xd8d5
callq 0x3250
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xd8e3
callq 0x3250
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd8f4
callq 0x3250
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
jmp 0xcfe4
jmp 0xd90e
jmp 0xda6f
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xdaa0
jmp 0xda6f
jmp 0xd966
jmp 0xd966
jmp 0xda35
jmp 0xda35
jmp 0xd966
jmp 0xd966
jmp 0xda35
jmp 0xda35
jmp 0xd966
jmp 0xda35
jmp 0xda35
jmp 0xd966
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0xda38
jmp 0xd992
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xda38
jmp 0xda35
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0xda38
callq 0x3250
jmp 0xda38
jmp 0xd9f7
jmp 0xda35
jmp 0xd9e6
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xda4d
jmp 0xd9d5
jmp 0xd9f7
movq %rax, %r12
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
jne 0xda5d
jmp 0xda62
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xda03
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xda62
movq %rax, %r12
jmp 0xda4d
jmp 0xda00
jmp 0xda30
movq %rax, %r12
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
jne 0xdab3
jmp 0xdab8
jmp 0xda30
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
jmp 0xdab8
jmp 0xda30
movq %rax, %r12
jmp 0xda62
movq %rax, %r12
leaq -0xf0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda4d
callq 0x3250
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda62
callq 0x3250
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xdaae
movq %rax, %r12
jmp 0xdaa0
movq %rax, %r12
jmp 0xda88
movq %rax, %r12
leaq -0x98(%rbp), %rdi
callq 0xe1ce
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0xdaa0
callq 0x3250
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0xdab8
callq 0x3250
movq %r12, %rdi
callq 0x3420