// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/Assembly.cpp
// Function: worker_ovec_cal0(void*, long, int)
static void worker_ovec_cal0(void *data, long i, int tid)
{
	ha_ovec_buf_t *b = ((ha_ovec_buf_t**)data)[tid];
	int fully_cov, abnormal;

    ha_get_candidates_interface(b->ab, i, &b->self_read, &b->olist, &b->olist_hp, &b->clist, 
    0.02, asm_opt.max_n_chain, 1, NULL/**&(b->k_flag)**/, &b->r_buf, &(R_INF.paf[i]), &(R_INF.reverse_paf[i]), &(b->tmp_region), NULL, &(b->sp));

	clear_Cigar_record(&b->cigar1);
	clear_Round2_alignment(&b->round2);

	correct_overlap(&b->olist, &R_INF, &b->self_read, &b->correct, &b->ovlp_read, &b->POA_Graph, &b->DAGCon,
			&b->cigar1, &b->hap, &b->round2, &b->r_buf, &(b->tmp_region.w_list), 0, 0/**1***/, &fully_cov, &abnormal);

	b->num_read_base += b->self_read.length;
	b->num_correct_base += b->correct.corrected_base;
	b->num_recorrect_base += b->round2.dumy.corrected_base;


	// R_INF.paf[i].is_fully_corrected = 0;
	// R_INF.paf[i].is_abnormal = abnormal;
    R_INF.trio_flag[i] = AMBIGU;

    // R_INF.paf[i].is_fully_corrected = 0;
    // if (fully_cov) {
    //     if (get_cigar_errors(&b->cigar1) == 0 && get_cigar_errors(&b->round2.cigar) == 0)
    //         R_INF.paf[i].is_fully_corrected = 1;
    // }
    // R_INF.paf[i].is_abnormal = abnormal;
    // R_INF.trio_flag[i] = AMBIGU;
    
    push_final_overlaps(&(R_INF.paf[i]), R_INF.reverse_paf, &b->olist, 1);
    push_final_overlaps(&(R_INF.reverse_paf[i]), R_INF.reverse_paf, &b->olist, 2);

    if(het_cnt) het_cnt[i] = get_het_cnt(&b->hap);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movslq %edx, %rax
movq (%rdi,%rax,8), %r13
movq 0xe0(%r13), %rdi
leaq 0x8(%r13), %rdx
movq %rdx, (%rsp)
leaq 0xa0(%r13), %r14
leaq 0xc0(%r13), %r8
leaq 0x48(%r13), %r9
leaq 0x245605(%rip), %rax    # 0x253758
movl 0xe8(%rax), %eax
movq %rax, 0x10(%rsp)
leaq 0x12160(%r13), %rax
movq %rax, 0x18(%rsp)
imulq $0x18, %rsi, %r15
movq 0x246133(%rip), %r10    # 0x2542a8
addq %r15, %r10
movq 0x246131(%rip), %r11    # 0x2542b0
addq %r15, %r11
leaq 0x121a0(%r13), %rbx
leaq 0x12250(%r13), %rbp
subq $0x8, %rsp
movsd 0x1d1e7c(%rip), %xmm0   # 0x1e0018
movq %r14, %rcx
movq %r14, 0x10(%rsp)
pushq %rbp
pushq $0x0
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
pushq $0x0
pushq $0x1
pushq 0x58(%rsp)
callq 0xe53a4
addq $0x50, %rsp
leaq 0x108(%r13), %rbp
movq %rbp, %rdi
callq 0x1b25d
leaq 0x9330(%r13), %rbx
movq %rbx, %rdi
callq 0x1b1e8
leaq 0x2c0(%r13), %rcx
leaq 0x28(%r13), %r8
leaq 0x148(%r13), %r9
leaq 0x200(%r13), %rax
leaq 0x9040(%r13), %r11
leaq 0x121e8(%r13), %r10
movq %r14, %rdi
leaq 0x246023(%rip), %rsi    # 0x254230
movq (%rsp), %rdx
leaq 0x20(%rsp), %r14
pushq %r14
leaq 0x2c(%rsp), %r14
pushq %r14
pushq $0x0
pushq $0x0
pushq %r10
pushq 0x40(%rsp)
pushq %rbx
movq %r11, 0x38(%rsp)
pushq %r11
pushq %rbp
pushq %rax
callq 0x29192
addq $0x50, %rsp
movq 0x10(%r13), %rax
addq %rax, 0xf0(%r13)
movq 0x2e0(%r13), %rax
addq %rax, 0xf8(%r13)
movq 0x9350(%r13), %rax
addq %rax, 0x100(%r13)
movq 0x245fee(%rip), %rax    # 0x254258
movb $0x0, (%rax,%r12)
movq 0x246032(%rip), %rdi    # 0x2542a8
addq %r15, %rdi
pushq $0x1
popq %rcx
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xc073
addq 0x246020(%rip), %r15    # 0x2542b0
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %rbx, %rdx
callq 0xc073
movq 0x246143(%rip), %rbx    # 0x2543e8
testq %rbx, %rbx
je 0xe2b7
movq (%rsp), %rdi
callq 0xc980
movl %eax, (%rbx,%r12,4)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq