// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: workbook_close
lxw_error
workbook_close(lxw_workbook *self)
{
    lxw_sheet *sheet = NULL;
    lxw_worksheet *worksheet = NULL;
    lxw_packager *packager = NULL;
    lxw_error error = LXW_NO_ERROR;
    char codename[LXW_MAX_SHEETNAME_LENGTH] = { 0 };

    /* Add a default worksheet if non have been added. */
    if (!self->num_sheets)
        workbook_add_worksheet(self, NULL);

    /* Ensure that at least one worksheet has been selected. */
    if (self->active_sheet == 0) {
        sheet = STAILQ_FIRST(self->sheets);
        if (!sheet->is_chartsheet) {
            worksheet = sheet->u.worksheet;
            worksheet->selected = LXW_TRUE;
            worksheet->hidden = 0;
        }
    }

    /* Set the active sheet and check if a metadata file is needed. */
    STAILQ_FOREACH(sheet, self->sheets, list_pointers) {
        if (sheet->is_chartsheet)
            continue;
        else
            worksheet = sheet->u.worksheet;

        if (worksheet->index == self->active_sheet)
            worksheet->active = LXW_TRUE;

        if (worksheet->has_dynamic_arrays)
            self->has_metadata = LXW_TRUE;
    }

    /* Set workbook and worksheet VBA codenames if a macro has been added. */
    if (self->vba_project) {
        if (!self->vba_codename)
            workbook_set_vba_name(self, "ThisWorkbook");

        STAILQ_FOREACH(sheet, self->sheets, list_pointers) {
            if (sheet->is_chartsheet)
                continue;
            else
                worksheet = sheet->u.worksheet;

            if (!worksheet->vba_codename) {
                lxw_snprintf(codename, LXW_MAX_SHEETNAME_LENGTH, "Sheet%d",
                             worksheet->index + 1);

                worksheet_set_vba_name(worksheet, codename);
            }
        }
    }

    /* Prepare the worksheet VML elements such as comments. */
    _prepare_vml(self);

    /* Set the defined names for the worksheets such as Print Titles. */
    _prepare_defined_names(self);

    /* Prepare the drawings, charts and images. */
    _prepare_drawings(self);

    /* Add cached data to charts. */
    _add_chart_cache_data(self);

    /* Set the table ids for the worksheet tables. */
    _prepare_tables(self);

    /* Create a packager object to assemble sub-elements into a zip file. */
    packager = lxw_packager_new(self->filename,
                                self->options.tmpdir,
                                self->options.use_zip64);

    /* If the packager fails it is generally due to a zip permission error. */
    if (packager == NULL) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Error creating '%s'. "
                   "System error = %s\n", self->filename, strerror(errno));

        error = LXW_ERROR_CREATING_XLSX_FILE;
        goto mem_error;
    }

    /* Set the workbook object in the packager. */
    packager->workbook = self;

    /* Assemble all the sub-files in the xlsx package. */
    error = lxw_create_package(packager);

    if (!self->filename) {
        *self->options.output_buffer = packager->output_buffer;
        *self->options.output_buffer_size = packager->output_buffer_size;
    }

    /* Error and non-error conditions fall through to the cleanup code. */
    if (error == LXW_ERROR_CREATING_TMPFILE) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Error creating tmpfile(s) to assemble '%s'. "
                   "System error = %s\n", self->filename, strerror(errno));
    }

    /* If LXW_ERROR_ZIP_FILE_OPERATION then errno is set by zip. */
    if (error == LXW_ERROR_ZIP_FILE_OPERATION) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip ZIP_ERRNO error while creating xlsx file '%s'. "
                   "System error = %s\n", self->filename, strerror(errno));
    }

    /* If LXW_ERROR_ZIP_PARAMETER_ERROR then errno is set by zip. */
    if (error == LXW_ERROR_ZIP_PARAMETER_ERROR) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip ZIP_PARAMERROR error while creating xlsx file '%s'. "
                   "System error = %s\n", self->filename, strerror(errno));
    }

    /* If LXW_ERROR_ZIP_BAD_ZIP_FILE then errno is set by zip. */
    if (error == LXW_ERROR_ZIP_BAD_ZIP_FILE) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip ZIP_BADZIPFILE error while creating xlsx file '%s'. "
                   "This may require the use_zip64 option for large files. "
                   "System error = %s\n", self->filename, strerror(errno));
    }

    /* If LXW_ERROR_ZIP_INTERNAL_ERROR then errno is set by zip. */
    if (error == LXW_ERROR_ZIP_INTERNAL_ERROR) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip ZIP_INTERNALERROR error while creating xlsx file '%s'. "
                   "System error = %s\n", self->filename, strerror(errno));
    }

    /* The next 2 error conditions don't set errno. */
    if (error == LXW_ERROR_ZIP_FILE_ADD) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip error adding file to xlsx file '%s'.\n",
                   self->filename);
    }

    if (error == LXW_ERROR_ZIP_CLOSE) {
        LXW_PRINTF(LXW_STDERR "[ERROR] workbook_close(): "
                   "Zip error closing xlsx file '%s'.\n", self->filename);
    }

mem_error:
    lxw_packager_free(packager);
    lxw_workbook_free(self);
    return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xdf(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
cmpw $0x0, 0xb0(%rdi)
jne 0x2bde0
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcb80
movzwl 0xb8(%rbx), %ecx
movq 0x8(%rbx), %rax
testw %cx, %cx
je 0x2be05
movq (%rax), %rbp
leaq 0x8(%rbx), %rdx
movq %rdx, 0x28(%rsp)
testq %rbp, %rbp
jne 0x2be1b
xorl %ebp, %ebp
jmp 0x2be50
movq (%rax), %rbp
cmpb $0x0, (%rbp)
je 0x2c96a
leaq 0x8(%rbx), %rdx
movq %rdx, 0x28(%rsp)
movq %rbp, %rdx
cmpb $0x0, (%rdx)
jne 0x2be47
movq 0x8(%rdx), %rsi
cmpw %cx, 0xd0(%rsi)
jne 0x2be37
movb $0x1, 0xd2(%rsi)
cmpb $0x0, 0x151(%rsi)
je 0x2be47
movb $0x1, 0xd5(%rbx)
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
jne 0x2be1e
cmpq $0x0, 0xe8(%rbx)
je 0x2bee8
cmpq $0x0, 0xf8(%rbx)
jne 0x2be82
leaq 0x19baf(%rip), %rdi     # 0x45a1e
callq 0xcce0
movq %rax, 0xf8(%rbx)
movq 0x8(%rbx), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x2c3c4
leaq 0x19aea(%rip), %r14     # 0x4597c
leaq 0x70(%rsp), %r15
cmpb $0x0, (%rbp)
jne 0x2bed4
movq 0x8(%rbp), %r12
cmpq $0x0, 0x158(%r12)
jne 0x2bed4
movzwl 0xd0(%r12), %ecx
incl %ecx
movl $0x7f, %esi
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xc570
movq %r12, %rdi
movq %r15, %rsi
callq 0xcfb0
movq 0x10(%rbp), %rbp
testq %rbp, %rbp
jne 0x2be97
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x2c3c4
movl $0x1, %eax
movl $0x0, 0x14(%rsp)
movl $0x400, %ecx            # imm = 0x400
xorl %r14d, %r14d
xorl %r8d, %r8d
cmpb $0x0, (%rbp)
jne 0x2bfd7
movq 0x8(%rbp), %r15
cmpb $0x0, 0x2a0(%r15)
je 0x2bf98
movb $0x1, 0xd3(%rbx)
cmpb $0x0, 0x2a1(%r15)
je 0x2bf43
incw 0xc2(%rbx)
incl %r8d
movb $0x1, 0xd4(%rbx)
incl %r14d
movl %r14d, 0x20(%rsp)
movq %r15, %rdi
movl %eax, %r14d
movl %eax, %esi
movl %ecx, %edx
movl %ecx, 0x4(%rsp)
movl 0x20(%rsp), %ecx
movl %r8d, 0x8(%rsp)
callq 0xc6b0
movl %eax, %r13d
addl $0x400, %r13d           # imm = 0x400
movl %r13d, %r12d
shrl $0xa, %r12d
addl %r14d, %r12d
movl 0x20(%rsp), %r14d
andl $0xfffffc00, %r13d      # imm = 0xFFFFFC00
addl 0x4(%rsp), %r13d
cmpb $0x0, 0x2a2(%r15)
jne 0x2bfad
jmp 0x2bfcc
movl %r8d, 0x8(%rsp)
cmpb $0x0, 0x2a2(%r15)
movl %ecx, %r13d
movl %eax, %r12d
je 0x2bfd2
movb $0x1, 0xd3(%rbx)
incl %r14d
movl 0x14(%rsp), %esi
incl %esi
movq %r15, %rdi
movl %esi, 0x14(%rsp)
movl %r14d, %edx
callq 0xc5f0
movl %r12d, %eax
movl %r13d, %ecx
movl 0x8(%rsp), %r8d
movq 0x10(%rbp), %rbp
testq %rbp, %rbp
jne 0x2bf09
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x2c3c4
leaq 0x170(%rsp), %r15
leaq 0xf0(%rsp), %rbp
leaq 0x50(%rsp), %r14
cmpb $0x0, (%r12)
jne 0x2c3ae
movq 0x8(%r12), %r13
cmpb $0x0, 0x1e4(%r13)
je 0x2c0c3
movq 0xc0(%r13), %rcx
movl $0x80, %esi
movq %r15, %rdi
leaq 0x1a4ac(%rip), %rdx     # 0x464ed
xorl %eax, %eax
callq 0xc570
movzwl 0x1f0(%r13), %edx
movl 0x1e8(%r13), %esi
movl 0x1ec(%r13), %ecx
movzwl 0x1f2(%r13), %r8d
movq %r14, %rdi
callq 0xc430
movq 0xc0(%r13), %rcx
movl $0x80, %esi
leaq 0xf0(%rsp), %rdi
leaq 0x1a477(%rip), %rdx     # 0x46500
movq %r14, %r8
xorl %eax, %eax
callq 0xc570
movswl 0xd0(%r13), %r8d
movq %rbx, %rdi
leaq 0x1a461(%rip), %rsi     # 0x46506
movq %r15, %rdx
leaq 0xf0(%rsp), %rcx
movl $0x1, %r9d
callq 0x2ca38
leaq 0xf0(%rsp), %rbp
cmpb $0x0, 0x1d4(%r13)
je 0x2c203
movq 0xc0(%r13), %rcx
movl $0x80, %esi
movq %r15, %rdi
leaq 0x1a435(%rip), %rdx     # 0x4651c
xorl %eax, %eax
callq 0xc570
movl 0x1d8(%r13), %ecx
testl %ecx, %ecx
jne 0x2c157
cmpl $0xfffff, 0x1dc(%r13) # imm = 0xFFFFF
jne 0x2c157
movzwl 0x1e0(%r13), %esi
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
xorl %edx, %edx
callq 0xc580
movzwl 0x1e2(%r13), %esi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0xc580
movl $0x1b, %esi
leaq 0x50(%rsp), %rdi
leaq 0x1a432(%rip), %rdx     # 0x46577
movq %rbp, %rcx
movq %r14, %r8
movq %rdi, %r14
xorl %eax, %eax
callq 0xc570
jmp 0x2c1bb
movzwl 0x1e0(%r13), %edx
movzwl 0x1e2(%r13), %esi
movl %esi, %eax
xorl $0x3fff, %eax           # imm = 0x3FFF
orw %dx, %ax
jne 0x2c19c
incl %ecx
movl 0x1dc(%r13), %r8d
incl %r8d
movl $0x1b, %esi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
leaq 0x1a3c6(%rip), %rdx     # 0x46559
xorl %eax, %eax
callq 0xc570
jmp 0x2c1bb
movl 0x1dc(%r13), %eax
movzwl %dx, %edx
movzwl %si, %r8d
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movl %ecx, %esi
movl %eax, %ecx
callq 0xc430
movq 0xc0(%r13), %rcx
movl $0x80, %esi
leaq 0xf0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1a327(%rip), %rdx     # 0x46500
movq %r14, %r8
xorl %eax, %eax
callq 0xc570
movswl 0xd0(%r13), %r8d
movq %rbx, %rdi
leaq 0x1a335(%rip), %rsi     # 0x4652a
movq %r15, %rdx
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0x2ca38
cmpb $0x0, 0x1c0(%r13)
movb 0x1cc(%r13), %r14b
je 0x2c2c5
movq 0xc0(%r13), %rcx
movl $0x80, %esi
movq %r15, %rdi
leaq 0x1a30d(%rip), %rdx     # 0x4653b
xorl %eax, %eax
callq 0xc570
testb %r14b, %r14b
je 0x2c350
movzwl 0x1ce(%r13), %esi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0xc580
movzwl 0x1d0(%r13), %esi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0xc580
movq 0xc0(%r13), %rcx
movl 0x1c4(%r13), %r10d
incl %r10d
movl 0x1c8(%r13), %r11d
incl %r11d
subq $0x8, %rsp
movl $0x80, %esi
leaq 0xf8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1a2a9(%rip), %rdx     # 0x4654b
movq %r14, %r8
movq %r15, %r9
leaq 0x178(%rsp), %r15
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %rcx
callq 0xc570
addq $0x20, %rsp
jmp 0x2c389
testb %r14b, %r14b
leaq 0x50(%rsp), %r14
je 0x2c3ae
movq 0xc0(%r13), %rcx
movl $0x80, %esi
movq %r15, %rdi
leaq 0x1a252(%rip), %rdx     # 0x4653b
xorl %eax, %eax
callq 0xc570
movzwl 0x1ce(%r13), %esi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0xc580
movzwl 0x1d0(%r13), %esi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0xc580
movq 0xc0(%r13), %rcx
movl $0x80, %esi
movq %rbp, %rdi
leaq 0x1a240(%rip), %rdx     # 0x46574
movq %r14, %r8
leaq 0x50(%rsp), %r14
movq %r15, %r9
leaq 0x170(%rsp), %r15
xorl %eax, %eax
callq 0xc570
jmp 0x2c38e
movq 0xc0(%r13), %rcx
movl 0x1c4(%r13), %r8d
incl %r8d
movl 0x1c8(%r13), %r9d
incl %r9d
movl $0x80, %esi
leaq 0xf0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1a1d4(%rip), %rdx     # 0x46556
xorl %eax, %eax
callq 0xc570
leaq 0x50(%rsp), %r14
movswl 0xd0(%r13), %r8d
movq %rbx, %rdi
leaq 0x1a1c1(%rip), %rsi     # 0x46561
movq %r15, %rdx
movq %rbp, %rcx
xorl %r9d, %r9d
callq 0x2ca38
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x2c00d
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
xorl %r15d, %r15d
testq %rax, %rax
je 0x2c7c5
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %rbx, 0x30(%rsp)
cmpb $0x0, (%rax)
movq %rax, 0x38(%rsp)
je 0x2c3fc
movq 0x8(%rax), %rax
movb $0x1, %cl
movl %ecx, 0x14(%rsp)
jmp 0x2c404
movl $0x0, 0x14(%rsp)
movq 0x8(%rax), %r14
movq 0x60(%r14), %rax
movq (%rax), %r13
testq %r13, %r13
jne 0x2c436
movq 0x68(%r14), %rax
cmpq $0x0, (%rax)
jne 0x2c436
cmpb $0x0, 0x2a2(%r14)
jne 0x2c436
cmpb $0x0, 0x2a3(%r14)
je 0x2c7b3
cmpb $0x0, 0x2a3(%r14)
movq %r14, 0x20(%rsp)
je 0x2c531
movq 0x3a8(%r14), %rdx
movzbl 0x50(%rdx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x2c48d
leaq 0x194b6(%rip), %rcx     # 0x45918
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0xcf(%rbx)
jmp 0x2c48d
movb $0x1, 0xd1(%rbx)
jmp 0x2c48d
movb $0x1, 0xd2(%rbx)
jmp 0x2c48d
movb $0x1, 0xd0(%rbx)
movq 0xa0(%rdx), %r13
testq %r13, %r13
movq 0x8(%rsp), %rax
movq %rdx, 0x18(%rsp)
je 0x2c4b4
movq 0x40(%rbx), %rdi
movq %r13, %rsi
callq 0x2d463
movq 0x18(%rsp), %rdx
testq %rax, %rax
movq %rax, 0x8(%rsp)
je 0x2c4c9
movl (%rax), %esi
movb $0x1, 0x98(%rdx)
jmp 0x2c522
testq %r13, %r13
sete %bl
incl %ebp
movl $0x1, %edi
movl $0x30, %esi
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
sete %al
orb %bl, %al
je 0x2c4f6
movl %ebp, %esi
movq 0x30(%rsp), %rbx
jmp 0x2c518
movl %ebp, (%r14)
movq %r13, %rdi
callq 0xcce0
movq %rax, 0x8(%r14)
movq 0x30(%rsp), %rbx
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x2d4a4
movl %ebp, %esi
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0xcbc0
movq 0x60(%r14), %rax
movq (%rax), %r13
incl %r15d
testq %r13, %r13
movq %r15, 0x18(%rsp)
je 0x2c63e
movl %r12d, 0x4(%rsp)
cmpb $0x0, 0x99(%r13)
jne 0x2c62e
movzbl 0x50(%r13), %eax
decl %eax
cmpl $0x3, %eax
ja 0x2c593
leaq 0x193c0(%rip), %rcx     # 0x45928
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0xcf(%rbx)
jmp 0x2c593
movb $0x1, 0xd1(%rbx)
jmp 0x2c593
movb $0x1, 0xd2(%rbx)
jmp 0x2c593
movb $0x1, 0xd0(%rbx)
movq 0xa0(%r13), %r14
testq %r14, %r14
movq 0x8(%rsp), %rax
je 0x2c5b0
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x2d463
testq %rax, %rax
movq %rax, 0x8(%rsp)
je 0x2c5c6
movl (%rax), %esi
movb $0x1, 0x98(%r13)
jmp 0x2c61b
testq %r14, %r14
sete %r15b
incl %ebp
movl $0x1, %edi
movl $0x30, %esi
callq 0xc7f0
movl %ebp, %r12d
movq %rax, %rbp
testq %rax, %rax
sete %al
orb %r15b, %al
jne 0x2c60b
movl %r12d, (%rbp)
movq %r14, %rdi
callq 0xcce0
movq %rax, 0x8(%rbp)
movq 0x30(%rbx), %rdi
movq %rbp, %rsi
callq 0x2d4a4
movl %r12d, %esi
movq 0x18(%rsp), %r15
movl %r12d, %ebp
movl 0x4(%rsp), %r12d
movq 0x20(%rsp), %r14
movq %r14, %rdi
movl %r15d, %edx
movq %r13, %rcx
callq 0xc680
movq 0xb8(%r13), %r13
testq %r13, %r13
jne 0x2c547
movq 0x68(%r14), %rax
movq (%rax), %r13
testq %r13, %r13
je 0x2c6a6
incl %r12d
movzbl 0x14(%rsp), %r8d
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
movq %r13, %rcx
callq 0xcee0
movq 0x90(%r13), %rax
testq %rax, %rax
je 0x2c69d
movq $0x0, 0x170(%rax)
movq 0x50(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq %rax, (%rcx)
movq 0x90(%r13), %rax
movl $0x170, %ecx            # imm = 0x170
addq %rcx, %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0xb8(%r13), %r13
jmp 0x2c645
movl $0x69, %r15d
movl %r12d, 0x4(%rsp)
movq (%r14,%r15,8), %rax
movq (%rax), %r13
testq %r13, %r13
je 0x2c7a1
movzbl 0x50(%r13), %eax
decl %eax
cmpl $0x3, %eax
ja 0x2c6ff
leaq 0x19264(%rip), %rcx     # 0x45938
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0xcf(%rbx)
jmp 0x2c6ff
movb $0x1, 0xd1(%rbx)
jmp 0x2c6ff
movb $0x1, 0xd2(%rbx)
jmp 0x2c6ff
movb $0x1, 0xd0(%rbx)
movq 0xa0(%r13), %r14
testq %r14, %r14
movq 0x8(%rsp), %rax
je 0x2c71c
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x2d463
testq %rax, %rax
movq %rax, 0x8(%rsp)
je 0x2c732
movl (%rax), %esi
movb $0x1, 0x98(%r13)
jmp 0x2c791
testq %r14, %r14
sete %r12b
incl %ebp
movl $0x1, %edi
movl $0x30, %esi
callq 0xc7f0
movl %ebp, %ebx
movq %rax, %rbp
testq %rax, %rax
sete %al
orb %r12b, %al
je 0x2c765
movl %ebx, %esi
movl %ebx, %ebp
movq 0x30(%rsp), %rbx
jmp 0x2c78c
movl %ebx, (%rbp)
movq %r14, %rdi
callq 0xcce0
movq %rax, 0x8(%rbp)
movq 0x30(%rsp), %r14
movq 0x38(%r14), %rdi
movq %rbp, %rsi
callq 0x2d4a4
movl %ebx, %esi
movl %ebx, %ebp
movq %r14, %rbx
movl 0x4(%rsp), %r12d
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r13, %rdx
callq 0xcd90
incq %r15
cmpq $0x6f, %r15
jne 0x2c6b1
movq 0x18(%rsp), %r15
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x2c3e6
movw %r15w, 0xc0(%rbx)
movq 0x50(%rbx), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x2c88b
movq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0x2d70c
movq 0x20(%r14), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x2d70c
movq 0x28(%r14), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x2d70c
movq 0x128(%r14), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x2c87f
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2d70c
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x2d70c
movq 0x30(%r15), %rsi
movq %rbx, %rdi
callq 0x2d70c
cmpw $0x0, 0x92(%r15)
je 0x2c876
movl $0x30, %r12d
xorl %r13d, %r13d
movq 0x88(%r15), %rax
movq (%rax,%r12), %rsi
movq %rbx, %rdi
callq 0x2d70c
incq %r13
movzwl 0x92(%r15), %eax
addq $0x60, %r12
cmpq %rax, %r13
jb 0x2c84f
movq 0x110(%r15), %r15
jmp 0x2c813
movq 0x170(%r14), %r14
jmp 0x2c7d4
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x2c8cb
xorl %r15d, %r15d
cmpb $0x0, (%r14)
jne 0x2c8c2
movq 0x8(%r14), %rdi
movzwl 0xa0(%rdi), %ebp
testl %ebp, %ebp
je 0x2c8c2
leal 0x1(%r15), %esi
callq 0xc240
addl %r15d, %ebp
movl %ebp, %r15d
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x2c89e
leaq 0x80(%rbx), %r15
movq 0x80(%rbx), %rdi
movq 0x90(%rbx), %rsi
movzbl 0x98(%rbx), %edx
callq 0xcd80
movq %rax, %r14
testq %rax, %rax
je 0x2c97c
movq %rbx, 0x8(%r14)
movq %r14, %rdi
callq 0xc5c0
movl %eax, %ebp
cmpq $0x0, 0x80(%rbx)
jne 0x2c92c
movq 0x68(%r14), %rax
movq 0xa0(%rbx), %rcx
movq %rax, (%rcx)
movq 0x18(%r14), %rax
movq 0xa8(%rbx), %rcx
movq %rax, (%rcx)
movl %ebp, %eax
addl $-0x3, %eax
cmpl $0x7, %eax
ja 0x2c946
leaq 0x1900b(%rip), %rcx     # 0x45948
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0xcc50
movq %rbx, %rdi
callq 0xcb50
movl %ebp, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbp), %rdx
movw $0x1, 0xd3(%rdx)
jmp 0x2bdf0
movq %r15, %rdi
callq 0xe234
movl $0x2, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe144
movl $0x7, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe1f8
movl $0x3, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe180
movl $0x6, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe1bc
movl $0x5, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe0e4
movl $0x9, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe0c0
movl $0xa, %ebp
jmp 0x2c946
movq %r15, %rdi
callq 0xe108
movl $0x8, %ebp
jmp 0x2c946