// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movl %ecx, 0x14(%rsp)
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, 0x20(%rsp)
movq 0x18(%rdi), %rcx
leal (%r13,%r13), %edx
movq 0x28(%rcx), %rax
movq %rdx, 0x28(%rsp)
movq (%rax,%rdx,8), %r14
movq %r14, %r15
shrq $0x20, %r15
movq 0x1c04cb(%rip), %rbp    # 0x252fe0
movq (%rbp), %rdi
movq 0x8(%rcx), %r12
movq %rcx, 0x30(%rsp)
movq 0x20(%rcx), %rax
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movzbl 0x4(%rax,%r13,8), %ecx
movl (%rax,%r13,8), %r8d
shrl $0x1f, %r8d
leaq 0x1565c6(%rip), %rsi    # 0x1e9108
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%rbp), %rdi
leaq 0x1565c7(%rip), %rsi    # 0x1e911e
movq %rbx, %rdx
movq %r13, 0x18(%rsp)
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22b0
movl %r14d, %r14d
imulq $0x18, %r15, %rax
leaq (%rax,%r12), %r15
addq $0xc, %r15
leaq 0x1565b9(%rip), %r12    # 0x1e9138
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x92bba
cmpl $0x0, (%r15)
jns 0x92b96
incq %r13
addq $0x18, %r15
jmp 0x92b82
movq (%rbp), %rdi
movl -0x4(%r15), %r9d
movl %r9d, %r8d
shrl %r8d
andl $0x1, %r9d
movq %r12, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22b0
jmp 0x92b8d
movq 0x30(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x28(%rax), %rax
movl 0x28(%rsp), %ecx
movq 0x8(%rax,%rcx,8), %r14
movq %r14, %r12
shrq $0x20, %r12
movq (%rbp), %rdi
leaq 0x156572(%rip), %rsi    # 0x1e9154
movq %rbx, %rdx
movq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x22b0
movl %r14d, %r14d
imulq $0x18, %r12, %rax
addq %rax, %r15
addq $0xc, %r15
leaq 0x156532(%rip), %r12    # 0x1e9138
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x92c41
cmpl $0x0, (%r15)
jns 0x92c1d
incq %r13
addq $0x18, %r15
jmp 0x92c09
movq (%rbp), %rdi
movl -0x4(%r15), %r9d
movl %r9d, %r8d
shrl %r8d
andl $0x1, %r9d
movq %r12, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22b0
jmp 0x92c14
cmpl $0x0, 0x14(%rsp)
jne 0x92c57
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
imulq $0x28, 0x18(%rsp), %rcx
leaq (%rax,%rcx), %r15
movq (%rbp), %rdi
movl 0x10(%rax,%rcx), %ecx
leaq 0x1564f6(%rip), %rsi    # 0x1e916f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22b0
leaq 0x1c15a6(%rip), %r12    # 0x254230
leaq 0x156501(%rip), %r14    # 0x1e9192
xorl %r13d, %r13d
movl 0x10(%r15), %eax
cmpq %rax, %r13
jae 0x92c48
movq (%rbp), %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
jmp 0x92c94