// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/hash10x.c
// Function: cribAddGenome
static void cribAddGenome (FILE *f, CribInfo *crib)
{
  char *seq ;
  int len, chr = 0, pos ;
  int nAbsent = 0, nPresent = 0 ;
  U32 index ;
  dna2indexConv['N'] = dna2indexConv['n'] = 0 ; /* to get 2-bit encoding */
  while (readSequence (f, dna2indexConv, &seq, 0, 0, &len))
    { SeqhashRCiterator *mi = moshRCiterator (hasher, seq, len) ;
      U64 hash ; int pos ;
      ++chr ; if (chr >= cribChrMax) cribChrMax = chr+1 ;
      while (moshRCnext (mi, &hash, &pos, 0))
	if ((index = hashIndexFind (hash, FALSE)))
	  { CribInfo *c = &crib[index] ;
	    if (!c->chr) { c->chr = chr ; c->pos = pos >> 10 ; }
	    else if (c->chr > 0) c->chr = -1 ;
	    else --c->chr ;
	    ++nPresent ;
	  }
	else
	  ++nAbsent ;
      seqhashRCiteratorDestroy (mi) ;
    }
  fclose (f) ;

  fprintf (outFile, "  read %d known and %d unknown hashes from %d sequences in crib genome\n",
	  nPresent, nAbsent, chr) ;
  if (outFile != stdout)
    printf ("  read %d known and %d unknown hashes from %d sequences in crib genome\n",
	    nPresent, nAbsent, chr) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
leaq 0x104e4(%rip), %rax     # 0x13790
movl $0x0, 0x1b8(%rax)
leaq 0x104d3(%rip), %rax     # 0x13790
movl $0x0, 0x138(%rax)
movq -0x8(%rbp), %rdi
leaq 0x104be(%rip), %rsi     # 0x13790
leaq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x1c(%rbp), %r9
movq %r8, %rcx
callq 0x8840
cmpl $0x0, %eax
je 0x33e3
movq 0x110c1(%rip), %rdi     # 0x143b8
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa940
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x110f7(%rip), %eax     # 0x14410
jl 0x3327
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, 0x110e9(%rip)     # 0x14410
jmp 0x3329
movq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x44(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0xab60
cmpb $0x0, %al
je 0x33d5
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x19d0
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0x33c7
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpw $0x0, (%rax)
jne 0x3395
movl -0x20(%rbp), %eax
movw %ax, %cx
movq -0x50(%rbp), %rax
movw %cx, (%rax)
movl -0x44(%rbp), %eax
sarl $0xa, %eax
movw %ax, %cx
movq -0x50(%rbp), %rax
movw %cx, 0x2(%rax)
jmp 0x33bc
movq -0x50(%rbp), %rax
movswl (%rax), %eax
cmpl $0x0, %eax
jle 0x33ac
movq -0x50(%rbp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
jmp 0x33ba
movq -0x50(%rbp), %rax
movw (%rax), %cx
addw $-0x1, %cx
movw %cx, (%rax)
jmp 0x33bc
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x33d0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3329
movq -0x38(%rbp), %rdi
callq 0x16a0
jmp 0x32c7
movq -0x8(%rbp), %rdi
callq 0x10b0
movq 0x10fdd(%rip), %rdi     # 0x143d0
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
movl -0x20(%rbp), %r8d
leaq 0xc21c(%rip), %rsi      # 0xf620
movb $0x0, %al
callq 0x1150
movq 0x10fbe(%rip), %rax     # 0x143d0
movq 0xfbb7(%rip), %rcx      # 0x12fd0
cmpq (%rcx), %rax
je 0x3435
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq 0xc1f2(%rip), %rdi      # 0xf620
movb $0x0, %al
callq 0x10d0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)