// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_select.c
// Function: gt_select_runner
static int gt_select_runner(int argc, const char **argv, int parsed_args,
                            void *tool_arguments, GtError *err)
{
  SelectArguments *arguments = tool_arguments;
  GtNodeStream *gff3_in_stream, *select_stream,
               *targetbest_select_stream = NULL, *gff3_out_stream;
  int had_err;
  GtFile *drop_file = NULL;
  GtNodeVisitor *gff3outvis = NULL;
  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);

  /* create a filter stream */
  select_stream = gt_select_stream_new(gff3_in_stream, arguments->seqid,
                                       arguments->source,
                                       &arguments->contain_range,
                                       &arguments->overlap_range,
                                       arguments->strand,
                                       arguments->targetstrand,
                                       arguments->has_CDS,
                                       arguments->max_gene_length,
                                       arguments->max_gene_num,
                                       arguments->min_gene_score,
                                       arguments->max_gene_score,
                                       arguments->min_average_splice_site_prob,
                                       arguments->feature_num,
                                       arguments->filter_files,
                                       arguments->filter_logic,
                                       err);

  if (select_stream) {
    GtSelectStream *fs = (GtSelectStream*) select_stream;

    if (gt_str_length(arguments->dropped_file) > 0) {
      drop_file = gt_file_new(gt_str_get(arguments->dropped_file), "w", err);
      gff3outvis = gt_gff3_visitor_new(drop_file);
      gt_select_stream_set_drophandler(fs, print_to_file_drophandler,
                                       (void*) gff3outvis);
    } else {
      gt_select_stream_set_drophandler(fs, default_drophandler, NULL);
    }

    gt_select_stream_set_single_intron_factor(select_stream,
                                              arguments->single_intron_factor);

    if (arguments->targetbest)
      targetbest_select_stream = gt_targetbest_select_stream_new(select_stream);

    /* create a gff3 output stream */
    gff3_out_stream = gt_gff3_out_stream_new(arguments->targetbest
                                             ? targetbest_select_stream
                                             : select_stream,
                                             arguments->outfp);

    if (arguments->retainids)
      gt_gff3_out_stream_retain_id_attributes((GtGFF3OutStream*)
                                                               gff3_out_stream);

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

    /* free */
    gt_node_stream_delete(gff3_out_stream);
    gt_node_stream_delete(select_stream);
    gt_node_stream_delete(targetbest_select_stream);
  } else {
    had_err = -1;
  }
  gt_file_delete(drop_file);
  gt_node_visitor_delete(gff3outvis);
  gt_node_stream_delete(gff3_in_stream);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movl %edi, %ebx
testq %r8, %r8
je 0x44eb3
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x450b7
testq %r15, %r15
je 0x45089
subl %ebp, %ebx
movslq %ebp, %rax
leaq (%r12,%rax,8), %rsi
movl %ebx, %edi
callq 0xdeebd
movq %rax, %r13
cmpb $0x1, (%r15)
jne 0x44ee7
cmpq $0x0, 0x90(%r15)
je 0x44ee7
movq %r13, %rdi
callq 0xdeb22
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
leaq 0x28(%r15), %rcx
leaq 0x38(%r15), %r8
movl 0x48(%r15), %r9d
movl 0x4c(%r15), %eax
movzbl 0x1(%r15), %edi
movups 0x50(%r15), %xmm3
movsd 0x68(%r15), %xmm0
movsd 0x70(%r15), %xmm1
movsd 0x78(%r15), %xmm2
movq 0x60(%r15), %r10
movq 0x98(%r15), %r11
movq 0xa0(%r15), %rbx
movq %r14, 0x38(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movups %xmm3, 0x10(%rsp)
movl %edi, 0x8(%rsp)
movl %eax, (%rsp)
movq %r13, %rdi
callq 0x11580f
testq %rax, %rax
je 0x44fb0
movq %rax, %r12
movq 0xa8(%r15), %rdi
callq 0xad289
testq %rax, %rax
je 0x44fbd
movq 0xa8(%r15), %rdi
callq 0xad1fa
leaq 0x2ee98d(%rip), %rsi    # 0x33390e
movq %rax, %rdi
movq %r14, %rdx
callq 0x8ce05
movq %rax, 0x48(%rsp)
movq %rax, %rdi
callq 0xe64a1
movq %rax, %rbp
leaq 0x215(%rip), %rsi       # 0x451b8
movq %r12, %rdi
movq %rax, %rdx
callq 0x115987
jmp 0x44fd9
pushq $-0x1
popq %r14
xorl %edi, %edi
xorl %ebp, %ebp
jmp 0x45062
leaq 0x23b(%rip), %rsi       # 0x451ff
movq $0x0, 0x48(%rsp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x115987
xorl %ebp, %ebp
movsd 0x80(%r15), %xmm0
movq %r12, %rdi
callq 0x115955
cmpb $0x1, 0x2(%r15)
movq %r13, 0x50(%rsp)
jne 0x4500f
movq %r12, %rdi
callq 0x127448
testb $0x1, 0x2(%r15)
movq %rax, %rbx
movq %r12, %rdi
cmovneq %rax, %rdi
jmp 0x45014
xorl %ebx, %ebx
movq %r12, %rdi
movq 0x90(%r15), %rsi
callq 0xe07df
movq %rax, %r13
cmpb $0x1, 0x3(%r15)
jne 0x45032
movq %r13, %rdi
callq 0xe088c
movq %r13, %rdi
movq %r14, %rsi
callq 0x102b93
movl %eax, %r14d
movq %r13, %rdi
callq 0x10297b
movq %r12, %rdi
callq 0x10297b
movq %rbx, %rdi
callq 0x10297b
movq 0x50(%rsp), %r13
movq 0x48(%rsp), %rdi
callq 0x8da06
movq %rbp, %rdi
callq 0x10327a
movq %r13, %rdi
callq 0x10297b
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3f2ed8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29ff79(%rip), %rsi    # 0x2e5013
leaq 0x3035b2(%rip), %rdx    # 0x348653
leaq 0x2b2843(%rip), %rcx    # 0x2f78eb
leaq 0x2b20bb(%rip), %r8     # 0x2f716a
movl $0x154, %r9d            # imm = 0x154
jmp 0x450e3
movq 0x3f2eaa(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29ff4b(%rip), %rsi    # 0x2e5013
leaq 0x2a00f0(%rip), %rdx    # 0x2e51bf
leaq 0x2b2815(%rip), %rcx    # 0x2f78eb
leaq 0x2b208d(%rip), %r8     # 0x2f716a
movl $0x153, %r9d            # imm = 0x153
xorl %eax, %eax
callq 0x17a50
callq 0x17390