// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/add_ids_visitor.c
// Function: add_ids_visitor_feature_node
static int add_ids_visitor_feature_node(GtNodeVisitor *nv, GtFeatureNode *fn,
                                        GtError *err)
{
  AutomaticSequenceRegion *auto_sr;
  GtAddIDsVisitor *aiv;
  const char *seqid;
  bool is_circular;
  aiv = add_ids_visitor_cast(nv);
  seqid = gt_str_get(gt_genome_node_get_seqid((GtGenomeNode*) fn));
  if (aiv->ensure_sorting && !gt_cstr_table_get(aiv->defined_seqids, seqid)) {
    gt_error_set(err, "the file %s is not sorted (seqid \"%s\" on line %u has "
                 "not been previously introduced with a \"%s\" line)",
                 gt_genome_node_get_filename((GtGenomeNode*) fn), seqid,
                 gt_genome_node_get_line_number((GtGenomeNode*) fn),
                 GT_GFF_SEQUENCE_REGION);
    return -1;
  }
  if (!gt_cstr_table_get(aiv->defined_seqids, seqid)) {
    GtFeatureNodeIterator *fni;
    GtFeatureNode *node;
    GtRange range = gt_genome_node_get_range((GtGenomeNode*) fn);
    is_circular = gt_feature_node_get_attribute(fn, GT_GFF_IS_CIRCULAR)
                  ? true : false;
    if (!is_circular) {
      fni = gt_feature_node_iterator_new(fn);
      while ((node = gt_feature_node_iterator_next(fni))) {
        GtRange node_range = gt_genome_node_get_range((GtGenomeNode*) node);
        range = gt_range_join(&range, &node_range);
      }
      gt_feature_node_iterator_delete(fni);
    }
    /* sequence region has not been previously introduced -> check if one has
       already been created automatically */
    auto_sr = gt_hashmap_get(aiv->undefined_sequence_regions, seqid);
    if (!auto_sr) {
      GtStr *seqid_str;
      /* sequence region has not been createad automatically -> do it now */
      gt_warning("seqid \"%s\" on line %u in file \"%s\" has not been "
                 "previously introduced with a \"%s\" line, create such a line "
                 "automatically", seqid,
                 gt_genome_node_get_line_number((GtGenomeNode*) fn),
                 gt_genome_node_get_filename((GtGenomeNode*) fn),
                 GT_GFF_SEQUENCE_REGION);
      auto_sr = automatic_sequence_region_new(is_circular);
      seqid_str = gt_genome_node_get_seqid((GtGenomeNode*) fn);
      auto_sr->sequence_region = gt_region_node_new(seqid_str, range.start,
                                                               range.end);
      gt_hashmap_add(aiv->undefined_sequence_regions, gt_str_get(seqid_str),
                     auto_sr);
    }
    else {
      if (auto_sr->is_circular) {
        gt_assert(!is_circular); /* XXX */
      }
      else if (is_circular) {
        gt_assert(!auto_sr->is_circular); /* XXX */
        auto_sr->is_circular = true;
        gt_genome_node_set_range(auto_sr->sequence_region, &range);
      }
      else {
        GtRange joined_range,
                sr_range = gt_genome_node_get_range(auto_sr->sequence_region);
        /* update the range of the sequence region */
        joined_range = gt_range_join(&range, &sr_range);
        gt_genome_node_set_range(auto_sr->sequence_region, &joined_range);
      }
    }
    gt_array_add(auto_sr->feature_nodes, fn);
  }
  else
    gt_queue_add(aiv->node_buffer, fn);
  return 0;
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xc8(%rsp)
callq 0xa39c0
movq %rax, %rdi
movq 0xd8(%rsp), %rsi
callq 0x34d50
movq %rax, 0xb8(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x258a0
movq %rax, %rdi
callq 0x19940
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0xa3c1a
movq 0xb8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x7d1d0
cmpq $0x0, %rax
jne 0xa3c1a
movq 0xc8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x257c0
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x25850
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl %eax, %r8d
leaq 0xce344(%rip), %rsi     # 0x171f40
leaq 0xc00be(%rip), %r9      # 0x163cc1
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0xe4(%rsp) # imm = 0xFFFFFFFF
jmp 0xa3fa7
movq 0xb8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x7d1d0
cmpq $0x0, %rax
jne 0xa3f83
movq 0xd0(%rsp), %rdi
callq 0x259f0
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xd0(%rsp), %rdi
leaq 0xc0be1(%rip), %rsi     # 0x16484a
callq 0x1fde0
movq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0xaf(%rsp)
testb $0x1, 0xaf(%rsp)
jne 0xa3d2b
movq 0xd0(%rsp), %rdi
callq 0x248a0
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x24bd0
movq %rax, 0x98(%rsp)
cmpq $0x0, %rax
je 0xa3d1e
movq 0x98(%rsp), %rdi
callq 0x259f0
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x93fe0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0xa3cb1
movq 0xa0(%rsp), %rdi
callq 0x24cf0
movq 0xb8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x86470
movq %rax, 0xc0(%rsp)
cmpq $0x0, 0xc0(%rsp)
jne 0xa3e2d
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
movq 0xd0(%rsp), %rdi
callq 0x25850
movl %eax, 0xc(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x257c0
movq (%rsp), %rsi
movl 0xc(%rsp), %edx
movq %rax, %rcx
leaq 0xce20f(%rip), %rdi     # 0x171fa6
leaq 0xbff23(%rip), %r8      # 0x163cc1
movb $0x0, %al
callq 0x1c550
movb 0xaf(%rsp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0xa46e0
movq %rax, 0xc0(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x258a0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x35c30
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, (%rax)
movq 0xb8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0xc0(%rsp), %rdx
callq 0x86510
jmp 0xa3f63
movq 0xc0(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0xa3e86
jmp 0xa3e3d
testb $0x1, 0xaf(%rsp)
je 0xa3e7f
movq 0x11018a(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xba20e(%rip), %rsi     # 0x15e066
leaq 0xce1c0(%rip), %rdx     # 0x17201f
leaq 0xce1c6(%rip), %rcx     # 0x17202c
leaq 0xce097(%rip), %r8      # 0x171f04
movl $0x8e, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xa3e81
jmp 0xa3f61
testb $0x1, 0xaf(%rsp)
je 0xa3f00
jmp 0xa3e92
movq 0xc0(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0xa3ed8
movq 0x110131(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xba1b5(%rip), %rsi     # 0x15e066
leaq 0xce191(%rip), %rdx     # 0x172049
leaq 0xce16d(%rip), %rcx     # 0x17202c
leaq 0xce03e(%rip), %r8      # 0x171f04
movl $0x91, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xa3eda
movq 0xc0(%rsp), %rax
movb $0x1, 0x10(%rax)
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
leaq 0x88(%rsp), %rsi
callq 0x25b50
jmp 0xa3f5f
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
callq 0x259f0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x93fe0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
callq 0x25b50
jmp 0xa3f61
jmp 0xa3f63
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0xd0(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0xa3f9c
movq 0xb8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x909d0
movl $0x0, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)