// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_node(asg_t*, ma_ug_t*)
void print_node(asg_t* g, ma_ug_t *ug)
{
    int input_iv;
    uint32_t iv, v;
    asg_arc_t *av, *aw;
    uint32_t nv, nw, i, k, w;
    while (1)
    {
        fprintf(stderr, "\n\ninput v: ");
        if(scanf("%d", &input_iv) == 0) break;
        if(input_iv == -1) break;
        iv = input_iv;
        iv = iv << 1;

        v = iv;
        av = asg_arc_a(g, v);
        nv = asg_arc_n(g, v);
        fprintf(stderr, "0**************v>>1: %u, v&1: %u, c: %u, del: %u, len: %u**************\n", 
        v>>1, v&1, (uint32_t)g->seq[v>>1].c, (uint32_t)g->seq[v>>1].del, g->seq[v>>1].len);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            w = av[i].v;
            fprintf(stderr, "(%u) w>>1: %u, w&1: %u, ol: %u, eLen: %u\n", 
            i, w>>1, w&1, av[i].ol, (uint32_t)av[i].ul);
            

            aw = asg_arc_a(g, w^1);
            nw = asg_arc_n(g, w^1);
            for (k = 0; k < nw; k++)
            {
                if(aw[k].del) continue;
                if(aw[k].v == (v^1)) break;
            }

            fprintf(stderr, "self>>1: %u, self&1: %u, out>>1: %u, out^1: %u, is_sym: %u\n", 
            (uint32_t)(av[i].ul>>33), (uint32_t)((av[i].ul>>32)&1), av[i].v>>1, av[i].v&1, 
            (uint32_t)(k != nw));

        }






        v = iv^1;
        av = asg_arc_a(g, v);
        nv = asg_arc_n(g, v);
        fprintf(stderr, "1**************v>>1: %u, v&1: %u, c: %u, del: %u, len: %u**************\n", 
        v>>1, v&1, (uint32_t)g->seq[v>>1].c, (uint32_t)g->seq[v>>1].del, (uint32_t)g->seq[v>>1].len);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            w = av[i].v;
            fprintf(stderr, "w>>1: %u, w&1: %u, ol: %u, eLen: %u\n", 
            w>>1, w&1, (uint32_t)av[i].ol, (uint32_t)av[i].ul);
            

            aw = asg_arc_a(g, w^1);
            nw = asg_arc_n(g, w^1);
            for (k = 0; k < nw; k++)
            {
                if(aw[k].del) continue;
                if(aw[k].v == (v^1)) break;
            }

            fprintf(stderr, "self>>1: %u, self&1: %u, out>>1: %u, out^1: %u, is_sym: %u\n", 
            (uint32_t)(av[i].ul>>33), (uint32_t)((av[i].ul>>32)&1), av[i].v>>1, av[i].v&1, 
            (uint32_t)(k != nw));

        }

        if(ug != NULL)
        {
            ma_utg_t *ma_v = &(ug->u.a[v>>1]);
            fprintf(stderr, "\n###\nma_v->n: %u, ma_v->len: %u\n", ma_v->n, ma_v->len);
            fprintf(stderr, "start>>1: %u, start&1: %u, end>>1: %u, end&1: %u\n", 
            ma_v->start>>1, ma_v->start&1, ma_v->end>>1, ma_v->end&1);
            for (i = 0; i < ma_v->n; i++)
            {
                v = ma_v->a[i]>>32;
                fprintf(stderr, "i: %u, v>>1: %u, v&1: %u, len: %u\n", 
                i, v>>1, v&1, (uint32_t)ma_v->a[i]);
            }
            
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x27d839(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x242958(%rip), %rsi    # 0x389109
movb $0x0, %al
callq 0x22a0
leaq 0x2434e8(%rip), %rdi    # 0x389ca7
leaq -0x14(%rbp), %rsi
movb $0x0, %al
callq 0x21d0
cmpl $0x0, %eax
jne 0x1467d4
jmp 0x146dc8
cmpl $-0x1, -0x14(%rbp)
jne 0x1467df
jmp 0x146dc8
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
shll %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movq 0x27d7ae(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
shrl %edx
movl -0x1c(%rbp), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movzbl 0x4(%rax,%rsi,8), %r8d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %r9d
shrl $0x1f, %r9d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x24288b(%rip), %rsi    # 0x389115
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x146a58
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1468c5
jmp 0x146a4a
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x44(%rbp)
movq 0x27d700(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movl -0x44(%rbp), %ecx
shrl %ecx
movl -0x44(%rbp), %r8d
andl $0x1, %r8d
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %rax
leaq 0x24283a(%rip), %rsi    # 0x38915e
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
xorl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x38(%rbp), %eax
jae 0x1469c4
movq -0x30(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x14699a
jmp 0x1469b9
movq -0x30(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x1c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1469b7
jmp 0x1469c4
jmp 0x1469b9
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x146977
movq 0x27d615(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
andq $0x1, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r8d
shrl %r8d
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
andl $0x1, %r9d
movl -0x40(%rbp), %eax
cmpl -0x38(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x242748(%rip), %rsi    # 0x389188
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14689b
movl -0x18(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movq 0x27d540(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
shrl %edx
movl -0x1c(%rbp), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movzbl 0x4(%rax,%rsi,8), %r8d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %r9d
shrl $0x1f, %r9d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x2426cc(%rip), %rsi    # 0x3891c4
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x146cc1
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x146b33
jmp 0x146cb3
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x44(%rbp)
movq 0x27d492(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x44(%rbp), %edx
shrl %edx
movl -0x44(%rbp), %ecx
andl $0x1, %ecx
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %rax
movl %eax, %r9d
leaq 0x2425d3(%rip), %rsi    # 0x389163
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
xorl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x38(%rbp), %eax
jae 0x146c2d
movq -0x30(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x146c03
jmp 0x146c22
movq -0x30(%rbp), %rax
movl -0x40(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl -0x1c(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x146c20
jmp 0x146c2d
jmp 0x146c22
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x146be0
movq 0x27d3ac(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x21, %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
andq $0x1, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r8d
shrl %r8d
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
andl $0x1, %r9d
movl -0x40(%rbp), %eax
cmpl -0x38(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x2424df(%rip), %rsi    # 0x389188
movl %eax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x146b09
cmpq $0x0, -0x10(%rbp)
je 0x146dc3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0x27d2f3(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x50(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x50(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x242503(%rip), %rsi    # 0x38920d
movb $0x0, %al
callq 0x22a0
movq 0x27d2c8(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x50(%rbp), %rax
movl 0x4(%rax), %edx
shrl %edx
movq -0x50(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x1, %ecx
movq -0x50(%rbp), %rax
movl 0x8(%rax), %r8d
shrl %r8d
movq -0x50(%rbp), %rax
movl 0x8(%rax), %r9d
andl $0x1, %r9d
leaq 0x2424e2(%rip), %rsi    # 0x38922e
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x146dc1
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x1c(%rbp)
movq 0x27d25d(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x3c(%rbp), %edx
movl -0x1c(%rbp), %ecx
shrl %ecx
movl -0x1c(%rbp), %r8d
andl $0x1, %r8d
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r9d
leaq 0x2424b1(%rip), %rsi    # 0x389260
movb $0x0, %al
callq 0x22a0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x146d5a
jmp 0x146dc3
jmp 0x1467a0
addq $0x60, %rsp
popq %rbp
retq
nop