// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x2, %eax
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 0x11343f
movq %rax, %r15
movl %r13d, %esi
orl $0x101, %esi            # imm = 0x101
movl (%r12), %edx
movl 0x80(%r12), %ecx
notl %edx
movl $0x1, %r10d
andl %r10d, %edx
movl 0x94(%r12), %r8d
xorl %ebx, %ebx
movq %r12, %rdi
movq %rax, %r9
pushq $0x0
leaq 0xc(%rsp), %rax
pushq %rax
movq 0x18(%rsp), %rax
pushq %r10
pushq %rbx
movq %r14, 0x30(%rsp)
pushq %r14
movq %rax, %r14
pushq %rax
callq 0x11445e
addq $0x30, %rsp
movb 0x4(%r15), %cl
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rcx
leaq 0x3cce(%rip), %rsi      # 0x118da7
movl %ebp, %edi
movq %r15, %rdx
callq 0x1047b4
movq %rbx, 0x8(%r15)
movl 0x4(%r15), %ecx
cmpl $0x1f, %ecx
je 0x11512c
movl $0x1, %eax
shll %cl, %eax
movq 0x18(%r15), %rcx
cmpl $0x2, %eax
movl $0x1, %edx
cmovll %edx, %eax
shlq $0x5, %rax
xorl %edx, %edx
xorl %esi, %esi
xorl %ebx, %ebx
movq (%rcx,%rdx), %rdi
movl 0x4(%rdi), %edi
addq %rdi, %rsi
addq 0x8(%rcx,%rdx), %rbx
addq $0x20, %rdx
cmpq %rdx, %rax
jne 0x115110
movq %rsi, 0x8(%r15)
leal -0x4(%r13), %eax
testb $0x4, %r13b
cmovel %r13d, %eax
leal -0x8(%rax), %esi
testb $0x8, %al
cmovel %eax, %esi
xorl %eax, %eax
movq %rax, 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 %rax
pushq $0x1
pushq %rax
pushq 0x30(%rsp)
pushq %r14
callq 0x11445e
addq $0x30, %rsp
cmpq 0x10(%r15), %rbx
jne 0x115195
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x118d05(%rip), %rdi    # 0x22dea1
leaq 0x11898c(%rip), %rsi    # 0x22db2f
leaq 0x118d0a(%rip), %rcx    # 0x22deb4
movl $0x4cc, %edx            # imm = 0x4CC
callq 0x2110