// File: chhylp123[P]hifiasm/ecovlp.cpp
// Function: write_ec_reads(char const*)
void write_ec_reads(const char *suffix_ou)
{
    uint64_t k, strl; UC_Read qstr, tstr; char *nn = NULL, *str = NULL;
    init_UC_Read(&qstr); init_UC_Read(&tstr);
    MALLOC(nn, strlen(suffix_ou) + strlen(asm_opt.output_file_name) + 36);
    sprintf(nn, "%s.%s", asm_opt.output_file_name, suffix_ou);
    FILE *ou = fopen(nn, "w");
    free(nn);

    for (k = 0; k < R_INF.total_reads; k++) {
        recover_UC_Read(&qstr, &R_INF, k);
        if(scb.a) {
            gen_ori_seq0(qstr.seq, qstr.length, &tstr, &(scb.a[k]), k); str = tstr.seq; strl = tstr.length;
        } else {
            str = qstr.seq; strl = qstr.length;
        }

        fwrite(">", 1, 1, ou);
        fwrite(Get_NAME(R_INF, k), 1, Get_NAME_LENGTH(R_INF, k), ou);
        fwrite("\n", 1, 1, ou);
        fwrite(str, 1, strl, ou);
        fwrite("\n", 1, 1, ou);
    }

    fclose(ou); destory_UC_Read(&qstr); destory_UC_Read(&tstr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9850
leaq -0x58(%rbp), %rdi
callq 0x9850
movq -0x8(%rbp), %rdi
callq 0x20a0
movq %rax, -0x78(%rbp)
leaq 0x15af83(%rip), %rax    # 0x3c47f8
movq 0x10(%rax), %rdi
callq 0x20a0
movq -0x78(%rbp), %rdi
addq %rax, %rdi
addq $0x24, %rdi
shlq $0x0, %rdi
callq 0x2270
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
leaq 0x15af57(%rip), %rax    # 0x3c47f8
movq 0x10(%rax), %rdx
movq -0x8(%rbp), %rcx
leaq 0x12038d(%rip), %rsi    # 0x389c3d
movb $0x0, %al
callq 0x2050
movq -0x60(%rbp), %rdi
leaq 0x12fb10(%rip), %rsi    # 0x3993d2
callq 0x2200
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
callq 0x2210
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x15b9e9(%rip), %rcx    # 0x3c52d0
cmpq 0x50(%rcx), %rax
jae 0x269a17
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq 0x15b9d0(%rip), %rsi    # 0x3c52d0
callq 0xa380
cmpq $0x0, 0x15bcfb(%rip)    # 0x3c5608
je 0x269945
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq 0x15bcea(%rip), %rcx    # 0x3c5608
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rcx
movq -0x10(%rbp), %r8
leaq -0x58(%rbp), %rdx
callq 0x2645a0
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x269955
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x70(%rbp), %rcx
leaq 0x11805b(%rip), %rdi    # 0x3819bb
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2400
leaq 0x15b95c(%rip), %rax    # 0x3c52d0
movq 0x8(%rax), %rdi
leaq 0x15b951(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
addq (%rax,%rcx,8), %rdi
leaq 0x15b93e(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdx
leaq 0x15b92a(%rip), %rax    # 0x3c52d0
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rax,%rcx,8), %rdx
movq -0x70(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
movq -0x70(%rbp), %rcx
leaq 0x11d05d(%rip), %rdi    # 0x386a28
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2400
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x70(%rbp), %rcx
movl $0x1, %esi
callq 0x2400
movq -0x70(%rbp), %rcx
leaq 0x11d02f(%rip), %rdi    # 0x386a28
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2400
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2698dc
movq -0x70(%rbp), %rdi
callq 0x21a0
leaq -0x38(%rbp), %rdi
callq 0x9670
leaq -0x58(%rbp), %rdi
callq 0x9670
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)