// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/hash10x.c
// Function: cribSummary
void cribSummary (void)
{
  if (!crib) { fprintf (stderr, "cribSummary requires crib\n") ; return ; }
  int i, j, nBaseCode = 0, nSubClusterCode = 0 ;
  U64 countBase[CRIBTYPE_MAX], countCluster[CRIBTYPE_MAX] ;
  HASH clusterHashes[CRIBTYPE_MAX], baseHashes[CRIBTYPE_MAX] ;
  for (i = 0 ; i < CRIBTYPE_MAX ; ++i)
    { countBase[i] = countCluster[i] = 0 ;
      clusterHashes[i] = hashCreate (1<<20) ;
      baseHashes[i] = hashCreate (1<<20) ;
    }
  fprintf (stderr, "made hash objects\n") ;
  for (i = 0 ; i < arrayMax(clusterBlocks) ; ++i)
    { ClusterBlock *b = arrp(clusterBlocks, i, ClusterBlock) ;
      if (b->clusterParent)
	{ ++nSubClusterCode ;
	  for (j = 0 ; j < b->nHash ; ++j)
	    { U32 h = b->clusHash[j].hash ;
	      ++countCluster[cribType[h]] ;
	      hashAdd (clusterHashes[cribType[h]], HASH_INT(h)) ;
	    }
	}
      else
	{ ++nBaseCode ;
	  for (j = 0 ; j < b->nHash ; ++j)
	    { U32 h = b->clusHash[j].hash ;
	      ++countBase[cribType[h]] ;
	      hashAdd (baseHashes[cribType[h]], HASH_INT(h)) ;
	    }	      
	}
    }
  fprintf (outFile, "  %d base codes ", nBaseCode) ;
  for (i = 0 ; i < CRIBTYPE_MAX ; ++i)
    fprintf (outFile, " %s %llu %d %.1f",
	     cribTypeName[i], countBase[i], hashCount(baseHashes[i]),
	     countBase[i] / (double)hashCount(baseHashes[i])) ;
  fprintf (outFile, "\n  %d cluster codes ", nSubClusterCode) ;
  for (i = 0 ; i < CRIBTYPE_MAX ; ++i)
    fprintf (outFile, " %s %llu %d %.1f",
	     cribTypeName[i], countCluster[i], hashCount(clusterHashes[i]),
	     countCluster[i] / (double)hashCount(clusterHashes[i])) ;
  fputc ('\n', outFile) ;
for (i = 0 ; i < CRIBTYPE_MAX ; ++i)
    { hashDestroy (baseHashes[i]) ; hashDestroy (clusterHashes[i]) ; }
}

// Assembly:
cmpq $0x0, 0xbd0c(%rip)      # 0x103d0
jne 0x46e2
movq 0xa923(%rip), %rax      # 0xeff0
movq (%rax), %rcx
leaq 0x53aa(%rip), %rdi      # 0x9a81
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
jmp 0x1260
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
xorl %ebx, %ebx
cmpq $0x5, %rbx
je 0x4730
andq $0x0, 0x80(%rsp,%rbx,8)
andq $0x0, 0xb0(%rsp,%rbx,8)
movl $0x100000, %edi         # imm = 0x100000
callq 0x77e8
movq %rax, 0x50(%rsp,%rbx,8)
movl $0x100000, %edi         # imm = 0x100000
callq 0x77e8
movq %rax, 0x20(%rsp,%rbx,8)
incq %rbx
jmp 0x46f5
movq 0xa8b9(%rip), %rax      # 0xeff0
movq (%rax), %rcx
leaq 0x535b(%rip), %rdi      # 0x9a9c
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0xbc38(%rip), %rax      # 0x10398
cmpl 0x18(%rax), %ebx
jge 0x481b
movq 0x8(%rax), %r14
movslq 0x14(%rax), %rax
movslq %ebx, %r15
imulq %rax, %r15
cmpl $0x0, 0xc(%r14,%r15)
je 0x47d0
xorl %r12d, %r12d
movl 0x4(%r14,%r15), %eax
cmpq %rax, %r12
jae 0x47c2
movq 0x10(%r14,%r15), %rax
movl (%rax,%r12,8), %esi
movq 0xbc3b(%rip), %rax      # 0x103d8
movzbl (%rax,%rsi), %eax
shll $0x3, %eax
incq 0x80(%rsp,%rax)
movq 0x50(%rsp,%rax), %rdi
xorq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
callq 0x798f
incq %r12
jmp 0x4783
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
jmp 0x4814
xorl %r12d, %r12d
movl 0x4(%r14,%r15), %eax
cmpq %rax, %r12
jae 0x4812
movq 0x10(%r14,%r15), %rax
movl (%rax,%r12,8), %esi
movq 0xbbeb(%rip), %rax      # 0x103d8
movzbl (%rax,%rsi), %eax
shll $0x3, %eax
incq 0xb0(%rsp,%rax)
movq 0x20(%rsp,%rax), %rdi
xorq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
callq 0x798f
incq %r12
jmp 0x47d3
incl %ebp
incl %ebx
jmp 0x4759
movq 0xbb7e(%rip), %rdi      # 0x103a0
leaq 0x5286(%rip), %rsi      # 0x9aaf
xorl %r14d, %r14d
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
movq 0xbb64(%rip), %r15      # 0x103a0
cmpq $0x28, %r14
je 0x48c8
leaq 0xa553(%rip), %rax      # 0xeda0
movq (%r14,%rax), %r12
movq 0xb0(%rsp,%r14), %r13
movq 0x20(%rsp,%r14), %rbp
movq %rbp, %rdi
callq 0x7cbc
movl %eax, %ebx
movq %r13, %xmm0
punpckldq 0x479b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x47a3(%rip), %xmm0     # 0x9020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movq %rbp, %rdi
callq 0x7cbc
cvtsi2sd %eax, %xmm1
movapd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movq %r15, %rdi
leaq 0x5211(%rip), %rsi      # 0x9ac0
movq %r12, %rdx
movq %r13, %rcx
movl %ebx, %r8d
movb $0x1, %al
callq 0x1150
addq $0x8, %r14
jmp 0x4835
leaq 0x5202(%rip), %rsi      # 0x9ad1
xorl %ebx, %ebx
movq %r15, %rdi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x1150
movq 0xbab9(%rip), %r14      # 0x103a0
cmpq $0x28, %rbx
je 0x4973
leaq 0xa4a8(%rip), %rax      # 0xeda0
movq (%rbx,%rax), %r15
movq 0x80(%rsp,%rbx), %r12
movq 0x50(%rsp,%rbx), %r13
movq %r13, %rdi
callq 0x7cbc
movl %eax, %ebp
movq %r12, %xmm0
punpckldq 0x46f0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x46f8(%rip), %xmm0     # 0x9020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movq %r13, %rdi
callq 0x7cbc
cvtsi2sd %eax, %xmm1
movapd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movq %r14, %rdi
leaq 0x5166(%rip), %rsi      # 0x9ac0
movq %r15, %rdx
movq %r12, %rcx
movl %ebp, %r8d
movb $0x1, %al
callq 0x1150
addq $0x8, %rbx
jmp 0x48e0
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x1100
xorl %ebx, %ebx
cmpq $0x5, %rbx
je 0x499f
movq 0x20(%rsp,%rbx,8), %rdi
callq 0x7894
movq 0x50(%rsp,%rbx,8), %rdi
callq 0x7894
incq %rbx
jmp 0x4980
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq