// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
callq 0x211cec
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16af21
testq %rax, %rax
je 0x211f0a
movq %rax, %rbx
testq %r12, %r12
je 0x211d75
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0x211f0f
movq %r13, %rdi
callq 0x14b1a8
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x14b33e
xorl %r14d, %r14d
testq %rax, %rax
je 0x211e53
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r13, %r14
movq %r15, %rdi
callq 0x149bb2
movq %rax, %rdi
leaq 0x18c297(%rip), %rsi    # 0x39e05e
callq 0x17a40
testl %eax, %eax
cmoveq %r15, %rbx
movq %r15, %rdi
callq 0x149bb2
movq %rax, %rdi
leaq 0x18eb9a(%rip), %rsi    # 0x3a097e
callq 0x17a40
testb $0x1, %r12b
movzbl %r12b, %ecx
movl $0x1, %r12d
cmovnel %ecx, %r12d
movq %r15, %r13
cmovneq %r14, %r13
movq %rbp, %rdx
cmoveq %rbp, %r15
testl %eax, %eax
cmovnel %ecx, %r12d
cmovneq %r14, %r13
movq %r15, %rbp
cmovneq %rdx, %rbp
movq 0x8(%rsp), %rdi
callq 0x14b33e
movq %rax, %r15
testq %rax, %rax
jne 0x211db2
testq %r13, %r13
setne %al
testq %rbp, %rbp
setne %bpl
andb %al, %bpl
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r13
movq %rbx, %r15
movq 0x10(%rsp), %rbx
xorl %r14d, %r14d
jmp 0x211e58
xorl %r15d, %r15d
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
callq 0x14b3d0
cmpb $0x1, 0x10(%rbx)
jne 0x211eb2
testq %r15, %r15
jne 0x211eb2
movq %r13, %rdi
callq 0x149bb2
movq %rax, %rbx
movq %r13, %rdi
callq 0x14b86c
movq %rax, %r14
movq %r13, %rdi
callq 0x14b88c
leaq 0x1b6eb4(%rip), %rsi    # 0x3c8d46
leaq 0x18c1c5(%rip), %r9     # 0x39e05e
movq %r12, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %eax, %eax
testq %r15, %r15
sete %cl
cmovel %r14d, %eax
orb %bpl, %cl
testb $0x1, %cl
jne 0x211efb
movq %r15, %rdi
callq 0x14b86c
movq %rax, %rbx
movq %r15, %rdi
callq 0x14b88c
leaq 0x1b6ecb(%rip), %rsi    # 0x3c8dab
leaq 0x18ea97(%rip), %r8     # 0x3a097e
movq %r12, %rdi
movq %rbx, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x823b8
callq 0x82381