// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: blockCompSeqRank
static GtUword
blockCompSeqRank(struct encIdxSeq *eSeqIdx, Symbol eSym, GtUword pos,
                 union EISHint *hint)
{
  struct blockCompositionSeq *seqIdx;
  GtUword rankCount;
  gt_assert(eSeqIdx && eSeqIdx->classInfo == &blockCompositionSeqClass);
  seqIdx = encIdxSeq2blockCompositionSeq(eSeqIdx);
  gt_assert(gt_MRAEncSymbolIsInSelectedRanges(seqIdx->baseClass.alphabet,
                                        eSym, BLOCK_COMPOSITION_INCLUDE,
                                        seqIdx->modes) >= 0);
  if (gt_MRAEncSymbolIsInSelectedRanges(seqIdx->baseClass.alphabet, eSym,
                                     BLOCK_COMPOSITION_INCLUDE, seqIdx->modes))
  {
    BitOffset varDataMemOffset, cwIdxMemOffset;
    struct superBlock *sBlock;
    Symbol bSym = MRAEncMapSymbol(seqIdx->blockMapAlphabet, eSym);
    GtUword blockNum, bucketNum;
    unsigned blockSize = seqIdx->blockSize, bitsPerCompositionIdx
      = seqIdx->compositionTable.compositionIdxBits;
    bucketNum = bucketNumFromPos(seqIdx, pos);
#ifdef USE_SBLOCK_CACHE
    sBlock = cacheFetchSuperBlock(seqIdx, bucketNum,
                                  &hint->bcHint.sBlockCache);
#else
    sBlock = fetchSuperBlock(seqIdx, bucketNum, NULL);
#endif
    rankCount = sBlockGetPartialSymSum(sBlock, bSym, seqIdx);
    blockNum = blockNumFromPos(seqIdx, pos);
    walkCompIndicesPrefix(
      seqIdx, sBlock, blockNum % seqIdx->bucketBlocks, cwIdxMemOffset,
      rankCount += symCountFromComposition(
        &seqIdx->compositionTable, seqIdx->blockMapAlphabetSize, compIndex,
        bSym);,
      varDataMemOffset);
    rankCount = adjustPosRankForBlock(
      seqIdx, sBlock, pos, bSym, blockSize, rankCount, cwIdxMemOffset,
      varDataMemOffset, bitsPerCompositionIdx);
    if (bSym == seqIdx->blockEncFallback)
    {
      GtUword base = bucketBasePos(seqIdx, bucketNum);
      rankCount -= gt_SRLAllSymbolsCountInSeqRegion(
        seqIdx->rangeEncs, base, pos, &hint->bcHint.rangeHint);
    }
#ifndef USE_SBLOCK_CACHE
    deleteSuperBlock(sBlock);
#endif
  }
  else
  {
    rankCount = gt_SRLSymbolCountInSeqRegion(seqIdx->rangeEncs, 0, pos, eSym,
                                          &hint->bcHint.rangeHint);
  }
  return rankCount;
}

// Assembly:
subq $0x98, %rsp
movb %sil, %al
movq %rdi, 0x90(%rsp)
movb %al, 0x8f(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x4aa445
movq 0x90(%rsp), %rax
leaq 0x1917d0(%rip), %rcx    # 0x63bc10
cmpq %rcx, (%rax)
je 0x4aa47d
movq 0x191b54(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6bbbd(%rip), %rsi     # 0x516013
leaq 0x10c395(%rip), %rdx    # 0x5b67f2
leaq 0x10c3c9(%rip), %rcx    # 0x5b682d
leaq 0x10ba9d(%rip), %r8     # 0x5b5f08
movl $0x492, %r9d            # imm = 0x492
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4aa47f
movq 0x90(%rsp), %rdi
callq 0x4ac370
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rdi
movb 0x8f(%rsp), %al
movq 0x70(%rsp), %rcx
movq 0xa8(%rcx), %rcx
movl $0x1, %edx
movzbl %al, %esi
callq 0x22b530
cmpl $0x0, %eax
jge 0x4aa4f7
movq 0x191ada(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6bb43(%rip), %rsi     # 0x516013
leaq 0x10c367(%rip), %rdx    # 0x5b683e
leaq 0x10c34f(%rip), %rcx    # 0x5b682d
leaq 0x10ba23(%rip), %r8     # 0x5b5f08
movl $0x496, %r9d            # imm = 0x496
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4aa4f9
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rdi
movb 0x8f(%rsp), %al
movq 0x70(%rsp), %rcx
movq 0xa8(%rcx), %rcx
movl $0x1, %edx
movzbl %al, %esi
callq 0x22b530
cmpl $0x0, %eax
je 0x4aa74d
movq 0x70(%rsp), %rax
movq 0x98(%rax), %rdi
movzbl 0x8f(%rsp), %esi
callq 0x4a65b0
movb %al, 0x4f(%rsp)
movq 0x70(%rsp), %rax
movl 0xb4(%rax), %eax
movl %eax, 0x34(%rsp)
movq 0x70(%rsp), %rax
movl 0x68(%rax), %eax
movl %eax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x4ac3d0
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x4ac400
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movb 0x4f(%rsp), %al
movq 0x70(%rsp), %rdx
movzbl %al, %esi
callq 0x4ac490
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x4ac4f0
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x70(%rsp), %rsi
xorl %edx, %edx
callq 0x4ac510
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x60(%rsp)
movq 0x40(%rsp), %rax
movq 0x70(%rsp), %rcx
movl 0xb0(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x2c(%rsp)
movq 0x70(%rsp), %rax
movl 0x68(%rax), %eax
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x2c(%rsp)
je 0x4aa6a2
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x58(%rsp), %rsi
movl 0x28(%rsp), %edx
callq 0x473e40
movl %eax, 0x24(%rsp)
movq 0x70(%rsp), %rdi
addq $0x48, %rdi
movq 0x70(%rsp), %rax
movzwl 0xc4(%rax), %esi
movl 0x24(%rsp), %edx
movzbl 0x4f(%rsp), %ecx
callq 0x4ac570
movl %eax, %eax
addq 0x68(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x24(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addq 0x60(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x28(%rsp), %eax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x2c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4aa60e
jmp 0x4aa6a4
jmp 0x4aa6a6
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x80(%rsp), %rdx
movb 0x4f(%rsp), %cl
movl 0x34(%rsp), %r8d
movq 0x68(%rsp), %r9
movq 0x58(%rsp), %r11
movq 0x60(%rsp), %r10
movl 0x30(%rsp), %eax
movzbl %cl, %ecx
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x4ac660
movq %rax, 0x68(%rsp)
movzbl 0x4f(%rsp), %eax
movq 0x70(%rsp), %rcx
movzbl 0xc6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x4aa74b
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x4ac790
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x18(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
addq $0x20, %rcx
callq 0x4b2020
movq %rax, %rcx
movq 0x68(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x68(%rsp)
jmp 0x4aa77f
movq 0x70(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x80(%rsp), %rdx
movb 0x8f(%rsp), %al
movq 0x78(%rsp), %r8
addq $0x20, %r8
xorl %ecx, %ecx
movl %ecx, %esi
movzbl %al, %ecx
callq 0x4b1ba0
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
addq $0x98, %rsp
retq
nopl (%rax)