// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/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 $0x38, %rsp
movq %r9, %r15
movl %r8d, %r12d
movl %ecx, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %eax
cmpl %eax, 0x8(%rdi)
jne 0x137fc
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 0x3430
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x3590
movq 0x10(%r14), %rcx
movslq 0x8(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x10(%r14), %rax
movq 0x18(%r14), %rdi
movq (%rax,%rdx,8), %r9
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
movq %rdi, 0x18(%rsp)
jb 0x1384b
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
addl %ecx, %ecx
xorl %esi, %esi
cmpl %eax, %ecx
sbbl %esi, %esi
orl $0x1, %esi
addl %eax, %esi
movq %r9, %rbx
callq 0x14a54
movq %rbx, %r9
movq 0x18(%rsp), %rdi
movl (%rdi), %r8d
movsbl (%r9), %esi
testl %esi, %esi
movq %r14, 0x10(%rsp)
je 0x1387e
movb 0x1(%r9), %al
testb %al, %al
je 0x13880
leaq 0x2(%r9), %rcx
movl %esi, %edx
shll $0x5, %edx
subl %esi, %edx
movsbl %al, %esi
addl %edx, %esi
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x13867
jmp 0x13880
xorl %esi, %esi
xorl %ebx, %ebx
movl %esi, %eax
xorl %edx, %edx
divl %r8d
movl %edx, %r11d
movq 0x10(%rdi), %r14
movl %edx, %eax
shrl $0x4, %eax
movl (%r14,%rax,4), %eax
leal (%r11,%r11), %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x1397b
movl %r12d, (%rsp)
movq %r15, 0x20(%rsp)
leal -0x1(%r8), %ecx
movl %esi, %eax
xorl %edx, %edx
divl %ecx
incl %edx
movl %r11d, %ebp
movl %r8d, %r13d
movq %r8, 0x30(%rsp)
movq %r11, 0x28(%rsp)
movl %edx, 0xc(%rsp)
movl %ebp, %eax
shrl $0x4, %eax
movl (%r14,%rax,4), %r15d
leal (,%rbp,2), %r12d
andl $0x1e, %r12d
movl %r15d, %eax
movl %r12d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x13945
testb $0x1, %al
jne 0x13926
movq 0x18(%rdi), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rdi
movq %r9, %rsi
movq %r9, %rbx
callq 0x3300
movl 0xc(%rsp), %edx
movq 0x28(%rsp), %r11
movq 0x30(%rsp), %r8
movq %rbx, %r9
xorl %ebx, %ebx
movq 0x18(%rsp), %rdi
testl %eax, %eax
je 0x13945
btl %r12d, %r15d
cmovbl %ebp, %r13d
addl %edx, %ebp
cmpl %r8d, %ebp
movl %r8d, %eax
cmovbl %ebx, %eax
subl %eax, %ebp
movl %r13d, %eax
cmpl %r11d, %ebp
jne 0x138d0
jmp 0x13948
movl %r8d, %eax
movl %eax, %r11d
cmpl %r8d, %eax
movq 0x20(%rsp), %r15
movl (%rsp), %r12d
jne 0x1397b
movl %ebp, %eax
shrl $0x4, %eax
movl (%r14,%rax,4), %eax
leal (,%rbp,2), %ecx
shrl %cl, %eax
cmpl %r8d, %r13d
cmovel %ebp, %r13d
testb $0x2, %al
cmovel %ebp, %r13d
movl %r13d, %r11d
movl %r11d, %eax
shrl $0x4, %eax
movl (%r14,%rax,4), %esi
leal (%r11,%r11), %ecx
andl $0x1e, %ecx
shrl %cl, %esi
movl %r11d, %edx
testb $0x2, %sil
jne 0x139bf
testb $0x1, %sil
movq 0x10(%rsp), %r8
je 0x139e2
movq 0x18(%rdi), %rsi
movq %r9, (%rsi,%rdx,8)
movl $0x3, %esi
shll %cl, %esi
notl %esi
movq 0x10(%rdi), %rcx
andl %esi, (%rcx,%rax,4)
incl 0x4(%rdi)
jmp 0x139e2
movq 0x18(%rdi), %rsi
movq %r9, (%rsi,%rdx,8)
movl $0x3, %esi
shll %cl, %esi
notl %esi
movq 0x10(%rdi), %rcx
andl %esi, (%rcx,%rax,4)
incl 0x4(%rdi)
incl 0x8(%rdi)
movq 0x10(%rsp), %r8
movslq 0x4(%rsp), %rax
movq 0x18(%r8), %rcx
movq 0x20(%rcx), %rcx
leaq (%rdx,%rdx,2), %rdx
movl 0x8(%rsp), %esi
movl %esi, (%rcx,%rdx,8)
movl %r12d, 0x4(%rcx,%rdx,8)
movq %rax, 0x8(%rcx,%rdx,8)
movq %r15, 0x10(%rcx,%rdx,8)
incl 0x8(%r8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq