// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/hashtable.c
// Function: gt_ht_insert
static int
gt_ht_insert(GtHashtable *ht, const void *elem, void **stor_ptr)
{
  htsize_t insert_pos;
  do {
    htsize_t elem_hash = gt_ht_elem_hash_idx(ht, elem), idx,
      link = elem_hash;
    if (HT_GET_LINK(ht, link) == free_mark)
    {
      /* we can insert at initial link and start a new chain */
      insert_pos = link;
      break;
    }
    else if (gt_ht_elem_hash_idx(ht, gt_ht_elem_ptr(ht, link)) != elem_hash)
    {
      /* relocate chained element */
      htsize_t reloc_idx = link, reloc_referent, new_idx;
      gt_ht_traverse_list_of_key(ht, gt_ht_elem_ptr(ht, reloc_idx),,
                              if (link == reloc_idx)
                                break;,
                              reloc_referent = idx;);
      new_idx = gt_ht_find_free_idx(ht, reloc_referent, -1);
      gt_ht_cp_elem(ht, new_idx, gt_ht_elem_ptr(ht, reloc_idx));
      HT_SET_LINK(ht, new_idx,
                  HT_GET_LINK(ht, reloc_idx));
      HT_SET_LINK(ht, reloc_referent, new_idx);
      insert_pos = link;
      break;
    }
    do {
      idx = link;
      link = HT_GET_LINK(ht, idx);
      if (!ht->table_info.cmp(elem, gt_ht_elem_ptr(ht, idx))) {
        if (stor_ptr)
          *stor_ptr = gt_ht_elem_ptr(ht, idx);
        /* don't insert elements already present! */
        return 0;
      }
    } while (link != end_mark);
    {
      /* we can search, starting at idx, for a
       * free position to insert elem */
      htsize_t referent = idx,
        new_idx = gt_ht_find_free_idx(ht, idx, +1);
      HT_SET_LINK(ht, referent, new_idx);
      insert_pos = new_idx;
    }
  } while (0);
  gt_ht_cp_elem(ht, insert_pos, elem);
  if (stor_ptr)
    *stor_ptr = gt_ht_elem_ptr(ht, insert_pos);
  HT_SET_LINK(ht, insert_pos, end_mark);
  ht->current_fill += 1;
  return 1;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x87250
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0x98(%rsp), %rdi
movl 0x78(%rsp), %esi
callq 0x87280
cmpl $-0x1, %eax
jne 0x875bc
movl 0x78(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x8781b
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rdi
movl 0x78(%rsp), %esi
callq 0x872a0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x87250
cmpl 0x80(%rsp), %eax
je 0x8772e
movl 0x78(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0x872a0
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x87250
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movl 0x58(%rsp), %esi
callq 0x87280
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
cmpl 0x74(%rsp), %eax
jne 0x87663
jmp 0x8767a
jmp 0x87665
movl 0x54(%rsp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x8763d
movl 0x58(%rsp), %eax
movl %eax, 0x70(%rsp)
movq 0x98(%rsp), %rdi
movl 0x70(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x898a0
movl %eax, 0x6c(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x98(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0x872a0
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
movq %rax, %rdx
callq 0x89940
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x98(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0x87280
movq 0x28(%rsp), %rdi
movl 0x34(%rsp), %esi
movl %eax, %edx
callq 0x89980
movq 0x98(%rsp), %rdi
movl 0x70(%rsp), %esi
movl 0x6c(%rsp), %edx
callq 0x89980
movl 0x78(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x8781b
jmp 0x87730
jmp 0x87732
movl 0x78(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x98(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x87280
movl %eax, 0x78(%rsp)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x872a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rax
callq *%rax
cmpl $0x0, %eax
jne 0x877cc
cmpq $0x0, 0x88(%rsp)
je 0x877bc
movq 0x98(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x872a0
movq %rax, %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0xa4(%rsp)
jmp 0x87899
jmp 0x877ce
cmpl $-0x2, 0x78(%rsp)
jne 0x87732
movl 0x7c(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x98(%rsp), %rdi
movl 0x7c(%rsp), %esi
movl $0x1, %edx
callq 0x898a0
movl %eax, 0x4c(%rsp)
movq 0x98(%rsp), %rdi
movl 0x50(%rsp), %esi
movl 0x4c(%rsp), %edx
callq 0x89980
movl 0x4c(%rsp), %eax
movl %eax, 0x84(%rsp)
movq 0x98(%rsp), %rdi
movl 0x84(%rsp), %esi
movq 0x90(%rsp), %rdx
callq 0x89940
cmpq $0x0, 0x88(%rsp)
je 0x87864
movq 0x98(%rsp), %rdi
movl 0x84(%rsp), %esi
callq 0x872a0
movq %rax, %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
movq 0x98(%rsp), %rdi
movl 0x84(%rsp), %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x89980
movq 0x98(%rsp), %rax
movl 0x54(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x54(%rax)
movl $0x1, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopl (%rax,%rax)