// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_vw_edge(asg_t*, unsigned int, unsigned int, char const*)
void print_vw_edge(asg_t *sg, uint32_t vid, uint32_t wid, const char *cmd)
{
    asg_arc_t *av; uint32_t nv, i, sid, eid;
    if(vid >= sg->n_seq || wid >= sg->n_seq) return;

    sid = vid; eid = wid;
    av = asg_arc_a(sg, (sid<<1)); nv = asg_arc_n(sg, (sid<<1));
    for (i = 0; i < nv; i++) {
        if((av[i].v>>1) == eid) {
            fprintf(stderr, "[%s]\t%.*s(%c)<id:%lu>\t%.*s(%c)<id:%u>\tol:%u\tou:%u\tdel:%u\n", cmd, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].ul>>33)), Get_NAME(R_INF, (av[i].ul>>33)), "+-"[(av[i].ul>>32)&1], av[i].ul>>33, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].v>>1)), Get_NAME(R_INF, (av[i].v>>1)), "+-"[av[i].v&1], av[i].v>>1, av[i].ol, av[i].ou, av[i].del);
            break;
        }
    }
    av = asg_arc_a(sg, ((sid<<1)+1)); nv = asg_arc_n(sg, ((sid<<1)+1));
    for (i = 0; i < nv; i++) {
        if((av[i].v>>1) == eid) {
            fprintf(stderr, "[%s]\t%.*s(%c)<id:%lu>\t%.*s(%c)<id:%u>\tol:%u\tou:%u\tdel:%u\n", cmd, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].ul>>33)), Get_NAME(R_INF, (av[i].ul>>33)), "+-"[(av[i].ul>>32)&1], av[i].ul>>33, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].v>>1)), Get_NAME(R_INF, (av[i].v>>1)), "+-"[av[i].v&1], av[i].v>>1, av[i].ol, av[i].ou, av[i].del);
            break;
        }
    }

    sid = wid; eid = vid;
    av = asg_arc_a(sg, (sid<<1)); nv = asg_arc_n(sg, (sid<<1));
    for (i = 0; i < nv; i++) {
        if((av[i].v>>1) == eid) {
            fprintf(stderr, "[%s]\t%.*s(%c)<id:%lu>\t%.*s(%c)<id:%u>\tol:%u\tou:%u\tdel:%u\n", cmd, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].ul>>33)), Get_NAME(R_INF, (av[i].ul>>33)), "+-"[(av[i].ul>>32)&1], av[i].ul>>33, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].v>>1)), Get_NAME(R_INF, (av[i].v>>1)), "+-"[av[i].v&1], av[i].v>>1, av[i].ol, av[i].ou, av[i].del);
            break;
        }
    }
    av = asg_arc_a(sg, ((sid<<1)+1)); nv = asg_arc_n(sg, ((sid<<1)+1));
    for (i = 0; i < nv; i++) {
        if((av[i].v>>1) == eid) {
            fprintf(stderr, "[%s]\t%.*s(%c)<id:%lu>\t%.*s(%c)<id:%u>\tol:%u\tou:%u\tdel:%u\n", cmd, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].ul>>33)), Get_NAME(R_INF, (av[i].ul>>33)), "+-"[(av[i].ul>>32)&1], av[i].ul>>33, 
                (int32_t)Get_NAME_LENGTH(R_INF, (av[i].v>>1)), Get_NAME(R_INF, (av[i].v>>1)), "+-"[av[i].v&1], av[i].v>>1, av[i].ol, av[i].ou, av[i].del);
            break;
        }
    }
    // if(i >= nv) fprintf(stderr, "[%s]\tno edges\n", cmd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x20(%rsp)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl 0x14(%rdi), %eax
