// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_update_ul_arc_drop(void*, long, int)
static void worker_update_ul_arc_drop(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data; integer_t *buf = &(uidx->str_b.buf[tid]);
    ul_str_idx_t *str_idx = &(uidx->pstr); uinfo_srt_warp_t *seq = uidx->uovl.iug_seq;
    uint32_t v = seq->a[i].v, z, vz; uint64_t *hid_a, hid_n; ul_str_t *str;
    int64_t s_n, s, p, p_n = seq->n; uint64_t cutoff = uidx->uovl.iug_cov_thre, occ;

    hid_a = str_idx->occ.a + str_idx->idx.a[v>>1];
    hid_n = str_idx->idx.a[(v>>1)+1] - str_idx->idx.a[v>>1];
    for (z = occ = 0; z < hid_n; z++) {
        str = &(str_idx->str.a[hid_a[z]>>32]); s_n = str->cn;
        if(s_n < 2) continue;
        vz = (uint32_t)(str->a[(uint32_t)hid_a[z]]);
        assert((v>>1) == (vz>>1)); 

        if(v == vz) {
            s = ((uint32_t)hid_a[z]) + 1; p = i + 1; 
            if((s < s_n) && (p < p_n) && ((uint32_t)(str->a[s]) == seq->a[p].v)) {
                occ++;
            }
        } else {
            s = ((int32_t)((uint32_t)hid_a[z]))-1; p = i + 1; 
            if((s >= 0) && (p < p_n) && ((uint32_t)(str->a[s]) == (seq->a[p].v^1))) {
                occ++;
            }
        }
        if(occ >= cutoff) break;
    }

    if(occ < cutoff) kv_push(uint64_t, buf->res_dump, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x1a0(%rdi), %rax
movq 0x1d8(%rdi), %rcx
movq %rcx, 0x20(%rsp)
movslq %edx, %rcx
movq %rcx, 0x18(%rsp)
movq 0x298(%rdi), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x10(%rcx), %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
movl (%rcx,%rdx), %r8d
movq 0x2a0(%rdi), %rdx
movl %r8d, %r9d
shrl %r9d
movq (%rax,%r9,8), %rbx
leaq (,%rbx,8), %r10
addq 0x1b8(%rdi), %r10
movq 0x8(%rax,%r9,8), %r11
subq %rbx, %r11
movq %rsi, 0x8(%rsp)
leaq 0x1(%rsi), %r14
movq %r14, %r15
shlq $0x4, %r15
addq %rcx, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movl %r13d, %r13d
cmpq %r13, %r11
jbe 0x1d846b
movq 0x1d0(%rdi), %rax
movq (%r10,%r13,8), %rbx
movq %rbx, %rbp
shrq $0x1b, %rbp
andq $-0x20, %rbp
movl 0x18(%rax,%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl $0x2, %ecx
jb 0x1d8463
addq %rbp, %rax
movq 0x10(%rax), %rax
movl %ebx, %ebp
movl (%rax,%rbp,8), %esi
movl %esi, %ebp
shrl %ebp
cmpl %ebp, %r9d
jne 0x1d84dd
cmpl %esi, %r8d
jne 0x1d8431
cmpq 0x10(%rsp), %r14
setl %sil
incl %ebx
cmpq %rcx, %rbx
setb %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x1d845e
movl (%r15), %ecx
xorl %esi, %esi
cmpl (%rax,%rbx,8), %ecx
sete %sil
addq %rsi, %r12
jmp 0x1d845e
cmpq 0x10(%rsp), %r14
setl %sil
decl %ebx
movslq %ebx, %rcx
testq %rcx, %rcx
setns %bl
andb %sil, %bl
cmpb $0x1, %bl
jne 0x1d845e
movl (%r15), %esi
xorl (%rax,%rcx,8), %esi
xorl %eax, %eax
cmpl $0x1, %esi
sete %al
addq %rax, %r12
cmpq %rdx, %r12
jae 0x1d846b
incl %r13d
jmp 0x1d83b8
cmpq %rdx, %r12
jae 0x1d84ce
imulq $0x328, 0x18(%rsp), %rax # imm = 0x328
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax), %r14
addq $0x300, %r14            # imm = 0x300
movq (%r14), %rcx
cmpq 0x8(%r14), %rcx
jne 0x1d84ba
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x2
popq %rsi
cmovneq %rax, %rsi
movq %rsi, 0x8(%r14)
movq 0x10(%r14), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%r14)
movq (%r14), %rcx
jmp 0x1d84be
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rsi
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
movq %rsi, (%rax,%rcx,8)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21b2a(%rip), %rdi     # 0x1fa00e
leaq 0x1efee(%rip), %rsi     # 0x1f74d9
leaq 0x2416a(%rip), %rcx     # 0x1fc65c
movl $0x2924, %edx           # imm = 0x2924
callq 0x2110