// File: /workspace/github_c_makefile_star2_O2/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, %r12
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %ebx
movq %rdi, %r15
movq %rsi, 0x40(%rsp)
movq %rsi, %rdi
callq 0x6dd0
movq %rax, %r13
movq 0x18(%r15), %rcx
movl 0x8(%rcx), %eax
cmpl 0xc(%rcx), %eax
movq %rcx, 0x8(%rsp)
movl %ebx, 0x1c(%rsp)
movq %r15, 0x48(%rsp)
jb 0x5e415
movl (%rcx), %esi
movl 0x4(%rcx), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x5e3fc
decl %esi
jmp 0x5e3fe
incl %esi
movq 0x8(%rsp), %rdi
callq 0x5f2d3
movq 0x8(%rsp), %rcx
testl %eax, %eax
js 0x5e4fa
movl %r14d, 0x18(%rsp)
movl (%rcx), %r15d
leal -0x1(%r15), %r14d
movq %r13, %rdi
callq 0x5f57d
movq 0x8(%rsp), %rdi
movl %eax, %r8d
andl %r14d, %r8d
movq 0x10(%rdi), %rdx
movl %r8d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %eax
leal (%r8,%r8), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x5e453
movl %r8d, %r15d
jmp 0x5e534
movl %ebp, 0x14(%rsp)
movq %r13, 0x20(%rsp)
movq %r12, 0x30(%rsp)
pushq $0x1
popq %rbx
movl %r8d, %ebp
movq %r15, 0x38(%rsp)
movq %r8, 0x50(%rsp)
movl %r14d, 0x2c(%rsp)
movl %ebp, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %r13d
leal (,%rbp,2), %r12d
andl $0x1e, %r12d
movl %r13d, %eax
movl %r12d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x5e502
testb $0x1, %al
jne 0x5e4c8
movq 0x18(%rdi), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x20(%rsp), %rsi
movq %rdx, %r14
callq 0x6a50
movq 0x50(%rsp), %r8
movq %r14, %rdx
movl 0x2c(%rsp), %r14d
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0x5e502
btl %r12d, %r13d
cmovbl %ebp, %r15d
addl %ebx, %ebp
andl %r14d, %ebp
incl %ebx
cmpl %r8d, %ebp
jne 0x5e476
movb $0x1, %al
movq 0x38(%rsp), %rsi
movl %esi, %ecx
cmpl %esi, %r15d
movq 0x30(%rsp), %r12
movq 0x20(%rsp), %r13
movl 0x14(%rsp), %ebp
je 0x5e523
jmp 0x5e534
movl (%rcx), %r15d
jmp 0x5e5a7
movl %r12d, %ecx
shrl %cl, %r13d
testb $0x2, %r13b
sete %al
movl %r15d, %ecx
movl %ebp, %r8d
movq 0x30(%rsp), %r12
movq 0x20(%rsp), %r13
movl 0x14(%rsp), %ebp
cmpl 0x38(%rsp), %ecx
cmovel %r8d, %ecx
testb %al, %al
cmovnel %r8d, %ecx
movl %ecx, %r15d
movl %r15d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %edx
leal (%r15,%r15), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0x5e577
testb $0x1, %dl
movl 0x18(%rsp), %r14d
je 0x5e625
movq 0x18(%rdi), %rdx
movl %r15d, %esi
movq %r13, (%rdx,%rsi,8)
pushq $0x3
popq %rdx
shll %cl, %edx
notl %edx
movq 0x10(%rdi), %rcx
andl %edx, (%rcx,%rax,4)
incl 0x4(%rdi)
jmp 0x5e5a7
movq 0x18(%rdi), %rdx
movl %r15d, %esi
movq %r13, (%rdx,%rsi,8)
pushq $0x3
popq %rdx
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), %r14d
movq 0x48(%rsp), %rdx
movq 0x18(%rdx), %rax
movl %r15d, %ecx
movq %rdx, %r15
imulq $0x18, %rcx, %rbx
addq 0x20(%rax), %rbx
movl 0x8(%rdx), %ecx
cmpl 0xc(%rdx), %ecx
jne 0x5e5ef
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
pushq $0x10
popq %rcx
cmovnel %eax, %ecx
movl %ecx, 0xc(%r15)
movq 0x10(%r15), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x6c80
movq %rax, 0x10(%r15)
movl 0x8(%r15), %ecx
jmp 0x5e5f3
movq 0x10(%r15), %rax
movl 0x1c(%rsp), %esi
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r15)
movslq %ecx, %rcx
movq %r13, (%rax,%rcx,8)
movslq %esi, %rax
movq %rax, 0x8(%rbx)
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movq %r12, 0x10(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x549ac(%rip), %rax     # 0xb2fd8
movq (%rax), %rdi
leaq 0x2a949(%rip), %rsi     # 0x88f7f
movq 0x40(%rsp), %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x6a90
movq %r13, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x68a0