// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: blockCompSeqPosPairRangeRank
static void
blockCompSeqPosPairRangeRank(struct encIdxSeq *eSeqIdx, AlphabetRangeID range,
                             GtUword posA, GtUword posB,
                             GtUword *rankCounts, union EISHint *hint)
{
  struct blockCompositionSeq *seqIdx;
  gt_assert(eSeqIdx && eSeqIdx->classInfo == &blockCompositionSeqClass);
  seqIdx = encIdxSeq2blockCompositionSeq(eSeqIdx);
  gt_assert(range < MRAEncGetNumRanges(EISGetAlphabet(eSeqIdx)));
  switch (seqIdx->modes[range])
  {
  case BLOCK_COMPOSITION_INCLUDE:
    {
      BitOffset varDataMemOffset, cwIdxMemOffset;
      struct superBlock *sBlock;
      AlphabetRangeSize rsize = MRAEncGetRangeSize(eSeqIdx->alphabet, range);
      /* Only when both positions are in same bucket, special treatment
       * makes sense. */
      GtUword bucketNum = bucketNumFromPos(seqIdx, posA);
      if (bucketNum != bucketNumFromPos(seqIdx, posB))
      {
        blockCompSeqRangeRank(eSeqIdx, range, posA, rankCounts, hint);
        blockCompSeqRangeRank(eSeqIdx, range, posB, rankCounts + rsize, hint);
        return;
      }
#ifdef USE_SBLOCK_CACHE
      sBlock = cacheFetchSuperBlock(seqIdx, bucketNum,
                                    &hint->bcHint.sBlockCache);
#else
      sBlock = fetchSuperBlock(seqIdx, bucketNum, NULL);
#endif
      {
        GtUword blockNumA = blockNumFromPos(seqIdx, posA),
          blockNumB = blockNumFromPos(seqIdx, posB);
        unsigned blockSize = seqIdx->blockSize,
          inBucketBlockNumA = blockNumA % seqIdx->bucketBlocks,
          inBucketBlockNumB = blockNumB % seqIdx->bucketBlocks;
        sBlockGetPartialSymSums(sBlock, seqIdx, rankCounts);
        walkCompIndicesPrefix(
          seqIdx, sBlock, inBucketBlockNumA, cwIdxMemOffset,
          addSymCountsFromComposition(&seqIdx->compositionTable,
                                      seqIdx->blockMapAlphabetSize, compIndex,
                                      rankCounts);,
          varDataMemOffset);
        memcpy(rankCounts + rsize, rankCounts, rsize * sizeof (rankCounts[0]));
        adjustRanksForBlock(seqIdx, sBlock, posA, blockSize, rankCounts,
                            cwIdxMemOffset, varDataMemOffset);
        walkCompIndices(
          seqIdx, sBlock, inBucketBlockNumB - inBucketBlockNumA, cwIdxMemOffset,
          addSymCountsFromComposition(&seqIdx->compositionTable,
                                      seqIdx->blockMapAlphabetSize, compIndex,
                                      rankCounts + rsize);,
          varDataMemOffset);
        adjustRanksForBlock(seqIdx, sBlock, posB, blockSize,
                            rankCounts + rsize,
                            cwIdxMemOffset, varDataMemOffset);
        {
          GtUword base = bucketBasePos(seqIdx, bucketNum);
          rankCounts[seqIdx->blockEncFallback]
            -= gt_SRLAllSymbolsCountInSeqRegion(
              seqIdx->rangeEncs, base, posA, &hint->bcHint.rangeHint);
          rankCounts[rsize + seqIdx->blockEncFallback]
            -= gt_SRLAllSymbolsCountInSeqRegion(
              seqIdx->rangeEncs, base, posB, &hint->bcHint.rangeHint);
        }
      }
#ifndef USE_SBLOCK_CACHE
      deleteSuperBlock(sBlock);
#endif
    }
    break;
  case REGIONS_LIST:
    {
      AlphabetRangeSize sym,
        rangeEncNumSyms = gt_MRAEncGetSize(seqIdx->rangeMapAlphabet);
      for (sym = 0; sym < rangeEncNumSyms; ++sym)
        rankCounts[sym] = gt_SRLSymbolCountInSeqRegion(
          seqIdx->rangeEncs, 0, posA,
          MRAEncRevMapSymbol(seqIdx->rangeMapAlphabet, sym),
          &hint->bcHint.rangeHint);
      for (sym = 0; sym < rangeEncNumSyms; ++sym)
        rankCounts[sym + rangeEncNumSyms]
          = gt_SRLSymbolCountInSeqRegion(
            seqIdx->rangeEncs, 0, posB,
            MRAEncRevMapSymbol(seqIdx->rangeMapAlphabet, sym),
            &hint->bcHint.rangeHint);
    }
    break;
  }
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movl %esi, 0xdc(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r8, 0xc0(%rsp)
movq %r9, 0xb8(%rsp)
cmpq $0x0, 0xe0(%rsp)
je 0x4ab275
movq 0xe0(%rsp), %rax
leaq 0x1909a0(%rip), %rcx    # 0x63bc10
cmpq %rcx, (%rax)
je 0x4ab2ad
movq 0x190d24(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6ad8d(%rip), %rsi     # 0x516013
leaq 0x10b565(%rip), %rdx    # 0x5b67f2
leaq 0x10b7f3(%rip), %rcx    # 0x5b6a87
leaq 0x10ac6d(%rip), %r8     # 0x5b5f08
movl $0x5be, %r9d            # imm = 0x5BE
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4ab2af
movq 0xe0(%rsp), %rdi
callq 0x4ac370
movq %rax, 0xb0(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x4ad0a0
movq %rax, %rdi
callq 0x4a64a0
movl %eax, %ecx
movl 0x40(%rsp), %eax
cmpl %ecx, %eax
jb 0x4ab326
movq 0x190cab(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6ad14(%rip), %rsi     # 0x516013
leaq 0x10b731(%rip), %rdx    # 0x5b6a37
leaq 0x10b77a(%rip), %rcx    # 0x5b6a87
leaq 0x10abf4(%rip), %r8     # 0x5b5f08
movl $0x5c0, %r9d            # imm = 0x5C0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4ab328
movq 0xb0(%rsp), %rax
movq 0xa8(%rax), %rax
movl 0xdc(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x3c(%rsp)
subl $0x1, %eax
je 0x4ab35e
jmp 0x4ab34c
movl 0x3c(%rsp), %eax
subl $0x2, %eax
je 0x4ab851
jmp 0x4ab9ae
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0xdc(%rsp), %esi
callq 0x4a64b0
movw %ax, 0x96(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x4ac3d0
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x4ac3d0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
je 0x4ab438
movq 0xe0(%rsp), %rdi
movl 0xdc(%rsp), %esi
movq 0xd0(%rsp), %rdx
movq 0xc0(%rsp), %rcx
movq 0xb8(%rsp), %r8
callq 0x4aae80
movq 0xe0(%rsp), %rdi
movl 0xdc(%rsp), %esi
movq 0xc8(%rsp), %rdx
movq 0xc0(%rsp), %rcx
movzwl 0x96(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rcx
movq 0xb8(%rsp), %r8
callq 0x4aae80
jmp 0x4ab9ae
movq 0xb0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0xb8(%rsp), %rdx
callq 0x4ac400
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x4ac4f0
movq %rax, 0x80(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x4ac4f0
movq %rax, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movl 0xb4(%rax), %eax
movl %eax, 0x74(%rsp)
movq 0x80(%rsp), %rax
movq 0xb0(%rsp), %rcx
movl 0xb0(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq 0xb0(%rsp), %rcx
movl 0xb0(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x6c(%rsp)
movq 0x98(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xc0(%rsp), %rdx
callq 0x4ad0f0
movq 0x98(%rsp), %rdi
movq 0xb0(%rsp), %rsi
xorl %edx, %edx
callq 0x4ac510
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movl (%rax), %eax
movq %rax, 0xa8(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x68(%rsp)
movq 0xb0(%rsp), %rax
movl 0x68(%rax), %eax
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x68(%rsp)
je 0x4ab5f0
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xa0(%rsp), %rsi
movl 0x64(%rsp), %edx
callq 0x473e40
movl %eax, 0x60(%rsp)
movq 0xb0(%rsp), %rdi
addq $0x48, %rdi
movq 0xb0(%rsp), %rax
movzwl 0xc4(%rax), %esi
movl 0x60(%rsp), %edx
movq 0xc0(%rsp), %rcx
callq 0x4ad150
movq 0xb0(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x60(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0x64(%rsp), %eax
addq 0xa0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x68(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x4ab54a
jmp 0x4ab5f2
jmp 0x4ab5f4
movq 0xc0(%rsp), %rdi
movzwl 0x96(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdi
movq 0xc0(%rsp), %rsi
movzwl 0x96(%rsp), %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x19610
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl 0x74(%rsp), %ecx
movq 0xc0(%rsp), %r8
movq 0xa0(%rsp), %r9
movq 0xa8(%rsp), %rax
movq %rax, (%rsp)
callq 0x4ad240
movl 0x6c(%rsp), %eax
subl 0x70(%rsp), %eax
movl %eax, 0x5c(%rsp)
movq 0xb0(%rsp), %rax
movl 0x68(%rax), %eax
movl %eax, 0x58(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0x4ab737
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xa0(%rsp), %rsi
movl 0x58(%rsp), %edx
callq 0x473e40
movl %eax, 0x54(%rsp)
movq 0xb0(%rsp), %rdi
addq $0x48, %rdi
movq 0xb0(%rsp), %rax
movzwl 0xc4(%rax), %esi
movl 0x54(%rsp), %edx
movq 0xc0(%rsp), %rcx
movzwl 0x96(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rcx
callq 0x4ad150
movq 0xb0(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x54(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0x58(%rsp), %eax
addq 0xa0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x5c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x4ab680
jmp 0x4ab739
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movl 0x74(%rsp), %ecx
movq 0xc0(%rsp), %r8
movzwl 0x96(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %r8
movq 0xa0(%rsp), %r9
movq 0xa8(%rsp), %rax
movq %rax, (%rsp)
callq 0x4ad240
movq 0xb0(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x4ac790
movq %rax, 0x48(%rsp)
movq 0xb0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
addq $0x20, %rcx
callq 0x4b2020
movq %rax, %rsi
movq 0xc0(%rsp), %rax
movq 0xb0(%rsp), %rcx
movzbl 0xc6(%rcx), %ecx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xb0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movq 0xb8(%rsp), %rcx
addq $0x20, %rcx
callq 0x4b2020
movq %rax, %rsi
movq 0xc0(%rsp), %rax
movzwl 0x96(%rsp), %ecx
movq 0xb0(%rsp), %rdx
movzbl 0xc6(%rdx), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
subq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x4ab9ae
movq 0xb0(%rsp), %rax
movq 0xa0(%rax), %rdi
callq 0x22aeb0
movw %ax, 0x44(%rsp)
movw $0x0, 0x46(%rsp)
movzwl 0x46(%rsp), %eax
movzwl 0x44(%rsp), %ecx
cmpl %ecx, %eax
jge 0x4ab906
movq 0xb0(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movq 0xa0(%rax), %rdi
movw 0x46(%rsp), %ax
movzbl %al, %esi
callq 0x4ad300
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0xb8(%rsp), %r8
addq $0x20, %r8
xorl %ecx, %ecx
movl %ecx, %esi
movzbl %al, %ecx
callq 0x4b1ba0
movq %rax, %rdx
movq 0xc0(%rsp), %rax
movzwl 0x46(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movw 0x46(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x46(%rsp)
jmp 0x4ab871
movw $0x0, 0x46(%rsp)
movzwl 0x46(%rsp), %eax
movzwl 0x44(%rsp), %ecx
cmpl %ecx, %eax
jge 0x4ab9ac
movq 0xb0(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movq 0xa0(%rax), %rdi
movw 0x46(%rsp), %ax
movzbl %al, %esi
callq 0x4ad300
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0xb8(%rsp), %r8
addq $0x20, %r8
xorl %ecx, %ecx
movl %ecx, %esi
movzbl %al, %ecx
callq 0x4b1ba0
movq %rax, %rdx
movq 0xc0(%rsp), %rax
movzwl 0x46(%rsp), %ecx
movzwl 0x44(%rsp), %esi
addl %esi, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movw 0x46(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x46(%rsp)
jmp 0x4ab90d
jmp 0x4ab9ae
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)