cmpl %esi, %eax
setbe %cl
cmpl %edx, %eax
setbe %al
orb %cl, %al
jne 0x1adbfb
movl %edx, %r15d
movq %rdi, %r12
movl %esi, %ebx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
leal (%rbx,%rbx), %ebp
movq (%rcx,%rbp,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
imulq $0x18, %rsi, %rdi
addq $0x18, %rdi
imulq $0x18, %rdx, %rdx
leaq (%rdx,%rax), %r8
addq $0x8, %r8
xorl %r9d, %r9d
leaq 0x18(%r9), %rsi
movl %r15d, %r13d
cmpq %rsi, %rdi
je 0x1ad8e2
movl (%r8,%r9), %r11d
movl %r11d, %r10d
shrl %r10d
movq %rsi, %r9
cmpl %r15d, %r10d
jne 0x1ad7e3
movq 0xa57d4(%rip), %rcx     # 0x252fe0
movq (%rcx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0xa6a15(%rip), %rcx     # 0x254230
movq 0x8(%rcx), %r14
movq 0x40(%rcx), %r10
addq %rax, %rdx
movq -0x18(%rsi,%rdx), %rax
movq %rax, %rdi
shrq $0x21, %rdi
movq %rdi, 0x18(%rsp)
movl 0x8(%r10,%rdi,8), %ecx
movq (%r10,%rdi,8), %r8
subl %r8d, %ecx
addq %r14, %r8
leaq 0x369d6(%rip), %rdi     # 0x1e4223
btq $0x20, %rax
movq %rdi, %rax
adcq $0x0, %rax
movsbl (%rax), %r9d
movl 0x8(%r10,%r13,8), %eax
movq (%r10,%r13,8), %r10
subl %r10d, %eax
movq %rax, 0x8(%rsp)
addq %r10, %r14
movq %r14, 0x28(%rsp)
andl $0x1, %r11d
movsbl (%r11,%rdi), %eax
movq %rax, 0x30(%rsp)
movl -0xc(%rsi,%rdx), %r10d
movl %r10d, %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movzwl -0x8(%rsi,%rdx), %r14d
andl $0x3fff, %r14d          # imm = 0x3FFF
shrl $0x1f, %r10d
leaq 0x4a249(%rip), %rsi     # 0x1f7af4
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
pushq %r10
pushq %r14
pushq %r11
pushq %r15
pushq 0x50(%rsp)
pushq 0x50(%rsp)
pushq 0x38(%rsp)
pushq 0x50(%rsp)
callq 0x22b0
addq $0x40, %rsp
movq 0x8(%r12), %rax
movq 0x28(%r12), %rcx
movl %ebp, %edx
movq 0x8(%rcx,%rdx,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
imulq $0x18, %rsi, %rdi
addq $0x18, %rdi
imulq $0x18, %rdx, %rdx
leaq (%rdx,%rax), %r8
addq $0x8, %r8
xorl %r9d, %r9d
leaq 0x18(%r9), %rsi
cmpq %rsi, %rdi
je 0x1ad9f1
movl (%r8,%r9), %ebp
movl %ebp, %r10d
shrl %r10d
movq %rsi, %r9
cmpl %r15d, %r10d
jne 0x1ad906
movq 0xa56b4(%rip), %rcx     # 0x252fe0
movq (%rcx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xa68f5(%rip), %rcx     # 0x254230
movq 0x8(%rcx), %r11
movq 0x40(%rcx), %r14
addq %rax, %rdx
movq -0x18(%rsi,%rdx), %rax
movq %rax, %r10
shrq $0x21, %r10
movl 0x8(%r14,%r10,8), %ecx
movq (%r14,%r10,8), %r8
subl %r8d, %ecx
addq %r11, %r8
leaq 0x368bb(%rip), %rdi     # 0x1e4223
btq $0x20, %rax
movq %rdi, %rax
adcq $0x0, %rax
movsbl (%rax), %r9d
movl 0x8(%r14,%r13,8), %eax
movq (%r14,%r13,8), %r14
subl %r14d, %eax
movq %rax, 0x10(%rsp)
addq %r14, %r11
andl $0x1, %ebp
movsbl (%rbp,%rdi), %eax
movq %rax, 0x8(%rsp)
movl -0xc(%rsi,%rdx), %r14d
movl %r14d, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movzwl -0x8(%rsi,%rdx), %r13d
andl $0x3fff, %r13d          # imm = 0x3FFF
shrl $0x1f, %r14d
leaq 0x4a135(%rip), %rsi     # 0x1f7af4
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %rbp
pushq %r15
pushq 0x28(%rsp)
pushq %r11
pushq 0x40(%rsp)
pushq %r10
callq 0x22b0
addq $0x40, %rsp
movq 0x8(%r12), %rax
movq 0x28(%r12), %rcx
addl %r15d, %r15d
movq (%rcx,%r15,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
imulq $0x18, %rsi, %rdi
addq $0x18, %rdi
imulq $0x18, %rdx, %rdx
leaq (%rdx,%rax), %r8
addq $0x8, %r8
xorl %r9d, %r9d
leaq 0x18(%r9), %rsi
movl %ebx, %r13d
cmpq %rsi, %rdi
je 0x1adb09
movl (%r8,%r9), %ebp
movl %ebp, %r10d
shrl %r10d
movq %rsi, %r9
cmpl %ebx, %r10d
jne 0x1ada15
movq 0xa55a2(%rip), %rcx     # 0x252fe0
movq (%rcx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xa67e3(%rip), %rcx     # 0x254230
movq 0x8(%rcx), %r10
movq 0x40(%rcx), %r14
addq %rax, %rdx
movq -0x18(%rsi,%rdx), %rax
movq %rax, %r11
shrq $0x21, %r11
movl 0x8(%r14,%r11,8), %ecx
movq (%r14,%r11,8), %r8
subl %r8d, %ecx
addq %r10, %r8
leaq 0x367a9(%rip), %rdi     # 0x1e4223
btq $0x20, %rax
movq %rdi, %rax
adcq $0x0, %rax
movsbl (%rax), %r9d
movl 0x8(%r14,%r13,8), %eax
movq (%r14,%r13,8), %r14
subl %r14d, %eax
movq %rax, 0x10(%rsp)
addq %r14, %r10
movq %r10, 0x8(%rsp)
andl $0x1, %ebp
movsbl (%rbp,%rdi), %eax
movq %rax, 0x28(%rsp)
movl -0xc(%rsi,%rdx), %r14d
movl %r14d, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movzwl -0x8(%rsi,%rdx), %r10d
andl $0x3fff, %r10d          # imm = 0x3FFF
shrl $0x1f, %r14d
leaq 0x4a01e(%rip), %rsi     # 0x1f7af4
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
pushq %r14
pushq %r10
pushq %rbp
pushq %rbx
pushq 0x48(%rsp)
pushq 0x30(%rsp)
pushq 0x40(%rsp)
pushq %r11
callq 0x22b0
addq $0x40, %rsp
movq 0x8(%r12), %rax
movq 0x28(%r12), %rcx
movl %r15d, %edx
movq 0x8(%rcx,%rdx,8), %rcx
movl %ecx, %edx
movq %rcx, %rsi
shrq $0x20, %rsi
imulq $0x18, %rdx, %rcx
addq $0x18, %rcx
imulq $0x18, %rsi, %rdx
leaq (%rdx,%rax), %rdi
addq $0x8, %rdi
xorl %r8d, %r8d
leaq 0x18(%r8), %rsi
cmpq %rsi, %rcx
je 0x1adbfb
movl (%rdi,%r8), %r12d
movl %r12d, %r9d
shrl %r9d
movq %rsi, %r8
cmpl %ebx, %r9d
jne 0x1adb31
movq 0xa5489(%rip), %rcx     # 0x252fe0
movq (%rcx), %rdi
leaq 0xa66cf(%rip), %rcx     # 0x254230
movq 0x8(%rcx), %r11
movq 0x40(%rcx), %r14
addq %rax, %rdx
movq -0x18(%rsi,%rdx), %rax
movq %rax, %r10
shrq $0x21, %r10
movl 0x8(%r14,%r10,8), %ecx
movq (%r14,%r10,8), %r8
subl %r8d, %ecx
addq %r11, %r8
leaq 0x36695(%rip), %rbp     # 0x1e4223
btq $0x20, %rax
movq %rbp, %rax
adcq $0x0, %rax
movsbl (%rax), %r9d
movl 0x8(%r14,%r13,8), %r15d
movq (%r14,%r13,8), %rax
subl %eax, %r15d
addq %rax, %r11
andl $0x1, %r12d
movsbl (%r12,%rbp), %r12d
movl -0xc(%rsi,%rdx), %r14d
movl %r14d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movzwl -0x8(%rsi,%rdx), %ebp
andl $0x3fff, %ebp           # imm = 0x3FFF
shrl $0x1f, %r14d
leaq 0x49f19(%rip), %rsi     # 0x1f7af4
movq 0x20(%rsp), %rdx
xorl %eax, %eax
pushq %r14
pushq %rbp
pushq %r13
pushq %rbx
pushq %r12
pushq %r11
pushq %r15
pushq %r10
callq 0x22b0
addq $0x78, %rsp
jmp 0x1adbff
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq