// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash10x.c
// Function: shareScan
void shareScan (int countMin, int countMax)
{
  U32 x ;
  int i, j, k, nTot = 0 ; 
  int *nBin = new0 (countMax-countMin, int) ;
  U32 *xBin = new (10*(countMax-countMin), U32) ;
  Array *aBin = new (10*(countMax-countMin), Array) ;
  for (x = countMax ; x < hashNumber ; x += 100)
    { int xCount = arr(hashDepth, x, U32) ;
      if (xCount < countMin || xCount >= countMax) continue ; /* out of range */
      int bin = xCount - countMin ;
      if (nBin[bin] == 10) continue ;                         /* already have enough */
      xBin[10*bin + nBin[bin]] = x ;
      Array a = countHashNeighbours (x) ;
      --*arrp(a,arrayMax(a)-1,int) ;                          /* remove top match; often wrong */
      while (arrayMax(a) && !arr(a,arrayMax(a)-1,int)) --arrayMax(a) ;
      aBin[10*bin + nBin[bin]++] = a ;
      if (++nTot == 10*(countMax-countMin)) break ;           /* done */
    }

  for (i = 0 ; i < countMax-countMin ; ++i)
    for (j = 0 ; j < nBin[i] ; ++j)
      { fprintf (outFile,"SHARE_SCAN %3d %24s ", i+countMin, cribText(xBin[10*i+j])) ;
	Array a = aBin[10*i+j] ;
	for (k = 1 ; k < arrayMax(a) ; ++k) fprintf (outFile," %d", arr(a,k,int)) ;
	fputc ('\n', outFile) ;
      }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x8(%rbp), %eax
subl -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x28(%rbp)
movl -0x8(%rbp), %eax
subl -0x4(%rbp), %eax
imull $0xa, %eax, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0xd1a0
movq %rax, -0x30(%rbp)
movl -0x8(%rbp), %eax
subl -0x4(%rbp), %eax
imull $0xa, %eax, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0xd1a0
movq %rax, -0x38(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xfdfb(%rip), %eax      # 0x143e8
jae 0x4737
movq 0xfdc6(%rip), %rax      # 0x143c0
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
movq 0xfdb8(%rip), %rdx      # 0x143c0
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
movl (%rax,%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jl 0x4624
movl -0x3c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x4629
jmp 0x4729
movl -0x3c(%rbp), %eax
subl -0x4(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movslq -0x40(%rbp), %rcx
cmpl $0xa, (%rax,%rcx,4)
jne 0x4645
jmp 0x4729
movl -0xc(%rbp), %edx
movq -0x30(%rbp), %rax
imull $0xa, -0x40(%rbp), %ecx
movq -0x28(%rbp), %rsi
movslq -0x40(%rbp), %rdi
addl (%rsi,%rdi,4), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %edi
callq 0x38d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl $0x1, %ecx
movq -0x48(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx)
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0x51(%rbp)
je 0x46cb
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl $0x1, %ecx
movq -0x48(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx)
setne %al
xorb $-0x1, %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x46d4
jmp 0x46e3
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0x4693
movq -0x48(%rbp), %rdx
movq -0x38(%rbp), %rax
imull $0xa, -0x40(%rbp), %ecx
movq -0x28(%rbp), %rdi
movslq -0x40(%rbp), %r8
movl (%rdi,%r8,4), %esi
movl %esi, %r9d
addl $0x1, %r9d
movl %r9d, (%rdi,%r8,4)
addl %esi, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %ecx
subl -0x4(%rbp), %ecx
imull $0xa, %ecx, %ecx
cmpl %ecx, %eax
jne 0x4727
jmp 0x4737
jmp 0x4729
movl -0xc(%rbp), %eax
addl $0x64, %eax
movl %eax, -0xc(%rbp)
jmp 0x45e4
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0x8(%rbp), %ecx
subl -0x4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x483d
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x28(%rbp), %rcx
movslq -0x10(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x482d
movq 0xfc5f(%rip), %rax      # 0x143d0
movq %rax, -0x60(%rbp)
movl -0x10(%rbp), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x30(%rbp), %rax
imull $0xa, -0x10(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edi
callq 0x3440
movq -0x60(%rbp), %rdi
movl -0x58(%rbp), %edx
movq %rax, %rcx
leaq 0x9ff5(%rip), %rsi      # 0xe79a
movb $0x0, %al
callq 0x1150
movq -0x38(%rbp), %rax
imull $0xa, -0x10(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x480e
movq 0xfbf4(%rip), %rdi      # 0x143d0
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movq -0x50(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %edx
leaq 0x9ca5(%rip), %rsi      # 0xe4a1
movb $0x0, %al
callq 0x1150
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x47c9
movq 0xfbbb(%rip), %rsi      # 0x143d0
movl $0xa, %edi
callq 0x1100
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4756
jmp 0x482f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x473e
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)