// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/ltr/ltrdigest_file_out_stream.c
// Function: gt_ltr_visitor_feature_node
static int gt_ltr_visitor_feature_node(GtNodeVisitor *nv, GtFeatureNode *fn,
                                       GT_UNUSED GtError *err)
{
  GtLTRVisitor *lv;
  GtRange node_range;
  GtArray *pdomarr = NULL;
  const char *pfamname;
  const char *fnt;
  lv = gt_ltr_visitor_cast(nv);
  gt_assert(lv);
  gt_error_check(err);

  fnt = gt_feature_node_get_type(fn);

  if (strcmp(fnt, gt_ft_LTR_retrotransposon) == 0)
  {
    lv->element->mainnode = fn;
  } else if (strcmp(fnt, gt_ft_long_terminal_repeat) == 0)
  {
    if (lv->element->leftLTR == NULL)
    {
      node_range = gt_genome_node_get_range((GtGenomeNode*) fn);
      lv->element->leftLTR = fn;
      /* compensate for 1-based node coords */
      lv->element->leftLTR_5 = node_range.start - 1;
      lv->element->leftLTR_3 = node_range.end - 1;
    }
    else
    {
      node_range = gt_genome_node_get_range((GtGenomeNode*) fn);
      lv->element->rightLTR = fn;
      /* compensate for 1-based node coords */
      lv->element->rightLTR_5 = node_range.start - 1;
      lv->element->rightLTR_3 = node_range.end - 1;
    }
  } else if (strcmp(fnt, gt_ft_target_site_duplication) == 0)
  {
    if (lv->element->leftTSD == NULL)
    {
      lv->element->leftTSD = fn;
    }
    else
    {
      lv->element->rightTSD = fn;
    }
  } else if (strcmp(fnt, gt_ft_RR_tract) == 0)
  {
    if (lv->element->ppt == NULL)
    {
      lv->element->ppt = fn;
    }
  } else if (strcmp(fnt, gt_ft_primer_binding_site) == 0)
  {
    if (lv->element->pbs == NULL)
    {
      lv->element->pbs = fn;
    }
  } else if (strcmp(fnt, gt_ft_protein_match) == 0)
  {
    char buf[BUFSIZ];
    if (!lv->element->pdoms)
    {
      lv->element->pdoms = gt_hashmap_new(GT_HASH_STRING, gt_free_func,
                                          (GtFree) gt_array_delete);
    }
    pfamname = gt_feature_node_get_attribute(fn, "name");
    (void) snprintf(buf, BUFSIZ-1, "%s", pfamname);
    gt_cstr_rep(buf, '/', '_');
    if (!(pdomarr = (GtArray*) gt_hashmap_get(lv->element->pdoms, buf)))
    {
      char *pfamcpy = gt_cstr_dup(buf);
      pdomarr = gt_array_new(sizeof (GtFeatureNode*));
      gt_hashmap_add(lv->element->pdoms, pfamcpy, pdomarr);
      if (lv->element->pdomorder != NULL)
        gt_array_add(lv->element->pdomorder, pfamcpy);
    }
    gt_array_add(pdomarr, fn);
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, (%rsp)
callq 0x212d3c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16af21
testq %rax, %rax
je 0x212fe4
movq %rax, %rbx
testq %r14, %r14
je 0x212dc9
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x212fe9
movq (%rsp), %rdi
callq 0x149bb2
movq %rax, %r14
leaq 0x18b282(%rip), %rsi    # 0x39e05e
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x212f44
leaq 0x18db8b(%rip), %rsi    # 0x3a097e
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x212f55
leaq 0x18d019(%rip), %rsi    # 0x39fe23
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x212f87
leaq 0x1b621d(%rip), %rsi    # 0x3c903e
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x212f9c
leaq 0x1b6221(%rip), %rsi    # 0x3c9059
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x212fbe
leaq 0x177188(%rip), %rsi    # 0x389fd7
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
jne 0x212fd7
movq 0x10(%rbx), %rax
cmpq $0x0, 0x68(%rax)
jne 0x212e8a
leaq -0x109742(%rip), %rsi   # 0x10972f
leaq -0x13df84(%rip), %rdx   # 0xd4ef4
movl $0x1, %edi
callq 0x105830
movq 0x10(%rbx), %rcx
movq %rax, 0x68(%rcx)
movq (%rsp), %rdi
leaq 0x178c8d(%rip), %rsi    # 0x38bb22
callq 0x14918c
leaq 0x1bf330(%rip), %rdx    # 0x3d21d1
leaq 0x10(%rsp), %r14
movl $0x1fff, %esi           # imm = 0x1FFF
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x17c60
movq %r14, %rdi
movl $0x2f, %esi
movl $0x5f, %edx
callq 0xe87ec
movq 0x10(%rbx), %rax
movq 0x68(%rax), %rdi
movq %r14, %rsi
callq 0x105a11
movq %rax, %r14
testq %rax, %rax
jne 0x212f2f
leaq 0x10(%rsp), %rdi
callq 0xe8760
movq %rax, 0x8(%rsp)
movl $0x8, %edi
callq 0xd46fc
movq %rax, %r14
movq 0x10(%rbx), %rax
movq 0x68(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x105a4c
movq 0x10(%rbx), %rax
movq 0x60(%rax), %rdi
testq %rdi, %rdi
je 0x212f2f
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0xd49ce
movq %rsp, %rsi
movl $0x8, %edx
movq %r14, %rdi
callq 0xd49ce
jmp 0x212fd7
movq (%rsp), %rax
movq 0x10(%rbx), %rcx
movq %rax, 0x20(%rcx)
jmp 0x212fd7
movq 0x10(%rbx), %rax
movq 0x28(%rax), %r14
movq (%rsp), %rdi
callq 0x14b8df
decq %rax
decq %rdx
movq (%rsp), %rsi
movq 0x10(%rbx), %rcx
testq %r14, %r14
je 0x212fb1
movq %rsi, 0x30(%rcx)
movq %rax, 0x18(%rcx)
movq %rdx, 0x10(%rcx)
jmp 0x212fd7
movq 0x10(%rbx), %rax
cmpq $0x0, 0x38(%rax)
movq (%rsp), %rcx
je 0x212fd3
movq %rcx, 0x40(%rax)
jmp 0x212fd7
movq 0x10(%rbx), %rax
cmpq $0x0, 0x48(%rax)
jne 0x212fd7
movq (%rsp), %rcx
movq %rcx, 0x48(%rax)
jmp 0x212fd7
movq %rsi, 0x28(%rcx)
movq %rax, 0x8(%rcx)
movq %rdx, (%rcx)
jmp 0x212fd7
movq 0x10(%rbx), %rax
cmpq $0x0, 0x50(%rax)
jne 0x212fd7
movq (%rsp), %rcx
movq %rcx, 0x50(%rax)
jmp 0x212fd7
movq %rcx, 0x38(%rax)
xorl %eax, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r14
retq
callq 0x826cc
callq 0x82693