// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/seq.cpp
// Function: Seq_sp::KmerIndex::add(Seq_sp::Dna const&, unsigned long&, unsigned long&)
void KmerIndex::add (const Dna &dna,
                     size_t &kmers,
                     size_t &kmersRejected)
{
  ASSERT (canRead);
  
  const size_t seqSize = dna. seq. size ();
  const string id (dna. getId ());
  kmers = 0;
  size_t kmersUsed = 0;
  FOR (size_t, i, seqSize)
    if (i + kmer_size <= seqSize)
    {
      kmers++;
      const Dna kmer ("x", dna. seq. substr (i, kmer_size), false);
      kmer. qc ();
      ASSERT (kmer. seq. size () == kmer_size);
      if (kmer. getXs ())
        continue;
      kmersUsed++;
      addId (dna2code (kmer), id);
    }
  ASSERT (kmers >= kmersUsed);
  kmersRejected = kmers - kmersUsed;
  
  items++;
  f. seekp (sizeof (kmer_size));
  writeBin (f, items);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, 0xe8(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0xc070
movq %rax, 0x18(%rsp)
andl $0x0, (%rax)
cmpb $0x0, 0x238(%rbx)
je 0x58fa8
leaq 0x28(%r14), %rax
movq %rax, 0xf0(%rsp)
movq 0x30(%r14), %r12
leaq 0x118(%rsp), %rdi
movq %r14, %rsi
callq 0xe516
movq %r15, 0x20(%rsp)
andq $0x0, (%r15)
movq $0x0, 0x10(%rsp)
leaq 0x48(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x158(%rsp), %r13
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x58e5f
movq 0x240(%rbx), %rax
addq %r15, %rax
cmpq %r12, %rax
ja 0x58e57
movq 0x20(%rsp), %rax
incq (%rax)
movq %rbp, %rdi
leaq 0x6a9e(%rip), %rsi      # 0x5f857
leaq 0x68(%rsp), %rdx
callq 0xdbbe
movq 0x240(%rbx), %rcx
movq %r14, %rdi
movq 0xf0(%rsp), %rsi
movq %r15, %rdx
callq 0xc5f0
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x5b6bc
movq %r14, %rdi
callq 0xcbe8
movq %rbp, %rdi
callq 0xcbe8
movq %r13, %rdi
callq 0x5b3b2
movq 0x18(%rsp), %rax
andl $0x0, (%rax)
movq 0x188(%rsp), %rax
cmpq 0x240(%rbx), %rax
jne 0x58ece
movq %r13, %rdi
callq 0x488ea
testq %rax, %rax
jne 0x58e4f
movq %r13, %rdi
callq 0x58b62
movq %rbx, %rdi
movq %rax, %rsi
leaq 0x118(%rsp), %rdx
callq 0x5934e
incq 0x10(%rsp)
movq %r13, %rdi
callq 0x5bd06
incq %r15
jmp 0x58d8b
movq 0x18(%rsp), %rax
andl $0x0, (%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
subq 0x10(%rsp), %rax
jb 0x59088
movq 0xe8(%rsp), %rcx
movq %rax, (%rcx)
incq 0x250(%rbx)
leaq 0x38(%rbx), %r14
pushq $0x8
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xc6e0
addq $0x250, %rbx            # imm = 0x250
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5b592
leaq 0x118(%rsp), %rdi
callq 0xcbe8
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xc6d0
testl %eax, %eax
jne 0x59165
leaq 0xa130(%rip), %rsi      # 0x63012
leaq 0xa8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xdbbe
leaq 0x88(%rsp), %rdi
movl $0x132c, %esi           # imm = 0x132C
callq 0xe2d5
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xe26e
leaq 0x52a7(%rip), %rdx      # 0x5e1d1
leaq 0x68(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xe24f
leaq 0xb8d0(%rip), %rsi      # 0x64813
leaq 0x138(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xdbbe
leaq 0x5970(%rip), %rdx      # 0x5e8cc
leaq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xe24f
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
callq 0xe26e
leaq 0xb8c1(%rip), %rdx      # 0x64850
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x48(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x59165
leaq 0xa056(%rip), %rsi      # 0x63012
leaq 0x68(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0xdbbe
leaq 0xc8(%rsp), %rdi
movl $0x1320, %esi           # imm = 0x1320
callq 0xe2d5
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0xe26e
leaq 0x51d3(%rip), %rdx      # 0x5e1d1
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0xb7ff(%rip), %rsi      # 0x64813
leaq 0x88(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0xdbbe
leaq 0x589c(%rip), %rdx      # 0x5e8cc
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe24f
leaq 0x118(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe26e
leaq 0xb755(%rip), %rdx      # 0x647bb
leaq 0x158(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xe24f
leaq 0x158(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x59165
leaq 0x9f76(%rip), %rsi      # 0x63012
leaq 0xc8(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0xdbbe
leaq 0xa8(%rsp), %rdi
movl $0x1332, %esi           # imm = 0x1332
callq 0xe2d5
leaq 0x68(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xe26e
leaq 0x50ed(%rip), %rdx      # 0x5e1d1
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xe24f
leaq 0xb719(%rip), %rsi      # 0x64813
leaq 0xf8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xdbbe
leaq 0x57b9(%rip), %rdx      # 0x5e8cc
leaq 0x88(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xe24f
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xe26e
leaq 0xb72a(%rip), %rdx      # 0x64870
leaq 0x158(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xe24f
leaq 0x158(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rdi
callq 0xc6f0
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0xcbe8
jmp 0x59182
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x591b5
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0xcbe8
jmp 0x591a3
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0xcbe8
jmp 0x591c7
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xcbe8
jmp 0x591d9
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xcbe8
jmp 0x591eb
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xcbe8
jmp 0x591fd
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xcbe8
jmp 0x5920c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcbe8
jmp 0x59239
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x59248
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x5922a
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcbe8
jmp 0x59257
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xcbe8
jmp 0x59269
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcbe8
jmp 0x5927b
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xcbe8
jmp 0x5928d
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xcbe8
jmp 0x5929f
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xcbe8
jmp 0x592ac
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0xcbe8
jmp 0x592b9
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x59322
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x59341
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xcbe8
jmp 0x592cf
jmp 0x5930b
movq %rax, %rbx
jmp 0x59346
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xcbe8
jmp 0x592e1
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xcbe8
jmp 0x592f3
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xcbe8
jmp 0x5932c
jmp 0x5930b
jmp 0x59329
movq %rax, %rbx
jmp 0x5931d
movq %rax, %rbx
jmp 0x59339
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcbe8
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x59339
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x5bd06
leaq 0x118(%rsp), %rdi
callq 0xcbe8
movq %rbx, %rdi
callq 0xcaa0