// File: ncbi[P]amr/seq.cpp
// Function: Seq_sp::KmerIndex::code2ids(unsigned long)
StringVector KmerIndex::code2ids (size_t code)
{
  ASSERT (canRead);
  ASSERT (code < code_max);
  
  Addr addr = 0;
  {
    const streamoff pos = (streamoff) code2addr (code);  
    f. seekg (pos);
    readBin (f, addr);
  }
  QC_ASSERT (addr == nil || (addr >= code2addr (code_max) && addr < addr_new));
  
  string s;
  size_t n = 0;
  while (addr != nil)
  {
    const IdRecord rec (f, addr, false);
    s += rec. get ();
    addr = rec. prev;
    n++;
  }
  
  if (s. empty ())
    return StringVector ();
    
  ASSERT (s. back () == gap);
  s. erase (s. size () - 1, 1);

  return StringVector (s, gap, false);
}

// Assembly:
subq $0x588, %rsp            # imm = 0x588
movq %rdi, 0x60(%rsp)
movq %rdi, %rax
movq %rax, 0x68(%rsp)
movq %rdi, 0x580(%rsp)
movq %rsi, 0x578(%rsp)
movq %rdx, 0x570(%rsp)
movq 0x578(%rsp), %rax
movq %rax, 0x70(%rsp)
callq 0xd0a0
movq %rax, %rcx
movq 0x70(%rsp), %rax
movl $0x0, (%rcx)
testb $0x1, 0x238(%rax)
jne 0xd5440
callq 0xd8c0
cmpl $0x0, %eax
jne 0xd5436
leaq 0x4cf(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xdd50
movq 0x58(%rsp), %rdx
leaq 0x13261(%rip), %rsi     # 0xe8446
leaq 0x4d0(%rsp), %rdi
callq 0xfae0
jmp 0xd51f4
leaq 0x498(%rsp), %rdi
movl $0x13a4, %esi           # imm = 0x13A4
callq 0x11600
jmp 0xd5208
leaq 0x4f0(%rsp), %rdi
leaq 0x4d0(%rsp), %rsi
leaq 0x498(%rsp), %rdx
callq 0x11510
jmp 0xd5227
leaq 0xdfa3(%rip), %rdx      # 0xe31d1
leaq 0x510(%rsp), %rdi
leaq 0x4f0(%rsp), %rsi
callq 0x114c0
jmp 0xd5245
leaq 0x457(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xdd50
movq 0x50(%rsp), %rdx
leaq 0x14bfc(%rip), %rsi     # 0xe9e5f
leaq 0x458(%rsp), %rdi
callq 0xfae0
jmp 0xd5272
leaq 0xe72b(%rip), %rdx      # 0xe39a4
leaq 0x478(%rsp), %rdi
leaq 0x458(%rsp), %rsi
callq 0x114c0
jmp 0xd5290
leaq 0x530(%rsp), %rdi
leaq 0x510(%rsp), %rsi
leaq 0x478(%rsp), %rdx
callq 0x11510
jmp 0xd52af
leaq 0x14977(%rip), %rdx     # 0xe9c2d
leaq 0x550(%rsp), %rdi
leaq 0x530(%rsp), %rsi
callq 0x114c0
jmp 0xd52cd
leaq 0x550(%rsp), %rdi
callq 0x173d0
jmp 0xd52dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5424
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5417
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd540a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd53fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd53e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd53d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd53c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd53bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
leaq 0x550(%rsp), %rdi
callq 0xdf08
leaq 0x530(%rsp), %rdi
callq 0xdf08
leaq 0x478(%rsp), %rdi
callq 0xdf08
leaq 0x458(%rsp), %rdi
callq 0xdf08
leaq 0x457(%rsp), %rdi
callq 0xd7a0
leaq 0x510(%rsp), %rdi
callq 0xdf08
leaq 0x4f0(%rsp), %rdi
callq 0xdf08
leaq 0x498(%rsp), %rdi
callq 0xdf08
leaq 0x4d0(%rsp), %rdi
callq 0xdf08
leaq 0x4cf(%rsp), %rdi
callq 0xd7a0
jmp 0xd5e8c
movl $0x1, %edi
callq 0xd8e0
callq 0xd0a0
movq 0x70(%rsp), %rcx
movl $0x0, (%rax)
movq 0x570(%rsp), %rax
cmpq 0x248(%rcx), %rax
jb 0xd56ec
callq 0xd8c0
cmpl $0x0, %eax
jne 0xd56e2
leaq 0x3af(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xdd50
movq 0x48(%rsp), %rdx
leaq 0x12fb5(%rip), %rsi     # 0xe8446
leaq 0x3b0(%rsp), %rdi
callq 0xfae0
jmp 0xd54a0
leaq 0x388(%rsp), %rdi
movl $0x13a5, %esi           # imm = 0x13A5
callq 0x11600
jmp 0xd54b4
leaq 0x3d0(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
leaq 0x388(%rsp), %rdx
callq 0x11510
jmp 0xd54d3
leaq 0xdcf7(%rip), %rdx      # 0xe31d1
leaq 0x3f0(%rsp), %rdi
leaq 0x3d0(%rsp), %rsi
callq 0x114c0
jmp 0xd54f1
leaq 0x347(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xdd50
movq 0x40(%rsp), %rdx
leaq 0x14950(%rip), %rsi     # 0xe9e5f
leaq 0x348(%rsp), %rdi
callq 0xfae0
jmp 0xd551e
leaq 0xe47f(%rip), %rdx      # 0xe39a4
leaq 0x368(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x114c0
jmp 0xd553c
leaq 0x410(%rsp), %rdi
leaq 0x3f0(%rsp), %rsi
leaq 0x368(%rsp), %rdx
callq 0x11510
jmp 0xd555b
leaq 0x147c9(%rip), %rdx     # 0xe9d2b
leaq 0x430(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x114c0
jmp 0xd5579
leaq 0x430(%rsp), %rdi
callq 0x173d0
jmp 0xd5588
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd56d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd56c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd56b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd56a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd568f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5682
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
leaq 0x430(%rsp), %rdi
callq 0xdf08
leaq 0x410(%rsp), %rdi
callq 0xdf08
leaq 0x368(%rsp), %rdi
callq 0xdf08
leaq 0x348(%rsp), %rdi
callq 0xdf08
leaq 0x347(%rsp), %rdi
callq 0xd7a0
leaq 0x3f0(%rsp), %rdi
callq 0xdf08
leaq 0x3d0(%rsp), %rdi
callq 0xdf08
leaq 0x388(%rsp), %rdi
callq 0xdf08
leaq 0x3b0(%rsp), %rdi
callq 0xdf08
leaq 0x3af(%rsp), %rdi
callq 0xd7a0
jmp 0xd5e8c
movl $0x1, %edi
callq 0xd8e0
movq $0x0, 0x338(%rsp)
movq 0x570(%rsp), %rdi
callq 0xd9090
movq %rax, %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x330(%rsp)
addq $0x28, %rax
movq %rax, 0x38(%rsp)
movq 0x330(%rsp), %rsi
leaq 0x320(%rsp), %rdi
callq 0x4d0e0
movq 0x38(%rsp), %rdi
movq 0x320(%rsp), %rsi
movq 0x328(%rsp), %rdx
callq 0xd960
movq 0x70(%rsp), %rdi
addq $0x28, %rdi
leaq 0x338(%rsp), %rsi
callq 0xd8f80
callq 0xd0a0
movl $0x0, (%rax)
cmpq $-0x1, 0x338(%rsp)
je 0xd5a49
movq 0x70(%rsp), %rax
movq 0x338(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x248(%rax), %rdi
callq 0xd9090
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jb 0xd57c2
movq 0x70(%rsp), %rcx
movq 0x338(%rsp), %rax
cmpq 0x258(%rcx), %rax
jb 0xd5a49
callq 0xd8c0
cmpl $0x0, %eax
jne 0xd5a3f
leaq 0x27f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xdd50
movq 0x28(%rsp), %rdx
leaq 0x12c58(%rip), %rsi     # 0xe8446
leaq 0x280(%rsp), %rdi
callq 0xfae0
jmp 0xd57fd
leaq 0x258(%rsp), %rdi
movl $0x13ad, %esi           # imm = 0x13AD
callq 0x11600
jmp 0xd5811
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x258(%rsp), %rdx
callq 0x11510
jmp 0xd5830
leaq 0xd99a(%rip), %rdx      # 0xe31d1
leaq 0x2c0(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x114c0
jmp 0xd584e
leaq 0x217(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xdd50
movq 0x20(%rsp), %rdx
leaq 0x145f3(%rip), %rsi     # 0xe9e5f
leaq 0x218(%rsp), %rdi
callq 0xfae0
jmp 0xd587b
leaq 0xe122(%rip), %rdx      # 0xe39a4
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x114c0
jmp 0xd5899
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x238(%rsp), %rdx
callq 0x11510
jmp 0xd58b8
leaq 0x144ae(%rip), %rdx     # 0xe9d6d
leaq 0x300(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x114c0
jmp 0xd58d6
leaq 0x300(%rsp), %rdi
callq 0x173d0
jmp 0xd58e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5a2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5a20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5a13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5a06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd59ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd59df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd59d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd59c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
leaq 0x300(%rsp), %rdi
callq 0xdf08
leaq 0x2e0(%rsp), %rdi
callq 0xdf08
leaq 0x238(%rsp), %rdi
callq 0xdf08
leaq 0x218(%rsp), %rdi
callq 0xdf08
leaq 0x217(%rsp), %rdi
callq 0xd7a0
leaq 0x2c0(%rsp), %rdi
callq 0xdf08
leaq 0x2a0(%rsp), %rdi
callq 0xdf08
leaq 0x258(%rsp), %rdi
callq 0xdf08
leaq 0x280(%rsp), %rdi
callq 0xdf08
leaq 0x27f(%rsp), %rdi
callq 0xd7a0
jmp 0xd5e8c
movl $0x1, %edi
callq 0xd8e0
leaq 0x1f0(%rsp), %rdi
callq 0xda50
movq $0x0, 0x1e8(%rsp)
cmpq $-0x1, 0x338(%rsp)
je 0xd5b36
movq 0x70(%rsp), %rsi
addq $0x28, %rsi
movq 0x338(%rsp), %rdx
leaq 0x1b0(%rsp), %rdi
xorl %ecx, %ecx
callq 0xcc8a0
jmp 0xd5a93
leaq 0x190(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0xce6e0
jmp 0xd5aaa
leaq 0x1f0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0xd980
jmp 0xd5ac1
leaq 0x190(%rsp), %rdi
callq 0xdf08
movq 0x1c0(%rsp), %rax
movq %rax, 0x338(%rsp)
movq 0x1e8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1e8(%rsp)
jmp 0xd5a62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5e7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
leaq 0x190(%rsp), %rdi
callq 0xdf08
jmp 0xd5e7f
leaq 0x1f0(%rsp), %rdi
callq 0xdc60
testb $0x1, %al
jne 0xd5b49
jmp 0xd5b74
movq 0x60(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xd410
movq 0x60(%rsp), %rdi
callq 0x4fe80
movl $0x1, 0x18c(%rsp)
jmp 0xd5e65
callq 0xd0a0
movl $0x0, (%rax)
leaq 0x1f0(%rsp), %rdi
callq 0xd550
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xd5e16
callq 0xd8c0
cmpl $0x0, %eax
jne 0xd5e0c
leaq 0xe7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xdd50
movq 0x18(%rsp), %rdx
leaq 0x12882(%rip), %rsi     # 0xe8446
leaq 0xe8(%rsp), %rdi
callq 0xfae0
jmp 0xd5bd3
leaq 0xc0(%rsp), %rdi
movl $0x13bc, %esi           # imm = 0x13BC
callq 0x11600
jmp 0xd5be7
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x11510
jmp 0xd5c06
leaq 0xd5c4(%rip), %rdx      # 0xe31d1
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x114c0
jmp 0xd5c24
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xdd50
movq 0x10(%rsp), %rdx
leaq 0x14220(%rip), %rsi     # 0xe9e5f
leaq 0x80(%rsp), %rdi
callq 0xfae0
jmp 0xd5c4e
leaq 0xdd4f(%rip), %rdx      # 0xe39a4
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x114c0
jmp 0xd5c6c
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x11510
jmp 0xd5c8b
leaq 0x141fe(%rip), %rdx     # 0xe9e90
leaq 0x168(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x114c0
jmp 0xd5ca9
leaq 0x168(%rsp), %rdi
callq 0x173d0
jmp 0xd5cb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5dfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5df0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5de3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5dd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5dbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5db2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5da5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
jmp 0xd5d98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4c0(%rsp)
movl %eax, 0x4bc(%rsp)
leaq 0x168(%rsp), %rdi
callq 0xdf08
leaq 0x148(%rsp), %rdi
callq 0xdf08
leaq 0xa0(%rsp), %rdi
callq 0xdf08
leaq 0x80(%rsp), %rdi
callq 0xdf08
leaq 0x7f(%rsp), %rdi
callq 0xd7a0
leaq 0x128(%rsp), %rdi
callq 0xdf08
leaq 0x108(%rsp), %rdi
callq 0xdf08
leaq 0xc0(%rsp), %rdi
callq 0xdf08
leaq 0xe8(%rsp), %rdi
callq 0xdf08
leaq 0xe7(%rsp), %rdi
callq 0xd7a0
jmp 0xd5e7f
movl $0x1, %edi
callq 0xd8e0
leaq 0x1f0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd520
movq 0x8(%rsp), %rdi
movq %rax, %rsi
decq %rsi
movl $0x1, %edx
callq 0xd170
jmp 0xd5e3f
movq 0x60(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
movl $0x20, %edx
xorl %ecx, %ecx
callq 0x26700
jmp 0xd5e5a
movl $0x1, 0x18c(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0xdf08
movq 0x68(%rsp), %rax
addq $0x588, %rsp            # imm = 0x588
retq
leaq 0x1f0(%rsp), %rdi
callq 0xdf08
movq 0x4c0(%rsp), %rdi
callq 0xdd40
nopl (%rax)