// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/ltr/ltr_input_check_visitor.c
// Function: gt_ltr_input_check_visitor_feature_node
static int gt_ltr_input_check_visitor_feature_node(GtNodeVisitor *nv,
                                                   GtFeatureNode *fn,
                                                   GtError *err)
{
  GT_UNUSED GtLTRInputCheckVisitor *lv;
  GtFeatureNodeIterator *fni;
  bool seen_left = false;
  GtFeatureNode *curnode = NULL,
                *ltr_retrotrans = NULL,
                *lltr = NULL,
                *rltr = NULL;
  int had_err = 0;
  lv = gt_ltr_input_check_visitor_cast(nv);
  gt_assert(lv);
  gt_error_check(err);

  /* traverse annotation subgraph and find LTR components */
  fni = gt_feature_node_iterator_new(fn);
  while (!had_err && (curnode = gt_feature_node_iterator_next(fni))) {
    if (strcmp(gt_feature_node_get_type(curnode),
               gt_ft_LTR_retrotransposon) == 0) {
      ltr_retrotrans = curnode;
    }
    if (strcmp(gt_feature_node_get_type(curnode),
               gt_ft_long_terminal_repeat) == 0) {
      if (seen_left)
        rltr = curnode;
      else {
        lltr = curnode;
        seen_left = true;
      }
    }
  }
  gt_feature_node_iterator_delete(fni);

  if (lv->only_ltrs) {
    if (!had_err && !ltr_retrotrans) {
      gt_error_set(err, "connected component with %s entry node (%s, line %u) "
                        "does not contain a '%s' node, which is required",
                   gt_feature_node_get_type(fn),
                   gt_genome_node_get_filename((GtGenomeNode*) fn),
                   gt_genome_node_get_line_number((GtGenomeNode*) fn),
                   gt_ft_LTR_retrotransposon);
      had_err = -1;
    }
  }

  if (!had_err && ltr_retrotrans && (!lltr || !rltr)) {
    gt_error_set(err, "LTR_retrotransposon feature (%s, line %u) "
                      "does not contain two %s child features, both of which "
                      "are required",
                 gt_genome_node_get_filename((GtGenomeNode*) ltr_retrotrans),
                 gt_genome_node_get_line_number((GtGenomeNode*) ltr_retrotrans),
                 gt_ft_long_terminal_repeat);
    had_err = -1;
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1bc7dc
movq %rax, %rdi
movq %rbx, %rsi
callq 0x102dfe
testq %rax, %rax
je 0x1bc992
movq %rax, 0x10(%rsp)
testq %r14, %r14
je 0x1bc85e
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1bc9bc
movq %r14, (%rsp)
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0xdc6f0
movq %rax, %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %r13, %rdi
callq 0xdc92e
testq %rax, %rax
je 0x1bc8df
movq %rax, %r14
movq %rax, %rdi
callq 0xda338
movq %rax, %rdi
leaq 0x178688(%rip), %rsi    # 0x334f26
callq 0x179e0
testl %eax, %eax
cmoveq %r14, %r12
movq %r14, %rdi
callq 0xda338
movq %rax, %rdi
leaq 0x17af56(%rip), %rsi    # 0x337811
callq 0x179e0
testb $0x1, %bl
movq %r14, %rcx
cmovneq %rbp, %rcx
cmoveq %r15, %r14
testl %eax, %eax
cmoveq %rcx, %rbp
sete %al
cmoveq %r14, %r15
orb %al, %bl
jmp 0x1bc87c
movq %r13, %rdi
callq 0xdc9f1
movq 0x10(%rsp), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1bc93e
testq %r12, %r12
jne 0x1bc93e
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xda338
movq %rax, %rbx
movq %r15, %rdi
callq 0xdd0b5
movq %rax, %r14
movq %r15, %rdi
callq 0xdd108
leaq 0x1a31f5(%rip), %rsi    # 0x35fb16
leaq 0x1785fe(%rip), %r9     # 0x334f26
movq (%rsp), %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x89dbb
jmp 0x1bc980
xorl %eax, %eax
testq %r12, %r12
je 0x1bc983
testq %rbp, %rbp
je 0x1bc94f
testq %r15, %r15
jne 0x1bc983
movq %r12, %rdi
callq 0xdd0b5
movq %rax, %rbx
movq %r12, %rdi
callq 0xdd108
leaq 0x1a3212(%rip), %rsi    # 0x35fb7b
leaq 0x17aea1(%rip), %r8     # 0x337811
movq (%rsp), %rdi
movq %rbx, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x27b5cf(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x128670(%rip), %rsi    # 0x2e5013
leaq 0x1a3997(%rip), %rdx    # 0x360341
leaq 0x1a313d(%rip), %rcx    # 0x35faee
leaq 0x1a30f5(%rip), %r8     # 0x35faad
pushq $0x36
jmp 0x1bc9e4
movq 0x27b5a5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x128646(%rip), %rsi    # 0x2e5013
leaq 0x1287eb(%rip), %rdx    # 0x2e51bf
leaq 0x1a3113(%rip), %rcx    # 0x35faee
leaq 0x1a30cb(%rip), %r8     # 0x35faad
pushq $0x37
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390