// File: /workspace/github_c_makefile_star2_O0/yutopp[P]cc/asm_x86_64.c
// Function: built_from_ir_inst
void built_from_ir_inst(ASM_X86_64 *a, IRInst* inst) {
    switch(inst->kind) {
    case IR_INST_KIND_LET:
    {
        IRSymbolID var_id = inst->value.let.id;
        IRInstValue* let_rhs = &inst->value.let.rhs;
        switch(let_rhs->kind) {
        case IR_INST_VALUE_KIND_REF:
        {
            ASM_X86_64_Value* ref_val =
                asm_x86_64_get_val(a, let_rhs->value.ref.sym, let_rhs->value.ref.is_global);

            asm_x86_64_set_val(a, var_id, *ref_val, 0);

            break;
        }

        case IR_INST_VALUE_KIND_ADDR_OF:
        {
            ASM_X86_64_Value* ref_val = asm_x86_64_get_val(a, let_rhs->value.addr_of.sym, 0);

            ASM_X86_64_Value dest = {
                .kind = ASM_X86_64_VALUE_KIND_REG,
                .value = {
                    .reg = ASM_X86_64_REG_RAX,
                },
            };

            // leaq RAX, 'ref_val'
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_LEAQ;
            inst->value.op.args[0] = dest;
            inst->value.op.args[1] = *ref_val;

            asm_x86_64_set_val(a, var_id, dest, 0);

            break;
        }

        case IR_INST_VALUE_KIND_IMM_INT:
        {
            ASM_X86_64_Value value = {
                .kind = ASM_X86_64_VALUE_KIND_IMM_INT,
                .value = {
                    .imm_int = let_rhs->value.imm_int, // TODO: fix size
                },
            };
            asm_x86_64_set_val(a, var_id, value, 0);

            break;
        }

        case IR_INST_VALUE_KIND_OP_BIN:
        {
            // TODO: !!! implement correctly !!!

            ASM_X86_64_Value* lhs_val = asm_x86_64_get_val(a, let_rhs->value.op_bin.lhs, 0);
            ASM_X86_64_Value* rhs_val = asm_x86_64_get_val(a, let_rhs->value.op_bin.rhs, 0);

            // Move value into RAX (TODO: fix size of data)
            {
                // movq rax, 'lhs_val'
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_MOVQ;
                inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
                inst->value.op.args[0].value.reg = ASM_X86_64_REG_RAX;
                inst->value.op.args[1] = *lhs_val;
            }

            // Add value to RAX (TODO: fix size of data)
            {
                // addq rax, 'rhs_val'
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_ADDQ;
                inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
                inst->value.op.args[0].value.reg = ASM_X86_64_REG_RAX;
                inst->value.op.args[1] = *rhs_val;
            }

            // Result is saved in RAX (TODO: fix size of data)
            size_t var_target_offset = asm_x86_64_get_local(a, var_id);
            ASM_X86_64_Value dest = {
                .kind = ASM_X86_64_VALUE_KIND_DISP_REG,
                .value = {
                    .disp_reg = {
                        .symbol = NULL,
                        .disp = (int)var_target_offset, // TODO: fix
                        .reg = ASM_X86_64_REG_RSP,
                    },
                },
            };
            {
                // movq 'var_target(RSP)', RAX
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_ADDQ;
                inst->value.op.args[0] = dest;
                inst->value.op.args[1].kind = ASM_X86_64_VALUE_KIND_REG;
                inst->value.op.args[1].value.reg = ASM_X86_64_REG_RAX;
            }

            asm_x86_64_set_val(a, var_id, dest, 0);

            break;
        }

        case IR_INST_VALUE_KIND_CALL:
        {
            IRSymbolID lhs_id = let_rhs->value.call.lhs;
            ASM_X86_64_Value* lhs_val = asm_x86_64_get_val(a, lhs_id, 0);

            fprintf(DEBUGOUT, "CALL LHS %ld = ", lhs_id);
            fprint_value(DEBUGOUT, lhs_val);
            fprintf(DEBUGOUT, "\n");

            // TODO: support register passing
            for(size_t i=0; i<vector_len(let_rhs->value.call.args); ++i) {
                assert(i<sizeof(arg_regs)/sizeof(ASM_X86_64_Reg));

                IRSymbolID* arg = vector_at(let_rhs->value.call.args, i);
                ASM_X86_64_Value* arg_val = asm_x86_64_get_val(a, *arg, 0);

                // movq ARG_REG, 'arg_val'
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_MOVQ;
                inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
                inst->value.op.args[0].value.reg = arg_regs[i];
                inst->value.op.args[1] = *arg_val;
            }

            {
                // call 'lhs_val'
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_CALL;
                inst->value.op.args[0] = *lhs_val;
            }

            // Result is saved in RAX (TODO: fix size of data)
            size_t var_target_offset = asm_x86_64_get_local(a, var_id);
            ASM_X86_64_Value dest = {
                .kind = ASM_X86_64_VALUE_KIND_DISP_REG,
                .value = {
                    .disp_reg = {
                        .symbol = NULL,
                        .disp = (int)var_target_offset, // TODO: fix
                        .reg = ASM_X86_64_REG_RSP,
                    },
                },
            };
            {
                // movq 'var_target(RSP)', RAX
                ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
                inst->kind = ASM_X86_64_INST_KIND_OP;
                inst->value.op.op = ASM_X86_64_OP_MOVQ;
                inst->value.op.args[0] = dest;
                inst->value.op.args[1].kind = ASM_X86_64_VALUE_KIND_REG;
                inst->value.op.args[1].value.reg = ASM_X86_64_REG_RAX;
            }

            asm_x86_64_set_val(a, var_id, dest, 0);

            break;
        }

        default:
            fprintf(stderr, "Unexpected kind: %d\n", let_rhs->kind);
            assert(0); // TODO: error handling
        }
        break;
    }

    case IR_INST_KIND_RET:
    {
        IRSymbolID var_id = inst->value.ret.id;
        ASM_X86_64_Value* ret_val = asm_x86_64_get_val(a, var_id, 0);

        // Set a result (TODO: fix size of data)
        {
            // movq rax, 'ret_val'
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_MOVQ;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[0].value.reg = ASM_X86_64_REG_RAX;
            inst->value.op.args[1] = *ret_val;
        }

        {
            // movq rsp, rbp
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_MOVQ;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[0].value.reg = ASM_X86_64_REG_RSP;
            inst->value.op.args[1].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[1].value.reg = ASM_X86_64_REG_RBP;
        }

        {
            // popq rbp
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_POPQ;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[0].value.reg = ASM_X86_64_REG_RBP;
        }

        {
            // ret
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_RET;
        }

        break;
    }

    case IR_INST_KIND_BRANCH:
    {
        ASM_X86_64_Value* cond_val = asm_x86_64_get_val(a, inst->value.branch.cond, 0);

        {
            // movq RAX, 'cond'
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_MOVQ;

            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[0].value.reg = ASM_X86_64_REG_RAX;
            inst->value.op.args[1] = *cond_val;
        }

        {
            // cmpq RAX, 0
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_CMPQ;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_REG;
            inst->value.op.args[0].value.reg = ASM_X86_64_REG_RAX;
            inst->value.op.args[1].kind = ASM_X86_64_VALUE_KIND_IMM_INT;
            inst->value.op.args[1].value.imm_int = 0;
        }

        {
            char const** m = uint_map_find(a->labels, inst->value.branch.else_bb->id);
            assert(m);
            char const* label_id = *m;

            // JE else_bb
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_JE;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_SYMBOL;
            inst->value.op.args[0].value.symbol = label_id;
        }

        {
            char const** m = uint_map_find(a->labels, inst->value.branch.then_bb->id);
            assert(m);
            char const* label_id = *m;

            // JMP then_bb
            ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
            inst->kind = ASM_X86_64_INST_KIND_OP;
            inst->value.op.op = ASM_X86_64_OP_JMP;
            inst->value.op.args[0].kind = ASM_X86_64_VALUE_KIND_SYMBOL;
            inst->value.op.args[0].value.symbol = label_id;
        }

        break;
    }

    case IR_INST_KIND_JUMP:
    {
        char const** m = uint_map_find(a->labels, inst->value.jump.next_bb->id);
        assert(m);
        char const* label_id = *m;

        ASM_X86_64_Value label = {
            .kind = ASM_X86_64_VALUE_KIND_SYMBOL,
            .value = {
                .symbol = label_id,
            },
        };

        // jmp 'label'
        ASM_X86_64_Inst* inst = (ASM_X86_64_Inst*)vector_append(a->insts);
        inst->kind = ASM_X86_64_INST_KIND_OP;
        inst->value.op.op = ASM_X86_64_OP_JMP;
        inst->value.op.args[0] = label;

        break;
    }

    default:
        assert(0); // TODO: error handling
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x1c0(%rbp)
subq $0x3, %rax
ja 0x8f33
movq -0x1c0(%rbp), %rax
leaq 0x3718(%rip), %rcx      # 0xbb20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x1c8(%rbp)
subl $0x4, %eax
ja 0x8a66
movq -0x1c8(%rbp), %rax
leaq 0x36de(%rip), %rcx      # 0xbb30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x8f60
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7fe0
jmp 0x8aa3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0x30(%rbp)
movq 0x3682(%rip), %rax      # 0xbb48
movq %rax, -0x48(%rbp)
movq 0x367f(%rip), %rax      # 0xbb50
movq %rax, -0x40(%rbp)
movq 0x367c(%rip), %rax      # 0xbb58
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl $0x6, (%rax)
movq -0x50(%rbp), %rax
movl $0x6, 0x8(%rax)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7fe0
jmp 0x8aa3
movl $0x1, -0x68(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x68(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7fe0
jmp 0x8aa3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl $0x6, (%rax)
movq -0x80(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x80(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x80(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x80(%rbp), %rax
movq -0x70(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movl $0x6, (%rax)
movq -0x88(%rbp), %rax
movl $0x4, 0x8(%rax)
movq -0x88(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x88(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9040
movq %rax, -0x90(%rbp)
movl $0x4, -0xa8(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x90(%rbp), %rax
movl %eax, -0x98(%rbp)
movl $0x4, -0x94(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl $0x6, (%rax)
movq -0xb0(%rbp), %rax
movl $0x4, 0x8(%rax)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0xb0(%rbp), %rax
movl $0x3, 0x28(%rax)
movq -0xb0(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xa8(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7fe0
jmp 0x8aa3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0xc0(%rbp)
movq 0x681c(%rip), %rax      # 0xefd8
movq (%rax), %rdi
movq -0xb8(%rbp), %rdx
leaq 0x36b1(%rip), %rsi      # 0xbe7e
movb $0x0, %al
callq 0x10e0
movq 0x67fd(%rip), %rax      # 0xefd8
movq (%rax), %rdi
movq -0xc0(%rbp), %rsi
callq 0x7830
movq 0x67e7(%rip), %rax      # 0xefd8
movq (%rax), %rdi
leaq 0x3875(%rip), %rsi      # 0xc070
movb $0x0, %al
callq 0x10e0
movq $0x0, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4580
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
jae 0x8930
cmpq $0x4, -0xc8(%rbp)
jae 0x8847
jmp 0x8866
leaq 0x3640(%rip), %rdi      # 0xbe8e
leaq 0x3390(%rip), %rsi      # 0xbbe5
movl $0x2ba, %edx            # imm = 0x2BA
leaq 0x3657(%rip), %rcx      # 0xbeb8
callq 0x10b0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xc8(%rbp), %rsi
callq 0x4530
movq %rax, -0xd0(%rbp)
movq -0x8(%rbp), %rdi
movq -0xd0(%rbp), %rax
movq (%rax), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0xd8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movl $0x6, (%rax)
movq -0xe0(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0xe0(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0xc8(%rbp), %rcx
leaq 0x67e9(%rip), %rax      # 0xf0d0
movl (%rax,%rcx,4), %ecx
movq -0xe0(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0xe0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
jmp 0x880d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movl $0x6, (%rax)
movq -0xe8(%rbp), %rax
movl $0x7, 0x8(%rax)
movq -0xe8(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9040
movq %rax, -0xf0(%rbp)
movl $0x4, -0x108(%rbp)
movq $0x0, -0x100(%rbp)
movq -0xf0(%rbp), %rax
movl %eax, -0xf8(%rbp)
movl $0x4, -0xf4(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl $0x6, (%rax)
movq -0x110(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x110(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x100(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0xf8(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x110(%rbp), %rax
movl $0x3, 0x28(%rax)
movq -0x110(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x108(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7fe0
jmp 0x8aa3
movq 0x658b(%rip), %rax      # 0xeff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %edx
leaq 0x3206(%rip), %rsi      # 0xbc83
movb $0x0, %al
callq 0x10e0
leaq 0x2edb(%rip), %rdi      # 0xb966
leaq 0x3153(%rip), %rsi      # 0xbbe5
movl $0x2ed, %edx            # imm = 0x2ED
leaq 0x341a(%rip), %rcx      # 0xbeb8
callq 0x10b0
jmp 0x8f52
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x8(%rbp), %rdi
movq -0x118(%rbp), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movl $0x6, (%rax)
movq -0x128(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x128(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x128(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x128(%rbp), %rax
movq -0x120(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movl $0x6, (%rax)
movq -0x130(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x130(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x130(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x130(%rbp), %rax
movl $0x3, 0x28(%rax)
movq -0x130(%rbp), %rax
movl $0x5, 0x30(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl $0x6, (%rax)
movq -0x138(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x138(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x138(%rbp), %rax
movl $0x5, 0x18(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movl $0x6, (%rax)
movq -0x140(%rbp), %rax
movl $0xb, 0x8(%rax)
jmp 0x8f52
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x8f60
movq %rax, -0x148(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movl $0x6, (%rax)
movq -0x150(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x150(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x150(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x150(%rbp), %rax
movq -0x148(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movl $0x6, (%rax)
movq -0x158(%rbp), %rax
movl $0x8, 0x8(%rax)
movq -0x158(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x158(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x158(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x158(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rsi
callq 0x96d0
movq %rax, -0x160(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0x8d3c
jmp 0x8d5b
leaq 0x3359(%rip), %rdi      # 0xc09c
leaq 0x2e9b(%rip), %rsi      # 0xbbe5
movl $0x33c, %edx            # imm = 0x33C
leaq 0x3162(%rip), %rcx      # 0xbeb8
callq 0x10b0
movq -0x160(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl $0x6, (%rax)
movq -0x170(%rbp), %rax
movl $0xa, 0x8(%rax)
movq -0x170(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x168(%rbp), %rcx
movq -0x170(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
callq 0x96d0
movq %rax, -0x178(%rbp)
cmpq $0x0, -0x178(%rbp)
je 0x8de5
jmp 0x8e04
leaq 0x32b0(%rip), %rdi      # 0xc09c
leaq 0x2df2(%rip), %rsi      # 0xbbe5
movl $0x349, %edx            # imm = 0x349
leaq 0x30b9(%rip), %rcx      # 0xbeb8
callq 0x10b0
movq -0x178(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x180(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movl $0x6, (%rax)
movq -0x188(%rbp), %rax
movl $0x9, 0x8(%rax)
movq -0x188(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x180(%rbp), %rcx
movq -0x188(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x8f52
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0x96d0
movq %rax, -0x190(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0x8e93
jmp 0x8eb2
leaq 0x3202(%rip), %rdi      # 0xc09c
leaq 0x2d44(%rip), %rsi      # 0xbbe5
movl $0x35a, %edx            # imm = 0x35A
leaq 0x300b(%rip), %rcx      # 0xbeb8
callq 0x10b0
movq -0x190(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x198(%rbp)
movl $0x0, -0x1b0(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4480
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movl $0x6, (%rax)
movq -0x1b8(%rbp), %rax
movl $0x9, 0x8(%rax)
movq -0x1b8(%rbp), %rax
movq -0x1b0(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x1a8(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x1a0(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x8f52
leaq 0x2a2c(%rip), %rdi      # 0xb966
leaq 0x2ca4(%rip), %rsi      # 0xbbe5
movl $0x36e, %edx            # imm = 0x36E
leaq 0x2f6b(%rip), %rcx      # 0xbeb8
callq 0x10b0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax,%rax)