// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/syncmer.c
// Function: sr_read_single_thread
static void sr_read_single_thread(sstream_t *s_stream, sr_db_t *sr_db, size_t mD)
{
    sr_db_clean(sr_db);
    sr_db_init(sr_db, sr_db->k, sr_db->s);

    if (mD == 0)
        mD = SIZE_MAX;

    p_data_t *dat;
    MYCALLOC(dat, 1);
    dat->n_reads = 1;
    MYMALLOC(dat->sid, 1);
    MYMALLOC(dat->name, 1);
    MYMALLOC(dat->seq, 1);
    MYMALLOC(dat->len, 1);
    dat->sr_db = sr_db;

    int l;
    uint64_t i;
    size_t D;
    i = 0;
    D = 0;
    while ((l = sstream_read(s_stream)) >= 0) {
        dat->sid[0] = i++;
        dat->name[0] = strdup(s_stream->s->ks->name.s);
        dat->seq[0] = strdup(s_stream->s->ks->seq.s);
        dat->len[0] = l;
        sr_read_analysis_thread(dat);
        D += l;
        if (D >= mD) {
            fprintf(stderr, "[M::%s] data limit (%lu) reached. Discard the remaining sequences...\n", __func__, mD);
            break;
        }
    }

    free(dat->sid);
    free(dat->name);
    free(dat->seq);
    free(dat->len);
    free(dat);

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12210
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edx
callq 0x12280
cmpq $0x0, -0x18(%rbp)
jne 0x12073
movq $-0x1, -0x18(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x2250
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x8, %edi
callq 0x2320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x8, %edi
callq 0x2320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x8, %edi
callq 0x2320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x4, %edi
callq 0x2320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x284f0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jl 0x121cb
movq -0x30(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x24b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq 0x40(%rax), %rdi
callq 0x24b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x16820
movslq -0x24(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x121c6
movq 0x21e50(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
leaq 0x1bda2(%rip), %rsi     # 0x2df58
leaq 0x1c151(%rip), %rdx     # 0x2e30e
movb $0x0, %al
callq 0x2290
jmp 0x121cb
jmp 0x12100
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2060
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2060
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2060
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2060
movq -0x20(%rbp), %rdi
callq 0x2060
addq $0x40, %rsp
popq %rbp
retq
nop