// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
movq %rdx, 0x60(%rsp)
movq %rdi, %r14
movq %rsi, 0x68(%rsp)
movq (%rsi), %r12
movq %r12, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq (%r12), %rax
cmpq $0x39, %rax
ja 0xcd79
leaq 0x3990(%rip), %rcx      # 0x105a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %r12, 0x40(%rsp)
movq %r14, 0x18(%rsp)
jmpq *%rax
movl $0x81, %ebx
jmp 0xd041
movl $0x34, %ebx
jmp 0xd041
movl $0x2c, %ebx
jmp 0xd041
movl $0x100, %ebx            # imm = 0x100
jmp 0xd041
movl $0x33, %ebx
jmp 0xd041
movl $0x29, %ebx
jmp 0xd041
movq 0x20(%r14), %rdi
movl $0x40, %esi
callq 0x962b
movq %rax, %r13
movq 0x8(%rsp), %rax
movl $0x12, (%r13)
movl 0x8eed(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x8ee4(%rip)      # 0x15b78
movl %ecx, 0x4(%r13)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movups 0x10(%rax), %xmm0
movups %xmm0, 0x20(%r13)
movq 0x20(%r13), %rbx
testq %rbx, %rbx
je 0xd65c
movq 0x28(%r13), %r14
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
cmpb $0x5c, (%r14,%rcx)
sete %dil
orb %dil, %dl
incq %rsi
addq %rdi, %rcx
incq %rcx
cmpq %rbx, %rcx
jb 0xccc8
testb $0x1, %dl
je 0xd65c
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x962b
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
cmpb $0x5c, %dl
jne 0xcd1e
movzbl 0x1(%r14,%rcx), %edx
incq %rcx
cmpl $0x74, %edx
je 0xcd22
cmpl $0x6e, %edx
jne 0xcd27
movb $0xa, (%rax)
jmp 0xcd29
movb %dl, (%rax)
jmp 0xcd29
movb $0x9, (%rax)
jmp 0xcd29
movb %dl, (%rax)
incq %rcx
incq %rax
cmpq %rbx, %rcx
jb 0xccfd
jmp 0xd668
xorl %ebx, %ebx
jmp 0xcf41
xorl %r14d, %r14d
jmp 0xd51c
movl $0x31, %ebx
jmp 0xd041
movl $0x1, %r14d
jmp 0xd51c
movl $0x4, %r14d
jmp 0xd51c
movl $0x83, %ebx
jmp 0xd041
xorl %ebx, %ebx
jmp 0xd041
leaq 0x4ea8(%rip), %rcx      # 0x11c28
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x9208
jmp 0xd908
movq 0x20(%r14), %rdi
movl $0x40, %esi
callq 0x962b
movq %rax, %r13
movq 0x8(%rsp), %rax
movups 0x10(%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movl 0x8dc0(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x8db7(%rip)      # 0x15b78
movq 0x8(%rax), %rax
movl $0x7, (%r13)
movl %ecx, 0x4(%r13)
movq %rax, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movapd 0x20(%rsp), %xmm1
movupd %xmm1, 0x20(%r13)
movups %xmm0, 0x30(%r13)
jmp 0xdb34
movl $0x84, %ebx
jmp 0xd041
movq 0x20(%r14), %rdi
movl $0x38, %esi
callq 0x962b
movq %rax, %r13
movq 0x8(%rsp), %rcx
movsd 0x8(%rcx), %xmm0
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %rcx
movl 0x8d52(%rip), %edx      # 0x15b78
leal 0x1(%rdx), %esi
movl %esi, 0x8d49(%rip)      # 0x15b78
testq %rax, %rax
je 0xd6e5
xorl %r8d, %r8d
xorl %esi, %esi
movzbl (%rcx,%r8), %edi
leal -0x30(%rdi), %r9d
cmpb $0x9, %r9b
ja 0xd84f
leaq (%rsi,%rsi,4), %rsi
leaq (%rdi,%rsi,2), %rsi
addq $-0x30, %rsi
incq %r8
cmpq %r8, %rax
jne 0xce3d
xorl %edi, %edi
jmp 0xdb0b
movsd 0x8(%r12), %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x20(%r12), %rdx
movq %rdx, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x2c, 0x20(%r12)
jne 0xd6a8
leaq 0x40(%r12), %rax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x20(%rsp), %r14
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x2d, %rax
je 0xd937
cmpq $0x41, %rax
je 0xd8dd
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x9369
testq %rax, %rax
je 0xd908
movq 0x8c7a(%rip), %rdx      # 0x15b68
movq 0x8c7b(%rip), %rcx      # 0x15b70
movq %r14, %rdi
movq %rax, %rsi
callq 0xe765
jmp 0xceb0
movl $0x2a, %ebx
jmp 0xd041
movl $0x2b, %ebx
jmp 0xd041
movl $0x3, %r14d
jmp 0xd51c
movl $0x82, %ebx
jmp 0xd041
movl $0x44, %ebx
jmp 0xd041
movl $0x43, %ebx
jmp 0xd041
movb $0x1, %bl
movq 0x20(%r14), %rdi
movl $0x28, %esi
callq 0x962b
movq %rax, %r13
movq 0x8(%rsp), %rax
movl $0x13, (%r13)
movl 0x8c13(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x8c0a(%rip)      # 0x15b78
movl %ecx, 0x4(%r13)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movb %bl, 0x20(%r13)
jmp 0xd086
movsd 0x8(%r12), %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x20(%r12), %rdx
movq %rdx, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x2c, 0x20(%r12)
jne 0xd6b4
leaq 0x40(%r12), %rax
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
xorl %ebp, %ebp
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x2d, %rax
je 0xd9c9
cmpq $0x41, %rax
je 0xd8f6
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x9369
testq %rax, %rax
je 0xd908
movzwl 0x2(%rax), %ecx
andl $0x4, %ecx
movl %ecx, %edx
shrl $0x2, %edx
addq %rdx, %rbp
cmpq $0x1, %rcx
adcq $0x0, %rbx
movq 0x8b40(%rip), %rdx      # 0x15b68
movq 0x8b41(%rip), %rcx      # 0x15b70
movq %r15, %rdi
movq %rax, %rsi
callq 0xe765
jmp 0xcfd5
movl $0x32, %ebx
movq 0x20(%r14), %rdi
movl $0x28, %esi
callq 0x962b
movq %rax, %r13
movq 0x8(%rsp), %rax
movl $0x11, (%r13)
movl 0x8b13(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x8b0a(%rip)      # 0x15b78
movl %ecx, 0x4(%r13)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %rbx, 0x20(%r13)
addq $0x20, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
cmpl $0x7, %eax
ja 0xdde9
decl %eax
leaq 0x35e0(%rip), %rbx      # 0x10690
leaq 0x10(%rsp), %rbp
movq %r13, 0x60(%rsp)
cmpl $0x6, %eax
ja 0xd50c
movq %rax, %r15
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd1d2
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd148
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd192
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd168
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd1b2
movq 0x10(%rsp), %rax
movq (%rax), %rcx
jmp 0xd132
movq 0x10(%rsp), %rax
movq (%rax), %rcx
cmpq $0x35, %rcx
jne 0xd132
movl $0xb, %r12d
movl $0x6, %edx
jmp 0xd46b
cmpq $0x37, %rcx
jne 0xd148
movl $0xc, %r12d
movl $0x5, %edx
jmp 0xd46b
movl $0x4, %edx
cmpq $0x3c, %rcx
je 0xd29f
cmpq $0x3a, %rcx
jne 0xd168
movl $0x1, %r12d
jmp 0xd46b
leaq -0x2e(%rcx), %rsi
cmpq $0x3, %rsi
ja 0xd192
movl $0x3, %edx
leaq 0x352e(%rip), %rdi      # 0x106ac
movslq (%rdi,%rsi,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
movl $0x2, %r12d
jmp 0xd46b
movl $0x2, %edx
cmpq $0x33, %rcx
je 0xd3af
cmpq $0x34, %rcx
jne 0xd1b2
movl $0x7, %r12d
jmp 0xd46b
movl $0x1, %edx
cmpq $0x32, %rcx
je 0xd3a4
cmpq $0x38, %rcx
jne 0xd1d2
movl $0x9, %r12d
jmp 0xd46b
cmpq $0x25, %rcx
je 0xd336
cmpq $0x2a, %rcx
je 0xd2a7
cmpq $0x28, %rcx
jne 0xd915
leaq 0x20(%rax), %rcx
movq %rcx, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x20(%rax), %rax
cmpq $0x29, %rax
je 0xd24e
cmpq $0x41, %rax
je 0xd24e
movq %r14, %rdi
movq %rbp, %rsi
movl $0x7, %edx
callq 0xcbd8
testq %rax, %rax
je 0xd912
movq 0x892e(%rip), %rdx      # 0x15b68
movq 0x892f(%rip), %rcx      # 0x15b70
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xec8b
movq 0x10(%rsp), %rdx
movq (%rdx), %rax
cmpq $0x20, %rax
jne 0xd3ba
addq $0x20, %rdx
movq %rdx, 0x10(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movl $0x7, %edx
callq 0xcbd8
testq %rax, %rax
je 0xd912
movq 0x88df(%rip), %rdx      # 0x15b68
movq 0x88e0(%rip), %rcx      # 0x15b70
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xec8b
jmp 0xd24e
xorl %r12d, %r12d
jmp 0xd46b
addq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movl $0x7, %edx
callq 0xcbd8
movq %rax, %r14
testq %rax, %rax
je 0xd912
movq 0x10(%rsp), %rdx
cmpq $0x2b, (%rdx)
jne 0xd68f
addq $0x20, %rdx
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x38, %esi
callq 0x962b
movl $0xc, (%rax)
movl 0x8875(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x886c(%rip)      # 0x15b78
movl %ecx, 0x4(%rax)
movq 0x8(%r13), %rcx
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0xa, 0x20(%rax)
movq %r13, 0x28(%rax)
movq %r14, 0x30(%rax)
movq %rax, %r13
jmp 0xd4d9
leaq 0x20(%rax), %rdx
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x20(%rax)
jne 0xd678
movq 0x20(%r14), %rdi
movl $0x38, %esi
callq 0x962b
movl $0xb, (%rax)
movl 0x8814(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x880b(%rip)      # 0x15b78
movl %ecx, 0x4(%rax)
movq 0x8(%r13), %rcx
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r13, 0x20(%rax)
movq 0x10(%rsp), %rcx
movups 0x10(%rcx), %xmm0
movups %xmm0, 0x28(%rax)
addq $0x20, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, %r13
movq %r15, %rax
jmp 0xd0ba
movl $0x8, %r12d
jmp 0xd46b
movl $0x6, %r12d
jmp 0xd46b
cmpq $0x29, %rax
jne 0xd4e6
addq $0x20, %rdx
movq %rdx, 0x10(%rsp)
movq 0x20(%r14), %rdi
movl $0x38, %esi
callq 0x962b
movq %r14, %rdx
movq %rax, %r14
movl $0xa, (%rax)
movl 0x878b(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x8782(%rip)      # 0x15b78
movl %eax, 0x4(%r14)
movq 0x8(%r13), %rax
movq %rax, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r13, 0x20(%r14)
movq 0x20(%rsp), %rsi
movq %rsi, 0x28(%r14)
movq 0x20(%rdx), %rdi
shlq $0x3, %rsi
callq 0x962b
movq %rax, 0x30(%r14)
cmpq $0x0, 0x20(%rsp)
je 0xd44d
xorl %eax, %eax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x30(%r14), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
cmpq 0x20(%rsp), %rax
jb 0xd432
movq %r14, %r13
jmp 0xd4d9
movl $0x4, %r12d
jmp 0xd46b
movl $0x5, %r12d
jmp 0xd46b
movl $0x3, %r12d
addq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xcbd8
movq %rax, %r14
testq %rax, %rax
je 0xd912
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x38, %esi
callq 0x962b
movl $0xc, (%rax)
movl 0x86ce(%rip), %ecx      # 0x15b78
leal 0x1(%rcx), %edx
movl %edx, 0x86c5(%rip)      # 0x15b78
movl %ecx, 0x4(%rax)
movq 0x8(%r13), %rcx
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r12, 0x20(%rax)
movq %r13, 0x28(%rax)
movq %r14, 0x30(%rax)
movq %rax, %r13
movq 0x40(%rsp), %r12
movq %r15, %rax
movq 0x18(%rsp), %r14
jmp 0xd0ba
cmpq $0x41, %rax
jne 0xd4f5
leaq 0x47a1(%rip), %rcx      # 0x11c94
jmp 0xd4fc
leaq 0x478b(%rip), %rcx      # 0x11c87
movq %r14, %rdi
movq %r12, %rsi
callq 0x9208
jmp 0xd912
movq 0x60(%rsp), %r13
jmp 0xd915
movl $0x2, %r14d
movsd 0x8(%r12), %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x20(%r12), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq 0x18(%rsp), %rdi
movq 0x60(%rsp), %rdx
callq 0xcbd8
movq %rax, %rbx
testq %rax, %rax
je 0xd908
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x30, %esi
callq 0x962b
movq %rax, %r13
movl $0x10, (%rax)
movl 0x8606(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x85fd(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movaps 0x50(%rsp), %xmm0
movlps %xmm0, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %r14, 0x20(%r13)
movq %rbx, 0x28(%r13)
jmp 0xd66e
movl 0x8(%r12), %r15d
movl 0xc(%r12), %eax
movl %eax, 0x4c(%rsp)
leaq 0x20(%r12), %rbp
movq %rbp, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x20(%r12), %rcx
xorl %eax, %eax
cmpq $0x29, %rcx
sete %bl
je 0xd5e1
cmpq $0x41, %rcx
jne 0xd6ee
movq $0x0, 0x50(%rsp)
cmpq $0x29, %rcx
jne 0xd6cb
leaq 0x20(%rbp), %rdx
movq %rdx, 0x8(%rsp)
cmpq $0x27, 0x20(%rbp)
jne 0xd8c5
addq $0x40, %rbp
leaq 0x8(%rsp), %rsi
movq %rbp, (%rsi)
movq %r14, %rdi
movl $0x7, %edx
callq 0xcbd8
movq %rax, %r13
testq %rax, %rax
je 0xd908
movq 0x8(%rsp), %rdx
cmpq $0x2c, (%rdx)
jne 0xdc04
leaq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xdf23
movq %rax, %rbp
testq %rax, %rax
jne 0xdc47
jmp 0xd908
addq $0x10, %rax
movups (%rax), %xmm0
movups %xmm0, 0x30(%r13)
addq $0x20, 0x8(%rsp)
movq 0x18(%rsp), %r14
jmp 0xd08f
leaq 0x462f(%rip), %rcx      # 0x11cae
movq %r14, %rdi
movq %r12, %rsi
callq 0x9208
jmp 0xd912
leaq 0x460b(%rip), %rcx      # 0x11ca1
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x9208
jmp 0xd912
leaq 0x4658(%rip), %rcx      # 0x11d07
jmp 0xd8e9
leaq 0x464c(%rip), %rcx      # 0x11d07
movq %r14, %rdi
movq %r12, %rsi
callq 0x9208
jmp 0xd908
leaq 0x45c2(%rip), %rcx      # 0x11c94
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x9208
jmp 0xd908
xorl %edi, %edi
xorl %esi, %esi
jmp 0xdb0b
movq $0x0, 0x50(%rsp)
cmpq $0x0, (%rbp)
je 0xd709
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0xd78e
movq 0x20(%rbp), %rax
cmpq $0x22, %rax
je 0xd729
cmpq $0x23, %rax
jne 0xd845
movb $0x1, %r12b
movb $0x1, %al
movq %rax, 0x50(%rsp)
jmp 0xd72c
xorl %r12d, %r12d
leaq 0x40(%rbp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%r14), %rdi
movl $0x40, %esi
callq 0x962b
movq %rax, %r13
movups 0x10(%rbp), %xmm0
movaps %xmm0, 0x70(%rsp)
movl 0x8423(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x841a(%rip)      # 0x15b78
movq 0x8(%rbp), %rcx
movl $0x7, (%r13)
movl %eax, 0x4(%r13)
movq %rcx, 0x8(%r13)
xorpd %xmm1, %xmm1
movupd %xmm1, 0x10(%r13)
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x20(%r13)
movupd %xmm1, 0x30(%r13)
movb $0x1, %bl
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movl $0x7, %edx
callq 0xcbd8
movq %rax, %r14
testq %rax, %rax
je 0xd908
testb %r12b, %r12b
movl $0x0, %r12d
cmovneq %r14, %r12
movl $0x0, %eax
cmovneq %rax, %r14
movq 0x20(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
jne 0xd7fb
movq 0x839b(%rip), %rcx      # 0x15b70
movq 0x838c(%rip), %rdx      # 0x15b68
shlq $0x2, %rsi
testq %rsi, %rsi
movl $0x4, %eax
cmoveq %rax, %rsi
leaq 0x20(%rsp), %rdi
callq 0xeccc
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
leaq (%rsi,%rsi,2), %rcx
movq %r13, (%rax,%rcx,8)
movq %r14, 0x8(%rax,%rcx,8)
movq %r12, 0x10(%rax,%rcx,8)
movq 0x20(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rsp), %rbp
cmpq $0x20, (%rbp)
jne 0xda95
addq $0x20, %rbp
movq %rbp, 0x8(%rsp)
movb $0x1, %bl
movq 0x18(%rsp), %r14
jmp 0xd6f7
movq %rbp, 0x8(%rsp)
jmp 0xd6fe
cmpl $0x2e, %edi
jne 0xde08
leaq 0x1(%r8), %rdi
cmpq %rax, %rdi
jae 0xdaae
movb 0x1(%rcx,%r8), %r9b
leal -0x30(%r9), %edi
cmpb $0x9, %dil
ja 0xdb8d
addq $0x2, %r8
movsd 0x334c(%rip), %xmm1     # 0x10bd0
xorl %edi, %edi
movsd 0x334a(%rip), %xmm2     # 0x10bd8
leaq (%rdi,%rdi,4), %rdi
movzbl %r9b, %r9d
leaq (%r9,%rdi,2), %rdi
addq $-0x30, %rdi
mulsd %xmm2, %xmm1
cmpq %rax, %r8
jae 0xdab8
movb (%rcx,%r8), %r9b
leal -0x30(%r9), %r10d
incq %r8
cmpb $0x9, %r10b
jbe 0xd88e
addq $-0x2, %r8
jmp 0xdb97
testb $0x1, %bl
je 0xdb3f
leaq 0x444c(%rip), %rcx      # 0x11d21
movq %rdx, %rbp
jmp 0xd6d2
leaq 0x4430(%rip), %rcx      # 0x11d14
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x9208
jmp 0xd908
leaq 0x4417(%rip), %rcx      # 0x11d14
movq %r14, %rdi
movq %r12, %rsi
callq 0x9208
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x10(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rax, (%rcx)
movq %r13, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x20, %rdx
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %r14
movq 0x20(%r14), %rdi
movl $0x38, %esi
callq 0x962b
movq %rax, %r13
movl $0xe, (%rax)
movl 0x8216(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x820d(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movaps 0x50(%rsp), %xmm0
movlps %xmm0, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq 0x20(%rsp), %rsi
movq %rsi, 0x20(%r13)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x962b
movq %rax, 0x28(%r13)
cmpq $0x0, 0x20(%rsp)
je 0xd08f
xorl %eax, %eax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movq 0x28(%r13), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
cmpq 0x20(%rsp), %rax
jb 0xd9a9
jmp 0xd08f
addq $0x20, %rdx
movq %rdx, 0x8(%rsp)
movq 0x20(%r14), %rdi
movl $0x50, %esi
callq 0x962b
movq %rax, %r13
movl $0xf, (%rax)
movl 0x8189(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x8180(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movaps 0x50(%rsp), %xmm0
movlps %xmm0, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %rbp, 0x20(%r13)
movq %rbx, 0x30(%r13)
movq 0x20(%r14), %rdi
shlq $0x3, %rbp
movq %rbp, %rsi
callq 0x962b
movq %rax, 0x28(%r13)
movq 0x20(%r14), %rdi
shlq $0x3, %rbx
movq %rbx, %rsi
callq 0x962b
movq %rax, 0x38(%r13)
cmpq $0x0, 0x20(%rsp)
je 0xd08f
leaq 0x28(%r13), %rax
movq %r13, %rcx
addq $0x38, %rcx
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
movq 0x28(%rsp), %r8
movq (%r8,%rsi,8), %r8
testb $0x4, 0x2(%r8)
jne 0xda76
movq %rdi, %r9
incq %rdi
movq %rcx, %r10
jmp 0xda7f
movq %rdx, %r9
incq %rdx
movq %rax, %r10
movq (%r10), %r10
movq %r8, (%r10,%r9,8)
incq %rsi
cmpq 0x20(%rsp), %rsi
jb 0xda5b
jmp 0xd08f
movq (%rbp), %rcx
testq %rax, %rax
sete %al
movq 0x40(%rsp), %r12
movq 0x18(%rsp), %r14
jmp 0xd5ea
movsd 0x311a(%rip), %xmm1     # 0x10bd0
xorl %edi, %edi
movq %rsi, %xmm2
movq 0x30eb(%rip), %xmm3     # 0x10bb0
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0x30ef(%rip), %xmm4     # 0x10bc0
subpd %xmm4, %xmm2
movapd %xmm2, %xmm5
unpckhpd %xmm2, %xmm5            # xmm5 = xmm5[1],xmm2[1]
addsd %xmm2, %xmm5
movq %rdi, %xmm2
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm4, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm5, %xmm3
movq %xmm3, %rsi
movw $0x40, %di
movw $0xd, (%r13)
movw %di, 0x2(%r13)
movl %edx, 0x4(%r13)
movlps %xmm0, 0x8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %rax, 0x20(%r13)
movq %rcx, 0x28(%r13)
movq %rsi, 0x30(%r13)
addq $0x20, 0x8(%rsp)
jmp 0xd08f
testb %al, %al
je 0xde46
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xde65
movq 0x8(%rax), %r13
testq %r13, %r13
je 0xde84
cmpq $0x0, 0x10(%rax)
je 0xd08f
leaq 0x4248(%rip), %rdi      # 0x11dbd
leaq 0x4146(%rip), %rsi      # 0x11cc2
leaq 0x41c2(%rip), %rcx      # 0x11d45
movl $0x2c5, %edx            # imm = 0x2C5
callq 0x3080
movsd 0x303b(%rip), %xmm1     # 0x10bd0
xorl %edi, %edi
movzbl %r9b, %r9d
orl $0x20, %r9d
cmpl $0x65, %r9d
jne 0xdea3
addq $0x2, %r8
cmpq %rax, %r8
jae 0xde27
movb (%rcx,%r8), %r10b
xorl %r9d, %r9d
movzbl (%rcx,%r8), %r11d
leal -0x30(%r11), %ebx
cmpb $0x9, %bl
ja 0xdbdf
leaq (%r9,%r9,4), %r9
leaq (%r11,%r9,2), %r9
addq $-0x30, %r9
incq %r8
cmpq %r8, %rax
jne 0xdbbd
cmpb $0x2d, %r10b
jne 0xdc26
testq %r9, %r9
je 0xdab8
movsd 0x2fe2(%rip), %xmm2     # 0x10bd8
mulsd %xmm2, %xmm1
decq %r9
jne 0xdbf6
jmp 0xdab8
testb $0x1, 0x50(%rsp)
je 0xdc45
leaq 0x41d2(%rip), %rcx      # 0x11de4
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x9208
jmp 0xd908
testq %r9, %r9
je 0xdab8
movsd 0x2fa9(%rip), %xmm2     # 0x10be0
mulsd %xmm2, %xmm1
decq %r9
jne 0xdc37
jmp 0xdab8
xorl %ebp, %ebp
movq 0x18(%rsp), %r14
movq 0x20(%r14), %rdi
movl $0x40, %esi
callq 0x962b
movq %rax, %rbx
movl $0x8, (%rax)
movl 0x7f0f(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x7f06(%rip)      # 0x15b78
movl %eax, 0x4(%rbx)
movl %r15d, 0x8(%rbx)
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%rsp), %rsi
movq %rsi, 0x20(%rbx)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x962b
movq %rax, 0x28(%rbx)
movq $0x1, 0x30(%rbx)
movq 0x20(%r14), %rdi
movl $0x8, %esi
callq 0x962b
movq %rax, 0x38(%rbx)
movq %r13, (%rax)
testq %rbp, %rbp
je 0xdda1
movl %r15d, %r12d
movq 0x20(%r14), %rdi
movl $0x50, %esi
callq 0x962b
movq %rax, %r13
movl $0x9, (%rax)
movl 0x7e91(%rip), %eax      # 0x15b78
leal 0x1(%rax), %ecx
movl %ecx, 0x7e88(%rip)      # 0x15b78
movl %eax, 0x4(%r13)
movl %r12d, 0x8(%r13)
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq %rbx, 0x20(%r13)
movq %rbp, 0x48(%r13)
movq 0x20(%rsp), %rsi
movq %rsi, 0x28(%r13)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x962b
movq %rax, 0x30(%r13)
movq 0x20(%rsp), %rsi
movq %rsi, 0x38(%r13)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
callq 0x962b
movq %rax, 0x40(%r13)
cmpq $0x0, 0x20(%rsp)
movq 0x40(%rsp), %r12
je 0xd08f
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x28(%rsp), %rdx
movq 0x8(%rdx,%rax), %rdx
movq 0x28(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
movq 0x28(%rsp), %rdx
movq (%rdx,%rax), %rdx
movq 0x30(%r13), %rsi
movq %rdx, (%rsi,%rcx,8)
movq 0x28(%rsp), %rdx
movq 0x10(%rdx,%rax), %rdx
movq 0x40(%r13), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
addq $0x18, %rax
cmpq 0x20(%rsp), %rcx
jb 0xdd59
jmp 0xd08f
cmpq $0x0, 0x20(%rsp)
je 0xdddc
movl $0x1, %eax
xorl %ecx, %ecx
movq 0x40(%rsp), %r12
movq 0x28(%rsp), %rdx
movq (%rdx,%rax,8), %rdx
movq 0x28(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
addq $0x3, %rax
cmpq 0x20(%rsp), %rcx
jb 0xddb5
movq %rbx, %r13
jmp 0xd08f
movq %rbx, %r13
movq 0x40(%rsp), %r12
jmp 0xd08f
leaq 0x2ee0(%rip), %rdi      # 0x10cd0
leaq 0x3ecb(%rip), %rsi      # 0x11cc2
leaq 0x3ed2(%rip), %rcx      # 0x11cd0
movl $0x1b9, %edx            # imm = 0x1B9
callq 0x3080
leaq 0x41c8(%rip), %rdi      # 0x11fd7
leaq 0x3eac(%rip), %rsi      # 0x11cc2
leaq 0x41cc(%rip), %rcx      # 0x11fe9
movl $0x84, %edx
callq 0x3080
leaq 0x4204(%rip), %rdi      # 0x12032
leaq 0x3e8d(%rip), %rsi      # 0x11cc2
leaq 0x41ad(%rip), %rcx      # 0x11fe9
movl $0x96, %edx
callq 0x3080
leaq 0x3ee2(%rip), %rdi      # 0x11d2f
leaq 0x3e6e(%rip), %rsi      # 0x11cc2
leaq 0x3eea(%rip), %rcx      # 0x11d45
movl $0x2c2, %edx            # imm = 0x2C2
callq 0x3080
leaq 0x3f15(%rip), %rdi      # 0x11d81
leaq 0x3e4f(%rip), %rsi      # 0x11cc2
leaq 0x3ecb(%rip), %rcx      # 0x11d45
movl $0x2c3, %edx            # imm = 0x2C3
callq 0x3080
leaq 0x3f14(%rip), %rdi      # 0x11d9f
leaq 0x3e30(%rip), %rsi      # 0x11cc2
leaq 0x3eac(%rip), %rcx      # 0x11d45
movl $0x2c4, %edx            # imm = 0x2C4
callq 0x3080
leaq 0x4161(%rip), %rdi      # 0x1200b
leaq 0x3e11(%rip), %rsi      # 0x11cc2
leaq 0x4131(%rip), %rcx      # 0x11fe9
movl $0x94, %edx
callq 0x3080
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdef8
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdf0e
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rsp)
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdf0e
jmp 0xdf0e
movq 0x10(%rsp), %rcx
movq 0x68(%rsp), %rdx
movq %rcx, (%rdx)
movq %rax, %rdi
callq 0x3100