// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movb $0x0, 0x27(%rsp)
movl $0x0, 0x20(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x1d3020
movq 0x30(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1d2fe8
jmp 0x1d3020
movq 0x468fb1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34301a(%rip), %rsi    # 0x516013
leaq 0x3431bf(%rip), %rdx    # 0x5161bf
leaq 0x391da8(%rip), %rcx    # 0x564daf
leaq 0x391d34(%rip), %r8     # 0x564d42
movl $0xd9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d3022
callq 0x1d2dc0
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x1b2350
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x70(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x70(%rax)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x1d308c
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x171b70
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x11e170
cmpl $0x0, %eax
jne 0x1d3233
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x1d30d1
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dee0
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x16d800
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x19980
cmpl $0x0, %eax
jne 0x1d3233
movq 0x38(%rsp), %rdi
callq 0x171cc0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1d3231
movq 0x38(%rsp), %rdi
leaq 0x3dfa69(%rip), %rsi    # 0x5b2b66
callq 0x16d960
testb $0x1, %al
jne 0x1d310b
jmp 0x1d3231
movq 0x28(%rsp), %rax
cmpq $-0x1, 0x58(%rax)
je 0x1d3136
leaq 0x10(%rsp), %rdi
callq 0x107320
movq 0x28(%rsp), %rcx
cmpq 0x58(%rcx), %rax
jbe 0x1d3136
movb $0x1, 0x27(%rsp)
jmp 0x1d3217
movq 0x28(%rsp), %rax
cmpq $-0x1, 0x68(%rax)
je 0x1d3160
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x28(%rsp), %rcx
cmpq 0x68(%rcx), %rax
jb 0x1d3160
movb $0x1, 0x27(%rsp)
jmp 0x1d3215
movq 0x28(%rsp), %rax
movsd 0x80(%rax), %xmm0
movsd 0x345bdb(%rip), %xmm1   # 0x518d50
ucomisd %xmm1, %xmm0
jne 0x1d317f
jp 0x1d317f
jmp 0x1d31a7
movq 0x38(%rsp), %rdi
callq 0x16df90
cvtss2sd %xmm0, %xmm1
movq 0x28(%rsp), %rax
movsd 0x80(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1d31a7
movb $0x1, 0x27(%rsp)
jmp 0x1d3213
movq 0x28(%rsp), %rax
movsd 0x88(%rax), %xmm0
movsd 0x345b94(%rip), %xmm1   # 0x518d50
ucomisd %xmm1, %xmm0
jne 0x1d31c6
jp 0x1d31c6
jmp 0x1d31ea
movq 0x38(%rsp), %rdi
callq 0x16df90
cvtss2sd %xmm0, %xmm0
movq 0x28(%rsp), %rax
ucomisd 0x88(%rax), %xmm0
jbe 0x1d31ea
movb $0x1, 0x27(%rsp)
jmp 0x1d3211
movq 0x28(%rsp), %rax
cmpq $-0x1, 0x78(%rax)
je 0x1d320f
movq 0x28(%rsp), %rax
movq 0x78(%rax), %rax
movq 0x28(%rsp), %rcx
cmpq 0x70(%rcx), %rax
je 0x1d320f
movb $0x1, 0x27(%rsp)
jmp 0x1d3211
jmp 0x1d3213
jmp 0x1d3215
jmp 0x1d3217
testb $0x1, 0x27(%rsp)
jne 0x1d322f
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
jmp 0x1d3231
jmp 0x1d3238
movb $0x1, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d325c
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
callq 0x1d3d20
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d3280
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x40(%rax), %rdx
callq 0x1d3dd0
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d329f
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x48(%rax), %esi
callq 0x1d3e80
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d32be
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x4c(%rax), %esi
callq 0x1d3f00
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d32e2
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movb 0x50(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x1d4030
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x1d3313
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movsd 0x90(%rax), %xmm0
movq 0x28(%rsp), %rax
movsd 0x98(%rax), %xmm1
callq 0x1d40b0
andb $0x1, %al
movb %al, 0x27(%rsp)
movq 0x28(%rsp), %rax
testb $0x1, 0xac(%rax)
je 0x1d3357
testb $0x1, 0x27(%rsp)
jne 0x1d3357
movq 0x28(%rsp), %rax
movq 0xb0(%rax), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rax
movl 0xa8(%rax), %edx
movq 0x30(%rsp), %r8
leaq 0x27(%rsp), %rcx
callq 0x1d41a0
movl %eax, 0x20(%rsp)
testb $0x1, 0x27(%rsp)
je 0x1d3389
cmpl $0x0, 0x20(%rsp)
jne 0x1d3389
movq 0x28(%rsp), %rax
movq 0xb8(%rax), %rax
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rcx
movq 0xc0(%rcx), %rsi
movq 0x30(%rsp), %rdx
callq *%rax
testb $0x1, 0x27(%rsp)
je 0x1d339c
movq 0x38(%rsp), %rdi
callq 0x173180
jmp 0x1d33af
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0xfd170
movl 0x20(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)