// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: pp_if_eval(expression&, unsigned long)
signed long long pp_if_eval(expression &expr,expression::node::node_t node) {
    if (node == expression::node::none)
        throw invalid_argument("expression tree with no root");

    const auto &n = expr.getnode(node);
    switch (n.tval.tval) {
        case token::INTEGER:
            return n.tval.i.s;
        case token::FLOAT:
            throw invalid_argument("Floating point not allowed in expressions at preprocessor level");
        case token::STRING:
            throw invalid_argument("Strings not allowed in expressions at preprocessor level");
        case token::ASSIGNMENT:
            throw invalid_argument("Assignment not permitted in macro preprocessor");
        case token::POSTINCREMENT:
        case token::POSTDECREMENT:
        case token::PREINCREMENT:
        case token::PREDECREMENT:
            throw invalid_argument("increment/decrement not allowed in macro preprocessor");
        case token::DEREFERENCE:
        case token::STRUCTREF:
        case token::ADDRESSOF:
            throw invalid_argument("struct/pointer ref not allowed in macro preprocessor");
        case token::SIZEOF:
            throw invalid_argument("sizeof not allowed in macro preprocessor");
        case token::COMMA:
            return pp_if_eval(expr,n.children.at(1)); /* a,b -> b */
        case token::PLUS:
            if (n.children.size() == 2)
                return pp_if_eval(expr,n.children.at(0)) + pp_if_eval(expr,n.children.at(1));
            else if (n.children.size() == 1)
                return pp_if_eval(expr,n.children.at(0)); /* +a -> a */
        case token::NEGATE:
            return -pp_if_eval(expr,n.children.at(0));
        case token::MINUS:
            return pp_if_eval(expr,n.children.at(0)) - pp_if_eval(expr,n.children.at(1));
        case token::NOT:
            return (pp_if_eval(expr,n.children.at(0)) == 0) ? 1 : 0;
        case token::COMPLEMENT:
            return ~pp_if_eval(expr,n.children.at(0));
        case token::MULTIPLY:
            return pp_if_eval(expr,n.children.at(0)) * pp_if_eval(expr,n.children.at(1));
        case token::DIVISION:
            return pp_if_eval(expr,n.children.at(0)) / pp_if_eval(expr,n.children.at(1));
        case token::MODULUS:
            return pp_if_eval(expr,n.children.at(0)) % pp_if_eval(expr,n.children.at(1));
        case token::LOGICAL_AND:
            return ((pp_if_eval(expr,n.children.at(0)) != 0ll) && (pp_if_eval(expr,n.children.at(1)) != 0ll)) ? 1 : 0;
        case token::LOGICAL_OR:
            return ((pp_if_eval(expr,n.children.at(0)) != 0ll) || (pp_if_eval(expr,n.children.at(1)) != 0ll)) ? 1 : 0;
        case token::BINARY_AND:
            return pp_if_eval(expr,n.children.at(0)) & pp_if_eval(expr,n.children.at(1));
        case token::BINARY_XOR:
            return pp_if_eval(expr,n.children.at(0)) ^ pp_if_eval(expr,n.children.at(1));
        case token::BINARY_OR:
            return pp_if_eval(expr,n.children.at(0)) | pp_if_eval(expr,n.children.at(1));
        case token::EQUALS:
            return (pp_if_eval(expr,n.children.at(0)) == pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::NOT_EQUALS:
            return (pp_if_eval(expr,n.children.at(0)) != pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::LESS_THAN:
            return (pp_if_eval(expr,n.children.at(0)) < pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::LESS_THAN_OR_EQUAL:
            return (pp_if_eval(expr,n.children.at(0)) <= pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::GREATER_THAN:
            return (pp_if_eval(expr,n.children.at(0)) > pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::GREATER_THAN_OR_EQUAL:
            return (pp_if_eval(expr,n.children.at(0)) >= pp_if_eval(expr,n.children.at(1))) ? 1 : 0;
        case token::TERNARY:
            return (pp_if_eval(expr,n.children.at(0)) != 0ll) ?
                    pp_if_eval(expr,n.children.at(1)) :
                    pp_if_eval(expr,n.children.at(2));
        case token::IDENTIFIER:
            return 0ll; /* if the macro expansion did not replace the identifier with a value then it is zero */
        case token::DEFINED:
            {
                const auto &c = expr.getnode(n.children.at(0));
                if (c.tval.tval == token::IDENTIFIER)
                    return is_macro(c.tval.sval) ? 1 : 0;
                else
                    throw invalid_argument("defined() used with a non-identifier");
            }
        case token::TYPECAST: /* .at(0)=type tokens .at(1)=expression to typecast */
            fprintf(stderr,"WARNING: Typecasts are ignored by the macro processor\n");
            return pp_if_eval(expr,n.children.at(n.children.size()-size_t(1)));
        default:
            break;
    };

    throw invalid_argument(string("unsupported expression in preprocessor level, token ")+to_string(n.tval));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0x12226
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
leaq 0x1338e(%rip), %rsi     # 0x25576
callq 0x3530
jmp 0x121ef
movq -0xb0(%rbp), %rdi
movq 0x20ddb(%rip), %rsi     # 0x32fd8
movq 0x20dbc(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x16810
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, -0xb8(%rbp)
subl $0x79, %eax
ja 0x12f96
movq -0xb8(%rbp), %rax
leaq 0x123f8(%rip), %rcx     # 0x24658
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
leaq 0x132fb(%rip), %rsi     # 0x25593
callq 0x3530
jmp 0x1229f
movq -0xc0(%rbp), %rdi
movq 0x20d2b(%rip), %rsi     # 0x32fd8
movq 0x20d0c(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
leaq 0x132df(%rip), %rsi     # 0x255d3
callq 0x3530
jmp 0x122fb
movq -0xc8(%rbp), %rdi
movq 0x20ccf(%rip), %rsi     # 0x32fd8
movq 0x20cb0(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
leaq 0x132bc(%rip), %rsi     # 0x2560c
callq 0x3530
jmp 0x12357
movq -0xd0(%rbp), %rdi
movq 0x20c73(%rip), %rsi     # 0x32fd8
movq 0x20c54(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
leaq 0x1328f(%rip), %rsi     # 0x2563b
callq 0x3530
jmp 0x123b3
movq -0xd8(%rbp), %rdi
movq 0x20c17(%rip), %rsi     # 0x32fd8
movq 0x20bf8(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
leaq 0x13269(%rip), %rsi     # 0x25671
callq 0x3530
jmp 0x1240f
movq -0xe0(%rbp), %rdi
movq 0x20bbb(%rip), %rsi     # 0x32fd8
movq 0x20b9c(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
leaq 0x13242(%rip), %rsi     # 0x256a6
callq 0x3530
jmp 0x1246b
movq -0xe8(%rbp), %rdi
movq 0x20b5f(%rip), %rsi     # 0x32fd8
movq 0x20b40(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0xf0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
callq 0x16a90
cmpq $0x2, %rax
jne 0x1255e
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x108(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x100(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0xf8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
callq 0x16a90
cmpq $0x1, %rax
jne 0x125a5
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x110(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x8(%rbp)
jmp 0x130af
jmp 0x125a7
jmp 0x125a9
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x118(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x130(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x128(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x120(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x138(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x140(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
xorq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x158(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x150(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x148(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x170(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x160(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x168(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x160(%rbp), %rax
cqto
idivq %rcx
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x188(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x178(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x180(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x178(%rbp), %rax
cqto
idivq %rcx
movq %rdx, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x198(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x189(%rbp)
je 0x128ae
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x1a0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
cmpq $0x0, %rax
setne %al
movb %al, -0x189(%rbp)
movb -0x189(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x1b0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x1a1(%rbp)
jne 0x12941
movq -0x10(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x1b8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
cmpq $0x0, %rax
setne %al
movb %al, -0x1a1(%rbp)
movb -0x1a1(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x1d0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x1c0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x1c8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x1e8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x1d8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x1e0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
xorq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x200(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x1f0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x1f8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
orq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x218(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x208(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x210(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x208(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x230(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x220(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x228(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x220(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x248(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x238(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x240(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x238(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovll %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x260(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x250(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x258(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x250(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovlel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x278(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x268(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x270(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x268(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovgl %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x290(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x280(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x288(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq -0x280(%rbp), %rdx
movq %rax, %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovgel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x298(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
cmpq $0x0, %rax
je 0x12e21
movq -0x10(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x1, %esi
callq 0x16ad0
movq -0x2a8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x2a0(%rbp)
jmp 0x12e54
movq -0x10(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movl $0x2, %esi
callq 0x16ad0
movq -0x2b0(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x130af
movq $0x0, -0x8(%rbp)
jmp 0x130af
movq -0x10(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16ad0
movq -0x2b8(%rbp), %rdi
movq %rax, %rsi
callq 0x16810
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x12ed0
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
callq 0x56b0
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x130af
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2c0(%rbp)
leaq 0x127e1(%rip), %rsi     # 0x256cf
callq 0x3530
jmp 0x12ef5
movq -0x2c0(%rbp), %rdi
movq 0x200d5(%rip), %rsi     # 0x32fd8
movq 0x200b6(%rip), %rdx     # 0x32fc0
callq 0x34b0
movq -0x2c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x130bc
movq 0x20085(%rip), %rax     # 0x32fb8
movq (%rax), %rdi
leaq 0x127b7(%rip), %rsi     # 0x256f4
movb $0x0, %al
callq 0x33f0
movq -0x10(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x30(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x2d0(%rbp)
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
callq 0x16a90
movq -0x2d0(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x16ad0
movq -0x2c8(%rbp), %rdi
movq (%rax), %rsi
callq 0x121b0
movq %rax, -0x8(%rbp)
jmp 0x130af
jmp 0x12f98
movb $0x1, -0xa1(%rbp)
movl $0x10, %edi
callq 0x3130
movq %rax, -0x2e0(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x34f0
movq -0x2d8(%rbp), %rdx
leaq 0x1275d(%rip), %rsi     # 0x2572b
leaq -0x78(%rbp), %rdi
callq 0x15960
jmp 0x12fd9
movq -0x30(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x7d10
jmp 0x12feb
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x15d50
jmp 0x13001
movq -0x2e0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x34d0
jmp 0x13013
movq -0x2e0(%rbp), %rdi
movb $0x0, -0xa1(%rbp)
movq 0x1ffb0(%rip), %rsi     # 0x32fd8
movq 0x1ff91(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x130c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1308d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x13084
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x13078
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3598
leaq -0xa0(%rbp), %rdi
callq 0x3598
leaq -0x78(%rbp), %rdi
callq 0x3598
leaq -0x79(%rbp), %rdi
callq 0x32f0
testb $0x1, -0xa1(%rbp)
jne 0x130a1
jmp 0x130ad
movq -0x2e0(%rbp), %rdi
callq 0x31f0
jmp 0x130bc
movq -0x8(%rbp), %rax
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x34e0
nopw %cs:(%rax,%rax)