LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: lxw_drawing_new
lxw_drawing *
lxw_drawing_new(void)
{
    lxw_drawing *drawing = calloc(1, sizeof(lxw_drawing));
    GOTO_LABEL_ON_MEM_ERROR(drawing, mem_error);

    drawing->drawing_objects = calloc(1, sizeof(struct lxw_drawing_objects));
    GOTO_LABEL_ON_MEM_ERROR(drawing->drawing_objects, mem_error);

    STAILQ_INIT(drawing->drawing_objects);

    return drawing;

mem_error:
    lxw_drawing_free(drawing);
    return NULL;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0xc7f0
testq %rax, %rax
je 0x1d8ad
movq %rax, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1d8b4
movq %rax, 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
callq 0xdaae
jmp 0x1d8bc
movq %rbx, %rdi
callq 0xda7f
xorl %ebx, %ebx
jmp 0x1d8a8
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: lxw_drawing_free
void
lxw_drawing_free(lxw_drawing *drawing)
{
    lxw_drawing_object *drawing_object;

    if (!drawing)
        return;

    if (drawing->drawing_objects) {
        while (!STAILQ_EMPTY(drawing->drawing_objects)) {
            drawing_object = STAILQ_FIRST(drawing->drawing_objects);
            STAILQ_REMOVE_HEAD(drawing->drawing_objects, list_pointers);
            lxw_free_drawing_object(drawing_object);
        }

        free(drawing->drawing_objects);
    }

    free(drawing);
}

// Assembly:
testq %rdi, %rdi
je 0x1d906
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x1d8f0
jmp 0x1d8fd
movq 0x78(%rax), %rcx
movq %rcx, (%rdi)
testq %rcx, %rcx
jne 0x1d8e4
movq %rdi, 0x8(%rdi)
movq %rax, %rdi
callq 0xccc0
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
jne 0x1d8d4
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: lxw_free_drawing_object
void
lxw_free_drawing_object(lxw_drawing_object *drawing_object)
{
    if (!drawing_object)
        return;

    free(drawing_object->description);
    free(drawing_object->tip);

    free(drawing_object);
}

// Assembly:
testq %rdi, %rdi
je 0x1d92b
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0xc0c0
movq 0x68(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: drawing_write_coords
STATIC void
_drawing_write_coords(lxw_drawing *self, lxw_drawing_coords *coords)
{
    char data[LXW_UINT32_T_LENGTH];

    lxw_snprintf(data, LXW_UINT32_T_LENGTH, "%u", coords->col);
    _drawing_write_col(self, data);

    lxw_snprintf(data, LXW_UINT32_T_LENGTH, "%u",
                 (uint32_t) coords->col_offset);
    _drawing_write_col_off(self, data);

    lxw_snprintf(data, LXW_UINT32_T_LENGTH, "%u", coords->row);
    _drawing_write_row(self, data);

    lxw_snprintf(data, LXW_UINT32_T_LENGTH, "%u",
                 (uint32_t) coords->row_offset);
    _drawing_write_row_off(self, data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movl (%rsi), %ecx
leaq 0x24098(%rip), %r15     # 0x42707
leaq 0xd(%rsp), %r14
movl $0xb, %esi
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xc570
movq (%rbx), %rdi
leaq 0x2407a(%rip), %rsi     # 0x4270a
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xcb30
cvttsd2si 0x8(%r12), %rcx
movl $0xb, %esi
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xc570
movq (%rbx), %rdi
leaq 0x24055(%rip), %rsi     # 0x42712
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xcb30
movl 0x4(%r12), %ecx
movl $0xb, %esi
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xc570
movq (%rbx), %rdi
leaq 0x24035(%rip), %rsi     # 0x4271d
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xcb30
cvttsd2si 0x10(%r12), %rcx
movl $0xb, %esi
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xc570
movq (%rbx), %rdi
leaq 0x24010(%rip), %rsi     # 0x42725
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xcb30
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: drawing_write_uri_ext
STATIC void
_drawing_write_uri_ext(lxw_drawing *self, char *uri)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("uri", uri);

    lxw_xml_start_tag(self->file, "a:ext", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsp, %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x23c10(%rip), %rdi     # 0x427f6
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x23bbb(%rip), %rsi     # 0x427c9
movq %rbx, %rdx
callq 0xc350
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1ec3e
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x1ec33
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x1ec19
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: drawing_write_pos
STATIC void
_drawing_write_pos(lxw_drawing *self, int32_t x, int32_t y)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_INT("x", x);
    LXW_PUSH_ATTRIBUTES_INT("y", y);

    lxw_xml_empty_tag(self->file, "xdr:pos", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsp, %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x2aabc(%rip), %rdi     # 0x49729
xorl %esi, %esi
callq 0xc180
movl $0x1040, %r12d          # imm = 0x1040
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movslq %ebp, %rsi
leaq 0x238c0(%rip), %rdi     # 0x4255a
callq 0xc180
addq %rax, %r12
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r12, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x23cb2(%rip), %rsi     # 0x42970
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1ecee
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x1ece3
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x1ecc9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/drawing.c
// Function: drawing_write_ext
STATIC void
_drawing_write_ext(lxw_drawing *self, uint32_t cx, uint32_t cy)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_INT("cx", cx);
    LXW_PUSH_ATTRIBUTES_INT("cy", cy);

    lxw_xml_empty_tag(self->file, "xdr:ext", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsp, %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
movl %esi, %esi
leaq 0x23b72(%rip), %rdi     # 0x42894
callq 0xc180
movl $0x1040, %r12d          # imm = 0x1040
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movl %ebp, %esi
leaq 0x23b4b(%rip), %rdi     # 0x42897
callq 0xc180
addq %rax, %r12
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r12, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x23c08(%rip), %rsi     # 0x42978
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1eda0
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x1ed95
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x1ed7b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/format.c
// Function: lxw_format_get_font_key
lxw_font *
lxw_format_get_font_key(lxw_format *self)
{
    lxw_font *key = calloc(1, sizeof(lxw_font));
    GOTO_LABEL_ON_MEM_ERROR(key, mem_error);

    LXW_FORMAT_FIELD_COPY(key->font_name, self->font_name);
    key->font_size = self->font_size;
    key->bold = self->bold;
    key->italic = self->italic;
    key->underline = self->underline;
    key->theme = self->theme;
    key->font_color = self->font_color;
    key->font_strikeout = self->font_strikeout;
    key->font_outline = self->font_outline;
    key->font_shadow = self->font_shadow;
    key->font_script = self->font_script;
    key->font_family = self->font_family;
    key->font_charset = self->font_charset;
    key->font_condense = self->font_condense;
    key->font_extend = self->font_extend;

    return key;

mem_error:
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x98, %esi
callq 0xc7f0
movq %rax, %rbx
testq %rax, %rax
je 0x1eea2
leaq 0xb4(%r14), %rsi
movl $0x7f, %edx
movq %rbx, %rdi
callq 0xc170
movsd 0x1c0(%r14), %xmm0
movsd %xmm0, 0x80(%rbx)
movb 0x1c8(%r14), %al
movb %al, 0x88(%rbx)
movb 0x1c9(%r14), %al
movb %al, 0x89(%rbx)
movb 0x1d0(%r14), %al
movb %al, 0x8a(%rbx)
movb 0x1d9(%r14), %al
movb %al, 0x8b(%rbx)
movl 0x1cc(%r14), %eax
movl %eax, 0x94(%rbx)
movq 0x1d1(%r14), %rax
movq %rax, 0x8c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xdaf2
jmp 0x1ee97
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/format.c
// Function: lxw_format_get_border_key
lxw_border *
lxw_format_get_border_key(lxw_format *self)
{
    lxw_border *key = calloc(1, sizeof(lxw_border));
    GOTO_LABEL_ON_MEM_ERROR(key, mem_error);

    key->bottom = self->bottom;
    key->left = self->left;
    key->right = self->right;
    key->top = self->top;
    key->diag_border = self->diag_border;
    key->diag_type = self->diag_type;
    key->bottom_color = self->bottom_color;
    key->left_color = self->left_color;
    key->right_color = self->right_color;
    key->top_color = self->top_color;
    key->diag_color = self->diag_color;

    return key;

mem_error:
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x1c, %esi
callq 0xc7f0
movq %rax, %rbx
testq %rax, %rax
je 0x1ef05
movb 0x210(%r14), %al
movb %al, 0x4(%rbx)
movb 0x211(%r14), %al
movb %al, 0x5(%rbx)
movl 0x20c(%r14), %eax
movl %eax, (%rbx)
movl 0x224(%r14), %eax
movl %eax, 0x18(%rbx)
movups 0x214(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xdb16
jmp 0x1eefa
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/format.c
// Function: lxw_format_get_fill_key
lxw_fill *
lxw_format_get_fill_key(lxw_format *self)
{
    lxw_fill *key = calloc(1, sizeof(lxw_fill));
    GOTO_LABEL_ON_MEM_ERROR(key, mem_error);

    key->fg_color = self->fg_color;
    key->bg_color = self->bg_color;
    key->pattern = self->pattern;

    return key;

mem_error:
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0xc, %esi
callq 0xc7f0
movq %rax, %rbx
testq %rax, %rax
je 0x1ef49
movq 0x1e4(%r14), %rax
movq %rax, (%rbx)
movb 0x1f4(%r14), %al
movb %al, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xdb3a
jmp 0x1ef3e
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/format.c
// Function: get_format_key
STATIC lxw_format *
_get_format_key(lxw_format *self)
{
    lxw_format *key = calloc(1, sizeof(lxw_format));
    GOTO_LABEL_ON_MEM_ERROR(key, mem_error);

    memcpy(key, self, sizeof(lxw_format));

    /* Set pointer members to NULL since they aren't part of the comparison. */
    key->xf_format_indices = NULL;
    key->dxf_format_indices = NULL;
    key->num_xf_formats = NULL;
    key->num_dxf_formats = NULL;
    key->list_pointers.stqe_next = NULL;

    return key;

mem_error:
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x238, %esi            # imm = 0x238
callq 0xc7f0
movq %rax, %rbx
testq %rax, %rax
je 0x1f018
movl $0x230, %edx            # imm = 0x230
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc900
movq $0x0, 0x230(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xdb5e
jmp 0x1f00d
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/format.c
// Function: format_set_rotation
void
format_set_rotation(lxw_format *self, int16_t angle)
{
    /* Convert user angle to Excel angle. */
    if (angle == 270) {
        self->rotation = 255;
    }
    else if (angle >= -90 && angle <= 90) {
        if (angle < 0)
            angle = -angle + 90;

        self->rotation = angle;
    }
    else {
        LXW_WARN("Rotation rotation outside range: -90 <= angle <= 90.");
        self->rotation = 0;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movw $0xff, %ax
cmpl $0x10e, %esi            # imm = 0x10E
je 0x1f1b9
leal 0x5a(%rsi), %eax
movzwl %ax, %eax
cmpl $0xb4, %eax
ja 0x1f1c2
movl $0x5a, %eax
subl %esi, %eax
testw %si, %si
cmovnsl %esi, %eax
movw %ax, 0x1e2(%rbx)
popq %rbx
retq
callq 0xdb82
xorl %eax, %eax
jmp 0x1f1b9
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/hash_table.c
// Function: lxw_hash_key_exists
lxw_hash_element *
lxw_hash_key_exists(lxw_hash_table *lxw_hash, void *key, size_t key_len)
{
    size_t hash_key = _generate_hash_key(key, key_len, lxw_hash->num_buckets);
    struct lxw_hash_bucket_list *list;
    lxw_hash_element *element;

    if (!lxw_hash->buckets[hash_key]) {
        /* The key isn't in the LXW_HASH hash table. */
        return NULL;
    }
    else {
        /* The key is already in the table or there is a hash collision. */
        list = lxw_hash->buckets[hash_key];

        /* Iterate over the keys in the bucket's linked list. */
        SLIST_FOREACH(element, list, lxw_hash_list_pointers) {
            if (memcmp(element->key, key, key_len) == 0) {
                /* The key already exists in the table. */
                return element;
            }
        }

        /* Key doesn't exist in the list so this is a hash collision. */
        return NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
movl (%rdi), %ecx
testq %rdx, %rdx
je 0x1f374
xorl %edx, %edx
imulq $0x1000193, %rax, %rsi  # imm = 0x1000193
movzbl (%r14,%rdx), %eax
xorq %rsi, %rax
incq %rdx
cmpq %rdx, %rbx
jne 0x1f35d
xorl %r15d, %r15d
xorl %edx, %edx
divq %rcx
movq 0x18(%rdi), %rax
movq (%rax,%rdx,8), %rax
testq %rax, %rax
je 0x1f3ac
movq (%rax), %r15
testq %r15, %r15
je 0x1f3a9
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcaf0
testl %eax, %eax
je 0x1f3ac
movq 0x18(%r15), %r15
jmp 0x1f38c
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/hash_table.c
// Function: lxw_hash_new
lxw_hash_table *
lxw_hash_new(uint32_t num_buckets, uint8_t free_key, uint8_t free_value)
{
    /* Create the new hash table. */
    lxw_hash_table *lxw_hash = calloc(1, sizeof(lxw_hash_table));
    RETURN_ON_MEM_ERROR(lxw_hash, NULL);

    lxw_hash->free_key = free_key;
    lxw_hash->free_value = free_value;

    /* Add the lxw_hash element buckets. */
    lxw_hash->buckets =
        calloc(num_buckets, sizeof(struct lxw_hash_bucket_list *));
    GOTO_LABEL_ON_MEM_ERROR(lxw_hash->buckets, mem_error);

    /* Add a list for tracking the insertion order. */
    lxw_hash->order_list = calloc(1, sizeof(struct lxw_hash_order_list));
    GOTO_LABEL_ON_MEM_ERROR(lxw_hash->order_list, mem_error);

    /* Initialize the order list. */
    STAILQ_INIT(lxw_hash->order_list);

    /* Store the number of buckets to calculate the load factor. */
    lxw_hash->num_buckets = num_buckets;

    return lxw_hash;

mem_error:
    lxw_hash_free(lxw_hash);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %ebp
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x1f5b4
movq %rax, %rbx
movb %r15b, 0xc(%rax)
movb %r14b, 0xd(%rax)
movl %ebp, %edi
movl $0x8, %esi
callq 0xc7f0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x1f5bb
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1f5c2
movq %rax, 0x8(%rax)
movl %ebp, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xdc1e
jmp 0x1f5cf
movl $0xab, %edi
jmp 0x1f5c7
movl $0xaf, %edi
movq %rbx, %rsi
callq 0xdbf0
xorl %ebx, %ebx
jmp 0x1f5a6
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/hash_table.c
// Function: lxw_hash_free
void
lxw_hash_free(lxw_hash_table *lxw_hash)
{
    size_t i;
    lxw_hash_element *element;
    lxw_hash_element *element_temp;

    if (!lxw_hash)
        return;

    /* Free the lxw_hash_elements and data using the ordered linked list. */
    if (lxw_hash->order_list) {
        STAILQ_FOREACH_SAFE(element, lxw_hash->order_list,
                            lxw_hash_order_pointers, element_temp) {
            if (lxw_hash->free_key)
                free(element->key);
            if (lxw_hash->free_value)
                free(element->value);
            free(element);
        }
    }

    /* Free the buckets from the hash table. */
    for (i = 0; i < lxw_hash->num_buckets; i++) {
        free(lxw_hash->buckets[i]);
    }

    free(lxw_hash->order_list);
    free(lxw_hash->buckets);
    free(lxw_hash);
}

// Assembly:
testq %rdi, %rdi
je 0x1f664
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1f626
movq (%rax), %r14
testq %r14, %r14
je 0x1f626
movq 0x10(%r14), %r15
cmpb $0x0, 0xc(%rbx)
je 0x1f607
movq (%r14), %rdi
callq 0xc0c0
cmpb $0x0, 0xd(%rbx)
je 0x1f616
movq 0x8(%r14), %rdi
callq 0xc0c0
movq %r14, %rdi
callq 0xc0c0
movq %r15, %r14
testq %r15, %r15
jne 0x1f5f5
cmpl $0x0, (%rbx)
je 0x1f645
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0xc0c0
incq %r14
movl (%rbx), %eax
cmpq %rax, %r14
jb 0x1f62e
movq 0x10(%rbx), %rdi
callq 0xc0c0
movq 0x18(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc0c0
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xca60
testl %eax, %eax
je 0x1ff3a
movq %rbx, %rdi
callq 0xc420
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x0, 0x68(%r14)
je 0x1ff4e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc420
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xcb40
testl %eax, %eax
jne 0x1ff27
movq %rbx, %rdi
callq 0xc880
cmpq $-0x1, %rax
je 0x1ff27
movq %rax, %r15
movq %rax, %rdi
callq 0xca50
movq %rax, 0x68(%r14)
testq %rax, %rax
je 0x1ffaa
movq %rbx, %rdi
callq 0xc500
movq 0x68(%r14), %rdi
movl $0x1, %edx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xc2f0
testq %rax, %rax
je 0x1ff27
movq %r15, 0x18(%r14)
jmp 0x1ff41
callq 0xdc85
jmp 0x1ff27
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x1ffd8
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0xc0c0
movq 0x58(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
xorl %r13d, %r13d
movq %r13, 0x8(%rsp)
movq %r13, 0x18(%rsp)
movq 0x8(%rax), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x20b4e
movq %rdi, %rbx
movl $0x1, %ecx
leaq 0x20(%rsp), %r13
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %rbp
movq %rdi, 0x10(%rsp)
cmpb $0x0, (%r12)
je 0x20b35
movq 0x8(%r12), %r14
movl $0x80, %esi
movq %r13, %rdi
leaq 0x222cf(%rip), %rdx     # 0x42d95
movl %ecx, 0x4(%rsp)
xorl %eax, %eax
callq 0xc570
movq 0x70(%rbx), %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xce00
movq %rax, (%r14)
testq %rax, %rax
je 0x20b48
movq %r14, %rdi
callq 0xcba0
movq (%r14), %rsi
movq %rbp, %rcx
movq %rbx, %rdi
movq %r15, %rbx
movq %r15, %rdx
movq %r13, %r15
movq %r13, %r8
callq 0x224f6
movl %eax, %r13d
movq (%r14), %rdi
callq 0xc420
movq 0x8(%rsp), %rdi
callq 0xc0c0
testl %r13d, %r13d
jne 0x20b4e
movl 0x4(%rsp), %ecx
incl %ecx
movq %r15, %r13
movq %rbx, %r15
movq 0x10(%rsp), %rbx
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x20aa7
xorl %r13d, %r13d
jmp 0x20b4e
movl $0x3, %r13d
movl %r13d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x8(%rdi), %rbx
xorl %eax, %eax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq 0x70(%r14), %rdx
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x20bd2
movq %rbx, %rdi
callq 0xc220
movq (%rbx), %rsi
leaq 0x22111(%rip), %r8      # 0x42cba
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x224f6
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xc420
movq (%r15), %rdi
callq 0xc0c0
jmp 0x20bd7
movl $0x3, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
xorl %r12d, %r12d
movq %r12, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq 0x50(%rax), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x20cf8
movq %rdi, %rbx
movl $0x1, %ecx
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x18(%rsp), %r15
movl $0x80, %esi
movq %r12, %rdi
leaq 0x2215f(%rip), %rdx     # 0x42dcc
movl %ecx, 0xc(%rsp)
xorl %eax, %eax
callq 0xc570
movq 0x70(%rbx), %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0xce00
movq %rax, (%r14)
testq %rax, %rax
je 0x20cf2
movq %r14, %rdi
callq 0xc860
movq (%r14), %rsi
movq %rbx, %rbp
movq %rbx, %rdi
movq %r15, %rcx
movq %r13, %rbx
movq %r13, %rdx
movq %r12, %r13
movq %r12, %r8
callq 0x224f6
movl %eax, %r12d
movq (%r14), %rdi
callq 0xc420
movq 0x10(%rsp), %rdi
callq 0xc0c0
testl %r12d, %r12d
jne 0x20cf8
movl 0xc(%rsp), %ecx
incl %ecx
movq 0x170(%r14), %r14
testq %r14, %r14
movq %r13, %r12
movq %rbx, %r13
movq %rbp, %rbx
jne 0x20c5e
xorl %r12d, %r12d
jmp 0x20cf8
movl $0x3, %r12d
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
xorl %r13d, %r13d
movq %r13, 0x8(%rsp)
movq %r13, 0x18(%rsp)
movq 0x8(%rax), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x20e42
movq %rdi, %rbx
movl $0x1, %ecx
leaq 0x20(%rsp), %r13
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %rbp
movq %rdi, 0x10(%rsp)
cmpb $0x0, (%r12)
movq %r12, %rax
je 0x20d9b
movq 0x8(%r12), %rax
movq 0x8(%rax), %rax
movq 0x290(%rax), %r14
testq %r14, %r14
je 0x20e29
movl $0x80, %esi
movq %r13, %rdi
leaq 0x22029(%rip), %rdx     # 0x42de3
movl %ecx, 0x4(%rsp)
xorl %eax, %eax
callq 0xc570
movq 0x70(%rbx), %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xce00
movq %rax, (%r14)
testq %rax, %rax
je 0x20e3c
movq %r14, %rdi
callq 0xc330
movq (%r14), %rsi
movq %rbp, %rcx
movq %rbx, %rdi
movq %r15, %rbx
movq %r15, %rdx
movq %r13, %r15
movq %r13, %r8
callq 0x224f6
movl %eax, %r13d
movq (%r14), %rdi
callq 0xc420
movq 0x8(%rsp), %rdi
callq 0xc0c0
testl %r13d, %r13d
jne 0x20e42
movl 0x4(%rsp), %ecx
incl %ecx
movq %r15, %r13
movq %rbx, %r15
movq 0x10(%rsp), %rbx
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x20d8c
xorl %r13d, %r13d
jmp 0x20e42
movl $0x3, %r13d
movl %r13d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/packager.c
// Function: write_comment_files
STATIC lxw_error
_write_comment_files(lxw_packager *self)
{
    lxw_workbook *workbook = self->workbook;
    lxw_sheet *sheet;
    lxw_worksheet *worksheet;
    lxw_comment *comment;
    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)
            continue;
        else
            worksheet = sheet->u.worksheet;

        if (!worksheet->has_comments)
            continue;

        comment = lxw_comment_new();
        if (!comment)
            return LXW_ERROR_MEMORY_MALLOC_FAILED;

        lxw_snprintf(filename, LXW_FILENAME_LENGTH,
                     "xl/comments%d.xml", index++);

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

        comment->comment_objs = worksheet->comment_objs;
        comment->comment_author = worksheet->comment_author;

        lxw_comment_assemble_xml_file(comment);

        err = _add_to_zip(self, comment->file, &buffer, &buffer_size,
                          filename);

        fclose(comment->file);
        free(buffer);
        lxw_comment_free(comment);

        RETURN_ON_ERROR(err);
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
xorl %r15d, %r15d
movq %r15, (%rsp)
movq %r15, 0x10(%rsp)
movq 0x8(%rax), %rax
movq (%rax), %r12
testq %r12, %r12
je 0x21332
movq %rdi, 0x18(%rsp)
movl $0x1, %ebp
leaq 0x20(%rsp), %rbx
cmpb $0x0, (%r12)
jne 0x21321
movq 0x8(%r12), %r15
cmpb $0x0, 0x2a1(%r15)
je 0x21321
callq 0xce60
testq %rax, %rax
je 0x21347
movq %rax, %r14
movl $0x80, %esi
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x21b7e(%rip), %rdx     # 0x42e15
movl %ebp, 0xc(%rsp)
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc570
movq 0x18(%rsp), %rbp
movq 0x70(%rbp), %rdx
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0xce00
movq %rax, (%r14)
testq %rax, %rax
je 0x2134f
movq 0x80(%r15), %rax
movq %rax, 0x8(%r14)
movq 0x2c8(%r15), %rax
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xc2a0
movq (%r14), %rsi
movq %rbp, %rdi
movq %rsp, %rdx
leaq 0x10(%rsp), %rcx
movq %r13, %r8
callq 0x224f6
movl %eax, %r15d
movq (%r14), %rdi
callq 0xc420
movq (%rsp), %rdi
callq 0xc0c0
movq %r14, %rdi
callq 0xc2c0
testl %r15d, %r15d
jne 0x21332
movl 0xc(%rsp), %ebp
incl %ebp
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x21256
xorl %r15d, %r15d
movl %r15d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
jmp 0x21332
movq %r14, %rdi
callq 0xc2c0
movl $0x3, %r15d
jmp 0x21332
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
movq 0x68(%rax), %rbx
xorl %r15d, %r15d
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x2156c
movq %rdi, %r14
movq 0x70(%rdi), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x21566
movq %rbx, %rdi
callq 0xc280
movq (%rbx), %rsi
leaq 0x20cd5(%rip), %r8      # 0x42210
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0x224f6
movl %eax, %r15d
movq (%rbx), %rdi
callq 0xc420
movq (%r12), %rdi
callq 0xc0c0
jmp 0x2156c
movl $0x3, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r15d, %r15d
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq 0x8(%rdi), %rax
movq 0x78(%rax), %rax
cmpq %r15, (%rax)
je 0x2162e
movq %rdi, %r14
callq 0xc390
movq %rax, %rbx
testq %rax, %rax
je 0x21618
movq 0x70(%r14), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x21620
movq 0x8(%r14), %rax
movq 0x78(%rax), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0xc560
movq (%rbx), %rsi
leaq 0x20ce3(%rip), %r8      # 0x422d0
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0x224f6
movl %eax, %r15d
movq (%rbx), %rdi
callq 0xc420
movq (%r12), %rdi
callq 0xc0c0
jmp 0x21626
movl $0x1, %r15d
jmp 0x21626
movl $0x3, %r15d
movq %rbx, %rdi
callq 0xcf40
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0xc1e0
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x216b9
movq 0x70(%r14), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x216c0
movq %rbx, %rdi
callq 0xce50
movq (%rbx), %rsi
leaq 0x2095a(%rip), %r8      # 0x41fea
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x224f6
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xc420
movq (%r15), %rdi
callq 0xc0c0
jmp 0x216c5
movl $0x1, %ebp
jmp 0x216c5
movl $0x3, %ebp
movq %rbx, %rdi
callq 0xcf20
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0xe8(%r14), %rdi
testq %rdi, %rdi
je 0x22003
leaq 0x1e02a(%rip), %rsi     # 0x40000
callq 0xc250
testq %rax, %rax
je 0x2200b
movq %rax, %r15
leaq 0x21152(%rip), %rdx     # 0x4313c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x226e7
movl %eax, %ebx
movq %r15, %rdi
callq 0xc420
movl %ebx, %eax
jmp 0x22005
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
addq $0xe8, %r14
movq %r14, %rdi
callq 0xdcce
movl $0x3, %eax
jmp 0x22005
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0xf0(%r14), %rdi
testq %rdi, %rdi
je 0x2206d
leaq 0x1dfc0(%rip), %rsi     # 0x40000
callq 0xc250
testq %rax, %rax
je 0x22075
movq %rax, %r15
leaq 0x20cf7(%rip), %rdx     # 0x42d4b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x226e7
movl %eax, %ebx
movq %r15, %rdi
callq 0xc420
movl %ebx, %eax
jmp 0x2206f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
addq $0xf0, %r14
movq %r14, %rdi
callq 0xdcec
movl $0x3, %eax
jmp 0x2206f
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
xorl %r15d, %r15d
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
cmpq %r15, 0xf0(%rax)
je 0x22148
movq %rdi, %r14
callq 0xcf00
movq %rax, %rbx
testq %rax, %rax
je 0x22132
movq 0x70(%r14), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x2213a
leaq 0x210d2(%rip), %rsi     # 0x431b8
leaq 0x20c61(%rip), %rdx     # 0x42d4e
movq %rbx, %rdi
callq 0xc450
movq %rbx, %rdi
callq 0xc310
movq (%rbx), %rsi
leaq 0x210c6(%rip), %r8      # 0x431cd
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0x224f6
movl %eax, %r15d
movq (%rbx), %rdi
callq 0xc420
movq (%r12), %rdi
callq 0xc0c0
jmp 0x22140
movl $0x1, %r15d
jmp 0x22140
movl $0x3, %r15d
movq %rbx, %rdi
callq 0xc290
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0xc940
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x221df
movq 0x70(%r14), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x221e6
movq 0x8(%r14), %rax
movq 0x70(%rax), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0xcd70
movq (%rbx), %rsi
leaq 0x1fd90(%rip), %r8      # 0x41f46
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x224f6
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xc420
movq (%r15), %rdi
callq 0xc0c0
jmp 0x221eb
movl $0x1, %ebp
jmp 0x221eb
movl $0x3, %ebp
movq %rbx, %rdi
callq 0xd0a0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r15d, %r15d
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq 0x8(%rdi), %rax
cmpb $0x0, 0xd5(%rax)
je 0x222a3
movq %rdi, %r14
callq 0xc4d0
movq %rax, %rbx
testq %rax, %rax
je 0x2228d
movq 0x70(%r14), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce00
movq %rax, (%rbx)
testq %rax, %rax
je 0x22295
movq %rbx, %rdi
callq 0xc440
movq (%rbx), %rsi
leaq 0x200c7(%rip), %r8      # 0x42329
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0x224f6
movl %eax, %r15d
movq (%rbx), %rdi
callq 0xc420
movq (%r12), %rdi
callq 0xc0c0
jmp 0x2229b
movl $0x1, %r15d
jmp 0x2229b
movl $0x3, %r15d
movq %rbx, %rdi
callq 0xc260
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0xca60
movq (%r13), %rsi
testq %rsi, %rsi
je 0x22533
movq (%r14), %rdx
movq %r15, %rdi
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2254a
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x226e7
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0xc7f0
testq %rax, %rax
je 0x2298d
movq %rax, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x22994
movq %rax, 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
callq 0xdd39
jmp 0x2299c
movq %rbx, %rdi
callq 0xdd0a
xorl %ebx, %ebx
jmp 0x22988