// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: print_raw_uls_seq(ul_resolve_t*, char const*)
void print_raw_uls_seq(ul_resolve_t *uidx, const char *nn)
{
    char* gfa_name = NULL; MALLOC(gfa_name, strlen(nn)+70);
    sprintf(gfa_name, "%s.raw.integer.seq.log", nn);
    FILE* fp = fopen(gfa_name, "w"); free(gfa_name);
    if (!fp) return;
    ma_ug_t *ug = uidx->init_ug; all_ul_t *aln = uidx->idx;
    uint64_t id; uc_block_t *a = NULL; int64_t k, a_n;
    for (id = 0; id < aln->n; id++) {
        a = aln->a[id].bb.a; a_n = aln->a[id].bb.n; k = 0;
        if(a_n == 0) continue;
        fprintf(fp,"%.*s\tid::%lu\t", (int32_t)aln->nid.a[id].n, aln->nid.a[id].a, id);
        // for (k = 0; k < a_n && ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0; k++);
        for (; k < a_n; k++) {
            // if(ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])) == 0) break;
            fprintf(fp, "utg%.6d%c(%c)(n::%lu)\t", a[k].hid + 1, "lc"[ug->u.a[a[k].hid].circ], "+-"[a[k].rev], ug_occ_w(a[k].ts, a[k].te, &(ug->u.a[a[k].hid])));
        }
        fprintf(fp,"\n");
    }
    fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20a0
movq %rax, %rdi
addq $0x46, %rdi
shlq $0x0, %rdi
callq 0x2270
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x5744a(%rip), %rsi     # 0x3989de
movb $0x0, %al
callq 0x2050
movq -0x18(%rbp), %rdi
leaq 0x57e2c(%rip), %rsi     # 0x3993d2
callq 0x2200
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2210
cmpq $0x0, -0x20(%rbp)
jne 0x3415c4
jmp 0x3417a9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x3417a0
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x38(%rbp), %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
imulq $0x58, -0x38(%rbp), %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x341642
jmp 0x34178f
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x38(%rbp), %r8
leaq 0x4f14e(%rip), %rsi     # 0x3907cb
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x34177d
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
imulq $0x24, -0x48(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
imulq $0x24, -0x48(%rbp), %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x43c28(%rip), %rax     # 0x385303
movsbl (%rax,%rcx), %eax
movl %eax, -0x58(%rbp)
movq -0x40(%rbp), %rax
imulq $0x24, -0x48(%rbp), %rcx
addq %rcx, %rax
movb 0x20(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x41799(%rip), %rax     # 0x382e9b
movsbl (%rax,%rcx), %eax
movl %eax, -0x54(%rbp)
movq -0x40(%rbp), %rax
imulq $0x24, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0x40(%rbp), %rax
imulq $0x24, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x40(%rbp), %rax
imulq $0x24, -0x48(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x327090
movq -0x68(%rbp), %rdi
movl -0x5c(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %r8d
movq %rax, %r9
leaq 0x57290(%rip), %rsi     # 0x3989f5
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x341684
movq -0x20(%rbp), %rdi
leaq 0x452a0(%rip), %rsi     # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3415ec
movq -0x20(%rbp), %rdi
callq 0x21a0
addq $0x70, %rsp
popq %rbp
retq
nop