// File: /workspace/github_cpp_makefile_star2_O3/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, 0x18(%rsp)
leaq 0xa0(%r13), %r14
leaq 0xc0(%r13), %r8
leaq 0x48(%r13), %r9
leaq 0x25ad0c(%rip), %rax    # 0x295758
movl 0xe8(%rax), %eax
movq %rax, 0x8(%rsp)
leaq 0x12160(%r13), %rax
movq %rax, (%rsp)
leaq (,%rsi,8), %rsi
leaq (%rsi,%rsi,2), %r15
movq 0x25b833(%rip), %r10    # 0x2962a8
addq %r15, %r10
movq 0x25b831(%rip), %r11    # 0x2962b0
addq %r15, %r11
leaq 0x121a0(%r13), %rbx
leaq 0x12250(%r13), %rbp
subq $0x8, %rsp
movsd 0x1f357c(%rip), %xmm0   # 0x22e018
movq %r12, %rsi
movq %r14, %rcx
movq %r14, 0x18(%rsp)
pushq %rbp
movl $0x0, %ebp
pushq %rbp
movl $0x0, %ebp
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
pushq %rbp
pushq $0x1
pushq 0x50(%rsp)
callq 0x12a53a
addq $0x50, %rsp
leaq 0x108(%r13), %rbp
movq %rbp, %rdi
callq 0x475fb
leaq 0x9330(%r13), %rbx
movq %rbx, %rdi
callq 0x4758d
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 0x25b718(%rip), %rsi    # 0x296230
movq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %r14
pushq %r14
leaq 0x2c(%rsp), %r14
pushq %r14
movl $0x0, %r14d
pushq %r14
pushq %r14
pushq %r10
pushq 0x28(%rsp)
pushq %rbx
movq %r11, 0x38(%rsp)
pushq %r11
pushq %rbp
pushq %rax
callq 0x582c6
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 0x25b6dc(%rip), %rax    # 0x296258
movb $0x0, (%rax,%r12)
movq 0x25b720(%rip), %rdi    # 0x2962a8
addq %r15, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x383ed
addq 0x25b70c(%rip), %r15    # 0x2962b0
movq %r15, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0x383ed
movq 0x25b82d(%rip), %rbx    # 0x2963e8
testq %rbx, %rbx
je 0x3abcd
movq (%rsp), %rdi
callq 0x38f0d
movl %eax, (%rbx,%r12,4)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq