// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/eis-bwtseq-context.c
// Function: gt_BWTSeqCRAccessSubseq
void
gt_BWTSeqCRAccessSubseq(const BWTSeqContextRetriever *bwtSeqCR,
                     GtUword start, size_t len, Symbol subseq[])
{
  struct SeqMark currentPos;
  struct extBitsRetrieval extBits;
  const BWTSeq *bwtSeq;
  initExtBitsRetrieval(&extBits);
  gt_assert(bwtSeqCR);
  gt_assert(start < BWTSeqLength(bwtSeqCR->bwtSeq));
  bwtSeq = bwtSeqCR->bwtSeq;
  {
    GtUword end = start + len - 1;
    currentPos = BWTSeqCRNextMark(bwtSeqCR, end);
    gt_assert(currentPos.textPos >= end);
    while (currentPos.textPos > end)
    {
      currentPos.bwtPos = BWTSeqLFMap(bwtSeq, currentPos.bwtPos, &extBits);
      --currentPos.textPos;
    }
  }
  {
    GtUword i = len;
    while (i)
    {
      --i;
      subseq[i] = BWTSeqGetSym(bwtSeq, currentPos.bwtPos);
      currentPos.bwtPos = BWTSeqLFMap(bwtSeq, currentPos.bwtPos, &extBits);
#ifndef NDEBUG
      --currentPos.textPos;
#endif
    }
  }
  gt_assert(currentPos.textPos + 1 == start);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x40(%rsp)
testq %rdi, %rdi
je 0x144346
movq 0x10(%rdi), %r15
movq (%r15), %rax
movq 0x10(%rax), %rax
cmpq %rsi, %rax
jbe 0x144374
movq %rdx, %r14
leaq (%rsi,%rdx), %rbp
decq %rbp
cmpq %rbp, %rax
jbe 0x1443a2
movq 0x8(%rdi), %rbx
leaq (%rbx,%rbp), %rcx
notq %rbx
andq %rcx, %rbx
cmpq %rax, %rbx
jae 0x14426d
movb 0x28(%rdi), %cl
movq %rbx, %r8
shrq %cl, %r8
movq 0x20(%rdi), %rax
movzwl 0x2a(%rdi), %edx
movq %rdx, %rsi
imulq %r8, %rsi
movq %rax, %rdi
callq 0x28deac
movq %rax, %r12
jmp 0x144277
decq %rax
movq 0x30(%r15), %r12
movq %rax, %rbx
cmpq %rbp, %rbx
jb 0x1443cf
leaq 0x10(%rsp), %r13
cmpq %rbp, %rbx
jbe 0x1442a0
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x144400
movq %rax, %r12
decq %rbx
jmp 0x144285
leaq 0x10(%rsp), %r13
movq %r14, %rbx
subq $0x1, %rbx
jb 0x1442fc
movq (%r15), %rdi
testq %rdi, %rdi
je 0x144310
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x144310
movq (%rdi), %rax
movq 0x8(%rdi), %rbp
movq %r12, %rsi
callq *0x30(%rax)
cmpl $0x1, (%rbp)
jne 0x14430b
movzbl %al, %eax
movb 0x118(%rbp,%rax), %al
movq 0x8(%rsp), %rcx
movb %al, -0x1(%rcx,%r14)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x144400
movq %rax, %r12
movq %rbx, %r14
jmp 0x1442a8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x17390
movq 0x2f3c51(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0cf2(%rip), %rsi    # 0x2e5013
leaq 0x1fe39b(%rip), %rdx    # 0x3426c3
leaq 0x1fe57b(%rip), %rcx    # 0x3428aa
leaq 0x1fe3ae(%rip), %r8     # 0x3426e4
pushq $0x2a
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2f3c1b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0cbc(%rip), %rsi    # 0x2e5013
leaq 0x1fe095(%rip), %rdx    # 0x3423f3
leaq 0x1fe0a9(%rip), %rcx    # 0x34240e
leaq 0x1fdfb6(%rip), %r8     # 0x342322
movl $0x18d, %r9d            # imm = 0x18D
jmp 0x14433a
movq 0x2f3bed(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0c8e(%rip), %rsi    # 0x2e5013
leaq 0x1fe09a(%rip), %rdx    # 0x342426
leaq 0x1fe07b(%rip), %rcx    # 0x34240e
leaq 0x1fdf88(%rip), %r8     # 0x342322
movl $0x18e, %r9d            # imm = 0x18E
jmp 0x14433a
movq 0x2f3bbf(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0c60(%rip), %rsi    # 0x2e5013
leaq 0x1fe22f(%rip), %rdx    # 0x3425e9
leaq 0x1fe1b3(%rip), %rcx    # 0x342574
leaq 0x1fe1bd(%rip), %r8     # 0x342585
pushq $0x2c
jmp 0x144338
movq 0x2f3b92(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0c33(%rip), %rsi    # 0x2e5013
leaq 0x1fe066(%rip), %rdx    # 0x34244d
leaq 0x1fe020(%rip), %rcx    # 0x34240e
leaq 0x1fdf2d(%rip), %r8     # 0x342322
movl $0x193, %r9d            # imm = 0x193
jmp 0x14433a