// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/anchor.cpp
// Function: ul_map_lchain(ha_abufl_s*, unsigned int, char*, unsigned long, unsigned long, unsigned long, ul_idx_t const*, overlap_region_alloc*, Candidates_list*, double, int, int, kvec_t_u8_warp*, overlap_region*, kvec_t_u64_warp*, st_mt_t*, unsigned int*, unsigned int*, unsigned int, unsigned int, double, unsigned int, unsigned int)
void ul_map_lchain(ha_abufl_t *ab, uint32_t rid, char* rs, uint64_t rl, uint64_t mz_w, uint64_t mz_k, const ul_idx_t *uref, overlap_region_alloc *overlap_list, Candidates_list *cl, double bw_thres, 
								 int max_n_chain, int apend_be, kvec_t_u8_warp* k_flag, overlap_region* f_cigar, kvec_t_u64_warp* dbg_ct, st_mt_t *sp, uint32_t *high_occ, uint32_t *low_occ, uint32_t is_accurate, uint32_t gen_off, double mcopy_rate, uint32_t chain_cutoff, uint32_t mcopy_khit_cut)
{
	extern void *ha_flt_tab;
	extern ha_pt_t *ha_idx;
	int64_t max_skip, max_iter, max_dis, quick_check; double chn_pen_gap, chn_pen_skip;
	set_lchain_dp_op(is_accurate, mz_k, &max_skip, &max_iter, &max_dis, &chn_pen_gap, &chn_pen_skip, &quick_check);
	// minimizers_gen(ab, rs, rl, mz_w, mz_k, cl, k_flag, ha_flt_tab, ha_idx, dbg_ct, sp, high_occ, low_occ);
	minimizers_qgen(ab, rs, rl, mz_w, mz_k, cl, k_flag, ha_flt_tab, ha_idx, NULL, uref, dbg_ct, sp, high_occ, low_occ);
	// lchain_gen(cl, overlap_list, rid, rl, NULL, uref, apend_be, f_cigar, max_n_chain, max_skip, max_iter, max_dis, chn_pen_gap, chn_pen_skip, bw_thres, quick_check, gen_off);
	// lchain_qgen(cl, overlap_list, rid, rl, NULL, uref, apend_be, f_cigar, max_n_chain, max_skip, max_iter, max_dis, chn_pen_gap, chn_pen_skip, bw_thres, quick_check, gen_off);
	///no need to sort here, overlap_list has been sorted at lchain_gen
	lchain_qgen_mcopy(cl, overlap_list, rid, rl, NULL, uref, apend_be, max_n_chain, max_skip, max_iter, max_dis, chn_pen_gap, chn_pen_skip, bw_thres, quick_check, gen_off, mcopy_rate, chain_cutoff, mcopy_khit_cut, sp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq %r9, %r15
movq %r8, 0x18(%rsp)
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, 0x4(%rsp)
movq %rdi, %r13
movslq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
xorl %ebp, %ebp
cmpl $0x0, 0xc8(%rsp)
setne %bpl
movl %r15d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
leaq 0x104e25(%rip), %rax    # 0x22e980
mulsd (%rax,%rbp,8), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x70(%rsp), %r12
callq 0x2380
cvtss2sd %xmm0, %xmm0
movsd 0xfb976(%rip), %xmm1    # 0x2254f0
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
mulsd 0x104e0c(%rip), %xmm0   # 0x22e998
movsd %xmm0, 0x8(%rsp)
leaq 0x161897(%rip), %rax    # 0x28b430
movq (%rax), %rax
leaq 0x161895(%rip), %rcx    # 0x28b438
movq (%rcx), %rcx
subq $0x50, %rsp
movups 0x108(%rsp), %xmm0
movups %xmm0, 0x38(%rsp)
movups 0xf8(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq %r12, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x68(%rsp), %rcx
movq %r15, %r8
movq 0xd0(%rsp), %r14
movq %r14, %r9
callq 0x124ff4
addq $0x48, %rsp
movl $0x1388, %eax           # imm = 0x1388
movq %r14, %rdi
movq 0x80(%rsp), %rsi
movl 0xc(%rsp), %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movq %r12, %r9
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
movl 0xe8(%rsp), %r10d
pushq %r10
movl 0xe8(%rsp), %r10d
pushq %r10
movl 0xe8(%rsp), %r10d
pushq %r10
pushq %rbp
pushq %rax
pushq %rax
pushq $0x19
pushq 0x70(%rsp)
movl 0xd8(%rsp), %eax
pushq %rax
callq 0x12847b
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq