// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_seq.c
// Function: gt_seq_runner
static int gt_seq_runner(int argc, const char **argv, int parsed_args,
                         void *tool_arguments, GtError *err)
{
  SeqArguments *arguments = tool_arguments;
  GtBioseq *bioseq;
  int arg = parsed_args, had_err = 0;
  gt_error_check(err);
  gt_assert(tool_arguments);

  while (!had_err && arg < argc) {
    /* bioseq construction */
    if (arguments->recreate)
      bioseq = gt_bioseq_new_recreate(argv[arg], err);
    else
      bioseq = gt_bioseq_new(argv[arg], err);
    if (!bioseq)
      had_err = -1;

    /* output */
    if (!had_err && arguments->showfasta)
      gt_bioseq_show_as_fasta(bioseq, arguments->width, arguments->outfp);

    if (!had_err && (arguments->showseqnum != GT_UNDEF_UWORD ||
                     arguments->showseqlength != GT_UNDEF_UWORD ||
                     gt_str_length(arguments->showseqnum_inputfile) > 0))
    {
      GtUword maxseqnum = gt_bioseq_number_of_sequences(bioseq);
      if (arguments->seqnum_from_0)
      {
        gt_assert(maxseqnum > 0);
        maxseqnum--;
      }
      if (arguments->showseqnum != GT_UNDEF_UWORD ||
          arguments->showseqlength != GT_UNDEF_UWORD)
      {
        if ((arguments->showseqnum != GT_UNDEF_UWORD &&
             arguments->showseqnum > maxseqnum) ||
            (arguments->showseqlength != GT_UNDEF_UWORD &&
             arguments->showseqlength > maxseqnum))
        {
          gt_error_set(err, "argument '" GT_WU "' to option '-showseq%s' "
                            "is too large. The largest possible number is '"
                            GT_WU "'",
                     arguments->showseqnum,
                     arguments->showseqnum != GT_UNDEF_UWORD ? "num"
                                                             : "length",
                     maxseqnum);
          had_err = -1;
        }
        if (!had_err) {
          if (arguments->showseqnum != GT_UNDEF_UWORD)
          {
            gt_bioseq_show_sequence_as_fasta(bioseq,
                                             arguments->seqnum_from_0
                                               ? arguments->showseqnum
                                               : arguments->showseqnum - 1,
                                             arguments->width,
                                             arguments->outfp);
          } else
          {
            GtUword seqnum = arguments->seqnum_from_0
                               ? arguments->showseqlength
                               : arguments->showseqlength - 1;
            gt_file_xprintf(arguments->outfp,GT_WU "\n",
                            gt_bioseq_get_sequence_length(bioseq, seqnum));
          }
        }
      } else
      {
        FILE *fpin;

        gt_assert(gt_str_length(arguments->showseqnum_inputfile) > 0);
        if (strcmp(gt_str_get(arguments->showseqnum_inputfile),"-") == 0)
        {
          fpin = stdin;
        } else
        {
          fpin = gt_efopen(gt_str_get(arguments->showseqnum_inputfile),
                           "rb",err);
        }
        if (fpin == NULL)
        {
          had_err = -1;
        } else
        {
          GtWord seqnum_input;
          while (fscanf(fpin,GT_WD,&seqnum_input) == 1)
          {
            if (seqnum_input < 0 ||
                (!arguments->seqnum_from_0 && seqnum_input == 0) ||
                (GtUword) seqnum_input > maxseqnum)
            {
              gt_error_set(err, "sequence number '" GT_WD "' is not in range "
                                "[%d," GT_WU "]",
                                 seqnum_input,
                                 arguments->seqnum_from_0 ? 0 : 1,
                                 maxseqnum);
              had_err = -1;
            }
            if (!had_err)
            {
              gt_bioseq_show_sequence_as_fasta(bioseq,
                                           arguments->seqnum_from_0
                                             ? (GtUword) seqnum_input
                                             : (GtUword) seqnum_input - 1,
                                           arguments->width, arguments->outfp);
            }
          }
          if (strcmp(gt_str_get(arguments->showseqnum_inputfile),"-") == 0)
          {
            fclose(fpin);
          }
        }
      }
    }

    if (!had_err && arguments->gc_content)
      gt_bioseq_show_gc_content(bioseq, arguments->outfp);

    if (!had_err && arguments->stat)
      gt_bioseq_show_stat(bioseq, arguments->outfp);

    if (!had_err && arguments->seqlengthdistri)
      gt_bioseq_show_seqlengthdistri(bioseq, arguments->outfp);

    /* free */
    gt_bioseq_delete(bioseq);

    arg++;
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movl %edi, %r15d
testq %r8, %r8
je 0x45693
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0x45a03
testq %r14, %r14
je 0x459d5
movslq %ebp, %rbx
movslq %r15d, %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movq %r12, 0x8(%rsp)
testl %r13d, %r13d
jne 0x45964
cmpq 0x18(%rsp), %rbx
jge 0x45964
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdi
cmpb $0x1, (%r14)
jne 0x456dc
movq %r12, %rsi
callq 0x5aefb
jmp 0x456e4
movq %r12, %rsi
callq 0x5a868
movq %rax, %rbp
pushq $-0x1
popq %r13
testq %rax, %rax
je 0x45940
cmpb $0x1, 0x1(%r14)
jne 0x4570b
movq 0x18(%r14), %rsi
movq 0x30(%r14), %rdx
movq %rbp, %rdi
callq 0x5bbf4
cmpq $-0x1, 0x8(%r14)
jne 0x4572b
cmpq $-0x1, 0x10(%r14)
jne 0x4572b
movq 0x20(%r14), %rdi
callq 0xad289
testq %rax, %rax
je 0x45904
movq %rbp, %rdi
callq 0x5ba79
movq %rax, %r12
movb 0x5(%r14), %al
cmpb $0x1, %al
jne 0x4574a
testq %r12, %r12
je 0x45976
decq %r12
movq 0x8(%r14), %rdx
cmpq $-0x1, %rdx
je 0x45799
leaq 0x2dfb33(%rip), %rcx    # 0x32528e
cmpq %r12, %rdx
ja 0x457b3
movq 0x10(%r14), %rsi
cmpq $-0x1, %rsi
je 0x45776
leaq 0x2dfb1d(%rip), %rcx    # 0x32528e
cmpq %r12, %rsi
ja 0x457b3
xorb $0x1, %al
movzbl %al, %eax
subq %rax, %rdx
movq 0x18(%r14), %rax
movq 0x30(%r14), %rcx
movq %rbp, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5bcb8
jmp 0x45904
movq 0x10(%r14), %rsi
cmpq $-0x1, %rsi
je 0x457d2
leaq 0x31c093(%rip), %rcx    # 0x36183d
cmpq %r12, %rsi
jbe 0x458b9
movq 0x8(%rsp), %rdi
leaq 0x2b258e(%rip), %rsi    # 0x2f7d4d
movq %r12, %r8
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %r13
jmp 0x45940
movq 0x20(%r14), %rdi
callq 0xad289
testq %rax, %rax
je 0x459a7
movq 0x20(%r14), %rdi
callq 0xad1fa
cmpb $0x2d, (%rax)
jne 0x457fc
cmpb $0x0, 0x1(%rax)
je 0x45955
movq 0x20(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
leaq 0x30028e(%rip), %rsi    # 0x345a9d
movq 0x8(%rsp), %rdx
callq 0x70038
movq %rax, %r15
pushq $-0x1
popq %r13
testq %r15, %r15
je 0x45940
xorl %r13d, %r13d
movq %r15, %rdi
leaq 0x2d6e99(%rip), %rsi    # 0x31c6cf
leaq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x17e10
cmpl $0x1, %eax
jne 0x458e3
movq 0x20(%rsp), %rdx
movzbl 0x5(%r14), %ecx
testq %rdx, %rdx
js 0x45876
movl %ecx, %eax
xorb $0x1, %al
testq %rdx, %rdx
sete %sil
testb %al, %sil
jne 0x45876
cmpq %r12, %rdx
ja 0x45876
testl %r13d, %r13d
jne 0x4582c
jmp 0x45895
xorl $0x1, %ecx
movq 0x8(%rsp), %rdi
leaq 0x2b2554(%rip), %rsi    # 0x2f7dd9
movq %r12, %r8
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %r13
jmp 0x4582c
xorb $0x1, %cl
movzbl %cl, %eax
subq %rax, %rdx
movq 0x18(%r14), %rax
movq 0x30(%r14), %rcx
movq %rbp, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5bcb8
jmp 0x45829
xorb $0x1, %al
movzbl %al, %eax
subq %rax, %rsi
movq 0x30(%r14), %r15
movq %rbp, %rdi
callq 0x5b2f1
movq %r15, %rdi
leaq 0x2ab164(%rip), %rsi    # 0x2f0a3b
movq %rax, %rdx
xorl %eax, %eax
callq 0x8d432
jmp 0x45904
movq 0x20(%r14), %rdi
callq 0xad1fa
cmpb $0x2d, (%rax)
jne 0x458ff
cmpb $0x0, 0x1(%rax)
jne 0x458ff
movq %r15, %rdi
callq 0x177c0
testl %r13d, %r13d
jne 0x45940
cmpb $0x1, 0x2(%r14)
jne 0x45917
movq 0x30(%r14), %rsi
movq %rbp, %rdi
callq 0x5bda5
cmpb $0x1, 0x3(%r14)
jne 0x4592a
movq 0x30(%r14), %rsi
movq %rbp, %rdi
callq 0x5bf3d
xorl %r13d, %r13d
cmpb $0x1, 0x4(%r14)
jne 0x45940
movq 0x30(%r14), %rsi
movq %rbp, %rdi
callq 0x5c031
movq %rbp, %rdi
callq 0x5af87
incq %rbx
movq 0x8(%rsp), %r12
jmp 0x456af
movq 0x3f259c(%rip), %rax    # 0x437ef8
movq (%rax), %r15
jmp 0x4581c
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3f25eb(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29f68c(%rip), %rsi    # 0x2e5013
leaq 0x2b23b1(%rip), %rdx    # 0x2f7d3f
leaq 0x2b239c(%rip), %rcx    # 0x2f7d31
leaq 0x2b1f99(%rip), %r8     # 0x2f7935
movl $0xdf, %r9d
jmp 0x45a2f
movq 0x3f25ba(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29f65b(%rip), %rsi    # 0x2e5013
leaq 0x2b23e7(%rip), %rdx    # 0x2f7da6
leaq 0x2b236b(%rip), %rcx    # 0x2f7d31
leaq 0x2b1f68(%rip), %r8     # 0x2f7935
movl $0x109, %r9d            # imm = 0x109
jmp 0x45a2f
movq 0x3f258c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29f62d(%rip), %rsi    # 0x2e5013
leaq 0x2ac81d(%rip), %rdx    # 0x2f220a
leaq 0x2b233d(%rip), %rcx    # 0x2f7d31
leaq 0x2b1f3a(%rip), %r8     # 0x2f7935
movl $0xc9, %r9d
jmp 0x45a2f
movq 0x3f255e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29f5ff(%rip), %rsi    # 0x2e5013
leaq 0x29f7a4(%rip), %rdx    # 0x2e51bf
leaq 0x2b230f(%rip), %rcx    # 0x2f7d31
leaq 0x2b1f0c(%rip), %r8     # 0x2f7935
movl $0xc8, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop