// File: /workspace/github_cpp_makefile_star2_O2/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 0x3a9e4(%rip), %rsi     # 0x1f9d19
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2050
leaq 0x3b358(%rip), %rsi     # 0x1fa6a1
movq %r15, %rdi
callq 0x2210
movq %rax, %r14
movq %r15, %rdi
callq 0x2220
testq %r14, %r14
je 0x1bf4a4
movq 0x8(%rbx), %rbp
movq 0x30(%rbx), %r13
leaq 0x1f0(%rbx), %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movq %r13, 0x8(%rsp)
cmpq 0x50(%r13), %r15
jae 0x1bf48e
movq 0x1d0(%rbx), %rax
movq %r15, %r12
shlq $0x5, %r12
testl $0x7ffffffe, 0x18(%rax,%r12) # imm = 0x7FFFFFFE
je 0x1bf486
movq 0x208(%rbx), %rax
xorl %edx, %edx
cmpq %rax, %r15
setb %dl
movl $0x0, %ecx
cmovaeq %rax, %rcx
movq %r15, %rsi
subq %rcx, %rsi
movq 0x10(%rsp), %rdi
callq 0x1ba426
testq %rax, %rax
je 0x1bf486
movq 0x30(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %r15, %rsi
shlq $0x4, %rsi
movl 0x8(%rcx,%rsi), %edx
movq (%rcx,%rsi), %rcx
movl 0x18(%rax), %r9d
shrl $0x1f, %r9d
movq %r14, %rdi
leaq 0x3a92a(%rip), %rsi     # 0x1f9d2c
movq %r15, %r8
xorl %eax, %eax
callq 0x22b0
xorl %r13d, %r13d
movq 0x1d0(%rbx), %rax
movl 0x18(%rax,%r12), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %r13
jae 0x1bf476
addq %r12, %rax
movq 0x10(%rax), %rax
movq (%rax,%r13,8), %rax
movl %eax, %ecx
shrl %ecx
leal 0x1(%rcx), %edx
movq 0x10(%rbp), %rsi
imulq $0x28, %rcx, %rcx
movl (%rsi,%rcx), %ecx
shrl $0x1f, %ecx
leaq 0x2723e(%rip), %rsi     # 0x1e668b
movsbl (%rcx,%rsi), %ecx
andl $0x1, %eax
leaq 0x24dc8(%rip), %rsi     # 0x1e4223
movsbl (%rax,%rsi), %r8d
movq %r14, %rdi
leaq 0x32663(%rip), %rsi     # 0x1f1acd
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x1bf40f
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x2270
movq 0x8(%rsp), %r13
incq %r15
jmp 0x1bf381
movq %r14, %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