// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: worksheet_set_column_opt
lxw_error
worksheet_set_column_opt(lxw_worksheet *self,
                         lxw_col_t firstcol,
                         lxw_col_t lastcol,
                         double width,
                         lxw_format *format,
                         lxw_row_col_options *user_options)
{
    lxw_col_options *copied_options;
    uint8_t ignore_row = LXW_TRUE;
    uint8_t ignore_col = LXW_TRUE;
    uint8_t hidden = LXW_FALSE;
    uint8_t level = 0;
    uint8_t collapsed = LXW_FALSE;
    lxw_col_t col;
    lxw_error err;

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

    /* Ensure second col is larger than first. */
    if (firstcol > lastcol) {
        lxw_col_t tmp = firstcol;
        firstcol = lastcol;
        lastcol = tmp;
    }

    /* Ensure that the cols are valid and store max and min values.
     * NOTE: The check shouldn't modify the row dimensions and should only
     *       modify the column dimensions in certain cases. */
    if (format != NULL || (width != LXW_DEF_COL_WIDTH && hidden))
        ignore_col = LXW_FALSE;

    err = _check_dimensions(self, 0, firstcol, ignore_row, ignore_col);

    if (!err)
        err = _check_dimensions(self, 0, lastcol, ignore_row, ignore_col);

    if (err)
        return err;

    /* Resize the col_options array if required. */
    if (firstcol >= self->col_options_max) {
        lxw_col_t col_tmp;
        lxw_col_t old_size = self->col_options_max;
        lxw_col_t new_size = _next_power_of_two(firstcol + 1);
        lxw_col_options **new_ptr = realloc(self->col_options,
                                            new_size *
                                            sizeof(lxw_col_options *));

        if (new_ptr) {
            for (col_tmp = old_size; col_tmp < new_size; col_tmp++)
                new_ptr[col_tmp] = NULL;

            self->col_options = new_ptr;
            self->col_options_max = new_size;
        }
        else {
            return LXW_ERROR_MEMORY_MALLOC_FAILED;
        }
    }

    /* Resize the col_formats array if required. */
    if (lastcol >= self->col_formats_max) {
        lxw_col_t col;
        lxw_col_t old_size = self->col_formats_max;
        lxw_col_t new_size = _next_power_of_two(lastcol + 1);
        lxw_format **new_ptr = realloc(self->col_formats,
                                       new_size * sizeof(lxw_format *));

        if (new_ptr) {
            for (col = old_size; col < new_size; col++)
                new_ptr[col] = NULL;

            self->col_formats = new_ptr;
            self->col_formats_max = new_size;
        }
        else {
            return LXW_ERROR_MEMORY_MALLOC_FAILED;
        }
    }

    /* Store the column options. */
    copied_options = calloc(1, sizeof(lxw_col_options));
    RETURN_ON_MEM_ERROR(copied_options, LXW_ERROR_MEMORY_MALLOC_FAILED);

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

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

    /* Set the column properties. */
    copied_options->firstcol = firstcol;
    copied_options->lastcol = lastcol;
    copied_options->width = width;
    copied_options->format = format;
    copied_options->hidden = hidden;
    copied_options->level = level;
    copied_options->collapsed = collapsed;

    free(self->col_options[firstcol]);
    self->col_options[firstcol] = copied_options;

    /* Store the column formats for use when writing cell data. */
    for (col = firstcol; col <= lastcol; col++) {
        self->col_formats[col] = format;
    }

    /* Store the column change to allow optimizations. */
    self->col_size_changed = LXW_TRUE;

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movw %dx, %ax
movw %si, %dx
movq %rdi, -0x10(%rbp)
movw %dx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb $0x1, -0x39(%rbp)
movb $0x1, -0x3a(%rbp)
movb $0x0, -0x3b(%rbp)
movb $0x0, -0x3c(%rbp)
movb $0x0, -0x3d(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x520ff
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x3b(%rbp)
movq -0x30(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x3d(%rbp)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jle 0x52123
movw -0x12(%rbp), %ax
movw %ax, -0x46(%rbp)
movw -0x14(%rbp), %ax
movw %ax, -0x12(%rbp)
movw -0x46(%rbp), %ax
movw %ax, -0x14(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5214a
movsd -0x20(%rbp), %xmm0
movsd 0x1a1b9(%rip), %xmm1    # 0x6c2f0
ucomisd %xmm1, %xmm0
jne 0x52141
jp 0x52141
jmp 0x5214e
movzbl -0x3b(%rbp), %eax
cmpl $0x0, %eax
je 0x5214e
movb $0x0, -0x3a(%rbp)
movq -0x10(%rbp), %rdi
movw -0x12(%rbp), %cx
movb -0x39(%rbp), %al
xorl %esi, %esi
movzwl %cx, %edx
movsbl %al, %ecx
movsbl -0x3a(%rbp), %r8d
callq 0x4ff90
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x52194
movq -0x10(%rbp), %rdi
movw -0x14(%rbp), %cx
movb -0x39(%rbp), %al
xorl %esi, %esi
movzwl %cx, %edx
movsbl %al, %ecx
movsbl -0x3a(%rbp), %r8d
callq 0x4ff90
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x521a5
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x52463
movzwl -0x12(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0xf8(%rcx), %ecx
cmpl %ecx, %eax
jl 0x52263
movq -0x10(%rbp), %rax
movw 0xf8(%rax), %ax
movw %ax, -0x4a(%rbp)
movzwl -0x12(%rbp), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x52470
movw %ax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdi
movzwl -0x4c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0xcc90
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x52255
movw -0x4a(%rbp), %ax
movw %ax, -0x48(%rbp)
movzwl -0x48(%rbp), %eax
movzwl -0x4c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x52235
movq -0x58(%rbp), %rax
movzwl -0x48(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movw -0x48(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x48(%rbp)
jmp 0x5220b
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf0(%rax)
movw -0x4c(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xf8(%rax)
jmp 0x52261
movl $0x1, -0x4(%rbp)
jmp 0x52463
jmp 0x52263
movzwl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x118(%rcx), %ecx
cmpl %ecx, %eax
jl 0x52321
movq -0x10(%rbp), %rax
movw 0x118(%rax), %ax
movw %ax, -0x5c(%rbp)
movzwl -0x14(%rbp), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x52470
movw %ax, -0x5e(%rbp)
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdi
movzwl -0x5e(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0xcc90
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x52313
movw -0x5c(%rbp), %ax
movw %ax, -0x5a(%rbp)
movzwl -0x5a(%rbp), %eax
movzwl -0x5e(%rbp), %ecx
cmpl %ecx, %eax
jge 0x522f3
movq -0x68(%rbp), %rax
movzwl -0x5a(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movw -0x5a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x5a(%rbp)
jmp 0x522c9
movq -0x68(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movw -0x5e(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x118(%rax)
jmp 0x5231f
movl $0x1, -0x4(%rbp)
jmp 0x52463
jmp 0x52321
movl $0x1, %edi
movl $0x20, %esi
callq 0xc870
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5236b
movq 0x2acb6(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x13d84(%rip), %rsi     # 0x660d0
leaq 0x1a0a1(%rip), %rdx     # 0x6c3f4
movl $0x2206, %ecx           # imm = 0x2206
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x52463
jmp 0x5236d
movzbl -0x3c(%rbp), %eax
cmpl $0x7, %eax
jle 0x5237a
movb $0x7, -0x3c(%rbp)
movzbl -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1ab(%rcx), %ecx
cmpl %ecx, %eax
jle 0x5239a
movb -0x3c(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1ab(%rax)
movw -0x12(%rbp), %cx
movq -0x38(%rbp), %rax
movw %cx, (%rax)
movw -0x14(%rbp), %cx
movq -0x38(%rbp), %rax
movw %cx, 0x2(%rax)
movsd -0x20(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movb -0x3b(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, 0x18(%rax)
movb -0x3c(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, 0x19(%rax)
movb -0x3d(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, 0x1a(%rax)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movzwl -0x12(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xc0d0
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movzwl -0x12(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movw -0x12(%rbp), %ax
movw %ax, -0x40(%rbp)
movzwl -0x40(%rbp), %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jg 0x52451
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
movzwl -0x40(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movw -0x40(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x40(%rbp)
jmp 0x52420
movq -0x10(%rbp), %rax
movb $0x1, 0x11a(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)