LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_drawings
STATIC void
_worksheet_write_drawings(lxw_worksheet *self)
{
    if (!self->drawing)
        return;

    self->rel_count++;

    _worksheet_write_drawing(self, self->rel_count);
}

// Assembly:
cmpq $0x0, 0x290(%rdi)
je 0x34d98
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rdi, %r14
movl 0x134(%rdi), %eax
incl %eax
movw %ax, 0x134(%rdi)
movzwl %ax, %ecx
leaq 0xda62(%rip), %rdx      # 0x42769
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0xc570
movq %rsp, %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0xda40(%rip), %rdi      # 0x4276f
movq %r15, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x1207f(%rip), %rsi     # 0x46dd9
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x34d8a
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x34d7f
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x34d65
addq $0x838, %rsp            # imm = 0x838
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: worksheet_write_header_footer
STATIC void
_worksheet_write_header_footer(lxw_worksheet *self)
{
    if (!self->header_footer_changed)
        return;

    lxw_xml_start_tag(self->file, "headerFooter", NULL);

    if (self->header)
        _worksheet_write_odd_header(self);

    if (self->footer)
        _worksheet_write_odd_footer(self);

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

// Assembly:
cmpb $0x0, 0x1ac(%rdi)
je 0x358e4
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xc20a(%rip), %rsi      # 0x41a9d
xorl %edx, %edx
callq 0xc350
movq 0x1b0(%rbx), %rdx
testq %rdx, %rdx
je 0x358b7
movq (%rbx), %rdi
leaq 0x13225(%rip), %rsi     # 0x48ad5
xorl %ecx, %ecx
callq 0xcb30
movq 0x1b8(%rbx), %rdx
testq %rdx, %rdx
je 0x358d4
movq (%rbx), %rdi
leaq 0x13212(%rip), %rsi     # 0x48adf
xorl %ecx, %ecx
callq 0xcb30
movq (%rbx), %rdi
leaq 0xc1bf(%rip), %rsi      # 0x41a9d
popq %rbx
jmp 0xc060
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_number
lxw_error
worksheet_write_number(lxw_worksheet *self,
                       lxw_row_t row_num,
                       lxw_col_t col_num, double value, lxw_format *format)
{
    lxw_cell *cell;
    lxw_error err;

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

    cell = _new_number_cell(row_num, col_num, value, format);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movsd %xmm0, (%rsp)
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x39a9b
movzwl %bp, %ebp
movl %ebx, %edi
movl %ebp, %esi
movsd (%rsp), %xmm0
movq %r15, %rdx
callq 0x39b2b
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x39b8a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: check_dimensions
STATIC lxw_error
_check_dimensions(lxw_worksheet *self,
                  lxw_row_t row_num,
                  lxw_col_t col_num, int8_t ignore_row, int8_t ignore_col)
{
    if (row_num >= LXW_ROW_MAX)
        return LXW_ERROR_WORKSHEET_INDEX_OUT_OF_RANGE;

    if (col_num >= LXW_COL_MAX)
        return LXW_ERROR_WORKSHEET_INDEX_OUT_OF_RANGE;

    /* In optimization mode we don't change dimensions for rows that are */
    /* already written. */
    if (!ignore_row && !ignore_col && self->optimize) {
        if (row_num < self->optimize_row->row_num)
            return LXW_ERROR_WORKSHEET_INDEX_OUT_OF_RANGE;
    }

    if (!ignore_row) {
        if (row_num < self->dim_rowmin)
            self->dim_rowmin = row_num;
        if (row_num > self->dim_rowmax)
            self->dim_rowmax = row_num;
    }

    if (!ignore_col) {
        if (col_num < self->dim_colmin)
            self->dim_colmin = col_num;
        if (col_num > self->dim_colmax)
            self->dim_colmax = col_num;
    }

    return LXW_NO_ERROR;
}

// Assembly:
cmpl $0x100000, %esi         # imm = 0x100000
setae %al
cmpl $0x4000, %edx           # imm = 0x4000
setae %r9b
orb %al, %r9b
movl $0x17, %eax
jne 0x39af2
movl %r8d, %r9d
orb %cl, %r9b
je 0x39af3
testb %cl, %cl
jne 0x39aeb
cmpl %esi, 0xa4(%rdi)
jbe 0x39add
movl %esi, 0xa4(%rdi)
cmpl %esi, 0xa8(%rdi)
jae 0x39aeb
movl %esi, 0xa8(%rdi)
xorl %eax, %eax
testb %r8b, %r8b
je 0x39b0a
retq
cmpb $0x0, 0x11c(%rdi)
je 0x39acb
movq 0x120(%rdi), %r9
cmpl %esi, (%r9)
jbe 0x39acb
jmp 0x39af2
cmpw %dx, 0xac(%rdi)
jbe 0x39b1a
movw %dx, 0xac(%rdi)
cmpw %dx, 0xae(%rdi)
jae 0x39af2
movw %dx, 0xae(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: new_number_cell
STATIC lxw_cell *
_new_number_cell(lxw_row_t row_num,
                 lxw_col_t col_num, double value, lxw_format *format)
{
    lxw_cell *cell = calloc(1, sizeof(lxw_cell));
    RETURN_ON_MEM_ERROR(cell, cell);

    cell->row_num = row_num;
    cell->col_num = col_num;
    cell->type = NUMBER_CELL;
    cell->format = format;
    cell->u.number = value;

    return cell;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movsd %xmm0, (%rsp)
movl %esi, %ebp
movl %edi, %r15d
movl $0x1, %edi
movl $0x68, %esi
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
je 0x39b83
movl %r15d, (%r14)
movw %bp, 0x4(%r14)
movl $0x1, 0x8(%r14)
movq %rbx, 0x10(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xeeb9
jmp 0x39b75
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: insert_cell
STATIC void
_insert_cell(lxw_worksheet *self, lxw_row_t row_num, lxw_col_t col_num,
             lxw_cell *cell)
{
    lxw_row *row = _get_row(self, row_num);

    if (!self->optimize) {
        row->data_changed = LXW_TRUE;
        _insert_cell_list(row->cells, cell, col_num);
    }
    else {
        if (row) {
            row->data_changed = LXW_TRUE;

            /* Overwrite an existing cell if necessary. */
            if (self->array[col_num])
                _free_cell(self->array[col_num]);

            self->array[col_num] = cell;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
callq 0x3b01b
cmpb $0x0, 0x11c(%r14)
je 0x39bda
testq %rax, %rax
je 0x39bcf
movb $0x1, 0x1c(%rax)
movq 0x38(%r14), %rax
movzwl %bp, %r15d
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x39bc7
callq 0x2fbaa
movq 0x38(%r14), %rax
movq %rbx, (%rax,%r15,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x1c(%rax)
movq 0x20(%rax), %rdi
movzwl %bp, %edx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3eb8f
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_blank
lxw_error
worksheet_write_blank(lxw_worksheet *self,
                      lxw_row_t row_num, lxw_col_t col_num,
                      lxw_format *format)
{
    lxw_cell *cell;
    lxw_error err;

    /* Blank cells without formatting are ignored by Excel. */
    if (!format)
        return LXW_NO_ERROR;

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

    cell = _new_blank_cell(row_num, col_num, format);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
testq %rcx, %rcx
je 0x39c46
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %esi, %ebx
movq %rdi, %r14
movzwl %dx, %ebp
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x39c3b
movl %ebx, %edi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3a049
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x39b8a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: new_string_cell
STATIC lxw_cell *
_new_string_cell(lxw_row_t row_num,
                 lxw_col_t col_num, int32_t string_id, char *sst_string,
                 lxw_format *format)
{
    lxw_cell *cell = calloc(1, sizeof(lxw_cell));
    RETURN_ON_MEM_ERROR(cell, cell);

    cell->row_num = row_num;
    cell->col_num = col_num;
    cell->type = STRING_CELL;
    cell->format = format;
    cell->u.string_id = string_id;
    cell->sst_string = sst_string;

    return cell;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r12d
movl %edi, %r13d
movl $0x1, %edi
movl $0x68, %esi
callq 0xc7f0
movq %rax, %r15
testq %rax, %rax
je 0x39ca7
movl %r13d, (%r15)
movw %r12w, 0x4(%r15)
movl $0x2, 0x8(%r15)
movq %r14, 0x10(%r15)
movl %ebp, 0x20(%r15)
movq %rbx, 0x40(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xeedd
jmp 0x39c95
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: new_formula_cell
STATIC lxw_cell *
_new_formula_cell(lxw_row_t row_num,
                  lxw_col_t col_num, char *formula, lxw_format *format)
{
    lxw_cell *cell = calloc(1, sizeof(lxw_cell));
    RETURN_ON_MEM_ERROR(cell, cell);

    cell->row_num = row_num;
    cell->col_num = col_num;
    cell->type = FORMULA_CELL;
    cell->format = format;
    cell->u.string = formula;

    return cell;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r12d
movl $0x1, %edi
movl $0x68, %esi
callq 0xc7f0
movq %rax, %r15
testq %rax, %rax
je 0x39cfc
movl %r12d, (%r15)
movw %bp, 0x4(%r15)
movl $0x5, 0x8(%r15)
movq %r14, 0x10(%r15)
movq %rbx, 0x20(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xef01
jmp 0x39cf0
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_formula_str
lxw_error
worksheet_write_formula_str(lxw_worksheet *self,
                            lxw_row_t row_num,
                            lxw_col_t col_num,
                            const char *formula,
                            lxw_format *format, const char *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->user_data2 = lxw_strdup(result);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
testq %rcx, %rcx
je 0x39d86
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movl %esi, %ebx
movq %rdi, %r14
movzwl %dx, %ebp
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x39d77
xorl %edi, %edi
cmpb $0x3d, (%r13)
sete %dil
addq %r13, %rdi
callq 0xcce0
movl %ebx, %edi
movl %ebp, %esi
movq %rax, %rdx
movq %r12, %rcx
callq 0x39cae
movq %rax, %r12
movq %r15, %rdi
callq 0xcce0
movq %rax, 0x38(%r12)
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %r12, %rcx
callq 0x39b8a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
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: new_blank_cell
STATIC lxw_cell *
_new_blank_cell(lxw_row_t row_num, lxw_col_t col_num, lxw_format *format)
{
    lxw_cell *cell = calloc(1, sizeof(lxw_cell));
    RETURN_ON_MEM_ERROR(cell, cell);

    cell->row_num = row_num;
    cell->col_num = col_num;
    cell->type = BLANK_CELL;
    cell->format = format;

    return cell;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r15d
movl $0x1, %edi
movl $0x68, %esi
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
je 0x3a091
movl %r15d, (%r14)
movw %bp, 0x4(%r14)
movl $0x8, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xef6d
jmp 0x3a083
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_boolean
lxw_error
worksheet_write_boolean(lxw_worksheet *self,
                        lxw_row_t row_num, lxw_col_t col_num,
                        int value, lxw_format *format)
{
    lxw_cell *cell;
    lxw_error err;

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

    cell = _new_boolean_cell(row_num, col_num, value, format);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x3a107
movl $0x1, %edi
movl $0x68, %esi
callq 0xc7f0
movq %rax, %r13
testq %rax, %rax
je 0x3a116
movl %ebx, (%r13)
movw %bp, 0x4(%r13)
movl $0x9, 0x8(%r13)
movq %r12, 0x10(%r13)
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x20(%r13)
movzwl %bp, %edx
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rcx
callq 0x39b8a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xef91
jmp 0x3a0f5
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_datetime
lxw_error
worksheet_write_datetime(lxw_worksheet *self,
                         lxw_row_t row_num,
                         lxw_col_t col_num, lxw_datetime *datetime,
                         lxw_format *format)
{
    lxw_cell *cell;
    double excel_date;
    lxw_error err;

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

    excel_date = lxw_datetime_to_excel_date_epoch(datetime, LXW_EPOCH_1900);

    cell = _new_number_cell(row_num, col_num, excel_date, format);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x3a16a
movq %r12, %rdi
xorl %esi, %esi
callq 0xcc40
movzwl %bp, %ebp
movl %ebx, %edi
movl %ebp, %esi
movq %r15, %rdx
callq 0x39b2b
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x39b8a
xorl %eax, %eax
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: worksheet_write_unixtime
lxw_error
worksheet_write_unixtime(lxw_worksheet *self,
                         lxw_row_t row_num,
                         lxw_col_t col_num,
                         int64_t unixtime, lxw_format *format)
{
    lxw_cell *cell;
    double excel_date;
    lxw_error err;

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

    excel_date = lxw_unixtime_to_excel_date_epoch(unixtime, LXW_EPOCH_1900);

    cell = _new_number_cell(row_num, col_num, excel_date, format);

    _insert_cell(self, row_num, col_num, cell);

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x3a1c0
movq %r12, %rdi
xorl %esi, %esi
callq 0xca70
movzwl %bp, %ebp
movl %ebx, %edi
movl %ebp, %esi
movq %r15, %rdx
callq 0x39b2b
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x39b8a
xorl %eax, %eax
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: worksheet_set_column_pixels
STATIC double
_pixels_to_width(double pixels)
{
    double max_digit_width = 7.0;
    double padding = 5.0;
    double width;

    if (pixels == LXW_DEF_COL_WIDTH_PIXELS)
        width = LXW_DEF_COL_WIDTH;
    else if (pixels <= 12.0)
        width = pixels / (max_digit_width + padding);
    else
        width = (pixels - padding) / max_digit_width;

    return width;
}

// Assembly:
cmpl $0x40, %ecx
jne 0x3aeb9
movsd 0xb799(%rip), %xmm0     # 0x46650
jmp 0x3aedf
movl %ecx, %eax
cvtsi2sd %rax, %xmm0
cmpl $0xc, %ecx
jbe 0x3aed7
addsd 0xb7eb(%rip), %xmm0     # 0x466b8
divsd 0xb74b(%rip), %xmm0     # 0x46620
jmp 0x3aedf
divsd 0xb749(%rip), %xmm0     # 0x46628
movzwl %si, %esi
movzwl %dx, %edx
movq %r8, %rcx
xorl %r8d, %r8d
jmp 0xc740
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_set_row_opt
lxw_error
worksheet_set_row_opt(lxw_worksheet *self,
                      lxw_row_t row_num,
                      double height,
                      lxw_format *format, lxw_row_col_options *user_options)
{

    lxw_col_t min_col;
    uint8_t hidden = LXW_FALSE;
    uint8_t level = 0;
    uint8_t collapsed = LXW_FALSE;
    lxw_row *row;
    lxw_error err;

    if (user_options) {
        hidden = user_options->hidden;
        level = user_options->level;
        collapsed = user_options->collapsed;
    }

    /* Use minimum col in _check_dimensions(). */
    if (self->dim_colmin != LXW_COL_MAX)
        min_col = self->dim_colmin;
    else
        min_col = 0;

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

    /* If the height is 0 the row is hidden and the height is the default. */
    if (height == 0) {
        hidden = LXW_TRUE;
        height = self->default_row_height;
    }

    /* Ensure the level is <= 7). */
    if (level > 7)
        level = 7;

    if (level > self->outline_row_level)
        self->outline_row_level = level;

    /* Store the row properties. */
    row = _get_row(self, row_num);

    row->height = height;
    row->format = format;
    row->hidden = hidden;
    row->level = level;
    row->collapsed = collapsed;
    row->row_changed = LXW_TRUE;

    if (height != self->default_row_height)
        row->height_changed = LXW_TRUE;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movsd %xmm0, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
xorl %eax, %eax
testq %rcx, %rcx
je 0x3af62
movb (%rcx), %r12b
movb 0x1(%rcx), %r13b
movb 0x2(%rcx), %r15b
jmp 0x3af6b
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %r15d, %r15d
movzwl 0xac(%rbx), %edx
cmpl $0x4000, %edx           # imm = 0x4000
cmovel %eax, %edx
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x3b00c
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x3afaf
jp 0x3afaf
movsd 0x198(%rbx), %xmm0
movsd %xmm0, (%rsp)
movb $0x1, %r12b
movzbl %r13b, %eax
cmpb $0x7, %al
movl $0x7, %r13d
cmovbl %eax, %r13d
cmpb 0x1aa(%rbx), %r13b
jbe 0x3afcf
movb %r13b, 0x1aa(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b01b
movq %rax, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movq %r14, 0x10(%rax)
movb %r12b, 0x18(%rax)
movb %r13b, 0x19(%rax)
movb %r15b, 0x1a(%rax)
movb $0x1, 0x1b(%rax)
xorl %eax, %eax
ucomisd 0x198(%rbx), %xmm0
jne 0x3b008
jnp 0x3b00c
movb $0x1, 0x1d(%rcx)
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: get_row
STATIC lxw_row *
_get_row(lxw_worksheet *self, lxw_row_t row_num)
{
    lxw_row *row;

    if (!self->optimize) {
        row = _get_row_list(self->table, row_num);
        return row;
    }
    else {
        if (row_num < self->optimize_row->row_num) {
            return NULL;
        }
        else if (row_num == self->optimize_row->row_num) {
            return self->optimize_row;
        }
        else {
            /* Flush row. */
            lxw_worksheet_write_single_row(self);
            row = self->optimize_row;
            row->row_num = row_num;
            return row;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x0, 0x11c(%rdi)
je 0x3b03c
movq 0x120(%r14), %rax
cmpl %ebx, (%rax)
jbe 0x3b04e
xorl %eax, %eax
jmp 0x3b061
movq 0x20(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3ee08
je 0x3b061
movq %r14, %rdi
callq 0xc3b0
movq 0x120(%r14), %rax
movl %ebx, (%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: worksheet_autofilter
lxw_error
worksheet_autofilter(lxw_worksheet *self, lxw_row_t first_row,
                     lxw_col_t first_col, lxw_row_t last_row,
                     lxw_col_t last_col)
{
    lxw_row_t tmp_row;
    lxw_col_t tmp_col;
    lxw_error err;
    lxw_filter_rule_obj **filter_rules;
    lxw_col_t num_filter_rules;

    /* Swap last row/col with first row/col as necessary */
    if (first_row > last_row) {
        tmp_row = last_row;
        last_row = first_row;
        first_row = tmp_row;
    }
    if (first_col > last_col) {
        tmp_col = last_col;
        last_col = first_col;
        first_col = tmp_col;
    }

    /* Check that column number is valid and store the max value */
    err = _check_dimensions(self, last_row, last_col, LXW_FALSE, LXW_FALSE);
    if (err)
        return err;

    /* Create a array to hold filter rules. */
    self->autofilter.in_use = LXW_FALSE;
    self->autofilter.has_rules = LXW_FALSE;
    _free_filter_rules(self);
    num_filter_rules = last_col - first_col + 1;
    filter_rules = calloc(num_filter_rules, sizeof(lxw_filter_rule_obj *));
    RETURN_ON_MEM_ERROR(filter_rules, LXW_ERROR_MEMORY_MALLOC_FAILED);

    self->autofilter.in_use = LXW_TRUE;
    self->autofilter.first_row = first_row;
    self->autofilter.first_col = first_col;
    self->autofilter.last_row = last_row;
    self->autofilter.last_col = last_col;

    self->filter_rules = filter_rules;
    self->num_filter_rules = num_filter_rules;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %ebp
cmpl %ecx, %esi
movl %ecx, %r14d
cmoval %esi, %r14d
cmovbl %esi, %ebp
cmpw %bx, %dx
movl %r8d, %r12d
cmoval %edx, %r12d
movq %rdi, %r15
cmovbl %edx, %ebx
movl %r14d, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x39aa6
testl %eax, %eax
jne 0x3b288
movw $0x0, 0x1e4(%r15)
movq %r15, %rdi
callq 0x2fb59
movl %r12d, %r13d
subl %ebx, %r13d
incl %r13d
movzwl %r13w, %edi
movl $0x8, %esi
callq 0xc7f0
testq %rax, %rax
je 0x3b297
movb $0x1, 0x1e4(%r15)
movl %ebp, 0x1e8(%r15)
movw %bx, 0x1f0(%r15)
movl %r14d, 0x1ec(%r15)
movw %r12w, 0x1f2(%r15)
movq %rax, 0x3b0(%r15)
movw %r13w, 0x3b8(%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xf264
movl $0x1, %eax
jmp 0x3b288
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: free_filter_rule
STATIC void
_free_filter_rule(lxw_filter_rule_obj *rule_obj)
{
    uint16_t i;

    if (!rule_obj)
        return;

    free(rule_obj->value1_string);
    free(rule_obj->value2_string);

    if (rule_obj->list) {
        for (i = 0; i < rule_obj->num_list_filters; i++)
            free(rule_obj->list[i]);

        free(rule_obj->list);
    }

    free(rule_obj);
}

// Assembly:
testq %rdi, %rdi
je 0x3b42c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xc0c0
movq 0x20(%rbx), %rdi
callq 0xc0c0
cmpq $0x0, 0x30(%rbx)
je 0x3b41d
cmpw $0x0, 0x28(%rbx)
je 0x3b414
xorl %r14d, %r14d
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0xc0c0
incq %r14
movzwl 0x28(%rbx), %eax
cmpq %rax, %r14
jb 0x3b3fb
movq 0x30(%rbx), %rdi
callq 0xc0c0
movq %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: worksheet_set_h_pagebreaks
lxw_error
worksheet_set_h_pagebreaks(lxw_worksheet *self, lxw_row_t hbreaks[])
{
    uint16_t count = 0;

    if (hbreaks == NULL)
        return LXW_ERROR_NULL_PARAMETER_IGNORED;

    while (hbreaks[count])
        count++;

    /* The Excel 2007 specification says that the maximum number of page
     * breaks is 1026. However, in practice it is actually 1023. */
    if (count > LXW_BREAKS_MAX)
        count = LXW_BREAKS_MAX;

    self->hbreaks = calloc(count, sizeof(lxw_row_t));
    RETURN_ON_MEM_ERROR(self->hbreaks, LXW_ERROR_MEMORY_MALLOC_FAILED);
    memcpy(self->hbreaks, hbreaks, count * sizeof(lxw_row_t));
    self->hbreaks_count = count;

    return LXW_NO_ERROR;
}

// Assembly:
testq %rsi, %rsi
je 0x3c37e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movw $0xffff, %ax            # imm = 0xFFFF
incl %eax
movzwl %ax, %r12d
cmpl $0x0, (%r14,%r12,4)
jne 0x3c320
movl $0x3ff, %eax            # imm = 0x3FF
cmpl %eax, %r12d
cmovael %eax, %r12d
movzwl %r12w, %r15d
movl $0x4, %esi
movq %r15, %rdi
callq 0xc7f0
movq %rax, 0x1f8(%rbx)
testq %rax, %rax
je 0x3c384
shll $0x2, %r15d
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc900
movw %r12w, 0x208(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xc, %eax
retq
callq 0xf529
movl $0x1, %eax
jmp 0x3c372
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_set_v_pagebreaks
lxw_error
worksheet_set_v_pagebreaks(lxw_worksheet *self, lxw_col_t vbreaks[])
{
    uint16_t count = 0;

    if (vbreaks == NULL)
        return LXW_ERROR_NULL_PARAMETER_IGNORED;

    while (vbreaks[count])
        count++;

    /* The Excel 2007 specification says that the maximum number of page
     * breaks is 1026. However, in practice it is actually 1023. */
    if (count > LXW_BREAKS_MAX)
        count = LXW_BREAKS_MAX;

    self->vbreaks = calloc(count, sizeof(lxw_col_t));
    RETURN_ON_MEM_ERROR(self->vbreaks, LXW_ERROR_MEMORY_MALLOC_FAILED);
    memcpy(self->vbreaks, vbreaks, count * sizeof(lxw_col_t));
    self->vbreaks_count = count;

    return LXW_NO_ERROR;
}

// Assembly:
testq %rsi, %rsi
je 0x3c405
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movw $0xffff, %ax            # imm = 0xFFFF
incl %eax
movzwl %ax, %r12d
cmpw $0x0, (%r14,%r12,2)
jne 0x3c3a7
movl $0x3ff, %eax            # imm = 0x3FF
cmpl %eax, %r12d
cmovael %eax, %r12d
movzwl %r12w, %r15d
movl $0x2, %esi
movq %r15, %rdi
callq 0xc7f0
movq %rax, 0x200(%rbx)
testq %rax, %rax
je 0x3c40b
addl %r15d, %r15d
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc900
movw %r12w, 0x20a(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xc, %eax
retq
callq 0xf54d
movl $0x1, %eax
jmp 0x3c3f9
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_protect
void
worksheet_protect(lxw_worksheet *self, const char *password,
                  lxw_protection *options)
{
    struct lxw_protection_obj *protect = &self->protection;

    /* Copy any user parameters to the internal structure. */
    if (options) {
        protect->no_select_locked_cells = options->no_select_locked_cells;
        protect->no_select_unlocked_cells = options->no_select_unlocked_cells;
        protect->format_cells = options->format_cells;
        protect->format_columns = options->format_columns;
        protect->format_rows = options->format_rows;
        protect->insert_columns = options->insert_columns;
        protect->insert_rows = options->insert_rows;
        protect->insert_hyperlinks = options->insert_hyperlinks;
        protect->delete_columns = options->delete_columns;
        protect->delete_rows = options->delete_rows;
        protect->sort = options->sort;
        protect->autofilter = options->autofilter;
        protect->pivot_tables = options->pivot_tables;
        protect->scenarios = options->scenarios;
        protect->objects = options->objects;
    }

    if (password) {
        uint16_t hash = lxw_hash_password(password);
        lxw_snprintf(protect->hash, 5, "%X", hash);
    }

    protect->no_sheet = LXW_FALSE;
    protect->no_content = LXW_TRUE;
    protect->is_configured = LXW_TRUE;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdx, %rdx
je 0x3c4e4
movb (%rdx), %al
movb %al, 0x276(%rbx)
movb 0x1(%rdx), %al
movb %al, 0x277(%rbx)
movb 0x2(%rdx), %al
movb %al, 0x278(%rbx)
movb 0x3(%rdx), %al
movb %al, 0x279(%rbx)
movb 0x4(%rdx), %al
movb %al, 0x27a(%rbx)
movb 0x5(%rdx), %al
movb %al, 0x27b(%rbx)
movb 0x6(%rdx), %al
movb %al, 0x27c(%rbx)
movb 0x7(%rdx), %al
movb %al, 0x27d(%rbx)
movb 0x8(%rdx), %al
movb %al, 0x27e(%rbx)
movb 0x9(%rdx), %al
movb %al, 0x27f(%rbx)
movb 0xa(%rdx), %al
movb %al, 0x280(%rbx)
movb 0xb(%rdx), %al
movb %al, 0x281(%rbx)
movb 0xc(%rdx), %al
movb %al, 0x282(%rbx)
movb 0xd(%rdx), %al
movb %al, 0x283(%rbx)
movb 0xe(%rdx), %al
movb %al, 0x284(%rbx)
testq %rsi, %rsi
je 0x3c50e
movq %rsi, %rdi
callq 0xc840
leaq 0x289(%rbx), %rdi
movzwl %ax, %ecx
leaq 0x5885(%rip), %rdx      # 0x41d87
movl $0x5, %esi
xorl %eax, %eax
callq 0xc570
movw $0x100, 0x287(%rbx)     # imm = 0x100
movb $0x1, 0x285(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_set_background
lxw_error
worksheet_set_background(lxw_worksheet *self, const char *filename)
{
    FILE *image_stream;
    lxw_object_properties *object_props;

    if (!filename) {
        LXW_WARN("worksheet_set_background(): "
                 "filename must be specified.");
        return LXW_ERROR_NULL_PARAMETER_IGNORED;
    }

    /* Check that the image file exists and can be opened. */
    image_stream = lxw_fopen(filename, "rb");
    if (!image_stream) {
        LXW_WARN_FORMAT1("worksheet_set_background(): "
                         "file doesn't exist or can't be opened: %s.",
                         filename);
        return LXW_ERROR_PARAMETER_VALIDATION;
    }

    /* Create a new object to hold the image properties. */
    object_props = calloc(1, sizeof(lxw_object_properties));
    if (!object_props) {
        fclose(image_stream);
        return LXW_ERROR_MEMORY_MALLOC_FAILED;
    }

    /* Copy other options or set defaults. */
    object_props->filename = lxw_strdup(filename);
    object_props->stream = image_stream;
    object_props->is_background = LXW_TRUE;

    if (_get_image_properties(object_props) == LXW_NO_ERROR) {
        _free_object_properties(self->background_image);
        self->background_image = object_props;
        self->has_background_image = LXW_TRUE;
        fclose(image_stream);
        return LXW_NO_ERROR;
    }
    else {
        _free_object_properties(object_props);
        fclose(image_stream);
        return LXW_ERROR_IMAGE_DIMENSIONS;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3ca84
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x361a(%rip), %rsi      # 0x40000
movq %r15, %rdi
callq 0xc250
testq %rax, %rax
je 0x3ca90
movq %rax, %r14
movl $0x1, %edi
movl $0xc0, %esi
callq 0xc7f0
testq %rax, %rax
je 0x3ca4f
movq %rax, %r12
movq %r15, %rdi
callq 0xcce0
movq %rax, 0x20(%r12)
movq %r14, 0x48(%r12)
movb $0x1, 0x99(%r12)
movq %r12, %rdi
callq 0x3332e
testl %eax, %eax
je 0x3ca5e
movq %r12, %rdi
callq 0x2f90a
movq %r14, %rdi
callq 0xc420
movl $0x1a, %eax
jmp 0x3cab0
movq %r14, %rdi
callq 0xc420
movl $0x1, %eax
jmp 0x3cab0
movq 0x3a8(%rbx), %rdi
callq 0x2f90a
movq %r12, 0x3a8(%rbx)
movb $0x1, 0x2a3(%rbx)
movq %r14, %rdi
callq 0xc420
xorl %eax, %eax
jmp 0x3cab0
callq 0xf5c5
movl $0xc, %eax
jmp 0x3cab0
movq 0x19561(%rip), %rax     # 0x55ff8
movq (%rax), %rdi
leaq 0xb29f(%rip), %rsi      # 0x47d40
movq %r15, %rdx
xorl %eax, %eax
callq 0xc870
movl $0xd, %eax
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: worksheet_insert_button
lxw_error
worksheet_insert_button(lxw_worksheet *self, lxw_row_t row_num,
                        lxw_col_t col_num, lxw_button_options *options)
{
    lxw_error err;
    lxw_vml_obj *button;

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

    button = calloc(1, sizeof(lxw_vml_obj));
    GOTO_LABEL_ON_MEM_ERROR(button, mem_error);

    button->row = row_num;
    button->col = col_num;

    /* Set user and default parameters for the button. */
    err = _get_button_params(button, 1 + self->num_buttons, options);
    if (err)
        goto mem_error;

    /* Calculate the worksheet position of the button. */
    _worksheet_position_vml_object(self, button);

    self->has_vml = LXW_TRUE;
    self->has_buttons = LXW_TRUE;
    self->num_buttons++;

    STAILQ_INSERT_TAIL(self->button_objs, button, list_pointers);

    return LXW_NO_ERROR;

mem_error:
    if (button)
        _free_vml_object(button);

    return LXW_ERROR_MEMORY_MALLOC_FAILED;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %ebp
cmpl $0x100000, %esi         # imm = 0x100000
setb %al
cmpl $0x4000, %edx           # imm = 0x4000
setb %cl
xorl %edx, %edx
movl $0x17, %r13d
testb %cl, %al
cmovnel %edx, %r13d
je 0x3d72d
movl %esi, %r12d
movq %rdi, %rbx
movl $0x1, %edi
movl $0xc0, %esi
callq 0xc7f0
movq %rax, %r14
testq %rax, %rax
je 0x3d73f
movl %r12d, (%r14)
movw %bp, 0x4(%r14)
movl 0x160(%rbx), %eax
incl %eax
movzwl %ax, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0xc360
testl %eax, %eax
je 0x3d6dd
movl $0x1, %r13d
testq %r14, %r14
je 0x3d72d
movq %r14, %rdi
callq 0x2f96b
jmp 0x3d72d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcbd0
movb $0x1, %al
movb %al, 0x2a0(%rbx)
movb %al, 0x2a4(%rbx)
incw 0x160(%rbx)
movq %r14, %rax
addq $0xb8, %rax
movq $0x0, 0xb8(%r14)
movq 0x90(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq %r14, (%rcx)
movq 0x90(%rbx), %rcx
movq %rax, 0x8(%rcx)
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xf819
jmp 0x3d6c8
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: write_array_formula_num_cell
STATIC void
_write_array_formula_num_cell(lxw_worksheet *self, lxw_cell *cell)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    char data[LXW_ATTR_32];

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("t", "array");
    LXW_PUSH_ATTRIBUTES_STR("ref", cell->user_data1);

    lxw_sprintf_dbl(data, cell->formula_result);

    lxw_xml_data_element(self->file, "f", cell->u.string, &attributes);
    lxw_xml_data_element(self->file, "v", data, NULL);

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %r14
xorl %r12d, %r12d
movq %rsp, %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x34d2(%rip), %rdi      # 0x41291
leaq 0xa942(%rip), %rsi      # 0x48708
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)
movq 0x30(%r15), %rsi
leaq 0xb741(%rip), %rdi      # 0x49533
callq 0xc030
addq %rax, %r13
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r13, 0x8(%rbx)
movsd 0x28(%r15), %xmm0
leaq 0x3328(%rip), %rdx      # 0x41141
leaq 0x10(%rsp), %r12
movl $0x20, %esi
movq %r12, %rdi
movb $0x1, %al
callq 0xc570
movq (%r14), %rdi
movq 0x20(%r15), %rdx
leaq 0x32ea(%rip), %rsi      # 0x41125
movq %rbx, %rcx
callq 0xcb30
movq (%r14), %rdi
leaq 0x32cb(%rip), %rsi      # 0x41118
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xcb30
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3de7f
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3de74
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x3de5a
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_filter
STATIC void
_worksheet_write_filter(lxw_worksheet *self, const char *str, double num,
                        uint8_t criteria)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    if (criteria == LXW_FILTER_CRITERIA_BLANKS)
        return;

    LXW_INIT_ATTRIBUTES();

    if (str)
        LXW_PUSH_ATTRIBUTES_STR("val", str);
    else
        LXW_PUSH_ATTRIBUTES_DBL("val", num);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
cmpl $0x7, %edx
je 0x3e36d
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
leaq 0x315d(%rip), %rdi      # 0x41454
testq %rsi, %rsi
je 0x3e303
callq 0xc030
jmp 0x3e308
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
leaq 0x8(%rsp), %r14
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
movq (%rbx), %rdi
leaq 0xa877(%rip), %rsi      # 0x48bab
movq %r14, %rdx
callq 0xcc00
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3e366
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x3e35a
movq %r14, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x3e33f
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_custom_filter
STATIC void
_worksheet_write_custom_filter(lxw_worksheet *self, const char *str,
                               double num, uint8_t criteria)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (criteria == LXW_FILTER_CRITERIA_NOT_EQUAL_TO)
        LXW_PUSH_ATTRIBUTES_STR("operator", "notEqual");
    if (criteria == LXW_FILTER_CRITERIA_GREATER_THAN)
        LXW_PUSH_ATTRIBUTES_STR("operator", "greaterThan");
    else if (criteria == LXW_FILTER_CRITERIA_GREATER_THAN_OR_EQUAL_TO)
        LXW_PUSH_ATTRIBUTES_STR("operator", "greaterThanOrEqual");
    else if (criteria == LXW_FILTER_CRITERIA_LESS_THAN)
        LXW_PUSH_ATTRIBUTES_STR("operator", "lessThan");
    else if (criteria == LXW_FILTER_CRITERIA_LESS_THAN_OR_EQUAL_TO)
        LXW_PUSH_ATTRIBUTES_STR("operator", "lessThanOrEqual");

    if (str)
        LXW_PUSH_ATTRIBUTES_STR("val", str);
    else
        LXW_PUSH_ATTRIBUTES_DBL("val", num);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
addb $-0x2, %dl
cmpb $0x4, %dl
ja 0x3e3d9
movzbl %dl, %eax
leaq 0x8559(%rip), %rcx      # 0x468f4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0xa81b(%rip), %rdi      # 0x48bc4
movsd %xmm0, 0x10(%rsp)
callq 0xc030
movsd 0x10(%rsp), %xmm0
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rsp)
leaq 0x3074(%rip), %rdi      # 0x41454
testq %r14, %r14
je 0x3e3ef
movq %r14, %rsi
callq 0xc030
jmp 0x3e3f4
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq %rsp, %r14
movq 0x8(%r14), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%r14)
movq (%rbx), %rdi
leaq 0xa7f0(%rip), %rsi      # 0x48c0e
movq %r14, %rdx
callq 0xcc00
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3e44e
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3e443
movq %r14, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x3e429
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_cfvo_str
STATIC void
_worksheet_write_cfvo_str(lxw_worksheet *self, uint8_t rule_type,
                          char *value, uint8_t data_bar_2010)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MINIMUM)
        LXW_PUSH_ATTRIBUTES_STR("type", "min");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_NUMBER)
        LXW_PUSH_ATTRIBUTES_STR("type", "num");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENT)
        LXW_PUSH_ATTRIBUTES_STR("type", "percent");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENTILE)
        LXW_PUSH_ATTRIBUTES_STR("type", "percentile");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_FORMULA)
        LXW_PUSH_ATTRIBUTES_STR("type", "formula");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MAXIMUM)
        LXW_PUSH_ATTRIBUTES_STR("type", "max");

    if (!data_bar_2010 || (rule_type != LXW_CONDITIONAL_RULE_TYPE_MINIMUM
                           && rule_type != LXW_CONDITIONAL_RULE_TYPE_MAXIMUM))
        LXW_PUSH_ATTRIBUTES_STR("val", value);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
leal -0x1(%r15), %eax
cmpb $0x5, %al
ja 0x3e4bc
movzbl %al, %eax
leaq 0x1792b(%rip), %rcx     # 0x55db8
movq (%rcx,%rax,8), %rsi
leaq 0x40b8(%rip), %rdi      # 0x42550
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
testb %bpl, %bpl
je 0x3e4d0
cmpb $0x1, %r15b
je 0x3e4fe
movzbl %r15b, %eax
cmpl $0x6, %eax
je 0x3e4fe
leaq 0x2f7d(%rip), %rdi      # 0x41454
movq %r14, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%rbx), %rdi
leaq 0xb01c(%rip), %rsi      # 0x49524
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3e53f
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x3e533
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x3e518
addq $0x18, %rsp
popq %rbx
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_cfvo_num
STATIC void
_worksheet_write_cfvo_num(lxw_worksheet *self, uint8_t rule_type,
                          double value, uint8_t data_bar_2010)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;

    LXW_INIT_ATTRIBUTES();

    if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MINIMUM)
        LXW_PUSH_ATTRIBUTES_STR("type", "min");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_NUMBER)
        LXW_PUSH_ATTRIBUTES_STR("type", "num");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENT)
        LXW_PUSH_ATTRIBUTES_STR("type", "percent");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_PERCENTILE)
        LXW_PUSH_ATTRIBUTES_STR("type", "percentile");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_FORMULA)
        LXW_PUSH_ATTRIBUTES_STR("type", "formula");
    else if (rule_type == LXW_CONDITIONAL_RULE_TYPE_MAXIMUM)
        LXW_PUSH_ATTRIBUTES_STR("type", "max");

    if (!data_bar_2010 || (rule_type != LXW_CONDITIONAL_RULE_TYPE_MINIMUM
                           && rule_type != LXW_CONDITIONAL_RULE_TYPE_MAXIMUM))
        LXW_PUSH_ATTRIBUTES_DBL("val", value);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
leal -0x1(%r14), %eax
cmpb $0x5, %al
ja 0x3e5b7
movzbl %al, %eax
leaq 0x1783c(%rip), %rcx     # 0x55db8
movq (%rcx,%rax,8), %rsi
leaq 0x3fc9(%rip), %rdi      # 0x42550
movsd %xmm0, 0x18(%rsp)
callq 0xc030
movsd 0x18(%rsp), %xmm0
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
testb %bpl, %bpl
je 0x3e5cb
cmpb $0x1, %r14b
je 0x3e5f6
movzbl %r14b, %eax
cmpl $0x6, %eax
je 0x3e5f6
leaq 0x2e82(%rip), %rdi      # 0x41454
callq 0xcc80
leaq 0x1040(%rax), %rcx
movq $0x0, 0x1040(%rax)
movq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rcx, 0x10(%rsp)
movq (%rbx), %rdi
leaq 0xaf24(%rip), %rsi      # 0x49524
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3e637
movq 0x1040(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x3e62b
movq %rbx, 0x10(%rsp)
callq 0xc0c0
movq 0x8(%rsp), %rdi
jmp 0x3e610
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_write_color
STATIC void
_worksheet_write_color(lxw_worksheet *self, lxw_color_t color)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    char rgb[LXW_ATTR_32];

    lxw_snprintf(rgb, LXW_ATTR_32, "FF%06X", color & LXW_COLOR_MASK);

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("rgb", rgb);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ecx
movq %rdi, %r14
andl $0xffffff, %ecx         # imm = 0xFFFFFF
leaq 0x4d5c(%rip), %rdx      # 0x433b9
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0xc570
movq %rsp, %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0x4d3b(%rip), %rdi      # 0x433c0
movq %r15, %rsi
callq 0xc030
leaq 0x1040(%rax), %rcx
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rdx
movq %rax, (%rdx)
movq %rcx, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x6dc0(%rip), %rsi      # 0x45470
movq %rbx, %rdx
callq 0xcc00
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3e6e0
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3e6d5
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x3e6bb
addq $0x38, %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: worksheet_write_ext
STATIC void
_worksheet_write_ext(lxw_worksheet *self, char *uri)
{
    struct xml_attribute_list attributes;
    struct xml_attribute *attribute;
    char xmlns_x_14[] =
        "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main";

    LXW_INIT_ATTRIBUTES();
    LXW_PUSH_ATTRIBUTES_STR("xmlns:x14", xmlns_x_14);
    LXW_PUSH_ATTRIBUTES_STR("uri", uri);

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

    LXW_FREE_ATTRIBUTES();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
movq %rdi, %r14
movups 0xaee8(%rip), %xmm0     # 0x495ee
leaq 0x10(%rsp), %rsi
movups %xmm0, 0x2e(%rsi)
movaps 0xaeca(%rip), %xmm0     # 0x495e0
movaps %xmm0, 0x20(%rsi)
movaps 0xaeaf(%rip), %xmm0     # 0x495d0
movaps %xmm0, 0x10(%rsi)
movaps 0xae94(%rip), %xmm0     # 0x495c0
movaps %xmm0, (%rsi)
xorl %r12d, %r12d
movq %rsp, %rbx
movq %r12, (%rbx)
movq %rbx, 0x8(%rbx)
leaq 0xa950(%rip), %rdi      # 0x49093
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)
leaq 0x407b(%rip), %rdi      # 0x427e6
movq %r15, %rsi
callq 0xc030
addq %rax, %r13
movq %r12, 0x1040(%rax)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r13, 0x8(%rbx)
movq (%r14), %rdi
leaq 0x4029(%rip), %rsi      # 0x427bb
movq %rbx, %rdx
callq 0xc350
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3e7c2
movq 0x1040(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
jne 0x3e7b7
movq %rbx, 0x8(%rsp)
callq 0xc0c0
movq (%rsp), %rdi
jmp 0x3e79d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq