// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: print_untig(ma_ug_t*, unsigned int, char const*, unsigned int)
void print_untig(ma_ug_t *g, uint32_t uId, const char* info, uint32_t is_print_read)
{
	uint32_t i, k;
    asg_t* nsg = g->g;

    uId = uId<<1;
    asg_arc_t *aw = asg_arc_a(nsg, uId);
    uint32_t nw = asg_arc_n(nsg, uId);

    fprintf(stderr, "\n%s: c = %u, del: %u\n", info, nsg->seq[uId>>1].c, nsg->seq[uId>>1].del);
    fprintf(stderr, "%s(%u): direction = 0...\n", info, uId>>1);
    for (i = 0; i < nw; i++)
    {
        if(aw[i].del) continue;
        fprintf(stderr, "%s: (%u) v>>1: %u, dir: %u\n", info, i, aw[i].v>>1, aw[i].v&1);
    }

    uId = uId^1;
    aw = asg_arc_a(nsg, uId);
    nw = asg_arc_n(nsg, uId);
    fprintf(stderr, "\n%s(%u): direction = 1...\n", info, uId>>1);
    for (i = 0; i < nw; i++)
    {
        if(aw[i].del) continue;
        fprintf(stderr, "%s: (%u) v>>1: %u, dir: %u\n", info, i, aw[i].v>>1, aw[i].v&1);
    }

    if(is_print_read == 0) return;


    uId = uId>>1;
    ma_utg_t *u = &g->u.a[uId];
    fprintf(stderr, "\n%s: include %u reads in total...\n", info, u->n);
    for (k = 0; k < u->n; k++)
    {
        fprintf(stderr, "%s: rId>>1: %lu, dir: %lu, name: %.*s\n", 
        info, (unsigned long)(u->a[k]>>33), (unsigned long)((u->a[k]>>32)&1),
        (int)Get_NAME_LENGTH((R_INF), (u->a[k]>>33)), Get_NAME((R_INF), (u->a[k]>>33)));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
movq 0x18(%rdi), %r15
leal (%rbp,%rbp), %edx
movq 0x8(%r15), %r12
movq 0x20(%r15), %rax
movq 0x28(%r15), %rcx
movq %rdx, 0x18(%rsp)
movq (%rcx,%rdx,8), %r14
movq 0x28a6e6(%rip), %r13    # 0x294fe0
movq (%r13), %rdi
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movzbl 0x4(%rax,%rbp,8), %ecx
movl (%rax,%rbp,8), %r8d
shrl $0x1f, %r8d
leaq 0x22c8f0(%rip), %rsi    # 0x237208
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
leaq 0x22c8f1(%rip), %rsi    # 0x23721e
movq %rbx, %rdx
movq %rbp, 0x20(%rsp)
movl %ebp, %ecx
xorl %eax, %eax
callq 0x22b0
testl %r14d, %r14d
jne 0xa9f2
movq 0x8(%r15), %r14
movq 0x28(%r15), %rax
movl 0x18(%rsp), %ecx
movq 0x8(%rax,%rcx,8), %r15
movq 0x28a681(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x22c8eb(%rip), %rsi    # 0x237254
movq %rbx, %rdx
movq 0x20(%rsp), %rbp
movl %ebp, %ecx
xorl %eax, %eax
callq 0x22b0
testl %r15d, %r15d
je 0xa9dc
movq %r15, %rax
shrq $0x20, %rax
movl %r15d, %r15d
imulq $0x18, %rax, %rax
addq %rax, %r14
addq $0xc, %r14
leaq 0x22c89d(%rip), %r12    # 0x237238
xorl %r13d, %r13d
cmpl $0x0, (%r14)
jns 0xa9b2
incq %r13
addq $0x18, %r14
cmpq %r13, %r15
jne 0xa99e
jmp 0xa9dc
movq 0x28a627(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movl -0x4(%r14), %r9d
movl %r9d, %r8d
shrl %r8d
andl $0x1, %r9d
movq %r12, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22b0
jmp 0xa9a4
cmpl $0x0, 0xc(%rsp)
jne 0xaa53
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rax
shrq $0x20, %rax
movl %r14d, %ebp
imulq $0x18, %rax, %rax
leaq (%rax,%r12), %r14
addq $0xc, %r14
leaq 0x22c829(%rip), %r12    # 0x237238
xorl %r13d, %r13d
cmpl $0x0, (%r14)
jns 0xaa29
incq %r13
addq $0x18, %r14
cmpq %r13, %rbp
jne 0xaa12
jmp 0xa947
movq 0x28a5b0(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movl -0x4(%r14), %r9d
movl %r9d, %r8d
shrl %r8d
andl $0x1, %r9d
movq %r12, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22b0
jmp 0xaa18
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r15
imulq $0x28, %rbp, %r14
movq 0x28a579(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movl 0x10(%r15,%r14), %ecx
leaq 0x22c7f9(%rip), %rsi    # 0x23726f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
cmpl $0x0, 0x10(%r15,%r14)
je 0xa9e3
addq %r14, %r15
leaq 0x28b79a(%rip), %r12    # 0x296230
leaq 0x22c7f5(%rip), %r14    # 0x237292
xorl %r13d, %r13d
movq 0x28a539(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %r8
movq %r8, %rcx
shrq $0x21, %rcx
shrq $0x20, %r8
andl $0x1, %r8d
movq 0x40(%r12), %rax
movl 0x8(%rax,%rcx,8), %r9d
movq (%rax,%rcx,8), %rax
subl %eax, %r9d
addq 0x8(%r12), %rax
movq %rax, (%rsp)
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
incq %r13
movl 0x10(%r15), %eax
cmpq %rax, %r13
jb 0xaaa0
jmp 0xa9e3