// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: worker_hap_dc_ec_chemical_arc(void*, long, int)
static void worker_hap_dc_ec_chemical_arc(void *data, long i, int tid)
{
    ec_ovec_buf_t0 *b = &(((ec_ovec_buf_t*)data)->a[tid]);
    ma_hit_t_alloc *paf = &(R_INF.paf[i]), *rev; uint64_t k, z;

    if(b->cnt[1] == 0) {
        if(is_chemical_r_adv(&(R_INF.paf[i]), &b->v64, Get_READ_LENGTH((R_INF), i), asm_opt.chemical_cov, asm_opt.chemical_flank, 0.02, 1)) {
            // fprintf(stderr, "-um-[M::%s]\tqn::%u::%.*s\n\n", __func__, (uint32_t)(i), (int)Get_NAME_LENGTH(R_INF, i), Get_NAME((R_INF), i));   
            for (k = 0; k < paf->length; k++) paf->buffer[k].del = 1; b->cnt[0]++;
        }
    } else if(b->cnt[1] == 1) {
        for (k = 0; k < paf->length; k++) {
            if((Get_qn(paf->buffer[k])) > (Get_tn(paf->buffer[k]))) continue;
            rev = &(R_INF.paf[paf->buffer[k].tn]);
            for (z = 0; z < rev->length; z++) {
                if((rev->buffer[z].tn == (Get_qn(paf->buffer[k])))) {
                    if(paf->buffer[k].del != rev->buffer[z].del) {
                        paf->buffer[k].del = rev->buffer[z].del = 1;
                    }
                }
            }
        }
    }

   refresh_ec_ovec_buf_t0(b, REFRESH_N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x5c0, %rcx, %rcx      # imm = 0x5C0
addq %rcx, %rax
movq %rax, -0x20(%rbp)
leaq 0x159d9d(%rip), %rax    # 0x3c52d0
movq 0x78(%rax), %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x26b629
leaq 0x159d74(%rip), %rax    # 0x3c52d0
movq 0x78(%rax), %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x4d0, %rsi            # imm = 0x4D0
leaq 0x159d56(%rip), %rax    # 0x3c52d0
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x15926b(%rip), %rax    # 0x3c47f8
movq 0x2b8(%rax), %rcx
leaq 0x15925d(%rip), %rax    # 0x3c47f8
movq 0x2c0(%rax), %r8
movsd 0x113a9e(%rip), %xmm0   # 0x37f048
movl $0x1, %r9d
callq 0x25b6e0
cmpl $0x0, %eax
je 0x26b624
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x26b60e
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x38(%rbp), %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x18(%rax), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x26b5c2
movq -0x20(%rbp), %rax
movq 0xc0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc0(%rax)
jmp 0x26b7b4
movq -0x20(%rbp), %rax
cmpq $0x1, 0xc8(%rax)
jne 0x26b7b2
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x26b7b0
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x38(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x38(%rbp), %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
jbe 0x26b686
jmp 0x26b79f
leaq 0x159c43(%rip), %rax    # 0x3c52d0
movq 0x78(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x26b79d
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x38(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
cmpl %ecx, %eax
jne 0x26b78a
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x38(%rbp), %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
shrq $0x3f, %rcx
cmpl %ecx, %eax
je 0x26b788
movq -0x30(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x18(%rax), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x38(%rbp), %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x18(%rax), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rcx
movq %rcx, 0x18(%rax)
jmp 0x26b78a
jmp 0x26b78c
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x26b6b6
jmp 0x26b79f
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x26b643
jmp 0x26b7b2
jmp 0x26b7b4
movq -0x20(%rbp), %rdi
movl $0x80, %esi
callq 0x26e2d0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)