// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %r9, %r14
movl %r8d, %r13d
movl %ecx, %r12d
movl %edx, %ebx
movq %rdi, %rbp
movq %rsi, 0x40(%rsp)
movq %rsi, %rdi
callq 0x6dd0
movq %rax, %r15
movq 0x18(%rbp), %rdi
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
movq %rdi, 0x8(%rsp)
movl %ebx, 0x1c(%rsp)
movq %rbp, 0x48(%rsp)
jb 0x697bd
movl (%rdi), %esi
movl 0x4(%rdi), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x697a4
decl %esi
jmp 0x697a6
incl %esi
movq 0x8(%rsp), %rdi
callq 0x6abcb
movq 0x8(%rsp), %rdi
testl %eax, %eax
js 0x698c6
movl %r12d, 0x18(%rsp)
movl (%rdi), %eax
movq %rax, 0x20(%rsp)
leal -0x1(%rax), %esi
movsbl (%r15), %r12d
testl %r12d, %r12d
je 0x697ff
movb 0x1(%r15), %al
testb %al, %al
je 0x69802
movq %r15, %rcx
addq $0x2, %rcx
movl %r12d, %edx
shll $0x5, %edx
subl %r12d, %edx
movsbl %al, %r12d
addl %edx, %r12d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x697e4
jmp 0x69802
xorl %r12d, %r12d
andl %esi, %r12d
movq 0x10(%rdi), %r8
movl %r12d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %eax
leal (%r12,%r12), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x69825
movl %r12d, %ebp
jmp 0x698fe
movl %r13d, 0x14(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x38(%rsp)
movl $0x1, %ebx
movl %r12d, %r14d
movq 0x20(%rsp), %rbp
movl %esi, 0x34(%rsp)
movq %r8, 0x50(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %r13d
leal (%r14,%r14), %r15d
andl $0x1e, %r15d
movl %r13d, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x698cd
testb $0x1, %al
jne 0x69893
movq 0x18(%rdi), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x28(%rsp), %rsi
callq 0x6a50
movq 0x50(%rsp), %r8
movl 0x34(%rsp), %esi
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0x698cd
btl %r15d, %r13d
cmovbl %r14d, %ebp
addl %ebx, %r14d
andl %esi, %r14d
incl %ebx
cmpl %r12d, %r14d
jne 0x6984a
movb $0x1, %al
movq 0x20(%rsp), %rdx
movl %edx, %ecx
cmpl %edx, %ebp
movq 0x38(%rsp), %r14
movq 0x28(%rsp), %r15
movl 0x14(%rsp), %r13d
je 0x698ee
jmp 0x698fe
movl (%rdi), %ebp
jmp 0x69976
movl %r15d, %ecx
shrl %cl, %r13d
testb $0x2, %r13b
sete %al
movl %ebp, %ecx
movl %r14d, %r12d
movq 0x38(%rsp), %r14
movq 0x28(%rsp), %r15
movl 0x14(%rsp), %r13d
cmpl 0x20(%rsp), %ecx
cmovel %r12d, %ecx
testb %al, %al
cmovnel %r12d, %ecx
movl %ecx, %ebp
movl %ebp, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %edx
leal (,%rbp,2), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0x69945
testb $0x1, %dl
movl 0x18(%rsp), %r12d
je 0x699f7
movq 0x18(%rdi), %rdx
movl %ebp, %esi
movq %r15, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rdi), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rdi)
jmp 0x69976
movq 0x18(%rdi), %rdx
movl %ebp, %esi
movq %r15, (%rdx,%rsi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%rdi), %rcx
andl %edx, (%rcx,%rax,4)
movq 0x4(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x4(%rdi)
movl 0x18(%rsp), %r12d
movq 0x48(%rsp), %rdx
movq 0x18(%rdx), %rax
movl %ebp, %ecx
movq %rdx, %rbp
leaq (%rcx,%rcx,2), %rbx
shlq $0x3, %rbx
addq 0x20(%rax), %rbx
movl 0x8(%rdx), %ecx
cmpl 0xc(%rdx), %ecx
jne 0x699c1
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, 0xc(%rbp)
movq 0x10(%rbp), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x6c80
movq %rax, 0x10(%rbp)
movl 0x8(%rbp), %ecx
jmp 0x699c5
movq 0x10(%rbp), %rax
movl 0x1c(%rsp), %esi
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbp)
movslq %ecx, %rcx
movq %r15, (%rax,%rcx,8)
movslq %esi, %rax
movq %rax, 0x8(%rbx)
movl %r12d, (%rbx)
movl %r13d, 0x4(%rbx)
movq %r14, 0x10(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x555da(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x307f7(%rip), %rsi     # 0x9a1ff
movq 0x40(%rsp), %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x6a90
movq %r15, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x68a0