// File: /workspace/github_c_makefile_star2_O0/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 %r12
pushq %rbx
subq $0xc0, %rsp
movl %edi, 0xbc(%rsp)
movq %rsi, 0xb0(%rsp)
movl %edx, 0xac(%rsp)
movq %rcx, 0xa0(%rsp)
movq %r8, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x60dc6
movq 0x98(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x60d8e
jmp 0x60dc6
movq 0x5db20b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4b5274(%rip), %rsi    # 0x516013
leaq 0x4b5419(%rip), %rdx    # 0x5161bf
leaq 0x4c7c29(%rip), %rcx    # 0x5289d6
leaq 0x4c74a1(%rip), %r8     # 0x528255
movl $0x153, %r9d            # imm = 0x153
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x60dc8
jmp 0x60dca
cmpq $0x0, 0x90(%rsp)
jne 0x60e0d
movq 0x5db1c4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4b522d(%rip), %rsi    # 0x516013
leaq 0x519d72(%rip), %rdx    # 0x57ab5f
leaq 0x4c7be2(%rip), %rcx    # 0x5289d6
leaq 0x4c745a(%rip), %r8     # 0x528255
movl $0x154, %r9d            # imm = 0x154
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x60e0f
movl 0xbc(%rsp), %edi
subl 0xac(%rsp), %edi
movq 0xb0(%rsp), %rsi
movslq 0xac(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1746b0
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rax
testb $0x1, (%rax)
je 0x60e6d
movq 0x90(%rsp), %rax
cmpq $0x0, 0x90(%rax)
je 0x60e6d
movq 0x88(%rsp), %rdi
callq 0x1741e0
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x90(%rsp), %rcx
addq $0x28, %rcx
movq 0x90(%rsp), %r8
addq $0x38, %r8
movq 0x90(%rsp), %rax
movl 0x48(%rax), %r9d
movq 0x90(%rsp), %rax
movl 0x4c(%rax), %r12d
movq 0x90(%rsp), %rax
movb 0x1(%rax), %bpl
movq 0x90(%rsp), %rax
movq 0x50(%rax), %r15
movq 0x90(%rsp), %rax
movq 0x58(%rax), %r14
movq 0x90(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x90(%rsp), %rax
movsd 0x70(%rax), %xmm1
movq 0x90(%rsp), %rax
movsd 0x78(%rax), %xmm2
movq 0x90(%rsp), %rax
movq 0x60(%rax), %rbx
movq 0x90(%rsp), %rax
movq 0x98(%rax), %r11
movq 0x90(%rsp), %rax
movq 0xa0(%rax), %r10
movq 0x98(%rsp), %rax
andb $0x1, %bpl
movl %r12d, (%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
callq 0x1d2ab0
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x610ea
movq 0x80(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x61002
movq 0x90(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x98(%rsp), %rdx
leaq 0x504ef4(%rip), %rsi    # 0x565ec5
callq 0xdd320
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x180280
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rdx
leaq 0x225(%rip), %rsi       # 0x61220
callq 0x1d2d20
jmp 0x61017
movq 0x50(%rsp), %rdi
leaq 0x292(%rip), %rsi       # 0x612a0
xorl %eax, %eax
movl %eax, %edx
callq 0x1d2d20
movq 0x80(%rsp), %rdi
movq 0x90(%rsp), %rax
movsd 0x80(%rax), %xmm0
callq 0x1d2ce0
movq 0x90(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x61054
movq 0x80(%rsp), %rdi
callq 0x1ee340
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x6106e
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x6107b
movq 0x80(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x90(%rsp), %rax
movq 0x90(%rax), %rsi
callq 0x176d50
movq %rax, 0x70(%rsp)
movq 0x90(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x610b1
movq 0x70(%rsp), %rdi
callq 0x176e50
movq 0x70(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x1b1f90
movl %eax, 0x6c(%rsp)
movq 0x70(%rsp), %rdi
callq 0x1b1cb0
movq 0x80(%rsp), %rdi
callq 0x1b1cb0
movq 0x78(%rsp), %rdi
callq 0x1b1cb0
jmp 0x610f2
movl $0xffffffff, 0x6c(%rsp) # imm = 0xFFFFFFFF
movq 0x60(%rsp), %rdi
callq 0xde430
movq 0x58(%rsp), %rdi
callq 0x1b29d0
movq 0x88(%rsp), %rdi
callq 0x1b1cb0
movl 0x6c(%rsp), %eax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)