// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_gff3.c
// Function: gt_gff3_runner
static int gt_gff3_runner(int argc, const char **argv, int parsed_args,
                          void *tool_arguments, GtError *err)
{
  GFF3Arguments *arguments = tool_arguments;
  GtTypeChecker *type_checker = NULL;
  GtXRFChecker *xrf_checker = NULL;
  GtNodeStream *gff3_in_stream,
               *sort_stream = NULL,
               *load_stream = NULL,
               *merge_feature_stream = NULL,
               *add_introns_stream = NULL,
               *set_source_stream = NULL,
               *gff3_out_stream = NULL,
               *last_stream;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  /* create a gff3 input stream */
  gff3_in_stream = gt_gff3_in_stream_new_unsorted(argc - parsed_args,
                                                  argv + parsed_args);
  if (arguments->verbose && arguments->outfp)
    gt_gff3_in_stream_show_progress_bar((GtGFF3InStream*) gff3_in_stream);
  if (arguments->checkids)
    gt_gff3_in_stream_check_id_attributes((GtGFF3InStream*) gff3_in_stream);
  if (!arguments->addids)
    gt_gff3_in_stream_disable_add_ids(gff3_in_stream);

  last_stream = gff3_in_stream;

  /* set different type checker if necessary */
  if (gt_typecheck_info_option_used(arguments->tci)) {
    type_checker = gt_typecheck_info_create_type_checker(arguments->tci, err);
    if (!type_checker)
      had_err = -1;
    if (!had_err)
      gt_gff3_in_stream_set_type_checker(gff3_in_stream, type_checker);
  }

  /* set XRF checker if necessary */
  if (gt_xrfcheck_info_option_used(arguments->xci)) {
    xrf_checker = gt_xrfcheck_info_create_xrf_checker(arguments->xci, err);
    if (!xrf_checker)
      had_err = -1;
    if (!had_err)
      gt_gff3_in_stream_set_xrf_checker(gff3_in_stream, xrf_checker);
  }

  /* set offset (if necessary) */
  if (!had_err && arguments->offset != GT_UNDEF_WORD)
    gt_gff3_in_stream_set_offset(gff3_in_stream, arguments->offset);

  /* set offsetfile (if necessary) */
  if (!had_err && gt_str_length(arguments->offsetfile)) {
    had_err = gt_gff3_in_stream_set_offsetfile(gff3_in_stream,
                                               arguments->offsetfile, err);
  }

  /* enable strict mode (if necessary) */
  if (!had_err && arguments->strict)
    gt_gff3_in_stream_enable_strict_mode((GtGFF3InStream*) gff3_in_stream);
  /* enable tidy mode (if necessary) */
  if (!had_err && arguments->tidy)
    gt_gff3_in_stream_enable_tidy_mode((GtGFF3InStream*) gff3_in_stream);

  if (!had_err && arguments->fixboundaries)
    gt_gff3_in_stream_fix_region_boundaries((GtGFF3InStream*) gff3_in_stream);

  /* create load stream (if necessary) */
  if (!had_err && arguments->load) {
    load_stream = gt_load_stream_new(last_stream);
    last_stream = load_stream;
  }

  /* create sort stream (if necessary) */
  if (!had_err && (arguments->sort || arguments->sortlines ||
                   arguments->sortnum)) {
    sort_stream = gt_sort_stream_new(last_stream);
    last_stream = sort_stream;
  }

  /* create merge feature stream (if necessary) */
  if (!had_err && arguments->mergefeat) {
    gt_assert(sort_stream);
    merge_feature_stream = gt_merge_feature_stream_new(sort_stream);
    last_stream = merge_feature_stream;
  }

  /* create addintrons stream (if necessary) */
  if (!had_err && arguments->addintrons) {
    gt_assert(last_stream);
    add_introns_stream = gt_add_introns_stream_new(last_stream);
    last_stream = add_introns_stream;
  }

  /* create setsource stream (if necessary) */
  if (!had_err && gt_str_length(arguments->newsource) > 0) {
    gt_assert(last_stream);
    GtNodeVisitor *ssv = gt_set_source_visitor_new(arguments->newsource);
    set_source_stream = gt_visitor_stream_new(last_stream, ssv);
    last_stream = set_source_stream;
  }

  /* create gff3 output stream */
  if (!had_err && arguments->show) {
    if (arguments->sortlines) {
      gff3_out_stream = gt_gff3_linesorted_out_stream_new(last_stream,
                                                          arguments->outfp);
      gt_gff3_linesorted_out_stream_set_fasta_width(
                                   (GtGFF3LinesortedOutStream*) gff3_out_stream,
                                   arguments->width);
      if (arguments->retainids)
        gt_gff3_linesorted_out_stream_retain_id_attributes(
                                  (GtGFF3LinesortedOutStream*) gff3_out_stream);
    } else if (arguments->sortnum) {
      gff3_out_stream = gt_gff3_numsorted_out_stream_new(last_stream,
                                                          arguments->outfp);
      gt_gff3_numsorted_out_stream_set_fasta_width(
                                   (GtGFF3NumsortedOutStream*) gff3_out_stream,
                                   arguments->width);
      if (arguments->retainids)
        gt_gff3_numsorted_out_stream_retain_id_attributes(
                                  (GtGFF3NumsortedOutStream*) gff3_out_stream);
    } else {
      gff3_out_stream = gt_gff3_out_stream_new(last_stream, arguments->outfp);
      gt_gff3_out_stream_set_fasta_width((GtGFF3OutStream*) gff3_out_stream,
                                         arguments->width);
      if (arguments->retainids)
        gt_gff3_out_stream_retain_id_attributes((GtGFF3OutStream*)
                                                               gff3_out_stream);
    }
    gt_assert(gff3_out_stream);
    last_stream = gff3_out_stream;
  }

  /* pull the features through the stream and free them afterwards */
  if (!had_err)
    had_err = gt_node_stream_pull(last_stream, err);

  /* free */
  gt_node_stream_delete(gff3_out_stream);
  gt_node_stream_delete(sort_stream);
  gt_node_stream_delete(load_stream);
  gt_node_stream_delete(merge_feature_stream);
  gt_node_stream_delete(add_introns_stream);
  gt_node_stream_delete(set_source_stream);
  gt_node_stream_delete(gff3_in_stream);
  gt_type_checker_delete(type_checker);
  gt_xrf_checker_delete(xrf_checker);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %ebx
testq %r8, %r8
je 0xacb68
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0xacf06
testq %r12, %r12
je 0xacf01
subl %ebp, %ebx
movslq %ebp, %rax
leaq (%r14,%rax,8), %rsi
movl %ebx, %edi
callq 0x14d00b
movq %rax, %r13
cmpb $0x1, 0x9(%r12)
jne 0xacb9c
cmpq $0x0, 0x48(%r12)
je 0xacb9c
movq %r13, %rdi
callq 0x14ce62
cmpb $0x1, 0x5(%r12)
jne 0xacbac
movq %r13, %rdi
callq 0x14ce4e
cmpb $0x0, 0x6(%r12)
jne 0xacbbc
movq %r13, %rdi
callq 0x14cf7f
movq 0x30(%r12), %rdi
callq 0x18bace
movb $0x1, %bl
testb %al, %al
je 0xacbf3
movq 0x30(%r12), %rdi
movq %r15, %rsi
callq 0x18baf7
xorl %r14d, %r14d
testq %rax, %rax
movq %rax, 0x18(%rsp)
je 0xacc01
movq %r13, %rdi
movq %rax, %rsi
callq 0x14ce76
jmp 0xacc09
xorl %r14d, %r14d
movq $0x0, 0x18(%rsp)
jmp 0xacc09
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq 0x38(%r12), %rdi
callq 0x18e712
testb %al, %al
je 0xacc4c
movq 0x38(%r12), %rdi
movq %r15, %rsi
callq 0x18e72a
movq %rax, %rsi
testq %rax, %rax
sete %al
xorb $0x1, %bl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
orb %al, %bl
movq %rsi, 0x10(%rsp)
jne 0xacc55
movq %r13, %rdi
callq 0x14cead
xorl %r14d, %r14d
jmp 0xacc55
movq $0x0, 0x10(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %r14d, %r14d
jne 0xacc99
movq 0x10(%r12), %rsi
movq %rsi, %rax
negq %rax
jo 0xacc74
movq %r13, %rdi
callq 0x14cf0c
movq 0x18(%r12), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xacc97
movq 0x18(%r12), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x14cf43
movl %eax, %ebp
jmp 0xacc99
xorl %ebp, %ebp
testl %ebp, %ebp
movq %r15, 0x20(%rsp)
jne 0xaccea
cmpb $0x1, 0xa(%r12)
jne 0xaccb2
movq %r13, %rdi
callq 0x14cfac
cmpb $0x1, 0xb(%r12)
jne 0xaccc2
movq %r13, %rdi
callq 0x14cfc0
cmpb $0x1, 0xd(%r12)
jne 0xaccd2
movq %r13, %rdi
callq 0x14cfe1
cmpb $0x1, 0x3(%r12)
jne 0xaccea
movq %r13, %rdi
callq 0x163e16
movq %rax, %rbx
movq %rax, %r15
jmp 0xaccef
xorl %ebx, %ebx
movq %r13, %r15
testl %ebp, %ebp
je 0xaccf8
xorl %r14d, %r14d
jmp 0xacd1d
cmpb $0x0, (%r12)
jne 0xacd0f
cmpb $0x0, 0x1(%r12)
jne 0xacd0f
cmpb $0x1, 0x2(%r12)
jne 0xaccf3
movq %r15, %rdi
callq 0x17e1d7
movq %rax, %r14
movq %rax, %r15
testl %ebp, %ebp
jne 0xacd44
cmpb $0x1, 0x7(%r12)
jne 0xacd44
testq %r14, %r14
je 0xacf10
movq %r14, %rdi
callq 0x168f88
movq %rax, %r15
movq %rax, 0x8(%rsp)
jmp 0xacd4d
movq $0x0, 0x8(%rsp)
testl %ebp, %ebp
jne 0xacd73
cmpb $0x1, 0x8(%r12)
jne 0xacd73
testq %r15, %r15
je 0xacf15
movq %r15, %rdi
callq 0x126660
movq %rax, %r15
movq %rax, (%rsp)
jmp 0xacd7b
movq $0x0, (%rsp)
testl %ebp, %ebp
movq %r14, 0x30(%rsp)
je 0xacd89
xorl %r14d, %r14d
jmp 0xacdbc
movq 0x20(%r12), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xacd84
testq %r15, %r15
je 0xacf0b
movq 0x20(%r12), %rdi
callq 0x17c980
movq %r15, %rdi
movq %rax, %rsi
callq 0x18c917
movq %rax, %r14
movq %rax, %r15
testl %ebp, %ebp
movq %r13, 0x28(%rsp)
jne 0xace12
cmpb $0x1, 0xc(%r12)
jne 0xace12
cmpb $0x1, 0x1(%r12)
jne 0xace8e
movq %rbx, %r13
movq 0x48(%r12), %rsi
movq %r15, %rdi
callq 0x14db31
movq %rax, %rbx
movq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x14dbd8
cmpb $0x1, 0x4(%r12)
jne 0xacef0
movq %rbx, %rdi
callq 0x14dbec
jmp 0xacef0
movq %rbx, %r13
xorl %ebx, %ebx
testl %ebp, %ebp
jne 0xace2a
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x16adca
movl %eax, %ebp
movq %rbx, %rdi
callq 0x16ac6e
movq 0x30(%rsp), %rdi
callq 0x16ac6e
movq %r13, %rdi
callq 0x16ac6e
movq 0x8(%rsp), %rdi
callq 0x16ac6e
movq (%rsp), %rdi
callq 0x16ac6e
movq %r14, %rdi
callq 0x16ac6e
movq 0x28(%rsp), %rdi
callq 0x16ac6e
movq 0x18(%rsp), %rdi
callq 0x18b883
movq 0x10(%rsp), %rdi
callq 0x18e605
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %r13
movq 0x48(%r12), %rsi
cmpb $0x1, 0x2(%r12)
jne 0xacec8
movq %r15, %rdi
callq 0x14e19f
movq %rax, %rbx
movq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x14e213
cmpb $0x1, 0x4(%r12)
jne 0xacef0
movq %rbx, %rdi
callq 0x14e227
jmp 0xacef0
movq %r15, %rdi
callq 0x14e310
movq %rax, %rbx
movq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x14e378
cmpb $0x1, 0x4(%r12)
jne 0xacef0
movq %rbx, %rdi
callq 0x14e38c
movq %rbx, %r15
testq %rbx, %rbx
jne 0xace17
callq 0x1b835
callq 0x1b8e0
callq 0x1b7c3
callq 0x1b7fc
callq 0x1b8a7
callq 0x1b86e
nop