// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: debug_edges(asg64_v*, unsigned int*, unsigned int)
void debug_edges(asg64_v *dbg, uint32_t *l, uint32_t l_n) {
    uint32_t k, k_n, i, m;
    for (i = k = 0; i < l_n; i++) {
        fprintf(stderr, "# gid-%u: %u\n", i, l[i]);
        for (k_n = k + l[i]; k < k_n; k++) {
            dbg->a[k] <<= 32; dbg->a[k] += i;
        }
    }
    fprintf(stderr, "# dbg->n: %u\n", (uint32_t)dbg->n);
    
    radix_sort_srt64(dbg->a, dbg->a + dbg->n);
    for (k = 1, i = 0; k <= dbg->n; k++) {
        if(k == dbg->n || (dbg->a[k]>>32) != (dbg->a[i]>>32)) {
            if(k - i < l_n) {
                
                for (m = i; m < k; m++) {
                    fprintf(stderr, "eid->%lu, gid->%u\n", dbg->a[m]>>32, (uint32_t)dbg->a[m]);
                }
            }
            i = k;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x31e1a4
movq 0xa5ebc(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x785e3(%rip), %rsi     # 0x39671e
movb $0x0, %al
callq 0x22a0
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x31e194
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x31e152
jmp 0x31e196
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31e111
movq 0xa5e35(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
leaq 0x7856e(%rip), %rsi     # 0x39672c
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x30ed90
movl $0x1, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x31e2b5
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x31e23d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x20(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
cmpq %rcx, %rax
je 0x31e2a5
movl -0x18(%rbp), %eax
subl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x31e29f
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x31e29d
movq 0xa5d83(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
shrq $0x20, %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
leaq 0x784af(%rip), %rsi     # 0x39673a
movb $0x0, %al
callq 0x22a0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31e24e
jmp 0x31e29f
movl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x31e2a7
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x31e1f6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)