// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash10x.c
// Function: cribBuild
void cribBuild (FILE *f1, FILE *f2)
{
  crib = new0 (hashNumber, CribInfo) ; cribAddGenome (f1, crib) ;
  CribInfo *crib2 = new0 (hashNumber, CribInfo) ; cribAddGenome (f2, crib2) ;

  cribType = new0 (hashNumber, U8) ;
  Array aHom = arrayCreate (256, int), aHet = arrayCreate (256, int) ;
  Array aErr = arrayCreate (256, int), aMul = arrayCreate (256, int) ;
  int i ;
  for (i = 1 ; i < hashNumber ; ++i)
    if (crib[i].chr == 0 && crib2[i].chr == 0)
      { cribType[i] = CRIB_ERR ; ++array(aErr, arr(hashDepth, i, int), int) ; }
    else if (crib[i].chr > 0 && crib2[i].chr > 0)
      { cribType[i] = CRIB_HOM ; ++array(aHom, arr(hashDepth, i, int), int) ; }
    else if (crib[i].chr < 0 || crib2[i].chr < 0)
      { cribType[i] = CRIB_MUL ; ++array(aMul, arr(hashDepth, i, int), int) ;
	if (crib2[i].chr < crib[i].chr) crib[i].chr = crib2[i].chr ;
      }
    else
      { cribType[i] = crib[i].chr ? CRIB_HTA : CRIB_HTB ;
	++array(aHet, arr(hashDepth, i, int), int) ;
	if (!crib[i].chr) { crib[i].chr = crib2[i].chr ; crib[i].pos = crib2[i].pos ; }
      }

  fprintf (outFile, "  crib matches\n") ;
  fprintf (outFile, "    hom  ") ; printArrayStats (aHom) ;
  fprintf (outFile, "    het  ") ; printArrayStats (aHet) ;
  fprintf (outFile, "    mul ") ; printArrayStats (aMul) ;
  fprintf (outFile, "    err ") ; printArrayStats (aErr) ;

  if (isPrintTables)
    { fprintf (outFile, "CRIB_TABLE      i   err         het          hom         mul\n") ;
      for (i = 1 ; i < 256 ; ++i)
	fprintf (outFile, "CRIB_TABLE      %4d%12d%12d%12d%12d\n", i,
		 arrayMax(aErr)>i?arr(aErr,i,int):0, arrayMax(aHet)>i?arr(aHet,i,int):0,
		 arrayMax(aHom)>i?arr(aHom,i,int):0, arrayMax(aMul)>i?arr(aMul,i,int):0) ;
    }

  arrayDestroy (aHom) ; arrayDestroy (aHet) ; arrayDestroy (aMul) ; arrayDestroy (aErr) ;
  free (crib2) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x11672(%rip), %eax     # 0x143e8
movl %eax, %edi
movl $0x4, %esi
callq 0xd1f0
movq %rax, 0x11677(%rip)     # 0x14400
movq -0x8(%rbp), %rdi
movq 0x1166c(%rip), %rsi     # 0x14400
callq 0x3280
movl 0x11649(%rip), %eax     # 0x143e8
movl %eax, %edi
movl $0x4, %esi
callq 0xd1f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3280
movl 0x11626(%rip), %eax     # 0x143e8
movl %eax, %edi
movl $0x1, %esi
callq 0xd1f0
movq %rax, 0x11633(%rip)     # 0x14408
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0x20(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0x28(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0x30(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0xc1e0
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x115b7(%rip), %eax     # 0x143e8
jae 0x3067
movq 0x115c2(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jne 0x2e9f
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jne 0x2e9f
movq 0x115a5(%rip), %rax     # 0x14408
movslq -0x3c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
movq 0x1154a(%rip), %rax     # 0x143c0
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq 0x1153c(%rip), %rdx     # 0x143c0
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %esi
callq 0xc640
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x3057
movq 0x1155a(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jle 0x2f07
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jle 0x2f07
movq 0x1153d(%rip), %rax     # 0x14408
movslq -0x3c(%rbp), %rcx
movb $0x3, (%rax,%rcx)
movq -0x20(%rbp), %rdi
movq 0x114e2(%rip), %rax     # 0x143c0
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq 0x114d4(%rip), %rdx     # 0x143c0
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %esi
callq 0xc640
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x3055
movq 0x114f2(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jl 0x2f2c
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
cmpl $0x0, %eax
jge 0x2fa9
movq 0x114d5(%rip), %rax     # 0x14408
movslq -0x3c(%rbp), %rcx
movb $0x4, (%rax,%rcx)
movq -0x38(%rbp), %rdi
movq 0x1147a(%rip), %rax     # 0x143c0
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq 0x1146c(%rip), %rdx     # 0x143c0
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %esi
callq 0xc640
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %eax
movq 0x11483(%rip), %rcx     # 0x14400
movslq -0x3c(%rbp), %rdx
movswl (%rcx,%rdx,4), %ecx
cmpl %ecx, %eax
jge 0x2fa4
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movw (%rax,%rcx,4), %dx
movq 0x11464(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movw %dx, (%rax,%rcx,4)
jmp 0x3053
movq 0x11450(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,4), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %dl
movq 0x11437(%rip), %rax     # 0x14408
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rdi
movq 0x113dd(%rip), %rax     # 0x143c0
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq 0x113cf(%rip), %rdx     # 0x143c0
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %esi
callq 0xc640
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x113f2(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
cmpw $0x0, (%rax,%rcx,4)
jne 0x3051
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movw (%rax,%rcx,4), %dx
movq 0x113d4(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movw %dx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movw 0x2(%rax,%rcx,4), %dx
movq 0x113b8(%rip), %rax     # 0x14400
movslq -0x3c(%rbp), %rcx
movw %dx, 0x2(%rax,%rcx,4)
jmp 0x3053
jmp 0x3055
jmp 0x3057
jmp 0x3059
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2e28
movq 0x11362(%rip), %rdi     # 0x143d0
leaq 0xb4d5(%rip), %rsi      # 0xe54a
movb $0x0, %al
callq 0x1150
movq 0x1134d(%rip), %rdi     # 0x143d0
leaq 0xb4d0(%rip), %rsi      # 0xe55a
movb $0x0, %al
callq 0x1150
movq -0x20(%rbp), %rdi
callq 0x2c70
movq 0x1132f(%rip), %rdi     # 0x143d0
leaq 0xb4bc(%rip), %rsi      # 0xe564
movb $0x0, %al
callq 0x1150
movq -0x28(%rbp), %rdi
callq 0x2c70
movq 0x11311(%rip), %rdi     # 0x143d0
leaq 0xb4a8(%rip), %rsi      # 0xe56e
movb $0x0, %al
callq 0x1150
movq -0x38(%rbp), %rdi
callq 0x2c70
movq 0x112f3(%rip), %rdi     # 0x143d0
leaq 0xb493(%rip), %rsi      # 0xe577
movb $0x0, %al
callq 0x1150
movq -0x30(%rbp), %rdi
callq 0x2c70
cmpb $0x0, 0x112b5(%rip)     # 0x143b0
je 0x3247
movq 0x112c8(%rip), %rdi     # 0x143d0
leaq 0xb471(%rip), %rsi      # 0xe580
movb $0x0, %al
callq 0x1150
movl $0x1, -0x3c(%rbp)
cmpl $0x100, -0x3c(%rbp)     # imm = 0x100
jge 0x3245
movq 0x1129f(%rip), %rax     # 0x143d0
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x3c(%rbp), %eax
jle 0x3165
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
jmp 0x316c
xorl %eax, %eax
movl %eax, -0x4c(%rbp)
jmp 0x316c
movl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x3c(%rbp), %eax
jle 0x319c
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x54(%rbp)
jmp 0x31a3
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x31a3
movl -0x54(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x3c(%rbp), %eax
jle 0x31d3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq -0x20(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x5c(%rbp)
jmp 0x31da
xorl %eax, %eax
movl %eax, -0x5c(%rbp)
jmp 0x31da
movl -0x5c(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x3c(%rbp), %eax
jle 0x320a
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x64(%rbp)
jmp 0x3211
xorl %eax, %eax
movl %eax, -0x64(%rbp)
jmp 0x3211
movl -0x60(%rbp), %r9d
movl -0x58(%rbp), %r8d
movl -0x50(%rbp), %ecx
movl -0x40(%rbp), %edx
movq -0x48(%rbp), %rdi
movl -0x64(%rbp), %eax
leaq 0xb391(%rip), %rsi      # 0xe5be
movl %eax, (%rsp)
movb $0x0, %al
callq 0x1150
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x311d
jmp 0x3247
movq -0x20(%rbp), %rdi
callq 0xc3e0
movq -0x28(%rbp), %rdi
callq 0xc3e0
movq -0x38(%rbp), %rdi
callq 0xc3e0
movq -0x30(%rbp), %rdi
callq 0xc3e0
movq -0x18(%rbp), %rdi
callq 0x1040
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)