// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x22(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xc6a0
cmpq $0x0, -0x10(%rbp)
jne 0x4848f
movl $0x0, -0x4(%rbp)
jmp 0x485ea
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x484a5
movl $0x0, -0x4(%rbp)
jmp 0x485ea
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd180
cmpq $0xff, %rax
jbe 0x484e5
movq 0x34b30(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
leaq 0x24259(%rip), %rsi     # 0x6c72b
movb $0x0, %al
callq 0xc8f0
movl $0x14, -0x4(%rbp)
jmp 0x485ea
movq -0x18(%rbp), %rdi
callq 0xc4e0
cmpq $0x1, %rax
jne 0x4854c
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x43, %eax
je 0x48524
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x63, %eax
je 0x48524
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x52, %eax
je 0x48524
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x4854c
movq 0x34acd(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2423e(%rip), %rsi     # 0x6c777
movb $0x0, %al
callq 0xc8f0
movl $0x14, -0x4(%rbp)
jmp 0x485ea
movq -0x18(%rbp), %rdi
leaq 0x2425c(%rip), %rsi     # 0x6c7b3
callq 0xcbb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x48593
movq 0x34a8a(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movsbl (%rax), %edx
movq -0x18(%rbp), %rcx
leaq 0x24250(%rip), %rsi     # 0x6c7d3
movb $0x0, %al
callq 0xc8f0
movl $0xd, -0x4(%rbp)
jmp 0x485ea
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x22(%rbp)
leaq -0x22(%rbp), %rdi
leaq 0x2427a(%rip), %rsi     # 0x6c821
callq 0xcbb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x485e3
movq 0x34a3a(%rip), %rax     # 0x7cff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movsbl (%rax), %edx
movq -0x18(%rbp), %rcx
leaq 0x24279(%rip), %rsi     # 0x6c84c
movb $0x0, %al
callq 0xc8f0
movl $0xd, -0x4(%rbp)
jmp 0x485ea
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)