// File: /workspace/github_c_makefile_star2_O1/Paxa[P]fast_excel/libxlsxwriter/src/comment.c
// Function: get_author_index
STATIC uint32_t
_get_author_index(lxw_comment *self, char *author)
{
    lxw_author_id tmp_author_id;
    lxw_author_id *existing_author = NULL;
    lxw_author_id *new_author_id = NULL;

    if (!author)
        return 0;

    tmp_author_id.author = author;
    existing_author = RB_FIND(lxw_author_ids,
                              self->author_ids, &tmp_author_id);

    if (existing_author) {
        return existing_author->id;
    }
    else {
        new_author_id = calloc(1, sizeof(lxw_author_id));

        if (new_author_id) {
            new_author_id->id = self->author_id;
            new_author_id->author = lxw_strdup(author);
            self->author_id++;

            RB_INSERT(lxw_author_ids, self->author_ids, new_author_id);

            return new_author_id->id;
        }
        else {
            return 0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x1c8f0
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rsi
movq %r15, 0x8(%rsi)
movq 0x10(%rdi), %rdi
callq 0x1c8ff
movq %rax, %rbx
testq %rax, %rax
jne 0x1c8ee
movl $0x1, %edi
movl $0x30, %esi
callq 0xc7f0
testq %rax, %rax
je 0x1c8f0
movq %rax, %rbx
movl 0x20(%r14), %eax
movl %eax, (%rbx)
movq %r15, %rdi
callq 0xcce0
movq %rax, 0x8(%rbx)
incl 0x20(%r14)
movq 0x10(%r14), %r14
movq (%r14), %rcx
testq %rcx, %rcx
je 0x1c6f6
movq %rax, %r15
movq %rcx, %r12
movq 0x8(%rcx), %rsi
movq %r15, %rdi
callq 0xc800
movl $0x10, %ecx
testl %eax, %eax
js 0x1c6de
movl $0x18, %ecx
je 0x1c8ee
movq (%r12,%rcx), %rcx
testq %rcx, %rcx
jne 0x1c6bb
notl %eax
shrl $0x1f, %eax
leaq 0x10(,%rax,8), %rax
jmp 0x1c6fe
movl $0x18, %eax
xorl %r12d, %r12d
movq %r12, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movl $0x1, 0x28(%rbx)
testq %r12, %r12
je 0x1c8e1
movq %rbx, (%r12,%rax)
xorl %eax, %eax
movq %rbx, %rdx
cmpl $0x1, 0x28(%r12)
jne 0x1c8e4
movq 0x20(%r12), %rcx
movq 0x10(%rcx), %rsi
cmpq %rsi, %r12
je 0x1c75c
testq %rsi, %rsi
je 0x1c747
cmpl $0x1, 0x28(%rsi)
je 0x1c76b
movq 0x10(%r12), %rsi
cmpq %rdx, %rsi
je 0x1c79b
movq %r12, %rsi
movq %rdx, %r12
jmp 0x1c7e2
movq 0x18(%rcx), %rsi
testq %rsi, %rsi
je 0x1c782
cmpl $0x1, 0x28(%rsi)
jne 0x1c782
movl %eax, 0x28(%rsi)
movl %eax, 0x28(%r12)
movl $0x1, 0x28(%rcx)
movq %rcx, %r12
jmp 0x1c8ce
movq 0x18(%r12), %rsi
cmpq %rdx, %rsi
je 0x1c835
movq %r12, %rsi
movq %rdx, %r12
jmp 0x1c87c
movq 0x18(%rsi), %rdi
movq %rdi, 0x10(%r12)
testq %rdi, %rdi
je 0x1c7ad
movq %r12, 0x20(%rdi)
movq 0x20(%r12), %r8
movq %r8, 0x20(%rsi)
movq %r14, %rdi
testq %r8, %r8
je 0x1c7d3
movq 0x20(%r12), %r8
leaq 0x10(%r8), %r9
leaq 0x18(%r8), %rdi
cmpq 0x10(%r8), %r12
cmoveq %r9, %rdi
movq %rsi, (%rdi)
movq %r12, 0x18(%rsi)
movq %rsi, 0x20(%r12)
movq %rdx, %rsi
movl $0x0, 0x28(%rsi)
movl $0x1, 0x28(%rcx)
movq 0x18(%rcx), %rdx
movq 0x10(%rdx), %rsi
movq %rsi, 0x18(%rcx)
testq %rsi, %rsi
je 0x1c805
movq %rcx, 0x20(%rsi)
movq 0x20(%rcx), %rdi
movq %rdi, 0x20(%rdx)
movq %r14, %rsi
testq %rdi, %rdi
je 0x1c829
movq 0x20(%rcx), %rdi
leaq 0x10(%rdi), %r8
leaq 0x18(%rdi), %rsi
cmpq 0x10(%rdi), %rcx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x10(%rdx)
jmp 0x1c8ca
movq 0x10(%rsi), %rdi
movq %rdi, 0x18(%r12)
testq %rdi, %rdi
je 0x1c847
movq %r12, 0x20(%rdi)
movq 0x20(%r12), %r8
movq %r8, 0x20(%rsi)
movq %r14, %rdi
testq %r8, %r8
je 0x1c86d
movq 0x20(%r12), %r8
leaq 0x10(%r8), %r9
leaq 0x18(%r8), %rdi
cmpq 0x10(%r8), %r12
cmoveq %r9, %rdi
movq %rsi, (%rdi)
movq %r12, 0x10(%rsi)
movq %rsi, 0x20(%r12)
movq %rdx, %rsi
movl $0x0, 0x28(%rsi)
movl $0x1, 0x28(%rcx)
movq 0x10(%rcx), %rdx
movq 0x18(%rdx), %rsi
movq %rsi, 0x10(%rcx)
testq %rsi, %rsi
je 0x1c89f
movq %rcx, 0x20(%rsi)
movq 0x20(%rcx), %rdi
movq %rdi, 0x20(%rdx)
movq %r14, %rsi
testq %rdi, %rdi
je 0x1c8c3
movq 0x20(%rcx), %rdi
leaq 0x10(%rdi), %r8
leaq 0x18(%rdi), %rsi
cmpq 0x10(%rdi), %rcx
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rcx, 0x18(%rdx)
movq %rdx, 0x20(%rcx)
movq %r12, %rdx
movq 0x20(%r12), %r12
testq %r12, %r12
jne 0x1c722
jmp 0x1c8e4
movq %rbx, (%r14)
movq (%r14), %rax
movl $0x0, 0x28(%rax)
movl (%rbx), %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq