// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
movq %rsi, %r15
movl %edi, %r12d
movq $0x0, 0x18(%rsp)
callq 0x11ac6c
movq %rax, %rbx
testq %r13, %r13
je 0xbb748
movq %r13, %rdi
callq 0xfcc32
testb %al, %al
jne 0xbba31
movq %r13, 0x10(%rsp)
testq %r14, %r14
je 0xbba2c
callq 0x11be10
movq %rax, %rbp
movl 0x8(%rsp), %eax
cmpl %r12d, %eax
jae 0xbb781
movslq %r12d, %r12
movslq %eax, %r13
movq (%r15,%r13,8), %rsi
movq %rbp, %rdi
callq 0x11bee9
incq %r13
cmpq %r12, %r13
jb 0xbb76d
movq %rbp, %rdi
callq 0xff877
movq %rax, %r12
cmpb $0x1, 0x3(%r14)
jne 0xbb7a5
movq %rbp, %rdi
movq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0x114d7c
jmp 0xbb7b5
movq %rbp, %rdi
movq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0x114cc9
movq %rax, %r15
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x1142fa
cmpb $0x1, (%r14)
jne 0xbb7e1
movq %r15, %rdi
movq %r12, %rsi
callq 0x11435e
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ba28
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq %r13, %r8
callq 0x11433d
cmpl $0x1, %eax
jne 0xbb9ea
movq %rbp, 0x30(%rsp)
leaq 0x2b2a8f(%rip), %rbp    # 0x36e29d
movq %r15, 0x8(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0xbb839
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq (%rsp), %rdx
movq 0x10(%r14), %rcx
xorl %r8d, %r8d
callq 0xfe000
jmp 0xbb9bf
cmpb $0x1, 0x1(%r14)
jne 0xbb9bf
movq (%rsp), %rdi
shlq $0x3, %rdi
leaq 0x2994db(%rip), %rsi    # 0x354d2e
movl $0xac, %edx
callq 0x104226
movq %rax, %r13
movq %rbx, %rdi
callq 0x11b132
cmpq $0x0, (%rsp)
je 0xbb988
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
callq 0x11b0a1
movq %rax, %rdi
movq %rbp, %rsi
callq 0x17a40
testl %eax, %eax
je 0xbb8d9
movq 0x8(%r14), %rdi
callq 0x11b0a1
movq %rax, %rdi
leaq 0x2b2a29(%rip), %rsi    # 0x36e2ca
callq 0x17a40
testl %eax, %eax
jne 0xbb916
movq %rbx, %rdi
callq 0x11b0ca
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xbba27
movzbl (%rax,%r15), %edi
callq 0x10cf21
movq %rbx, %rdi
movl %eax, %esi
callq 0x11b007
jmp 0xbb906
movq %rbx, %rdi
callq 0x11b0ca
movq %rax, %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xbba22
movzbl (%rax,%r15), %edi
callq 0x10cf00
movq %rbx, %rdi
movl %eax, %esi
callq 0x11b054
movq %rbx, %rdi
callq 0x11b0ca
subq %r12, %rax
movq %rax, (%r13,%r15,8)
movq (%rsp), %rax
leaq -0x1(%rax), %rcx
cmpq %rcx, %r15
je 0xbb934
movq %rbx, %rdi
movl $0x7c, %esi
callq 0x11af23
movq (%rsp), %rax
incq %r15
cmpq %rax, %r15
jb 0xbb876
testq %rax, %rax
je 0xbb988
xorl %r15d, %r15d
movl (%r13,%r15,8), %esi
movq 0x20(%rsp), %rax
movzbl (%rax,%r15), %edx
leaq 0x299538(%rip), %rdi    # 0x354e96
xorl %eax, %eax
callq 0x17070
movq (%rsp), %rax
leaq -0x1(%rax), %rcx
cmpq %rcx, %r15
je 0xbb980
movl $0x7c, %edi
callq 0x17a20
movq (%rsp), %rax
incq %r15
cmpq %rax, %r15
jb 0xbb948
movq %rbx, %rdi
callq 0x11b0a1
leaq 0x299503(%rip), %rdi    # 0x354e9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movq %r13, %rdi
leaq 0x299383(%rip), %rsi    # 0x354d2e
movl $0xc6, %edx
callq 0x1045eb
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
movq %r13, %r8
callq 0x11433d
cmpl $0x1, %eax
je 0xbb813
movl %eax, %r12d
movq 0x30(%rsp), %rbp
jmp 0xbb9ed
movl %eax, %r12d
cmpb $0x1, (%r14)
jne 0xbb9f8
callq 0x10bf8a
movq %rbp, %rdi
callq 0x11c144
movq %rbx, %rdi
callq 0x11bdbf
movq %r15, %rdi
callq 0x11437f
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1dfbb
callq 0x1df82
callq 0x1dff4
callq 0x1df49
nop