// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/seq.cpp
// Function: Seq_sp::KmerIndex::KmerIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
KmerIndex::KmerIndex (const string &name_arg,
                      size_t kmer_size_arg)
: Named (name_arg)
, f (name, ios_base::out | ios_base::binary)
, canRead (false)
, kmer_size (kmer_size_arg)
, code_max (powInt (2, 2 * kmer_size))
, addr_new (code2addr (code_max))
{
  QC_ASSERT (kmer_size);
  QC_ASSERT (kmer_size <= kmer_size_max);  
  ASSERT (code_max);
  
  writeBin (f, kmer_size);
  writeBin (f, items);
  ASSERT (f. tellp () == (streamoff) code2addr (0));
  
  {
    Progress prog (code_max, progressSize);  
    const Addr addr = nil;
    FOR (size_t, i, code_max)
    {
      prog ();
      writeBin (f, addr);
    }
  }
  
  QC_ASSERT (f. tellp () == (streamoff) addr_new);
  QC_ASSERT (f. good ());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %r15
movq %rdi, %rbx
callq 0x2bbca
movq %rbx, %rdi
movq %rbx, 0xe8(%rsp)
callq 0x5b59a
leaq 0x310a3(%rip), %rax     # 0x88b68
movq %rax, (%rbx)
leaq 0x28(%rbx), %rdi
leaq 0x8(%rbx), %rsi
pushq $0x14
popq %rdx
movq %rdi, 0xf0(%rsp)
callq 0xc9f0
movb $0x0, 0x238(%rbx)
movq %r15, 0x240(%rbx)
addq %r15, %r15
pushq $0x2
popq %rdi
movq %r15, %rsi
callq 0x10a84
movq %rax, %r14
movq %rax, 0x248(%rbx)
andq $0x0, 0x250(%rbx)
leaq 0x10(,%rax,8), %rax
movq %rax, 0x258(%rbx)
callq 0xc070
movq %rax, %r15
andl $0x0, (%rax)
movq 0x240(%rbx), %rax
testq %rax, %rax
je 0x57c41
cmpq $0x11, %rax
jae 0x57d15
testq %r14, %r14
je 0x57de9
leaq 0x240(%rbx), %rsi
leaq 0x38(%rbx), %r12
movq %r12, %rdi
callq 0x5b592
leaq 0x250(%rbx), %rsi
movq %r12, %rdi
callq 0x5b592
andl $0x0, (%r15)
movq %r12, %rdi
callq 0xc4f0
cmpq $0x10, %rax
jne 0x57ebd
movq 0x248(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
movl $0xf4240, %edx          # imm = 0xF4240
callq 0x17f5c
leaq 0x8(%rsp), %r13
orq $-0x1, (%r13)
xorl %ebx, %ebx
leaq 0x31f31(%rip), %rbp     # 0x89ae0
leaq 0xf8(%rsp), %r14
movq 0xe8(%rsp), %rax
cmpq 0x248(%rax), %rbx
jae 0x57be3
movq %r14, %rdi
movq %rbp, %rsi
callq 0x16794
movq %r12, %rdi
movq %r13, %rsi
callq 0x5b592
incq %rbx
jmp 0x57bb7
leaq 0xf8(%rsp), %rdi
callq 0x18104
andl $0x0, (%r15)
movq %r12, %rdi
callq 0xc4f0
movq 0xe8(%rsp), %rcx
cmpq 0x258(%rcx), %rax
jne 0x57f91
andl $0x0, (%r15)
movq 0xf0(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rcx,%rax)
jne 0x58065
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xb3bd(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12ae, %esi           # imm = 0x12AE
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x653a(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xca13(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x6c03(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xcb70(%rip), %rdx      # 0x64866
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xb2e9(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12af, %esi           # imm = 0x12AF
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x6466(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xc93f(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x6b2f(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xc931(%rip), %rdx      # 0x646fb
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xb215(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12b0, %esi           # imm = 0x12B0
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x6392(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xc86b(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x6a5b(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xca22(%rip), %rdx      # 0x648c0
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xb141(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12b4, %esi           # imm = 0x12B4
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x62be(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xc797(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x6987(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xc7a4(%rip), %rdx      # 0x64716
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xb06d(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12c0, %esi           # imm = 0x12C0
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x61ea(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xc6c3(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x68b3(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0xc6f9(%rip), %rdx      # 0x6473f
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x58139
leaq 0xaf99(%rip), %rsi      # 0x63012
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0x68(%rsp), %rdi
movl $0x12c1, %esi           # imm = 0x12C1
callq 0xe2d5
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xe26e
leaq 0x6116(%rip), %rdx      # 0x5e1d1
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xe24f
leaq 0xc5ef(%rip), %rsi      # 0x646c6
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0x67df(%rip), %rdx      # 0x5e8cc
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe24f
leaq 0x8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xe26e
leaq 0x7da5(%rip), %rdx      # 0x5febf
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xe24f
leaq 0xf8(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rdi
callq 0xc6f0
jmp 0x58155
jmp 0x58167
jmp 0x58155
jmp 0x58167
jmp 0x58155
jmp 0x58167
jmp 0x58155
jmp 0x58167
jmp 0x58155
jmp 0x58167
movq %rax, %r15
leaq 0xf8(%rsp), %rdi
callq 0xcbe8
jmp 0x5816a
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0xcbe8
jmp 0x58183
jmp 0x58180
jmp 0x58180
jmp 0x58180
jmp 0x58180
jmp 0x58180
movq %rax, %r15
leaq 0x48(%rsp), %rdi
callq 0xcbe8
jmp 0x5819c
jmp 0x58199
jmp 0x58199
jmp 0x58199
jmp 0x58199
jmp 0x58199
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0xcbe8
jmp 0x581b5
jmp 0x581b2
jmp 0x581b2
jmp 0x581b2
jmp 0x581b2
jmp 0x581b2
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0xcbe8
jmp 0x581d1
jmp 0x581ce
jmp 0x581ce
jmp 0x581ce
jmp 0x581ce
jmp 0x581ce
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0xcbe8
jmp 0x581ed
jmp 0x581ea
jmp 0x581ea
jmp 0x581ea
jmp 0x581ea
jmp 0x581ea
movq %rax, %r15
leaq 0x68(%rsp), %rdi
callq 0xcbe8
jmp 0x58206
jmp 0x58203
jmp 0x58203
jmp 0x58203
jmp 0x58203
jmp 0x58203
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0xcbe8
jmp 0x58246
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
jmp 0x58231
movq %rax, %r15
jmp 0x58253
movq %rax, %r15
jmp 0x5825a
movq %rax, %r15
jmp 0x58246
movq %rax, %r15
leaq 0xf8(%rsp), %rdi
callq 0x18104
movq 0xf0(%rsp), %rdi
callq 0xc110
movb $0x0, 0x319ce(%rip)     # 0x89c28
movq 0xe8(%rsp), %rdi
callq 0xe0f6
movq %r15, %rdi
callq 0xcaa0
nop