// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/uint64hashtable.c
// Function: gt_uint64hashtable_insertionindex
GtUword gt_uint64hashtable_insertionindex(GtUint64hashtable *table,
                                                uint64_t key)
{
  gt_assert(table != NULL);
  if (key > 0)
  {
    size_t pos, hashadd = 0, iteration;
    const uint64_t emptymark = 0;

#ifndef NDEBUG
    size_t first_pos;
#endif
    pos = gt_uint64hashtable_h1(key, table->alloc);
#ifndef NDEBUG
    first_pos = pos;
#endif
    for (iteration = 0; iteration < table->alloc; iteration++)
    {
      gt_assert(pos < table->alloc);
      if (table->hspace[pos].key == emptymark)
      {
        return ULONG_MAX;
      }
      if (table->hspace[pos].key == key)
      {
        gt_assert(table->hspace[pos].count > 0);
        return --table->hspace[pos].count;
      }
      table->countcollisions++;
      if (hashadd == 0)
      {
        hashadd = gt_uint64hashtable_h2(key, table->alloc);
      }
      gt_assert(hashadd > 0);
      pos += hashadd;
      if (pos >= table->alloc)
      {
        pos -= table->alloc;
      }
      gt_assert(pos != first_pos);
    }
    fprintf(stderr, "function %s, file %s, line %d.\n"
                    "Cannot find empty slot in hashtable: "
                    "This is probably a bug, please report it.\n",
                    __func__, __FILE__, __LINE__);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  } else
  {
    gt_assert(table->zero_occurs);
    gt_assert(table->zero_count > 0);
    return --table->zero_count;
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x1f560e
movq 0x4469c3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320a2c(%rip), %rsi    # 0x516013
leaq 0x364c9a(%rip), %rdx    # 0x55a288
leaq 0x374d63(%rip), %rcx    # 0x56a358
leaq 0x374c1c(%rip), %r8     # 0x56a218
movl $0xea, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5610
cmpq $0x0, 0x30(%rsp)
jbe 0x1f58c1
movq $0x0, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1f5550
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x1f588b
jmp 0x1f566f
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1f56b7
movq 0x44691a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320983(%rip), %rsi    # 0x516013
leaq 0x374bba(%rip), %rdx    # 0x56a251
leaq 0x374cba(%rip), %rcx    # 0x56a358
leaq 0x374b73(%rip), %r8     # 0x56a218
movl $0xf9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f56b9
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x1f56e1
movq $-0x1, 0x40(%rsp)
jmp 0x1f5966
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x1f5784
jmp 0x1f5705
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
ja 0x1f5758
movq 0x446879(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3208e2(%rip), %rsi    # 0x516013
leaq 0x374b2c(%rip), %rdx    # 0x56a264
leaq 0x374c19(%rip), %rcx    # 0x56a358
leaq 0x374ad2(%rip), %r8     # 0x56a218
movl $0x100, %r9d            # imm = 0x100
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f575a
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x28(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0x8(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x8(%rcx)
movq %rax, 0x40(%rsp)
jmp 0x1f5966
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x20(%rsp)
jne 0x1f57b5
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1f5580
movq %rax, 0x20(%rsp)
jmp 0x1f57b7
cmpq $0x0, 0x20(%rsp)
ja 0x1f57f7
movq 0x4467da(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320843(%rip), %rsi    # 0x516013
leaq 0x374aaa(%rip), %rdx    # 0x56a281
leaq 0x374b7a(%rip), %rcx    # 0x56a358
leaq 0x374a33(%rip), %r8     # 0x56a218
movl $0x108, %r9d            # imm = 0x108
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f57f9
movq 0x20(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1f582e
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x28(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x1f5830
movq 0x28(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x1f5874
movq 0x44675d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3207c6(%rip), %rsi    # 0x516013
leaq 0x374a39(%rip), %rdx    # 0x56a28d
leaq 0x374afd(%rip), %rcx    # 0x56a358
leaq 0x3749b6(%rip), %r8     # 0x56a218
movl $0x10e, %r9d            # imm = 0x10E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5876
jmp 0x1f5878
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x1f5659
movq 0x44670e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x374ade(%rip), %rsi    # 0x56a37a
leaq 0x374ab5(%rip), %rdx    # 0x56a358
leaq 0x37496e(%rip), %rcx    # 0x56a218
movl $0x113, %r8d            # imm = 0x113
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
jmp 0x1f58c3
movq 0x38(%rsp), %rax
testb $0x1, 0x30(%rax)
jne 0x1f5906
movq 0x4466cb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320734(%rip), %rsi    # 0x516013
leaq 0x374b03(%rip), %rdx    # 0x56a3e9
leaq 0x374a6b(%rip), %rcx    # 0x56a358
leaq 0x374924(%rip), %r8     # 0x56a218
movl $0x117, %r9d            # imm = 0x117
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5908
jmp 0x1f590a
movq 0x38(%rsp), %rax
cmpq $0x0, 0x20(%rax)
ja 0x1f594e
movq 0x446683(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3206ec(%rip), %rsi    # 0x516013
leaq 0x374a14(%rip), %rdx    # 0x56a342
leaq 0x374a23(%rip), %rcx    # 0x56a358
leaq 0x3748dc(%rip), %r8     # 0x56a218
movl $0x118, %r9d            # imm = 0x118
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5950
movq 0x38(%rsp), %rcx
movq 0x20(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rcx)
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq