LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/metadata.c
// Function: metadata_write_xda_dynamic_array_properties
STATIC void
_metadata_write_xda_dynamic_array_properties(lxw_metadata *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("fDynamic", "1");
    LXW_PUSH_ATTRIBUTES_STR("fCollapsed", "0");

    lxw_xml_empty_tag(self->file, "xda:dynamicArrayProperties", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2c31e
leaq 0x3c6ce(%rip), %rdi     # 0x689f3
leaq 0x3f144(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x10(%rbp)
jmp 0x2c35f
jmp 0x2c361
leaq 0x3c694(%rip), %rdi     # 0x689fc
leaq 0x3f15f(%rip), %rsi     # 0x6b4ce
callq 0xc030
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x10(%rbp)
jmp 0x2c3a2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x3c657(%rip), %rsi     # 0x68a07
leaq -0x18(%rbp), %rdx
callq 0xcca0
jmp 0x2c3bb
cmpq $0x0, -0x18(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2c3cb
jmp 0x2c3fd
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2c3f0
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2c3f2
movq -0x20(%rbp), %rdi
callq 0xc0d0
jmp 0x2c3bb
jmp 0x2c3ff
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/metadata.c
// Function: metadata_write_rc
STATIC void
_metadata_write_rc(lxw_metadata *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("t", "1");
    LXW_PUSH_ATTRIBUTES_STR("v", "0");

    lxw_xml_empty_tag(self->file, "rc", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2c42e
leaq 0x3aca4(%rip), %rdi     # 0x670d9
leaq 0x3f034(%rip), %rsi     # 0x6b470
callq 0xc030
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x10(%rbp)
jmp 0x2c46f
jmp 0x2c471
leaq 0x3aae8(%rip), %rdi     # 0x66f60
leaq 0x3f04f(%rip), %rsi     # 0x6b4ce
callq 0xc030
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x1040(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x1040, %rax           # imm = 0x1040
movq %rax, -0x10(%rbp)
jmp 0x2c4b2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x3c56f(%rip), %rsi     # 0x68a2f
leaq -0x18(%rbp), %rdx
callq 0xcca0
jmp 0x2c4cb
cmpq $0x0, -0x18(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2c4db
jmp 0x2c50d
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x1040(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2c500
leaq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2c502
movq -0x20(%rbp), %rdi
callq 0xc0d0
jmp 0x2c4cb
jmp 0x2c50f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: fopen_memstream
ZCALLBACK
_fopen_memstream(voidpf opaque, const char *filename, int mode)
{
    lxw_packager *packager = (lxw_packager *) opaque;
    (void) filename;
    (void) mode;
    return lxw_get_filehandle(&packager->output_buffer,
                              &packager->output_buffer_size,
                              packager->tmpdir);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x68, %rdi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rdx
callq 0xceb0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: fclose_memstream
ZCALLBACK
_fclose_memstream(voidpf opaque, voidpf stream)
{
    lxw_packager *packager = (lxw_packager *) opaque;
    FILE *file = (FILE *) stream;
    long size;

    /* Ensure memstream buffer is updated */
    if (fflush(file))
        goto mem_error;

    /* If the memstream is backed by a temporary file, no buffer is created,
       so create it manually. */
    if (!packager->output_buffer) {
        if (fseek(file, 0L, SEEK_END))
            goto mem_error;

        size = ftell(file);
        if (size == -1)
            goto mem_error;

        packager->output_buffer = malloc(size);
        GOTO_LABEL_ON_MEM_ERROR(packager->output_buffer, mem_error);

        rewind(file);
        if (fread((void *) packager->output_buffer, size, 1, file) < 1)
            goto mem_error;

        packager->output_buffer_size = size;
    }

    return fclose(file);

mem_error:
    fclose(file);
    return EOF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xcb00
cmpl $0x0, %eax
je 0x2c7e3
jmp 0x2c8b3
movq -0x20(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x2c8a5
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0xcbe0
cmpl $0x0, %eax
je 0x2c80e
jmp 0x2c8b3
movq -0x28(%rbp), %rdi
callq 0xc900
movq %rax, -0x30(%rbp)
cmpq $-0x1, -0x30(%rbp)
jne 0x2c827
jmp 0x2c8b3
movq -0x30(%rbp), %rdi
callq 0xcaf0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x2c86c
movq 0x507ab(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x39879(%rip), %rsi     # 0x660d0
leaq 0x3c226(%rip), %rdx     # 0x68a84
movl $0x99, %ecx
movb $0x0, %al
callq 0xc8f0
jmp 0x2c8b3
jmp 0x2c86e
movq -0x28(%rbp), %rdi
callq 0xc560
movq -0x20(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0xc320
cmpq $0x1, %rax
jae 0x2c899
jmp 0x2c8b3
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
callq 0xc460
movl %eax, -0x4(%rbp)
jmp 0x2c8c3
movq -0x28(%rbp), %rdi
callq 0xc460
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: lxw_packager_free
void
lxw_packager_free(lxw_packager *packager)
{
    if (!packager)
        return;

    free((void *) packager->buffer);
    free((void *) packager->filename);
    free(packager);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2c8e5
jmp 0x2c908
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0xc0d0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xc0d0
movq -0x8(%rbp), %rdi
callq 0xc0d0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: get_chart_count
uint32_t
_get_chart_count(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_chart *chart;
    uint32_t chart_count = 0;

    STAILQ_FOREACH(chart, workbook->ordered_charts, ordered_list_pointers) {
        chart_count++;
    }

    return chart_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2c95b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x170(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2c93a
movl -0x1c(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: get_drawing_count
uint32_t
_get_drawing_count(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_worksheet *worksheet;
    lxw_drawing *drawing;
    uint32_t drawing_count = 0;

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

        drawing = worksheet->drawing;

        if (drawing)
            drawing_count++;
    }

    return drawing_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2c9e7
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2c9ac
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2c9b8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x290(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2c9d7
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2c9d9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2c98a
movl -0x2c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: get_table_count
uint32_t
_get_table_count(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_worksheet *worksheet;
    uint32_t table_count = 0;

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

        table_count += worksheet->table_count;
    }

    return table_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2ca67
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2ca3c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2ca48
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xa0(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2ca1a
movl -0x24(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_root_rels_file
STATIC lxw_error
_write_root_rels_file(lxw_packager *self)
{
    lxw_relationships *rels = lxw_relationships_new();
    char *buffer = NULL;
    size_t buffer_size = 0;
    lxw_error err = LXW_NO_ERROR;

    if (!rels) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    rels->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!rels->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    lxw_add_document_relationship(rels, "/officeDocument", "xl/workbook.xml");

    lxw_add_package_relationship(rels,
                                 "/metadata/core-properties",
                                 "docProps/core.xml");

    lxw_add_document_relationship(rels,
                                  "/extended-properties", "docProps/app.xml");

    if (!STAILQ_EMPTY(self->workbook->custom_properties))
        lxw_add_document_relationship(rels,
                                      "/custom-properties",
                                      "docProps/custom.xml");

    lxw_relationships_assemble_xml_file(rels);

    err = _add_to_zip(self, rels->file, &buffer, &buffer_size, "_rels/.rels");

    fclose(rels->file);
    free(buffer);

mem_error:
    lxw_free_relationships(rels);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0xcfb0
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2d4cf
movl $0x1, -0x24(%rbp)
jmp 0x2d5b2
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2d504
movl $0x3, -0x24(%rbp)
jmp 0x2d5b2
movq -0x10(%rbp), %rdi
leaq 0x3b820(%rip), %rsi     # 0x68d2f
leaq 0x3b5c8(%rip), %rdx     # 0x68ade
callq 0xc420
movq -0x10(%rbp), %rdi
leaq 0x3ad6e(%rip), %rsi     # 0x68294
leaq 0x3a869(%rip), %rdx     # 0x67d96
callq 0xc630
movq -0x10(%rbp), %rdi
leaq 0x3b802(%rip), %rsi     # 0x68d3f
leaq 0x3a7fa(%rip), %rdx     # 0x67d3e
callq 0xc420
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rax
cmpq $0x0, (%rax)
je 0x2d572
movq -0x10(%rbp), %rdi
leaq 0x3b7ee(%rip), %rsi     # 0x68d54
leaq 0x3abb3(%rip), %rdx     # 0x68120
callq 0xc420
movq -0x10(%rbp), %rdi
callq 0xc340
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
leaq 0x3b7d2(%rip), %r8      # 0x68d67
callq 0x2fd50
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x18(%rbp), %rdi
callq 0xc0d0
movq -0x10(%rbp), %rdi
callq 0xc2c0
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_worksheet_files
STATIC lxw_error
_write_worksheet_files(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_worksheet *worksheet;
    char sheetname[LXW_FILENAME_LENGTH] = { 0 };
    char *buffer = NULL;
    size_t buffer_size = 0;
    uint32_t index = 1;
    lxw_error err;

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

        lxw_snprintf(sheetname, LXW_FILENAME_LENGTH,
                     "xl/worksheets/sheet%d.xml", index++);

        if (worksheet->optimize_row)
            lxw_worksheet_write_single_row(worksheet);

        worksheet->file = lxw_get_filehandle(&buffer, &buffer_size,
                                             self->tmpdir);
        if (!worksheet->file)
            return LXW_ERROR_CREATING_TMPFILE;

        lxw_worksheet_assemble_xml_file(worksheet);

        err = _add_to_zip(self, worksheet->file, &buffer, &buffer_size,
                          sheetname);
        fclose(worksheet->file);
        free(buffer);
        RETURN_ON_ERROR(err);
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc6a0
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movl $0x1, -0xc4(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2d9b1
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2d8b6
jmp 0x2d9a0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0xb0(%rbp), %rdi
movl -0xc4(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movl $0x80, %esi
leaq 0x3b2ef(%rip), %rdx     # 0x68bd5
movb $0x0, %al
callq 0xc5d0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0x2d904
movq -0x28(%rbp), %rdi
callq 0xc3f0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2d93c
movl $0x3, -0x4(%rbp)
jmp 0x2d9b8
movq -0x28(%rbp), %rdi
callq 0xc230
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq -0xb0(%rbp), %r8
leaq -0xb8(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x2fd50
movl %eax, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0xb8(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0xc8(%rbp)
je 0x2d99c
movl -0xc8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2d9b8
jmp 0x2d99e
jmp 0x2d9a0
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2d89d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_chartsheet_files
STATIC lxw_error
_write_chartsheet_files(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_chartsheet *chartsheet;
    char sheetname[LXW_FILENAME_LENGTH] = { 0 };
    char *buffer = NULL;
    size_t buffer_size = 0;
    uint32_t index = 1;
    lxw_error err;

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

        lxw_snprintf(sheetname, LXW_FILENAME_LENGTH,
                     "xl/chartsheets/sheet%d.xml", index++);

        chartsheet->file = lxw_get_filehandle(&buffer, &buffer_size,
                                              self->tmpdir);
        if (!chartsheet->file)
            return LXW_ERROR_CREATING_TMPFILE;

        lxw_chartsheet_assemble_xml_file(chartsheet);

        err = _add_to_zip(self, chartsheet->file, &buffer, &buffer_size,
                          sheetname);
        fclose(chartsheet->file);
        free(buffer);
        RETURN_ON_ERROR(err);
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc6a0
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movl $0x1, -0xc4(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2db2c
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2da4f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2da54
jmp 0x2db1b
leaq -0xb0(%rbp), %rdi
movl -0xc4(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movl $0x80, %esi
leaq 0x3b141(%rip), %rdx     # 0x68bb9
movb $0x0, %al
callq 0xc5d0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2dab7
movl $0x3, -0x4(%rbp)
jmp 0x2db33
movq -0x28(%rbp), %rdi
callq 0xcc40
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq -0xb0(%rbp), %r8
leaq -0xb8(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x2fd50
movl %eax, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0xb8(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0xc8(%rbp)
je 0x2db17
movl -0xc8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2db33
jmp 0x2db19
jmp 0x2db1b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2da2d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_workbook_file
STATIC lxw_error
_write_workbook_file(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_error err;

    char *buffer = NULL;
    size_t buffer_size = 0;
    workbook->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!workbook->file)
        return LXW_ERROR_CREATING_TMPFILE;

    lxw_workbook_assemble_xml_file(workbook);

    err = _add_to_zip(self, workbook->file, &buffer, &buffer_size,
                      "xl/workbook.xml");
    fclose(workbook->file);
    free(buffer);
    RETURN_ON_ERROR(err);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2db9a
movl $0x3, -0x4(%rbp)
jmp 0x2dbf1
movq -0x18(%rbp), %rdi
callq 0xc250
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq 0x3af21(%rip), %r8      # 0x68ade
callq 0x2fd50
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x28(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0x1c(%rbp)
je 0x2dbe8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2dbf1
jmp 0x2dbea
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_chart_files
STATIC lxw_error
_write_chart_files(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_chart *chart;
    char sheetname[LXW_FILENAME_LENGTH] = { 0 };
    char *buffer = NULL;
    size_t buffer_size = 0;
    uint32_t index = 1;
    lxw_error err;

    STAILQ_FOREACH(chart, workbook->ordered_charts, ordered_list_pointers) {

        lxw_snprintf(sheetname, LXW_FILENAME_LENGTH,
                     "xl/charts/chart%d.xml", index++);

        chart->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
        if (!chart->file)
            return LXW_ERROR_CREATING_TMPFILE;

        lxw_chart_assemble_xml_file(chart);

        err = _add_to_zip(self, chart->file, &buffer, &buffer_size,
                          sheetname);
        fclose(chart->file);
        free(buffer);
        RETURN_ON_ERROR(err);
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc6a0
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movl $0x1, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2dd43
leaq -0xa0(%rbp), %rdi
movl -0xb4(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
movl $0x80, %esi
leaq 0x3af64(%rip), %rdx     # 0x68bf0
movb $0x0, %al
callq 0xc5d0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2dccb
movl $0x3, -0x4(%rbp)
jmp 0x2dd4a
movq -0x20(%rbp), %rdi
callq 0xc8e0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x2fd50
movl %eax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0xa8(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0xb8(%rbp)
je 0x2dd2b
movl -0xb8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2dd4a
jmp 0x2dd2d
jmp 0x2dd2f
movq -0x20(%rbp), %rax
movq 0x170(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2dc5d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_drawing_files
STATIC lxw_error
_write_drawing_files(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_worksheet *worksheet;
    lxw_drawing *drawing;
    char filename[LXW_FILENAME_LENGTH] = { 0 };
    char *buffer = NULL;
    size_t buffer_size = 0;
    uint32_t index = 1;
    lxw_error err;

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

        drawing = worksheet->drawing;

        if (drawing) {
            lxw_snprintf(filename, LXW_FILENAME_LENGTH,
                         "xl/drawings/drawing%d.xml", index++);

            drawing->file = lxw_get_filehandle(&buffer, &buffer_size,
                                               self->tmpdir);
            if (!drawing->file)
                return LXW_ERROR_CREATING_TMPFILE;

            lxw_drawing_assemble_xml_file(drawing);

            err = _add_to_zip(self, drawing->file, &buffer, &buffer_size,
                              filename);
            fclose(drawing->file);
            free(buffer);
            RETURN_ON_ERROR(err);
        }
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc6a0
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movl $0x1, -0xc4(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2dee3
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2dde3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2ddef
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x290(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2ded0
leaq -0xb0(%rbp), %rdi
movl -0xc4(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movl $0x80, %esi
leaq 0x3adda(%rip), %rdx     # 0x68c07
movb $0x0, %al
callq 0xc5d0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2de6c
movl $0x3, -0x4(%rbp)
jmp 0x2deea
movq -0x30(%rbp), %rdi
callq 0xc360
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
leaq -0xb0(%rbp), %r8
leaq -0xb8(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
callq 0x2fd50
movl %eax, -0xc8(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0xb8(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0xc8(%rbp)
je 0x2decc
movl -0xc8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2deea
jmp 0x2dece
jmp 0x2ded0
jmp 0x2ded2
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2ddbd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_shared_strings_file
STATIC lxw_error
_write_shared_strings_file(lxw_packager *self)
{
    lxw_sst *sst = self->workbook->sst;
    char *buffer = NULL;
    size_t buffer_size = 0;
    lxw_error err;

    /* Skip the sharedStrings file if there are no shared strings. */
    if (!sst->string_count)
        return LXW_NO_ERROR;

    sst->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!sst->file)
        return LXW_ERROR_CREATING_TMPFILE;

    lxw_sst_assemble_xml_file(sst);

    err = _add_to_zip(self, sst->file, &buffer, &buffer_size,
                      "xl/sharedStrings.xml");
    fclose(sst->file);
    free(buffer);
    RETURN_ON_ERROR(err);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x2e742
movl $0x0, -0x4(%rbp)
jmp 0x2e7cb
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2e774
movl $0x3, -0x4(%rbp)
jmp 0x2e7cb
movq -0x18(%rbp), %rdi
callq 0xc2b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq 0x398c9(%rip), %r8      # 0x68060
callq 0x2fd50
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x20(%rbp), %rdi
callq 0xc0d0
cmpl $0x0, -0x2c(%rbp)
je 0x2e7c2
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2e7cb
jmp 0x2e7c4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_custom_file
STATIC lxw_error
_write_custom_file(lxw_packager *self)
{
    lxw_custom *custom;
    char *buffer = NULL;
    size_t buffer_size = 0;
    lxw_error err = LXW_NO_ERROR;

    if (STAILQ_EMPTY(self->workbook->custom_properties))
        return LXW_NO_ERROR;

    custom = lxw_custom_new();
    if (!custom) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    custom->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!custom->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    custom->custom_properties = self->workbook->custom_properties;

    lxw_custom_assemble_xml_file(custom);

    err = _add_to_zip(self, custom->file, &buffer, &buffer_size,
                      "docProps/custom.xml");

    fclose(custom->file);
    free(buffer);

mem_error:
    lxw_custom_free(custom);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rax
cmpq $0x0, (%rax)
jne 0x2e821
movl $0x0, -0x4(%rbp)
jmp 0x2e8d2
callq 0xc3d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2e83d
movl $0x1, -0x2c(%rbp)
jmp 0x2e8c3
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2e86f
movl $0x3, -0x2c(%rbp)
jmp 0x2e8c3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0xc5c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq 0x3987a(%rip), %r8      # 0x68120
callq 0x2fd50
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x20(%rbp), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rdi
callq 0xcff0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_theme_file
STATIC lxw_error
_write_theme_file(lxw_packager *self)
{
    lxw_error err = LXW_NO_ERROR;
    lxw_theme *theme = lxw_theme_new();
    char *buffer = NULL;
    size_t buffer_size = 0;

    if (!theme) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    theme->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!theme->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    lxw_theme_assemble_xml_file(theme);

    err = _add_to_zip(self, theme->file, &buffer, &buffer_size,
                      "xl/theme/theme1.xml");

    fclose(theme->file);
    free(buffer);

mem_error:
    lxw_theme_free(theme);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
callq 0xc210
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2e91c
movl $0x1, -0xc(%rbp)
jmp 0x2e98e
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2e94e
movl $0x3, -0xc(%rbp)
jmp 0x2e98e
movq -0x18(%rbp), %rdi
callq 0xcf00
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq 0x394c9(%rip), %r8      # 0x67e3a
callq 0x2fd50
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x20(%rbp), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rdi
callq 0xcfd0
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: add_vba_project
STATIC lxw_error
_add_vba_project(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_error err;
    FILE *image_stream;

    if (!workbook->vba_project)
        return LXW_NO_ERROR;

    /* Check that the image file exists and can be opened. */
    image_stream = lxw_fopen(workbook->vba_project, "rb");
    if (!image_stream) {
        LXW_WARN_FORMAT1("Error adding vbaProject.bin to xlsx file: "
                         "file doesn't exist or can't be opened: %s.",
                         workbook->vba_project);
        return LXW_ERROR_CREATING_TMPFILE;
    }

    err = _add_file_to_zip(self, image_stream, "xl/vbaProject.bin");
    fclose(image_stream);
    RETURN_ON_ERROR(err);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xe8(%rax)
jne 0x2f612
movl $0x0, -0x4(%rbp)
jmp 0x2f697
movq -0x18(%rbp), %rax
movq 0xe8(%rax), %rdi
leaq 0x369dc(%rip), %rsi     # 0x66000
callq 0xc280
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2f660
movq 0x4d9bd(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xe8(%rax), %rdx
leaq 0x398af(%rip), %rsi     # 0x68eff
movb $0x0, %al
callq 0xc8f0
movl $0x3, -0x4(%rbp)
jmp 0x2f697
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq 0x398f1(%rip), %rdx     # 0x68f60
callq 0x30060
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc460
cmpl $0x0, -0x1c(%rbp)
je 0x2f68e
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2f697
jmp 0x2f690
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: add_vba_project_signature
STATIC lxw_error
_add_vba_project_signature(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_error err;
    FILE *image_stream;

    if (!workbook->vba_project_signature)
        return LXW_NO_ERROR;

    /* Check that the image file exists and can be opened. */
    image_stream = lxw_fopen(workbook->vba_project_signature, "rb");
    if (!image_stream) {
        LXW_WARN_FORMAT1("Error adding vbaProjectSignature.bin to xlsx file: "
                         "file doesn't exist or can't be opened: %s.",
                         workbook->vba_project_signature);
        return LXW_ERROR_CREATING_TMPFILE;
    }

    err = _add_file_to_zip(self, image_stream, "xl/vbaProjectSignature.bin");
    fclose(image_stream);
    RETURN_ON_ERROR(err);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
jne 0x2f6d2
movl $0x0, -0x4(%rbp)
jmp 0x2f757
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rdi
leaq 0x3691c(%rip), %rsi     # 0x66000
callq 0xc280
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2f720
movq 0x4d8fd(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rdx
leaq 0x39862(%rip), %rsi     # 0x68f72
movb $0x0, %al
callq 0xc8f0
movl $0x3, -0x4(%rbp)
jmp 0x2f757
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq 0x39440(%rip), %rdx     # 0x68b6f
callq 0x30060
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc460
cmpl $0x0, -0x1c(%rbp)
je 0x2f74e
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2f757
jmp 0x2f750
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_vba_project_rels_file
STATIC lxw_error
_write_vba_project_rels_file(lxw_packager *self)
{
    lxw_relationships *rels;
    lxw_workbook *workbook = self->workbook;
    lxw_error err = LXW_NO_ERROR;
    char *buffer = NULL;
    size_t buffer_size = 0;

    if (!workbook->vba_project_signature)
        return LXW_NO_ERROR;

    rels = lxw_relationships_new();
    if (!rels) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    rels->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!rels->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    lxw_add_ms_package_relationship(rels, "/vbaProjectSignature",
                                    "vbaProjectSignature.bin");

    lxw_relationships_assemble_xml_file(rels);

    err = _add_to_zip(self, rels->file, &buffer, &buffer_size,
                      "xl/_rels/vbaProject.bin.rels");

    fclose(rels->file);
    free(buffer);

mem_error:
    lxw_free_relationships(rels);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
jne 0x2f7a9
movl $0x0, -0x4(%rbp)
jmp 0x2f85d
callq 0xcfb0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2f7c5
movl $0x1, -0x24(%rbp)
jmp 0x2f84e
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2f7f7
movl $0x3, -0x24(%rbp)
jmp 0x2f84e
movq -0x18(%rbp), %rdi
leaq 0x397da(%rip), %rsi     # 0x68fdc
leaq 0x39369(%rip), %rdx     # 0x68b72
callq 0xc4b0
movq -0x18(%rbp), %rdi
callq 0xc340
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
leaq 0x397c0(%rip), %r8      # 0x68ff1
callq 0x2fd50
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x30(%rbp), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rdi
callq 0xc2c0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_core_file
STATIC lxw_error
_write_core_file(lxw_packager *self)
{
    lxw_error err = LXW_NO_ERROR;
    lxw_core *core = lxw_core_new();
    char *buffer = NULL;
    size_t buffer_size = 0;

    if (!core) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    core->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!core->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    core->properties = self->workbook->properties;

    lxw_core_assemble_xml_file(core);

    err = _add_to_zip(self, core->file, &buffer, &buffer_size,
                      "docProps/core.xml");

    fclose(core->file);
    free(buffer);

mem_error:
    lxw_core_free(core);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
callq 0xc9c0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2f8af
movl $0x1, -0xc(%rbp)
jmp 0x2f935
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2f8e1
movl $0x3, -0xc(%rbp)
jmp 0x2f935
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x70(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0xce20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq 0x3847e(%rip), %r8      # 0x67d96
callq 0x2fd50
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x20(%rbp), %rdi
callq 0xc0d0
movq -0x18(%rbp), %rdi
callq 0xd150
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_metadata_file
STATIC lxw_error
_write_metadata_file(lxw_packager *self)
{
    lxw_error err = LXW_NO_ERROR;
    lxw_metadata *metadata;
    char *buffer = NULL;
    size_t buffer_size = 0;

    if (!self->workbook->has_metadata)
        return LXW_NO_ERROR;

    metadata = lxw_metadata_new();

    if (!metadata) {
        err = LXW_ERROR_MEMORY_MALLOC_FAILED;
        goto mem_error;
    }

    metadata->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!metadata->file) {
        err = LXW_ERROR_CREATING_TMPFILE;
        goto mem_error;
    }

    lxw_metadata_assemble_xml_file(metadata);

    err = _add_to_zip(self, metadata->file, &buffer, &buffer_size,
                      "xl/metadata.xml");

    fclose(metadata->file);
    free(buffer);

mem_error:
    lxw_metadata_free(metadata);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0xd5(%rax)
jne 0x2f990
movl $0x0, -0x4(%rbp)
jmp 0x2fa2a
callq 0xc530
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2f9a9
movl $0x1, -0x14(%rbp)
jmp 0x2fa1b
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2f9db
movl $0x3, -0x14(%rbp)
jmp 0x2fa1b
movq -0x20(%rbp), %rdi
callq 0xc480
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq 0x3877b(%rip), %r8      # 0x68179
callq 0x2fd50
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x28(%rbp), %rdi
callq 0xc0d0
movq -0x20(%rbp), %rdi
callq 0xc290
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: add_to_zip
STATIC lxw_error
_add_to_zip(lxw_packager *self, FILE * file, char **buffer,
            size_t *buffer_size, const char *filename)
{
    /* Flush to ensure buffer is updated when using a memory-backed file. */
    fflush(file);
    return *buffer ?
        _add_buffer_to_zip(self, *buffer, *buffer_size, filename) :
        _add_file_to_zip(self, file, filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcb00
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2fd9f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rcx
callq 0x2fdc0
movl %eax, -0x2c(%rbp)
jmp 0x2fdb3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x30060
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_vml_drawing_rels_file
STATIC lxw_error
_write_vml_drawing_rels_file(lxw_packager *self, lxw_worksheet *worksheet,
                             uint32_t index)
{
    lxw_relationships *rels;
    char *buffer = NULL;
    size_t buffer_size = 0;
    lxw_rel_tuple *rel;
    char sheetname[LXW_FILENAME_LENGTH] = { 0 };
    lxw_error err = LXW_NO_ERROR;

    rels = lxw_relationships_new();

    rels->file = lxw_get_filehandle(&buffer, &buffer_size, self->tmpdir);
    if (!rels->file) {
        lxw_free_relationships(rels);
        return LXW_ERROR_CREATING_TMPFILE;
    }

    STAILQ_FOREACH(rel, worksheet->vml_drawing_links, list_pointers) {
        lxw_add_worksheet_relationship(rels, rel->type, rel->target,
                                       rel->target_mode);

    }

    lxw_snprintf(sheetname, LXW_FILENAME_LENGTH,
                 "xl/drawings/_rels/vmlDrawing%d.vml.rels", index);

    lxw_relationships_assemble_xml_file(rels);

    err = _add_to_zip(self, rels->file, &buffer, &buffer_size, sheetname);

    fclose(rels->file);
    free(buffer);
    lxw_free_relationships(rels);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc6a0
movl $0x0, -0xc4(%rbp)
callq 0xcfb0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdx
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xceb0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3049a
movq -0x28(%rbp), %rdi
callq 0xc2c0
movl $0x3, -0x4(%rbp)
jmp 0x30553
movq -0x18(%rbp), %rax
movq 0x230(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x304e1
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0xcaa0
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x304ac
leaq -0xc0(%rbp), %rdi
movl -0x1c(%rbp), %ecx
movl $0x80, %esi
leaq 0x38904(%rip), %rdx     # 0x68dfb
movb $0x0, %al
callq 0xc5d0
movq -0x28(%rbp), %rdi
callq 0xc340
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq -0xc0(%rbp), %r8
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x2fd50
movl %eax, -0xc4(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0xc460
movq -0x30(%rbp), %rdi
callq 0xc0d0
movq -0x28(%rbp), %rdi
callq 0xc2c0
movl -0xc4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/relationships.c
// Function: lxw_relationships_new
lxw_relationships *
lxw_relationships_new(void)
{
    lxw_relationships *rels = calloc(1, sizeof(lxw_relationships));
    GOTO_LABEL_ON_MEM_ERROR(rels, mem_error);

    rels->relationships = calloc(1, sizeof(struct lxw_rel_tuples));
    GOTO_LABEL_ON_MEM_ERROR(rels->relationships, mem_error);
    STAILQ_INIT(rels->relationships);

    return rels;

mem_error:
    lxw_free_relationships(rels);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x18, %esi
callq 0xc870
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x305a8
movq 0x4ca6f(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x35b3d(%rip), %rsi     # 0x660d0
leaq 0x38a93(%rip), %rdx     # 0x6902d
movl $0x20, %ecx
movb $0x0, %al
callq 0xc8f0
jmp 0x30626
jmp 0x305aa
movl $0x1, %edi
movl $0x10, %esi
callq 0xc870
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x305f5
movq 0x4ca22(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x35af0(%rip), %rsi     # 0x660d0
leaq 0x38a46(%rip), %rdx     # 0x6902d
movl $0x23, %ecx
movb $0x0, %al
callq 0xc8f0
jmp 0x30626
jmp 0x305f7
jmp 0x305f9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x30637
movq -0x10(%rbp), %rdi
callq 0xc2c0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)