// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/select_visitor.c
// Function: gt_select_visitor_new
GtNodeVisitor* gt_select_visitor_new(GtStr *seqid,
                                     GtStr *source,
                                     const GtRange *contain_range,
                                     const GtRange *overlap_range,
                                     GtStrand strand, GtStrand targetstrand,
                                     bool has_CDS,
                                     GtUword max_gene_length,
                                     GtUword max_gene_num,
                                     double min_gene_score,
                                     double max_gene_score,
                                     double min_average_splice_site_prob,
                                     GtUword feature_num,
                                     GtStrArray *select_files,
                                     GtStr *select_logic,
                                     GtError *err)
{
  GtNodeVisitor *nv = gt_node_visitor_create(gt_select_visitor_class());
  GtSelectVisitor *select_visitor = select_visitor_cast(nv);
  select_visitor->node_buffer = gt_queue_new();
  select_visitor->seqid = gt_str_ref(seqid);
  select_visitor->source = gt_str_ref(source);
  if (contain_range)
    select_visitor->contain_range = *contain_range;
  else {
    select_visitor->contain_range.start = GT_UNDEF_UWORD;
    select_visitor->contain_range.end   = GT_UNDEF_UWORD;
  }
  if (overlap_range)
    select_visitor->overlap_range = *overlap_range;
  else {
    select_visitor->overlap_range.start = GT_UNDEF_UWORD;
    select_visitor->overlap_range.end   = GT_UNDEF_UWORD;
  }
  select_visitor->strand = strand;
  select_visitor->targetstrand = targetstrand;
  select_visitor->has_CDS = has_CDS;
  select_visitor->max_gene_length = max_gene_length;
  select_visitor->gene_num = 0;
  select_visitor->max_gene_num = max_gene_num;
  select_visitor->min_gene_score = min_gene_score;
  select_visitor->max_gene_score = max_gene_score;
  select_visitor->min_average_splice_site_prob = min_average_splice_site_prob;
  select_visitor->single_intron_factor = 1.0;
  select_visitor->feature_num = feature_num;
  select_visitor->select_files = select_files;
  select_visitor->is_lua = false;

  if (gt_str_array_size(select_visitor->select_files) > 0) {
    int i;
    select_visitor->is_lua = true;
    select_visitor->script_filters = gt_array_new(sizeof (GtScriptFilter*));
    for (i = 0; i < gt_str_array_size(select_visitor->select_files); i++) {
      GtScriptFilter *sf;
      sf = gt_script_filter_new_unsafe(
                                  gt_str_array_get(select_visitor->select_files,
                                                   i),
                                err);
      if (!sf) {
        gt_node_visitor_delete(nv);
        return NULL;
        break;
      } else {
        gt_array_add(select_visitor->script_filters, sf);
      }
    }
  }
  if (strcmp(gt_str_get(select_logic), "AND") == 0) {
    select_visitor->select_logic = GT_SELECT_AND;
  } else {
    select_visitor->select_logic = GT_SELECT_OR;
  }
  return nv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movq %xmm0, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
movl %r8d, %r15d
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
callq 0x172140
movq %rax, %rdi
callq 0x163080
movq %rax, %r14
callq 0x172140
movq %rax, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rsi
callq 0x1630b1
movq %rax, %r14
callq 0x10d640
movq %rax, 0x10(%r14)
movq %rbp, %rdi
callq 0x11b1f3
movq %rax, 0x18(%r14)
movq %rbx, %rdi
callq 0x11b1f3
movq %rax, 0x20(%r14)
leaq 0x28(%r14), %rax
testq %r13, %r13
je 0x1729fc
movdqu (%r13), %xmm0
jmp 0x172a00
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0x78(%rsp), %rdx
movb 0x70(%rsp), %sil
movq %r14, %r8
addq $0x38, %r8
testq %r12, %r12
je 0x172a3a
movdqu (%r12), %xmm0
jmp 0x172a3e
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%r8)
movl %r15d, 0x48(%r14)
movl 0x14(%rsp), %r8d
movl %r8d, 0x4c(%r14)
movb %sil, 0x50(%r14)
movq %rdx, 0x58(%r14)
movq $0x0, 0x60(%r14)
movq %rcx, 0x68(%r14)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x80(%r14)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x88(%r14)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x90(%r14)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x98(%r14)
movq %rax, 0x78(%r14)
movq %rdi, 0xa0(%r14)
movb $0x0, 0xac(%r14)
callq 0x11c131
testq %rax, %rax
je 0x172b49
movb $0x1, 0xac(%r14)
movl $0x8, %edi
callq 0xd214c
movq %rax, 0xb0(%r14)
movq 0xa0(%r14), %rdi
callq 0x11c131
testq %rax, %rax
je 0x172b49
movq 0xa0(%rsp), %r15
xorl %r12d, %r12d
leaq 0x30(%rsp), %r13
movq 0xa0(%r14), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %rdi
movq %r15, %rsi
callq 0x17171c
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x172b95
movq 0xb0(%r14), %rdi
movl $0x8, %edx
movq %r13, %rsi
callq 0xd2410
incq %r12
movq 0xa0(%r14), %rdi
callq 0x11c131
cmpq %r12, %rax
ja 0x172afd
movq 0x98(%rsp), %rdi
callq 0x11b0a1
leaq 0x1e462f(%rip), %rsi    # 0x35718c
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x172b76
movl $0x1, 0xa8(%r14)
jmp 0x172b81
movl $0x0, 0xa8(%r14)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
callq 0x1632f2
xorl %eax, %eax
jmp 0x172b86