LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_find_cell_in_row
lxw_cell *
lxw_worksheet_find_cell_in_row(lxw_row *row, lxw_col_t col_num)
{
    lxw_cell tmp_cell;

    if (!row)
        return NULL;

    tmp_cell.col_num = col_num;

    return RB_FIND(lxw_table_cells, row->cells, &tmp_cell);
}

// Assembly:
testq %rdi, %rdi
je 0x2d96e
movq 0x20(%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2d96e
movl $0x48, %ecx
cmpw %si, 0x4(%rax)
ja 0x2d968
movl $0x50, %ecx
je 0x2d970
movq (%rax,%rcx), %rax
jmp 0x2d951
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_row
STATIC void
_free_row(lxw_row *row)
{
    lxw_cell *cell;
    lxw_cell *next_cell;

    if (!row)
        return;

    for (cell = RB_MIN(lxw_table_cells, row->cells); cell; cell = next_cell) {
        next_cell = RB_NEXT(lxw_table_cells, row->cells, cell);
        RB_REMOVE(lxw_table_cells, row->cells, cell);
        _free_cell(cell);
    }

    free(row->cells);
    free(row);
}

// Assembly:
testq %rdi, %rdi
je 0x2f8c4
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2f8c5
movq %rax, %r14
movq 0x48(%rax), %rax
testq %rax, %rax
jne 0x2f8b6
jmp 0x2f8c8
retq
xorl %r14d, %r14d
testq %r14, %r14
je 0x2f8f4
movq %r14, %rdi
callq 0x32324
movq %rax, %r15
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x3d7f6
movq %r14, %rdi
callq 0x2fbaa
movq %r15, %r14
testq %r15, %r15
jne 0x2f8cd
movq 0x20(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc0c0
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_object_properties
STATIC void
_free_object_properties(lxw_object_properties *object_property)
{
    if (!object_property)
        return;

    free(object_property->filename);
    free(object_property->description);
    free(object_property->extension);
    free(object_property->url);
    free(object_property->tip);
    free(object_property->image_buffer);
    free(object_property->md5);
    free(object_property->image_position);
    free(object_property);
    object_property = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x2f96a
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0xc0c0
movq 0x28(%rbx), %rdi
callq 0xc0c0
movq 0x78(%rbx), %rdi
callq 0xc0c0
movq 0x30(%rbx), %rdi
callq 0xc0c0
movq 0x38(%rbx), %rdi
callq 0xc0c0
movq 0x58(%rbx), %rdi
callq 0xc0c0
movq 0xa0(%rbx), %rdi
callq 0xc0c0
movq 0xa8(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_vml_object
STATIC void
_free_vml_object(lxw_vml_obj *vml_obj)
{
    if (!vml_obj)
        return;

    free(vml_obj->author);
    free(vml_obj->font_name);
    free(vml_obj->text);
    free(vml_obj->image_position);
    free(vml_obj->name);
    free(vml_obj->macro);

    free(vml_obj);
}

// Assembly:
testq %rdi, %rdi
je 0x2f9c5
pushq %rbx
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
callq 0xc0c0
movq 0x90(%rbx), %rdi
callq 0xc0c0
movq 0x98(%rbx), %rdi
callq 0xc0c0
movq 0xa0(%rbx), %rdi
callq 0xc0c0
movq 0xa8(%rbx), %rdi
callq 0xc0c0
movq 0xb0(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_worksheet_table
STATIC void
_free_worksheet_table(lxw_table_obj *table)
{
    uint16_t i;

    if (!table)
        return;

    for (i = 0; i < table->num_cols; i++)
        _free_worksheet_table_column(table->columns[i]);

    free(table->name);
    free(table->total_string);
    free(table->columns);

    free(table);
}

// Assembly:
testq %rdi, %rdi
je 0x2fa3f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpw $0x0, 0x32(%rdi)
je 0x2fa18
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x2fa0c
movq (%r14), %rdi
callq 0xc0c0
movq 0x8(%r14), %rdi
callq 0xc0c0
movq 0x10(%r14), %rdi
callq 0xc0c0
movq %r14, %rdi
callq 0xc0c0
incq %r15
movzwl 0x32(%rbx), %eax
cmpq %rax, %r15
jb 0x2f9dd
movq (%rbx), %rdi
callq 0xc0c0
movq 0x8(%rbx), %rdi
callq 0xc0c0
movq 0x10(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_data_validation
STATIC void
_free_data_validation(lxw_data_val_obj *data_validation)
{
    if (!data_validation)
        return;

    free(data_validation->value_formula);
    free(data_validation->maximum_formula);
    free(data_validation->input_title);
    free(data_validation->input_message);
    free(data_validation->error_title);
    free(data_validation->error_message);
    free(data_validation->minimum_formula);

    free(data_validation);
}

// Assembly:
testq %rdi, %rdi
je 0x2fa9d
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xc0c0
movq 0x58(%rbx), %rdi
callq 0xc0c0
movq 0x80(%rbx), %rdi
callq 0xc0c0
movq 0x88(%rbx), %rdi
callq 0xc0c0
movq 0x90(%rbx), %rdi
callq 0xc0c0
movq 0x98(%rbx), %rdi
callq 0xc0c0
movq 0x28(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_relationship
STATIC void
_free_relationship(lxw_rel_tuple *relationship)
{
    if (!relationship)
        return;

    free(relationship->type);
    free(relationship->target);
    free(relationship->target_mode);

    free(relationship);
}

// Assembly:
testq %rdi, %rdi
je 0x2faca
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xc0c0
movq 0x8(%rbx), %rdi
callq 0xc0c0
movq 0x10(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_cond_format
STATIC void
_free_cond_format(lxw_cond_format_obj *cond_format)
{
    if (!cond_format)
        return;

    free(cond_format->min_value_string);
    free(cond_format->mid_value_string);
    free(cond_format->max_value_string);
    free(cond_format->type_string);
    free(cond_format->guid);

    free(cond_format);
}

// Assembly:
testq %rdi, %rdi
je 0x2fb58
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xc0c0
movq 0x28(%rbx), %rdi
callq 0xc0c0
movq 0x40(%rbx), %rdi
callq 0xc0c0
movq 0x78(%rbx), %rdi
callq 0xc0c0
movq 0x80(%rbx), %rdi
callq 0xc0c0
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_filter_rules
STATIC void
_free_filter_rules(lxw_worksheet *worksheet)
{
    uint16_t i;

    if (!worksheet->filter_rules)
        return;

    for (i = 0; i < worksheet->num_filter_rules; i++)
        _free_filter_rule(worksheet->filter_rules[i]);

    free(worksheet->filter_rules);
}

// Assembly:
cmpq $0x0, 0x3b0(%rdi)
je 0x2fba9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x3b8(%rdi)
je 0x2fb96
xorl %r14d, %r14d
movq 0x3b0(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3b3cc
incq %r14
movzwl 0x3b8(%rbx), %eax
cmpq %rax, %r14
jb 0x2fb77
movq 0x3b0(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc0c0
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_cell
STATIC void
_free_cell(lxw_cell *cell)
{
    if (!cell)
        return;

    if (cell->type != NUMBER_CELL && cell->type != STRING_CELL
        && cell->type != BLANK_CELL && cell->type != BOOLEAN_CELL) {

        free((void *) cell->u.string);
    }

    free(cell->user_data1);
    free(cell->user_data2);

    _free_vml_object(cell->comment);

    free(cell);
}

// Assembly:
testq %rdi, %rdi
je 0x2fbe9
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x9, %eax
ja 0x2fbea
movl $0x306, %ecx            # imm = 0x306
btl %eax, %ecx
jae 0x2fbea
movq 0x30(%rbx), %rdi
callq 0xc0c0
movq 0x38(%rbx), %rdi
callq 0xc0c0
movq 0x18(%rbx), %rdi
callq 0x2f96b
movq %rbx, %rdi
popq %rbx
jmp 0xc0c0
retq
movq 0x20(%rbx), %rdi
callq 0xc0c0
jmp 0x2fbc5
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_basename
const char *
lxw_basename(const char *path)
{

    const char *forward_slash;
    const char *back_slash;

    if (!path)
        return NULL;

    forward_slash = strrchr(path, '/');
    back_slash = strrchr(path, '\\');

    if (!forward_slash && !back_slash)
        return path;

    if (forward_slash > back_slash)
        return forward_slash + 1;
    else
        return back_slash + 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2fc30
movq %rdi, %rbx
movl $0x2f, %esi
callq 0xc5b0
movq %rax, %r14
movq %rbx, %rdi
movl $0x5c, %esi
callq 0xc5b0
movq %r14, %rcx
orq %rax, %rcx
je 0x2fc3a
cmpq %rax, %r14
jbe 0x2fc34
incq %r14
movq %r14, %rbx
jmp 0x2fc3a
xorl %ebx, %ebx
jmp 0x2fc3a
incq %rax
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: validation_list_length
size_t
_validation_list_length(const char **list)
{
    uint8_t i = 0;
    size_t length = 0;

    if (!list || !list[0])
        return 0;

    while (list[i] && length < LXW_VALIDATION_MAX_STRING_LENGTH) {
        /* Include commas in the length. */
        length += 1 + lxw_utf8_strlen(list[i]);
        i++;
    }

    /* Adjust the count for extraneous comma at end. */
    length--;

    return length;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2fc91
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x2fc91
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2fc9c
movb $0x1, %bpl
xorl %ecx, %ecx
movq %rcx, %r14
callq 0xd0d0
movzbl %bpl, %ecx
movq (%rbx,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2fc8c
leaq (%r14,%rax), %rcx
incq %rcx
incb %bpl
cmpq $0xff, %rcx
jb 0x2fc64
addq %rax, %r14
jmp 0x2fc94
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq $-0x1, %r14
jmp 0x2fc94
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: validation_list_to_csv
char *
_validation_list_to_csv(const char **list)
{
    uint8_t i = 0;
    char *str;

    /* Create a buffer for the concatenated, and quoted, string. */
    /* Allow for 4 byte UTF-8 chars and add 3 bytes for quotes and EOL. */
    str = calloc(1, LXW_VALIDATION_MAX_STRING_LENGTH * 4 + 3);
    if (!str)
        return NULL;

    /* Add the start quote and first element. */
    strcat(str, "\"");
    strcat(str, list[0]);

    /* Add the other elements preceded by a comma. */
    i = 1;
    while (list[i]) {
        strcat(str, ",");
        strcat(str, list[i]);
        i++;
    }

    /* Add the end quote. */
    strcat(str, "\"");

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0xc7f0
testq %rax, %rax
je 0x2fd25
movq %rax, %rbx
movq %rax, %rdi
callq 0xc480
movw $0x22, (%rbx,%rax)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xcea0
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2fd15
movb $0x2, %r12b
movq %rbx, %rdi
callq 0xc480
movw $0x2c, (%rbx,%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcea0
movzbl %r12b, %r12d
movq (%r14,%r12,8), %r15
incb %r12b
testq %r15, %r15
jne 0x2fcec
movq %rbx, %rdi
callq 0xc480
movw $0x22, (%rbx,%rax)
jmp 0x2fd27
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: set_custom_filter
void
_set_custom_filter(lxw_filter_rule_obj *rule_obj)
{
    rule_obj->is_custom = LXW_TRUE;

    if (rule_obj->criteria1 == LXW_FILTER_CRITERIA_EQUAL_TO)
        rule_obj->is_custom = LXW_FALSE;

    if (rule_obj->criteria1 == LXW_FILTER_CRITERIA_BLANKS)
        rule_obj->is_custom = LXW_FALSE;

    if (rule_obj->criteria2 != LXW_FILTER_CRITERIA_NONE) {
        if (rule_obj->criteria1 == LXW_FILTER_CRITERIA_EQUAL_TO)
            rule_obj->is_custom = LXW_FALSE;

        if (rule_obj->criteria1 == LXW_FILTER_CRITERIA_BLANKS)
            rule_obj->is_custom = LXW_FALSE;

        if (rule_obj->type == LXW_FILTER_TYPE_AND)
            rule_obj->is_custom = LXW_TRUE;
    }

    if (rule_obj->value1_string && strpbrk(rule_obj->value1_string, "*?"))
        rule_obj->is_custom = LXW_TRUE;

    if (rule_obj->value2_string && strpbrk(rule_obj->value2_string, "*?"))
        rule_obj->is_custom = LXW_TRUE;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl 0x6(%rdi), %eax
cmpl $0x1, %eax
setne %cl
cmpl $0x7, %eax
setne %dl
andb %cl, %dl
movb %dl, 0x1(%rdi)
cmpb $0x0, 0x7(%rdi)
je 0x2fd6c
cmpl $0x7, %eax
je 0x2fd5f
cmpl $0x1, %eax
jne 0x2fd63
movb $0x0, 0x1(%rbx)
cmpb $0x2, (%rbx)
jne 0x2fd6c
movb $0x1, 0x1(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2fd8a
leaq 0x16beb(%rip), %rsi     # 0x46967
callq 0xcb10
testq %rax, %rax
je 0x2fd8a
movb $0x1, 0x1(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2fda8
leaq 0x16bcd(%rip), %rsi     # 0x46967
callq 0xcb10
testq %rax, %rax
je 0x2fda8
movb $0x1, 0x1(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: set_default_table_columns
lxw_error
_set_default_table_columns(lxw_table_obj *table_obj)
{

    char col_name[LXW_ATTR_32];
    char *header;
    uint16_t i;
    lxw_table_column *column;
    uint16_t num_cols = table_obj->num_cols;
    lxw_table_column **columns = table_obj->columns;

    for (i = 0; i < num_cols; i++) {
        lxw_snprintf(col_name, LXW_ATTR_32, "Column%d", i + 1);

        column = calloc(num_cols, sizeof(lxw_table_column));
        RETURN_ON_MEM_ERROR(column, LXW_ERROR_MEMORY_MALLOC_FAILED);

        header = lxw_strdup(col_name);
        if (!header) {
            free(column);
            RETURN_ON_MEM_ERROR(header, LXW_ERROR_MEMORY_MALLOC_FAILED);
        }
        columns[i] = column;
        columns[i]->header = header;
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movzwl 0x32(%rdi), %ebx
testq %rbx, %rbx
je 0x2fef5
movq 0x10(%rdi), %r13
leaq 0x16cc5(%rip), %r14     # 0x46b6d
movq %rsp, %r15
xorl %ebp, %ebp
leal 0x1(%rbp), %ecx
movl $0x20, %esi
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xc570
movl $0x38, %esi
movq %rbx, %rdi
callq 0xc7f0
testq %rax, %rax
je 0x2ff06
movq %rax, %r12
movq %r15, %rdi
callq 0xcce0
testq %rax, %rax
je 0x2ff0d
movq %r12, (%r13,%rbp,8)
movq %rax, (%r12)
incq %rbp
cmpq %rbp, %rbx
jne 0x2fead
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x677, %edi            # imm = 0x677
jmp 0x2ff1a
movq %r12, %rdi
callq 0xc0c0
movl $0x67c, %edi            # imm = 0x67C
callq 0xe5e8
movl $0x1, %eax
jmp 0x2fef7
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: expand_table_formula
char *
_expand_table_formula(const char *formula)
{
    char *expanded;
    const char *ptr;
    size_t i;
    size_t ref_count = 0;
    size_t expanded_len;

    ptr = formula;

    while (*ptr++) {
        if (*ptr == '@')
            ref_count++;
    }

    if (ref_count == 0) {
        /* String doesn't need to be expanded. Just copy it. */
        expanded = lxw_strdup_formula(formula);
    }
    else {
        /* Convert "@" in the formula string to "[#This Row],".  */
        expanded_len = strlen(formula) + (sizeof(LXW_THIS_ROW) * ref_count);
        expanded = calloc(1, expanded_len);

        if (!expanded)
            return NULL;

        i = 0;
        ptr = formula;
        /* Ignore the = in the formula. */
        if (*ptr == '=')
            ptr++;

        /* Do the "@" expansion. */
        while (*ptr) {
            if (*ptr == '@') {
                strcat(&expanded[i], LXW_THIS_ROW);
                i += sizeof(LXW_THIS_ROW) - 1;
            }
            else {
                expanded[i] = *ptr;
                i++;
            }

            ptr++;
        }
    }

    return expanded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x2ff56
leaq 0x1(%rbx), %rax
xorl %r14d, %r14d
movb (%rax), %cl
xorl %edx, %edx
cmpb $0x40, %cl
sete %dl
addq %rdx, %r14
incq %rax
testb %cl, %cl
jne 0x2ff40
jmp 0x2ff59
xorl %r14d, %r14d
testq %r14, %r14
je 0x2ffe5
movq %rbx, %rdi
callq 0xc480
leaq (%r14,%r14,2), %rcx
leaq (%r14,%rcx,4), %rsi
addq %rax, %rsi
movl $0x1, %edi
callq 0xc7f0
testq %rax, %rax
je 0x2fffb
movq %rax, %r14
xorl %r15d, %r15d
cmpb $0x3d, (%rbx)
sete %r15b
addq %rbx, %r15
xorl %r12d, %r12d
movabsq $0x522073696854235b, %r13 # imm = 0x522073696854235B
movabsq $0x2c5d776f522073, %rbp # imm = 0x2C5D776F522073
movzbl (%r15), %eax
cmpl $0x40, %eax
je 0x2ffc3
testl %eax, %eax
je 0x2fffe
movb %al, (%r14,%r12)
movl $0x1, %eax
jmp 0x2ffdd
leaq (%r14,%r12), %rbx
movq %rbx, %rdi
callq 0xc480
movq %r13, (%rax,%rbx)
movq %rbp, 0x5(%rax,%rbx)
movl $0xc, %eax
addq %rax, %r12
incq %r15
jmp 0x2ffab
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc0e0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: write_column_function
void
_write_column_function(lxw_worksheet *self, lxw_row_t row, lxw_col_t col,
                       lxw_table_column *column)
{
    size_t offset;
    char formula[LXW_MAX_ATTRIBUTE_LENGTH];
    lxw_format *format = column->format;
    uint8_t total_function = column->total_function;
    double value = column->total_value;
    const char *header = column->header;

    /* Write the subtotal formula number. */
    lxw_snprintf(formula, LXW_MAX_ATTRIBUTE_LENGTH, "SUBTOTAL(%d,[",
                 total_function);

    /* Copy the header string but escape any special characters. Note, this is
     * guaranteed to fit in the 2k buffer since the header is max 255
     * characters, checked in _set_custom_table_columns(). */
    offset = strlen(formula);
    while (*header) {
        switch (*header) {
            case '\'':
            case '#':
            case '[':
            case ']':
                formula[offset++] = '\'';
                formula[offset] = *header;
                break;
            default:
                formula[offset] = *header;
                break;
        }
        offset++;
        header++;
    }

    /* Write the end of the string. */
    memcpy(&formula[offset], "])\0", sizeof("])\0"));

    worksheet_write_formula_num(self, row, col, formula, format, value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r15
movq (%rcx), %r13
movq 0x28(%rcx), %r14
movzbl 0x18(%rcx), %eax
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x16a91(%rip), %rdx     # 0x46be3
leaq 0x10(%rsp), %r12
movl $0x820, %esi            # imm = 0x820
movq %r12, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0xc570
movq %r12, %rdi
callq 0xc480
movabsq $0x500000000000011, %rcx # imm = 0x500000000000011
movb (%r13), %dl
movzbl %dl, %esi
leal -0x23(%rsi), %edi
cmpl $0x3a, %edi
ja 0x301a7
btq %rdi, %rcx
jae 0x301a7
movb $0x27, 0x10(%rsp,%rax)
incq %rax
movb (%r13), %dl
movb %dl, 0x10(%rsp,%rax)
incq %rax
incq %r13
jmp 0x3017a
testl %esi, %esi
jne 0x3019b
movl $0x295d, 0x10(%rsp,%rax) # imm = 0x295D
movzwl %bp, %edx
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %r8
movsd 0x8(%rsp), %xmm0
callq 0xcd00
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_formula_num
lxw_error
worksheet_write_formula_num(lxw_worksheet *self,
                            lxw_row_t row_num,
                            lxw_col_t col_num,
                            const char *formula,
                            lxw_format *format, double result)
{
    lxw_cell *cell;
    char *formula_copy;
    lxw_error err;

    if (!formula)
        return LXW_ERROR_NULL_PARAMETER_IGNORED;

    err = _check_dimensions(self, row_num, col_num, LXW_FALSE, LXW_FALSE);
    if (err)
        return err;

    /* Strip leading "=" from formula. */
    if (formula[0] == '=')
        formula_copy = lxw_strdup(formula + 1);
    else
        formula_copy = lxw_strdup(formula);

    cell = _new_formula_cell(row_num, col_num, formula_copy, format);
    cell->formula_result = result;

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
testq %rcx, %rcx
je 0x30260
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rcx, %r12
movl %esi, %ebx
movq %rdi, %r14
movsd %xmm0, 0x8(%rsp)
movzwl %dx, %ebp
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x30253
xorl %edi, %edi
cmpb $0x3d, (%r12)
sete %dil
addq %r12, %rdi
callq 0xcce0
movl %ebx, %edi
movl %ebp, %esi
movq %rax, %rdx
movq %r15, %rcx
callq 0x39cae
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x28(%rax)
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x39b8a
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xc, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: write_table_column_data
void
_write_table_column_data(lxw_worksheet *self, lxw_table_obj *table_obj)
{
    uint16_t i;
    lxw_table_column *column;
    lxw_table_column **columns = table_obj->columns;

    lxw_col_t col;
    lxw_row_t first_row = table_obj->first_row;
    lxw_col_t first_col = table_obj->first_col;
    lxw_row_t last_row = table_obj->last_row;
    lxw_row_t first_data_row = first_row;
    lxw_row_t last_data_row = last_row;

    if (!table_obj->no_header_row)
        first_data_row++;

    if (table_obj->total_row)
        last_data_row--;

    for (i = 0; i < table_obj->num_cols; i++) {
        col = first_col + i;
        column = columns[i];

        if (table_obj->no_header_row == LXW_FALSE)
            worksheet_write_string(self, first_row, col, column->header,
                                   column->header_format);

        if (column->total_string)
            worksheet_write_string(self, last_row, col, column->total_string,
                                   NULL);

        if (column->total_function)
            _write_column_function(self, last_row, col, column);

        if (column->formula)
            _write_column_formula(self, first_data_row, last_data_row, col,
                                  column);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpb $0x1, 0x1d(%rsi)
movl 0x24(%rsi), %eax
movl %eax, 0x14(%rsp)
adcl $0x0, %eax
movl %eax, 0xc(%rsp)
movl 0x2c(%rsi), %ebx
cmpb $0x1, 0x20(%rsi)
movl %ebx, 0x10(%rsp)
adcl $-0x1, %ebx
cmpw $0x0, 0x32(%rsi)
je 0x303cb
movq %rdi, %r14
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rsp)
movzwl 0x28(%rsi), %eax
movq %rax, 0x18(%rsp)
xorl %edx, %edx
movq %rsi, 0x28(%rsp)
movq 0x18(%rsp), %rax
addl %edx, %eax
movq 0x20(%rsp), %rcx
movq %rdx, 0x30(%rsp)
movq (%rcx,%rdx,8), %r13
cmpb $0x0, 0x1d(%rsi)
movzwl %ax, %r12d
jne 0x30346
movq (%r13), %rcx
movq 0x20(%r13), %r8
movq %r14, %rdi
movl 0x14(%rsp), %esi
movl %r12d, %edx
callq 0xc0f0
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0x30361
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl %r12d, %edx
xorl %r8d, %r8d
callq 0xc0f0
cmpb $0x0, 0x18(%r13)
je 0x3037a
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl %r12d, %edx
movq %r13, %rcx
callq 0xc7e0
movq 0x8(%r13), %rbp
testq %rbp, %rbp
je 0x303b1
cmpl %ebx, 0xc(%rsp)
ja 0x303b1
movq 0x28(%r13), %r13
movl 0xc(%rsp), %r15d
xorps %xmm0, %xmm0
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
movq %rbp, %rcx
movq %r13, %r8
callq 0xcd00
incl %r15d
cmpl %ebx, %r15d
jbe 0x30392
movq 0x30(%rsp), %rdx
incq %rdx
movq 0x28(%rsp), %rsi
movzwl 0x32(%rsi), %eax
cmpq %rax, %rdx
jb 0x30310
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: check_table_rows
lxw_error
_check_table_rows(lxw_row_t first_row, lxw_row_t last_row,
                  lxw_table_options *user_options)
{
    lxw_row_t num_non_header_rows = last_row - first_row;

    if (user_options && user_options->no_header_row == LXW_TRUE)
        num_non_header_rows++;

    if (num_non_header_rows == 0) {
        LXW_WARN_FORMAT("worksheet_add_table(): "
                        "table must have at least 1 non-header row.");
        return LXW_ERROR_PARAMETER_VALIDATION;
    }

    return LXW_NO_ERROR;
}

// Assembly:
subl %edi, %esi
testq %rdx, %rdx
je 0x30529
xorl %eax, %eax
cmpb $0x1, 0x8(%rdx)
sete %al
addl %eax, %esi
xorl %eax, %eax
testl %esi, %esi
je 0x30530
retq
pushq %rax
callq 0xe6bb
movl $0xd, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: check_table_name
lxw_error
_check_table_name(lxw_table_options *user_options)
{
    const char *name;
    char *ptr;
    char first[2] = { 0, 0 };

    if (!user_options)
        return LXW_NO_ERROR;

    if (!user_options->name)
        return LXW_NO_ERROR;

    name = user_options->name;

    /* Check table name length. */
    if (lxw_utf8_strlen(name) > 255) {
        LXW_WARN_FORMAT("worksheet_add_table(): "
                        "Table name exceeds Excel's limit of 255.");
        return LXW_ERROR_255_STRING_LENGTH_EXCEEDED;
    }

    /* Check some short invalid names. */
    if (strlen(name) == 1
        && (name[0] == 'C' || name[0] == 'c' || name[0] == 'R'
            || name[0] == 'r')) {
        LXW_WARN_FORMAT1("worksheet_add_table(): "
                         "invalid table name \"%s\".", name);
        return LXW_ERROR_255_STRING_LENGTH_EXCEEDED;
    }

    /* Check for invalid characters in Table name, while trying to allow
     * for utf8 strings. */
    ptr = strpbrk(name, " !\"#$%&'()*+,-/:;<=>?@[\\]^`{|}~");
    if (ptr) {
        LXW_WARN_FORMAT2("worksheet_add_table(): "
                         "invalid character '%c' in table name \"%s\".",
                         *ptr, name);
        return LXW_ERROR_PARAMETER_VALIDATION;
    }

    /* Check for invalid initial character in Table name, while trying to allow
     * for utf8 strings. */
    first[0] = name[0];
    ptr = strpbrk(first, " !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^`{|}~");
    if (ptr) {
        LXW_WARN_FORMAT2("worksheet_add_table(): "
                         "invalid first character '%c' in table name \"%s\".",
                         *ptr, name);
        return LXW_ERROR_PARAMETER_VALIDATION;
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movw $0x0, 0x6(%rsp)
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x305c0
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x305c0
movq %rbx, %rdi
callq 0xd0d0
cmpq $0x100, %rax            # imm = 0x100
jae 0x305e6
movq %rbx, %rdi
callq 0xc480
cmpq $0x1, %rax
jne 0x30592
movzbl (%rbx), %eax
addl $-0x43, %eax
cmpl $0x2f, %eax
ja 0x30592
movabsq $0x800100008001, %rcx   # imm = 0x800100008001
btq %rax, %rcx
jb 0x305c9
leaq 0x1672e(%rip), %rsi     # 0x46cc7
movq %rbx, %rdi
callq 0xcb10
testq %rax, %rax
jne 0x305f2
movb (%rbx), %al
leaq 0x6(%rsp), %rdi
movb %al, (%rdi)
leaq 0x1677f(%rip), %rsi     # 0x46d35
callq 0xcb10
testq %rax, %rax
jne 0x30608
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x25a28(%rip), %rax     # 0x55ff8
movq (%rax), %rdi
leaq 0x166b1(%rip), %rsi     # 0x46c8b
movq %rbx, %rdx
xorl %eax, %eax
callq 0xc870
jmp 0x305eb
callq 0xe6d7
movl $0x14, %ebp
jmp 0x305c0
movq 0x259ff(%rip), %rcx     # 0x55ff8
movq (%rcx), %rdi
movsbl (%rax), %edx
leaq 0x166e1(%rip), %rsi     # 0x46ce7
jmp 0x3061c
movq 0x259e9(%rip), %rcx     # 0x55ff8
movq (%rcx), %rdi
movsbl (%rax), %edx
leaq 0x16744(%rip), %rsi     # 0x46d60
movq %rbx, %rcx
xorl %eax, %eax
callq 0xc870
movl $0xd, %ebp
jmp 0x305c0
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_position_vml_object
void
_worksheet_position_vml_object(lxw_worksheet *self, lxw_vml_obj *vml_obj)
{
    lxw_object_properties object_props;
    lxw_drawing_object drawing_object;

    object_props.col = vml_obj->start_col;
    object_props.row = vml_obj->start_row;
    object_props.x_offset = vml_obj->x_offset;
    object_props.y_offset = vml_obj->y_offset;
    object_props.width = vml_obj->width;
    object_props.height = vml_obj->height;

    drawing_object.anchor = LXW_OBJECT_DONT_MOVE_DONT_SIZE;

    _worksheet_position_object_pixels(self, &object_props, &drawing_object);

    vml_obj->from.col = drawing_object.from.col;
    vml_obj->from.row = drawing_object.from.row;
    vml_obj->from.col_offset = drawing_object.from.col_offset;
    vml_obj->from.row_offset = drawing_object.from.row_offset;
    vml_obj->to.col = drawing_object.to.col;
    vml_obj->to.row = drawing_object.to.row;
    vml_obj->to.col_offset = drawing_object.to.col_offset;
    vml_obj->to.row_offset = drawing_object.to.row_offset;
    vml_obj->col_absolute = drawing_object.col_absolute;
    vml_obj->row_absolute = drawing_object.row_absolute;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %rbx
movzwl 0xc(%rsi), %eax
leaq 0x88(%rsp), %rsi
movw %ax, 0x1c(%rsi)
movl 0x8(%rbx), %eax
movl %eax, 0x18(%rsi)
movl 0x10(%rbx), %eax
movl %eax, (%rsi)
movl 0x14(%rbx), %eax
movl %eax, 0x4(%rsi)
movl 0x28(%rbx), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x68(%rsi)
movl 0x2c(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x70(%rsi)
leaq 0x8(%rsp), %r14
movb $0x3, 0x1(%r14)
movq %r14, %rdx
callq 0x30be2
movl 0x8(%r14), %eax
movl %eax, 0x58(%rbx)
movl 0xc(%r14), %eax
movl %eax, 0x5c(%rbx)
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x60(%rbx)
movsd 0x18(%r14), %xmm0
movsd %xmm0, 0x68(%rbx)
movl 0x20(%r14), %eax
movl %eax, 0x70(%rbx)
movl 0x24(%r14), %eax
movl %eax, 0x74(%rbx)
movsd 0x28(%r14), %xmm0
movsd %xmm0, 0x78(%rbx)
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x80(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x40(%r14), %rax
movq %rax, 0x20(%rbx)
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_position_object_emus
STATIC void
_worksheet_position_object_emus(lxw_worksheet *self,
                                lxw_object_properties *image,
                                lxw_drawing_object *drawing_object)
{

    _worksheet_position_object_pixels(self, image, drawing_object);

    /* Convert the pixel values to EMUs. See above. */
    drawing_object->from.col_offset *= 9525;
    drawing_object->from.row_offset *= 9525;
    drawing_object->to.col_offset *= 9525;
    drawing_object->to.row_offset *= 9525;
    drawing_object->to.col_offset += 0.5;
    drawing_object->to.row_offset += 0.5;
    drawing_object->col_absolute *= 9525;
    drawing_object->row_absolute *= 9525;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x30be2
movsd 0x150c7(%rip), %xmm0    # 0x465e8
movsd 0x10(%rbx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
movsd 0x18(%rbx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rbx)
movsd 0x28(%rbx), %xmm1
mulsd %xmm0, %xmm1
mulsd 0x30(%rbx), %xmm0
movsd 0xef7d(%rip), %xmm2     # 0x404d0
addsd %xmm2, %xmm1
movsd %xmm1, 0x28(%rbx)
addsd %xmm2, %xmm0
movsd %xmm0, 0x30(%rbx)
imulq $0x2535, 0x38(%rbx), %rax # imm = 0x2535
movq %rax, 0x38(%rbx)
imulq $0x2535, 0x40(%rbx), %rax # imm = 0x2535
movq %rax, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_prepare_background
void
lxw_worksheet_prepare_background(lxw_worksheet *self,
                                 uint32_t image_ref_id,
                                 lxw_object_properties *object_props)
{
    lxw_rel_tuple *relationship = NULL;
    char filename[LXW_FILENAME_LENGTH];

    STAILQ_INSERT_TAIL(self->image_props, object_props, list_pointers);

    relationship = calloc(1, sizeof(lxw_rel_tuple));
    RETURN_VOID_ON_MEM_ERROR(relationship);

    relationship->type = lxw_strdup("/image");
    GOTO_LABEL_ON_MEM_ERROR(relationship->type, mem_error);

    lxw_snprintf(filename, 32, "../media/image%d.%s", image_ref_id,
                 object_props->extension);

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

    self->external_background_link = relationship;

    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 %rbx
subq $0x88, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
leaq 0xb8(%rdx), %rax
movq $0x0, 0xb8(%rdx)
movq 0x60(%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %rdx, (%rcx)
movq 0x60(%rdi), %rcx
movq %rax, 0x8(%rcx)
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x31da6
movq %rax, %rbx
leaq 0x15139(%rip), %rdi     # 0x46e8d
callq 0xcce0
movq %rax, (%rbx)
testq %rax, %rax
je 0x31dad
movq 0x78(%r15), %r8
leaq 0x15128(%rip), %rdx     # 0x46e94
movq %rsp, %r15
movl $0x20, %esi
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc570
movq %r15, %rdi
callq 0xcce0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x31db4
movq %rbx, 0x2c0(%r14)
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xeafc
jmp 0x31d98
movl $0xddb, %edi            # imm = 0xDDB
jmp 0x31db9
movl $0xde1, %edi            # imm = 0xDE1
movq %rbx, %rsi
callq 0xeab3
jmp 0x31d98
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_prepare_header_vml_objects
void
lxw_worksheet_prepare_header_vml_objects(lxw_worksheet *self,
                                         uint32_t vml_header_id,
                                         uint32_t vml_drawing_id)
{

    lxw_rel_tuple *relationship;
    char filename[LXW_FILENAME_LENGTH];
    char *vml_data_id_str;

    self->vml_header_id = vml_header_id;

    /* Set up the VML relationship for header images. */
    relationship = calloc(1, sizeof(lxw_rel_tuple));
    GOTO_LABEL_ON_MEM_ERROR(relationship, mem_error);

    relationship->type = lxw_strdup("/vmlDrawing");
    GOTO_LABEL_ON_MEM_ERROR(relationship->type, mem_error);

    lxw_snprintf(filename, 32, "../drawings/vmlDrawing%d.vml",
                 vml_drawing_id);

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

    self->external_vml_header_link = relationship;

    /* If this allocation fails it will be dealt with in packager.c. */
    vml_data_id_str = calloc(1, sizeof("4294967295"));
    GOTO_LABEL_ON_MEM_ERROR(vml_data_id_str, mem_error);

    lxw_snprintf(vml_data_id_str, sizeof("4294967295"), "%d", vml_header_id);

    self->vml_header_id_str = vml_data_id_str;

    return;

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

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x2e4(%rdi)
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x32427
movq %rax, %r14
leaq 0x14b29(%rip), %rdi     # 0x46ec5
callq 0xcce0
movq %rax, (%r14)
testq %rax, %rax
je 0x3242e
leaq 0x14b1d(%rip), %rdx     # 0x46ed1
movq %rsp, %r12
movl $0x20, %esi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0xc570
movq %r12, %rdi
callq 0xcce0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x32435
movq %r14, 0x2b8(%rbx)
movl $0x1, %edi
movl $0xb, %esi
callq 0xc7f0
testq %rax, %rax
je 0x3243c
movq %rax, %r15
leaq 0x13141(%rip), %rdx     # 0x45540
movl $0xb, %esi
movq %rax, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc570
movq %r15, 0x2d8(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xec71
jmp 0x32417
movl $0xed8, %esi            # imm = 0xED8
jmp 0x32441
movl $0xede, %esi            # imm = 0xEDE
jmp 0x32441
movl $0xee4, %esi            # imm = 0xEE4
xorl %edx, %edx
testq %r14, %r14
sete %dl
movq %r14, %rdi
callq 0xec19
jmp 0x32417
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_prepare_tables
void
lxw_worksheet_prepare_tables(lxw_worksheet *self, uint32_t table_id)
{
    lxw_table_obj *table_obj;
    lxw_rel_tuple *relationship;
    char name[LXW_ATTR_32];
    char filename[LXW_FILENAME_LENGTH];

    STAILQ_FOREACH(table_obj, self->table_objs, list_pointers) {

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

        relationship->type = lxw_strdup("/table");
        GOTO_LABEL_ON_MEM_ERROR(relationship->type, mem_error);

        lxw_snprintf(filename, LXW_FILENAME_LENGTH,
                     "../tables/table%d.xml", table_id);

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

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

        if (!table_obj->name) {
            lxw_snprintf(name, LXW_ATTR_32, "Table%d", table_id);
            table_obj->name = lxw_strdup(name);
            GOTO_LABEL_ON_MEM_ERROR(table_obj->name, mem_error);
        }
        table_obj->id = table_id;
        table_id++;
    }

    return;

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

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq 0x98(%rdi), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x32569
movl %esi, %ebx
movq %rdi, %r14
leaq 0x14a92(%rip), %r12     # 0x46f15
leaq 0x30(%rsp), %r13
movq %rdi, 0x8(%rsp)
movl $0x1, %edi
movl $0x20, %esi
callq 0xc7f0
testq %rax, %rax
je 0x3257b
movq %rax, %rbp
leaq 0x14a5f(%rip), %rdi     # 0x46f0e
callq 0xcce0
movq %rax, (%rbp)
testq %rax, %rax
je 0x32582
movl $0x80, %esi
movq %r13, %rdi
movq %r12, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0xc570
movq %r13, %rdi
callq 0xcce0
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x32589
leaq 0x18(%rbp), %rax
movq $0x0, 0x18(%rbp)
movq 0x238(%r14), %rcx
movq 0x8(%rcx), %rcx
movq %rbp, (%rcx)
movq 0x238(%r14), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, (%r15)
jne 0x32553
movl $0x20, %esi
movq %r13, %r14
movq %r12, %r13
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0x149fc(%rip), %rdx     # 0x46f2b
movl %ebx, %ecx
xorl %eax, %eax
callq 0xc570
movq %r12, %rdi
movq %r13, %r12
movq %r14, %r13
movq 0x8(%rsp), %r14
callq 0xcce0
movq %rax, (%r15)
testq %rax, %rax
je 0x32590
movl %ebx, 0x34(%r15)
incl %ebx
movq 0x1078(%r15), %r15
testq %r15, %r15
jne 0x3248d
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xeced
jmp 0x32569
movl $0xf08, %esi            # imm = 0xF08
jmp 0x32595
movl $0xf0e, %esi            # imm = 0xF0E
jmp 0x32595
movl $0xf16, %esi            # imm = 0xF16
xorl %edx, %edx
testq %rbp, %rbp
sete %dl
movq %rbp, %rdi
callq 0xec95
jmp 0x32569
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: lxw_worksheet_write_single_row
void
lxw_worksheet_write_single_row(lxw_worksheet *self)
{
    lxw_row *row = self->optimize_row;
    lxw_col_t col;

    /* skip row if it doesn't contain row formatting, cell data or a comment. */
    if (!(row->row_changed || row->data_changed))
        return;

    /* Write the cells if the row contains data. */
    if (!row->data_changed) {
        /* Row data only. No cells. */
        _write_row(self, row, NULL);
    }
    else {
        /* Row and cell data. */
        _write_row(self, row, NULL);

        for (col = self->dim_colmin; col <= self->dim_colmax; col++) {
            if (self->array[col]) {
                _write_cell(self, self->array[col], row->format);
                _free_cell(self->array[col]);
                self->array[col] = NULL;
            }
        }

        lxw_xml_end_tag(self->file, "row");
    }

    /* Reset the row. */
    row->height = LXW_DEF_ROW_HEIGHT;
    row->format = NULL;
    row->hidden = LXW_FALSE;
    row->level = 0;
    row->collapsed = LXW_FALSE;
    row->data_changed = LXW_FALSE;
    row->row_changed = LXW_FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x120(%rdi), %rbx
cmpb $0x0, 0x1b(%rbx)
jne 0x329fc
cmpb $0x0, 0x1c(%rbx)
je 0x32a8e
movb 0x1c(%rbx), %bpl
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x32a97
testb %bpl, %bpl
je 0x32a76
movzwl 0xac(%r14), %r15d
cmpw 0xae(%r14), %r15w
ja 0x32a67
movq 0x38(%r14), %rax
movzwl %r15w, %r15d
movq (%rax,%r15,8), %rsi
testq %rsi, %rsi
je 0x32a62
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x32d7e
movq 0x38(%r14), %rax
leal (,%r15,8), %r12d
movq (%rax,%r12), %rdi
callq 0x2fbaa
movq 0x38(%r14), %rax
movq $0x0, (%rax,%r12)
incl %r15d
jmp 0x32a1a
movq (%r14), %rdi
leaq 0xfca0(%rip), %rsi      # 0x42711
callq 0xc060
movabsq $0x402e000000000000, %rax # imm = 0x402E000000000000
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x15(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: validate_conditional_top
lxw_error
_validate_conditional_top(lxw_cond_format_obj *cond_format,
                          lxw_conditional_format *user_options)
{
    /* Restrict the range of rank values to Excel's allowed range. */
    if (user_options->criteria ==
        LXW_CONDITIONAL_CRITERIA_TOP_OR_BOTTOM_PERCENT) {
        if (user_options->value < 0.0 || user_options->value > 100.0) {

            LXW_WARN_FORMAT1("worksheet_conditional_format_cell()/_range(): "
                             "For type = LXW_CONDITIONAL_TYPE_TOP/BOTTOM, "
                             "top/bottom percent (%g%%) must by in range 0-100",
                             user_options->value);

            return LXW_ERROR_PARAMETER_VALIDATION;
        }
    }
    else {
        if (user_options->value < 1.0 || user_options->value > 1000.0) {

            LXW_WARN_FORMAT1("worksheet_conditional_format_cell()/_range(): "
                             "For type = LXW_CONDITIONAL_TYPE_TOP/BOTTOM, "
                             "top/bottom items (%g) must by in range 1-1000",
                             user_options->value);

            return LXW_ERROR_PARAMETER_VALIDATION;
        }
    }

    cond_format->min_value = (uint16_t) user_options->value;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rax
cmpb $0x21, 0x1(%rsi)
movsd 0x8(%rsi), %xmm0
jne 0x33f87
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x33f74
ucomisd 0xc566(%rip), %xmm0     # 0x404d8
jbe 0x33f9f
movq 0x2207d(%rip), %rax     # 0x55ff8
movq (%rax), %rdi
leaq 0x130f3(%rip), %rsi     # 0x47078
jmp 0x33fc8
movsd 0xeab1(%rip), %xmm1     # 0x42a40
ucomisd %xmm0, %xmm1
ja 0x33fb7
ucomisd 0x1266b(%rip), %xmm0    # 0x46608
ja 0x33fb7
cvttsd2si 0x8(%rsi), %eax
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rdi)
xorl %eax, %eax
popq %rcx
retq
movq 0x2203a(%rip), %rax     # 0x55ff8
movq (%rax), %rdi
leaq 0x13147(%rip), %rsi     # 0x4710f
movb $0x1, %al
callq 0xc870
movl $0xd, %eax
jmp 0x33fb5
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: validate_conditional_cell
lxw_error
_validate_conditional_cell(lxw_cond_format_obj *cond_format,
                           lxw_conditional_format *user_options)
{
    cond_format->min_value = user_options->value;
    cond_format->min_value_string =
        lxw_strdup_formula(user_options->value_string);

    if (cond_format->criteria == LXW_CONDITIONAL_CRITERIA_BETWEEN
        || cond_format->criteria == LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN) {
        cond_format->has_max = LXW_TRUE;
        cond_format->min_value = user_options->min_value;
        cond_format->max_value = user_options->max_value;
        cond_format->min_value_string =
            lxw_strdup_formula(user_options->min_value_string);
        cond_format->max_value_string =
            lxw_strdup_formula(user_options->max_value_string);
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rdi)
movq 0x10(%rsi), %rdi
callq 0xc0e0
movq %rax, 0x10(%rbx)
movb 0x1(%rbx), %al
addb $-0x7, %al
cmpb $0x1, %al
ja 0x34132
movb $0x1, 0x74(%rbx)
movsd 0x20(%r14), %xmm0
movsd %xmm0, 0x8(%rbx)
movsd 0x50(%r14), %xmm0
movsd %xmm0, 0x38(%rbx)
movq 0x28(%r14), %rdi
callq 0xc0e0
movq %rax, 0x10(%rbx)
movq 0x58(%r14), %rdi
callq 0xc0e0
movq %rax, 0x40(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_page_margins
STATIC void
_worksheet_write_page_margins(lxw_worksheet *self)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    double left = self->margin_left;
    double right = self->margin_right;
    double top = self->margin_top;
    double bottom = self->margin_bottom;
    double header = self->margin_header;
    double footer = self->margin_footer;

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_DBL("left", left);
    LXW_PUSH_ATTRIBUTES_DBL("right", right);
    LXW_PUSH_ATTRIBUTES_DBL("top", top);
    LXW_PUSH_ATTRIBUTES_DBL("bottom", bottom);
    LXW_PUSH_ATTRIBUTES_DBL("header", header);
    LXW_PUSH_ATTRIBUTES_DBL("footer", footer);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movsd 0x168(%rdi), %xmm0
movsd 0x170(%rdi), %xmm1
movsd %xmm1, (%rsp)
movsd 0x178(%rdi), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x180(%rdi), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x188(%rdi), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x190(%rdi), %xmm1
movsd %xmm1, 0x20(%rsp)
xorl %r15d, %r15d
leaq 0x28(%rsp), %rbx
movq %r15, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x10aab(%rip), %rdi     # 0x45649
callq 0xcc80
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 0xeb6f(%rip), %rdi      # 0x43735
movsd (%rsp), %xmm0
callq 0xcc80
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
leaq 0xeb4e(%rip), %rdi      # 0x4373b
movsd 0x8(%rsp), %xmm0
callq 0xcc80
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
leaq 0xeb2a(%rip), %rdi      # 0x4373f
movsd 0x10(%rsp), %xmm0
callq 0xcc80
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
leaq 0xce76(%rip), %rdi      # 0x41ab3
movsd 0x18(%rsp), %xmm0
callq 0xcc80
leaq (%rax,%r12), %rcx
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
leaq 0xce59(%rip), %rdi      # 0x41abe
movsd 0x20(%rsp), %xmm0
callq 0xcc80
addq %rax, %r12
movq %r15, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r12, 0x8(%rbx)
movq (%r14), %rdi
leaq 0xce38(%rip), %rsi      # 0x41ac7
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x34cc1
movq 0x1040(%rdi), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
jne 0x34cb5
movq %rbx, 0x30(%rsp)
callq 0xc0c0
movq 0x28(%rsp), %rdi
jmp 0x34c9a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq