// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movq %xmm0, 0x8(%rsp)
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
callq 0x17a508
movq %rax, %rdi
callq 0x16aef0
movq %rax, %rbx
callq 0x17a508
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16af21
movq %rax, %r14
callq 0x112908
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x120e79
movq %rax, 0x18(%r14)
movq %rbp, %rdi
callq 0x120e79
movq %rax, 0x20(%r14)
leaq 0x28(%r14), %rax
testq %r13, %r13
je 0x17ade4
movdqu (%r13), %xmm0
jmp 0x17ade8
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %rdx
movb 0x60(%rsp), %sil
movq %r14, %r8
addq $0x38, %r8
testq %r12, %r12
je 0x17ae1c
movdqu (%r12), %xmm0
jmp 0x17ae20
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%r8)
movl (%rsp), %r8d
movl %r8d, 0x48(%r14)
movl 0x4(%rsp), %r8d
movl %r8d, 0x4c(%r14)
movb %sil, 0x50(%r14)
movq %rdx, 0x58(%r14)
movq $0x0, 0x60(%r14)
movq %rcx, 0x68(%r14)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x80(%r14)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x88(%r14)
movsd 0x18(%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 0x121e78
testq %rax, %rax
je 0x17af41
movb $0x1, 0xac(%r14)
movl $0x8, %edi
callq 0xd46fc
movq %rax, 0xb0(%r14)
movq 0xa0(%r14), %rdi
callq 0x121e78
testq %rax, %rax
je 0x17af41
movq 0x90(%rsp), %r15
leaq 0x20(%rsp), %r12
xorl %r13d, %r13d
movq 0xa0(%r14), %rdi
movq %r13, %rsi
callq 0x121cfa
movq %rax, %rdi
movq %r15, %rsi
callq 0x179ae0
movq %rax, %rbp
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x17af20
movq 0xb0(%r14), %rdi
movl $0x8, %edx
movq %r12, %rsi
callq 0xd49ce
jmp 0x17af28
movq %rbx, %rdi
callq 0x16b162
testq %rbp, %rbp
je 0x17af7d
incq %r13
movq 0xa0(%r14), %rdi
callq 0x121e78
cmpq %r13, %rax
ja 0x17aee3
movq 0x88(%rsp), %rdi
callq 0x120d23
leaq 0x1e528a(%rip), %rsi    # 0x3601df
movq %rax, %rdi
callq 0x17a40
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0xa8(%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x17af6b