// File: /workspace/github_cpp_makefile_star2_O3/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 $0x1b8, %rsp            # imm = 0x1B8
movq %rcx, %rbx
movq %rdx, 0x50(%rsp)
movq %rsi, %r12
movq %rdi, %r15
callq 0xb070
movq %rax, 0x48(%rsp)
movl $0x0, (%rax)
cmpb $0x0, 0x238(%r15)
je 0x8a7b5
movq 0x30(%r12), %rax
movq %rax, 0xe8(%rsp)
leaq 0x8(%r12), %r14
movq %r14, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0xb760
cmpq $-0x1, %rax
jne 0x8a38d
movq 0x10(%r12), %rax
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xb5d0
movq 0x50(%rsp), %rax
movq $0x0, (%rax)
movq 0xe8(%rsp), %rcx
testq %rcx, %rcx
je 0x8a6a3
movq %rbx, 0x180(%rsp)
addq $0x28, %r12
leaq 0x18(%rsp), %rbx
xorl %ebp, %ebp
leaq 0x110(%rsp), %r14
leaq 0x2d5b7(%rip), %rax     # 0xb7998
addq $0x10, %rax
movq %rax, 0x190(%rsp)
movq $0x0, 0xd8(%rsp)
movq %r15, 0x188(%rsp)
movq %r12, 0xe0(%rsp)
movq 0x240(%r15), %rax
addq %rbp, %rax
cmpq %rcx, %rax
ja 0x8a5cd
movq 0x50(%rsp), %rax
incq (%rax)
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0xa407(%rip), %rsi      # 0x9483c
leaq 0xa401(%rip), %rdx      # 0x9483d
callq 0xdc76
movq 0x240(%r15), %rcx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xb5d0
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x8fe0e
leaq 0x2e474(%rip), %rax     # 0xb88e8
movq %rax, 0x110(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8a498
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x8a4af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
leaq 0x2f5e2(%rip), %rax     # 0xb9a98
cmpb $0x1, (%rax)
jne 0x8a4cb
movq %r14, %rdi
callq 0x6b85e
movq %r14, %rdi
callq 0x6be1c
movq 0x48(%rsp), %rax
movl $0x0, (%rax)
movq 0x140(%rsp), %r12
cmpq 0x240(%r15), %r12
jne 0x8a71c
testq %r12, %r12
je 0x8a531
movq 0x138(%rsp), %r13
xorl %ebx, %ebx
xorl %r15d, %r15d
movsbl (%r13,%rbx), %esi
movq 0x110(%rsp), %rax
movq %r14, %rdi
callq *0x68(%rax)
movzbl %al, %eax
addq %rax, %r15
incq %rbx
cmpq %rbx, %r12
jne 0x8a4fd
testq %r15, %r15
leaq 0x18(%rsp), %rbx
movq 0x188(%rsp), %r15
jne 0x8a554
movq %r14, %rdi
callq 0x8a12c
movq %r15, %rdi
movq %rax, %rsi
leaq 0x160(%rsp), %rdx
callq 0x8afaa
incq 0xd8(%rsp)
movq 0xe0(%rsp), %r12
leaq 0x2e2fd(%rip), %rax     # 0xb8860
movq %rax, 0x110(%rsp)
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x8a590
movq 0x148(%rsp), %rsi
incq %rsi
callq 0xb5a0
movq 0x190(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x8a5c5
movq 0x128(%rsp), %rsi
incq %rsi
callq 0xb5a0
movq 0xe8(%rsp), %rcx
incq %rbp
cmpq %rcx, %rbp
jne 0x8a409
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq 0x48(%rsp), %rcx
movl $0x0, (%rcx)
movq 0xd8(%rsp), %rcx
cmpq %rcx, %rax
movq 0x180(%rsp), %rbx
jae 0x8a6b2
callq 0xb6b0
testl %eax, %eax
jne 0x8a845
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xda2d(%rip), %rsi      # 0x98052
leaq 0xda36(%rip), %rdx      # 0x98062
leaq 0xb8(%rsp), %rdi
callq 0xdc76
leaq 0x98(%rsp), %rdi
movl $0x1332, %esi           # imm = 0x1332
callq 0xe1b2
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xe10a
leaq 0x8b65(%rip), %rsi      # 0x931d1
leaq 0x58(%rsp), %rdi
callq 0xbb10
leaq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8aa09
movups (%rcx), %xmm0
leaq 0x38(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x8aa16
movq 0x48(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, (%rbx)
incq 0x250(%r15)
leaq 0x38(%r15), %r14
movl $0x8, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb6c0
addq $0x250, %r15            # imm = 0x250
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xb770
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a70a
movq 0x170(%rsp), %rsi
incq %rsi
callq 0xb5a0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb6b0
testl %eax, %eax
jne 0x8a845
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xd916(%rip), %rsi      # 0x98052
leaq 0xd91f(%rip), %rdx      # 0x98062
leaq 0x98(%rsp), %rdi
callq 0xdc76
leaq 0x78(%rsp), %rdi
movl $0x132c, %esi           # imm = 0x132C
callq 0xe1b2
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe10a
leaq 0x8a51(%rip), %rsi      # 0x931d1
leaq 0xb8(%rsp), %rdi
callq 0xbb10
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8a84f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x8a85c
callq 0xb6b0
testl %eax, %eax
jne 0x8a845
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xd880(%rip), %rsi      # 0x98052
leaq 0xd889(%rip), %rdx      # 0x98062
leaq 0x58(%rsp), %rdi
callq 0xdc76
leaq 0xb8(%rsp), %rdi
movl $0x1320, %esi           # imm = 0x1320
callq 0xe1b2
leaq 0x28(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe10a
leaq 0x89be(%rip), %rsi      # 0x931d1
leaq 0x28(%rsp), %rdi
callq 0xbb10
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8a954
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x8a961
movl $0x1, %edi
callq 0xb6d0
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1a8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xefba(%rip), %rsi      # 0x99842
leaq 0xefef(%rip), %rdx      # 0x9987e
leaq 0x198(%rsp), %rdi
callq 0xdc76
leaq 0x900e(%rip), %rsi      # 0x938b1
leaq 0x198(%rsp), %rdi
callq 0xbb10
leaq 0x100(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8a8d5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x8a8e8
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
movq 0x8(%rax), %rsi
leaq 0xf0(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe10a
leaq 0xef62(%rip), %rsi      # 0x9987f
leaq 0x28(%rsp), %rdi
callq 0xbb10
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8a9db
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x8a9e8
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xeeb5(%rip), %rsi      # 0x99842
leaq 0xeeea(%rip), %rdx      # 0x9987e
leaq 0x78(%rsp), %rdi
callq 0xdc76
leaq 0x8f0c(%rip), %rsi      # 0x938b1
leaq 0x78(%rsp), %rdi
callq 0xbb10
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8aa96
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x8aaa9
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x1155a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x100(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xee01(%rip), %rsi      # 0x99842
leaq 0xee36(%rip), %rdx      # 0x9987e
leaq 0xf0(%rsp), %rdi
callq 0xdc76
leaq 0x8e55(%rip), %rsi      # 0x938b1
leaq 0xf0(%rsp), %rdi
callq 0xbb10
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8ab15
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x8ab25
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq 0x8(%rax), %rsi
leaq 0x98(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x160(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe10a
leaq 0xed09(%rip), %rsi      # 0x997ea
leaq 0x160(%rsp), %rdi
callq 0xbb10
leaq 0x120(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8ab86
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x8ab99
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
movq 0x8(%rax), %rsi
leaq 0x78(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe10a
leaq 0xed48(%rip), %rsi      # 0x9989f
leaq 0x8(%rsp), %rdi
callq 0xbb10
leaq 0x120(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8abbd
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x8abd0
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
movq 0x8(%rax), %rdx
leaq 0x110(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x1155a
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
movq 0x8(%rax), %rdx
leaq 0x110(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x1155a
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ac19
movq 0x120(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ac19
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8ac82
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ac82
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8ac5c
movq 0x120(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ac5c
movq %rax, %rbx
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aca1
movq 0x170(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8aca1
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x8acc3
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8acc3
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ace5
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ace5
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r15, %rdi
je 0x8ad04
movq 0x100(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ad04
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ad25
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ad25
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8ad41
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ad41
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8ada3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ada3
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8adc3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8adc3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8ad82
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ad82
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8ade9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ade9
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ae0b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ae0b
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ae31
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ae31
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ae52
movq 0x100(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ae52
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ae74
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ae74
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8af80
movq 0xc8(%rsp), %rsi
jmp 0x8af64
movq %rax, %rbx
movq 0x198(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ae94
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8ae94
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x8afa1
movq 0x68(%rsp), %rsi
jmp 0x8af99
jmp 0x8af27
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x8aeb8
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8aeb8
movq %rax, %rbx
jmp 0x8afa1
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aede
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8aede
movq %rax, %rbx
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8af04
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8af04
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x8af73
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8af73
jmp 0x8af27
jmp 0x8af70
movq %rax, %rbx
jmp 0x8af80
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8af50
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8af50
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8af80
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb5a0
jmp 0x8af80
jmp 0x8af70
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x8fa26
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8afa1
movq 0x170(%rsp), %rsi
incq %rsi
callq 0xb5a0
movq %rbx, %rdi
callq 0xba60
nop