// File: /workspace/github_c_makefile_star2_O1/lh3[P]minimap2/index.c
// Function: mm_idx_jjump_read
int mm_idx_jjump_read(mm_idx_t *mi, const char *fn, int flag, int min_sc)
{
	int32_t i, j, n_anno = 0, n_misc = 0;
	mm_idx_intv_t *I;
	mm_idx_jjump_t *J;
	if (mi->h == 0) mm_idx_index_name(mi);
	I = mm_idx_bed_read_merge(mi, fn, 1, min_sc);
	J = mm_idx_bed2jjump(mi, I, flag);
	for (i = 0; i < mi->n_seq; ++i) free(I[i].a);
	free(I);
	if (mi->J) {
		mm_idx_jjump_t *J2;
		J2 = mm_idx_jjump_merge(mi, mi->J, J);
		for (i = 0; i < mi->n_seq; ++i) {
			free(mi->J[i].a); free(J[i].a);
		}
		free(mi->J); free(J);
		mi->J = J2;
	} else mi->J = J;
	for (i = 0; i < mi->n_seq; ++i) {
		for (j = 0; j < mi->J[i].n; ++j)
			if (mi->J[i].a[j].flag & MM_JUNC_ANNO) ++n_anno;
			else ++n_misc;
	}
	if (mm_verbose >= 3)
		fprintf(stderr, "[%s] there are %d annotated and %d other splice positions in the index\n", __func__, n_anno, n_misc);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
jne 0x9cb3
movq %rbx, %rdi
callq 0x6e63
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
movl %r14d, %ecx
callq 0x9005
movq %rax, (%rsp)
movl 0x10(%rbx), %r12d
movl $0x10, %esi
movq %r12, %rdi
callq 0x2230
movq %rax, %r14
testq %r12, %r12
je 0x9d93
xorl %r13d, %r13d
movq %r13, %r12
shlq $0x4, %r12
movq (%rsp), %rax
movslq (%rax,%r12), %r15
leaq (%r15,%r15), %rdi
movl %edi, (%r14,%r12)
movl $0x10, %esi
callq 0x2230
movq %rax, 0x8(%r14,%r12)
testq %r15, %r15
jle 0x9d79
movq (%rsp), %rcx
addq %r12, %rcx
movq 0x8(%rcx), %rcx
shlq $0x4, %r15
xorl %edx, %edx
movl (%rcx,%rdx), %esi
movl %esi, (%rax,%rdx,2)
movl 0x4(%rcx,%rdx), %edi
movl %edi, 0x4(%rax,%rdx,2)
movl 0x8(%rcx,%rdx), %r8d
movl %r8d, 0x8(%rax,%rdx,2)
movl 0xc(%rcx,%rdx), %r9d
sarl $0x1e, %r9d
movw %r9w, 0xc(%rax,%rdx,2)
movw %bp, 0xe(%rax,%rdx,2)
movl %edi, 0x10(%rax,%rdx,2)
movl %esi, 0x14(%rax,%rdx,2)
movl %r8d, 0x18(%rax,%rdx,2)
movl 0xc(%rcx,%rdx), %esi
sarl $0x1e, %esi
movw %si, 0x1c(%rax,%rdx,2)
movw %bp, 0x1e(%rax,%rdx,2)
addq $0x10, %rdx
cmpq %rdx, %r15
jne 0x9d26
addq %r14, %r12
movq %r12, %rdi
callq 0xac72
incq %r13
movl 0x10(%rbx), %eax
cmpq %rax, %r13
jb 0x9cea
cmpl $0x0, 0x10(%rbx)
je 0x9dbb
movq (%rsp), %r15
addq $0x8, %r15
xorl %r12d, %r12d
movq (%r15), %rdi
callq 0x2040
incq %r12
movl 0x10(%rbx), %eax
addq $0x10, %r15
cmpq %rax, %r12
jb 0x9da4
movq (%rsp), %rdi
callq 0x2040
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x9efa
movq %rax, 0x10(%rsp)
movl 0x10(%rbx), %r12d
movl $0x10, %esi
movq %r12, %rdi
callq 0x2230
movq %rax, (%rsp)
testq %r12, %r12
je 0x9eb1
xorl %r13d, %r13d
movq %rbx, 0x8(%rsp)
movq (%rsp), %r15
movq %r13, %rbp
shlq $0x4, %rbp
leaq (%r15,%rbp), %r12
movq 0x10(%rsp), %rbx
movslq (%rbx,%rbp), %rax
movslq (%r14,%rbp), %rdi
addq %rax, %rdi
movl %edi, (%r15,%rbp)
movl $0x10, %esi
callq 0x2230
movq %rax, 0x8(%r15,%rbp)
cmpl $0x0, (%rbx,%rbp)
jle 0x9e5e
leaq (%rbx,%rbp), %rcx
xorl %edx, %edx
xorl %eax, %eax
movq 0x8(%r12), %rsi
incq %rax
movq 0x8(%rcx), %rdi
movups (%rdi,%rdx), %xmm0
movups %xmm0, (%rsi,%rdx)
movslq (%rcx), %rsi
addq $0x10, %rdx
cmpq %rsi, %rax
jl 0x9e3c
jmp 0x9e60
xorl %eax, %eax
addq %r14, %rbp
cmpl $0x0, (%rbp)
movq 0x8(%rsp), %rbx
jle 0x9e9a
shlq $0x4, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x8(%r12), %rsi
addq %rax, %rsi
movq 0x8(%rbp), %rdi
movups (%rdi,%rcx), %xmm0
movups %xmm0, (%rcx,%rsi)
incq %rdx
movslq (%rbp), %rsi
addq $0x10, %rcx
cmpq %rsi, %rdx
jl 0x9e76
movq %r12, %rdi
callq 0xac72
incq %r13
movl 0x10(%rbx), %eax
cmpq %rax, %r13
jb 0x9e00
cmpl $0x0, 0x10(%rbx)
je 0x9ee5
movl $0x8, %r12d
xorl %r13d, %r13d
movq 0x48(%rbx), %rax
movq (%rax,%r12), %rdi
callq 0x2040
movq (%r14,%r12), %rdi
callq 0x2040
incq %r13
movl 0x10(%rbx), %eax
addq $0x10, %r12
cmpq %rax, %r13
jb 0x9ec0
movq 0x48(%rbx), %rdi
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq (%rsp), %r14
movq %r14, 0x48(%rbx)
movl 0x10(%rbx), %eax
testq %rax, %rax
je 0x9f52
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rdx, %rdi
shlq $0x4, %rdi
movslq (%r14,%rdi), %rsi
testq %rsi, %rsi
jle 0x9f48
addq %r14, %rdi
movq 0x8(%rdi), %rdi
shlq $0x4, %rsi
xorl %r9d, %r9d
movzwl 0xe(%rdi,%r9), %r10d
andl $0x1, %r10d
addl %r10d, %ecx
xorl $0x1, %r10d
addl %r10d, %r8d
addq $0x10, %r9
cmpq %r9, %rsi
jne 0x9f2b
incq %rdx
cmpq %rax, %rdx
jne 0x9f0d
jmp 0x9f57
xorl %r8d, %r8d
xorl %ecx, %ecx
leaq 0x2b7a2(%rip), %rax     # 0x35700
cmpl $0x3, (%rax)
jge 0x9f74
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2b07d(%rip), %rax     # 0x34ff8
movq (%rax), %rdi
leaq 0x22525(%rip), %rsi     # 0x2c4aa
leaq 0x22566(%rip), %rdx     # 0x2c4f2
xorl %eax, %eax
callq 0x2260
jmp 0x9f63