// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x19856
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movq %r15, 0x8(%rsi)
movq 0x10(%rdi), %rdi
callq 0x19ad1
movq %rax, %rbx
testq %rax, %rax
je 0x19867
movl (%rbx), %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0xc850
testq %rax, %rax
je 0x19856
movq %rax, %rbx
movl 0x20(%r14), %eax
movl %eax, (%rbx)
movq %r15, %rdi
callq 0xcd50
movq %rax, 0x8(%rbx)
incl 0x20(%r14)
movq 0x10(%r14), %r15
xorl %ecx, %ecx
pushq $0x10
popq %r12
pushq $0x18
popq %r13
movq %r15, %rdx
xorl %eax, %eax
movq (%rdx), %r14
testq %r14, %r14
je 0x198ca
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19b1a
movq %r12, %rdx
testl %eax, %eax
js 0x198c2
movq %r13, %rdx
je 0x19854
addq %r14, %rdx
movq %r14, %rcx
jmp 0x198a3
movq %rcx, 0x20(%rbx)
movl $0x1, 0x28(%rbx)
movq %r15, %rdx
testq %rcx, %rcx
je 0x198eb
testl %eax, %eax
js 0x198e7
leaq 0x18(%rcx), %rdx
jmp 0x198eb
leaq 0x10(%rcx), %rdx
movq %rbx, (%rdx)
movq %rbx, %rdx
testq %rcx, %rcx
je 0x19ab1
cmpl $0x1, 0x28(%rcx)
jne 0x19ab1
movq 0x20(%rcx), %rax
movq 0x10(%rax), %rsi
cmpq %rsi, %rcx
je 0x19936
testq %rsi, %rsi
je 0x19922
cmpl $0x1, 0x28(%rsi)
jne 0x19922
andl $0x0, 0x28(%rsi)
jmp 0x19949
movq 0x10(%rcx), %rsi
cmpq %rdx, %rsi
je 0x19970
movq %rcx, %rsi
movq %rdx, %rcx
jmp 0x199e7
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x1995c
cmpl $0x1, 0x28(%rdi)
jne 0x1995c
andl $0x0, 0x28(%rdi)
andl $0x0, 0x28(%rcx)
movl $0x1, 0x28(%rax)
movq %rax, %rcx
jmp 0x19aa5
movq 0x18(%rcx), %rdi
cmpq %rdx, %rdi
je 0x19993
movq %rcx, %rdi
movq %rdx, %rcx
jmp 0x19a5e
movq 0x18(%rsi), %rdi
movq %rdi, 0x10(%rcx)
testq %rdi, %rdi
je 0x199c1
movq %rcx, 0x20(%rdi)
movq 0x20(%rcx), %rdi
movq %rdi, 0x20(%rsi)
movq %r15, %r8
testq %rdi, %rdi
jne 0x199c9
jmp 0x199d9
movq 0x10(%rdi), %rsi
movq %rsi, 0x18(%rcx)
testq %rsi, %rsi
je 0x19a34
movq %rcx, 0x20(%rsi)
movq 0x20(%rcx), %rsi
movq %rsi, 0x20(%rdi)
movq %r15, %r8
testq %rsi, %rsi
jne 0x19a3c
jmp 0x19a4c
movq %rax, 0x20(%rsi)
movq 0x20(%rcx), %rdi
leaq 0x10(%rdi), %r9
leaq 0x18(%rdi), %r8
cmpq 0x10(%rdi), %rcx
cmoveq %r9, %r8
movq %rsi, (%r8)
movq %rcx, 0x18(%rsi)
movq %rsi, 0x20(%rcx)
movq %rdx, %rsi
andl $0x0, 0x28(%rsi)
movl $0x1, 0x28(%rax)
movq 0x18(%rax), %rdx
movq 0x10(%rdx), %rsi
movq %rsi, 0x18(%rax)
testq %rsi, %rsi
je 0x19a07
movq %rax, 0x20(%rsi)
movq 0x20(%rax), %rdi
movq %rdi, 0x20(%rdx)
movq %r15, %rsi
testq %rdi, %rdi
je 0x19a27
leaq 0x10(%rdi), %r8
leaq 0x18(%rdi), %rsi
cmpq 0x10(%rdi), %rax
cmoveq %r8, %rsi
movq %rdx, (%rsi)
movq %rax, 0x10(%rdx)
movq %rdx, 0x20(%rax)
jmp 0x19aa5
movq %rax, 0x20(%rdi)
movq 0x20(%rcx), %rsi
leaq 0x10(%rsi), %r9
leaq 0x18(%rsi), %r8
cmpq 0x10(%rsi), %rcx
cmoveq %r9, %r8
movq %rdi, (%r8)
movq %rcx, 0x10(%rdi)
movq %rdi, 0x20(%rcx)
movq 0x10(%rax), %rsi
movq %rdx, %rdi
andl $0x0, 0x28(%rdi)
movl $0x1, 0x28(%rax)
movq 0x18(%rsi), %rdx
movq %rdx, 0x10(%rax)
testq %rdx, %rdx
je 0x19a7a
movq %rax, 0x20(%rdx)
movq 0x20(%rax), %rdi
movq %rdi, 0x20(%rsi)
movq %r15, %rdx
testq %rdi, %rdi
je 0x19a9a
leaq 0x10(%rdi), %r8
leaq 0x18(%rdi), %rdx
cmpq 0x10(%rdi), %rax
cmoveq %r8, %rdx
movq %rsi, (%rdx)
movq %rax, 0x18(%rsi)
movq %rsi, 0x20(%rax)
movq %rcx, %rdx
movq 0x20(%rcx), %rcx
jmp 0x198f1
movq (%r15), %rax
andl $0x0, 0x28(%rax)
jmp 0x19854