// File: /workspace/github_cpp_makefile_star2_O1/cphinton42[P]hinton-language/src/parse.cpp
// Function: parse_expr(Parsing_Context*, Token**, unsigned int)
internal Expr_AST* parse_expr(Parsing_Context *ctx, Token **current_ptr, u32 precedence = 7)
{
    Token *current = *current_ptr;
    Token *start_section = current;
    defer {
        *current_ptr = current;
    };
    
    Expr_AST *lhs = parse_base_expr(ctx, &current, precedence);
    if(!lhs)
    {
        return nullptr;
    }
    
    while(true)
    {
        Binary_Operator op;
        bool found_op;
        u32 rhs_precedence;
        
        switch(precedence)
        {
            case 7:
            if(current->type == Token_Type::lor)
            {
                op = Binary_Operator::lor;
                found_op = true;
                rhs_precedence = 6;
                break;
            }
            case 6:
            if(current->type == Token_Type::land)
            {
                op = Binary_Operator::land;
                found_op = true;
                rhs_precedence = 5;
                break;
            }
            case 5:
            if(current->type == Token_Type::double_equal)
            {
                op = Binary_Operator::cmp_eq;
                found_op = true;
                rhs_precedence = 4;
                break;
            }
            if(current->type == Token_Type::not_equal)
            {
                op = Binary_Operator::cmp_neq;
                found_op = true;
                rhs_precedence = 4;
                break;
            }
            case 4:
            if(current->type == Token_Type::lt)
            {
                op = Binary_Operator::cmp_lt;
                found_op = true;
                rhs_precedence = 3;
                break;
            }
            if(current->type == Token_Type::le)
            {
                op = Binary_Operator::cmp_le;
                found_op = true;
                rhs_precedence = 3;
                break;
            }
            if(current->type == Token_Type::gt)
            {
                op = Binary_Operator::cmp_gt;
                found_op = true;
                rhs_precedence = 3;
                break;
            }
            if(current->type == Token_Type::ge)
            {
                op = Binary_Operator::cmp_ge;
                found_op = true;
                rhs_precedence = 3;
                break;
            }
            case 3:
            if(current->type == Token_Type::add)
            {
                op = Binary_Operator::add;
                found_op = true;
                rhs_precedence = 2;
                break;
            }
            if(current->type == Token_Type::sub)
            {
                op = Binary_Operator::sub;
                found_op = true;
                rhs_precedence = 2;
                break;
            }
            case 2:
            if(current->type == Token_Type::mul)
            {
                op = Binary_Operator::mul;
                found_op = true;
                rhs_precedence = 1;
                break;
            }
            if(current->type == Token_Type::div)
            {
                op = Binary_Operator::div;
                found_op = true;
                rhs_precedence = 1;
                break;
            }
            case 1:
            if(current->type == Token_Type::open_paren)
            {
                ++current;
                
                Dynamic_Array<Expr_AST*> args = {0};
                
                if(current->type != Token_Type::eof && current->type != Token_Type::close_paren)
                {
                    Expr_AST *first_expr = parse_expr(ctx, &current);
                    if(!first_expr)
                    {
                        return nullptr;
                    }
                    array_add(&args, first_expr);
                }
                
                while(current->type != Token_Type::eof && current->type != Token_Type::close_paren)
                {
                    if(current->type != Token_Type::comma)
                    {
                        report_error(ctx, start_section, current, "Expected ','");
                        return nullptr;
                    }
                    ++current;
                    
                    Expr_AST *expr = parse_expr(ctx, &current);
                    if(!expr)
                    {
                        return nullptr;
                    }
                    array_add(&args, expr);
                }
                if(current->type != Token_Type::close_paren)
                {
                    report_error(ctx, start_section, current, "Expected ')'");
                    return nullptr;
                }
                ++current;
                
                Function_Call_AST *call_ast = construct_ast(ctx->ast_pool, Function_Call_AST, lhs->line_number, lhs->line_offset);
                call_ast->types_count = 0;
                call_ast->resolved_type = nullptr;
                call_ast->function = lhs;
                call_ast->args.count = args.count;
                call_ast->args.data = pool_alloc(Expr_AST*, args.count, ctx->ast_pool);
                
                for(u64 i = 0; i < args.count; ++i)
                {
                    call_ast->args[i] = args[i];
                }
                
                // TODO memory leak
                lhs = call_ast;
                
                continue;
            }
            if(current->type == Token_Type::open_sqr)
            {
                op = Binary_Operator::subscript;
                
                ++current;
                Expr_AST *rhs = parse_expr(ctx, &current);
                if(rhs)
                {
                    if(current->type == Token_Type::close_sqr)
                    {
                        ++current;
                        
                        Binary_Operator_AST *result = construct_ast(ctx->ast_pool, Binary_Operator_AST, lhs->line_number, lhs->line_offset);
                        result->types_count = 0;
                        result->resolved_type = nullptr;
                        result->op = op;
                        result->lhs = lhs;
                        result->rhs = rhs;
                        
                        lhs = result;
                        
                        continue;
                    }
                    else
                    {
                        report_error(ctx, start_section, current, "Expected ']'");
                        return nullptr;
                    }
                }
                else
                {
                    return nullptr;
                }
                
                break;
            }
            if(current->type == Token_Type::dot)
            {
                ++current;
                if(current->type == Token_Type::ident)
                {
                    Access_AST *result = construct_ast(ctx->ast_pool, Access_AST, lhs->line_number, lhs->line_offset);
                    result->types_count = 0;
                    result->resolved_type = nullptr;
                    result->lhs = lhs;
                    result->ident = current->contents;
                    ++current;
                    
                    lhs = result;
                    
                    continue;
                }
                else
                {
                    report_error(ctx, start_section, current, "Expected identifier");
                    return nullptr;
                }
                
                break;
            }
            case 0:
            found_op = false;
            break;
            default: {
                assert(false);
            } break;
        }
        
        if(found_op)
        {
            ++current;
            Expr_AST *rhs = parse_expr(ctx, &current, rhs_precedence);
            if(rhs)
            {
                Binary_Operator_AST *result = construct_ast(ctx->ast_pool, Binary_Operator_AST, lhs->line_number, lhs->line_offset);
                result->types_count = 0;
                result->resolved_type = nullptr;
                result->op = op;
                result->lhs = lhs;
                result->rhs = rhs;
                
                lhs = result;
            }
            else
            {
                return nullptr;
            }
        }
        else
        {
            return lhs;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x40(%rsp)
movq %rdi, %rbp
movq %rsi, 0x58(%rsp)
movq (%rsi), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movq %rax, 0x38(%rsp)
movq (%rax), %rax
xorl %r13d, %r13d
cmpq $0x39, %rax
movq %rdi, 0x10(%rsp)
ja 0xd9c7
leaq 0x37e9(%rip), %rcx      # 0x105a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x81, %r14d
jmp 0xd261
movl $0x34, %r14d
jmp 0xd261
movl $0x2c, %r14d
jmp 0xd261
movl $0x100, %r14d           # imm = 0x100
jmp 0xd261
movl $0x33, %r14d
jmp 0xd261
movl $0x29, %r14d
jmp 0xd261
movq 0x20(%rbp), %rdi
movl $0x40, %esi
callq 0x95e6
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x12, (%r13)
movl 0x8d46(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x8d3d(%rip)      # 0x15b78
movl %edx, 0x4(%r13)
movq %rcx, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movupd 0x10(%rax), %xmm0
movupd %xmm0, 0x20(%r13)
movq 0x20(%r13), %rbx
movq 0x28(%r13), %r14
testq %rbx, %rbx
je 0xd521
xorl %edx, %edx
movl $0x1, %edi
xorl %ecx, %ecx
xorl %esi, %esi
xorl %r8d, %r8d
cmpb $0x5c, (%r14,%rdx)
movzbl %cl, %ecx
cmovel %edi, %ecx
sete %r8b
incq %rsi
addq %r8, %rdx
incq %rdx
cmpq %rbx, %rdx
jb 0xce72
jmp 0xd525
xorl %ebx, %ebx
jmp 0xd13a
movl $0x2, %r13d
jmp 0xd08c
movl $0x31, %r14d
jmp 0xd261
movl $0x1, %r13d
jmp 0xd08c
movl $0x4, %r13d
jmp 0xd08c
movl $0x83, %r14d
jmp 0xd261
xorl %r14d, %r14d
jmp 0xd261
movq 0x20(%rbp), %rdi
movl $0x40, %esi
callq 0x95e6
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movupd 0x10(%rax), %xmm0
movapd %xmm0, 0x20(%rsp)
movl 0x8c70(%rip), %eax      # 0x15b78
leal 0x1(%rax), %edx
movl %edx, 0x8c67(%rip)      # 0x15b78
movl $0x7, (%r13)
movl %eax, 0x4(%r13)
movq %rcx, 0x8(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movapd 0x20(%rsp), %xmm1
movupd %xmm1, 0x20(%r13)
jmp 0xd582
movl $0x84, %r14d
jmp 0xd261
movq 0x20(%rbp), %rdi
movl $0x38, %esi
callq 0x95e6
movq %rax, %r13
movq 0x8(%rsp), %rcx
movl 0x8(%rcx), %edx
movl 0xc(%rcx), %esi
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %rcx
movl 0x8c07(%rip), %edi      # 0x15b78
leal 0x1(%rdi), %r8d
movl %r8d, 0x8bfc(%rip)      # 0x15b78
testq %rax, %rax
setne %r11b
je 0xd58d
movb (%rcx), %r9b
leal -0x30(%r9), %r8d
cmpb $0x9, %r8b
ja 0xd598
leaq -0x1(%rax), %r11
xorl %r8d, %r8d
xorl %r10d, %r10d
leaq (%r8,%r8,4), %r8
movzbl %r9b, %r9d
leaq (%r9,%r8,2), %r8
addq $-0x30, %r8
cmpq %r10, %r11
je 0xd62d
movb 0x1(%rcx,%r10), %r9b
leal -0x30(%r9), %ebx
incq %r10
cmpb $0x9, %bl
jbe 0xcfa4
cmpq %rax, %r10
setb %r11b
jmp 0xd59e
movq 0x38(%rsp), %rax
movl 0x8(%rax), %ebp
movl 0xc(%rax), %r14d
leaq 0x20(%rax), %rdx
movq %rdx, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x2c, 0x20(%rax)
jne 0xd501
addq $0x40, %rax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x20(%rsp), %r15
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x2d, %rax
je 0xd780
cmpq $0x41, %rax
je 0xd753
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x9318
testq %rax, %rax
je 0xd24c
movq 0x8b0c(%rip), %rdx      # 0x15b68
movq 0x8b0d(%rip), %rcx      # 0x15b70
movq %r15, %rdi
movq %rax, %rsi
callq 0xeb70
jmp 0xd01e
movl $0x2a, %r14d
jmp 0xd261
movl $0x2b, %r14d
jmp 0xd261
movl $0x3, %r13d
movq %rbp, %rdi
movq 0x38(%rsp), %rax
movl 0x8(%rax), %ebp
movl 0xc(%rax), %r14d
addq $0x20, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq 0x40(%rsp), %rdx
callq 0xcd76
movq %rax, %rbx
testq %rax, %rax
je 0xd101
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x30, %esi
callq 0x95e6
movl $0x10, (%rax)
movl 0x8aa0(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x8a97(%rip)      # 0x15b78
movl %ecx, 0x4(%rax)
movl %ebp, 0x8(%rax)
movl %r14d, 0xc(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movq %r13, 0x20(%rax)
movq %rbx, 0x28(%rax)
movq %rax, %r13
jmp 0xd104
xorl %r13d, %r13d
testq %rbx, %rbx
movq 0x10(%rsp), %rbp
jne 0xd9c7
jmp 0xd779
movl $0x82, %r14d
jmp 0xd261
movl $0x44, %r14d
jmp 0xd261
movl $0x43, %r14d
jmp 0xd261
movb $0x1, %bl
movq 0x20(%rbp), %rdi
movl $0x28, %esi
callq 0x95e6
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x13, (%r13)
movl 0x8a16(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x8a0d(%rip)      # 0x15b78
movl %edx, 0x4(%r13)
movq %rcx, 0x8(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movb %bl, 0x20(%r13)
addq $0x20, %rax
movq %rax, 0x8(%rsp)
jmp 0xd9c7
movq 0x38(%rsp), %rsi
movl 0x8(%rsi), %eax
movl 0xc(%rsi), %ecx
leaq 0x20(%rsi), %rdx
movq %rdx, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x2c, 0x20(%rsi)
jne 0xd50d
movl %ecx, 0x48(%rsp)
movl %eax, 0x50(%rsp)
leaq 0x40(%rsi), %rax
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
xorl %r12d, %r12d
leaq 0x20(%rsp), %rbp
xorl %ebx, %ebx
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x2d, %rax
je 0xd67e
cmpq $0x41, %rax
je 0xd660
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x9318
movq %rax, %r15
testq %rax, %rax
je 0xd247
movzwl 0x2(%r15), %r14d
andl $0x4, %r14d
cmpq $0x1, %r14
adcq $0x0, %rbx
movq 0x893a(%rip), %rdx      # 0x15b68
movq 0x893b(%rip), %rcx      # 0x15b70
movq %rbp, %rdi
movq %r15, %rsi
callq 0xeb70
shrl $0x2, %r14d
addq %r14, %r12
testq %r15, %r15
jne 0xd1e0
xorl %eax, %eax
xorl %r13d, %r13d
movq 0x10(%rsp), %rbp
jmp 0xd771
movl $0x32, %r14d
movq 0x20(%rbp), %rdi
movl $0x28, %esi
callq 0x95e6
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x11, (%rbx)
movl 0x88f1(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x88e8(%rip)      # 0x15b78
movl %edx, 0x4(%rbx)
movq %rcx, 0x8(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rbx)
movq %r14, 0x20(%rbx)
addq $0x20, %rax
movq %rax, 0x8(%rsp)
jmp 0xd9ed
movq 0x38(%rsp), %rcx
movl 0x8(%rcx), %eax
movl %eax, 0x48(%rsp)
movl 0xc(%rcx), %eax
movl %eax, 0x4c(%rsp)
leaq 0x20(%rcx), %rax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movapd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x20(%rcx), %rax
cmpq $0x41, %rax
setne %cl
cmpq $0x29, %rax
setne %r12b
sete %r14b
andb %cl, %r12b
movq $0x0, 0x50(%rsp)
movq 0x8(%rsp), %r13
movq (%r13), %rax
testb $0x1, %r12b
je 0xd491
testq %rax, %rax
je 0xd329
xorl %r15d, %r15d
jmp 0xd3d1
leaq 0x20(%r13), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%r13), %rax
cmpq $0x23, %rax
je 0xd352
cmpq $0x22, %rax
jne 0xd36c
leaq 0x40(%r13), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %al
xorl %r15d, %r15d
jmp 0xd367
leaq 0x40(%r13), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %r15b
movb $0x1, %al
movb $0x1, %cl
movq %rcx, 0x50(%rsp)
movb $0x1, %r14b
jmp 0xd376
movq %r13, 0x8(%rsp)
xorl %r15d, %r15d
xorl %eax, %eax
testb %al, %al
je 0xd3d1
movq 0x20(%rbp), %rdi
movl $0x40, %esi
callq 0x95e6
movq %rax, %rbp
movq 0x8(%r13), %rax
movups 0x10(%r13), %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0x87d9(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x87d0(%rip)      # 0x15b78
movl $0x7, (%rbp)
movl %ecx, 0x4(%rbp)
movq %rax, 0x8(%rbp)
xorpd %xmm1, %xmm1
movupd %xmm1, 0x10(%rbp)
movapd 0x60(%rsp), %xmm0
movupd %xmm0, 0x20(%rbp)
movupd %xmm1, 0x30(%rbp)
jmp 0xd3d3
xorl %ebp, %ebp
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x7, %edx
callq 0xcd76
movq %rax, %r13
testq %rax, %rax
je 0xd47e
testb %r15b, %r15b
movl $0x0, %r15d
cmovneq %r13, %r15
movq %r13, %r12
movl $0x0, %eax
cmovneq %rax, %r12
movq 0x30(%rsp), %rsi
cmpq %rsi, 0x20(%rsp)
jne 0xd43e
movq 0x8753(%rip), %rcx      # 0x15b70
movq 0x8744(%rip), %rdx      # 0x15b68
shlq $0x2, %rsi
testq %rsi, %rsi
movl $0x4, %eax
cmoveq %rax, %rsi
leaq 0x20(%rsp), %rdi
callq 0xf102
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq %rbp, (%rcx,%rax,8)
movq %r12, 0x8(%rcx,%rax,8)
movq %r15, 0x10(%rcx,%rax,8)
incq 0x20(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x20, (%rax)
jne 0xd47b
addq $0x20, %rax
movq %rax, 0x8(%rsp)
movb $0x1, %r14b
movb $0x1, %r12b
jmp 0xd47e
xorl %r12d, %r12d
movq 0x10(%rsp), %rbp
testq %r13, %r13
jne 0xd309
jmp 0xd64c
cmpq $0x29, %rax
jne 0xd635
leaq 0x20(%r13), %rax
movq %rax, 0x8(%rsp)
cmpq $0x27, 0x20(%r13)
jne 0xd819
addq $0x40, %r13
leaq 0x8(%rsp), %rsi
movq %r13, (%rsi)
movq %rbp, %rdi
movl $0x7, %edx
callq 0xcd76
movq %rax, %r12
testq %rax, %rax
je 0xd64c
movq 0x8(%rsp), %rdx
cmpq $0x2c, (%rdx)
jne 0xd8f9
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0xe274
movq %rax, %rbx
testq %rax, %rax
jne 0xdf6f
jmp 0xd64c
leaq 0x4884(%rip), %rcx      # 0x11d8c
jmp 0xd75a
leaq 0x4878(%rip), %rcx      # 0x11d8c
movq %rbp, %rdi
callq 0x91b7
jmp 0xd76c
xorl %esi, %esi
xorl %ecx, %ecx
testb $0x1, %cl
je 0xd57a
movq 0x20(%rbp), %rdi
callq 0x95e6
testq %rbx, %rbx
je 0xd9c1
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
cmpb $0x5c, %dl
jne 0xd55f
movzbl 0x1(%r14,%rcx), %edx
incq %rcx
cmpl $0x74, %edx
je 0xd563
cmpl $0x6e, %edx
jne 0xd568
movb $0xa, (%rax)
jmp 0xd56a
movb %dl, (%rax)
jmp 0xd56a
movb $0x9, (%rax)
jmp 0xd56a
movb %dl, (%rax)
incq %rcx
incq %rax
cmpq %rbx, %rcx
jb 0xd53e
jmp 0xd9c1
addq $0x10, %rax
movupd (%rax), %xmm0
movupd %xmm0, 0x30(%r13)
jmp 0xd9c1
xorl %r9d, %r9d
xorl %r8d, %r8d
jmp 0xd993
xorl %r10d, %r10d
xorl %r8d, %r8d
testb %r11b, %r11b
je 0xd62d
cmpb $0x2e, %r9b
jne 0xe13c
leaq 0x1(%r10), %r9
cmpq %rax, %r9
setb %bl
jae 0xd82e
movb (%rcx,%r9), %r11b
leal -0x30(%r11), %r9d
cmpb $0x9, %r9b
ja 0xd87b
leaq -0x2(%rax), %rbx
movsd 0x35f1(%rip), %xmm0     # 0x10bd0
xorl %r9d, %r9d
movsd 0x35ee(%rip), %xmm1     # 0x10bd8
leaq (%r9,%r9,4), %r9
movzbl %r11b, %r11d
leaq (%r11,%r9,2), %r9
addq $-0x30, %r9
mulsd %xmm1, %xmm0
cmpq %r10, %rbx
je 0xd91d
movb 0x2(%rcx,%r10), %r11b
leal -0x30(%r11), %ebp
incq %r10
cmpb $0x9, %bpl
jbe 0xd5ea
leaq 0x1(%r10), %rbx
cmpq %rax, %rbx
setb %bl
movq 0x10(%rsp), %rbp
jmp 0xd886
xorl %r9d, %r9d
jmp 0xd993
leaq 0x46dd(%rip), %rcx      # 0x11d19
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
movq %r13, %rdx
callq 0x91b7
xorl %eax, %eax
xorl %r13d, %r13d
xorl %ebx, %ebx
testb %al, %al
jne 0xd9c7
jmp 0xd9ed
leaq 0x4732(%rip), %rcx      # 0x11d99
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x91b7
jmp 0xd76c
addq $0x20, %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rbp
movq 0x20(%rbp), %rdi
movl $0x50, %esi
callq 0x95e6
movq %rax, %r13
movl $0xf, (%rax)
movl 0x84cf(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x84c6(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movl 0x50(%rsp), %eax
movl %eax, 0x8(%r13)
movl 0x48(%rsp), %eax
movl %eax, 0xc(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movq %r12, 0x20(%r13)
movq %rbx, 0x30(%r13)
movq 0x20(%rbp), %rdi
shlq $0x3, %r12
movq %r12, %rsi
callq 0x95e6
movq %rax, 0x28(%r13)
movq 0x20(%rbp), %rdi
shlq $0x3, %rbx
movq %rbx, %rsi
callq 0x95e6
movq %rax, 0x38(%r13)
movb $0x1, %al
cmpq $0x0, 0x20(%rsp)
je 0xd771
leaq 0x28(%r13), %rcx
movq %r13, %rdx
addq $0x38, %rdx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %edi, %edi
movq 0x28(%rsp), %r9
movq (%r9,%rdi,8), %r9
testb $0x4, 0x2(%r9)
jne 0xd737
movq %r8, %r10
incq %r8
movq %rdx, %r11
jmp 0xd740
movq %rsi, %r10
incq %rsi
movq %rcx, %r11
movq (%r11), %r11
movq %r9, (%r11,%r10,8)
incq %rdi
cmpq 0x20(%rsp), %rdi
jb 0xd71c
jmp 0xd771
leaq 0x463f(%rip), %rcx      # 0x11d99
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x91b7
xorl %eax, %eax
xorl %r13d, %r13d
testb %al, %al
jne 0xd9c7
xorl %ebx, %ebx
jmp 0xd9ed
addq $0x20, %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rbx
movq 0x20(%rbx), %rdi
movl $0x38, %esi
callq 0x95e6
movq %rax, %r13
movl $0xe, (%rax)
movl 0x83cd(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x83c4(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movl %ebp, 0x8(%r13)
movl %r14d, 0xc(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movq 0x20(%rsp), %rsi
movq %rsi, 0x20(%r13)
movq 0x20(%rbx), %rdi
shlq $0x3, %rsi
callq 0x95e6
movq %rax, 0x28(%r13)
movb $0x1, %al
cmpq $0x0, 0x20(%rsp)
je 0xd251
xorl %ecx, %ecx
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x28(%r13), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq 0x20(%rsp), %rcx
jb 0xd7f9
jmp 0xd771
testb $0x1, %r14b
je 0xd83e
leaq 0x4580(%rip), %rcx      # 0x11da6
movq %rax, %r13
jmp 0xd63c
xorl %r9d, %r9d
movsd 0x3397(%rip), %xmm0     # 0x10bd0
jmp 0xd93f
cmpq $0x1, 0x20(%rsp)
jne 0xe15b
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe17a
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0xe199
cmpq $0x0, 0x10(%rax)
jne 0xe1b8
xorl %eax, %eax
xorl %r13d, %r13d
jmp 0xd653
movsd 0x334d(%rip), %xmm0     # 0x10bd0
xorl %r9d, %r9d
testb %bl, %bl
je 0xd93f
movzbl %r11b, %r11d
orl $0x20, %r11d
cmpl $0x65, %r11d
jne 0xe1f6
addq $0x2, %r10
cmpq %rax, %r10
jae 0xe1d7
movb (%rcx,%r10), %bl
xorl %r11d, %r11d
movzbl (%rcx,%r10), %r14d
leal -0x30(%r14), %ebp
cmpb $0x9, %bpl
ja 0xd8d7
leaq (%r11,%r11,4), %r11
leaq (%r14,%r11,2), %r11
addq $-0x30, %r11
incq %r10
cmpq %r10, %rax
jne 0xd8b4
cmpb $0x2d, %bl
jne 0xd924
testq %r11, %r11
movq 0x10(%rsp), %rbp
je 0xd93f
movsd 0x32ea(%rip), %xmm1     # 0x10bd8
mulsd %xmm1, %xmm0
decq %r11
jne 0xd8ee
jmp 0xd93f
testb $0x1, 0x50(%rsp)
je 0xdf6d
leaq 0x455e(%rip), %rcx      # 0x11e69
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x91b7
jmp 0xd64c
movq 0x10(%rsp), %rbp
jmp 0xd93f
testq %r11, %r11
movq 0x10(%rsp), %rbp
je 0xd93f
movsd 0x32aa(%rip), %xmm1     # 0x10be0
mulsd %xmm1, %xmm0
decq %r11
jne 0xd936
movq %r8, %xmm1
movq 0x3264(%rip), %xmm2     # 0x10bb0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3268(%rip), %xmm3     # 0x10bc0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
addsd %xmm1, %xmm4
movq %r9, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm4, %xmm2
movq %xmm2, %r8
movw $0x40, %r9w
movw $0xd, (%r13)
movw %r9w, 0x2(%r13)
movl %edi, 0x4(%r13)
movl %edx, 0x8(%r13)
movl %esi, 0xc(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movq %rax, 0x20(%r13)
movq %rcx, 0x28(%r13)
movq %r8, 0x30(%r13)
addq $0x20, 0x8(%rsp)
testq %r13, %r13
je 0xd9d1
movq %r13, %rbx
jmp 0xd9ed
movq 0x8(%rsp), %rdx
leaq 0x42d0(%rip), %rcx      # 0x11cad
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x91b7
movq %r13, %rbx
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
testq %rbx, %rbx
je 0xdf4f
movq 0x40(%rsp), %r15
cmpl $0x7, %r15d
ja 0xe11d
decl %r15d
movq %r15, %rax
cmpl $0x6, %eax
ja 0xdba8
leaq 0x2c6b(%rip), %rcx      # 0x10690
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rax
cmpq $0x35, (%rax)
jne 0xda4c
movl $0xb, %r14d
movb $0x1, %al
movl $0x6, %r12d
jmp 0xdcc4
movq 0x18(%rsp), %rax
cmpq $0x37, (%rax)
jne 0xda6a
movl $0xc, %r14d
movb $0x1, %al
movl $0x5, %r12d
jmp 0xdcc4
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq $0x3c, %rcx
je 0xdbaf
cmpq $0x3a, %rcx
jne 0xda95
movl $0x1, %r14d
movl $0x4, %r12d
jmp 0xdcc4
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $-0x2e, %rcx
cmpq $0x3, %rcx
ja 0xdaca
movb $0x1, %al
movl $0x3, %r12d
leaq 0x2bf6(%rip), %rdx      # 0x106ac
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x2, %r14d
jmp 0xdcc4
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq $0x33, %rcx
je 0xdbce
cmpq $0x34, %rcx
jne 0xdaef
movl $0x7, %r14d
jmp 0xdbd4
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq $0x32, %rcx
je 0xdbbd
cmpq $0x38, %rcx
jne 0xdb14
movl $0x9, %r14d
jmp 0xdbc3
movq 0x18(%rsp), %rax
movq (%rax), %rcx
cmpq $0x25, %rcx
je 0xdc81
cmpq $0x2a, %rcx
je 0xdbdf
cmpq $0x28, %rcx
jne 0xdba8
leaq 0x20(%rax), %rcx
movq %rcx, 0x18(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x20(%rax), %rax
cmpq $0x29, %rax
je 0xddf5
cmpq $0x41, %rax
je 0xddf5
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movl $0x7, %edx
callq 0xcd76
movq %rax, %rbp
testq %rax, %rax
je 0xddde
movq 0x7fd9(%rip), %rdx      # 0x15b68
movq 0x7fda(%rip), %rcx      # 0x15b70
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xf0c1
jmp 0xdde7
xorl %eax, %eax
jmp 0xdcc4
movl $0x4, %r12d
xorl %r14d, %r14d
jmp 0xdcc4
movl $0x8, %r14d
movl $0x1, %r12d
jmp 0xdcc4
movl $0x6, %r14d
movl $0x2, %r12d
jmp 0xdcc4
addq $0x20, %rax
movq %rax, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movl $0x7, %edx
callq 0xcd76
movq %rax, %rbp
movl $0x1, %r13d
movl $0xa, %r14d
testq %rax, %rax
je 0xddc1
movq 0x18(%rsp), %rdx
cmpq $0x2b, (%rdx)
jne 0xddab
addq $0x20, %rdx
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x38, %esi
callq 0x95e6
movq 0x8(%rbx), %rcx
movl $0xc, (%rax)
movl 0x7f2b(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x7f22(%rip)      # 0x15b78
movl %edx, 0x4(%rax)
movq %rcx, 0x8(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movq $0xa, 0x20(%rax)
movq %rbx, 0x28(%rax)
movq %rbp, 0x30(%rax)
movl $0x2, %r13d
jmp 0xdd3b
leaq 0x20(%rax), %rdx
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x20(%rax)
je 0xdd4d
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
leaq 0x408f(%rip), %rcx      # 0x11d33
callq 0x91b7
jmp 0xdf29
movl $0x4, %r14d
jmp 0xdcc4
movl $0x5, %r14d
jmp 0xdcc4
movl $0x3, %r14d
movl $0x1, %r13d
testb %al, %al
je 0xdd43
addq $0x20, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movl %r12d, %edx
callq 0xcd76
movq %rax, %rbp
testq %rax, %rax
je 0xddc1
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x38, %esi
callq 0x95e6
movq 0x8(%rbx), %rcx
movl $0xc, (%rax)
movl 0x7e65(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x7e5c(%rip)      # 0x15b78
movl %edx, 0x4(%rax)
movq %rcx, 0x8(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movq %r14, 0x20(%rax)
movq %rbx, 0x28(%rax)
movq %rbp, 0x30(%rax)
xorl %r13d, %r13d
movq %rax, %rbx
jmp 0xddca
movq %rbx, 0x40(%rsp)
jmp 0xddcf
movq 0x20(%rbp), %rdi
movl $0x38, %esi
callq 0x95e6
movq 0x8(%rbx), %rcx
movl $0xb, (%rax)
movl 0x7e0d(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x7e04(%rip)      # 0x15b78
movl %edx, 0x4(%rax)
movq %rcx, 0x8(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movq %rbx, 0x20(%rax)
movq 0x18(%rsp), %rcx
movupd 0x10(%rcx), %xmm0
movupd %xmm0, 0x28(%rax)
addq $0x20, %rcx
movq %rcx, 0x18(%rsp)
movl $0x2, %r13d
movq %rax, %rbx
jmp 0xddcf
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
leaq 0x3f6a(%rip), %rcx      # 0x11d26
callq 0x91b7
movq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %rbp
testb $0x1, %r13b
je 0xda12
jmp 0xdf48
movq $0x0, 0x40(%rsp)
testq %rbp, %rbp
je 0xdf3d
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x20, %rax
jne 0xde61
addq $0x20, %rdx
movq %rdx, 0x18(%rsp)
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movl $0x7, %edx
callq 0xcd76
movq %rax, %rbp
testq %rax, %rax
je 0xde43
movq 0x7d3b(%rip), %rdx      # 0x15b68
movq 0x7d3c(%rip), %rcx      # 0x15b70
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xf0c1
jmp 0xde4c
movq $0x0, 0x40(%rsp)
testq %rbp, %rbp
movq 0x10(%rsp), %rbp
jne 0xddf5
movl $0x1, %r13d
jmp 0xddcf
cmpq $0x29, %rax
je 0xde7d
cmpq $0x41, %rax
jne 0xdf15
leaq 0x3ea1(%rip), %rcx      # 0x11d19
jmp 0xdf1c
addq $0x20, %rdx
movq %rdx, 0x18(%rsp)
movq 0x20(%rbp), %rdi
movl $0x38, %esi
callq 0x95e6
movq %rbp, %rdi
movq %rax, %rbp
movq 0x8(%rbx), %rax
movl $0xa, (%rbp)
movl 0x7ccd(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x7cc4(%rip)      # 0x15b78
movl %ecx, 0x4(%rbp)
movq %rax, 0x8(%rbp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rbp)
movq %rbx, 0x20(%rbp)
movq 0x20(%rsp), %rsi
movq %rsi, 0x28(%rbp)
movq 0x20(%rdi), %rdi
shlq $0x3, %rsi
callq 0x95e6
movq %rax, 0x30(%rbp)
movl $0x2, %r13d
cmpq $0x0, 0x20(%rsp)
je 0xdf0d
xorl %eax, %eax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x30(%rbp), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
cmpq 0x20(%rsp), %rax
jb 0xdef2
movq %rbp, %rbx
jmp 0xddca
leaq 0x3df0(%rip), %rcx      # 0x11d0c
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x91b7
movl $0x1, %r13d
movq $0x0, 0x40(%rsp)
jmp 0xddcf
movl $0x1, %r13d
jmp 0xddca
movq 0x40(%rsp), %rax
jmp 0xdf51
xorl %eax, %eax
movq 0x18(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq %rdx, (%rcx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
movq 0x20(%rbp), %rdi
movl $0x40, %esi
callq 0x95e6
movq %rax, %r13
movl $0x8, (%rax)
movl 0x7bec(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x7be3(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movl 0x48(%rsp), %eax
movl %eax, 0x8(%r13)
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r13)
movq 0x20(%rsp), %rsi
movq %rsi, 0x20(%r13)
movq 0x20(%rbp), %rdi
shlq $0x3, %rsi
callq 0x95e6
movq %rax, 0x28(%r13)
movq $0x1, 0x30(%r13)
movq 0x20(%rbp), %rdi
movl $0x8, %esi
callq 0x95e6
movq %rax, 0x38(%r13)
movq %r12, (%rax)
testq %rbx, %rbx
je 0xe0d8
movq 0x20(%rbp), %rdi
movl $0x50, %esi
callq 0x95e6
movq %rax, %r12
movl $0x9, (%rax)
movl 0x7b68(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x7b5f(%rip)      # 0x15b78
movl %eax, 0x4(%r12)
movl 0x48(%rsp), %eax
movl %eax, 0x8(%r12)
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%r12)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r12)
movq %r13, 0x20(%r12)
movq %rbx, 0x48(%r12)
movq 0x20(%rsp), %rsi
movq %rsi, 0x28(%r12)
movq 0x20(%rbp), %rdi
shlq $0x3, %rsi
callq 0x95e6
movq %rax, 0x30(%r12)
movq 0x20(%rsp), %rsi
movq %rsi, 0x38(%r12)
movq 0x20(%rbp), %rdi
shlq $0x3, %rsi
callq 0x95e6
movq %rax, 0x40(%r12)
movb $0x1, %al
cmpq $0x0, 0x20(%rsp)
je 0xe113
xorl %ebx, %ebx
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x28(%rsp), %rsi
movq 0x8(%rsi,%rcx), %rsi
movq 0x28(%r13), %rdi
movq %rsi, (%rdi,%rdx,8)
movq 0x28(%rsp), %rsi
movq (%rsi,%rcx), %rsi
movq 0x30(%r12), %rdi
movq %rsi, (%rdi,%rdx,8)
movq 0x28(%rsp), %rsi
movq 0x10(%rsi,%rcx), %rsi
movq 0x40(%r12), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
addq $0x18, %rcx
cmpq 0x20(%rsp), %rdx
jb 0xe091
jmp 0xe115
movb $0x1, %al
cmpq $0x0, 0x20(%rsp)
je 0xd651
movl $0x1, %ecx
xorl %ebx, %ebx
xorl %edx, %edx
movq 0x28(%rsp), %rsi
movq (%rsi,%rcx,8), %rsi
movq 0x28(%r13), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
addq $0x3, %rcx
cmpq 0x20(%rsp), %rdx
jb 0xe0ef
jmp 0xd653
xorl %ebx, %ebx
movq %r12, %r13
jmp 0xd653
leaq 0x2bac(%rip), %rdi      # 0x10cd0
leaq 0x3c1c(%rip), %rsi      # 0x11d47
leaq 0x3c23(%rip), %rcx      # 0x11d55
movl $0x1b9, %edx            # imm = 0x1B9
callq 0x3080
leaq 0x3f19(%rip), %rdi      # 0x1205c
leaq 0x3bfd(%rip), %rsi      # 0x11d47
leaq 0x3f1d(%rip), %rcx      # 0x1206e
movl $0x84, %edx
callq 0x3080
leaq 0x3c52(%rip), %rdi      # 0x11db4
leaq 0x3bde(%rip), %rsi      # 0x11d47
leaq 0x3c5a(%rip), %rcx      # 0x11dca
movl $0x2c2, %edx            # imm = 0x2C2
callq 0x3080
leaq 0x3c85(%rip), %rdi      # 0x11e06
leaq 0x3bbf(%rip), %rsi      # 0x11d47
leaq 0x3c3b(%rip), %rcx      # 0x11dca
movl $0x2c3, %edx            # imm = 0x2C3
callq 0x3080
leaq 0x3c84(%rip), %rdi      # 0x11e24
leaq 0x3ba0(%rip), %rsi      # 0x11d47
leaq 0x3c1c(%rip), %rcx      # 0x11dca
movl $0x2c4, %edx            # imm = 0x2C4
callq 0x3080
leaq 0x3c83(%rip), %rdi      # 0x11e42
leaq 0x3b81(%rip), %rsi      # 0x11d47
leaq 0x3bfd(%rip), %rcx      # 0x11dca
movl $0x2c5, %edx            # imm = 0x2C5
callq 0x3080
leaq 0x3ed9(%rip), %rdi      # 0x120b7
leaq 0x3b62(%rip), %rsi      # 0x11d47
leaq 0x3e82(%rip), %rcx      # 0x1206e
movl $0x96, %edx
callq 0x3080
leaq 0x3e93(%rip), %rdi      # 0x12090
leaq 0x3b43(%rip), %rsi      # 0x11d47
leaq 0x3e63(%rip), %rcx      # 0x1206e
movl $0x94, %edx
callq 0x3080
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe243
jmp 0xe25f
jmp 0xe243
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rsp)
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
jmp 0xe25f
movq 0x18(%rsp), %rcx
movq 0x58(%rsp), %rdx
movq %rcx, (%rdx)
movq %rax, %rdi
callq 0x3100