// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_integer_ovlps(ma_ug_t*, ul_str_t*, integer_aln_t*, long, ul_chain_t*, long, long, long)
void print_integer_ovlps(ma_ug_t *ug, ul_str_t *str, integer_aln_t *aln, int64_t aln_occ, ul_chain_t *idx, int64_t idx_n, int64_t qid, int64_t consenus_occ)
{
    fprintf(stderr, "\n[M::%s::qid->%ld] qstr->cn::%u, aln_occ::%ld, idx_n::%ld, consenus_occ::%ld\n", 
                                __func__, qid, str[qid].cn, aln_occ, idx_n, consenus_occ);
    // print_integer_seq(ug, str, qid, 0);
    int64_t k, z, z_n, qk, tk, is_rev, tid; //uint64_t z;
    for (k = 0; k < idx_n; k++) {
        fprintf(stderr, "\n[M::%s::tid->%lu] rev->%lu, aln_n->%u\n", __func__, aln[idx[k].s].tn_rev_qk>>33, (aln[idx[k].s].tn_rev_qk>>32)&1, idx[k].e - idx[k].s);
        print_integer_seq(ug, str, aln[idx[k].s].tn_rev_qk>>33, 0);
        z = idx[k].s; z_n = idx[k].e; tid = aln[idx[k].s].tn_rev_qk>>33;
        for (; z < z_n; z++) {
            qk = (uint32_t)aln[z].tn_rev_qk; is_rev = ((aln[z].tn_rev_qk>>32)&1);
            tk = ((is_rev == 0)? (aln[z].tk):(str[tid].cn - aln[z].tk - 1));
            fprintf(stderr, "[qk::%ld]utg%.6d%c(%c) <---> [tk::%ld]utg%.6d%c(%c)\n", 
            qk, (((uint32_t)str[qid].a[qk])>>1)+1, "lc"[ug->u.a[(((uint32_t)str[qid].a[qk])>>1)].circ], "+-"[(((uint32_t)str[qid].a[qk])&1)], 
            tk, (((uint32_t)str[tid].a[tk])>>1)+1, "lc"[ug->u.a[(((uint32_t)str[tid].a[tk])>>1)].circ], "+-"[(((uint32_t)str[tid].a[tk])&1)]);
        }
        
        // for (z = idx[k].s; z < idx[k].e; z++) {
        //     aln[z].tn_rev_qk
        // }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq 0x986ad(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq 0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl 0x18(%rax), %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq -0x28(%rbp), %r9
movq -0x38(%rbp), %r10
movq 0x18(%rbp), %rax
leaq 0x6ba02(%rip), %rsi     # 0x397369
leaq 0x6ba49(%rip), %rdx     # 0x3973b7
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x32bca0
movq 0x98645(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
shrq $0x21, %rcx
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rdx
imulq $0x28, -0x40(%rbp), %rsi
addq %rsi, %rdx
movl (%rdx), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x10(%rax), %r8
shrq $0x20, %r8
andq $0x1, %r8
movq -0x30(%rbp), %rax
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rax
movl 0x4(%rax), %r9d
movq -0x30(%rbp), %rax
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rax
subl (%rax), %r9d
leaq 0x6b9c1(%rip), %rsi     # 0x3973cb
leaq 0x6b9a6(%rip), %rdx     # 0x3973b7
movb $0x0, %al
callq 0x22a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdx
shrq $0x21, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x32a840
movq -0x30(%rbp), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x28, -0x40(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
shrq $0x21, %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x32bc8d
movq -0x20(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x32baee
movq -0x20(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0x32bb19
movq -0x18(%rbp), %rax
movq -0x70(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rcx
imulq $0x18, -0x48(%rbp), %rdx
addq %rdx, %rcx
subl (%rcx), %eax
subl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %eax
movq %rax, -0x60(%rbp)
movq 0x984b7(%rip), %rax     # 0x3c3fe0
movq (%rax), %rdi
movq -0x58(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq 0x10(%rbp), %r8
shlq $0x5, %r8
addq %r8, %rsi
movq 0x10(%rsi), %rsi
movq -0x58(%rbp), %r8
movq (%rsi,%r8,8), %rsi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x59773(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r8d
movq -0x18(%rbp), %rax
movq 0x10(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rsi
movq (%rax,%rsi,8), %rax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x572dd(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r9d
movq -0x60(%rbp), %rbx
movq -0x18(%rbp), %rax
movq -0x70(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movl %eax, %r11d
shrl %r11d
addl $0x1, %r11d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rsi
movq -0x70(%rbp), %r10
shlq $0x5, %r10
addq %r10, %rsi
movq 0x10(%rsi), %rsi
movq -0x60(%rbp), %r10
movq (%rsi,%r10,8), %rsi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x596d9(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r10d
movq -0x18(%rbp), %rax
movq -0x70(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rsi
movq (%rax,%rsi,8), %rax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x57243(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %eax
leaq 0x6b790(%rip), %rsi     # 0x3973f3
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x32ba94
jmp 0x32bc8f
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x32b986
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)