// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/eis-bwtseq-siop.h
// Function: BWTSeqPosPairRangeOcc
static inline void
BWTSeqPosPairRangeOcc(const BWTSeq *bwtSeq, AlphabetRangeID range,
                      GtUword posA, GtUword posB,
                      GtUword *rangeOccs)
{
  gt_assert(bwtSeq && rangeOccs);
  gt_assert(posA <= posB);
  gt_assert(range < MRAEncGetNumRanges(BWTSeqGetAlphabet(bwtSeq)));
  EISPosPairRangeRank(bwtSeq->seqIdx, range, posA, posB, rangeOccs,
                      bwtSeq->hint);
  if (range == bwtSeq->bwtTerminatorFallbackRange)
  {
    const MRAEnc *alphabet = BWTSeqGetAlphabet(bwtSeq);
    AlphabetRangeSize rSize = MRAEncGetRangeSize(alphabet, range),
      termIdx = MRAEncMapSymbol(alphabet, bwtTerminatorSym)
      - MRAEncGetRangeBase(alphabet, range),
      fbIdx = bwtSeq->bwtTerminatorFallback
      - MRAEncGetRangeBase(alphabet, range);
    memmove(rangeOccs + termIdx + 1, rangeOccs + termIdx,
            sizeof (rangeOccs[0]) * (rSize - 1));
    rangeOccs[termIdx] = rangeOccs[termIdx + rSize] = 0;
    if (posB > BWTSeqTerminatorPos(bwtSeq))
    {
      rangeOccs[termIdx + rSize] = 1;
      --(rangeOccs[fbIdx + rSize]);
      if (posA > BWTSeqTerminatorPos(bwtSeq))
      {
        rangeOccs[termIdx] = 1;
        --(rangeOccs[fbIdx]);
      }
      else
        rangeOccs[termIdx] = 0;
    }
    else
      rangeOccs[rSize + termIdx] = rangeOccs[termIdx] = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x1a8ab0
movq %r8, %rbx
testq %r8, %r8
je 0x1a8ab0
movq %rcx, %r12
movq %rdx, %r14
cmpq %rcx, %rdx
ja 0x1a8ab5
movl %esi, %r13d
movq %rdi, %r15
movq 0x8(%rdi), %rax
cmpl %esi, 0x4(%rax)
jbe 0x1a8aba
movq (%r15), %rdi
movq 0x18(%r15), %r9
movq (%rdi), %rax
movl %r13d, %esi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq *0x20(%rax)
cmpl %r13d, 0x28(%r15)
jne 0x1a8aa1
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1a8abf
cmpl %r13d, 0x4(%rax)
jbe 0x1a8ac4
cmpl $0x1, (%rax)
jne 0x1a8ac9
movq 0x10(%rax), %rcx
movl %r13d, %edx
movzwl (%rcx,%rdx,2), %edi
movzbl 0x114(%rax), %ecx
testl %r13d, %r13d
je 0x1a89df
movq 0x8(%rax), %rdx
leal -0x1(%r13), %esi
movzbl (%rdx,%rsi,2), %edx
jmp 0x1a89e1
xorl %edx, %edx
movzwl %dx, %edx
movzwl %cx, %ecx
subl %edx, %ecx
testl %r13d, %r13d
movq %r14, 0x8(%rsp)
movq %r12, 0x10(%rsp)
je 0x1a8a09
movq 0x8(%rax), %rax
decl %r13d
movzbl (%rax,%r13,2), %eax
movl %eax, (%rsp)
jmp 0x1a8a10
movl $0x0, (%rsp)
movzbl 0x24(%r15), %eax
movl %eax, 0x4(%rsp)
movzwl %cx, %r14d
leaq (%rbx,%r14,8), %r12
leaq (%rbx,%r14,8), %rbp
addq $0x8, %rbp
leaq -0x8(,%rdi,8), %rdx
movq %rdi, %r13
movq %rbp, %rdi
movq %r12, %rsi
callq 0x17cd0
addl %r13d, %r14d
xorl %eax, %eax
movq %rax, (%rbx,%r14,8)
movq %rax, -0x8(%rbp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x30(%r15)
jae 0x1a8a8d
movzwl (%rsp), %eax
movzwl 0x4(%rsp), %ecx
subl %eax, %ecx
movq $0x1, (%rbx,%r14,8)
movzwl %cx, %eax
addl %eax, %r13d
decq (%rbx,%r13,8)
movq 0x8(%rsp), %rcx
cmpq %rcx, 0x30(%r15)
jae 0x1a8a99
movq $0x1, (%r12)
decq (%rbx,%rax,8)
jmp 0x1a8aa1
xorl %eax, %eax
movq %rax, (%r12)
movq %rax, (%rbx,%r14,8)
jmp 0x1a8aa1
movq $0x0, (%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x62721
callq 0x62801
callq 0x6275a
callq 0x627ca
callq 0x62793
callq 0x173b0