// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash10x.c
// Function: codeExplore
void codeExplore (int code, int clusterThreshold) /* clusters this barcode's good hashes */
{
  ClusterBlock *b = arrp(clusterBlocks, code, ClusterBlock), *c ;
  ClusterHash *cb = b->clusHash, *cc ;
  int i, j ;
  U32 x, nc ;
  int *countShare = new0 (arrayMax(clusterBlocks), int) ; /* number of hashes linking to code */
  int *minShare = new0 (arrayMax(clusterBlocks), int) ; /* lowest hash shared with code */
  Array clusterMin = arrayCreate (64, int) ;

  int n = nGoodHashes[code] ; if (!n) return ;
  int *minShareCount = new (n, int) ;
  U16 *g = goodHashes[code] ;
  
  for (i = 0 ; i < n ; ++i) b->clusHash[goodHashes[code][i]].subCluster = 0 ; /* wipe existing */

  b->nSubCluster = 0 ;
  //  if (!b->cluster) b->cluster = arrayCreate (32, ClusterInfo) ;
  b->pointToMin = 0.0 ;
  int nSubClustered = 0 ;
  for (i = 0 ; i < n ; ++i)	// shouldn't this be from i = 0 ?
    { x = b->clusHash[g[i]].hash ;
      nc = arr(hashDepth, x, U32) ;
      memset (minShareCount, 0, n*sizeof(int)) ;
					       
      for (j = 0 ; j < nc ; ++j)
	{ int cj = arr(hashCodes, x, U32*)[j] ;
	  if (cj == code) continue ;
	  if (!minShare[cj]) minShare[cj] = i + 1 ;
	  ++minShareCount[minShare[cj]-1] ;
	  ++countShare[cj] ;
	}

      int msMax = 0, msTot = 0, msBest ;
      for (j = 0 ; j < i ; ++j)
	{ if (minShareCount[j] > msMax)  { msBest = j ; msMax = minShareCount[j] ; }
	  msTot += minShareCount[j] ;
	}
      if (msMax >= clusterThreshold)
	{ ClusterHash *ch = &b->clusHash[g[msBest]] ;
	  if (!ch->subCluster)	/* create a new cluster */
	    { if (++b->nSubCluster > U8MAX) /* abandon this clustering */
		{ b->nSubCluster = 0 ; nSubClustered = 0 ;
		  for (j = 0 ; j < i ; ++j) b->clusHash[g[j]].subCluster = 0 ;
		  fprintf (stderr, "    code %d with %d good hashes has too many clusters\n",
			   code, nGoodHashes[code]) ;
		  break ;
		}
	      ch->subCluster = b->nSubCluster ; ++nSubClustered ;
	      array(clusterMin,b->nSubCluster,int) = msBest ;
	    }
	  b->clusHash[g[i]].subCluster = ch->subCluster ; ++nSubClustered ;
	  b->pointToMin += minShareCount[arr(clusterMin,ch->subCluster,int)] / (double)msTot ;
	}
    }

  if (b->nSubCluster)
    fprintf (outFile, "  code %d with %d hashes, %d good hashes, of which %d cluster into %d raw",
	     code, b->nHash, nGoodHashes[code], nSubClustered, b->nSubCluster) ;
  else
    fprintf (outFile, "  code %d with %d hashes, %d good hashes, 0 clusters\n",
	     code, b->nHash, nGoodHashes[code]) ;

  if (!b->nSubCluster) return ;	/* nothing to do */
  int *readMap = new0 (b->nRead, int), *trueCluster = new (b->nSubCluster+1, int) ;
  int *deadCluster = new0 (b->nSubCluster+1, int) ;
  for (i = 0 ; i <= b->nSubCluster ; ++i) trueCluster[i] = i ; /* initialisation */
  for (i = 0 ; i < b->nHash ; ++i)
    { int hashCluster = trueCluster[b->clusHash[i].subCluster] ; if (!hashCluster) continue ;
      int readCluster = trueCluster[readMap[b->clusHash[i].read]] ;
      if (hashCluster == readCluster) continue ;
      else if (!readCluster) readMap[b->clusHash[i].read] = hashCluster ;
      else			/* merge clusters hashCluster and readCluster */
	{ if (hashCluster > readCluster)
	    { int t = hashCluster ; hashCluster = readCluster ; readCluster = t ; }
	  for (j = 1 ; j <= b->nSubCluster ; ++j)
	    if (trueCluster[j] == readCluster) trueCluster[j] = hashCluster ;
	  deadCluster[readCluster] = 1 ;
	}
    }

  /* now compactify trueCluster, reusing deadCluster[] for the map removing dead indices */
  for (j = 1 ; j <= b->nSubCluster ; ++j) deadCluster[j] = deadCluster[j-1] + 1 - deadCluster[j] ;
  for (j = 1 ; j <= b->nSubCluster ; ++j) trueCluster[j] = deadCluster[trueCluster[j]] ;
  b->nSubCluster = deadCluster[b->nSubCluster] ;
  for (i = 0 ; i < b->nHash ; ++i) b->clusHash[i].subCluster = trueCluster[b->clusHash[i].subCluster] ;

  fprintf (outFile, " then %d merged clusters\n", b->nSubCluster) ; fflush (stdout) ;

  /* now go through countShare and identify clusters that share at least 3 hashes */

  Array h = arrayCreate (256, int) ;
  Array z = arrayCreate (1024, CountStruct) ;
  for (i = 0 ; i < arrayMax(clusterBlocks) ; ++i)
    { ++array(h, countShare[i], int) ;
      if (countShare[i] > 0)
	{ CountStruct *c = arrayp(z,arrayMax(z), CountStruct) ;
	  c->i = i ; c->count = countShare[i] ;
	}
    }
  histogramReport ("COUNT_SHARE", h) ; arrayDestroy (h) ;
  codeClusterReport (code, code+1) ;
  arraySort (z, compareCount) ;
  for (j = arrayMax(z) ; j-- ; ) /* run backwards through z */
    { CountStruct *cz = arrp(z, j, CountStruct) ;
      fprintf (outFile, "  SHARE code %d shared_hashes %d counts", cz->i, cz->count) ;
      int nA = 0, nB = 0 ;
      ClusterBlock *czb = arrp(clusterBlocks, cz->i, ClusterBlock) ;
      for (i = 0 ; i < czb->nHash ; ++i)
	if (cribType[czb->clusHash[i].hash] == CRIB_HTA) ++nA ;
	else if (cribType[czb->clusHash[i].hash] == CRIB_HTB) ++nB ;
      fprintf (outFile, " %d htA %d htB minShare %d %s\n", nA, nB, minShare[cz->i]-1,
	       cribText (b->clusHash[g[minShare[cz->i]-1]].hash)) ;
      if (cz->count < params.clusterThreshold) break ;
    }
  
  free (readMap) ; free(trueCluster) ; free(deadCluster) ;
  free (minShare) ; free (countShare) ; free (minShareCount) ;
  arrayDestroy (clusterMin) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq 0xc780(%rip), %rax      # 0x143c8
movq 0x8(%rax), %rax
movl -0x4(%rbp), %ecx
movq 0xc772(%rip), %rdx      # 0x143c8
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq 0xc751(%rip), %rax      # 0x143c8
movslq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x40(%rbp)
movq 0xc738(%rip), %rax      # 0x143c8
movslq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x48(%rbp)
movl $0x40, %edi
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0x50(%rbp)
movq 0xc7a4(%rip), %rax      # 0x14460
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jne 0x7cd1
jmp 0x8701
movslq -0x54(%rbp), %rdi
shlq $0x2, %rdi
callq 0xd1a0
movq %rax, -0x60(%rbp)
movq 0xc76f(%rip), %rax      # 0x14458
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x7d33
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0xc745(%rip), %rcx      # 0x14458
movslq -0x4(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2c(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movb $0x0, 0x6(%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7cfc
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x8031
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movl (%rax,%rcx,8), %eax
movl %eax, -0x34(%rbp)
movq 0xc63b(%rip), %rax      # 0x143c0
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
movq 0xc62d(%rip), %rdx      # 0x143c0
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
movl (%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
movq -0x60(%rbp), %rdi
movslq -0x54(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x10f0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x38(%rbp), %eax
jae 0x7e54
movq 0xc62c(%rip), %rax      # 0x143f8
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
movq 0xc61e(%rip), %rdx      # 0x143f8
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
movq (%rax,%rcx), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x7df8
jmp 0x7e46
movq -0x48(%rbp), %rax
movslq -0x70(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x7e17
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movq -0x48(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x70(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7db9
movl $0x0, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7eb1
movq -0x60(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x74(%rbp), %eax
jle 0x7e95
movl -0x30(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x60(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x74(%rbp)
movq -0x60(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x78(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7e69
movl -0x74(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x8021
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movslq -0x7c(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpb $0x0, 0x6(%rax)
jne 0x7fb4
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x8(%rcx)
cmpl $0xff, %eax
jbe 0x7f77
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7f49
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movb $0x0, 0x6(%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7f1d
movq 0xb0a8(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movq 0xc503(%rip), %rax      # 0x14460
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0x68da(%rip), %rsi      # 0xe845
movb $0x0, %al
callq 0x1150
jmp 0x8031
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x6(%rax)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0xe4(%rbp)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xc640
movl -0xe4(%rbp), %ecx
movl %ecx, (%rax)
movq -0x88(%rbp), %rax
movb 0x6(%rax), %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movslq -0x2c(%rbp), %rsi
movzwl (%rcx,%rsi,2), %ecx
movb %dl, 0x6(%rax,%rcx,8)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x88(%rbp), %rdx
movzbl 0x6(%rdx), %edx
movq -0x50(%rbp), %rsi
imull 0x14(%rsi), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
cvtsi2sdl -0x78(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x8023
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7d58
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x8079
movq 0xc38e(%rip), %rdi      # 0x143d0
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq 0xc40d(%rip), %rax      # 0x14460
movslq -0x4(%rbp), %rsi
movl (%rax,%rsi,4), %r8d
movl -0x6c(%rbp), %r9d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x74c5(%rip), %rsi      # 0xf532
movl %eax, (%rsp)
movb $0x0, %al
callq 0x1150
jmp 0x80a7
movq 0xc350(%rip), %rdi      # 0x143d0
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq 0xc3cf(%rip), %rax      # 0x14460
movslq -0x4(%rbp), %rsi
movl (%rax,%rsi,4), %r8d
leaq 0x74dc(%rip), %rsi      # 0xf57c
movb $0x0, %al
callq 0x1150
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x80b6
jmp 0x8701
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0xd1a0
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0xa0(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
ja 0x813b
movl -0x2c(%rbp), %edx
movq -0x98(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8113
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x8292
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movzbl 0x6(%rcx,%rdx,8), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jne 0x8181
jmp 0x8284
movq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq 0x10(%rdx), %rdx
movslq -0x2c(%rbp), %rsi
movzwl 0x4(%rdx,%rsi,8), %edx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa8(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jne 0x81c0
jmp 0x8284
cmpl $0x0, -0xa8(%rbp)
jne 0x81ef
movl -0xa4(%rbp), %edx
movq -0x90(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2c(%rbp), %rsi
movzwl 0x4(%rcx,%rsi,8), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x8280
movl -0xa4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jle 0x8221
movl -0xa4(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
ja 0x826b
movq -0x98(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0xa8(%rbp), %eax
jne 0x825e
movl -0xa4(%rbp), %edx
movq -0x98(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x8260
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8228
movq -0xa0(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x8282
jmp 0x8284
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8142
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
ja 0x82e2
movq -0xa0(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movq -0xa0(%rbp), %rax
movslq -0x30(%rbp), %rcx
subl (%rax,%rcx,4), %edx
movq -0xa0(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8299
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
ja 0x8327
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edx
movq -0x98(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x82e9
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x838a
movq -0x98(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movzbl 0x6(%rcx,%rdx,8), %ecx
movl (%rax,%rcx,4), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, 0x6(%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8346
movq 0xc03f(%rip), %rdi      # 0x143d0
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x656f(%rip), %rsi      # 0xe90e
movb $0x0, %al
callq 0x1150
movq 0xac23(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
callq 0x11a0
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0xb8(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x8, %esi
callq 0xc1e0
movq %rax, -0xc0(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq 0xbfd6(%rip), %rcx      # 0x143c8
cmpl 0x18(%rcx), %eax
jge 0x8471
movq -0xb8(%rbp), %rdi
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0xc640
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x8461
movq -0xc0(%rbp), %rdi
movq -0xc0(%rbp), %rax
movl 0x18(%rax), %esi
callq 0xc640
movq %rax, -0xc8(%rbp)
movl -0x2c(%rbp), %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0xc8(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x8463
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x83e8
movq -0xb8(%rbp), %rsi
leaq 0x7133(%rip), %rdi      # 0xf5b2
callq 0x26e0
movq -0xb8(%rbp), %rdi
callq 0xc3e0
movl -0x4(%rbp), %edi
movl -0x4(%rbp), %esi
addl $0x1, %esi
callq 0x5320
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0xc0(%rbp), %rax
movslq 0x18(%rax), %rsi
movq -0xc0(%rbp), %rax
movslq 0x14(%rax), %rdx
leaq 0x34a(%rip), %rcx       # 0x8810
callq 0x1090
movq -0xc0(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x30(%rbp)
cmpl $0x0, %eax
je 0x86b9
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x30(%rbp), %ecx
movq -0xc0(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq 0xbeb7(%rip), %rdi      # 0x143d0
movq -0xd0(%rbp), %rax
movl (%rax), %edx
movq -0xd0(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x708b(%rip), %rsi      # 0xf5be
movb $0x0, %al
callq 0x1150
movl $0x0, -0xd4(%rbp)
movl $0x0, -0xd8(%rbp)
movq 0xbe73(%rip), %rax      # 0x143c8
movq 0x8(%rax), %rax
movq -0xd0(%rbp), %rcx
movl (%rcx), %ecx
movq 0xbe5f(%rip), %rdx      # 0x143c8
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0xe0(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x8606
movq 0xbe71(%rip), %rax      # 0x14408
movq -0xe0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movl (%rcx,%rdx,8), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x85c3
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x85f6
movq 0xbe3e(%rip), %rax      # 0x14408
movq -0xe0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movl (%rcx,%rdx,8), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x85f4
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x85f6
jmp 0x85f8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8581
movq 0xbdc3(%rip), %rax      # 0x143d0
movq %rax, -0xf8(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xd8(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x48(%rbp), %rax
movq -0xd0(%rbp), %rcx
movslq (%rcx), %rcx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
movl %eax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq -0xd0(%rbp), %rsi
movslq (%rsi), %rsi
movl (%rdx,%rsi,4), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
movl (%rax,%rcx,8), %edi
callq 0x3440
movq -0xf8(%rbp), %rdi
movl -0xf0(%rbp), %edx
movl -0xec(%rbp), %ecx
movl -0xe8(%rbp), %r8d
movq %rax, %r9
leaq 0x6f4d(%rip), %rsi      # 0xf5e6
movb $0x0, %al
callq 0x1150
movq -0xd0(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xbdd8(%rip), %eax      # 0x14488
jge 0x86b4
jmp 0x86b9
jmp 0x84d8
movq -0x90(%rbp), %rdi
callq 0x1040
movq -0x98(%rbp), %rdi
callq 0x1040
movq -0xa0(%rbp), %rdi
callq 0x1040
movq -0x48(%rbp), %rdi
callq 0x1040
movq -0x40(%rbp), %rdi
callq 0x1040
movq -0x60(%rbp), %rdi
callq 0x1040
movq -0x50(%rbp), %rdi
callq 0xc3e0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)