// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_convertseq.c
// Function: gt_convertseq_runner
static int gt_convertseq_runner(int argc, const char **argv, int parsed_args,
                              void *tool_arguments, GtError *err)
{
  GtConvertseqArguments *arguments = tool_arguments;
  int had_err = 0, i;
  GtFilelengthvalues *flv;
  GtSeqIterator *seqit;
  GtSequenceBuffer *sb = NULL;
  GtStrArray *files;
  const GtUchar *sequence;
  char *desc;
  GtUword len, j;
  off_t totalsize;
  gt_error_check(err);
  gt_assert(arguments != NULL);

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

  flv = gt_calloc((size_t) gt_str_array_size(files),
                  sizeof (GtFilelengthvalues));

  sb = gt_sequence_buffer_new_guess_type(files, err);
  if (!sb) {
    had_err = -1;
  }
  if (!had_err) {
    gt_sequence_buffer_set_filelengthtab(sb, flv);
    /* read input using seqiterator */
    seqit = gt_seq_iterator_sequence_buffer_new_with_buffer(sb);
    if (arguments->verbose)
    {
      gt_progressbar_start(gt_seq_iterator_getcurrentcounter(seqit,
                                                           (GtUint64)
                                                           totalsize),
                           (GtUint64) totalsize);
    }
    while (true)
    {
      GtUchar *seq = NULL;
      desc = NULL;
      j = 0UL;
      had_err = gt_seq_iterator_next(seqit, &sequence, &len, &desc, err);
      if (had_err != 1)
        break;
      if (arguments->revcomp) {
        GtUchar *newseq = gt_calloc((size_t) len+1, sizeof (GtUchar));
        memcpy(newseq, sequence, (size_t) len*sizeof (GtUchar));
        had_err = gt_reverse_complement((char*) newseq, len, err);
        if (had_err)
          break;
        seq = newseq;
      } else seq = (GtUchar*) sequence;

      if (!arguments->showseq) {
        bool in_wildcard = false;
        gt_file_xprintf(arguments->outfp, ">%s\n", desc);
        for (i = 0; (GtUword) i < len; i++) {
          if (arguments->reduce_wc_dna) {
            switch (seq[i]) {
              case 'a':
              case 'A':
              case 'c':
              case 'C':
              case 'g':
              case 'G':
              case 't':
              case 'u':
              case 'T':
              case 'U':
                in_wildcard = false;
                gt_file_xfputc((int) seq[i], arguments->outfp);
                j++;
                break;
              default:
                if (!in_wildcard) {
                  in_wildcard = true;
                  if (isupper((int) seq[i]))
                    gt_file_xfputc((int) 'N', arguments->outfp);
                  else
                    gt_file_xfputc((int) 'n', arguments->outfp);
                  j++;
                }
            }
          }
          else if (arguments->reduce_wc_prot) {
            switch (seq[i]) {
              case 'X':
              case 'B':
              case 'Z':
                if (!in_wildcard) {
                  in_wildcard = true;
                  gt_file_xfputc((int) 'N', arguments->outfp);
                  j++;
                }
                break;
              case 'x':
              case 'b':
              case 'z':
                if (!in_wildcard) {
                  in_wildcard = true;
                  gt_file_xfputc((int) 'n', arguments->outfp);
                  j++;
                }
                break;
              default:
                in_wildcard = false;
                gt_file_xfputc((int) seq[i], arguments->outfp);
                j++;
            }
          }
          else {
            gt_file_xfputc((int) seq[i], arguments->outfp);
            j++;
          }
          if (arguments->fastawidth > 0 && j % arguments->fastawidth == 0) {
            j = 0;
            gt_file_xprintf(arguments->outfp, "\n");
          }
        }
        if (arguments->fastawidth == 0 || len % arguments->fastawidth != 0)
            gt_file_xprintf(arguments->outfp, "\n");
      }
      if (arguments->revcomp) {
        gt_free(seq);
      }
    }
    if (arguments->showflv) {
      for (j=0;j<gt_str_array_size(files);j++) {
        fprintf(stderr, "file "GT_WU" (%s): "GT_WU"/"GT_WU"\n",
               j,
               gt_str_array_get(files, j),
               (GtUword) flv[j].length,
               (GtUword) flv[j].effectivelength);
      }
    }
    if (arguments->verbose)
    {
      gt_progressbar_stop();
    }
    gt_sequence_buffer_delete(sb);
    gt_seq_iterator_delete(seqit);
  }
  gt_str_array_delete(files);
  gt_free(flv);

  return had_err;
}

