// File: /workspace/github_c_makefile_star2_O0/Paxa[P]fast_excel/libxlsxwriter/src/worksheet.c
// Function: check_and_copy_table_style
void
_check_and_copy_table_style(lxw_table_obj *table_obj,
                            lxw_table_options *user_options)
{
    if (!user_options)
        return;

    /* Set the defaults. */
    table_obj->style_type = LXW_TABLE_STYLE_TYPE_MEDIUM;
    table_obj->style_type_number = 9;

    if (user_options->style_type > LXW_TABLE_STYLE_TYPE_DARK) {
        LXW_WARN_FORMAT1
            ("worksheet_add_table(): invalid style_type = %d. "
             "Using default TableStyleMedium9", user_options->style_type);

        table_obj->style_type = LXW_TABLE_STYLE_TYPE_MEDIUM;
        table_obj->style_type_number = 9;
    }
    else {
        table_obj->style_type = user_options->style_type;
    }

    /* Each type (light, medium and dark) has a different number of styles. */
    if (user_options->style_type == LXW_TABLE_STYLE_TYPE_LIGHT) {
        if (user_options->style_type_number > 21) {
            LXW_WARN_FORMAT1("worksheet_add_table(): "
                             "invalid style_type_number = %d for style type "
                             "LXW_TABLE_STYLE_TYPE_LIGHT. "
                             "Using default TableStyleMedium9",
                             user_options->style_type);

            table_obj->style_type = LXW_TABLE_STYLE_TYPE_MEDIUM;
            table_obj->style_type_number = 9;
        }
        else {
            table_obj->style_type_number = user_options->style_type_number;
        }
    }

    if (user_options->style_type == LXW_TABLE_STYLE_TYPE_MEDIUM) {
        if (user_options->style_type_number < 1
            || user_options->style_type_number > 28) {
            LXW_WARN_FORMAT1("worksheet_add_table(): "
                             "invalid style_type_number = %d for style type "
                             "LXW_TABLE_STYLE_TYPE_MEDIUM. "
                             "Using default TableStyleMedium9",
                             user_options->style_type_number);

            table_obj->style_type = LXW_TABLE_STYLE_TYPE_MEDIUM;
            table_obj->style_type_number = 9;
        }
        else {
            table_obj->style_type_number = user_options->style_type_number;
        }
    }

    if (user_options->style_type == LXW_TABLE_STYLE_TYPE_DARK) {
        if (user_options->style_type_number < 1
            || user_options->style_type_number > 11) {
            LXW_WARN_FORMAT1("worksheet_add_table(): "
                             "invalid style_type_number = %d for style type "
                             "LXW_TABLE_STYLE_TYPE_DARK. "
                             "Using default TableStyleMedium9",
                             user_options->style_type_number);

            table_obj->style_type = LXW_TABLE_STYLE_TYPE_MEDIUM;
            table_obj->style_type_number = 9;
        }
        else {
            table_obj->style_type_number = user_options->style_type_number;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4779c
jmp 0x47927
movq -0x8(%rbp), %rax
movb $0x2, 0x1e(%rax)
movq -0x8(%rbp), %rax
movb $0x9, 0x1f(%rax)
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0x3, %eax
jle 0x477eb
movq 0x35838(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %edx
leaq 0x24c84(%rip), %rsi     # 0x6c456
movb $0x0, %al
callq 0xc8f0
movq -0x8(%rbp), %rax
movb $0x2, 0x1e(%rax)
movq -0x8(%rbp), %rax
movb $0x9, 0x1f(%rax)
jmp 0x477f9
movq -0x10(%rbp), %rax
movb 0xe(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1e(%rax)
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0x1, %eax
jne 0x47855
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x15, %eax
jle 0x47845
movq 0x357de(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %edx
leaq 0x24c86(%rip), %rsi     # 0x6c4b2
movb $0x0, %al
callq 0xc8f0
movq -0x8(%rbp), %rax
movb $0x2, 0x1e(%rax)
movq -0x8(%rbp), %rax
movb $0x9, 0x1f(%rax)
jmp 0x47853
movq -0x10(%rbp), %rax
movb 0xf(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1f(%rax)
jmp 0x47855
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0x2, %eax
jne 0x478be
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x1, %eax
jl 0x4787c
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x1c, %eax
jle 0x478ae
movq 0x35775(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %edx
leaq 0x24caa(%rip), %rsi     # 0x6c53f
movb $0x0, %al
callq 0xc8f0
movq -0x8(%rbp), %rax
movb $0x2, 0x1e(%rax)
movq -0x8(%rbp), %rax
movb $0x9, 0x1f(%rax)
jmp 0x478bc
movq -0x10(%rbp), %rax
movb 0xf(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1f(%rax)
jmp 0x478be
movq -0x10(%rbp), %rax
movzbl 0xe(%rax), %eax
cmpl $0x3, %eax
jne 0x47927
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x1, %eax
jl 0x478e5
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0xb, %eax
jle 0x47917
movq 0x3570c(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %edx
leaq 0x24ccf(%rip), %rsi     # 0x6c5cd
movb $0x0, %al
callq 0xc8f0
movq -0x8(%rbp), %rax
movb $0x2, 0x1e(%rax)
movq -0x8(%rbp), %rax
movb $0x9, 0x1f(%rax)
jmp 0x47925
movq -0x10(%rbp), %rax
movb 0xf(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1f(%rax)
jmp 0x47927
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)