// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/anchor.cpp
// Function: h_ec_lchain(ha_abuf_s*, unsigned int, char*, unsigned long, unsigned long, unsigned long, All_reads*, overlap_region_alloc*, Candidates_list*, double, int, int, kvec_t_u8_warp*, kvec_t_u64_warp*, st_mt_t*, unsigned int*, unsigned int*, unsigned int, unsigned int, long, double, unsigned int, unsigned int, unsigned long)
void h_ec_lchain(ha_abuf_t *ab, uint32_t rid, char* rs, uint64_t rl, uint64_t mz_w, uint64_t mz_k, All_reads *rref, overlap_region_alloc *overlap_list, Candidates_list *cl, double bw_thres, 
								 int max_n_chain, int apend_be, kvec_t_u8_warp* k_flag, 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, int64_t mcopy_num, double mcopy_rate, uint32_t chain_cutoff, uint32_t mcopy_khit_cut, uint64_t ocv_w)
{
	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_qgen0(ab, rs, rl, mz_w, mz_k, cl, k_flag, ha_flt_tab, ha_idx, rref, 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_fast(cl, overlap_list, rid, rl, rref, apend_be, max_n_chain, max_skip, max_iter, max_dis, chn_pen_gap, chn_pen_skip, bw_thres, quick_check, gen_off, mcopy_num, mcopy_rate, chain_cutoff, mcopy_khit_cut, sp, ocv_w);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq %r9, %r12
movq %r8, 0x18(%rsp)
movq %rcx, %r14
movq %rdx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdi, %r13
movslq 0xb8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %r15
movq 0xd8(%rsp), %rbx
movl 0xf0(%rsp), %edi
leaq 0x40(%rsp), %rax
leaq 0x38(%rsp), %r10
leaq 0x58(%rsp), %rdx
leaq 0x50(%rsp), %rcx
leaq 0x48(%rsp), %r8
leaq 0x60(%rsp), %rbp
movl %r12d, %esi
movq %rbp, %r9
pushq %rax
pushq %r10
callq 0xea117
popq %rax
popq %rcx
leaq 0x16a09a(%rip), %rax    # 0x254430
movq (%rax), %rax
leaq 0x16a098(%rip), %rcx    # 0x254438
movq (%rcx), %rcx
subq $0x40, %rsp
movaps 0x120(%rsp), %xmm0
movups %xmm0, 0x30(%rsp)
movq %rbx, 0x28(%rsp)
movq 0x110(%rsp), %rdx
movq %rdx, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq 0x108(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movq 0x50(%rsp), %rsi
movq %r14, %rdx
movq 0x58(%rsp), %rcx
movq %r12, %r8
movq 0xf0(%rsp), %r9
callq 0xe6346
addq $0x40, %rsp
movsd (%rbp), %xmm0
leaq 0x38(%rsp), %rax
movsd (%rax), %xmm1
subq $0x8, %rsp
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movl 0x14(%rsp), %edx
movq %r14, %rcx
movq %r15, %r8
movl 0xc8(%rsp), %r9d
movsd 0x28(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
pushq 0x120(%rsp)
pushq 0xe8(%rsp)
movl 0x128(%rsp), %eax
pushq %rax
movl 0x128(%rsp), %eax
pushq %rax
pushq 0x128(%rsp)
movl 0x128(%rsp), %eax
pushq %rax
leaq 0x78(%rsp), %rax
pushq (%rax)
leaq 0x88(%rsp), %rax
pushq (%rax)
leaq 0x98(%rsp), %rax
pushq (%rax)
leaq 0xa8(%rsp), %rax
pushq (%rax)
pushq 0x88(%rsp)
callq 0xe93c5
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq