// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x32, %rdi
shlq $0x0, %rdi
callq 0x2270
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x57016(%rip), %rsi     # 0x398a4a
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rdi
leaq 0x5798c(%rip), %rsi     # 0x3993d2
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2210
cmpq $0x0, -0x20(%rbp)
jne 0x341a64
jmp 0x341cb7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x341cae
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x2, %eax
jge 0x341ac9
jmp 0x341c9d
movq -0x8(%rbp), %rax
addq $0x1f0, %rax            # imm = 0x1F0
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jb 0x341afd
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
subq 0x208(%rcx), %rax
movq %rax, -0x60(%rbp)
jmp 0x341b05
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x208(%rax), %r8
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %r8, %rdx
cmovael %ecx, %eax
movslq %eax, %rdx
callq 0x3370e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x341b41
jmp 0x341c9d
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x28(%rbp), %r8
movq -0x40(%rbp), %rax
movl 0x18(%rax), %r9d
shrl $0x1f, %r9d
leaq 0x56ecd(%rip), %rsi     # 0x398a5d
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x28(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x341c8b
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
shrl %edx
addl $0x1, %edx
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x28(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rcx
movq 0x10(%rcx), %rcx
movq -0x30(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x436cd(%rip), %rax     # 0x385303
movsbl (%rax,%rcx), %ecx
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rax,%rsi,8), %rax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x41234(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r8d
leaq 0x4eb66(%rip), %rsi     # 0x3907d9
movb $0x0, %al
callq 0x22a0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x341b9f
movq -0x20(%rbp), %rdi
leaq 0x44d92(%rip), %rsi     # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x341a92
movq -0x20(%rbp), %rdi
callq 0x21a0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)