// File: /workspace/github_c_makefile_star2_O2/lh3[P]minimap2/index.c
// Function: mm_idx_stat
void mm_idx_stat(const mm_idx_t *mi)
{
	int64_t n = 0, n1 = 0;
	uint32_t i;
	uint64_t sum = 0, len = 0;
	fprintf(stderr, "[M::%s] kmer size: %d; skip: %d; is_hpc: %d; #seq: %d\n", __func__, mi->k, mi->w, mi->flag&MM_I_HPC, mi->n_seq);
	for (i = 0; i < mi->n_seq; ++i)
		len += mi->seq[i].len;
	for (i = 0; i < 1U<<mi->b; ++i)
		if (mi->B[i].h) n += kh_size((idxhash_t*)mi->B[i].h);
	for (i = 0; i < 1U<<mi->b; ++i) {
		idxhash_t *h = (idxhash_t*)mi->B[i].h;
		khint_t k;
		if (h == 0) continue;
		for (k = 0; k < kh_end(h); ++k)
			if (kh_exist(h, k)) {
				sum += kh_key(h, k)&1? 1 : (uint32_t)kh_val(h, k);
				if (kh_key(h, k)&1) ++n1;
			}
	}
	fprintf(stderr, "[M::%s::%.3f*%.2f] distinct minimizers: %ld (%.2f%% are singletons); average occurrences: %.3lf; average spacing: %.3lf; total length: %ld\n",
			__func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0), (long)n, 100.0*n1/n, (double)sum / n, (double)len / sum, (long)len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x2c422(%rip), %r12     # 0x31ff8
movq (%r12), %rdi
movl 0x4(%r15), %r8d
movl 0x8(%r15), %ecx
movl 0xc(%r15), %r9d
andl $0x1, %r9d
movl 0x10(%r15), %eax
movl %eax, (%rsp)
leaq 0x22550(%rip), %rsi     # 0x28148
leaq 0x22580(%rip), %rdx     # 0x2817f
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2260
movl 0x10(%r15), %eax
imulq $0x18, %rax, %rax
xorl %ebx, %ebx
cmpq %r14, %rax
je 0x5c2a
movq 0x20(%r15), %rcx
movl 0x10(%rcx,%r14), %ecx
addq %rcx, %rbx
addq $0x18, %r14
jmp 0x5c13
movl (%r15), %eax
xorl %edx, %edx
xorl %r14d, %r14d
movl %edx, %esi
movl %eax, %ecx
shrl %cl, %esi
testl %esi, %esi
jne 0x5c5a
movq 0x30(%r15), %rcx
movl %edx, %esi
imulq $0x30, %rsi, %rsi
movq 0x28(%rcx,%rsi), %rcx
testq %rcx, %rcx
je 0x5c56
movl 0x4(%rcx), %ecx
addq %rcx, %r14
incl %edx
jmp 0x5c32
xorl %r13d, %r13d
pushq $0x1
popq %rdx
xorl %esi, %esi
xorl %ebp, %ebp
movl %esi, %edi
movl %eax, %ecx
shrl %cl, %edi
testl %edi, %edi
jne 0x5cdc
movq 0x30(%r15), %rcx
movl %esi, %edi
imulq $0x30, %rdi, %rdi
movq 0x28(%rcx,%rdi), %rdi
testq %rdi, %rdi
je 0x5cd8
movl (%rdi), %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x5cd8
movq 0x10(%rdi), %rcx
movl %r10d, %r11d
shrl $0x4, %r11d
movl (%rcx,%r11,4), %r11d
movl %r9d, %ecx
andb $0x1e, %cl
shrl %cl, %r11d
testb $0x3, %r11b
jne 0x5ccf
movq 0x18(%rdi), %rcx
movq (%rcx,%r10,8), %rcx
movq %rdx, %r11
testb $0x1, %cl
jne 0x5cc6
movq 0x20(%rdi), %r11
movl (%r11,%r10,8), %r11d
andl $0x1, %ecx
addq %r11, %rbp
addq %rcx, %r13
incq %r10
addl $0x2, %r9d
jmp 0x5c8b
incl %esi
jmp 0x5c64
movq (%r12), %r15
callq 0x4521
leaq 0x2cc44(%rip), %r12     # 0x32930
subsd (%r12), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x44b8
movsd %xmm0, 0x8(%rsp)
callq 0x4521
subsd (%r12), %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
cvtsi2sd %r13, %xmm2
mulsd 0x22383(%rip), %xmm2    # 0x280a8
cvtsi2sd %r14, %xmm0
divsd %xmm0, %xmm2
movq %rbp, %xmm6
movq 0x22395(%rip), %xmm4    # 0x280d0
punpckldq %xmm4, %xmm6    # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1]
movapd 0x22399(%rip), %xmm5    # 0x280e0
subpd %xmm5, %xmm6
movapd %xmm6, %xmm3
unpckhpd %xmm6, %xmm3            # xmm3 = xmm3[1],xmm6[1]
addsd %xmm6, %xmm3
movq %rbx, %xmm6
punpckldq %xmm4, %xmm6    # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1]
subpd %xmm5, %xmm6
movapd %xmm6, %xmm4
unpckhpd %xmm6, %xmm4            # xmm4 = xmm4[1],xmm6[1]
addsd %xmm6, %xmm4
divsd %xmm3, %xmm4
divsd %xmm0, %xmm3
leaq 0x2240c(%rip), %rsi     # 0x2818b
leaq 0x223f9(%rip), %rdx     # 0x2817f
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movq %r14, %rcx
movq %rbx, %r8
movb $0x5, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2260