// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: worker_integert_debug_sym(void*, long, int)
static void worker_integert_debug_sym(void *data, long i, int tid) // callback for kt_for()
{
    ul_resolve_t *uidx = (ul_resolve_t *)data;
    ul2ul_item_t *o = get_ul_ovlp(&(uidx->uovl), ulg_id(uidx->uovl, (uint32_t)i), 
                                                            ulg_type(uidx->uovl, (uint32_t)i));
    if(!o) return;
    ul2ul_idx_t *ul2 = &(uidx->uovl); 
    // if(o->is_del) {
    //     assert(o->cn == 0);
    // }

    ul2ul_t *z; uint64_t k, qid = i, ct_n = 0, del_n = 0; assert(o->id == qid);
    for (k = 0; k < o->n; k++) {
        if(o->a[k].is_del) del_n++;
        else if(o->a[k].is_ct) ct_n++;
        assert(ul2->item_idx[o->a[k].hid] != (uint32_t)-1);
        z = get_ul_o(ul2, ulg_id(*ul2, o->a[k].hid), ulg_type(*ul2, o->a[k].hid), 
                                            ulg_id(*ul2, qid), ulg_type(*ul2, qid));
        assert(z && z->hid == qid && z->is_del == o->a[k].is_del && z->is_ct == o->a[k].is_ct);

        // if(!(o->a[k].is_rev == z->is_rev && (*z).qs == o->a[k].ts && (*z).qe == o->a[k].te && 
        //                                                 (*z).ts == o->a[k].qs && (*z).te == o->a[k].qe)){
        //         fprintf(stderr, "uln::%u[M::%s] fn::%u(%c), fqs::%u, fqe::%u, fts::%u, fte::%u, fdel::%u, rn::%u(%c), rqs::%u, rqe::%u, rts::%u, rte::%u, rdel::%u\n", ul2->uln, __func__, 
        //         o->a[k].hid, "+-"[o->a[k].is_rev], o->a[k].qs, o->a[k].qe, o->a[k].ts, o->a[k].te, o->a[k].is_del,
        //         z->hid, "+-"[z->is_rev], z->qs, z->qe, z->ts, z->te, z->is_del);
        // }
        // if(o->a[k].is_rev == z->is_rev && (*z).qs == o->a[k].ts && (*z).qe == o->a[k].te && 
        //     (*z).ts == o->a[k].qs && (*z).te == o->a[k].qe) {
        //     fprintf(stderr, "good::[M::%s] fn::%u(%c), fqs::%u, fqe::%u, fts::%u, fte::%u, rn::%u(%c), rqs::%u, rqe::%u, rts::%u, rte::%u\n", __func__, 
        //         o->a[k].hid, "+-"[o->a[k].is_rev], o->a[k].qs, o->a[k].qe, o->a[k].ts, o->a[k].te, 
        //         z->hid, "+-"[z->is_rev], z->qs, z->qe, z->ts, z->te);
        // } else {
        //     fprintf(stderr, "bad::[M::%s] fn::%u(%c), fqs::%u, fqe::%u, fts::%u, fte::%u, rn::%u(%c), rqs::%u, rqe::%u, rts::%u, rte::%u\n", __func__, 
        //         o->a[k].hid, "+-"[o->a[k].is_rev], o->a[k].qs, o->a[k].qe, o->a[k].ts, o->a[k].te, 
        //         z->hid, "+-"[z->is_rev], z->qs, z->qe, z->ts, z->te);
        // }
        assert(o->a[k].is_rev == z->is_rev && (*z).qs == o->a[k].ts && (*z).qe == o->a[k].te && 
                                                        (*z).ts == o->a[k].qs && (*z).te == o->a[k].qe);
        if(k<o->cn) assert(!o->a[k].is_del);
        else assert(o->a[k].is_del);
    }

    if(o->is_del) assert((ct_n + del_n) == o->n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1f0, %rax            # imm = 0x1F0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl %eax, %eax
movq -0x20(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jb 0x374b56
movq -0x10(%rbp), %rax
movl %eax, %eax
movq -0x20(%rbp), %rcx
subq 0x208(%rcx), %rax
movq %rax, -0x68(%rbp)
jmp 0x374b60
movq -0x10(%rbp), %rax
movl %eax, %eax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rax
movl %eax, %eax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq 0x208(%rax), %r8
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %r8, %rdx
cmovael %ecx, %eax
movslq %eax, %rdx
callq 0x3370e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x374ba0
jmp 0x375021
movq -0x20(%rbp), %rax
addq $0x1f0, %rax            # imm = 0x1F0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
cmpq -0x48(%rbp), %rax
jne 0x374bdc
jmp 0x374bfb
leaq 0x238aa(%rip), %rdi     # 0x39848d
leaq 0x215cf(%rip), %rsi     # 0x3961b9
movl $0x1c51, %edx           # imm = 0x1C51
leaq 0x26828(%rip), %rcx     # 0x39b41e
callq 0x2130
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x374fdd
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x24(%rax), %al
shrb $0x6, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x374c3e
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x374c65
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x24(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x374c63
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x374c65
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x374c86
jmp 0x374ca5
leaq 0x23655(%rip), %rdi     # 0x3982e2
leaq 0x21525(%rip), %rsi     # 0x3961b9
movl $0x1c55, %edx           # imm = 0x1C55
leaq 0x2677e(%rip), %rcx     # 0x39b41e
callq 0x2130
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x374ce7
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x78(%rbp)
jmp 0x374cfc
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl %eax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rsi
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovael %ecx, %eax
movl %eax, -0x7c(%rbp)
movq -0x48(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x374d51
movq -0x48(%rbp), %rax
movq -0x30(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x88(%rbp)
jmp 0x374d5c
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x7c(%rbp), %edx
movl -0x80(%rbp), %esi
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rax
movl %eax, %ecx
movq -0x48(%rbp), %r9
movq -0x30(%rbp), %rax
movq 0x18(%rax), %r10
movl $0x1, %r8d
xorl %eax, %eax
cmpq %r10, %r9
cmovael %eax, %r8d
callq 0x337160
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x89(%rbp)
je 0x374e1d
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x48(%rbp), %rcx
movb %al, -0x89(%rbp)
jne 0x374e1d
movq -0x38(%rbp), %rax
movb 0x24(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rax
movb 0x24(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x89(%rbp)
jne 0x374e1d
movq -0x38(%rbp), %rax
movb 0x24(%rax), %al
shrb $0x7, %al
movzbl %al, %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movb 0x24(%rcx), %cl
shrb $0x7, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x374e29
jmp 0x374e2b
jmp 0x374e4a
leaq 0x2661e(%rip), %rdi     # 0x39b450
leaq 0x21380(%rip), %rsi     # 0x3961b9
movl $0x1c58, %edx           # imm = 0x1C58
leaq 0x265d9(%rip), %rcx     # 0x39b41e
callq 0x2130
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x24(%rax), %al
andb $0x3f, %al
movzbl %al, %ecx
movq -0x38(%rbp), %rax
movb 0x24(%rax), %al
andb $0x3f, %al
movzbl %al, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x8a(%rbp)
jne 0x374f08
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rdx
imulq $0x28, -0x40(%rbp), %rax
addq %rax, %rdx
xorl %eax, %eax
cmpl 0xc(%rdx), %ecx
movb %al, -0x8a(%rbp)
jne 0x374f08
movq -0x38(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rdx
imulq $0x28, -0x40(%rbp), %rax
addq %rax, %rdx
xorl %eax, %eax
cmpl 0x10(%rdx), %ecx
movb %al, -0x8a(%rbp)
jne 0x374f08
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rdx
imulq $0x28, -0x40(%rbp), %rax
addq %rax, %rdx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x8a(%rbp)
jne 0x374f08
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
sete %al
movb %al, -0x8a(%rbp)
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0x374f14
jmp 0x374f16
jmp 0x374f35
leaq 0x26582(%rip), %rdi     # 0x39b49f
leaq 0x21295(%rip), %rsi     # 0x3961b9
movl $0x1c6b, %edx           # imm = 0x1C6B
leaq 0x264ee(%rip), %rcx     # 0x39b41e
callq 0x2130
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x1c(%rcx), %ecx
cmpq %rcx, %rax
jae 0x374f8c
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x24(%rax), %al
shrb $0x6, %al
andb $0x1, %al
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x374f69
jmp 0x374f6b
jmp 0x374f8a
leaq 0x265ad(%rip), %rdi     # 0x39b51f
leaq 0x21240(%rip), %rsi     # 0x3961b9
movl $0x1c6c, %edx           # imm = 0x1C6C
leaq 0x26499(%rip), %rcx     # 0x39b41e
callq 0x2130
jmp 0x374fca
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movb 0x24(%rax), %al
shrb $0x6, %al
andb $0x1, %al
cmpb $0x0, %al
je 0x374fa9
jmp 0x374fc8
leaq 0x26570(%rip), %rdi     # 0x39b520
leaq 0x21202(%rip), %rsi     # 0x3961b9
movl $0x1c6d, %edx           # imm = 0x1C6D
leaq 0x2645b(%rip), %rcx     # 0x39b41e
callq 0x2130
jmp 0x374fca
jmp 0x374fcc
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x374c03
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x375021
movq -0x50(%rbp), %rax
addq -0x58(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x375000
jmp 0x37501f
leaq 0x26528(%rip), %rdi     # 0x39b52f
leaq 0x211ab(%rip), %rsi     # 0x3961b9
movl $0x1c70, %edx           # imm = 0x1C70
leaq 0x26404(%rip), %rcx     # 0x39b41e
callq 0x2130
jmp 0x375021
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)