// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/select_visitor.c
// Function: select_visitor_feature_node
static int select_visitor_feature_node(GtNodeVisitor *nv,
                                       GtFeatureNode *fn,
                                       GtError *err)
{
  GtSelectVisitor *fv;
  bool select_node = false;
  int had_err = 0;
  gt_error_check(err);
  fv = select_visitor_cast(nv);
  fv->current_feature++;
  if ((!gt_str_length(fv->seqid) || /* no seqid was specified or seqids are
                                       equal */
       !gt_str_cmp(fv->seqid, gt_genome_node_get_seqid((GtGenomeNode*) fn))) &&
      (!gt_str_length(fv->source) || /* no source was specified or sources are
                                        equal */
       !strcmp(gt_str_get(fv->source), gt_feature_node_get_source(fn)))) {
    GtRange range = gt_genome_node_get_range((GtGenomeNode*) fn);
    /* enforce maximum gene length */
    /* XXX: we (spuriously) assume that genes are always root nodes */
    if (fn && gt_feature_node_has_type(fn, gt_ft_gene)) {
      if (fv->max_gene_length != GT_UNDEF_UWORD &&
          gt_range_length(&range) > fv->max_gene_length) {
        select_node = true;
      }
      else if (fv->max_gene_num != GT_UNDEF_UWORD &&
               fv->gene_num >= fv->max_gene_num) {
        select_node = true;
      }
      else if (fv->min_gene_score != GT_UNDEF_DOUBLE &&
               gt_feature_node_get_score(fn) < fv->min_gene_score) {
        select_node = true;
      }
      else if (fv->max_gene_score != GT_UNDEF_DOUBLE &&
               gt_feature_node_get_score(fn) > fv->max_gene_score) {
        select_node = true;
      }
      else if (fv->feature_num != GT_UNDEF_UWORD &&
               fv->feature_num != fv->current_feature) {
        select_node = true;
      }
      if (!select_node)
        fv->gene_num++; /* gene passed filter */
    }
  }
  else
    select_node = true;

  if (!select_node)
    select_node = filter_contain_range(fn, fv->contain_range);

  if (!select_node)
    select_node = filter_overlap_range(fn, fv->overlap_range);

  if (!select_node)
    select_node = filter_strand(fn, fv->strand);

  if (!select_node)
    select_node = filter_targetstrand(fn, fv->targetstrand);

  if (!select_node)
    select_node = filter_has_CDS(fn, fv->has_CDS);

  if (!select_node) {
    select_node = filter_min_average_ssp(fn, fv->min_average_splice_site_prob,
                                         fv->single_intron_factor);
  }

  if (fv->is_lua && !select_node)
    had_err = filter_lua(fv->script_filters, fn, fv->select_logic,
                         &select_node, err);

  if (select_node && !had_err)
    fv->drophandler((GtGenomeNode*) fn, fv->data, err);

  if (select_node)
    gt_genome_node_delete((GtGenomeNode*) fn);
  else
    gt_queue_add(fv->node_buffer, fn);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
testq %rdx, %rdx
je 0x115b90
movq %r15, %rdi
callq 0x89eb7
testb %al, %al
jne 0x116022
callq 0x1159fc
movq %rax, %rdi
movq %r14, %rsi
callq 0x102dfe
movq %rax, %r12
incq 0x70(%rax)
movq 0x18(%rax), %rdi
callq 0xad289
testq %rax, %rax
je 0x115bd8
movq 0x18(%r12), %r14
movq %r13, %rdi
callq 0xdd14a
movq %r14, %rdi
movq %rax, %rsi
callq 0xad39b
movb $0x1, %r14b
testl %eax, %eax
jne 0x115ea0
movq 0x20(%r12), %rdi
callq 0xad289
testq %rax, %rax
je 0x115c12
movq 0x20(%r12), %rdi
callq 0xad1fa
movq %rax, %r14
movq %r13, %rdi
callq 0xda5c1
movq %r14, %rdi
movq %rax, %rsi
callq 0x179e0
movb $0x1, %r14b
testl %eax, %eax
jne 0x115ea0
movq %r13, %rdi
callq 0xdd1f4
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
testq %r13, %r13
je 0x115cfa
leaq 0x267ee7(%rip), %rsi    # 0x37db1b
movq %r13, %rdi
callq 0xda68b
testb %al, %al
je 0x115cfa
cmpq $-0x1, 0x58(%r12)
je 0x115c61
leaq 0x10(%rsp), %rdi
callq 0xa31ee
cmpq 0x58(%r12), %rax
ja 0x115e9d
movq 0x68(%r12), %rax
cmpq $-0x1, %rax
je 0x115c77
cmpq %rax, 0x60(%r12)
jae 0x115e9d
movsd 0x80(%r12), %xmm0
ucomisd 0x1d2087(%rip), %xmm0   # 0x2e7d10
jne 0x115c8d
jnp 0x115cad
movq %r13, %rdi
callq 0xdaa3e
cvtss2sd %xmm0, %xmm0
movsd 0x80(%r12), %xmm1
ucomisd %xmm0, %xmm1
ja 0x115e9d
movsd 0x88(%r12), %xmm0
ucomisd 0x1d2051(%rip), %xmm0   # 0x2e7d10
jne 0x115cc3
jnp 0x115cdf
movq %r13, %rdi
callq 0xdaa3e
cvtss2sd %xmm0, %xmm0
ucomisd 0x88(%r12), %xmm0
ja 0x115e9d
movq 0x78(%r12), %rax
cmpq $-0x1, %rax
je 0x115cf5
cmpq 0x70(%r12), %rax
jne 0x115e9d
incq 0x60(%r12)
movups 0x28(%r12), %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x10(%rsp)
testq %r13, %r13
je 0x116053
movq %r13, %rdi
callq 0xdd1f4
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movdqa 0x40(%rsp), %xmm0
movq %xmm0, %rax
cmpq $-0x1, %rax
je 0x115d4d
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa3345
testb %al, %al
je 0x115e9d
movq 0x38(%r12), %rbx
movups 0x38(%r12), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0xdd1f4
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpq $-0x1, %rbx
je 0x115d8c
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa3234
testb %al, %al
je 0x115e9d
movl 0x48(%r12), %ebx
cmpl $0x4, %ebx
je 0x115da9
movq %r13, %rdi
callq 0xd9d99
movb $0x1, %r14b
cmpl %ebx, %eax
jne 0x115ea0
movl 0x4c(%r12), %ebx
cmpl $0x4, %ebx
je 0x115e12
leaq 0x1d6b5c(%rip), %rsi    # 0x2ec916
movq %r13, %rdi
callq 0xd9628
testq %rax, %rax
je 0x115e12
andq $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
leaq 0x254798(%rip), %r9     # 0x36a570
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %r8
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe0d28
testl %eax, %eax
jne 0x1160e5
cmpq $0x1, 0x10(%rsp)
jne 0x115e12
movl 0x30(%rsp), %eax
cmpl $0x4, %eax
je 0x115e12
movb $0x1, %r14b
cmpl %ebx, %eax
jne 0x115ea0
cmpb $0x1, 0x50(%r12)
jne 0x115e29
movq %r13, %rdi
callq 0xdb628
movb $0x1, %r14b
testb %al, %al
je 0x115ea0
movsd 0x90(%r12), %xmm0
movsd %xmm0, 0x40(%rsp)
ucomisd 0x1d1ecf(%rip), %xmm0   # 0x2e7d10
jne 0x115e49
jnp 0x11601a
movsd 0x98(%r12), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r13, %rdi
callq 0xdb6d4
testb %al, %al
je 0x11601a
leaq 0x10(%rsp), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0xdb6e0
cmpq $0x2, (%r14)
movsd 0x40(%rsp), %xmm1
ja 0x11600d
movsd 0x28(%rsp), %xmm2
mulsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x11600d
movb $0x1, %r14b
xorl %ebp, %ebp
cmpb $0x1, 0xac(%r12)
jne 0x115fbb
testb %r14b, %r14b
jne 0x115fbb
testq %r13, %r13
je 0x11607f
movq %r12, %rax
movq 0xb0(%r12), %r12
testq %r12, %r12
je 0x11607f
movq %r15, %rbx
movq %r13, %r15
movq %rax, 0x28(%rsp)
movl 0xa8(%rax), %eax
movl %eax, 0x40(%rsp)
testq %rbx, %rbx
je 0x115f01
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1160ad
xorl %r13d, %r13d
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x115f99
movq %r12, %rdi
callq 0x586a4
cmpq %rax, %r13
jae 0x115fa9
movq %r12, %rdi
movq %r13, %rsi
callq 0x581aa
movq (%rax), %rdi
movq %r15, %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0x115548
movl %eax, %ebp
testl %eax, %eax
sete %al
testq %r13, %r13
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x115f58
movb 0x10(%rsp), %r14b
jmp 0x115f91
movl %ebp, %eax
movl 0x40(%rsp), %ecx
orl %ecx, %eax
je 0x115f7f
cmpl $0x1, %ecx
jne 0x115f91
testl %ebp, %ebp
jne 0x115f91
xorl %eax, %eax
testb $0x1, %r14b
je 0x115fad
movb $0x1, %r14b
testb $0x1, 0x10(%rsp)
jne 0x115f91
jmp 0x115fad
movb $0x1, %al
testb $0x1, %r14b
jne 0x115fad
testb $0x1, 0x10(%rsp)
jne 0x115fad
xorl %r14d, %r14d
incq %r13
jmp 0x115f06
testb $0x1, %r14b
movq %r15, %r13
movq 0x28(%rsp), %r12
jne 0x115fe5
jmp 0x115fef
xorl %ebp, %ebp
jmp 0x115fb0
movl %eax, %r14d
movq %r15, %r13
movq %rbx, %r15
movq 0x28(%rsp), %r12
testl %ebp, %ebp
jne 0x115fdf
testb $0x1, %r14b
je 0x115fdf
movq 0xc0(%r12), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq *0xb8(%r12)
xorl %ebp, %ebp
jmp 0x115fe5
testb $0x1, %r14b
je 0x115fef
movq %r13, %rdi
callq 0xde013
jmp 0x115ffc
movq 0x10(%r12), %rdi
movq %r13, %rsi
callq 0x9e2d1
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
ucomisd %xmm0, %xmm1
movb $0x1, %r14b
ja 0x115ea0
xorl %r14d, %r14d
jmp 0x115ea0
movq 0x321f3f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cefe0(%rip), %rsi    # 0x2e5013
leaq 0x1cf185(%rip), %rdx    # 0x2e51bf
leaq 0x21c851(%rip), %rcx    # 0x332892
leaq 0x21c7dd(%rip), %r8     # 0x332825
movl $0xd9, %r9d
jmp 0x1160d9
movq 0x321f0e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cefaf(%rip), %rsi    # 0x2e5013
leaq 0x267e35(%rip), %rdx    # 0x37dea0
leaq 0x21c83c(%rip), %rcx    # 0x3328ae
leaq 0x21c7ac(%rip), %r8     # 0x332825
pushq $0x6b
popq %r9
jmp 0x1160d9
movq 0x321ee2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cef83(%rip), %rsi    # 0x2e5013
leaq 0x21c840(%rip), %rdx    # 0x3328d7
leaq 0x21c856(%rip), %rcx    # 0x3328f4
leaq 0x21c780(%rip), %r8     # 0x332825
movl $0xb9, %r9d
jmp 0x1160d9
movq 0x321eb4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cef55(%rip), %rsi    # 0x2e5013
leaq 0x1cf0fa(%rip), %rdx    # 0x2e51bf
leaq 0x21c828(%rip), %rcx    # 0x3328f4
leaq 0x21c752(%rip), %r8     # 0x332825
movl $0xba, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x321e7c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cef1d(%rip), %rsi    # 0x2e5013
leaq 0x1cf582(%rip), %rdx    # 0x2e567f
leaq 0x21c7bf(%rip), %rcx    # 0x3328c3
leaq 0x21c71a(%rip), %r8     # 0x332825
movl $0x94, %r9d
jmp 0x1160d9