// File: /workspace/github_c_makefile_star2_O1/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, 0x20(%rsp)
movl %edi, %r15d
testq %r8, %r8
je 0xc382b
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0xc3b40
testq %r14, %r14
je 0xc3b3b
xorl %r13d, %r13d
cmpl %r15d, %ebp
jge 0xc3b1f
movslq %ebp, %rbx
movslq %r15d, %rax
movq %rax, 0x18(%rsp)
movq %r12, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rdi
cmpb $0x1, (%r14)
jne 0xc3869
movq %r12, %rsi
callq 0xd6ecd
jmp 0xc3871
movq %r12, %rsi
callq 0xd69c0
movq %rax, %r12
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0xc3ac1
cmpb $0x1, 0x1(%r14)
jne 0xc389a
movq 0x18(%r14), %rsi
movq 0x30(%r14), %rdx
movq %r12, %rdi
callq 0xd7680
cmpq $-0x1, 0x8(%r14)
jne 0xc38ba
cmpq $-0x1, 0x10(%r14)
jne 0xc38ba
movq 0x20(%r14), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xc395a
movq %r12, %rdi
callq 0xd75d2
movq %rax, %rbp
movb 0x5(%r14), %al
cmpb $0x1, %al
jne 0xc38d9
testq %rbp, %rbp
je 0xc3b31
decq %rbp
movq 0x8(%r14), %rdx
cmpq $-0x1, %rdx
jne 0xc38ea
cmpq $-0x1, 0x10(%r14)
je 0xc3962
cmpq $-0x1, %rdx
je 0xc38f5
cmpq %rbp, %rdx
ja 0xc3904
movq 0x10(%r14), %rsi
cmpq $-0x1, %rsi
je 0xc3935
cmpq %rbp, %rsi
jbe 0xc3935
cmpq $-0x1, %rdx
leaq 0x2ca937(%rip), %rcx    # 0x38e246
leaq 0x307243(%rip), %rax    # 0x3cab59
cmoveq %rax, %rcx
movq 0x8(%rsp), %rdi
leaq 0x29d46a(%rip), %rsi    # 0x360d90
movq %rbp, %r8
xorl %eax, %eax
callq 0x1019cf
jmp 0xc3ac1
movzbl %al, %eax
decq %rax
cmpq $-0x1, %rdx
je 0xc39b2
addq %rax, %rdx
movq 0x18(%r14), %rax
movq 0x30(%r14), %rcx
movq %r12, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xd7723
xorl %r13d, %r13d
jmp 0xc3ac1
movq 0x20(%r14), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xc3b36
movq 0x20(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x30db4b(%rip), %rsi    # 0x3d14d2
callq 0x17a40
testl %eax, %eax
je 0xc39dd
movq 0x20(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x2eb31c(%rip), %rsi    # 0x3aecbf
movq 0x8(%rsp), %rdx
callq 0xebb68
movq %rax, %r15
jmp 0xc39e7
addq %rax, %rsi
movq 0x30(%r14), %r15
movq %r12, %rdi
callq 0xd71ae
xorl %r13d, %r13d
movq %r15, %rdi
leaq 0x296095(%rip), %rsi    # 0x359a63
movq %rax, %rdx
xorl %eax, %eax
callq 0x103d21
jmp 0xc3ac1
movq 0x400544(%rip), %rax    # 0x4c3f28
movq (%rax), %r15
testq %r15, %r15
je 0xc3ac1
xorl %r13d, %r13d
movq %r15, %rdi
leaq 0x2c1c37(%rip), %rsi    # 0x385634
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x17ea0
cmpl $0x1, %eax
jne 0xc3a9d
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
js 0xc3a34
movb 0x5(%r14), %al
xorb $0x1, %al
testq %rdx, %rdx
sete %cl
testb %al, %cl
jne 0xc3a34
cmpq %rbp, %rdx
jbe 0xc3a58
movzbl 0x5(%r14), %ecx
xorl $0x1, %ecx
movq 0x8(%rsp), %rdi
leaq 0x29d3d4(%rip), %rsi    # 0x360e1c
movq %rbp, %r8
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %r13d, %r13d
jne 0xc3a7e
movzbl 0x5(%r14), %eax
movq 0x10(%rsp), %rsi
xorq $0x1, %rax
subq %rax, %rsi
movq 0x18(%r14), %rdx
movq 0x30(%r14), %rcx
movq %r12, %rdi
callq 0xd7723
movq %r15, %rdi
leaq 0x2c1bac(%rip), %rsi    # 0x385634
leaq 0x10(%rsp), %rdx
xorl %eax, %eax
callq 0x17ea0
cmpl $0x1, %eax
je 0xc3a15
movq 0x20(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
leaq 0x30da22(%rip), %rsi    # 0x3d14d2
callq 0x17a40
testl %eax, %eax
jne 0xc3ac1
movq %r15, %rdi
callq 0x17800
testl %r13d, %r13d
jne 0xc3aff
cmpb $0x1, 0x2(%r14)
jne 0xc3ad9
movq 0x30(%r14), %rsi
movq %r12, %rdi
callq 0xd77b6
cmpb $0x1, 0x3(%r14)
jne 0xc3aec
movq 0x30(%r14), %rsi
movq %r12, %rdi
callq 0xd78ef
cmpb $0x1, 0x4(%r14)
jne 0xc3aff
movq 0x30(%r14), %rsi
movq %r12, %rdi
callq 0xd79b8
movq %r12, %rdi
callq 0xd6f28
testl %r13d, %r13d
jne 0xc3b1f
incq %rbx
cmpq 0x18(%rsp), %rbx
movq 0x8(%rsp), %r12
jl 0xc3850
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1ef62
callq 0x1ef29
callq 0x1ef9b
callq 0x1eef0
nopl (%rax)