// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x23019c
cmpq $0x0, 0x30(%rsp)
jne 0x2301d4
movq 0x40bdfd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e5e66(%rip), %rsi    # 0x516013
leaq 0x346533(%rip), %rdx    # 0x5766e7
leaq 0x346540(%rip), %rcx    # 0x5766fb
leaq 0x3447a5(%rip), %r8     # 0x574967
movl $0x93, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2301d6
jmp 0x2301d8
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jbe 0x23021c
movq 0x40bdb5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e5e1e(%rip), %rsi    # 0x516013
leaq 0x346515(%rip), %rdx    # 0x576711
leaq 0x3464f8(%rip), %rcx    # 0x5766fb
leaq 0x34475d(%rip), %r8     # 0x574967
movl $0x94, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23021e
jmp 0x230220
movl 0x4c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x50(%rsp), %rdi
callq 0x230810
movq %rax, %rdi
callq 0x230820
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jb 0x23027c
movq 0x40bd55(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e5dbe(%rip), %rsi    # 0x516013
leaq 0x3464c2(%rip), %rdx    # 0x57671e
leaq 0x346498(%rip), %rcx    # 0x5766fb
leaq 0x3446fd(%rip), %r8     # 0x574967
movl $0x95, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23027e
movq 0x50(%rsp), %rax
movq (%rax), %rdi
movl 0x4c(%rsp), %esi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rax
movq 0x18(%rax), %r9
callq 0x231b50
movl 0x4c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x28(%rcx), %eax
jne 0x230494
movq 0x50(%rsp), %rdi
callq 0x230810
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x230070
movw %ax, 0x26(%rsp)
movq 0x28(%rsp), %rdi
movl $0xfc, %esi
callq 0x230f20
movzbl %al, %eax
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x230830
movb %al, %cl
movl 0x8(%rsp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movw %ax, 0x24(%rsp)
movq 0x50(%rsp), %rax
movzbl 0x24(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x230830
movb %al, %cl
movl 0xc(%rsp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movw %ax, 0x22(%rsp)
movq 0x30(%rsp), %rdi
movzwl 0x24(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq 0x30(%rsp), %rsi
movzwl 0x24(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
movzwl 0x26(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x19bf0
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movzwl 0x26(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
callq 0x22f560
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jbe 0x230464
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movzwl 0x26(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq $0x1, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movzwl 0x22(%rsp), %ecx
movzwl 0x26(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
addq $-0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x22f560
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jbe 0x230450
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movq $0x1, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movzwl 0x22(%rsp), %ecx
movq (%rax,%rcx,8), %rdx
addq $-0x1, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x230462
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x230492
movq 0x30(%rsp), %rax
movzwl 0x24(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movzwl 0x26(%rsp), %ecx
movzwl 0x24(%rsp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x230494
addq $0x58, %rsp
retq
nopl (%rax)