// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/correct.c
// Function: fmc_collect
fmc64_v *fmc_collect(fmc_opt_t *opt, const char *fn_fmi)
{
	rld_t *e;
	double tc, tr;
	int depth = opt->c.k - opt->c.suf_len, n_suf = 1 << opt->c.suf_len*2;
	for_collect_t f;

	assert(0 < depth && depth <= 18);

	fprintf(stderr, "[M::%s] reading the FMD-index... ", __func__);
	tc = cputime(); tr = realtime();
	e = rld_restore(fn_fmi);
	fprintf(stderr, " in %.3f sec (%.3f CPU sec)\n", realtime() - tr, cputime() - tc);

	fprintf(stderr, "[M::%s] collecting high occurrence k-mers... ", __func__);
	tc = cputime(); tr = realtime();
	f.e = e; f.opt = opt; f.depth = depth;
	f.suf = fmc_traverse(e, opt->c.suf_len);
	f.qtab[0] = fmc_precal_qtab(1<<8, opt->c.err, 0.5,      opt->c.a1, opt->c.a2, opt->c.prior);
	f.qtab[1] = fmc_precal_qtab(1<<8, opt->c.err, 0.333333, opt->c.a1, opt->c.a2, opt->c.prior);
	f.kmer = calloc(n_suf, sizeof(fmc64_v));
	kt_for(opt->n_threads, collect_func, &f, n_suf);
	rld_destroy(e);
	free(f.qtab[0]); free(f.qtab[1]); free(f.suf);
	fprintf(stderr, "in %.3f sec (%.3f CPU sec)\n", realtime() - tr, cputime() - tc);

	fmc_kmer_stat(opt->c.suf_len, f.kmer);
	return f.kmer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl (%rdi), %ecx
movswl %cx, %ebp
sarl $0x10, %ecx
subl %ecx, %ebp
leal -0x1(%rbp), %eax
cmpl $0x12, %eax
jae 0x5df5
movq %rsi, %r12
movq %rdi, %rbx
addl %ecx, %ecx
pushq $0x1
popq %r14
shll %cl, %r14d
movq 0x1c3b5(%rip), %r15     # 0x21ff8
movq (%r15), %rdi
leaq 0x13a08(%rip), %rsi     # 0x19655
leaq 0x13a23(%rip), %rdx     # 0x19677
xorl %eax, %eax
callq 0x21c0
callq 0x3b2e
movsd %xmm0, 0x8(%rsp)
callq 0x3b71
movsd %xmm0, (%rsp)
movq %r12, %rdi
callq 0x2f1e
movq %rax, %r12
movq (%r15), %r13
callq 0x3b71
subsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
callq 0x3b2e
movapd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
leaq 0x13b59(%rip), %rsi     # 0x197fc
movq %r13, %rdi
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0x21c0
movq (%r15), %rdi
movq %r15, %r13
leaq 0x139c4(%rip), %rsi     # 0x19683
leaq 0x139b1(%rip), %rdx     # 0x19677
xorl %eax, %eax
callq 0x21c0
callq 0x3b2e
movsd %xmm0, 0x8(%rsp)
callq 0x3b71
movsd %xmm0, (%rsp)
leaq 0x10(%rsp), %r15
movq %r12, 0x8(%r15)
movq %rbx, (%r15)
movl %ebp, 0x30(%r15)
movswl 0x2(%rbx), %esi
movq %r12, %rdi
callq 0x5589
movq %rax, 0x20(%r15)
movsd 0x20(%rbx), %xmm0
movsd 0x10(%rbx), %xmm2
movsd 0x18(%rbx), %xmm3
movsd 0x28(%rbx), %xmm4
movsd 0x1383a(%rip), %xmm1    # 0x19558
movl $0x100, %edi            # imm = 0x100
callq 0x544d
movq %rax, 0x10(%r15)
movsd 0x20(%rbx), %xmm0
movsd 0x10(%rbx), %xmm2
movsd 0x18(%rbx), %xmm3
movsd 0x28(%rbx), %xmm4
movsd 0x13818(%rip), %xmm1    # 0x19560
movl $0x100, %edi            # imm = 0x100
callq 0x544d
movq %rax, 0x18(%r15)
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2190
movq %rax, 0x28(%r15)
movl 0x30(%rbx), %edi
leaq 0xa5(%rip), %rsi        # 0x5e14
movq %r15, %rdx
movq %r14, %rcx
callq 0x247c
movq %r12, %rdi
callq 0x26e6
movq 0x10(%r15), %rdi
callq 0x2040
movq 0x18(%r15), %rdi
callq 0x2040
movq 0x20(%r15), %rdi
callq 0x2040
movq (%r13), %r14
callq 0x3b71
subsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
callq 0x3b2e
movapd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
leaq 0x13a37(%rip), %rsi     # 0x197fd
movq %r14, %rdi
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0x21c0
movswl 0x2(%rbx), %edi
movq 0x28(%r15), %rsi
callq 0x5bc8
movq 0x28(%r15), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13806(%rip), %rdi     # 0x19602
leaq 0x13818(%rip), %rsi     # 0x1961b
leaq 0x1381b(%rip), %rcx     # 0x19625
movl $0x13c, %edx            # imm = 0x13C
callq 0x2120