// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq %rsi, %rdi
callq 0x2090
leaq 0x32(%rax), %rdi
callq 0x2280
movq %rax, %r15
leaq 0x3c333(%rip), %rsi     # 0x247d5a
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3cca7(%rip), %rsi     # 0x2486e2
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movq %r15, %rdi
callq 0x2220
testq %r12, %r12
je 0x20bbe3
movq 0x30(%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x20bbcd
movq 0x8(%rbx), %r9
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
leaq 0x34187(%rip), %r15     # 0x23fc05
xorl %ebp, %ebp
movq %r9, 0x10(%rsp)
movq 0x1d0(%rbx), %rcx
movq %rbp, %r13
shlq $0x5, %r13
testl $0x7ffffffe, 0x18(%rcx,%r13) # imm = 0x7FFFFFFE
je 0x20bbc1
movq 0x208(%rbx), %rcx
movq 0x220(%rbx), %rdx
cmpq %rcx, %rbp
movl $0x0, %esi
cmovaeq %rcx, %rsi
movq %rbp, %rdi
subq %rsi, %rdi
addq %rcx, %rdi
cmpq %rcx, %rbp
cmovbq %rbp, %rdi
movl (%rdx,%rdi,4), %esi
cmpq %r8, %rsi
je 0x20bbc1
movq 0x1f0(%rbx), %rdi
testq %rdi, %rdi
je 0x20bbc1
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %edx
movq (%rax,%rcx), %rcx
shlq $0x5, %rsi
movl 0x18(%rdi,%rsi), %r9d
shrl $0x1f, %r9d
movq %r12, %rdi
leaq 0x3c257(%rip), %rsi     # 0x247d6d
movq %rbp, %r8
xorl %eax, %eax
callq 0x22b0
movq 0x1d0(%rbx), %rax
testl $0x7fffffff, 0x18(%rax,%r13) # imm = 0x7FFFFFFF
movq %rbx, %r14
movq %r12, %rbx
je 0x20bb9f
xorl %r12d, %r12d
movq 0x10(%rax,%r13), %rax
movq (%rax,%r12,8), %rax
movl %eax, %ecx
shrl %ecx
leal 0x1(%rcx), %edx
movq 0x10(%rsp), %rsi
movq 0x10(%rsi), %rsi
leaq (%rcx,%rcx,4), %rcx
movl (%rsi,%rcx,8), %ecx
shrl $0x1f, %ecx
leaq 0x28bd6(%rip), %rsi     # 0x23473b
movsbl (%rcx,%rsi), %ecx
andl $0x1, %eax
leaq 0x26760(%rip), %rsi     # 0x2322d3
movsbl (%rax,%rsi), %r8d
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r12
movq 0x1d0(%r14), %rax
movl 0x18(%rax,%r13), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r12
jb 0x20bb3b
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2270
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %rbx, %r12
movq %r14, %rbx
incq %rbp
cmpq %rax, %rbp
jb 0x20ba85
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