// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, 0x20(%rsp)
callq 0xacb84
movq %rax, %rbx
testq %r13, %r13
je 0x3eea2
movq %r13, %rdi
callq 0x89eb7
testb %al, %al
jne 0x3f1cf
movq %r13, 0x8(%rsp)
testq %r14, %r14
je 0x3f1a1
callq 0xae154
movq %rax, 0x18(%rsp)
movslq %ebp, %r13
movslq %r12d, %r12
cmpq %r12, %r13
jae 0x3eed8
movq (%r15,%r13,8), %rsi
movq 0x18(%rsp), %rdi
callq 0xae22f
incq %r13
jmp 0x3eec0
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x8e240
movq %rax, %r15
cmpb $0x1, 0x3(%r14)
jne 0x3ef01
movq %r12, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xa6f19
jmp 0x3ef11
movq %r12, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xa6e33
leaq 0x20(%rsp), %rsi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0xa6240
cmpb $0x1, (%r14)
jne 0x3ef41
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xa6337
movq %rax, %rdi
movq %r15, %rsi
callq 0x9c79c
leaq 0x2b5f5e(%rip), %r13    # 0x2f4ea6
movq 0x10(%rsp), %r15
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %r8
callq 0xa62e5
cmpl $0x1, %eax
jne 0x3f103
cmpb $0x1, 0x2(%r14)
jne 0x3ef91
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rsp), %rdx
movq 0x10(%r14), %rcx
xorl %r8d, %r8d
callq 0x8c0bc
jmp 0x3ef4d
cmpb $0x1, 0x1(%r14)
jne 0x3ef4d
movq (%rsp), %rdi
shlq $0x3, %rdi
leaq 0x2b5d97(%rip), %rsi    # 0x2f4d3e
movl $0xac, %edx
callq 0x93160
movq %rax, %r12
movq %rbx, %rdi
callq 0xad357
xorl %r15d, %r15d
movq (%rsp), %rax
cmpq %rax, %r15
jae 0x3f08e
movq 0x8(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
leaq 0x2cf5d6(%rip), %rsi    # 0x30e5b5
callq 0x179e0
testl %eax, %eax
je 0x3f033
movq 0x8(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
leaq 0x2cf5e7(%rip), %rsi    # 0x30e5e2
callq 0x179e0
testl %eax, %eax
jne 0x3f06f
movq %rbx, %rdi
callq 0xad289
movq %rax, %rbp
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3f169
movzbl (%rax,%r15), %edi
callq 0x9db22
movq %rbx, %rdi
movl %eax, %esi
callq 0xad0a8
jmp 0x3f060
movq %rbx, %rdi
callq 0xad289
movq %rax, %rbp
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3f13b
movzbl (%rax,%r15), %edi
callq 0x9dad0
movq %rbx, %rdi
movl %eax, %esi
callq 0xad151
movq %rbx, %rdi
callq 0xad289
subq %rbp, %rax
movq %rax, (%r12,%r15,8)
movq (%rsp), %rax
decq %rax
cmpq %rax, %r15
je 0x3f086
movq %rbx, %rdi
pushq $0x7c
popq %rsi
callq 0xaced9
incq %r15
jmp 0x3efbf
xorl %r15d, %r15d
cmpq %rax, %r15
jae 0x3f0cc
movl (%r12,%r15,8), %esi
movq 0x28(%rsp), %rax
movzbl (%rax,%r15), %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0x17070
movq (%rsp), %rax
leaq -0x1(%rax), %rcx
cmpq %rcx, %r15
je 0x3f0c7
pushq $0x7c
popq %rdi
callq 0x179c0
movq (%rsp), %rax
incq %r15
jmp 0x3f091
movq %rbx, %rdi
callq 0xad1fa
leaq 0x2b5dcf(%rip), %rdi    # 0x2f4eaa
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movq %r12, %rdi
leaq 0x2b5c4f(%rip), %rsi    # 0x2f4d3e
movl $0xc6, %edx
callq 0x936f9
movq 0x8(%rsp), %r12
jmp 0x3ef48
movl %eax, %ebp
cmpb $0x1, (%r14)
jne 0x3f110
callq 0x9cce9
movq 0x18(%rsp), %rdi
callq 0xae662
movq %rbx, %rdi
callq 0xae103
movq %r15, %rdi
callq 0xa6389
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3f8e26(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5ec7(%rip), %rsi    # 0x2e5013
leaq 0x33d814(%rip), %rdx    # 0x37c967
leaq 0x2b5d38(%rip), %rcx    # 0x2f4e92
leaq 0x2b5bdd(%rip), %r8     # 0x2f4d3e
movl $0xb2, %r9d
jmp 0x3f195
movq 0x3f8df8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5e99(%rip), %rsi    # 0x2e5013
leaq 0x33d7e6(%rip), %rdx    # 0x37c967
leaq 0x2b5d0a(%rip), %rcx    # 0x2f4e92
leaq 0x2b5baf(%rip), %r8     # 0x2f4d3e
movl $0xb8, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x3f8dc0(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5e61(%rip), %rsi    # 0x2e5013
leaq 0x2ac6cd(%rip), %rdx    # 0x2eb886
leaq 0x2b5cd2(%rip), %rcx    # 0x2f4e92
leaq 0x2b5b77(%rip), %r8     # 0x2f4d3e
movl $0x88, %r9d
jmp 0x3f195
movq 0x3f8d92(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5e33(%rip), %rsi    # 0x2e5013
leaq 0x2a5fd8(%rip), %rdx    # 0x2e51bf
leaq 0x2b5ca4(%rip), %rcx    # 0x2f4e92
leaq 0x2b5b49(%rip), %r8     # 0x2f4d3e
movl $0x87, %r9d
jmp 0x3f195
nopl (%rax)