// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/eis-bwtseq-siop.h
// Function: BWTSeqLFMap
static inline GtUword
BWTSeqLFMap(const BWTSeq *bwtSeq, GtUword LPos,
            struct extBitsRetrieval *extBits)
{
  Symbol tSym = EISGetTransformedSym(bwtSeq->seqIdx, LPos, bwtSeq->hint);
  GtUword FPos;
  const MRAEnc *alphabet = BWTSeqGetAlphabet(bwtSeq);
  if (LPos != BWTSeqTerminatorPos(bwtSeq))
  {
    AlphabetRangeID range = MRAEncGetRangeOfSymbol(alphabet, tSym);
    switch (bwtSeq->rangeSort[range])
    {
    case SORTMODE_VALUE:
      FPos = bwtSeq->count[tSym] + BWTSeqTransformedOcc(bwtSeq, tSym, LPos);
      break;
    case SORTMODE_RANK:
      FPos = bwtSeq->count[MRAEncGetRangeBase(alphabet, range)]
        + gt_BWTSeqGetRankSort(bwtSeq, LPos, range, extBits);
      break;
    case SORTMODE_UNDEFINED:
    default:
#ifndef _NDEBUG
      fputs("Requesting LF-map for symbol from range of undefined sorting.\n",
            stderr);
      abort();
#endif
      FPos = (GtUword)-1;
      break;
    }
  }
  else
  {
    gt_assert(tSym == bwtSeq->bwtTerminatorFallback);
    FPos = bwtSeq->count[bwtSeq->alphabetSize - 1];
  }
  return FPos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x199fd2
movq %rdx, %r12
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x199fd2
movq %rsi, %rbx
movq (%rdi), %rax
callq *0x30(%rax)
movl %eax, %ebp
cmpq %rbx, 0x30(%r14)
jne 0x199e64
cmpb 0x24(%r14), %bpl
jne 0x199fdc
movq 0x10(%r14), %rax
movq 0x38(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rax
jmp 0x199f9e
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x199fd7
movq %r13, %rdi
callq 0x19e077
movzbl %bpl, %r15d
cmpw %r15w, %ax
jbe 0x199fd7
movq 0x8(%r13), %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
incl %edx
cmpw %r15w, (%rax,%rdx,2)
jbe 0x199e90
movq 0x48(%r14), %rcx
movl (%rcx,%rdx,4), %ecx
cmpl $0x2, %ecx
je 0x199efa
testl %ecx, %ecx
jne 0x199fe1
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %r13
movb 0x24(%r14), %al
cmpb %bpl, %al
jbe 0x199f15
movq (%r14), %r12
testq %r12, %r12
je 0x199feb
movq 0x18(%r14), %r14
movq 0x8(%r12), %rdi
callq 0x19e077
cmpw %r15w, %ax
jbe 0x199ff0
movq (%r12), %rax
movq %r12, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq *0x8(%rax)
jmp 0x199f9b
cmpl %edx, 0x4(%r13)
jbe 0x199fe6
movq 0x38(%r14), %rcx
testl %edx, %edx
je 0x199f6d
leal -0x1(%rdx), %esi
movzbl (%rax,%rsi,2), %eax
jmp 0x199f6f
jae 0x199f27
movq 0x10(%r14), %rcx
decq %rcx
cmpq %r15, %rcx
jne 0x199fad
cmpb %bpl, %al
jne 0x199f86
movq (%r14), %r12
testq %r12, %r12
je 0x199ff5
movq 0x18(%r14), %rbp
movq 0x8(%r12), %rdi
callq 0x19e077
cmpw %r15w, %ax
jbe 0x199fff
movq (%r12), %rax
movq %r12, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movq %rbp, %rcx
callq *0x8(%rax)
cmpq %rbx, 0x30(%r14)
sbbq $0x0, %rax
jmp 0x199f9b
xorl %eax, %eax
movq (%rcx,%rax,8), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x19b26e
addq %r15, %rax
jmp 0x199f9e
movq 0x10(%r14), %rax
decq %rax
cmpq %r15, %rax
jne 0x199ffa
xorl %eax, %eax
cmpq %rbx, 0x30(%r14)
setb %al
addq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %r12
testq %r12, %r12
je 0x19a004
movq 0x18(%r14), %r14
movq 0x8(%r12), %rdi
callq 0x19e077
cmpw %r15w, %ax
ja 0x199ee2
callq 0x5ea36
callq 0x5e9c8
callq 0x5ebd3
callq 0x5ec0a
callq 0x5ebb7
callq 0x5e9ff
callq 0x5eb80
callq 0x5eb49
callq 0x5eb12
callq 0x5eaa4
callq 0x5eadb
callq 0x5ea6d
nopl (%rax)