// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/uint64hashtable.c
// Function: gt_uint64hashtable_search
bool gt_uint64hashtable_search(GtUint64hashtable *table, uint64_t key,
                               bool insert_if_not_found)
{
  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)
      {
        if (insert_if_not_found)
        {
          table->allentries++;
          table->hspace[pos].key = key;
          table->hspace[pos].count++;
        }
        return false;
      }
      if (table->hspace[pos].key == key)
      {
        gt_assert(table->hspace[pos].count > 0);
        table->hspace[pos].count++;
        return true;
      }
      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 at "
                    "https://github.com/genometools/genometools/issues.\n",
                    __func__, __FILE__, __LINE__);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  } else
  {
    if (!table->zero_occurs)
    {
      if (insert_if_not_found)
      {
        table->zero_occurs = true;
        table->zero_count++;
      }
      return false;
    } else
    {
      gt_assert(table->zero_count > 0);
      table->zero_count++;
      return true;
    }
  }
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x1f51a6
movq 0x446e2b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320e94(%rip), %rsi    # 0x516013
leaq 0x365102(%rip), %rdx    # 0x55a288
leaq 0x3750aa(%rip), %rcx    # 0x56a237
leaq 0x375084(%rip), %r8     # 0x56a218
movl $0xa1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f51a8
cmpq $0x0, 0x30(%rsp)
jbe 0x1f54a7
movq $0x0, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1f5550
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x1f5471
jmp 0x1f5206
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1f524e
movq 0x446d83(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320dec(%rip), %rsi    # 0x516013
leaq 0x375023(%rip), %rdx    # 0x56a251
leaq 0x375002(%rip), %rcx    # 0x56a237
leaq 0x374fdc(%rip), %r8     # 0x56a218
movl $0xb0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5250
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x1f52c8
testb $0x1, 0x2f(%rsp)
je 0x1f52be
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movb $0x0, 0x47(%rsp)
jmp 0x1f5538
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x1f536b
jmp 0x1f52ec
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
ja 0x1f533f
movq 0x446c92(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320cfb(%rip), %rsi    # 0x516013
leaq 0x374f45(%rip), %rdx    # 0x56a264
leaq 0x374f11(%rip), %rcx    # 0x56a237
leaq 0x374eeb(%rip), %r8     # 0x56a218
movl $0xbd, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5341
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movb $0x1, 0x47(%rsp)
jmp 0x1f5538
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x18(%rsp)
jne 0x1f539c
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1f5580
movq %rax, 0x18(%rsp)
jmp 0x1f539e
cmpq $0x0, 0x18(%rsp)
ja 0x1f53de
movq 0x446bf3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320c5c(%rip), %rsi    # 0x516013
leaq 0x374ec3(%rip), %rdx    # 0x56a281
leaq 0x374e72(%rip), %rcx    # 0x56a237
leaq 0x374e4c(%rip), %r8     # 0x56a218
movl $0xc6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f53e0
movq 0x18(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1f5415
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x1f5417
movq 0x20(%rsp), %rax
cmpq (%rsp), %rax
jne 0x1f545a
movq 0x446b77(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320be0(%rip), %rsi    # 0x516013
leaq 0x374e53(%rip), %rdx    # 0x56a28d
leaq 0x374df6(%rip), %rcx    # 0x56a237
leaq 0x374dd0(%rip), %r8     # 0x56a218
movl $0xcc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f545c
jmp 0x1f545e
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1f51f0
movq 0x446b28(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x374e1c(%rip), %rsi    # 0x56a29e
leaq 0x374dae(%rip), %rdx    # 0x56a237
leaq 0x374d88(%rip), %rcx    # 0x56a218
movl $0xd2, %r8d
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x38(%rsp), %rax
testb $0x1, 0x30(%rax)
jne 0x1f54da
testb $0x1, 0x2f(%rsp)
je 0x1f54d3
movq 0x38(%rsp), %rax
movb $0x1, 0x30(%rax)
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movb $0x0, 0x47(%rsp)
jmp 0x1f5538
jmp 0x1f54dc
movq 0x38(%rsp), %rax
cmpq $0x0, 0x20(%rax)
ja 0x1f5520
movq 0x446ab1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320b1a(%rip), %rsi    # 0x516013
leaq 0x374e42(%rip), %rdx    # 0x56a342
leaq 0x374d30(%rip), %rcx    # 0x56a237
leaq 0x374d0a(%rip), %r8     # 0x56a218
movl $0xe0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f5522
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)