// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: set_custom_table_columns
lxw_error
_set_custom_table_columns(lxw_table_obj *table_obj,
                          lxw_table_options *user_options)
{
    char *str;
    uint16_t i;
    lxw_table_column *table_column;
    lxw_table_column *user_column;
    uint16_t num_cols = table_obj->num_cols;
    lxw_table_column **user_columns = user_options->columns;

    for (i = 0; i < num_cols; i++) {

        user_column = user_columns[i];
        table_column = table_obj->columns[i];

        /* NULL indicates end of user input array. */
        if (user_column == NULL)
            return LXW_NO_ERROR;

        if (user_column->header) {
            if (lxw_utf8_strlen(user_column->header) > 255) {
                LXW_WARN_FORMAT("worksheet_add_table(): column parameter "
                                "'header' exceeds Excel length limit of 255.");
                return LXW_ERROR_255_STRING_LENGTH_EXCEEDED;
            }

            str = lxw_strdup(user_column->header);
            RETURN_ON_MEM_ERROR(str, LXW_ERROR_MEMORY_MALLOC_FAILED);

            /* Free the default column header. */
            free((void *) table_column->header);
            table_column->header = str;
        }

        if (user_column->total_string) {
            str = lxw_strdup(user_column->total_string);
            RETURN_ON_MEM_ERROR(str, LXW_ERROR_MEMORY_MALLOC_FAILED);

            table_column->total_string = str;
        }

        if (user_column->formula) {
            str = _expand_table_formula(user_column->formula);
            RETURN_ON_MEM_ERROR(str, LXW_ERROR_MEMORY_MALLOC_FAILED);

            table_column->formula = str;
        }

        table_column->format = user_column->format;
        table_column->total_value = user_column->total_value;
        table_column->header_format = user_column->header_format;
        table_column->total_function = user_column->total_function;
    }

    return LXW_NO_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movw 0x32(%rax), %ax
movw %ax, -0x3a(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movw $0x0, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x47ddb
movq -0x48(%rbp), %rax
movzwl -0x22(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movzwl -0x22(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x47c25
movl $0x0, -0x4(%rbp)
jmp 0x47de2
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x47ccb
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0xd180
cmpq $0xff, %rax
jbe 0x47c6b
movq 0x353aa(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x24a17(%rip), %rsi     # 0x6c66f
movb $0x0, %al
callq 0xc8f0
movl $0x14, -0x4(%rbp)
jmp 0x47de2
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0xcd80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x47cb2
movq 0x3536f(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1e43d(%rip), %rsi     # 0x660d0
leaq 0x2475a(%rip), %rdx     # 0x6c3f4
movl $0x6d9, %ecx            # imm = 0x6D9
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x47de2
jmp 0x47cb4
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0xc0d0
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x47d2c
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xcd80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x47d1e
movq 0x35303(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1e3d1(%rip), %rsi     # 0x660d0
leaq 0x246ee(%rip), %rdx     # 0x6c3f4
movl $0x6e2, %ecx            # imm = 0x6E2
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x47de2
jmp 0x47d20
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x47d8a
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xd110
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x47d7c
movq 0x352a2(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x1e370(%rip), %rsi     # 0x660d0
leaq 0x2468d(%rip), %rdx     # 0x6c3f4
movl $0x6e9, %ecx            # imm = 0x6E9
movb $0x0, %al
callq 0xc8f0
movl $0x1, -0x4(%rbp)
jmp 0x47de2
jmp 0x47d7e
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movsd 0x30(%rax), %xmm0
movq -0x30(%rbp), %rax
movsd %xmm0, 0x30(%rax)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
movb 0x18(%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, 0x18(%rax)
movw -0x22(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x22(%rbp)
jmp 0x47bde
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)