// Assembly:
subq $0xb8, %rsp
movl %edi, 0xb4(%rsp)
movq %rsi, 0xa8(%rsp)
movl %edx, 0xa4(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movl $0x0, 0x84(%rsp)
movq $0x0, 0x68(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x2b157
movq 0x90(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2b11f
jmp 0x2b157
movq 0x610e7a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4eaee3(%rip), %rsi    # 0x516013
leaq 0x4eb088(%rip), %rdx    # 0x5161bf
leaq 0x4f00c9(%rip), %rcx    # 0x51b207
leaq 0x4eff0c(%rip), %r8     # 0x51b051
movl $0x7d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b159
jmp 0x2b15b
cmpq $0x0, 0x88(%rsp)
jne 0x2b19e
movq 0x610e33(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4eae9c(%rip), %rsi    # 0x516013
leaq 0x4ec106(%rip), %rdx    # 0x517284
leaq 0x4f0082(%rip), %rcx    # 0x51b207
leaq 0x4efec5(%rip), %r8     # 0x51b051
movl $0x7e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b1a0
callq 0x11f5c0
movq %rax, 0x60(%rsp)
movl 0xa4(%rsp), %eax
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %eax
cmpl 0xb4(%rsp), %eax
jge 0x2b1f9
movq 0x60(%rsp), %rdi
movq 0xa8(%rsp), %rax
movslq 0x80(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x11f720
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x2b1b8
movq 0x60(%rsp), %rdi
callq 0xdf4c0
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
callq 0x11fcc0
movq %rax, %rdi
movl $0x10, %esi
leaq 0x4efe30(%rip), %rdx    # 0x51b051
movl $0x88, %ecx
callq 0xe83c0
movq %rax, 0x78(%rsp)
movq 0x60(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x113d20
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x2b25a
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x84(%rsp)
jne 0x2b7f9
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x1141e0
movq 0x68(%rsp), %rdi
callq 0x1132a0
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rax
testb $0x1, 0x5(%rax)
je 0x2b2b0
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x111b70
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0xf9830
jmp 0x2b2b2
movq $0x0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x70(%rsp), %rdi
movq 0x90(%rsp), %r8
leaq 0x58(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0x111ab0
movl %eax, 0x84(%rsp)
cmpl $0x1, 0x84(%rsp)
je 0x2b304
jmp 0x2b717
movq 0x88(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x2b387
movq 0x48(%rsp), %rdi
addq $0x1, %rdi
movl $0x1, %esi
leaq 0x4efd2a(%rip), %rdx    # 0x51b051
movl $0xa2, %ecx
callq 0xe83c0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x48(%rsp), %rdx
shlq $0x0, %rdx
callq 0x19610
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x1cb4f0
movl %eax, 0x84(%rsp)
cmpl $0x0, 0x84(%rsp)
je 0x2b37b
jmp 0x2b717
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x2b391
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x88(%rsp), %rax
testb $0x1, 0x4(%rax)
jne 0x2b6ee
movb $0x0, 0x27(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rsp), %rdx
leaq 0x4efe5c(%rip), %rsi    # 0x51b21c
movb $0x0, %al
callq 0xddca0
movl $0x0, 0x80(%rsp)
movslq 0x80(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x2b6aa
movq 0x88(%rsp), %rax
testb $0x1, (%rax)
je 0x2b515
movq 0x30(%rsp), %rax
movslq 0x80(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x20(%rsp)
subl $0x41, %eax
je 0x2b465
jmp 0x2b412
movl 0x20(%rsp), %eax
subl $0x43, %eax
je 0x2b465
jmp 0x2b41d
movl 0x20(%rsp), %eax
subl $0x47, %eax
je 0x2b465
jmp 0x2b428
movl 0x20(%rsp), %eax
addl $-0x54, %eax
subl $0x2, %eax
jb 0x2b465
jmp 0x2b436
movl 0x20(%rsp), %eax
subl $0x61, %eax
je 0x2b465
jmp 0x2b441
movl 0x20(%rsp), %eax
subl $0x63, %eax
je 0x2b465
jmp 0x2b44c
movl 0x20(%rsp), %eax
subl $0x67, %eax
je 0x2b465
jmp 0x2b457
movl 0x20(%rsp), %eax
addl $-0x74, %eax
subl $0x1, %eax
ja 0x2b49c
jmp 0x2b465
movb $0x0, 0x27(%rsp)
movq 0x30(%rsp), %rax
movslq 0x80(%rsp), %rcx
movzbl (%rax,%rcx), %edi
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b510
testb $0x1, 0x27(%rsp)
jne 0x2b50e
movb $0x1, 0x27(%rsp)
callq 0x197c0
movq (%rax), %rax
movq 0x30(%rsp), %rcx
movslq 0x80(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x2b4ea
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
movl $0x4e, %edi
callq 0xddf60
jmp 0x2b500
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
movl $0x6e, %edi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b510
jmp 0x2b647
movq 0x88(%rsp), %rax
testb $0x1, 0x1(%rax)
je 0x2b615
movq 0x30(%rsp), %rax
movslq 0x80(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
subl $0x42, %eax
je 0x2b57a
jmp 0x2b543
movl 0x1c(%rsp), %eax
subl $0x58, %eax
je 0x2b57a
jmp 0x2b54e
movl 0x1c(%rsp), %eax
subl $0x5a, %eax
je 0x2b57a
jmp 0x2b559
movl 0x1c(%rsp), %eax
subl $0x62, %eax
je 0x2b5ac
jmp 0x2b564
movl 0x1c(%rsp), %eax
subl $0x78, %eax
je 0x2b5ac
jmp 0x2b56f
movl 0x1c(%rsp), %eax
subl $0x7a, %eax
je 0x2b5ac
jmp 0x2b5de
testb $0x1, 0x27(%rsp)
jne 0x2b5aa
movb $0x1, 0x27(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
movl $0x4e, %edi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b613
testb $0x1, 0x27(%rsp)
jne 0x2b5dc
movb $0x1, 0x27(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
movl $0x6e, %edi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b613
movb $0x0, 0x27(%rsp)
movq 0x30(%rsp), %rax
movslq 0x80(%rsp), %rcx
movzbl (%rax,%rcx), %edi
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b645
movq 0x30(%rsp), %rax
movslq 0x80(%rsp), %rcx
movzbl (%rax,%rcx), %edi
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xddf60
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b647
movq 0x88(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x2b692
movq 0x40(%rsp), %rax
movq 0x88(%rsp), %rcx
xorl %edx, %edx
divq 0x8(%rcx)
cmpq $0x0, %rdx
jne 0x2b692
movq $0x0, 0x40(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x567be8(%rip), %rsi    # 0x593273
movb $0x0, %al
callq 0xddca0
jmp 0x2b694
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x2b3d2
movq 0x88(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2b6d2
movq 0x48(%rsp), %rax
movq 0x88(%rsp), %rcx
xorl %edx, %edx
divq 0x8(%rcx)
cmpq $0x0, %rdx
je 0x2b6ec
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x567b8e(%rip), %rsi    # 0x593273
movb $0x0, %al
callq 0xddca0
jmp 0x2b6ee
movq 0x88(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x2b712
movq 0x30(%rsp), %rdi
leaq 0x4ef949(%rip), %rsi    # 0x51b051
movl $0xf0, %edx
callq 0xe88c0
jmp 0x2b2b2
movq 0x88(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x2b7d2
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x2b7d0
movq 0x610846(%rip), %rax    # 0x63bfa0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x11f8c0
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq 0x40(%rsp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r8
movq 0x78(%rsp), %rax
movq 0x40(%rsp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movq 0x8(%rax), %r9
leaq 0x4efa6b(%rip), %rsi    # 0x51b221
movb $0x0, %al
callq 0x199f0
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2b732
jmp 0x2b7d2
movq 0x88(%rsp), %rax
testb $0x1, 0x5(%rax)
je 0x2b7e5
callq 0xfa220
movq 0x68(%rsp), %rdi
callq 0x113bf0
movq 0x70(%rsp), %rdi
callq 0x111c10
movq 0x60(%rsp), %rdi
callq 0x11fd20
movq 0x78(%rsp), %rdi
leaq 0x4ef842(%rip), %rsi    # 0x51b051
movl $0x104, %edx            # imm = 0x104
callq 0xe88c0
movl 0x84(%rsp), %eax
addq $0xb8, %rsp
retq
nopl (%rax,%rax)