// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: stmt_to_instrs
static list_t *stmt_to_instrs(stmt_t *stmt, context_t context) {
    if (!stmt) {
        UNREACHABLE("stmt_to_instrs: stmt is invalid\n");
    }
    
    if (stmt->type == STMT_NULL) {
        return list_new();
    }

    if (stmt->type == STMT_RETURN) {
        list_t *ret = list_new();
        debug("Found return statement\n");
        list_t *expr_instrs = expr_to_instrs(stmt->ret->expr, context.env);
        list_concat(ret, expr_instrs);
        list_push(ret, instr_label(OP_JMP, context.return_label));
        return ret;
    }

    if (stmt->type == STMT_BREAK) {
        list_t *ret = list_new();
        list_push(ret, instr_label(OP_JMP, context.iter_break_label));
        return ret;
    }

    if (stmt->type == STMT_CONTINUE) {
        list_t *ret = list_new();
        list_push(ret, instr_label(OP_JMP, context.iter_continue_label));
        return ret;
    }

    if (stmt->type == STMT_IF) {
        debug("Found if statement\n");
        list_t *ret = list_new();
        
        list_concat(ret, expr_to_instrs(stmt->if_stmt->cond, context.env));
        list_push(ret, instr_i2r(OP_CMP, 0, REG_RAX));

        string_t *post_cond_label = unique_label("post_cond");
        output_t *post_cond_label_output = new_label(post_cond_label, LABEL_STATIC);
        list_t *then_instrs = block_or_single_to_instrs(stmt->if_stmt->then, context);

        if (stmt->if_stmt->els) {
            string_t *else_label = unique_label("else");
            list_push(ret, instr_label(OP_JE, else_label));
            list_concat(ret, then_instrs);
            list_push(ret, instr_label(OP_JMP, post_cond_label));
            list_push(ret, new_label(else_label, LABEL_STATIC));
            list_concat(ret, block_or_single_to_instrs(stmt->if_stmt->els, context));
            list_push(ret, post_cond_label_output);
        } else {
            // No else statement, just emit the then instructions
            list_push(ret, instr_label(OP_JE, post_cond_label));
            list_concat(ret, then_instrs);
            list_push(ret, post_cond_label_output);
        }
        return ret;
    }

    if (stmt->type == STMT_BLOCK) {
        debug("Found block statement\n");
        return block_to_instrs(stmt->block, context);
    }

    if (stmt->type == STMT_DECLARE) {
        debug("Found a declare statement for var %s\n", string_get(stmt->declare->name));

        // only check if the variable is declared in this scope.
        var_info_t *var_info = map_get(context.env->homes, stmt->declare->name);
        if (var_info->declared) {
            UNREACHABLE("Compilation error: variable has multiple definitions in the same scope");
        }

        debug("Set declared for var\n");
        var_info->declared = true;
        if (stmt->declare->init_expr) {
            list_t *ret = list_new();
            list_concat(ret, expr_to_instrs(stmt->declare->init_expr, context.env));

            // expr should be in rax, so move it to the variable home.
            output_t *mov = instr_r2m(OP_MOV, REG_RAX, var_info->home);
            list_push(ret, mov);
            return ret;
        }
        return list_new();
    }

    if (stmt->type == STMT_EXPR) {
        list_t *ret = list_new();
        debug("Found an expr statement\n");
        list_t *expr_instrs = expr_to_instrs(stmt->expr, context.env);
        if (!expr_instrs) {
            UNREACHABLE("expr_instrs is invalid")
        }
        list_concat(ret, expr_instrs);
        return ret;
    }

    if (stmt->type == STMT_FOR) {
        string_t *begin_for_label = unique_label("begin_for");
        string_t *post_for_label = unique_label("end_for");
        string_t *post_body_label = unique_label("post_for_body");

        context.env = stmt->for_stmt->env;
        context.iter_continue_label = post_body_label;
        context.iter_break_label = post_for_label;

        list_t *ret = list_new();
        list_concat(ret, stmt_to_instrs(stmt->for_stmt->init, context));

        list_push(ret, new_label(begin_for_label, LABEL_STATIC));
        list_concat(ret, expr_to_instrs(stmt->for_stmt->cond, context.env));
        list_push(ret, instr_i2r(OP_CMP, 0, REG_RAX));
        list_push(ret, instr_label(OP_JE, post_for_label));

        list_concat(ret, block_or_single_to_instrs(stmt->for_stmt->body, context));
        list_push(ret, new_label(post_body_label, LABEL_STATIC));

        list_concat(ret, expr_to_instrs(stmt->for_stmt->post, context.env));
        list_push(ret, instr_label(OP_JMP, begin_for_label));
        list_push(ret, new_label(post_for_label, LABEL_STATIC));
        return ret;
    }

    if (stmt->type == STMT_WHILE) {
        list_t *ret = list_new();
        string_t *begin_while_label = unique_label("begin_while");
        string_t *post_while_label = unique_label("post_while");
        context.iter_continue_label = begin_while_label;
        context.iter_break_label = post_while_label;

        list_push(ret, new_label(begin_while_label, LABEL_STATIC));

        list_concat(ret, expr_to_instrs(stmt->while_stmt->cond, context.env));

        list_push(ret, instr_i2r(OP_CMP, 0, REG_RAX));
        list_push(ret, instr_label(OP_JE, post_while_label));

        list_concat(ret, block_or_single_to_instrs(stmt->while_stmt->body, context));
        list_push(ret, instr_label(OP_JMP, begin_while_label));
        list_push(ret, new_label(post_while_label, LABEL_STATIC));

        return ret;
    }

    if (stmt->type == STMT_DO) {
        list_t *ret = list_new();
        string_t *begin_do_label = unique_label("begin_do");
        string_t *end_do_label = unique_label("end_do");

        context.iter_continue_label = begin_do_label;
        context.iter_break_label = end_do_label;
        list_push(ret, new_label(begin_do_label, LABEL_STATIC));
        list_concat(ret, block_or_single_to_instrs(stmt->do_stmt->body, context));
        list_concat(ret, expr_to_instrs(stmt->do_stmt->cond, context.env));
        list_push(ret, instr_i2r(OP_CMP, 0, REG_RAX));
        list_push(ret, instr_label(OP_JNE, begin_do_label));
        list_push(ret, new_label(end_do_label, LABEL_STATIC));
        return ret;
    }

    UNREACHABLE("Unrecognized statement type\n");
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
leaq 0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x192e
jmp 0x1903
leaq 0x76fa(%rip), %rdi      # 0x9004
leaq 0x772d(%rip), %rsi      # 0x903e
movl $0x288, %edx            # imm = 0x288
leaq 0x7860(%rip), %rcx      # 0x917d
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x1945
callq 0x45f0
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x19c0
callq 0x45f0
movq %rax, -0x18(%rbp)
jmp 0x1959
movq -0xd8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4740
movq -0xd8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0xe0(%rbp)
movq (%rax), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x1a11
callq 0x45f0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movq 0x10(%rax), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
jne 0x1a62
callq 0x45f0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0xf0(%rbp)
movq 0x8(%rax), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x1c98
jmp 0x1a71
jmp 0x1a73
callq 0x45f0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, -0x100(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0x38(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2810
movq -0xf8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
leaq 0x76b6(%rip), %rdi      # 0x919e
callq 0x1830
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2cb0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x1c49
leaq 0x764d(%rip), %rdi      # 0x91a8
callq 0x1830
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x58(%rbp), %rsi
movl $0x15, %edi
callq 0x2b90
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4740
movq -0x38(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x40(%rbp), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0x118(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x38(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x110(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2cb0
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x46a0
jmp 0x1c8b
movq -0x38(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x40(%rbp), %rsi
movl $0x15, %edi
callq 0x2b90
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x4740
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x46a0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x1ce4
jmp 0x1ca3
jmp 0x1ca5
movq -0xd8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2d70
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1def
jmp 0x1cf3
jmp 0x1cf5
movq -0xd8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4ba0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x1d4f
jmp 0x1d24
leaq 0x72d9(%rip), %rdi      # 0x9004
leaq 0x730c(%rip), %rsi      # 0x903e
movl $0x2cb, %edx            # imm = 0x2CB
leaq 0x746f(%rip), %rcx      # 0x91ad
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
jmp 0x1d51
jmp 0x1d53
movq -0x60(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x1de1
callq 0x45f0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x68(%rbp)
movq -0x68(%rbp), %rcx
movq %rcx, -0x130(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0x60(%rbp), %rax
movl 0x8(%rax), %edx
movq 0x10(%rax), %rcx
movl $0x1, %esi
movl %esi, %edi
callq 0x2900
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x46a0
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
callq 0x45f0
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x1e6d
callq 0x45f0
movq %rax, -0x78(%rbp)
jmp 0x1e03
movq -0xd8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x1e53
jmp 0x1e28
leaq 0x71d5(%rip), %rdi      # 0x9004
leaq 0x7208(%rip), %rsi      # 0x903e
movl $0x2e1, %edx            # imm = 0x2E1
leaq 0x73b2(%rip), %rcx      # 0x91f4
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x4740
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x212e
leaq 0x738a(%rip), %rdi      # 0x920b
callq 0x1830
movq %rax, -0x88(%rbp)
leaq 0x7381(%rip), %rdi      # 0x9215
callq 0x1830
movq %rax, -0x90(%rbp)
leaq 0x7376(%rip), %rdi      # 0x921d
callq 0x1830
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x98(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rcx
movq %rcx, 0x10(%rax)
callq 0x45f0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0xa0(%rbp)
movq -0xa0(%rbp), %rcx
movq %rcx, -0x180(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x18e0
movq -0x180(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x88(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, -0x170(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x170(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa0(%rbp), %rax
movq %rax, -0x168(%rbp)
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2810
movq -0x168(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa0(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x90(%rbp), %rsi
movl $0x15, %edi
callq 0x2b90
movq -0x160(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, -0x158(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x18(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2cb0
movq -0x158(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa0(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x98(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x150(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x148(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa0(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x88(%rbp), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0x140(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa0(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x230e
callq 0x45f0
movq %rax, -0xa8(%rbp)
leaq 0x70dd(%rip), %rdi      # 0x922b
callq 0x1830
movq %rax, -0xb0(%rbp)
leaq 0x70d6(%rip), %rdi      # 0x9237
callq 0x1830
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq -0xb0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x1b8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, -0x1b0(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x1b0(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2810
movq -0x1a8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0xb8(%rbp), %rsi
movl $0x15, %edi
callq 0x2b90
movq -0x1a0(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, -0x198(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2cb0
movq -0x198(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xa8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0xb0(%rbp), %rsi
movl $0x14, %edi
callq 0x2b90
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa8(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0xb8(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x188(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xa8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
movq -0x10(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x24bd
callq 0x45f0
movq %rax, -0xc0(%rbp)
leaq 0x6f14(%rip), %rdi      # 0x9242
callq 0x1830
movq %rax, -0xc8(%rbp)
leaq 0x6f0a(%rip), %rdi      # 0x924b
callq 0x1830
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0xd0(%rbp)
movq -0xc8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xc0(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0xc8(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x1e8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xd8(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, -0x1e0(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2cb0
movq -0x1e0(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xd8(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, -0x1d8(%rbp)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdi
movq 0x18(%rax), %rsi
callq 0x2a50
movq -0x1d8(%rbp), %rdi
movq %rax, %rsi
callq 0x4740
movq -0xc0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2810
movq -0x1d0(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xc0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0xc8(%rbp), %rsi
movl $0x16, %edi
callq 0x2b90
movq -0x1c8(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xc0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0xd0(%rbp), %rdi
xorl %esi, %esi
callq 0x1660
movq -0x1c0(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24ea
jmp 0x24bf
leaq 0x6b3e(%rip), %rdi      # 0x9004
leaq 0x6b71(%rip), %rsi      # 0x903e
movl $0x326, %edx            # imm = 0x326
leaq 0x6d79(%rip), %rcx      # 0x9252
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x8(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw (%rax,%rax)