// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x144542
movq %rdx, %r15
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x144542
movq %rsi, %rbx
movq (%rdi), %rax
callq *0x30(%rax)
movl %eax, %ebp
cmpq %rbx, 0x30(%r14)
jne 0x144454
cmpb 0x24(%r14), %bpl
jne 0x1445a2
movq 0x10(%r14), %rax
movq 0x38(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rax
jmp 0x144539
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x14456c
movq %r12, %rdi
callq 0x14906a
movzbl %bpl, %esi
cmpw %si, %ax
jbe 0x14456c
movq 0x8(%r12), %rax
pushq $-0x1
popq %rdx
incl %edx
cmpw %si, (%rax,%rdx,2)
jbe 0x14447e
movq 0x48(%r14), %rcx
movl (%rcx,%rdx,4), %ecx
cmpl $0x2, %ecx
je 0x1444bc
testl %ecx, %ecx
jne 0x1445d0
movq 0x38(%r14), %rax
movq (%rax,%rsi,8), %r15
movb 0x24(%r14), %al
cmpb %bpl, %al
jbe 0x1444d8
movq (%r14), %rdi
movq 0x18(%r14), %rcx
movq %rbx, %rdx
callq 0x1446e5
jmp 0x144536
cmpl %edx, 0x4(%r12)
jbe 0x1445eb
movq 0x38(%r14), %rcx
testl %edx, %edx
je 0x144504
leal -0x1(%rdx), %esi
movzbl (%rax,%rsi,2), %eax
jmp 0x144506
jae 0x1444e6
movq 0x10(%r14), %rcx
decq %rcx
cmpq %rsi, %rcx
jne 0x1444ab
cmpb %bpl, %al
jne 0x14451d
movq (%r14), %rdi
movq 0x18(%r14), %rcx
movq %rbx, %rdx
callq 0x1446e5
cmpq %rbx, 0x30(%r14)
sbbq $0x0, %rax
jmp 0x144536
xorl %eax, %eax
movq (%rcx,%rax,8), %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x145c0d
addq %r12, %rax
jmp 0x144539
movq 0x10(%r14), %rax
decq %rax
cmpq %rsi, %rax
jne 0x144618
xorl %eax, %eax
cmpq %rbx, 0x30(%r14)
setb %al
addq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f3a1f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0ac0(%rip), %rsi    # 0x2e5013
leaq 0x1fe169(%rip), %rdx    # 0x3426c3
leaq 0x1fe16e(%rip), %rcx    # 0x3426cf
leaq 0x1fe17c(%rip), %r8     # 0x3426e4
pushq $0x32
jmp 0x144594
movq 0x2f39f5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0a96(%rip), %rsi    # 0x2e5013
leaq 0x1fe1bf(%rip), %rdx    # 0x342743
leaq 0x1fe1e3(%rip), %rcx    # 0x34276e
leaq 0x1fe1f3(%rip), %r8     # 0x342785
pushq $0x6e
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2f39bf(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0a60(%rip), %rsi    # 0x2e5013
leaq 0x1fe07b(%rip), %rdx    # 0x342635
leaq 0x1fe09a(%rip), %rcx    # 0x34265b
leaq 0x1fe09f(%rip), %r8     # 0x342667
movl $0xd4, %r9d
jmp 0x144596
movq 0x2f3991(%rip), %rax    # 0x437f68
movq (%rax), %rsi
leaq 0x1fe015(%rip), %rdi    # 0x3425f6
callq 0x17870
callq 0x17390
movq 0x2f3976(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a0a17(%rip), %rsi    # 0x2e5013
leaq 0x1fe26e(%rip), %rdx    # 0x342871
leaq 0x1fe28d(%rip), %rcx    # 0x342897
leaq 0x1fe174(%rip), %r8     # 0x342785
pushq $0x30
jmp 0x144594
movq 0x2f3949(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a09ea(%rip), %rsi    # 0x2e5013
leaq 0x1fe1ce(%rip), %rdx    # 0x3427fe
leaq 0x1fe1b2(%rip), %rcx    # 0x3427e9
leaq 0x1fe029(%rip), %r8     # 0x342667
pushq $0x42
jmp 0x144594