LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/relationships.c
// Function: lxw_free_relationships
void
lxw_free_relationships(lxw_relationships *rels)
{
    lxw_rel_tuple *relationship;

    if (!rels)
        return;

    if (rels->relationships) {
        while (!STAILQ_EMPTY(rels->relationships)) {
            relationship = STAILQ_FIRST(rels->relationships);
            STAILQ_REMOVE_HEAD(rels->relationships, list_pointers);
            free(relationship->type);
            free(relationship->target);
            free(relationship->target_mode);
            free(relationship);
        }

        free(rels->relationships);
    }

    free(rels);
}

// Assembly:
testq %rdi, %rdi
je 0x22a09
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x229ed
jmp 0x229fa
movq 0x18(%r14), %rax
movq %rax, (%rdi)
testq %rax, %rax
jne 0x229c7
movq %rdi, 0x8(%rdi)
movq (%r14), %rdi
callq 0xc0c0
movq 0x8(%r14), %rdi
callq 0xc0c0
movq 0x10(%r14), %rdi
callq 0xc0c0
movq %r14, %rdi
callq 0xc0c0
movq 0x10(%rbx), %rdi
movq (%rdi), %r14
testq %r14, %r14
jne 0x229b7
callq 0xc0c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/relationships.c
// Function: lxw_relationships_assemble_xml_file
void
lxw_relationships_assemble_xml_file(lxw_relationships *self)
{
    /* Write the XML declaration. */
    _relationships_xml_declaration(self);

    _write_relationships(self);

    /* Close the relationships tag. */
    lxw_xml_end_tag(self->file, "Relationships");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp            # imm = 0x858
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xcf30
xorl %r14d, %r14d
leaq 0x18(%rsp), %r15
movq %r14, (%r15)
movq %r15, 0x8(%r15)
leaq 0x1d6d5(%rip), %rdi     # 0x40111
leaq 0x20828(%rip), %rsi     # 0x4326b
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r14, 0x1040(%rax)
movq 0x8(%r15), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r15)
movq (%rbx), %rdi
leaq 0x207ae(%rip), %rsi     # 0x43219
movq %r15, %rdx
callq 0xc350
movq %rbx, 0x10(%rsp)
movq 0x10(%rbx), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x22bd6
movq %rsp, %r13
movq (%r15), %rbp
movq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%r15), %r14
movl $0x820, %edx            # imm = 0x820
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc640
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movl $0x20, %esi
movq %rbx, %rdi
leaq 0x1fcae(%rip), %rdx     # 0x42779
xorl %eax, %eax
callq 0xc570
xorl %r12d, %r12d
movq %r12, (%rsp)
movq %r13, 0x8(%rsp)
leaq 0x239e8(%rip), %rdi     # 0x464cd
movq %rbx, %rsi
callq 0xc030
movl $0x1040, %ebx           # imm = 0x1040
leaq (%rax,%rbx), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
leaq 0x20064(%rip), %rdi     # 0x42b75
movq %rbp, %rsi
callq 0xc030
leaq (%rax,%rbx), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
leaq 0x207a7(%rip), %rdi     # 0x432df
movq 0x28(%rsp), %rsi
callq 0xc030
leaq (%rax,%rbx), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
testq %r14, %r14
je 0x22b8d
leaq 0x20780(%rip), %rdi     # 0x432e6
movq %r14, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x20755(%rip), %rsi     # 0x432f1
movq %r13, %rdx
callq 0xcc00
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x22bc9
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x22bc2
movq %r13, 0x8(%rsp)
callq 0xc0c0
jmp 0x22ba4
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x22a8b
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
leaq 0x18(%rsp), %r14
je 0x22c0a
movq 0x1040(%rdi), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
jne 0x22bfb
movq %r14, 0x20(%rsp)
callq 0xc0c0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
jne 0x22be5
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x20600(%rip), %rsi     # 0x43219
callq 0xc060
addq $0x858, %rsp            # imm = 0x858
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/relationships.c
// Function: add_relationship
STATIC void
_add_relationship(lxw_relationships *self, const char *schema,
                  const char *type, const char *target,
                  const char *target_mode)
{
    lxw_rel_tuple *relationship;

    if (!schema || !type || !target)
        return;

    relationship = calloc(1, sizeof(lxw_rel_tuple));
    GOTO_LABEL_ON_MEM_ERROR(relationship, mem_error);

    relationship->type = calloc(1, LXW_MAX_ATTRIBUTE_LENGTH);
    GOTO_LABEL_ON_MEM_ERROR(relationship->type, mem_error);

    /* Add the schema to the relationship type. */
    lxw_snprintf(relationship->type, LXW_MAX_ATTRIBUTE_LENGTH, "%s%s",
                 schema, type);

    relationship->target = lxw_strdup(target);
    GOTO_LABEL_ON_MEM_ERROR(relationship->target, mem_error);

    if (target_mode) {
        relationship->target_mode = lxw_strdup(target_mode);
        GOTO_LABEL_ON_MEM_ERROR(relationship->target_mode, mem_error);
    }

    STAILQ_INSERT_TAIL(self->relationships, relationship, list_pointers);

    return;

mem_error:
    if (relationship) {
        free(relationship->type);
        free(relationship->target);
        free(relationship->target_mode);
        free(relationship);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
testq %r13, %r13
sete %al
orb %cl, %al
jne 0x22d15
movq %r8, %r15
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x22d24
movq %rax, %rbx
movq %r12, (%rsp)
movl $0x1, %edi
movl $0x820, %esi            # imm = 0x820
callq 0xc7f0
movq %rax, %r12
movq %rax, (%rbx)
testq %rax, %rax
je 0x22d2b
leaq 0x1d3d0(%rip), %rdx     # 0x40088
movl $0x820, %esi            # imm = 0x820
movq %r12, %rdi
movq %r14, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0xc570
movq %r13, %rdi
callq 0xcce0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x22d32
testq %r15, %r15
je 0x22cf7
movq %rax, %r14
movq %r15, %rdi
callq 0xcce0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x22d3b
movq %rbx, %rax
addq $0x18, %rax
movq (%rsp), %rdx
movq 0x10(%rdx), %rcx
movq 0x8(%rcx), %rcx
movq %rbx, (%rcx)
movq 0x10(%rdx), %rcx
movq %rax, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xdda7
jmp 0x22d15
movl $0xae, %edi
jmp 0x22d37
movl $0xb5, %edi
xorl %edx, %edx
jmp 0x22d43
movl $0xb9, %edi
movq %r14, %rdx
movq %r12, %rsi
movq %rbx, %rcx
callq 0xdd5b
jmp 0x22d15
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/shared_strings.c
// Function: lxw_sst_new
lxw_sst *
lxw_sst_new(void)
{
    /* Create the new shared string table. */
    lxw_sst *sst = calloc(1, sizeof(lxw_sst));
    RETURN_ON_MEM_ERROR(sst, NULL);

    /* Add the sst RB tree. */
    sst->rb_tree = calloc(1, sizeof(struct sst_rb_tree));
    GOTO_LABEL_ON_MEM_ERROR(sst->rb_tree, mem_error);

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

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

    /* Initialize the RB tree. */
    RB_INIT(sst->rb_tree);

    return sst;

mem_error:
    lxw_sst_free(sst);
    return NULL;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x22de1
movq %rax, %rbx
movl $0x1, %edi
movl $0x8, %esi
callq 0xc7f0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x22de8
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x22def
movq %rax, 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
callq 0xddf9
jmp 0x22dfc
movl $0x2d, %edi
jmp 0x22df4
movl $0x31, %edi
movq %rbx, %rsi
callq 0xddcb
xorl %ebx, %ebx
jmp 0x22ddc
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/shared_strings.c
// Function: lxw_sst_free
void
lxw_sst_free(lxw_sst *sst)
{
    struct sst_element *sst_element;
    struct sst_element *sst_element_temp;

    if (!sst)
        return;

    /* Free the sst_elements and their data using the ordered linked list. */
    if (sst->order_list) {
        STAILQ_FOREACH_SAFE(sst_element, sst->order_list, sst_order_pointers,
                            sst_element_temp) {

            if (sst_element && sst_element->string)
                free(sst_element->string);
            if (sst_element)
                free(sst_element);
        }
    }

    free(sst->order_list);
    free(sst->rb_tree);
    free(sst);
}

// Assembly:
testq %rdi, %rdi
je 0x22e46
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x22e47
movq (%rdi), %r14
testq %r14, %r14
je 0x22e49
movq 0x8(%r14), %rdi
movq 0x18(%r14), %r15
testq %rdi, %rdi
je 0x22e30
callq 0xc0c0
movq %r14, %rdi
callq 0xc0c0
movq %r15, %r14
testq %r15, %r15
jne 0x22e1e
movq 0x10(%rbx), %rdi
jmp 0x22e49
retq
xorl %edi, %edi
callq 0xc0c0
movq 0x18(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc0c0
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: lxw_styles_new
lxw_styles *
lxw_styles_new(void)
{
    lxw_styles *styles = calloc(1, sizeof(lxw_styles));
    GOTO_LABEL_ON_MEM_ERROR(styles, mem_error);

    styles->xf_formats = calloc(1, sizeof(struct lxw_formats));
    GOTO_LABEL_ON_MEM_ERROR(styles->xf_formats, mem_error);
    STAILQ_INIT(styles->xf_formats);

    styles->dxf_formats = calloc(1, sizeof(struct lxw_formats));
    GOTO_LABEL_ON_MEM_ERROR(styles->dxf_formats, mem_error);
    STAILQ_INIT(styles->dxf_formats);

    return styles;

mem_error:
    lxw_styles_free(styles);
    return NULL;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0xc7f0
movq %rax, %rbx
testq %rax, %rax
je 0x233f1
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x233f8
movq %rax, 0x8(%rax)
movl $0x1, %edi
movl $0x10, %esi
callq 0xc7f0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x233ff
movq %rax, 0x8(%rax)
movq %rbx, %rax
popq %rbx
retq
movl $0x21, %edi
jmp 0x23404
movl $0x24, %edi
jmp 0x23404
movl $0x28, %edi
movq %rbx, %rsi
callq 0xde1b
xorl %ebx, %ebx
jmp 0x233ec
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: lxw_styles_free
void
lxw_styles_free(lxw_styles *styles)
{
    lxw_format *format;

    if (!styles)
        return;

    /* Free the xf formats in the styles. */
    if (styles->xf_formats) {
        while (!STAILQ_EMPTY(styles->xf_formats)) {
            format = STAILQ_FIRST(styles->xf_formats);
            STAILQ_REMOVE_HEAD(styles->xf_formats, list_pointers);
            free(format);
        }
        free(styles->xf_formats);
    }

    /* Free the dxf formats in the styles. */
    if (styles->dxf_formats) {
        while (!STAILQ_EMPTY(styles->dxf_formats)) {
            format = STAILQ_FIRST(styles->dxf_formats);
            STAILQ_REMOVE_HEAD(styles->dxf_formats, list_pointers);
            free(format);
        }
        free(styles->dxf_formats);
    }

    free(styles);
}

// Assembly:
testq %rdi, %rdi
je 0x23490
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0x23443
jmp 0x23450
movq 0x230(%rax), %rcx
movq %rcx, (%rdi)
testq %rcx, %rcx
jne 0x23437
movq %rdi, 0x8(%rdi)
movq %rax, %rdi
callq 0xc0c0
movq 0x20(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
jne 0x23424
callq 0xc0c0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
jne 0x2347a
jmp 0x23487
movq 0x230(%rax), %rcx
movq %rcx, (%rdi)
testq %rcx, %rcx
jne 0x2346e
movq %rdi, 0x8(%rdi)
movq %rax, %rdi
callq 0xc0c0
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
jne 0x2345b
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: lxw_styles_write_string_fragment
void
lxw_styles_write_string_fragment(lxw_styles *self, const char *string)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    /* Add attribute to preserve leading or trailing whitespace. */
    if (isspace((unsigned char) string[0])
        || isspace((unsigned char) string[strlen(string) - 1]))
        LXW_PUSH_ATTRIBUTES_STR("xml:space", "preserve");

    lxw_xml_data_element(self->file, "t", string, &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
callq 0xd0f0
movq (%rax), %r15
movzbl (%rbx), %eax
testb $0x20, 0x1(%r15,%rax,2)
jne 0x234d6
movq %rbx, %rdi
callq 0xc480
movzbl -0x1(%rbx,%rax), %eax
testb $0x20, 0x1(%r15,%rax,2)
je 0x23508
leaq 0x1fe42(%rip), %rdi     # 0x4331f
leaq 0x1fe45(%rip), %rsi     # 0x43329
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
movq (%r14), %rdi
leaq 0x1dd77(%rip), %rsi     # 0x41289
movq %rsp, %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0xcb30
movq (%r14), %rdi
testq %rdi, %rdi
je 0x23548
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x2353d
movq %r14, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x23523
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font_vert_align
STATIC void
_write_font_vert_align(lxw_styles *self, const char *align)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("val", align);

    lxw_xml_empty_tag(self->file, "vertAlign", &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 0x1c776(%rip), %rdi     # 0x4144c
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 0x1e6c1(%rip), %rsi     # 0x433bf
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24d2e
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x24d23
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x24d09
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font_size
STATIC void
_write_font_size(lxw_styles *self, double font_size)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_DBL("val", font_size);

    lxw_xml_empty_tag(self->file, "sz", &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 0x1c6f4(%rip), %rdi     # 0x4144c
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1c49b(%rip), %rsi     # 0x4121b
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24db0
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x24da5
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x24d8b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font_color_theme
STATIC void
_write_font_color_theme(lxw_styles *self, uint8_t theme)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_INT("theme", theme);

    lxw_xml_empty_tag(self->file, "color", &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)
movl %esi, %esi
leaq 0x1e18b(%rip), %rdi     # 0x42f67
callq 0xc180
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x2067c(%rip), %rsi     # 0x45480
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24e34
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x24e29
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x24e0f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font_color_indexed
STATIC void
_write_font_color_indexed(lxw_styles *self, uint8_t index)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_INT("indexed", index);

    lxw_xml_empty_tag(self->file, "color", &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)
movl %esi, %esi
leaq 0x1d018(%rip), %rdi     # 0x41e78
callq 0xc180
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x205f8(%rip), %rsi     # 0x45480
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24eb8
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x24ead
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x24e93
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_font_name
STATIC void
_write_font_name(lxw_styles *self, const char *font_name,
                 uint8_t is_rich_string)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (*font_name)
        LXW_PUSH_ATTRIBUTES_STR("val", font_name);
    else
        LXW_PUSH_ATTRIBUTES_STR("val", LXW_DEFAULT_FONT_NAME);

    if (is_rich_string)
        lxw_xml_empty_tag(self->file, "rFont", &attributes);
    else
        lxw_xml_empty_tag(self->file, "name", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
xorl %r15d, %r15d
leaq 0x8(%rsp), %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
cmpb $0x0, (%rsi)
movq %rdi, %r14
leaq 0x1e494(%rip), %rax     # 0x4337e
cmoveq %rax, %rsi
leaq 0x1c557(%rip), %rdi     # 0x4144c
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
testl %ebp, %ebp
leaq 0x1c443(%rip), %rax     # 0x4135f
leaq 0x1cf64(%rip), %rsi     # 0x41e87
cmoveq %rax, %rsi
movq (%r14), %rdi
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24f5c
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x24f50
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x24f35
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/styles.c
// Function: write_font_family
STATIC void
_write_font_family(lxw_styles *self, uint8_t font_family)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_INT("val", font_family);

    lxw_xml_empty_tag(self->file, "family", &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)
movl %esi, %esi
leaq 0x1c4c3(%rip), %rdi     # 0x4144c
callq 0xc180
leaq 0x1040(%rax), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1cedc(%rip), %rsi     # 0x41e8d
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24fe1
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x24fd6
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x24fbc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_default_fill
STATIC void
_write_default_fill(lxw_styles *self, const char *pattern)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("patternType", pattern);

    lxw_xml_start_tag(self->file, "fill", NULL);
    lxw_xml_empty_tag(self->file, "patternFill", &attributes);
    lxw_xml_end_tag(self->file, "fill");

    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 0x1e536(%rip), %rdi     # 0x4363e
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 0x20386(%rip), %r15     # 0x454b6
movq %r15, %rsi
xorl %edx, %edx
callq 0xc350
movq (%r14), %rdi
leaq 0x1e506(%rip), %rsi     # 0x4364a
movq %rbx, %rdx
callq 0xcc00
movq (%r14), %rdi
movq %r15, %rsi
callq 0xc060
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2517f
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x25174
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x2515a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/styles.c
// Function: write_sub_border
STATIC void
_write_sub_border(lxw_styles *self, const char *type, uint8_t style,
                  lxw_color_t color)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    char *border_styles[] = {
        "none",
        "thin",
        "medium",
        "dashed",
        "dotted",
        "thick",
        "double",
        "hair",
        "mediumDashed",
        "dashDot",
        "mediumDashDot",
        "dashDotDot",
        "mediumDashDotDot",
        "slantDashDot",
    };

    if (!style) {
        lxw_xml_empty_tag(self->file, type, NULL);
        return;
    }

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("style", border_styles[style]);

    lxw_xml_start_tag(self->file, type, &attributes);

    _write_border_color(self, color);

    lxw_xml_end_tag(self->file, type);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x256cd
movl %ecx, %ebp
xorl %r12d, %r12d
movq %rsp, %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
movzbl %dl, %eax
leaq 0x1e3e4(%rip), %rcx     # 0x43a38
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0x1c194(%rip), %rdi     # 0x417f6
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc350
leaq 0x10(%rsp), %rax
movq %r12, (%rax)
movq %rax, 0x8(%rax)
testl %ebp, %ebp
je 0x256e6
andl $0xffffff, %ebp         # imm = 0xFFFFFF
leaq 0x1dd1e(%rip), %rdx     # 0x433c9
leaq 0x20(%rsp), %r12
movl $0x20, %esi
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc570
leaq 0x1dd08(%rip), %rdi     # 0x433d0
movq %r12, %rsi
jmp 0x256f4
movq (%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcc00
leaq 0x1be89(%rip), %rdi     # 0x41576
leaq 0x20054(%rip), %rsi     # 0x45748
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
leaq 0x10(%rsp), %r12
movq 0x8(%r12), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r12)
movq (%r15), %rdi
leaq 0x1fd59(%rip), %rsi     # 0x45480
movq %r12, %rdx
callq 0xcc00
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2575a
movq 0x1040(%rdi), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x2574e
movq %r12, 0x18(%rsp)
callq 0xc0c0
movq 0x10(%rsp), %rdi
jmp 0x25733
movq (%r15), %rdi
movq %r14, %rsi
callq 0xc060
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2578a
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x25783
movq %rbx, 0x8(%rsp)
callq 0xc0c0
jmp 0x25765
addq $0x40, %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/styles.c
// Function: write_cell_style
STATIC void
_write_cell_style(lxw_styles *self, char *name, uint8_t xf_id,
                  uint8_t builtin_id)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("name", name);
    LXW_PUSH_ATTRIBUTES_INT("xfId", xf_id);
    LXW_PUSH_ATTRIBUTES_INT("builtinId", builtin_id);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x1b8a9(%rip), %rdi     # 0x4135f
callq 0xc030
movl $0x1040, %r13d          # imm = 0x1040
leaq (%rax,%r13), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movl %r15d, %esi
leaq 0x1e033(%rip), %rdi     # 0x43b14
callq 0xc180
leaq (%rax,%r13), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movl %ebp, %esi
leaq 0x1ddf8(%rip), %rdi     # 0x438fd
callq 0xc180
addq %rax, %r13
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r13, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1ddde(%rip), %rsi     # 0x43907
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x25b5b
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x25b4f
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x25b34
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_col_to_name
void
lxw_col_to_name(char *col_name, lxw_col_t col_num, uint8_t absolute)
{
    uint8_t pos = 0;
    size_t len;
    size_t i;

    /* Change from 0 index to 1 index. */
    col_num++;

    /* Convert the column number to a string in reverse order. */
    while (col_num) {

        /* Get the remainder in base 26. */
        int remainder = col_num % 26;

        if (remainder == 0)
            remainder = 26;

        /* Convert the remainder value to a character. */
        col_name[pos++] = 'A' + remainder - 1;
        col_name[pos] = '\0';

        /* Get the next order of magnitude. */
        col_num = (col_num - 1) / 26;
    }

    if (absolute) {
        col_name[pos] = '$';
        col_name[pos + 1] = '\0';
    }

    /* Reverse the column name string. */
    len = strlen(col_name);
    for (i = 0; i < (len / 2); i++) {
        char tmp = col_name[i];
        col_name[i] = col_name[len - i - 1];
        col_name[len - i - 1] = tmp;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
incw %si
jne 0x26458
xorl %edi, %edi
jmp 0x264b2
xorl %eax, %eax
movl $0x5a, %ecx
movzwl %si, %edi
imull $0x4ec5, %edi, %edi     # imm = 0x4EC5
shrl $0x13, %edi
leal (%rdi,%rdi,4), %r8d
leal (%r8,%r8,4), %r8d
addl %edi, %r8d
leal -0x1(%rsi), %r9d
subl %r8d, %esi
movl %esi, %edi
orb $0x40, %dil
testw %si, %si
movzbl %dil, %esi
cmovel %ecx, %esi
movzbl %al, %edi
incb %al
movb %sil, (%rbx,%rdi)
movzbl %al, %edi
movb $0x0, (%rbx,%rdi)
movzwl %r9w, %r8d
imull $0x4ec5, %r8d, %esi     # imm = 0x4EC5
shrl $0x13, %esi
cmpw $0x19, %r8w
ja 0x2645f
testb %dl, %dl
je 0x264bc
movw $0x24, (%rbx,%rdi)
movq %rbx, %rdi
callq 0xc480
cmpq $0x2, %rax
jb 0x264f2
leaq (%rax,%rbx), %rcx
decq %rcx
shrq %rax
negq %rax
xorl %edx, %edx
movb (%rbx), %sil
movb (%rcx,%rdx), %dil
movb %dil, (%rbx)
movb %sil, (%rcx,%rdx)
decq %rdx
incq %rbx
cmpq %rdx, %rax
jne 0x264d9
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_rowcol_to_cell_abs
void
lxw_rowcol_to_cell_abs(char *cell_name, lxw_row_t row, lxw_col_t col,
                       uint8_t abs_row, uint8_t abs_col)
{
    size_t pos;

    /* Add the column to the cell. */
    lxw_col_to_name(cell_name, col, abs_col);

    /* Get the end of the cell. */
    pos = strlen(cell_name);

    if (abs_row)
        cell_name[pos++] = '$';

    /* Add the row to the cell. */
    lxw_snprintf(&cell_name[pos], LXW_MAX_ROW_NAME_LENGTH, "%d", ++row);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %esi
movl %r8d, %edx
callq 0xc580
movq %r14, %rdi
callq 0xc480
testl %ebp, %ebp
je 0x2655b
movb $0x24, (%r14,%rax)
incq %rax
addq %rax, %r14
incl %ebx
leaq 0x1efe9(%rip), %rdx     # 0x45550
movl $0x9, %esi
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0xc570
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_quote_sheetname
char *
lxw_quote_sheetname(const char *str)
{

    uint8_t needs_quoting = 0;
    size_t number_of_quotes = 2;
    size_t i, j;
    size_t len = strlen(str);

    /* Don't quote the sheetname if it is already quoted. */
    if (str[0] == '\'')
        return lxw_strdup(str);

    /* Check if the sheetname contains any characters that require it
     * to be quoted. Also check for single quotes within the string. */
    for (i = 0; i < len; i++) {
        if (!isalnum((unsigned char) str[i]) && str[i] != '_'
            && str[i] != '.')
            needs_quoting = 1;

        if (str[i] == '\'') {
            needs_quoting = 1;
            number_of_quotes++;
        }
    }

    if (!needs_quoting) {
        return lxw_strdup(str);
    }
    else {
        /* Add single quotes to the start and end of the string. */
        char *quoted_name = calloc(1, len + number_of_quotes + 1);
        RETURN_ON_MEM_ERROR(quoted_name, NULL);

        quoted_name[0] = '\'';

        for (i = 0, j = 1; i < len; i++, j++) {
            quoted_name[j] = str[i];

            /* Double quote inline single quotes. */
            if (str[i] == '\'') {
                quoted_name[++j] = '\'';
            }
        }
        quoted_name[j++] = '\'';
        quoted_name[j++] = '\0';

        return quoted_name;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xc480
cmpb $0x27, (%rbx)
je 0x267cc
movq %rax, %r14
testq %rax, %rax
je 0x267cc
callq 0xd0f0
movq (%rax), %rcx
movl $0x2, %eax
xorl %edx, %edx
movl $0x1, %esi
xorl %edi, %edi
movzbl (%rbx,%rdi), %r8d
testb $0x8, (%rcx,%r8,2)
movzbl %dl, %r9d
movl $0x1, %edx
cmovnel %r9d, %edx
cmpl $0x5f, %r8d
cmovel %r9d, %edx
cmpl $0x2e, %r8d
cmovel %r9d, %edx
xorl %r9d, %r9d
cmpl $0x27, %r8d
cmovel %esi, %edx
sete %r9b
addq %r9, %rax
incq %rdi
cmpq %rdi, %r14
jne 0x2673a
testb %dl, %dl
je 0x267cc
leaq (%r14,%rax), %rsi
incq %rsi
movl $0x1, %r15d
movl $0x1, %edi
callq 0xc7f0
testq %rax, %rax
je 0x267d9
movb $0x27, (%rax)
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
movb %dl, (%rax,%r15)
cmpb $0x27, %dl
jne 0x267b4
movb $0x27, 0x1(%rax,%r15)
incq %r15
incq %rcx
incq %r15
cmpq %rcx, %r14
jne 0x2679f
movw $0x27, (%rax,%r15)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xcce0
callq 0xde8f
xorl %eax, %eax
jmp 0x267c6
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_name_to_row
lxw_row_t
lxw_name_to_row(const char *row_str)
{
    lxw_row_t row_num = 0;
    const char *p = row_str;

    /* Skip the column letters and absolute symbol of the A1 cell. */
    while (p && !isdigit((unsigned char) *p))
        p++;

    /* Convert the row part of the A1 cell to a number. */
    if (p)
        row_num = atoi(p);

    if (row_num)
        return row_num - 1;
    else
        return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x26812
pushq %rbx
movq %rdi, %rbx
callq 0xd0f0
movq (%rax), %rax
decq %rbx
movzbl 0x1(%rbx), %ecx
incq %rbx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x267f6
movq %rbx, %rdi
callq 0xce80
subl $0x1, %eax
popq %rbx
jae 0x26814
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_name_to_col
lxw_col_t
lxw_name_to_col(const char *col_str)
{
    lxw_col_t col_num = 0;
    const char *p = col_str;

    /* Convert leading column letters of A1 cell. Ignore absolute $ marker. */
    while (p && (isupper((unsigned char) *p) || *p == '$')) {
        if (*p != '$')
            col_num = (col_num * 26) + (*p - 'A' + 1);
        p++;
    }

    return col_num - 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movw $0xffff, %bx            # imm = 0xFFFF
testq %rdi, %rdi
je 0x2687f
movq %rdi, %r14
callq 0xd0f0
movq (%rax), %rax
movzbl (%r14), %edx
cmpl $0x24, %edx
sete %cl
je 0x26845
movzwl (%rax,%rdx,2), %esi
andl $0x100, %esi            # imm = 0x100
je 0x2687f
incq %r14
xorl %ebx, %ebx
movsbl %dl, %edx
leal (%rbx,%rbx,4), %esi
leal (%rsi,%rsi,4), %esi
addl %ebx, %esi
addl %esi, %edx
addl $-0x40, %edx
testb $0x1, %cl
cmovnel %ebx, %edx
movl %edx, %ebx
movzbl (%r14), %edx
incq %r14
cmpl $0x24, %edx
sete %cl
je 0x2684a
movzwl (%rax,%rdx,2), %esi
andl $0x100, %esi            # imm = 0x100
jne 0x2684a
decl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_unixtime_to_excel_date_epoch
double
lxw_unixtime_to_excel_date_epoch(int64_t unixtime, uint8_t date_1904)
{
    double excel_datetime = 0.0;
    double epoch = date_1904 ? 24107.0 : 25568.0;

    excel_datetime = epoch + (unixtime / (24 * 60 * 60.0));

    if (!date_1904 && excel_datetime >= 60.0)
        excel_datetime = excel_datetime + 1.0;

    return excel_datetime;
}

// Assembly:
cvtsi2sd %rdi, %xmm0
xorl %eax, %eax
divsd 0x1e220(%rip), %xmm0    # 0x44d28
testl %esi, %esi
sete %al
leaq 0x1e22c(%rip), %rcx     # 0x44d40
addsd (%rcx,%rax,8), %xmm0
jne 0x26b44
movsd 0x1bf2d(%rip), %xmm1    # 0x42a50
addsd %xmm0, %xmm1
movsd 0x1e201(%rip), %xmm2    # 0x44d30
cmplesd %xmm0, %xmm2
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_strdup
char *
lxw_strdup(const char *str)
{
    size_t len;
    char *copy;

    if (!str)
        return NULL;

    len = strlen(str) + 1;
    copy = malloc(len);

    if (copy)
        memcpy(copy, str, len);

    return copy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x26b7e
movq %rdi, %rbx
callq 0xc480
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0xca50
testq %rax, %rax
je 0x26b7e
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc900
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_utf8_strlen
size_t
lxw_utf8_strlen(const char *str)
{
    size_t byte_count = 0;
    size_t char_count = 0;

    while (str[byte_count]) {
        if ((str[byte_count] & 0xc0) != 0x80)
            char_count++;

        byte_count++;
    }

    return char_count;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x26bc5
incq %rdi
xorl %eax, %eax
andb $-0x40, %cl
xorl %edx, %edx
negb %cl
setno %dl
addq %rdx, %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x26bae
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/utility.c
// Function: lxw_hash_password
uint16_t
lxw_hash_password(const char *password)
{
    uint16_t byte_count = (uint16_t) strlen(password);
    uint16_t hash = 0;
    const char *p = &password[byte_count];

    if (!byte_count)
        return hash;

    while (p-- != password) {
        hash = ((hash >> 14) & 0x01) | ((hash << 1) & 0x7fff);
        hash ^= *p & 0xFF;
    }

    hash = ((hash >> 14) & 0x01) | ((hash << 1) & 0x7fff);
    hash ^= byte_count;
    hash ^= 0xCE4B;

    return hash;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xc480
movq %rax, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
je 0x26c8b
xorl %edx, %edx
movl %edx, %edi
shrl $0xe, %edi
andl $0x1, %edi
addl %edx, %edx
movl %edx, %esi
andl $0x7ffe, %esi           # imm = 0x7FFE
orl %esi, %edi
movzbl -0x1(%rbx,%rcx), %edx
xorl %edi, %edx
decq %rcx
jne 0x26c50
movzwl %si, %ecx
shrl $0xe, %ecx
movzwl %dx, %edx
andl $0x3fff, %edx           # imm = 0x3FFF
leal (%rcx,%rdx,2), %ecx
xorl %ecx, %eax
xorl $0xce4b, %eax           # imm = 0xCE4B
jmp 0x26c8d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/vml.c
// Function: vml_write_stroke
STATIC void
_vml_write_stroke(lxw_vml *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("joinstyle", "miter");

    lxw_xml_empty_tag(self->file, "v:stroke", &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 0x1c770(%rip), %rdi     # 0x45385
leaq 0x1c773(%rip), %rsi     # 0x4538f
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 0x1c751(%rip), %rsi     # 0x45395
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x28c74
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x28c69
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x28c4f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/vml.c
// Function: vml_write_rotation_lock
STATIC void
_vml_write_rotation_lock(lxw_vml *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("v:ext", "edit");
    LXW_PUSH_ATTRIBUTES_STR("rotation", "t");

    lxw_xml_empty_tag(self->file, "o:lock", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x8(%rsp), %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x1c68c(%rip), %rdi     # 0x4532e
leaq 0x1c68b(%rip), %rsi     # 0x45334
callq 0xc030
movl $0x1040, %r12d          # imm = 0x1040
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
leaq 0x1c7ea(%rip), %rdi     # 0x454bb
leaq 0x185b1(%rip), %rsi     # 0x41289
callq 0xc030
addq %rax, %r12
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r12, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1c6de(%rip), %rsi     # 0x453da
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x28d2e
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x28d22
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x28d07
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/vml.c
// Function: vml_write_anchor
STATIC void
_vml_write_anchor(lxw_vml *self, lxw_vml_obj *vml_obj)
{
    char anchor_data[LXW_MAX_ATTRIBUTE_LENGTH];

    lxw_snprintf(anchor_data,
                 LXW_MAX_ATTRIBUTE_LENGTH,
                 "%d, %d, %d, %d, %d, %d, %d, %d",
                 vml_obj->from.col,
                 (uint32_t) vml_obj->from.col_offset,
                 vml_obj->from.row,
                 (uint32_t) vml_obj->from.row_offset,
                 vml_obj->to.col,
                 (uint32_t) vml_obj->to.col_offset,
                 vml_obj->to.row, (uint32_t) vml_obj->to.row_offset);

    lxw_xml_data_element(self->file, "x:Anchor", anchor_data, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x820, %rsp            # imm = 0x820
movq %rdi, %rbx
cvttsd2si 0x60(%rsi), %r8
movl 0x58(%rsi), %ecx
movl 0x5c(%rsi), %r9d
cvttsd2si 0x68(%rsi), %r10
movl 0x70(%rsi), %r11d
cvttsd2si 0x78(%rsi), %r15
movl 0x74(%rsi), %r12d
cvttsd2si 0x80(%rsi), %r13
subq $0x8, %rsp
leaq 0x1c7b2(%rip), %rdx     # 0x45534
leaq 0x8(%rsp), %r14
movl $0x820, %esi            # imm = 0x820
movq %r14, %rdi
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq %r10
callq 0xc570
addq $0x30, %rsp
movq (%rbx), %rdi
leaq 0x1c7a5(%rip), %rsi     # 0x45553
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xcb30
addq $0x820, %rsp            # imm = 0x820
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/vml.c
// Function: vml_write_comment_path
STATIC void
_vml_write_comment_path(lxw_vml *self, uint8_t has_gradient, char *type)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (has_gradient)
        LXW_PUSH_ATTRIBUTES_STR("gradientshapeok", "t");

    LXW_PUSH_ATTRIBUTES_STR("o:connecttype", type);

    lxw_xml_empty_tag(self->file, "v:path", &attributes);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
testl %esi, %esi
je 0x28e1c
leaq 0x1c7b7(%rip), %rdi     # 0x455a8
leaq 0x18491(%rip), %rsi     # 0x41289
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
leaq 0x1c5a2(%rip), %rdi     # 0x453c5
movq %rbx, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
leaq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1c57c(%rip), %rsi     # 0x453d3
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x28e89
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x28e7d
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x28e62
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/vml.c
// Function: vml_write_formula
STATIC void
_vml_write_formula(lxw_vml *self, char *equation)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("eqn", equation);

    lxw_xml_empty_tag(self->file, "v:f", &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 0x1c8f7(%rip), %rdi     # 0x457a8
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 0x1c8d3(%rip), %rsi     # 0x457ac
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x28f09
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x28efe
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x28ee4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: free_doc_properties
STATIC void
_free_doc_properties(lxw_doc_properties *properties)
{
    if (properties) {
        free((void *) properties->title);
        free((void *) properties->subject);
        free((void *) properties->author);
        free((void *) properties->manager);
        free((void *) properties->company);
        free((void *) properties->category);
        free((void *) properties->keywords);
        free((void *) properties->comments);
        free((void *) properties->status);
        free((void *) properties->hyperlink_base);
    }

    free(properties);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x29bdb
movq (%rbx), %rdi
callq 0xc0c0
movq 0x8(%rbx), %rdi
callq 0xc0c0
movq 0x10(%rbx), %rdi
callq 0xc0c0
movq 0x18(%rbx), %rdi
callq 0xc0c0
movq 0x20(%rbx), %rdi
callq 0xc0c0
movq 0x28(%rbx), %rdi
callq 0xc0c0
movq 0x30(%rbx), %rdi
callq 0xc0c0
movq 0x38(%rbx), %rdi
callq 0xc0c0
movq 0x40(%rbx), %rdi
callq 0xc0c0
movq 0x48(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: lxw_workbook_set_default_xf_indices
void
lxw_workbook_set_default_xf_indices(lxw_workbook *self)
{
    lxw_format *format;
    int32_t index = 0;

    STAILQ_FOREACH(format, self->formats, list_pointers) {

        /* Skip the hyperlink format. */
        if (index != 1)
            lxw_format_get_xf_index(format);

        index++;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x58(%rdi), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x2a050
movl $0x1, %ebp
subl $0x1, %ebp
jb 0x2a044
movq %rbx, %rdi
callq 0xc9c0
movq 0x230(%rbx), %rbx
testq %rbx, %rbx
jne 0x2a037
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: workbook_add_format
lxw_format *
workbook_add_format(lxw_workbook *self)
{
    /* Create a new format object. */
    lxw_format *format = lxw_format_new();
    RETURN_ON_MEM_ERROR(format, NULL);

    if (!STAILQ_EMPTY(self->formats)) {
        memcpy(format, STAILQ_FIRST(self->formats), sizeof(lxw_format));
        format->xf_format_indices = NULL;
        format->num_xf_formats = NULL;
        format->list_pointers.stqe_next = NULL;
        format->xf_index = LXW_PROPERTY_UNSET;
        format->dxf_index = LXW_PROPERTY_UNSET;
    }

    format->xf_format_indices = self->used_xf_formats;
    format->dxf_format_indices = self->used_dxf_formats;
    format->num_xf_formats = &self->num_xf_formats;

    STAILQ_INSERT_TAIL(self->formats, format, list_pointers);

    return format;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xcd40
movq %rax, %rbx
testq %rax, %rax
je 0x2b41d
movq 0x58(%r14), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2b3d7
movl $0x238, %edx            # imm = 0x238
movq %rbx, %rdi
callq 0xc900
movq $-0x1, 0x28(%rbx)
movq 0x58(%r14), %rax
movups 0xd8(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
leaq 0xba(%r14), %rcx
movq %rcx, 0x18(%rbx)
movq %rbx, %rcx
addq $0x230, %rcx            # imm = 0x230
movq $0x0, 0x230(%rbx)
movq 0x8(%rax), %rax
movq %rbx, (%rax)
movq 0x58(%r14), %rax
movq %rcx, 0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xdf64
jmp 0x2b412
// File: /workspace/github_c_makefile_star2_O3/Paxa[P]fast_excel/libxlsxwriter/src/workbook.c
// Function: workbook_validate_sheet_name
lxw_error
workbook_validate_sheet_name(lxw_workbook *self, const char *sheetname)
{
    /* Check the UTF-8 length of the worksheet name. */
    if (lxw_utf8_strlen(sheetname) > LXW_SHEETNAME_MAX)
        return LXW_ERROR_SHEETNAME_LENGTH_EXCEEDED;

    /* Check that the worksheet name doesn't contain invalid characters. */
    if (strpbrk(sheetname, "[]:*?/\\"))
        return LXW_ERROR_INVALID_SHEETNAME_CHARACTER;

    /* Check that the worksheet doesn't start or end with an apostrophe. */
    if (sheetname[0] == '\'' || sheetname[strlen(sheetname) - 1] == '\'')
        return LXW_ERROR_SHEETNAME_START_END_APOSTROPHE;

    /* Check if the worksheet name is already in use. */
    if (workbook_get_worksheet_by_name(self, sheetname))
        return LXW_ERROR_SHEETNAME_ALREADY_USED;

    /* Check if the chartsheet name is already in use. */
    if (workbook_get_chartsheet_by_name(self, sheetname))
        return LXW_ERROR_SHEETNAME_ALREADY_USED;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xd0d0
movl $0xe, %ebp
cmpq $0x1f, %rax
ja 0x2b8f4
leaq 0x1a93a(%rip), %rsi     # 0x461d6
movq %rbx, %rdi
callq 0xcb10
movl $0xf, %ebp
testq %rax, %rax
jne 0x2b8f4
movl $0x10, %ebp
cmpb $0x27, (%rbx)
je 0x2b8f4
movq %rbx, %rdi
callq 0xc480
cmpb $0x27, -0x1(%rbx,%rax)
je 0x2b8f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0xca20
movl $0x11, %ebp
testq %rax, %rax
jne 0x2b8f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0xce70
xorl %ecx, %ecx
testq %rax, %rax
movl $0x11, %ebp
cmovel %ecx, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq