// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/Overlaps.cpp
// Function: dbg_asys_gfa1(void*, long, int)
static void dbg_asys_gfa1(void *data, long i, int tid) // callback for kt_for()
{
	asg_t *g = (asg_t *)data; asg_arc_t *av, *ra; 
    uint64_t rn, ri, v, w, an, k;
    v = i<<1; av = asg_arc_a(g, v); an = asg_arc_n(g, v);
    for (k = 0; k < an; k++) {
        if(av[k].del) continue;
        ra = asg_arc_a(g, (av[k].v^1)); rn = asg_arc_n(g, (av[k].v^1));
        for (ri = 0; ri < rn; ri++) {
            if(ra[ri].del) continue;
            if(ra[ri].v == ((av[k].ul>>32)^1)) break;
        }
        if(ri >= rn) {
            w = av[k].v;
            fprintf(stderr, "[M::%s] v::utg%.6lul(%c)\tw::utg%.6lul(%c)\n", __func__, (v>>1) + 1, "+-"[(v&1)], (w>>1) + 1, "+-"[(w&1)]);
            exit(1);
        }

    }

    v = (i<<1) + 1; av = asg_arc_a(g, v); an = asg_arc_n(g, v);
    for (k = 0; k < an; k++) {
        if(av[k].del) continue;
        ra = asg_arc_a(g, (av[k].v^1)); rn = asg_arc_n(g, (av[k].v^1));
        for (ri = 0; ri < rn; ri++) {
            if(ra[ri].del) continue;
            if(ra[ri].v == ((av[k].ul>>32)^1)) break;
        }
        if(ri >= rn) {
            w = av[k].v;
            fprintf(stderr, "[M::%s] v::utg%.6lul(%c)\tw::utg%.6lul(%c)\n", __func__, (v>>1) + 1, "+-"[(v&1)], (w>>1) + 1, "+-"[(w&1)]);
            exit(1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rdi), %rcx
movq %rsi, 0x8(%rsp)
movq %rsi, %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdi, %r8
andq %rdx, %r8
je 0xd1e89
shrq $0x20, %rdi
leaq (%rdi,%rdi,2), %rdi
movq 0x10(%rsp), %rax
leaq (%rax,%rdi,8), %r9
leaq 0xc(%rax), %r10
xorl %r11d, %r11d
leaq (%r11,%r11,2), %rdi
cmpl $0x0, 0xc(%r9,%rdi,8)
js 0xd1e7d
leaq (%r9,%rdi,8), %rbx
movl 0x8(%rbx), %edi
movq %rdi, %r14
xorq $0x1, %r14
movq (%rcx,%r14,8), %r12
movq %r12, %r14
andq %rdx, %r14
setne %bpl
je 0xd1f60
shrq $0x20, %r12
movq %r14, %r15
negq %r15
leaq (%r12,%r12,2), %r12
leaq (%r10,%r12,8), %r12
movl $0x1, %r13d
cmpl $0x0, (%r12)
js 0xd1e53
movl 0x4(%rbx), %eax
xorl -0x4(%r12), %eax
cmpl $0x1, %eax
je 0xd1e73
cmpq %r14, %r13
setb %bpl
leaq (%r15,%r13), %rax
incq %rax
incq %r13
addq $0x18, %r12
cmpq $0x1, %rax
jne 0xd1e3f
jmp 0xd1f60
testb $0x1, %bpl
je 0xd1f60
incq %r11
cmpq %r8, %r11
jne 0xd1df9
movq 0x8(%rsp), %rsi
leaq (%rsi,%rsi), %rax
movq 0x8(%rcx,%rax,8), %rdi
andq %rdi, %rdx
movq 0x10(%rsp), %r13
je 0xd1f51
shrq $0x20, %rdi
leaq (%rdi,%rdi,2), %rax
leaq (,%rax,8), %r8
addq %r13, %r8
addq $0xc, %r13
xorl %r9d, %r9d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
leaq (%r9,%r9,2), %rdi
cmpl $0x0, 0xc(%r8,%rdi,8)
js 0xd1f45
leaq (%r8,%rdi,8), %r11
movl 0x8(%r11), %edi
movq %rdi, %rax
xorq $0x1, %rax
movq (%rcx,%rax,8), %r15
movq %r15, %rbx
andq %r10, %rbx
setne %bpl
je 0xd1f6a
shrq $0x20, %r15
movq %rbx, %r14
negq %r14
leaq (%r15,%r15,2), %rax
leaq (,%rax,8), %r15
addq %r13, %r15
movl $0x1, %r12d
cmpl $0x0, (%r15)
js 0xd1f22
movl 0x4(%r11), %eax
xorl -0x4(%r15), %eax
cmpl $0x1, %eax
je 0xd1f3f
cmpq %rbx, %r12
setb %bpl
leaq (%r14,%r12), %rax
incq %rax
incq %r12
addq $0x18, %r15
cmpq $0x1, %rax
jne 0xd1f0f
jmp 0xd1f6a
testb $0x1, %bpl
je 0xd1f6a
incq %r9
cmpq %rdx, %r9
jne 0xd1ec5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rsi
callq 0x10f59
callq 0x10fad