// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_seqcorrect.c
// Function: gt_seqcorrect_encode
static bool gt_seqcorrect_encode(GtSeqcorrectArguments *arguments,
    GtLogger *default_logger, GtLogger *verbose_logger, GtError *err)
{
  bool haserr = false;
  GtReads2Twobit *r2t;
  GtUword i;
  bool autoindexname = false;

  gt_logger_log(verbose_logger, "input is a list of libraries");
  if (gt_str_length(arguments->indexname) == 0)
  {
    autoindexname = true;
    gt_str_append_cstr(arguments->indexname,
        gt_str_array_get(arguments->db, 0));
  }
  gt_logger_log(verbose_logger, "indexname: %s [%s]",
      gt_str_get(arguments->indexname), autoindexname ?
      "first input library" : "user-specified");

  r2t = gt_reads2twobit_new(arguments->indexname);

  if (arguments->phred64)
    gt_reads2twobit_use_phred64(r2t);

  if (arguments->maxlow != GT_UNDEF_UWORD)
    gt_reads2twobit_set_quality_filter(r2t, arguments->maxlow,
        (char)arguments->lowqual);

  for (i = 0; i < gt_str_array_size(arguments->db) && !haserr; i++)
  {
    GtStr *dbentry = gt_str_array_get_str(arguments->db, i);
    if (gt_reads2twobit_add_library(r2t, dbentry, err) != 0)
      haserr = true;
  }
  if (!haserr)
  {
    if (gt_reads2twobit_encode(r2t, err) != 0)
      haserr = true;
  }
  gt_assert(gt_str_length(arguments->encseqinput) == 0);
  gt_str_append_cstr(arguments->encseqinput,
      gt_str_get(arguments->indexname));

  if (!haserr)
  {
    GtUword nofreads_valid, nofreads_invalid, nofreads_input,
                  tlen_valid;
    bool varlen;
    nofreads_valid = gt_reads2twobit_nofseqs(r2t);
    nofreads_invalid = gt_reads2twobit_nof_invalid_seqs(r2t);
    nofreads_input = nofreads_valid + nofreads_invalid;
    tlen_valid = gt_reads2twobit_total_seqlength(r2t) -
      gt_reads2twobit_nofseqs(r2t);

    gt_logger_log(default_logger, "number of reads in original read set "
        "= "GT_WU"", nofreads_input);

    varlen = (gt_reads2twobit_seqlen_eqlen(r2t) == 0);
    if (varlen)
      gt_logger_log(verbose_logger, "read length = variable ["GT_WU".."GT_WU"]",
          gt_reads2twobit_seqlen_min(r2t), gt_reads2twobit_seqlen_max(r2t));
    else
      gt_logger_log(verbose_logger, "read length = "GT_WU"",
          gt_reads2twobit_seqlen_eqlen(r2t) - 1UL);

    gt_logger_log(verbose_logger, "total length of original read set = "GT_WU"",
        tlen_valid + gt_reads2twobit_invalid_seqs_totallength(r2t));
    gt_logger_log(verbose_logger, "low-quality reads = "GT_WU" "
        "[%.2f %% of input]", nofreads_invalid, (float)nofreads_invalid *
        100 / (float)nofreads_input);
    if (!arguments->verbose)
      gt_logger_log(default_logger, "low-quality reads = "GT_WU"",
          nofreads_invalid);
    if (!haserr)
    {
      if (gt_reads2twobit_write_encseq(r2t, err) != 0)
        haserr = true;
      if (!haserr)
      {
        gt_logger_log(verbose_logger,
            "number of reads in output read set = "GT_WU"", nofreads_valid);
        gt_logger_log(verbose_logger,
            "total length of output read set = "GT_WU"", tlen_valid);
        gt_logger_log(verbose_logger, "read set saved as GtEncseq: %s.%s",
            gt_str_get(arguments->indexname), varlen ?
            "(esq|ssp)" : "esq");
      }
    }
  }
  gt_reads2twobit_delete(r2t);

  return haserr;
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movb $0x0, 0xd7(%rsp)
movb $0x0, 0xbf(%rsp)
movq 0xe0(%rsp), %rdi
leaq 0x4c672e(%rip), %rsi    # 0x5292b4
movb $0x0, %al
callq 0xe7cd0
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x62be5
movb $0x1, 0xbf(%rsp)
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xf0(%rsp), %rax
movq 0x58(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
movq 0xe0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq 0x78(%rsp), %rdi
movq %rax, %rdx
movb 0xbf(%rsp), %sil
leaq 0x4c66de(%rip), %rcx    # 0x5292f8
leaq 0x4c66c3(%rip), %rax    # 0x5292e4
testb $0x1, %sil
cmovneq %rax, %rcx
leaq 0x4c66a1(%rip), %rsi    # 0x5292d1
movb $0x0, %al
callq 0xe7cd0
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x2a0620
movq %rax, 0xc8(%rsp)
movq 0xf0(%rsp), %rax
testb $0x1, 0x60(%rax)
je 0x62c6b
movq 0xc8(%rsp), %rdi
callq 0x2a1000
movq 0xf0(%rsp), %rax
cmpq $-0x1, 0x68(%rax)
je 0x62ca1
movq 0xc8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0xf0(%rsp), %rax
movl 0x70(%rax), %eax
movsbl %al, %edx
callq 0x2a1060
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xf0(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x11fcc0
movq 0x68(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x77(%rsp)
jae 0x62ceb
movb 0xd7(%rsp), %al
xorb $-0x1, %al
movb %al, 0x77(%rsp)
movb 0x77(%rsp), %al
testb $0x1, %al
jne 0x62cf5
jmp 0x62d5b
movq 0xf0(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xc0(%rsp), %rsi
callq 0x11f960
movq %rax, 0xb0(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
callq 0x2a0b30
cmpl $0x0, %eax
je 0x62d40
movb $0x1, 0xd7(%rsp)
jmp 0x62d42
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x62cad
testb $0x1, 0xd7(%rsp)
jne 0x62d89
movq 0xc8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x2a10a0
cmpl $0x0, %eax
je 0x62d87
movb $0x1, 0xd7(%rsp)
jmp 0x62d89
jmp 0x62d8b
movq 0xf0(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x62dda
movq 0x5d91f7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4b3260(%rip), %rsi    # 0x516013
leaq 0x4c654d(%rip), %rdx    # 0x529307
leaq 0x4c6571(%rip), %rcx    # 0x529332
leaq 0x4c612b(%rip), %r8     # 0x528ef3
movl $0x1a7, %r9d            # imm = 0x1A7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x62ddc
movq 0xf0(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
testb $0x1, 0xd7(%rsp)
jne 0x63163
movq 0xc8(%rsp), %rdi
callq 0x2a4e40
movq %rax, 0xa8(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4da0
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
addq 0xa0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4f80
movq %rax, 0x58(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4e40
movq %rax, %rcx
movq 0x58(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x90(%rsp)
movq 0xe8(%rsp), %rdi
movq 0x98(%rsp), %rdx
leaq 0x4c64a3(%rip), %rsi    # 0x529347
movb $0x0, %al
callq 0xe7cd0
movq 0xc8(%rsp), %rdi
callq 0x2a4e90
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movb %al, 0x8f(%rsp)
testb $0x1, 0x8f(%rsp)
je 0x62f1b
movq 0xe0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4f30
movq %rax, 0x50(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4ee0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rdx
movq %rax, %rcx
leaq 0x4c2ad4(%rip), %rsi    # 0x5259e6
movb $0x0, %al
callq 0xe7cd0
jmp 0x62f4f
movq 0xe0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4e90
movq 0x40(%rsp), %rdi
movq %rax, %rdx
subq $0x1, %rdx
leaq 0x4c0f33(%rip), %rsi    # 0x523e7b
movb $0x0, %al
callq 0xe7cd0
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x2a4df0
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rdi
addq %rax, %rdx
leaq 0x4c63e8(%rip), %rsi    # 0x529372
xorl %eax, %eax
callq 0xe7cd0
movq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x38(%rsp)
testq %rax, %rax
movss %xmm0, 0x3c(%rsp)
js 0x62fe4
movss 0x38(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x3c(%rsp), %xmm0
movss 0x4c23a6(%rip), %xmm1   # 0x525398
mulss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x98(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x10(%rsp)
testq %rax, %rax
movss %xmm0, 0x14(%rsp)
js 0x6303d
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rdi
movss 0xc(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x4c29cd(%rip), %rsi    # 0x525a2f
movb $0x1, %al
callq 0xe7cd0
movq 0xf0(%rsp), %rax
testb $0x1, 0x1(%rax)
jne 0x63095
movq 0xe8(%rsp), %rdi
movq 0xa0(%rsp), %rdx
leaq 0x4c29cc(%rip), %rsi    # 0x525a5a
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0xd7(%rsp)
jne 0x63161
movq 0xc8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x2a41c0
cmpl $0x0, %eax
je 0x630c5
movb $0x1, 0xd7(%rsp)
testb $0x1, 0xd7(%rsp)
jne 0x6315f
movq 0xe0(%rsp), %rdi
movq 0xa8(%rsp), %rdx
leaq 0x4c62b0(%rip), %rsi    # 0x52939a
movb $0x0, %al
callq 0xe7cd0
movq 0xe0(%rsp), %rdi
movq 0x90(%rsp), %rdx
leaq 0x4c62bb(%rip), %rsi    # 0x5293c3
movb $0x0, %al
callq 0xe7cd0
movq 0xe0(%rsp), %rax
movq %rax, (%rsp)
movq 0xf0(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rdx
movb 0x8f(%rsp), %sil
leaq 0x4c7512(%rip), %rcx    # 0x52a654
leaq 0x4c2930(%rip), %rax    # 0x525a79
testb $0x1, %sil
cmovneq %rax, %rcx
leaq 0x4c6291(%rip), %rsi    # 0x5293e9
movb $0x0, %al
callq 0xe7cd0
jmp 0x63161
jmp 0x63163
movq 0xc8(%rsp), %rdi
callq 0x2a0840
movb 0xd7(%rsp), %al
andb $0x1, %al
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)