// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/ltr/ltrdigest_strand_assign_visitor.c
// Function: gt_ltrdigest_strand_assign_visitor_feature_node
static int gt_ltrdigest_strand_assign_visitor_feature_node(GtNodeVisitor *nv,
                                                 GtFeatureNode *fn,
                                                 GT_UNUSED GtError *err)
{
  GtLTRdigestStrandAssignVisitor *lv;
  GtFeatureNodeIterator *fni;
  GtFeatureNode *curnode = NULL;
  int had_err = 0;
  lv = gt_ltrdigest_strand_assign_visitor_cast(nv);
  gt_assert(lv);
  gt_error_check(err);

  lv->strand = GT_STRAND_UNKNOWN;
  fni = gt_feature_node_iterator_new(fn);
  while (!had_err && (curnode = gt_feature_node_iterator_next(fni))) {
    GtStrand node_strand = gt_feature_node_get_strand(curnode);
    if (lv->strand == GT_STRAND_UNKNOWN && node_strand != lv->strand)
      lv->strand = node_strand;
    else {
      if (node_strand != GT_STRAND_UNKNOWN && node_strand != lv->strand) {
        gt_warning("inconsistent strands encountered in `%s' feature "
                   "in file %s, line %u: found %c, expected %c",
                   gt_feature_node_get_type(curnode),
                   gt_genome_node_get_filename((GtGenomeNode*) curnode),
                   gt_genome_node_get_line_number((GtGenomeNode*) curnode),
                   GT_STRAND_CHARS[node_strand],
                   GT_STRAND_CHARS[lv->strand]);
      }
    }
  }
  gt_feature_node_iterator_delete(fni);

  if (!had_err && lv->strand != GT_STRAND_UNKNOWN) {
    gt_feature_node_set_strand(fn, lv->strand);
    fni = gt_feature_node_iterator_new(fn);
    while (!had_err && (curnode = gt_feature_node_iterator_next(fni))) {
      gt_feature_node_set_strand(curnode, lv->strand);
    }
    gt_feature_node_iterator_delete(fni);
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x21880b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16af21
testq %rax, %rax
je 0x2189a7
movq %rax, %rbx
testq %r15, %r15
je 0x218891
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x2189ac
movl $0x3, 0x10(%rbx)
movq %r14, (%rsp)
movq %r14, %rdi
callq 0x14b1a8
movq %rax, %r15
movq %rax, %rdi
callq 0x14b33e
testq %rax, %rax
je 0x21894a
movq %rax, %r13
movq %r13, %rdi
callq 0x14970e
movl %eax, %ebp
movl 0x10(%rbx), %eax
cmpl $0x3, %eax
setne %cl
cmpl $0x3, %ebp
sete %dl
orb %cl, %dl
je 0x218933
cmpl $0x3, %ebp
sete %cl
cmpl %eax, %ebp
sete %al
orb %cl, %al
jne 0x218936
movq %r13, %rdi
callq 0x149bb2
movq %rax, %r14
movq %r13, %rdi
callq 0x14b86c
movq %rax, %r12
movq %r13, %rdi
callq 0x14b88c
movl %ebp, %ecx
leaq 0x15e376(%rip), %rdx    # 0x376c84
movsbl (%rcx,%rdx), %r8d
movl 0x10(%rbx), %ecx
movsbl (%rcx,%rdx), %r9d
leaq 0x1b1adc(%rip), %rdi    # 0x3ca3fe
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x125448
jmp 0x218936
movl %ebp, 0x10(%rbx)
movq %r15, %rdi
callq 0x14b33e
movq %rax, %r13
testq %rax, %rax
jne 0x2188bb
movq %r15, %rdi
callq 0x14b3d0
movl 0x10(%rbx), %esi
cmpl $0x3, %esi
je 0x218996
movq (%rsp), %r14
movq %r14, %rdi
callq 0x149f2e
movq %r14, %rdi
callq 0x14b1a8
movq %rax, %r14
movq %rax, %rdi
callq 0x14b33e
testq %rax, %rax
je 0x21898e
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x149f2e
movq %r14, %rdi
jmp 0x218974
movq %r14, %rdi
callq 0x14b3d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x83794
callq 0x8375d