// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: fetchSuperBlock
static struct superBlock *
fetchSuperBlock(const struct blockCompositionSeq *seqIdx,
                GtUword bucketNum, struct superBlock *sBlockPreAlloc)
{
  struct superBlock *retval = NULL;
  gt_assert(seqIdx);
  gt_assert(bucketNum * seqIdx->bucketBlocks * seqIdx->blockSize
         <= seqIdx->baseClass.seqLen);
  if (sBlockPreAlloc)
    retval = sBlockPreAlloc;
  else
    retval = newEmptySuperBlock(seqIdx);
  if (seqIdxUsesMMap(seqIdx))
  {
    BitOffset bucketOffset = bucketNum * superBlockCWBits(seqIdx);
    BitOffset varDataOffset;
    retval->cwData = (BitString)(seqIdx->externalData.idxMMap
      + bucketOffset / bitElemBits * sizeof (BitElem));
    retval->cwIdxMemBase = bucketOffset%bitElemBits;

    varDataOffset = sBlockGetVarIdxOffset(retval, seqIdx);
    retval->varData = (BitString)(seqIdx->externalData.idxMMap
      + seqIdx->externalData.varDataPos - seqIdx->externalData.cwDataPos
      + varDataOffset/bitElemBits * sizeof (BitElem));
    retval->varDataMemBase = varDataOffset%bitElemBits;
  }
  else
  {
    FILE *idxFP;
    GT_UNUSED int ret;
    size_t superBlockCWDiskSize = superBlockCWMaxReadSize(seqIdx);
    BitOffset bucketOffset = bucketNum * superBlockCWBits(seqIdx);
    BitOffset varDataOffset;
    idxFP = seqIdx->externalData.idxFP;
    if (fseeko(idxFP, seqIdx->externalData.cwDataPos
              + bucketOffset / bitElemBits * sizeof (BitElem), SEEK_SET))
      fetchSuperBlockErrRet();
    if (fread(retval->cwData, 1, superBlockCWDiskSize, idxFP)
       != superBlockCWDiskSize)
      fetchSuperBlockErrRet();
    retval->cwIdxMemBase = bucketOffset%bitElemBits;
    varDataOffset = sBlockGetVarIdxOffset(retval, seqIdx);
    if (fseeko(idxFP, seqIdx->externalData.varDataPos
              + varDataOffset/bitElemBits * sizeof (BitElem), SEEK_SET))
      fetchSuperBlockErrRet();
    retval->varDataMemBase = varDataOffset%bitElemBits;
    ret = fread(retval->varData, sizeof (BitElem),
                superBlockVarMaxReadSize(seqIdx),
                idxFP);
    if (ferror(idxFP))
      fetchSuperBlockErrRet();
  }
  return retval;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x4ac88c
movq 0x18f745(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x697ae(%rip), %rsi     # 0x516013
leaq 0x109e4b(%rip), %rdx    # 0x5b66b7
leaq 0x10a03e(%rip), %rcx    # 0x5b68b1
leaq 0x10968e(%rip), %r8     # 0x5b5f08
movl $0x389, %r9d            # imm = 0x389
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4ac88e
jmp 0x4ac890
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
movl 0xb0(%rcx), %ecx
imulq %rcx, %rax
movq 0x68(%rsp), %rcx
movl 0xb4(%rcx), %ecx
imulq %rcx, %rax
movq 0x68(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x4ac8f6
movq 0x18f6db(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x69744(%rip), %rsi     # 0x516013
leaq 0x109feb(%rip), %rdx    # 0x5b68c1
leaq 0x109fd4(%rip), %rcx    # 0x5b68b1
leaq 0x109624(%rip), %r8     # 0x5b5f08
movl $0x38b, %r9d            # imm = 0x38B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4ac8f8
cmpq $0x0, 0x58(%rsp)
je 0x4ac90c
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x4ac91b
movq 0x68(%rsp), %rdi
callq 0x4acbc0
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
callq 0x4acc10
cmpl $0x0, %eax
je 0x4ac9ec
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rdi
callq 0x4aa0b0
movq %rax, %rcx
movq 0x10(%rsp), %rax
imulq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x48(%rsp), %rax
shrq $0x3, %rax
shlq $0x0, %rax
addq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x48(%rsp), %rax
andq $0x7, %rax
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x50(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x4acc30
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x68(%rsp), %rax
addq 0x38(%rax), %rcx
movq 0x68(%rsp), %rdx
xorl %eax, %eax
subq 0x30(%rdx), %rax
addq %rax, %rcx
movq 0x40(%rsp), %rax
shrq $0x3, %rax
shlq $0x0, %rax
addq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
andq $0x7, %rax
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
jmp 0x4acba3
movq 0x68(%rsp), %rdi
callq 0x4acc80
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
callq 0x4aa0b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
imulq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x20(%rsp), %rax
shrq $0x3, %rax
shlq $0x0, %rax
addq %rax, %rsi
xorl %edx, %edx
callq 0x19c10
cmpl $0x0, %eax
je 0x4aca7a
jmp 0x4aca5a
cmpq $0x0, 0x58(%rsp)
jne 0x4aca6c
movq 0x50(%rsp), %rdi
callq 0x4accb0
movq $0x0, 0x70(%rsp)
jmp 0x4acbad
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl $0x1, %esi
callq 0x19a70
cmpq 0x28(%rsp), %rax
je 0x4acac0
jmp 0x4acaa0
cmpq $0x0, 0x58(%rsp)
jne 0x4acab2
movq 0x50(%rsp), %rdi
callq 0x4accb0
movq $0x0, 0x70(%rsp)
jmp 0x4acbad
movq 0x20(%rsp), %rax
andq $0x7, %rax
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x50(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x4acc30
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x18(%rsp), %rax
shrq $0x3, %rax
shlq $0x0, %rax
addq %rax, %rsi
xorl %edx, %edx
callq 0x19c10
cmpl $0x0, %eax
je 0x4acb30
jmp 0x4acb13
cmpq $0x0, 0x58(%rsp)
jne 0x4acb25
movq 0x50(%rsp), %rdi
callq 0x4accb0
movq $0x0, 0x70(%rsp)
jmp 0x4acbad
movq 0x18(%rsp), %rax
andq $0x7, %rax
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
callq 0x4accd0
movq (%rsp), %rdi
movq %rax, %rdx
movq 0x38(%rsp), %rcx
movl $0x1, %esi
callq 0x19a70
movl %eax, 0x34(%rsp)
movq 0x38(%rsp), %rdi
callq 0x19e10
cmpl $0x0, %eax
je 0x4acba1
jmp 0x4acb84
cmpq $0x0, 0x58(%rsp)
jne 0x4acb96
movq 0x50(%rsp), %rdi
callq 0x4accb0
movq $0x0, 0x70(%rsp)
jmp 0x4acbad
jmp 0x4acba3
movq 0x50(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopw (%rax,%rax)