// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_renew_integer_bridge(void*, long, int)
static void worker_renew_integer_bridge(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data; bubble_type *bub = uidx->bub;
    asg_t *bg = uidx->uovl.bg.bg; ul_str_idx_t *str_idx = &(uidx->pstr);
    asg_arc_t *p = &(bg->arc[i]); uint64_t *hid_a, hid_n, z; ul_str_t *str;
    uint32_t v = p->ul>>32, w = p->v, vz, wz; int64_t s, s_n, occ = 0;

    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 = 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));
        s = (uint32_t)hid_a[z]; s -= 1; vz = ((uint32_t)(str->a[(uint32_t)hid_a[z]]))^1;
        for (; s >= 0; s--) {
            wz = (uint32_t)(str->a[s]); wz ^= 1;
            if(IF_HOM((wz>>1), *bub)) continue;
            if(vz == v && wz == w) occ++;
            else if(vz == (v^1) && wz == (w^1)) occ++;
            break;
        }

        s = (uint32_t)hid_a[z]; s += 1; vz = (uint32_t)(str->a[(uint32_t)hid_a[z]]);
        for (; s < s_n; s++) {
            wz = (uint32_t)(str->a[s]);
            if(IF_HOM((wz>>1), *bub)) continue;
            if(vz == v && wz == w) occ++;
            else if(vz == (v^1) && wz == (w^1)) occ++;
            break;
        }
    }
    p->ol = occ; p->ul >>= 32; p->ul <<= 32; p->ul += (((uint32_t)-1) - p->ol);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x1a0(%rdi), %rax
movq 0x278(%rdi), %rcx
movq 0x8(%rcx), %rcx
leaq (%rsi,%rsi,2), %r8
movq (%rcx,%r8,8), %rdx
movq %rdx, %rsi
shrq $0x21, %rsi
movq (%rax,%rsi,8), %r9
movq %rsi, 0x30(%rsp)
movq 0x8(%rax,%rsi,8), %r10
xorl %esi, %esi
subq %r9, %r10
je 0x229e1d
movq 0x28(%rdi), %r11
movq %rdx, 0x28(%rsp)
shrq $0x20, %rdx
movq %rdx, 0x10(%rsp)
shlq $0x3, %r9
addq 0x1b8(%rdi), %r9
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movl 0x8(%rcx,%r8,8), %eax
movl %eax, 0xc(%rsp)
movq 0x1d0(%rdi), %rdi
xorl %esi, %esi
xorl %r14d, %r14d
movq (%r9,%r14,8), %rax
movq %rax, %rcx
shrq $0x1b, %rcx
andq $-0x20, %rcx
movl 0x18(%rdi,%rcx), %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
cmpl $0x2, %r12d
jae 0x229d43
incq %r14
cmpq %r10, %r14
jne 0x229d15
jmp 0x229e08
addq %rdi, %rcx
movq 0x10(%rcx), %r13
movl %eax, %eax
movl (%r13,%rax,8), %r15d
movl %r15d, %edx
shrl %edx
movq %rax, %rcx
cmpl %edx, 0x30(%rsp)
jne 0x229e52
testq %rcx, %rcx
jle 0x229dab
movq -0x8(%r13,%rcx,8), %rbp
decq %rcx
movl %ebp, %edx
shrl %edx
movq (%r11), %rbx
movq 0x80(%r11), %r8
movl (%rbx,%rdx,4), %edx
incq %r8
cmpq %rdx, %r8
jb 0x229d63
movl %r15d, %ecx
xorl 0x10(%rsp), %ecx
xorl 0xc(%rsp), %ebp
cmpl $0x1, %ecx
jne 0x229da2
cmpl $0x1, %ebp
jne 0x229da2
incl %esi
jmp 0x229dab
xorl %edx, %edx
orl %ebp, %ecx
sete %dl
addl %edx, %esi
incq %rax
cmpq %r12, %rax
jae 0x229d36
movq (%r13,%rax,8), %rdx
movl %edx, %ecx
shrl %ecx
movq (%r11), %r8
movq 0x80(%r11), %rbx
movl (%r8,%rcx,4), %ecx
incq %rbx
incq %rax
cmpq %rcx, %rbx
jb 0x229dae
cmpl 0x10(%rsp), %r15d
jne 0x229de9
cmpl %edx, 0xc(%rsp)
jne 0x229de9
incl %esi
jmp 0x229d36
xorl 0x10(%rsp), %r15d
xorl $0x1, %r15d
xorl 0xc(%rsp), %edx
xorl $0x1, %edx
xorl %eax, %eax
orl %r15d, %edx
sete %al
addl %eax, %esi
jmp 0x229d36
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
leaq (%rcx,%r8,8), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
andl 0xc(%rax), %ecx
orl %esi, %ecx
movl %ecx, 0xc(%rax)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rdx
notl %esi
orq %rdx, %rsi
movq %rsi, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e1f6(%rip), %rdi     # 0x24804f
leaq 0x1b7a9(%rip), %rsi     # 0x245609
leaq 0x20868(%rip), %rcx     # 0x24a6cf
movl $0x40f7, %edx           # imm = 0x40F7
callq 0x2110