// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/samtools-0.1.18/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)
{
	khint_t k;
	int ret;
	faidx1_t t;
	if (idx->n == idx->m) {
		idx->m = idx->m? idx->m<<1 : 16;
		idx->name = (char**)realloc(idx->name, sizeof(void*) * idx->m);
	}
	idx->name[idx->n] = strdup(name);
	k = kh_put(s, idx->hash, idx->name[idx->n], &ret);
	t.len = len; t.line_len = line_len; t.line_blen = line_blen; t.offset = offset;
	kh_value(idx->hash, k) = t;
	++idx->n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, 0x34(%rsp)
movl %ecx, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movl 0x8(%rdi), %r14d
cmpl 0xc(%rdi), %r14d
jne 0x1f9388
leal (%r14,%r14), %eax
testl %r14d, %r14d
pushq $0x10
popq %rcx
cmovnel %eax, %ecx
movl %ecx, 0xc(%r12)
movq 0x10(%r12), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x17f58
movq %rax, %r15
movq %rax, 0x10(%r12)
movl 0x8(%r12), %r14d
jmp 0x1f938d
movq 0x10(%r12), %r15
movq %rbx, %rdi
callq 0x17df0
movslq %r14d, %rcx
movq %rax, (%r15,%rcx,8)
movq 0x10(%r12), %rax
movq 0x18(%r12), %rdx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movl (%rdx), %ebp
movl 0x8(%rdx), %eax
cmpl 0xc(%rdx), %eax
movq %rdx, (%rsp)
movq %r12, 0x38(%rsp)
jb 0x1f95e4
movl 0x4(%rdx), %eax
leal (%rax,%rax), %edx
xorl %ecx, %ecx
cmpl %ebp, %edx
sbbl %ecx, %ecx
orl $0x1, %ecx
addl %ebp, %ecx
pushq $0x21
popq %rsi
leaq 0x171a9f(%rip), %rdx    # 0x36ae80
leal -0x2(%rsi), %edi
decl %esi
cmpl %ecx, (%rdx,%rdi,4)
ja 0x1f93e1
movl %esi, %ecx
movl (%rdx,%rcx,4), %r13d
cvtsi2sd %r13, %xmm0
mulsd 0x1711ea(%rip), %xmm0   # 0x36a5e8
addsd 0xfca52(%rip), %xmm0    # 0x2f5e58
cvttsd2si %xmm0, %rcx
cmpl %ecx, %eax
jae 0x1f95e4
movq %rcx, 0x58(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
leaq 0x4(,%rax,4), %r15
movq %r15, %rdi
callq 0x17f50
movq %rax, %rbx
movq %rax, %rdi
movl $0xaa, %esi
movq %r15, %rdx
callq 0x17380
movq (%rsp), %r9
cmpl %r13d, %ebp
jae 0x1f947c
movq 0x18(%r9), %rdi
leaq (,%r13,8), %rsi
callq 0x17f58
movq (%rsp), %rcx
movq %rax, 0x18(%rcx)
movq (%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0x18, %r13, %rsi
callq 0x17f58
movq (%rsp), %r9
movq %rax, 0x20(%r9)
leal -0x1(%r13), %eax
movl %eax, 0x20(%rsp)
xorl %r14d, %r14d
pushq $0x2
popq %r15
xorl %edi, %edi
cmpl (%r9), %edi
je 0x1f95e9
movq 0x10(%r9), %r12
movl %edi, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %edx
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %edx, %esi
shrl %cl, %esi
testb $0x3, %sil
jne 0x1f95dd
movq 0x18(%r9), %rsi
movq %rdi, 0x18(%rsp)
movl %edi, %edi
movq (%rsi,%rdi,8), %rbp
movq 0x20(%r9), %rsi
imulq $0x18, %rdi, %rdi
movq 0x10(%rsi,%rdi), %r8
movq %r8, 0x50(%rsp)
movupd (%rsi,%rdi), %xmm0
movapd %xmm0, 0x40(%rsp)
btsl %ecx, %edx
movl %edx, (%r12,%rax,4)
movq %rbp, %rdi
callq 0x1fa237
movl %eax, %ecx
xorl %edx, %edx
divl %r13d
movl %edx, %esi
movl %ecx, %eax
xorl %edx, %edx
divl 0x20(%rsp)
incl %edx
movq (%rsp), %r9
movl %esi, %eax
shrl $0x4, %eax
movl (%rbx,%rax,4), %edi
leal (%rsi,%rsi), %ecx
andl $0x1e, %ecx
movl %r15d, %r8d
shll %cl, %r8d
testl %edi, %r8d
jne 0x1f9532
addl %edx, %esi
cmpl %r13d, %esi
movl %r13d, %eax
cmovbl %r14d, %eax
subl %eax, %esi
jmp 0x1f9509
notl %r8d
andl %r8d, %edi
movl %edi, (%rbx,%rax,4)
movl %esi, %edx
cmpl (%r9), %esi
jae 0x1f95b3
movl (%r12,%rax,4), %edi
shrl %cl, %edi
movq 0x18(%r9), %rsi
testb $0x3, %dil
jne 0x1f95b7
movq (%rsi,%rdx,8), %rdi
movq %rbp, (%rsi,%rdx,8)
movq 0x20(%r9), %rsi
imulq $0x18, %rdx, %rdx
movq 0x10(%rsi,%rdx), %r8
movq %r8, 0x70(%rsp)
movups (%rsi,%rdx), %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0x50(%rsp), %r8
movq %r8, 0x10(%rsi,%rdx)
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rsi,%rdx)
movq 0x70(%rsp), %rdx
movq %rdx, 0x50(%rsp)
movapd 0x60(%rsp), %xmm0
movapd %xmm0, 0x40(%rsp)
pushq $0x1
popq %rdx
shll %cl, %edx
movq 0x10(%r9), %r12
orl %edx, (%r12,%rax,4)
movq %rdi, %rbp
jmp 0x1f94ea
movq 0x18(%r9), %rsi
movq %rbp, (%rsi,%rdx,8)
movq 0x20(%r9), %rax
imulq $0x18, %rdx, %rcx
movq 0x50(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx)
movapd 0x40(%rsp), %xmm0
movupd %xmm0, (%rax,%rcx)
movq 0x18(%rsp), %rdi
incl %edi
jmp 0x1f948d
movl %ebp, %r13d
jmp 0x1f9644
cmpl %r13d, %edi
jbe 0x1f9620
movq 0x18(%r9), %rdi
leaq (,%r13,8), %rsi
callq 0x17f58
movq (%rsp), %rcx
movq %rax, 0x18(%rcx)
movq (%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0x18, %r13, %rsi
callq 0x17f58
movq (%rsp), %r9
movq %rax, 0x20(%r9)
movq 0x10(%r9), %rdi
movq %r9, %r14
callq 0x17f48
movq %rbx, 0x10(%r14)
movl %r13d, (%r14)
movl 0x4(%r14), %eax
movl %eax, 0x8(%r14)
movq 0x58(%rsp), %rax
movl %eax, 0xc(%r14)
movq 0x8(%rsp), %rdi
callq 0x1fa237
movl %eax, %esi
xorl %r10d, %r10d
xorl %edx, %edx
divl %r13d
movl %edx, %r9d
movq (%rsp), %rdi
movq 0x10(%rdi), %r12
movl %edx, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %eax
leal (%r9,%r9), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x1f967e
movl %r9d, %ebx
jmp 0x1f972c
leal -0x1(%r13), %ecx
movl %esi, %eax
xorl %edx, %edx
divl %ecx
incl %edx
movl %r9d, %r14d
movl %r13d, %ebx
movq %r9, 0x20(%rsp)
movl %edx, 0x18(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %ebp
leal (%r14,%r14), %r15d
andl $0x1e, %r15d
movl %ebp, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x1f970c
testb $0x1, %al
jne 0x1f96e3
movq 0x18(%rdi), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
callq 0x179e0
movl 0x18(%rsp), %edx
xorl %r10d, %r10d
movq 0x20(%rsp), %r9
movq (%rsp), %rdi
testl %eax, %eax
je 0x1f970c
btl %r15d, %ebp
cmovbl %r14d, %ebx
addl %edx, %r14d
cmpl %r13d, %r14d
movl %r13d, %eax
cmovbl %r10d, %eax
subl %eax, %r14d
cmpl %r9d, %r14d
jne 0x1f9699
movb $0x1, %al
movl %r13d, %ecx
cmpl %r13d, %ebx
je 0x1f971d
jmp 0x1f972c
movl %r15d, %ecx
shrl %cl, %ebp
testb $0x2, %bpl
sete %al
movl %ebx, %ecx
movl %r14d, %r9d
cmpl %r13d, %ecx
cmovel %r9d, %ecx
testb %al, %al
cmovnel %r9d, %ecx
movl %ecx, %ebx
movl %ebx, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %edx
leal (%rbx,%rbx), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0x1f9750
testb $0x1, %dl
movq 0x38(%rsp), %r8
jne 0x1f978b
movl %ebx, %edx
jmp 0x1f97ab
movq 0x18(%rdi), %rsi
movl %ebx, %edx
movq 0x8(%rsp), %r8
movq %r8, (%rsi,%rdx,8)
pushq $0x3
popq %rsi
shll %cl, %esi
notl %esi
movq 0x10(%rdi), %rcx
andl %esi, (%rcx,%rax,4)
movq 0x4(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x4(%rdi)
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %r8
jmp 0x1f97b0
movq 0x18(%rdi), %rsi
movl %ebx, %edx
movq 0x8(%rsp), %r9
movq %r9, (%rsi,%rdx,8)
pushq $0x3
popq %rsi
shll %cl, %esi
notl %esi
movq 0x10(%rdi), %rcx
andl %esi, (%rcx,%rax,4)
incl 0x4(%rdi)
movq 0x10(%rsp), %rsi
movslq 0x2c(%rsp), %rax
movq 0x18(%r8), %rcx
movq 0x20(%rcx), %rcx
imulq $0x18, %rdx, %rdx
movl 0x30(%rsp), %edi
movl %edi, (%rcx,%rdx)
movl 0x34(%rsp), %edi
movl %edi, 0x4(%rcx,%rdx)
movq %rax, 0x8(%rcx,%rdx)
movq %rsi, 0x10(%rcx,%rdx)
incl 0x8(%r8)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq