// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash.c
// Function: hashDouble
static void hashDouble (TRUE_HASH *h)
{
  int oldsize, newsize ;
  long int hash, delta = 0 ;
  int *oldKeys, *kp ;
  int *oldValues, i ;
  HASHKEY hk ;

  oldsize = 1 << h->nbits ;
  ++h->nbits ;
  newsize = 1 << h->nbits ;
  h->mask = (1 << h->nbits) - 1 ;
  h->guard = (1 << (h->nbits - 1)) ;
  
  oldKeys = h->keys ;
  h->keys  = (int*) myalloc (sizeof(int)*newsize) ;
  memset (h->keys, 0, sizeof(int)*(1 << h->nbits)) ;
  oldValues = h->values ;
  h->values = (int*) myalloc (sizeof(int)*newsize) ;

  for (i = 0, kp = oldKeys ; i < oldsize ; ++i, ++kp)
    if (*kp && *kp != REMOVED)
      { hk.i = *kp ; HASH_FUNC(hk) ;
        while (TRUE)
          if (!h->keys[hash])  /* don't need to test REMOVED */
	    { h->keys[hash] = *kp ;
	      h->values[hash] = oldValues[i] ;
	      --h->guard ;	/* NB don't need to change h->n */
	      ++nAdded ;
	      break ;
	    }
	  else
            { nBounced++ ;
	      if (!delta) DELTA(hk) ;
	      hash = (hash + delta) & h->mask ;
	    }
      }

  free (oldKeys) ;
  free (oldValues) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movslq -0x10(%rbp), %rdi
shlq $0x2, %rdi
callq 0x8260
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x10d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movslq -0x10(%rbp), %rdi
shlq $0x2, %rdi
callq 0x8260
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x6624
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6608
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
je 0x6608
movq -0x30(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x48(%rbp)
movl $0xc, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x50(%rbp)
movslq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x50(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4c(%rbp)
cmpl $0x0, %eax
je 0x6502
movslq -0x50(%rbp), %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x50(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x50(%rbp)
jmp 0x64db
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x6576
movq -0x30(%rbp), %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq 0x7e1a(%rip), %rax      # 0xe380
addq $0x1, %rax
movq %rax, 0x7e0f(%rip)      # 0xe380
jmp 0x6606
movq 0x7dfb(%rip), %rax      # 0xe378
addq $0x1, %rax
movq %rax, 0x7df0(%rip)      # 0xe378
cmpq $0x0, -0x20(%rbp)
jne 0x65eb
movl $0x9, -0x54(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x58(%rbp)
movslq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x58(%rbp), %eax
sarl $0x7, %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x54(%rbp)
cmpl $0x0, %eax
je 0x65d5
movslq -0x58(%rbp), %rax
xorq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x58(%rbp), %eax
sarl $0x7, %eax
movl %eax, -0x58(%rbp)
jmp 0x65ae
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andq %rcx, %rax
orq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x6511
jmp 0x6608
jmp 0x660a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0x648b
movq -0x28(%rbp), %rdi
callq 0x1040
movq -0x38(%rbp), %rdi
callq 0x1040
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)