// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_uls_seq(ul_resolve_t*, char const*)
void print_uls_seq(ul_resolve_t *uidx, const char *nn)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(nn)+50);
    sprintf(gfa_name, "%s.integer.seq.log", nn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return;
    uint64_t k, i; all_ul_t *uls = uidx->idx; ul2ul_item_t *o;
    ul_str_idx_t *str_idx = &(uidx->pstr); ma_ug_t *ug = uidx->init_ug;
    for (k = 0; k < uls->n; k++) {
        if(str_idx->str.a[k].cn < 2) continue;
        o = get_ul_ovlp(&(uidx->uovl), ulg_id(uidx->uovl, k), ulg_type(uidx->uovl, k));
        if(!o) continue;
        fprintf(fp,"%.*s\tid::%lu\tdel::%u\t", (int32_t)uidx->idx->nid.a[k].n, uidx->idx->nid.a[k].a, k, o->is_del);
        for (i = 0; i < str_idx->str.a[k].cn; i++) {
            fprintf(fp, "utg%.6d%c(%c)\t", (((uint32_t)str_idx->str.a[k].a[i])>>1)+1, 
            "lc"[ug->u.a[(((uint32_t)str_idx->str.a[k].a[i])>>1)].circ], "+-"[(((uint32_t)str_idx->str.a[k].a[i])&1)]);
        }
        fprintf(fp,"\n");
    }
    fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbp
movq %rsi, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x3b766(%rip), %rsi     # 0x23ba76
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3c0da(%rip), %rsi     # 0x23c3fe
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movq %r15, %rdi
callq 0x2220
testq %r12, %r12
je 0x2004b9
movq 0x30(%rbp), %rsi
cmpq $0x0, 0x50(%rsi)
je 0x2004a3
movq 0x8(%rbp), %r14
leaq 0x335db(%rip), %r15     # 0x233935
xorl %r8d, %r8d
movq %rsi, 0x8(%rsp)
movq 0x1d0(%rbp), %rax
movq %r8, %r13
shlq $0x5, %r13
testl $0x7ffffffe, 0x18(%rax,%r13) # imm = 0x7FFFFFFE
je 0x200496
movq 0x208(%rbp), %rcx
cmpq %rcx, %r8
movl $0x0, %edx
cmovaeq %rcx, %rdx
movq %r8, %rax
subq %rdx, %rax
cmpq %rcx, %r8
jb 0x2003a4
addq 0x208(%rbp), %rax
movq 0x220(%rbp), %rcx
movl (%rcx,%rax,4), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x2003c5
shlq $0x5, %rax
addq 0x1f0(%rbp), %rax
jmp 0x2003c7
xorl %eax, %eax
testq %rax, %rax
je 0x200496
movq 0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %r8, %rsi
shlq $0x4, %rsi
movl 0x8(%rcx,%rsi), %edx
movq (%rcx,%rsi), %rcx
movl 0x18(%rax), %r9d
shrl $0x1f, %r9d
movq %r12, %rdi
leaq 0x3b690(%rip), %rsi     # 0x23ba89
movq %r8, 0x10(%rsp)
xorl %eax, %eax
callq 0x22b0
movq 0x1d0(%rbp), %rax
testl $0x7fffffff, 0x18(%rax,%r13) # imm = 0x7FFFFFFF
movq %r12, %rbx
je 0x20047c
xorl %r12d, %r12d
movq 0x10(%rax,%r13), %rax
movq (%rax,%r12,8), %rax
movl %eax, %ecx
shrl %ecx
leal 0x1(%rcx), %edx
movq 0x10(%r14), %rsi
leaq (%rcx,%rcx,4), %rcx
movl (%rsi,%rcx,8), %ecx
shrl $0x1f, %ecx
leaq 0x281e9(%rip), %rsi     # 0x22862b
movsbl (%rcx,%rsi), %ecx
andl $0x1, %eax
leaq 0x25d73(%rip), %rsi     # 0x2261c3
movsbl (%rax,%rsi), %r8d
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r12
movq 0x1d0(%rbp), %rax
movl 0x18(%rax,%r13), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r12
jb 0x20041d
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2270
movq 0x8(%rsp), %rsi
movq %rbx, %r12
movq 0x10(%rsp), %r8
incq %r8
cmpq 0x50(%rsi), %r8
jb 0x200362
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq