// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_purge_gfa(asg_t*, unsigned long*)
void print_purge_gfa(asg_t *g, uint64_t* cCount)
{
    uint32_t v, i, n_vtx = g->n_seq, beg, end;
    for (v = 0; v < n_vtx; v++)
    {
        if(g->seq[v>>1].del)
        {
            fprintf(stderr, "(D) v: %u, Len: %u, start>>1: %u, flag: %u\n", v, (uint32_t)(cCount[v]>>33),
            ((uint32_t)cCount[v])>>1, g->seq[v].len);
            continue;
        } 

        fprintf(stderr, "(E) v: %u, Len: %u, start>>1: %u, flag: %u\n", v, (uint32_t)(cCount[v]>>33),
        ((uint32_t)cCount[v])>>1, g->seq[v].len);
        
        uint32_t nv = asg_arc_n(g, v);
		asg_arc_t *av = asg_arc_a(g, v);
        for (i = 0; i < nv; i++)
        {
            if(av[i].del) continue;
            beg = av[i].ul>>32;
            end = av[i].v;

            fprintf(stderr, "****beg: %u (Len: %u) ---> end: %u (Len: %u)\n", 
            beg, (uint32_t)(cCount[beg]>>33),
            end, (uint32_t)(cCount[end]>>33));

        }

    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x145939
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1457f4
movq 0x27e83d(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r8d
shrl %r8d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %esi
movl (%rax,%rsi,8), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
leaq 0x24389b(%rip), %rsi    # 0x389083
movb $0x0, %al
callq 0x22a0
jmp 0x14592b
movq 0x27e7e5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %esi
movq (%rax,%rsi,8), %rax
movl %eax, %r8d
shrl %r8d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x14(%rbp), %esi
movl (%rax,%rsi,8), %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
leaq 0x24386f(%rip), %rsi    # 0x3890af
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x14(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x145929
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1458ad
jmp 0x14591b
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq 0x27e700(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, %ecx
movl -0x24(%rbp), %r8d
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %esi
movq (%rax,%rsi,8), %rax
shrq $0x21, %rax
movl %eax, %r9d
leaq 0x2437c7(%rip), %rsi    # 0x3890db
movb $0x0, %al
callq 0x22a0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x145886
jmp 0x14592b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x145776
addq $0x30, %rsp
popq %rbp
retq
nop