// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash10x.c
// Function: fillHashTable
void fillHashTable (void)
{
  int i, j ;
  long nHashes = 0 ;

  hashCodes = arrayCreate(hashNumber,U32*) ;
  arrayMax(hashCodes) = hashNumber ;
  
  U32 *count = arrp(hashDepth,1,U32) ;
  for (i = 1 ; i < hashNumber ; ++i, ++count)
    if (*count)
      { arr(hashCodes,i,U32*) = new(*count, U32) ;
	nHashes += *count ;
      }

  U32 *hashN = new0 (hashNumber, U32) ;
  for (i = 1 ; i < arrayMax(clusterBlocks) ; ++i)
    { ClusterBlock *b = arrp(clusterBlocks, i, ClusterBlock) ;
      ClusterHash *c = b->clusHash ;
      for (j = 0 ; j < b->nHash ; ++j, ++c)
	arr(hashCodes,c->hash,U32*)[hashN[c->hash]++] = i ;
    }
  fprintf (outFile, "  filled hash table: %ld hashes from %d barcodes in %d bins\n",
	  nHashes, arrayMax(clusterBlocks), hashNumber) ;
#ifdef CHECK
  for (i = 0 ; i < hashNumber ; ++i)
    if (hashN[i] != arr(hashDepth,i,U32))
      die ("hashN[%d] = %d != hashDepth[%d] = %d", i, hashN[i], i, arr(hashDepth,i,U32)) ;
#endif
  free (hashN) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq $0x0, -0x10(%rbp)
movl 0x11ee2(%rip), %edi     # 0x143e8
movl $0x8, %esi
callq 0xc1e0
movq %rax, 0x11ee1(%rip)     # 0x143f8
movl 0x11ecb(%rip), %ecx     # 0x143e8
movq 0x11ed4(%rip), %rax     # 0x143f8
movl %ecx, 0x18(%rax)
movq 0x11e92(%rip), %rax     # 0x143c0
movq 0x8(%rax), %rax
movq 0x11e87(%rip), %rcx     # 0x143c0
movl 0x14(%rcx), %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x11e8f(%rip), %eax     # 0x143e8
jae 0x25bf
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x25a6
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0xd1a0
movq %rax, %rdx
movq 0x11e79(%rip), %rax     # 0x143f8
movq 0x8(%rax), %rax
movl -0x4(%rbp), %ecx
movq 0x11e6b(%rip), %rsi     # 0x143f8
imull 0x14(%rsi), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x25a8
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x2550
movl 0x11e23(%rip), %eax     # 0x143e8
movl %eax, %edi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x20(%rbp)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0x11de2(%rip), %rcx     # 0x143c8
cmpl 0x18(%rcx), %eax
jge 0x269c
movq 0x11dd2(%rip), %rax     # 0x143c8
movq 0x8(%rax), %rax
movl -0x4(%rbp), %ecx
movq 0x11dc4(%rip), %rdx     # 0x143c8
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x268c
movl -0x4(%rbp), %edx
movq 0x11dbd(%rip), %rax     # 0x143f8
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
movq 0x11dac(%rip), %rsi     # 0x143f8
imull 0x14(%rsi), %ecx
movl %ecx, %ecx
movq (%rax,%rcx), %rax
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, %edi
movl (%rsi,%rdi,4), %ecx
movl %ecx, %r8d
addl $0x1, %r8d
movl %r8d, (%rsi,%rdi,4)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x2625
jmp 0x268e
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x25dc
movq 0x11d2d(%rip), %rdi     # 0x143d0
movq -0x10(%rbp), %rdx
movq 0x11d1a(%rip), %rax     # 0x143c8
movl 0x18(%rax), %ecx
movl 0x11d30(%rip), %r8d     # 0x143e8
leaq 0xbd59(%rip), %rsi      # 0xe418
movb $0x0, %al
callq 0x1150
movq -0x20(%rbp), %rdi
callq 0x1040
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)