// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/htab.cpp
// Function: ha_pt_gen_dp(hifiasm_opt_t const*, ha_ct_t*, int, int, void const*, All_reads*, int, int)
ha_pt_t *ha_pt_gen_dp(const hifiasm_opt_t *asm_opt, ha_ct_t *ct, int flag, int n_thread, const void *flt_tab, All_reads *rs, int peak_hom, int peak_het)
{
	int low_freq = mz_low_b(peak_hom, peak_het);
	ha_pt_t *pt = ha_pt_gen_count(ct, n_thread); ///key = cnt, val = 0
	ha_count(asm_opt, HAF_COUNT_EXACT|HAF_COUNT_REFINE|flag, !(asm_opt->flag&HA_F_NO_HPC), asm_opt->k_mer_length, asm_opt->mz_win, pt, flt_tab, rs, NULL, 1, &low_freq, 0);
	uint64_t occ = ha_pt_shrink(pt, n_thread);
	if(flag&HAF_RS_WRITE_LEN) flag -= HAF_RS_WRITE_LEN;
	if(flag&HAF_RS_WRITE_SEQ) flag -= HAF_RS_WRITE_SEQ;
	flag |= HAF_RS_READ; pt->tot_pos = 0;
	ha_count(asm_opt, HAF_COUNT_EXACT|flag, !(asm_opt->flag&HA_F_NO_HPC), asm_opt->k_mer_length, asm_opt->mz_win, pt, flt_tab, rs, NULL, 1, NULL, 0);
	// fprintf(stderr, "[M::%s::] counted %lu distinct minimizer k-mers\n", __func__, pt->tot);
	// fprintf(stderr, "[M::%s::] collected %lu minimizers\n\n\n", __func__, pt->tot_pos);
	assert(occ == pt->tot_pos);
	return pt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, 0x8(%rsp)
movl %ecx, %ebp
movl %edx, %r13d
movq %rdi, %r12
movl 0x50(%rsp), %eax
movl 0x58(%rsp), %ecx
movl %ecx, %edx
shrl %edx
movl %eax, %edi
shrl $0x2, %edi
testl %eax, %eax
pushq $0x2
popq %rax
cmovlel %eax, %edi
testl %ecx, %ecx
cmovgl %edx, %edi
cmpl $0x3, %edi
cmovbl %eax, %edi
leaq 0x4(%rsp), %rax
movl %edi, (%rax)
movq %rsi, %rdi
movl %ebp, %esi
callq 0xd486d
movq %rax, %r15
movl %r13d, %esi
orl $0x101, %esi            # imm = 0x101
movl (%r12), %edx
movl 0x80(%r12), %ecx
notl %edx
pushq $0x1
popq %rbx
andl %ebx, %edx
movl 0x94(%r12), %r8d
movq %r12, %rdi
movq %rax, %r9
pushq $0x0
leaq 0xc(%rsp), %rax
pushq %rax
movq 0x18(%rsp), %rax
pushq %rbx
pushq $0x0
movq %r14, 0x30(%rsp)
pushq %r14
movq %rax, %r14
pushq %rax
callq 0xd5694
addq $0x30, %rsp
movb 0x4(%r15), %cl
movl %ebx, %eax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x4357(%rip), %rsi      # 0xdad08
movl %ebp, %edi
movq %r15, %rdx
callq 0xc67c0
andq $0x0, 0x8(%r15)
movb 0x4(%r15), %cl
shll %cl, %ebx
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
shlq $0x5, %rbx
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpq %rax, %rbx
je 0xd69f7
movq 0x18(%r15), %rdx
movq (%rdx,%rax), %rsi
movl 0x4(%rsi), %esi
addq %rsi, %rcx
movq %rcx, 0x8(%r15)
addq 0x8(%rdx,%rax), %rbp
addq $0x20, %rax
jmp 0xd69d5
leal -0x4(%r13), %eax
testb $0x4, %r13b
cmovel %r13d, %eax
leal -0x8(%rax), %esi
testb $0x8, %al
cmovel %eax, %esi
andq $0x0, 0x10(%r15)
orl $0x11, %esi
movl (%r12), %edx
movl 0x80(%r12), %ecx
notl %edx
andl $0x1, %edx
movl 0x94(%r12), %r8d
movq %r12, %rdi
movq %r15, %r9
pushq $0x0
pushq $0x0
pushq $0x1
pushq $0x0
pushq 0x30(%rsp)
pushq %r14
callq 0xd5694
addq $0x30, %rsp
cmpq 0x10(%r15), %rbp
jne 0xd6a61
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x115529(%rip), %rdi    # 0x1ebf91
leaq 0x1151b0(%rip), %rsi    # 0x1ebc1f
leaq 0x11552e(%rip), %rcx    # 0x1ebfa4
movl $0x4cc, %edx            # imm = 0x4CC
callq 0x2110