// File: /workspace/github_c_makefile_star2_O2/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 0x1159fc
movq %rax, %rdi
callq 0x102da0
movq %rax, %r14
callq 0x1159fc
movq %rax, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rsi
callq 0x102dfe
movq %rax, %r14
callq 0x9e2bc
movq %rax, 0x10(%r14)
movq %rbp, %rdi
callq 0xad4d2
movq %rax, 0x18(%r14)
movq %rbx, %rdi
callq 0xad4d2
movq %rax, 0x20(%r14)
leaq 0x28(%r14), %rax
testq %r13, %r13
je 0x116493
movdqu (%r13), %xmm0
jmp 0x116497
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 0x1164d1
movdqu (%r12), %xmm0
jmp 0x1164d5
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)
andq $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 0xae61c
testq %rax, %rax
je 0x1165ca
movq 0xa0(%rsp), %r15
movb $0x1, 0xac(%r14)
pushq $0x8
popq %r12
movq %r12, %rdi
callq 0x5809c
movq %rax, 0xb0(%r14)
xorl %r13d, %r13d
leaq 0x30(%rsp), %rbp
movq 0xa0(%r14), %rdi
callq 0xae61c
cmpq %r13, %rax
jbe 0x1165ca
movq 0xa0(%r14), %rdi
movq %r13, %rsi
callq 0xae386
movq %rax, %rdi
movq %r15, %rsi
callq 0x114e2c
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x1165f7
movq 0xb0(%r14), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x5851d
incq %r13
jmp 0x11657e
movq 0x98(%rsp), %rdi
callq 0xad1fa
leaq 0x1e0bbe(%rip), %rsi    # 0x2f719c
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x116605
movl $0x1, 0xa8(%r14)
jmp 0x11660d
movq 0x8(%rsp), %rdi
callq 0x10327a
xorl %eax, %eax
jmp 0x116612
andl $0x0, 0xa8(%r14)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq