// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x2207a0
cmpq $0x0, 0x90(%rsp)
jne 0x2205a1
movq 0x41ba30(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f5a99(%rip), %rsi    # 0x516013
leaq 0x354142(%rip), %rdx    # 0x5746c3
leaq 0x354156(%rip), %rcx    # 0x5746de
leaq 0x354063(%rip), %r8     # 0x5745f2
movl $0x18d, %r9d            # imm = 0x18D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2205a3
jmp 0x2205a5
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x2204a0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jb 0x220606
movq 0x41b9cb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f5a34(%rip), %rsi    # 0x516013
leaq 0x354110(%rip), %rdx    # 0x5746f6
leaq 0x3540f1(%rip), %rcx    # 0x5746de
leaq 0x353ffe(%rip), %r8     # 0x5745f2
movl $0x18e, %r9d            # imm = 0x18E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x220608
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rax
addq 0x80(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2207c0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x2206a6
movq 0x41b92b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f5994(%rip), %rsi    # 0x516013
leaq 0x354097(%rip), %rdx    # 0x57471d
leaq 0x354051(%rip), %rcx    # 0x5746de
leaq 0x353f5e(%rip), %r8     # 0x5745f2
movl $0x193, %r9d            # imm = 0x193
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2206a8
jmp 0x2206aa
movq 0x68(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x2206df
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x220910
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x2206aa
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x220749
movq 0x8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x220af0
movb %al, %dl
movq 0x78(%rsp), %rax
movq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x220910
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x2206ec
jmp 0x22074b
movq 0x68(%rsp), %rax
addq $0x1, %rax
cmpq 0x88(%rsp), %rax
je 0x220796
movq 0x41b83b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f58a4(%rip), %rsi    # 0x516013
leaq 0x353fc1(%rip), %rdx    # 0x574737
leaq 0x353f61(%rip), %rcx    # 0x5746de
leaq 0x353e6e(%rip), %r8     # 0x5745f2
movl $0x1a6, %r9d            # imm = 0x1A6
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x220798
addq $0x98, %rsp
retq