// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_primary_ul_chain(ul_str_t*, ul_vec_t*, ma_ug_t*)
void print_primary_ul_chain(ul_str_t *p_str, ul_vec_t *ul, ma_ug_t *ug)
{
    uc_block_t *z; uint64_t k, dd = 0;
    if(p_str) {
        for (k = 0; k < p_str->cn; k++) {
            z = &(ul->bb.a[p_str->a[k]>>32]);
            fprintf(stderr, "[M::%s::pk->%lu] utg%.6d%c(%c::len->%u), qs::%u, qe::%u, ts::%u, te::%u\n", __func__, k,
                    z->hid+1, "lc"[ug->u.a[z->hid].circ], "+-"[z->rev], ug->u.a[z->hid].len, 
                    z->qs, z->qe, z->ts, z->te);
            dd++;
        }
    } else {
        for (k = 0; k < ul->bb.n; k++) {
            z = &(ul->bb.a[k]);
            if(!z->pchain) continue;
            fprintf(stderr, "[M::%s::rk->%lu] utg%.6d%c(%c::len->%u), qs::%u, qe::%u, ts::%u, te::%u\n", __func__, k,
                    z->hid+1, "lc"[ug->u.a[z->hid].circ], "+-"[z->rev], ug->u.a[z->hid].len, 
                    z->qs, z->qe, z->ts, z->te);
            dd++;
        }
    }

    if(dd) fprintf(stderr, "*******************************************\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x33aa96
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x33aa91
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0x89632(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movl (%rax), %r8d
addl $0x1, %r8d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x4a91e(%rip), %rax     # 0x385303
movsbl (%rax,%rdx), %r9d
movq -0x38(%rbp), %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %edx
leaq 0x48499(%rip), %rax     # 0x382e9b
movsbl (%rax,%rdx), %r15d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ebx
movq -0x38(%rbp), %rax
movl 0x8(%rax), %r11d
movq -0x38(%rbp), %rax
movl 0xc(%rax), %r10d
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
leaq 0x5dae4(%rip), %rsi     # 0x39852f
leaq 0x5db26(%rip), %rdx     # 0x398578
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x33a964
jmp 0x33abc2
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x33abc0
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x40(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1f, %al
cmpb $0x0, %al
jne 0x33aad6
jmp 0x33abaf
movq 0x89503(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movl (%rax), %r8d
addl $0x1, %r8d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x4a7ef(%rip), %rax     # 0x385303
movsbl (%rax,%rdx), %r9d
movq -0x38(%rbp), %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %edx
leaq 0x4836a(%rip), %rax     # 0x382e9b
movsbl (%rax,%rdx), %r15d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rdx
movl (%rdx), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl (%rax), %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ebx
movq -0x38(%rbp), %rax
movl 0x8(%rax), %r11d
movq -0x38(%rbp), %rax
movl 0xc(%rax), %r10d
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
leaq 0x5da15(%rip), %rsi     # 0x39858f
leaq 0x5d9f7(%rip), %rdx     # 0x398578
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x33aa9e
jmp 0x33abc2
cmpq $0x0, -0x48(%rbp)
je 0x33abe1
movq 0x89410(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
leaq 0x5d9fe(%rip), %rsi     # 0x3985d8
movb $0x0, %al
callq 0x22a0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)