// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %r9, %r13
movq %r8, %rbp
movl %ecx, 0x8(%rsp)
movl %edx, %ebx
movq %rdi, %r12
movl 0x60(%rsp), %eax
movl 0x68(%rsp), %r8d
movl %r8d, %edx
shrl %edx
movl %eax, %edi
shrl $0x2, %edi
testl %eax, %eax
movl $0x2, %eax
cmovlel %eax, %edi
testl %r8d, %r8d
cmovgl %edx, %edi
cmpl $0x3, %edi
cmovbl %eax, %edi
leaq 0xc(%rsp), %rax
movl %edi, (%rax)
movq %rsi, %rdi
movl %ecx, %esi
callq 0x118f1f
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movl %ebx, %esi
orl $0x101, %esi            # imm = 0x101
movl (%r12), %edx
movl 0x80(%r12), %ecx
notl %edx
movl $0x1, %r14d
andl %r14d, %edx
movl 0x94(%r12), %r8d
xorl %ebx, %ebx
movq %r12, %rdi
movq %rax, %r9
pushq $0x0
leaq 0x14(%rsp), %rax
pushq %rax
pushq %r14
pushq %rbx
movq %r13, 0x38(%rsp)
pushq %r13
movq %rbp, 0x48(%rsp)
pushq %rbp
callq 0x119f0d
addq $0x30, %rsp
movb 0x4(%r15), %cl
shll %cl, %r14d
movslq %r14d, %rcx
leaq 0x3d4f(%rip), %rsi      # 0x11e96c
movl 0x8(%rsp), %edi
movq %r15, %rdx
callq 0x108f2c
movq %rbx, 0x8(%r15)
movl 0x4(%r15), %ecx
cmpq $0x1f, %rcx
je 0x11ac69
movl $0x1, %eax
shlq %cl, %rax
movq 0x18(%r15), %rcx
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 0x11ac4d
movq %rsi, 0x8(%r15)
movq 0x10(%rsp), %rcx
leal -0x4(%rcx), %eax
testb $0x4, %cl
cmovel %ecx, %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 0x38(%rsp)
pushq 0x48(%rsp)
callq 0x119f0d
addq $0x30, %rsp
cmpq 0x10(%r15), %rbx
jne 0x11acd6
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11f3d4(%rip), %rdi    # 0x23a0b1
leaq 0x11f05b(%rip), %rsi    # 0x239d3f
leaq 0x11f3d9(%rip), %rcx    # 0x23a0c4
movl $0x4cc, %edx            # imm = 0x4CC
callq 0x2110