// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/htslib/faidx.c
// Function: fai_insert_index
static inline void fai_insert_index(faidx_t *idx, const char *name, int len, int line_len, int line_blen, uint64_t offset)
{
    char *name_key = strdup(name);
    int absent;
    khint_t k = kh_put(s, idx->hash, name_key, &absent);
    faidx1_t *v = &kh_value(idx->hash, k);

    if (! absent) {
        fprintf(stderr, "[fai_build_core] ignoring duplicate sequence \"%s\" at byte offset %"PRIu64"\n", name, offset);
        free(name_key);
        return;
    }

    if (idx->n == idx->m) {
        idx->m = idx->m? idx->m<<1 : 16;
        idx->name = (char**)realloc(idx->name, sizeof(char*) * idx->m);
    }
    idx->name[idx->n++] = name_key;
    v->len = len;
    v->line_len = line_len;
    v->line_blen = line_blen;
    v->offset = offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r15
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, 0x30(%rsp)
movq %rsi, %rdi
callq 0x6dd0
movq %rax, %rbp
movq 0x18(%r14), %rdi
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
movq %rdi, (%rsp)
movl %ebx, 0x18(%rsp)
movq %r14, 0x38(%rsp)
jb 0x696f4
movl (%rdi), %esi
movl 0x4(%rdi), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x696dd
decl %esi
jmp 0x696df
incl %esi
movq (%rsp), %rdi
callq 0x6ab3f
movq (%rsp), %rdi
testl %eax, %eax
js 0x697df
movl (%rdi), %esi
leal -0x1(%rsi), %r9d
movsbl (%rbp), %r14d
testl %r14d, %r14d
je 0x6972d
movb 0x1(%rbp), %al
testb %al, %al
je 0x69730
movq %rbp, %rcx
addq $0x2, %rcx
movl %r14d, %edx
shll $0x5, %edx
subl %r14d, %edx
movsbl %al, %r14d
addl %edx, %r14d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x69712
jmp 0x69730
xorl %r14d, %r14d
movl %r13d, 0x8(%rsp)
movl %r12d, 0xc(%rsp)
andl %r9d, %r14d
movq 0x10(%rdi), %r8
movl %r14d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %eax
leal (%r14,%r14), %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x69822
movq %rbp, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movl $0x1, %ebp
movl %r14d, %r12d
movq %rsi, 0x10(%rsp)
movl %esi, %r13d
movq %r8, 0x40(%rsp)
movl %r9d, 0x1c(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %ebx
leal (%r12,%r12), %r15d
andl $0x1e, %r15d
movl %ebx, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x697e7
testb $0x1, %al
jne 0x697c5
movq 0x18(%rdi), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x20(%rsp), %rsi
callq 0x6a50
movl 0x1c(%rsp), %r9d
movq 0x40(%rsp), %r8
movq (%rsp), %rdi
testl %eax, %eax
je 0x697e7
btl %r15d, %ebx
cmovbl %r12d, %r13d
addl %ebp, %r12d
andl %r9d, %r12d
incl %ebp
movl %r13d, %eax
cmpl %r14d, %r12d
jne 0x6977d
jmp 0x697ec
movl (%rdi), %r14d
jmp 0x6986b
movq 0x10(%rsp), %rax
movl %eax, %r14d
movq 0x10(%rsp), %rdx
cmpl %edx, %eax
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rbp
jne 0x69822
movl %r12d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %eax
leal (%r12,%r12), %ecx
shrl %cl, %eax
cmpl %edx, %r13d
cmovel %r12d, %r13d
testb $0x2, %al
cmovel %r12d, %r13d
movl %r13d, %r14d
movl %r14d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %esi
leal (%r14,%r14), %ecx
andl $0x1e, %ecx
shrl %cl, %esi
testb $0x2, %sil
jne 0x6986f
movb $0x1, %dl
testb $0x1, %sil
movl 0xc(%rsp), %r12d
movl 0x8(%rsp), %r13d
je 0x6989c
movq 0x18(%rdi), %rdx
movl %r14d, %esi
movq %rbp, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rdi), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rdi)
xorl %edx, %edx
jmp 0x6989c
movq 0x18(%rdi), %rdx
movl %r14d, %esi
movq %rbp, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rdi), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rdi)
incl 0x8(%rdi)
xorl %edx, %edx
movl 0xc(%rsp), %r12d
movl 0x8(%rsp), %r13d
testb %dl, %dl
jne 0x6991e
movq 0x38(%rsp), %rdx
movq 0x18(%rdx), %rax
movl %r14d, %ecx
movq %rdx, %r14
leaq (%rcx,%rcx,2), %rbx
shlq $0x3, %rbx
addq 0x20(%rax), %rbx
movl 0xc(%rdx), %eax
cmpl %eax, 0x8(%rdx)
jne 0x698e8
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, 0xc(%r14)
movq 0x10(%r14), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x6c80
movq %rax, 0x10(%r14)
movq 0x10(%r14), %rax
movslq 0x8(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r14)
movq %rbp, (%rax,%rcx,8)
movslq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
movl %r13d, (%rbx)
movl %r12d, 0x4(%rbx)
movq %r15, 0x10(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x556b3(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x306a0(%rip), %rsi     # 0x99fcf
movq 0x30(%rsp), %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x6a90
movq %rbp, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x68a0