// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xa8, %rsp
movl %edi, 0xa4(%rsp)
movq %rsi, 0x98(%rsp)
movl %edx, 0x94(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movl $0x0, 0x64(%rsp)
movq $0x0, 0x38(%rsp)
callq 0x11d4a0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x5746b
movq 0x80(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x57433
jmp 0x5746b
movq 0x5e4b66(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4bebcf(%rip), %rsi    # 0x516013
leaq 0x4bed74(%rip), %rdx    # 0x5161bf
leaq 0x4ceb10(%rip), %rcx    # 0x525f62
leaq 0x4ce9b5(%rip), %r8     # 0x525e0e
movl $0x87, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x5746d
jmp 0x5746f
cmpq $0x0, 0x78(%rsp)
jne 0x574af
movq 0x5e4b22(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4beb8b(%rip), %rsi    # 0x516013
leaq 0x4c543e(%rip), %rdx    # 0x51c8cd
leaq 0x4ceacc(%rip), %rcx    # 0x525f62
leaq 0x4ce971(%rip), %r8     # 0x525e0e
movl $0x88, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x574b1
callq 0x11f5c0
movq %rax, 0x70(%rsp)
movslq 0x94(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movslq 0xa4(%rsp), %rcx
cmpq %rcx, %rax
jae 0x57505
movq 0x70(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x11f720
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x574c8
movq 0x70(%rsp), %rdi
callq 0xdf4c0
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x57538
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x112830
movq %rax, 0x68(%rsp)
jmp 0x5754f
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1126d0
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x111990
movq 0x78(%rsp), %rax
testb $0x1, (%rax)
je 0x57584
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x111b70
movq %rax, %rdi
movq 0x50(%rsp), %rsi
callq 0xf9830
jmp 0x57586
movq 0x68(%rsp), %rdi
movq 0x80(%rsp), %r8
leaq 0x40(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x111ab0
movl %eax, 0x64(%rsp)
cmpl $0x1, 0x64(%rsp)
je 0x575b7
jmp 0x578a9
movq 0x78(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x575e9
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xdbd10
jmp 0x578a4
movq 0x78(%rsp), %rax
testb $0x1, 0x1(%rax)
je 0x578a2
movq 0x48(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x4ce806(%rip), %rsi    # 0x525e0e
movl $0xac, %edx
callq 0xe80f0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11e110
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x577f8
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x4e895b(%rip), %rsi    # 0x53ffad
callq 0x19980
cmpl $0x0, %eax
jne 0x576ff
movq 0x28(%rsp), %rdi
callq 0x11dfa0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x576af
movq 0x5e4922(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4be98b(%rip), %rsi    # 0x516013
leaq 0x55a2f4(%rip), %rdx    # 0x5b1983
leaq 0x4ce8cc(%rip), %rcx    # 0x525f62
leaq 0x4ce771(%rip), %r8     # 0x525e0e
movl $0xb2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x576b1
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x58(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0xfc670
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x11de00
movq 0x28(%rsp), %rdi
callq 0x11dfa0
movq %rax, %rdx
subq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x577c1
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x4e88c3(%rip), %rsi    # 0x53ffda
callq 0x19980
cmpl $0x0, %eax
jne 0x577bf
movq 0x28(%rsp), %rdi
callq 0x11dfa0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x57774
movq 0x5e485d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4be8c6(%rip), %rsi    # 0x516013
leaq 0x55a22f(%rip), %rdx    # 0x5b1983
leaq 0x4ce807(%rip), %rcx    # 0x525f62
leaq 0x4ce6ac(%rip), %r8     # 0x525e0e
movl $0xb8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x57776
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x58(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0xfc6e0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x11dd20
movq 0x28(%rsp), %rdi
callq 0x11dfa0
movq %rax, %rdx
subq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x577c1
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x577e3
movq 0x28(%rsp), %rdi
movl $0x7c, %esi
callq 0x11da70
jmp 0x577e5
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x5762a
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x57871
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %esi
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x4ce744(%rip), %rdi    # 0x525f76
movb $0x0, %al
callq 0x19070
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x5785f
leaq 0x50a479(%rip), %rdi    # 0x561ccc
movl $0x7c, %esi
movb $0x0, %al
callq 0x19070
jmp 0x57861
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x57801
movq 0x28(%rsp), %rdi
callq 0x11dee0
movq %rax, %rsi
leaq 0x4ce6f5(%rip), %rdi    # 0x525f7a
movb $0x0, %al
callq 0x19070
movq 0x20(%rsp), %rdi
leaq 0x4ce576(%rip), %rsi    # 0x525e0e
movl $0xc6, %edx
callq 0xe88c0
jmp 0x578a4
jmp 0x57586
movq 0x78(%rsp), %rax
testb $0x1, (%rax)
je 0x578b8
callq 0xfa220
movq 0x70(%rsp), %rdi
callq 0x11fd20
movq 0x28(%rsp), %rdi
callq 0x11f560
movq 0x68(%rsp), %rdi
callq 0x111c10
movl 0x64(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)