// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl %eax, -0xc(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0xc(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
movq 0x2ae087(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl 0x4(%rax,%rcx,8), %ecx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %esi
shrl %esi
movl %esi, %esi
movl (%rax,%rsi,8), %r8d
shrl $0x1f, %r8d
leaq 0x271e61(%rip), %rsi    # 0x387df3
movb $0x0, %al
callq 0x22a0
movq 0x2ae040(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0xc(%rbp), %ecx
shrl %ecx
leaq 0x271e56(%rip), %rsi    # 0x387e09
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x116039
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x115fe4
jmp 0x11602e
movq 0x2adff5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0x20(%rbp), %ecx
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r8d
shrl %r8d
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
andl $0x1, %r9d
leaq 0x271dfc(%rip), %rsi    # 0x387e23
movb $0x0, %al
callq 0x22a0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x115fc1
movl -0xc(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0xc(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x3c(%rbp)
movq 0x2adf5f(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0xc(%rbp), %ecx
shrl %ecx
leaq 0x271dab(%rip), %rsi    # 0x387e3f
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x11611a
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1160c5
jmp 0x11610f
movq 0x2adf14(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movl -0x20(%rbp), %ecx
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r8d
shrl %r8d
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
andl $0x1, %r9d
leaq 0x271d1b(%rip), %rsi    # 0x387e23
movb $0x0, %al
callq 0x22a0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1160a2
cmpl $0x0, -0x1c(%rbp)
jne 0x116125
jmp 0x11624d
movl -0xc(%rbp), %eax
shrl %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq 0x2ade96(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x48(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x271cfb(%rip), %rsi    # 0x387e5a
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x11624d
movq 0x2ade5c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
shrq $0x21, %rcx
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %esi
movq (%rax,%rsi,8), %r8
shrq $0x20, %r8
andq $0x1, %r8
leaq 0x2af114(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x48(%rbp), %rsi
movq 0x18(%rsi), %rsi
movl -0x24(%rbp), %r9d
movq (%rsi,%r9,8), %rsi
shrq $0x21, %rsi
movq 0x8(%rax,%rsi,8), %rax
leaq 0x2af0f0(%rip), %rsi    # 0x3c52d0
movq 0x40(%rsi), %rsi
movq -0x48(%rbp), %r9
movq 0x18(%r9), %r9
movl -0x24(%rbp), %r10d
movq (%r9,%r10,8), %r9
shrq $0x21, %r9
subq (%rsi,%r9,8), %rax
movl %eax, %r9d
leaq 0x2af0ca(%rip), %rax    # 0x3c52d0
movq 0x8(%rax), %rax
leaq 0x2af0bf(%rip), %rsi    # 0x3c52d0
movq 0x40(%rsi), %rsi
movq -0x48(%rbp), %r10
movq 0x18(%r10), %r10
movl -0x24(%rbp), %r11d
movq (%r10,%r11,8), %r10
shrq $0x21, %r10
addq (%rsi,%r10,8), %rax
leaq 0x271c49(%rip), %rsi    # 0x387e7d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11616d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)