// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/feature_index_memory.c
// Function: gt_feature_index_memory_add_feature_node
int gt_feature_index_memory_add_feature_node(GtFeatureIndex *gfi,
                                             GtFeatureNode *fn,
                                             GT_UNUSED GtError *err)
{
  GtGenomeNode *gn;
  char* seqid;
  GtFeatureIndexMemory *fi;
  GtRange node_range;
  RegionInfo *info;
  GtIntervalTreeNode *new_node;
  gt_assert(gfi && fn);

  fi = gt_feature_index_memory_cast(gfi);
  gn = gt_genome_node_ref((GtGenomeNode*) fn);
  /* assign id number as 'primary key' */
  gt_hashmap_add(fi->nodes_in_index, gn, gn);
  /* get information about seqid and range */
  node_range = gt_genome_node_get_range(gn);
  seqid = gt_str_get(gt_genome_node_get_seqid(gn));
  info = (RegionInfo*) gt_hashmap_get(fi->regions, seqid);

  /* If the seqid was encountered for the first time, no sequence
     region nodes have been visited before. We therefore must create a new
     index entry and maintain our own GtRange. */
  if (!info)
  {
    info = gt_calloc(1, sizeof (RegionInfo));
    info->region = NULL;
    info->features = gt_interval_tree_new((GtFree)
                                          gt_genome_node_delete);
    info->dyn_range.start = ~0UL;
    info->dyn_range.end   = 0;
    gt_hashmap_add(fi->regions, seqid, info);
    if (fi->nof_region_nodes++ == 0)
      fi->firstseqid = seqid;
  }

  /* add node to the appropriate array in the hashtable */
  new_node = gt_interval_tree_node_new(gn, node_range.start, node_range.end);
  gt_interval_tree_insert(info->features, new_node);
  /* update dynamic range */
  info->dyn_range.start = GT_MIN(info->dyn_range.start, node_range.start);
  info->dyn_range.end = GT_MAX(info->dyn_range.end, node_range.end);
  return 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0x1ec53
cmpq $0x0, 0x68(%rsp)
jne 0x1ec8b
movq 0x19537e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x13f402(%rip), %rsi    # 0x15e066
leaq 0x142c15(%rip), %rdx    # 0x161880
leaq 0x142c18(%rip), %rcx    # 0x16188a
leaq 0x142be3(%rip), %r8     # 0x16185c
movl $0x65, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1ec8d
callq 0x1eb70
movq %rax, %rdi
movq 0x70(%rsp), %rsi
callq 0x1de70
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rdi
callq 0x25140
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x58(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x86510
movq 0x58(%rsp), %rdi
callq 0x259f0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0x258a0
movq %rax, %rdi
callq 0x19940
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x86470
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x1edce
movl $0x1, %edi
movl $0x20, %esi
leaq 0x142b1d(%rip), %rdx    # 0x16185c
movl $0x75, %ecx
callq 0xd5b0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq $0x0, 0x8(%rax)
leaq 0x814e(%rip), %rdi      # 0x26eb0
callq 0x89ac0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq $-0x1, 0x10(%rax)
movq 0x30(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x86510
movq 0x48(%rsp), %rcx
movq 0x30(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x30(%rcx)
cmpq $0x0, %rax
jne 0x1edcc
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0x1edce
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x89a50
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x8a190
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
cmpq 0x38(%rsp), %rax
jae 0x1ee19
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1ee23
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x40(%rsp), %rax
jbe 0x1ee51
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1ee5b
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
xorl %eax, %eax
addq $0x78, %rsp
retq