// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_readreads.c
// Function: gt_readreads_runner
static int gt_readreads_runner(int argc, const char **argv, int parsed_args,
                               void *tool_arguments, GT_UNUSED GtError *err)
{
  GtReadreads *opts = tool_arguments;
  GtStrArray *files;
  GtSeqIterator *siq;
  int had_err = 0;
  GtUword i,
                totalsize,
                len;
  const GtUchar *seq,
                *qual = NULL;
  char *desc;
  GtStr *scores = gt_str_new();

  gt_error_check(err);
  gt_assert(opts);

  files = gt_str_array_new();
  for (i = (GtUword) parsed_args; i < (GtUword) argc; i++)
  {
    gt_str_array_add_cstr(files, argv[i]);
  }
  totalsize = (GtUword) gt_files_estimate_total_size(files);

  if (opts->colorspace)
  {
    siq = gt_seq_iterator_fastq_new_colorspace(files, err);
  }
  else
  {
    siq = gt_seq_iterator_fastq_new(files, err);
  }
  gt_seq_iterator_set_quality_buffer(siq, &qual);

  if (opts->verbose)
  {
    gt_progressbar_start(gt_seq_iterator_getcurrentcounter(siq,
                                                         (GtUint64)
                                                         totalsize),
                         (GtUint64) totalsize);
  }

  while (true)
  {
    had_err = gt_seq_iterator_next(siq, &seq, &len, &desc, err);
    if (had_err != 1)
      break;
    if (opts->fasta) {
      gt_fasta_show_entry((char*)desc, (char*)seq, len, opts->fastawidth, NULL);
    }
    else if (opts->showseq) {
      GtUword *lens = gt_malloc(sizeof (GtUword)*len);
      gt_str_reset(scores);
      for (i=0;i<len;i++) {
        GtUword l;
        if (strcmp(gt_str_get(opts->qualformat), "phred") == 0) {
          l = gt_str_length(scores);
          gt_assert(qual);
          gt_str_append_uint(scores,
                             gt_quality_fastq_to_phred(qual[i]));
          lens[i] = gt_str_length(scores) - l;
        } else if (strcmp(gt_str_get(opts->qualformat), "solexa") == 0) {
          l = gt_str_length(scores);
          gt_assert(qual);
          gt_str_append_int(scores,
                            gt_quality_fastq_to_solexa(qual[i]));
          lens[i] = gt_str_length(scores) - l;
        }
        if (i != len-1)
          gt_str_append_char(scores, SEQUENCE_CHAR_SEPARATOR);
      }
      for (i=0;i<len;i++) {
        printf("%*c", (int) lens[i], (int) seq[i]);
        if (i != len-1)
          printf("%c", SEQUENCE_CHAR_SEPARATOR);
      }
      printf("\n%s\n\n", gt_str_get(scores));
      gt_free(lens);
    }
  }
  if (opts->verbose)
    gt_progressbar_stop();
  gt_str_array_delete(files);
  gt_str_delete(scores);
  gt_seq_iterator_delete(siq);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
movq $0x0, 0x18(%rsp)
callq 0x1208f8
movq %rax, %rbx
testq %r13, %r13
je 0xbd7c6
movq %r13, %rdi
callq 0x101a9a
testb %al, %al
jne 0xbdaa1
movq %r13, 0x8(%rsp)
testq %r14, %r14
je 0xbda9c
callq 0x121b54
cmpl %r12d, %ebp
movq %rax, 0x10(%rsp)
jae 0xbd804
movslq %r12d, %r12
movslq %ebp, %r13
movq (%r15,%r13,8), %rsi
movq 0x10(%rsp), %rdi
callq 0x121c30
movq 0x10(%rsp), %rax
incq %r13
cmpq %r12, %r13
jb 0xbd7e9
movq %rax, %r12
movq %rax, %rdi
callq 0x104779
movq %rax, %r15
cmpb $0x1, 0x3(%r14)
jne 0xbd82b
movq %r12, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x11a48c
jmp 0xbd83b
movq %r12, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x11a3d9
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x1199ce
cmpb $0x1, (%r14)
jne 0xbd867
movq %rbp, %rdi
movq %r15, %rsi
callq 0x119a32
movq %rax, %rdi
movq %r15, %rsi
callq 0x110c6c
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
movq %rbp, %rdi
movq %r13, %r8
callq 0x119a11
cmpl $0x1, %eax
jne 0xbda58
leaq 0x2b9c7e(%rip), %r15    # 0x37750d
movq %rbp, 0x30(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0xbd8ba
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq (%rsp), %rdx
movq 0x10(%r14), %rcx
xorl %r8d, %r8d
callq 0x102ec0
jmp 0xbda37
cmpb $0x1, 0x1(%r14)
jne 0xbda37
movq (%rsp), %rdi
shlq $0x3, %rdi
leaq 0x2a0492(%rip), %rsi    # 0x35dd66
movl $0xac, %edx
callq 0x1092b2
movq %rax, %r13
movq %rbx, %rdi
callq 0x120db4
cmpq $0x0, (%rsp)
je 0xbd9ba
xorl %ebp, %ebp
movq 0x8(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
movq %r15, %rsi
callq 0x17a40
testl %eax, %eax
je 0xbd958
movq 0x8(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x2b9c19(%rip), %rsi    # 0x37753a
callq 0x17a40
testl %eax, %eax
jne 0xbd994
movq %rbx, %rdi
callq 0x120d4c
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xbda97
movzbl (%rax,%rbp), %edi
callq 0x1121e9
movq %rbx, %rdi
movl %eax, %esi
callq 0x120c89
jmp 0xbd984
movq %rbx, %rdi
callq 0x120d4c
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xbda92
movzbl (%rax,%rbp), %edi
callq 0x1121c8
movq %rbx, %rdi
movl %eax, %esi
callq 0x120cd6
movq %rbx, %rdi
callq 0x120d4c
subq %r12, %rax
movq %rax, (%r13,%rbp,8)
movq (%rsp), %rax
decq %rax
cmpq %rax, %rbp
je 0xbd9ad
movq %rbx, %rdi
movl $0x7c, %esi
callq 0x120ba5
incq %rbp
cmpq (%rsp), %rbp
jb 0xbd8f6
cmpq $0x0, (%rsp)
movq 0x30(%rsp), %rbp
je 0xbda05
xorl %r12d, %r12d
movl (%r13,%r12,8), %esi
movq 0x20(%rsp), %rax
movzbl (%rax,%r12), %edx
leaq 0x2a04ef(%rip), %rdi    # 0x35dece
xorl %eax, %eax
callq 0x17070
movq (%rsp), %rax
decq %rax
cmpq %rax, %r12
je 0xbd9fc
movl $0x7c, %edi
callq 0x17a20
incq %r12
cmpq (%rsp), %r12
jb 0xbd9c9
movq %rbx, %rdi
callq 0x120d23
leaq 0x2a04be(%rip), %rdi    # 0x35ded2
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movq %r13, %rdi
leaq 0x2a033e(%rip), %rsi    # 0x35dd66
movl $0xc6, %edx
callq 0x109670
movq 0x8(%rsp), %r13
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
movq %r13, %r8
callq 0x119a11
cmpl $0x1, %eax
je 0xbd894
movl %eax, %r12d
cmpb $0x1, (%r14)
jne 0xbda66
callq 0x111189
movq 0x10(%rsp), %rdi
callq 0x121e8b
movq %rbx, %rdi
callq 0x121b03
movq %rbp, %rdi
callq 0x119a53
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1e30c
callq 0x1e2d3
callq 0x1e345
callq 0x1e29a
nop