// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: prt_spec_edge(asg_t*, ma_hit_t_alloc*, unsigned int, unsigned int, unsigned int, ug_opt_t*, char const*)
void prt_spec_edge(asg_t *rg, ma_hit_t_alloc *src, uint32_t tot_rid, uint32_t vid, uint32_t wid, ug_opt_t *uopt, const char *cmd)
{
    if(vid >= tot_rid) return;
    uint32_t k, qn, tn; int32_t r; asg_arc_t p; ma_hit_t_alloc *s = &(src[vid]); 
    for (k = 0; k < s->length; k++) {
        qn = Get_qn(s->buffer[k]); tn = Get_tn(s->buffer[k]);
        if(qn == vid && tn == wid) {
            r = ma_hit2arc(&(s->buffer[k]), rg->seq[qn].len, rg->seq[tn].len, uopt->max_hang, asm_opt.max_hang_rate, uopt->min_ovlp, &p);
            fprintf(stderr, "[M::%s::]%s\tqn::%u(%c)\tq::[%u,\t%u)\t%c\ttn::%u(%c)\tt::[%u,\t%u)\n", 
                    __func__, cmd, qn, (r>=0)?("+-"[(p.ul>>32)&1]):('*'), Get_qs(s->buffer[k]), Get_qe(s->buffer[k]), 
                    "+-"[s->buffer[k].rev], 
                    tn, (r>=0)?("+-"[p.v&1]):('*'), Get_ts(s->buffer[k]), Get_te(s->buffer[k]));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movl %ecx, -0x38(%rbp)
movl %r8d, -0x3c(%rbp)
movq %r9, -0x48(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jb 0x31f339
jmp 0x31f5b5
movq -0x30(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x31f5b5
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x38(%rbp), %eax
jne 0x31f5a5
movl -0x54(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0x31f5a5
movq -0x78(%rbp), %rax
movq (%rax), %rdi
movl -0x4c(%rbp), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x54(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x48(%rbp), %rax
movl 0x40(%rax), %ecx
leaq 0xa5405(%rip), %rax     # 0x3c47f8
movss 0x158(%rax), %xmm0
movq -0x48(%rbp), %rax
movl 0x44(%rax), %r8d
leaq -0x70(%rbp), %r9
callq 0x31a080
movl %eax, -0x58(%rbp)
movq 0xa4bca(%rip), %rax     # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x58(%rbp)
jl 0x31f455
movq -0x70(%rbp), %rcx
shrq $0x20, %rcx
andq $0x1, %rcx
leaq 0x63a51(%rip), %rax     # 0x382e9b
movb (%rax,%rcx), %al
movb %al, -0x91(%rbp)
jmp 0x31f45f
movb $0x2a, %al
movb %al, -0x91(%rbp)
jmp 0x31f45f
movb -0x91(%rbp), %al
movsbl %al, %eax
movl %eax, -0xa8(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0xa4(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movl %eax, %eax
movl %eax, %ecx
leaq 0x639d1(%rip), %rax     # 0x382e9b
movsbl (%rax,%rcx), %eax
movl %eax, -0x9c(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x98(%rbp)
cmpl $0x0, -0x58(%rbp)
jl 0x31f4ff
movl -0x68(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x639a7(%rip), %rax     # 0x382e9b
movb (%rax,%rcx), %al
movb %al, -0xa9(%rbp)
jmp 0x31f509
movb $0x2a, %al
movb %al, -0xa9(%rbp)
jmp 0x31f509
movl -0x98(%rbp), %ebx
movl -0x9c(%rbp), %r14d
movl -0xa0(%rbp), %r15d
movl -0xa4(%rbp), %r12d
movl -0xa8(%rbp), %r9d
movl -0x7c(%rbp), %r8d
movq -0x88(%rbp), %rcx
movq -0x90(%rbp), %rdi
movb -0xa9(%rbp), %al
movsbl %al, %r11d
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl 0x10(%rax), %r10d
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl -0x4c(%rbp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl 0x14(%rax), %eax
leaq 0x77297(%rip), %rsi     # 0x39680e
leaq 0x772ce(%rip), %rdx     # 0x39684c
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x31f5a7
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x31f352
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)