// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %r8, %r15
movq %rcx, %r13
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %ebx
testq %r8, %r8
je 0x2d10d
movq %r15, %rdi
callq 0x89eb7
testb %al, %al
jne 0x2d4f1
testq %r13, %r13
je 0x2d4c0
subl %ebp, %ebx
movslq %ebp, %rax
leaq (%r14,%rax,8), %rsi
movl %ebx, %edi
callq 0xdeebd
movq %rax, %rbx
cmpb $0x1, 0x9(%r13)
jne 0x2d13f
cmpq $0x0, 0x48(%r13)
je 0x2d13f
movq %rbx, %rdi
callq 0xdeb22
cmpb $0x1, 0x5(%r13)
jne 0x2d14e
movq %rbx, %rdi
callq 0xdeadd
cmpb $0x0, 0x6(%r13)
jne 0x2d15d
movq %rbx, %rdi
callq 0xded65
movq 0x30(%r13), %rdi
callq 0x12ac14
movb $0x1, %bpl
testb %al, %al
je 0x2d192
movq 0x30(%r13), %rdi
movq %r15, %rsi
callq 0x12ac6e
testq %rax, %rax
je 0x2d190
movq %rbx, %rdi
movq %rax, 0x8(%rsp)
movq %rax, %rsi
callq 0xdeb67
jmp 0x2d19b
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq 0x38(%r13), %rdi
callq 0x12e504
pushq $-0x1
popq %r14
testb %al, %al
movq %rbx, 0x28(%rsp)
je 0x2d1e7
movq 0x38(%r13), %rdi
movq %r15, %rsi
callq 0x12e54d
testq %rax, %rax
sete %cl
xorb $0x1, %bpl
orb %cl, %bpl
movq %rax, 0x20(%rsp)
jne 0x2d2ad
movq %r15, 0x18(%rsp)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xdebcf
jmp 0x2d224
movl %r14d, 0x4(%rsp)
movq %r15, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, %edi
movl $0x0, %r15d
movl $0x0, %r14d
movl $0x0, %ebx
movl $0x0, %r12d
testb %bpl, %bpl
movl $0x0, %ebp
je 0x2d462
movq 0x10(%r13), %rsi
movq %rsi, %rax
negq %rax
movq 0x28(%rsp), %r12
jo 0x2d23d
movq %r12, %rdi
callq 0xdec90
movq 0x18(%r13), %rdi
callq 0xad289
testq %rax, %rax
movq 0x18(%rsp), %r15
je 0x2d269
movq 0x18(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0xdecf8
testl %eax, %eax
je 0x2d269
movl %eax, 0x4(%rsp)
jmp 0x2d2b2
cmpb $0x1, 0xa(%r13)
jne 0x2d278
movq %r12, %rdi
callq 0xdedc5
cmpb $0x1, 0xb(%r13)
jne 0x2d287
movq %r12, %rdi
callq 0xdee0c
cmpb $0x1, 0xd(%r13)
jne 0x2d296
movq %r12, %rdi
callq 0xdee60
cmpb $0x1, 0x3(%r13)
jne 0x2d2c6
movq %r12, %rdi
callq 0xf9c88
movq %rax, %rbp
movq %rax, %r12
jmp 0x2d2c8
movl %r14d, 0x4(%rsp)
xorl %edi, %edi
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x2d462
xorl %ebp, %ebp
cmpb $0x0, (%r13)
jne 0x2d2dd
cmpb $0x0, 0x1(%r13)
jne 0x2d2dd
cmpb $0x1, 0x2(%r13)
jne 0x2d310
movq %r12, %rdi
callq 0x11a5d8
movq %rax, %rbx
cmpb $0x0, 0x7(%r13)
je 0x2d308
testq %rbx, %rbx
je 0x2d553
movq %rbx, %rdi
callq 0x100618
movq %rax, %r14
movq %rax, %r12
jmp 0x2d320
xorl %r14d, %r14d
movq %rbx, %r12
jmp 0x2d320
cmpb $0x0, 0x7(%r13)
jne 0x2d553
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpb $0x1, 0x8(%r13)
jne 0x2d342
testq %r12, %r12
je 0x2d581
movq %r12, %rdi
callq 0xb46bc
movq %rax, %r12
movq %rax, 0x10(%rsp)
jmp 0x2d34b
movq $0x0, 0x10(%rsp)
movq 0x20(%r13), %rdi
callq 0xad289
testq %rax, %rax
je 0x2d37b
testq %r12, %r12
je 0x2d522
movq 0x20(%r13), %rdi
callq 0x1189b4
movq %r12, %rdi
movq %rax, %rsi
callq 0x12bf59
movq %rax, %r12
jmp 0x2d37d
xorl %eax, %eax
cmpb $0x1, 0xc(%r13)
movq %rbp, 0x40(%rsp)
movq %r14, 0x38(%rsp)
movq %rax, 0x30(%rsp)
jne 0x2d3c9
cmpb $0x1, 0x1(%r13)
jne 0x2d3d1
movq %rbx, %r14
movq 0x48(%r13), %rsi
movq %r12, %rdi
callq 0xdfd80
movq %rax, %rbx
movq 0x28(%r13), %rsi
movq %rax, %rdi
callq 0xdfe53
cmpb $0x1, 0x4(%r13)
jne 0x2d42d
movq %rbx, %rdi
callq 0xdfe9a
jmp 0x2d42d
movq %rbx, %r14
xorl %r13d, %r13d
jmp 0x2d43c
movq %rbx, %r14
movq 0x48(%r13), %rsi
cmpb $0x1, 0x2(%r13)
jne 0x2d407
movq %r12, %rdi
callq 0xe05e1
movq %rax, %rbx
movq 0x28(%r13), %rsi
movq %rax, %rdi
callq 0xe0650
cmpb $0x1, 0x4(%r13)
jne 0x2d42d
movq %rbx, %rdi
callq 0xe0695
jmp 0x2d42d
movq %r12, %rdi
callq 0xe07df
movq %rax, %rbx
movq 0x28(%r13), %rsi
movq %rax, %rdi
callq 0xe0847
cmpb $0x1, 0x4(%r13)
jne 0x2d42d
movq %rbx, %rdi
callq 0xe088c
movq %rbx, %r12
movq %rbx, %r13
testq %rbx, %rbx
je 0x2d5af
movq %r12, %rdi
movq %r15, %rsi
callq 0x102b93
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rbp
movq 0x38(%rsp), %rbx
movq 0x10(%rsp), %r15
movq 0x30(%rsp), %r12
movq %r13, %rdi
callq 0x10297b
movq %r14, %rdi
callq 0x10297b
movq %rbp, %rdi
callq 0x10297b
movq %rbx, %rdi
callq 0x10297b
movq %r15, %rdi
callq 0x10297b
movq %r12, %rdi
callq 0x10297b
movq 0x28(%rsp), %rdi
callq 0x10297b
movq 0x8(%rsp), %rdi
callq 0x12a832
movq 0x20(%rsp), %rdi
callq 0x12e3a7
movl 0x4(%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40aaa1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7b42(%rip), %rsi    # 0x2e5013
leaq 0x31b17b(%rip), %rdx    # 0x348653
leaq 0x2c0a9e(%rip), %rcx    # 0x2edf7d
leaq 0x2c0462(%rip), %r8     # 0x2ed948
movl $0x107, %r9d            # imm = 0x107
jmp 0x2d5db
movq 0x40aa70(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7b11(%rip), %rsi    # 0x2e5013
leaq 0x2b7cb6(%rip), %rdx    # 0x2e51bf
leaq 0x2c0a6d(%rip), %rcx    # 0x2edf7d
leaq 0x2c0431(%rip), %r8     # 0x2ed948
movl $0x106, %r9d            # imm = 0x106
jmp 0x2d5db
movq 0x40aa3f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7ae0(%rip), %rsi    # 0x2e5013
leaq 0x2c0a5e(%rip), %rdx    # 0x2edf98
leaq 0x2c0a3c(%rip), %rcx    # 0x2edf7d
leaq 0x2c0400(%rip), %r8     # 0x2ed948
movl $0x158, %r9d            # imm = 0x158
jmp 0x2d5db
movq 0x40aa0e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7aaf(%rip), %rsi    # 0x2e5013
leaq 0x2c0a21(%rip), %rdx    # 0x2edf8c
leaq 0x2c0a0b(%rip), %rcx    # 0x2edf7d
leaq 0x2c03cf(%rip), %r8     # 0x2ed948
movl $0x14a, %r9d            # imm = 0x14A
jmp 0x2d5db
movq 0x40a9e0(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7a81(%rip), %rsi    # 0x2e5013
leaq 0x2c09ff(%rip), %rdx    # 0x2edf98
leaq 0x2c09dd(%rip), %rcx    # 0x2edf7d
leaq 0x2c03a1(%rip), %r8     # 0x2ed948
movl $0x151, %r9d            # imm = 0x151
jmp 0x2d5db
movq 0x40a9b2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b7a53(%rip), %rsi    # 0x2e5013
leaq 0x2c09dd(%rip), %rdx    # 0x2edfa4
leaq 0x2c09af(%rip), %rcx    # 0x2edf7d
leaq 0x2c0373(%rip), %r8     # 0x2ed948
movl $0x17a, %r9d            # imm = 0x17A
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop