// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: printBucket
static int
printBucket(const struct blockCompositionSeq *seqIdx, GtUword bucketNum,
            int flags, FILE *fp, union EISHint *hint)
{
  GtUword lastBucket = bucketNumFromPos(seqIdx,
                                             EISLength(&seqIdx->baseClass)),
                start, end;
  AlphabetRangeSize i, blockMapAlphabetSize = seqIdx->blockMapAlphabetSize;
  int outCount = 0;
  gt_assert(seqIdx && fp && hint);
  if (bucketBasePos(seqIdx, bucketNum) >= EISLength(&seqIdx->baseClass))
  {
    gt_log_log("warning: querying bucket "GT_WU""
            " beyond end of sequence!\n", bucketNum);
    bucketNum = lastBucket;
  }
  start = bucketBasePos(seqIdx, bucketNum);
  end = ((bucketNum < lastBucket)?
         bucketBasePos(seqIdx, bucketNum + 1):
         EISLength(&seqIdx->baseClass));
  outCount +=
    fprintf(fp, "# Inspecting bucket: "GT_WU"\n"
            "# bucket position start="GT_WU", end="GT_WU"\n"
            "# partial symbol sums up to start:\n",
            bucketNum, start, end - 1);
  {
    struct superBlock *sBlock;
    BitOffset varDataMemOffset, cwIdxMemOffset, varIdxOffset;
    Symbol *block;
    unsigned blockSize = seqIdx->blockSize,
      idxBits = seqIdx->compositionTable.compositionIdxBits;
#ifdef USE_SBLOCK_CACHE
    sBlock = cacheFetchSuperBlock(seqIdx, bucketNum,
                                  &hint->bcHint.sBlockCache);
#else
    sBlock = fetchSuperBlock(seqIdx, bucketNum, NULL);
#endif
    block = gt_malloc(sizeof (block[0]) * seqIdx->blockSize);
    for (i = 0; i < blockMapAlphabetSize; ++i)
    {
      if (flags & BUCKET_PRINT_BITSIZES)
      {
        outCount += fprintf(fp, "# partial sum[%u] bits: %u\n", i,
                            seqIdx->partialSymSumBits[i]);
      }
      outCount +=
        fprintf(fp, "# partial sum[%u]="GT_WU"\n", i,
                sBlockGetPartialSymSum(sBlock, i, seqIdx));
    }
    if (flags & BUCKET_PRINT_BITSIZES)
    {
      fprintf(fp, "# bit size of sBlockVarIdxOffset: %u\n",
              seqIdx->bitsPerVarDiskOffset);
    }
    fprintf(fp, "# sBlockVarIdxOffset="GT_LLU"\n",
            (varIdxOffset = sBlockGetVarIdxOffset(sBlock, seqIdx)));
    if (seqIdx->callBackDataOffsetBits)
      fprintf(fp, "# sBlockGetcbOffset="GT_LLU"\n",
              sBlockGetcbOffset(sBlock, seqIdx));
    i = 0;
    if (flags & BUCKET_PRINT_BITSIZES)
    {
      fprintf(fp, "# bits of constant width extension data: "GT_LLU"\n",
              (GtUint64)seqIdx->cwExtBitsPerBucket);
    }
    walkCompIndicesPrefix(
      seqIdx, sBlock, seqIdx->bucketBlocks, cwIdxMemOffset,
      outCount +=
      fprintf(
         fp, "# block %u: comp idx: "GT_WU", permIdxBits=%u, perm idx: " GT_WU
         "=>", i, (GtUword)compIndex,
         (unsigned)seqIdx->compositionTable.permutations[compIndex].permIdxBits,
         (GtUword)gt_bsGetPermCompIndex(
                   sBlock->varData, varDataMemOffset,
                   seqIdx->compositionTable.permutations[compIndex].permIdxBits)
         );
      unpackBlock(seqIdx, sBlock, cwIdxMemOffset, varDataMemOffset, block,
                  blockSize);
      outCount += printBlock(block, blockSize, fp);
      fputs("\n", fp);
      i++; , varDataMemOffset);
    gt_free(block);
    if (flags & BUCKET_PRINT_BITSTRING)
    {
      for (i = 0; i < blockMapAlphabetSize; ++i)
      {
        if (gt_bsPrint(fp, sBlock->cwData, seqIdx->partialSymSumBitsSums[i]
                    + sBlock->cwIdxMemBase, seqIdx->partialSymSumBits[i]))
          outCount += seqIdx->partialSymSumBits[i];
        if (flags & BUCKET_PRINT_BITSTRING_SEPARATOR)
          outCount += fputs("&", fp);
      }
      gt_bsPrint(fp, sBlock->cwData,
              cwPreVarIdxBits(seqIdx) + sBlock->cwIdxMemBase,
              seqIdx->bitsPerVarDiskOffset);
      if (flags & BUCKET_PRINT_BITSTRING_SEPARATOR)
        outCount += fputs("&", fp);
      if (seqIdx->callBackDataOffsetBits)
      {
        gt_bsPrint(fp, sBlock->cwData, sBlockGetcbOffsetOffset(sBlock, seqIdx),
                seqIdx->callBackDataOffsetBits);
        if (flags & BUCKET_PRINT_BITSTRING_SEPARATOR)
          outCount += fputs("&", fp);
      }
      walkCompIndicesPrefix(
        seqIdx, sBlock, seqIdx->bucketBlocks, cwIdxMemOffset,
        gt_bsPrint(fp, sBlock->cwData, cwIdxMemOffset, idxBits);
        if (flags & BUCKET_PRINT_BITSTRING_SEPARATOR)
          outCount += fputs("&", fp);, varDataMemOffset);
      gt_bsPrint(fp, sBlock->cwData, sBlockCWExtBitsOffset(sBlock, seqIdx),
              seqIdx->cwExtBitsPerBucket);
      fputs("\n# variable width string: \n", fp);
      walkCompIndicesPrefix(
        seqIdx, sBlock, seqIdx->bucketBlocks, cwIdxMemOffset,
        idxBits =
        seqIdx->compositionTable.permutations[compIndex].permIdxBits;
        gt_bsPrint(fp, sBlock->varData, varDataMemOffset, idxBits);
        if (flags & BUCKET_PRINT_BITSTRING_SEPARATOR)
          outCount += fputs("&", fp);, varDataMemOffset);
      if (bucketNum != lastBucket)
      {
        struct superBlock *nextSBlock;
        BitOffset nextVarIdxOffset;
#ifdef USE_SBLOCK_CACHE
        nextSBlock = cacheFetchSuperBlock(seqIdx, bucketNum + 1,
                                          &hint->bcHint.sBlockCache);
#else
        nextSBlock = fetchSuperBlock(seqIdx, bucketNum + 1, NULL);
#endif
        nextVarIdxOffset = sBlockGetVarIdxOffset(nextSBlock, seqIdx);
        gt_bsPrint(fp, sBlock->varData, varDataMemOffset,
                nextVarIdxOffset - varIdxOffset);
        fprintf(fp, "\n# varIdxOffset for next block: "GT_LLU"",
                (GtUint64)nextVarIdxOffset);
#ifndef USE_SBLOCK_CACHE
        deleteSuperBlock(sBlock);
#endif
      }
      fputs("\n", fp);
    }
    if (flags & BUCKET_PRINT_RANGES_OVERLAY)
    {
      fputs("# overlapping symbol ranges:\n", fp);
      gt_SRLPrintRangesInfo(seqIdx->rangeEncs, fp, start, end - start,
                         &hint->bcHint.rangeHint);
    }
  }
  return outCount;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %r14
movl %edx, 0xc(%rsp)
movq %rsi, %r12
movq %rdi, %r15
movq 0x10(%rdi), %r8
movl 0xb0(%rdi), %esi
movl 0xb4(%rdi), %r9d
movl %r9d, %edi
imull %esi, %edi
movq %r8, %rax
xorl %edx, %edx
divq %rdi
testq %rcx, %rcx
je 0x30da58
testq %r14, %r14
je 0x30da58
movq %rcx, %rbx
movq %rax, %r13
movzwl 0xc4(%r15), %ebp
movq %rsi, %rax
imulq %r12, %rax
imulq %r9, %rax
cmpq %r8, %rax
jae 0x30d2e1
imulq %rsi, %r9
movq %r9, %rcx
imulq %r12, %rcx
cmpq %r12, %r13
jbe 0x30d30f
leaq 0x1(%r12), %rax
imulq %rax, %r9
movq %r9, %r8
jmp 0x30d30f
leaq 0xd440e(%rip), %rdi     # 0x3e16f6
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movl 0xb0(%r15), %eax
movl 0xb4(%r15), %ecx
imulq %rax, %rcx
imulq %r13, %rcx
movq 0x10(%r15), %r8
movq %r13, %r12
movq %r13, 0x68(%rsp)
movq %r8, 0x80(%rsp)
decq %r8
leaq 0xd4406(%rip), %rsi     # 0x3e172c
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rdx
movq %rcx, 0x78(%rsp)
xorl %eax, %eax
callq 0x17ab0
movl %eax, 0x8(%rsp)
movl 0x68(%r15), %eax
movq %rax, 0x88(%rsp)
movl 0xb4(%r15), %ebx
movq %r15, %rdi
movq %r12, 0x70(%rsp)
movq %r12, %rsi
movq %r14, 0x48(%rsp)
movq %r14, %rdx
callq 0x30cc26
movq %rax, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movl 0xb4(%r15), %edi
leaq 0xd364c(%rip), %rsi     # 0x3e09d0
movl $0xa09, %edx            # imm = 0xA09
callq 0x104226
movq %rax, 0x58(%rsp)
testq %rbp, %rbp
je 0x30d443
xorl %r13d, %r13d
testb $0x4, 0xc(%rsp)
jne 0x30d3b7
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r12
movl 0x8(%rsp), %r15d
jmp 0x30d3e9
movq 0x18(%rsp), %r12
movq 0xd0(%r12), %rax
movl (%rax,%r13,4), %ecx
movq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0xd43b7(%rip), %rsi     # 0x3e178e
movl %r13d, %edx
xorl %eax, %eax
callq 0x17ab0
movl 0x8(%rsp), %r15d
addl %eax, %r15d
movq 0x10(%rsp), %r8
movq 0x10(%r8), %rdi
movq 0xd0(%r12), %rax
movq 0xd8(%r12), %rcx
movzbl %r13b, %edx
shll $0x2, %edx
movl (%rcx,%rdx), %esi
addl 0x4(%r8), %esi
movl (%rax,%rdx), %edx
callq 0x2f37dc
movq %r14, %rdi
leaq 0xd4388(%rip), %rsi     # 0x3e17aa
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17ab0
addl %eax, %r15d
movl %r15d, 0x8(%rsp)
incq %r13
cmpq %r13, %rbp
jne 0x30d39f
testb $0x4, 0xc(%rsp)
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r12
je 0x30d46d
movl 0xc0(%r12), %edx
leaq 0xd435e(%rip), %rsi     # 0x3e17c1
movq %r14, %rdi
xorl %eax, %eax
callq 0x17ab0
movq 0x10(%rsp), %r15
movl 0x4(%r15), %eax
movq 0x10(%r15), %rdi
movl 0xc0(%r12), %edx
movl 0xe0(%r12), %esi
addq %rax, %rsi
callq 0x2f37dc
leaq 0xd434e(%rip), %rsi     # 0x3e17e7
movq %r14, %rdi
movq %rax, 0x60(%rsp)
movq %rax, %rdx
xorl %eax, %eax
callq 0x17ab0
movl 0xb8(%r12), %edx
testl %edx, %edx
je 0x30d4ee
movl 0x4(%r15), %eax
movq 0x10(%r15), %rdi
movl 0xc0(%r12), %ecx
movl 0xe0(%r12), %esi
addq %rax, %rcx
addq %rcx, %rsi
callq 0x2f37dc
leaq 0xd4321(%rip), %rsi     # 0x3e1802
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x17ab0
movq %rbp, 0x50(%rsp)
testb $0x4, 0xc(%rsp)
je 0x30d513
movq 0x90(%r12), %rdx
leaq 0xd4313(%rip), %rsi     # 0x3e181c
movq %r14, %rdi
xorl %eax, %eax
callq 0x17ab0
movl 0xb0(%r12), %edi
testl %edi, %edi
movq 0x58(%rsp), %rbp
je 0x30d69e
movq %rbx, 0x90(%rsp)
movl 0x68(%r12), %edx
movl (%r15), %ebx
movl 0x4(%r15), %eax
movl 0xb8(%r12), %esi
movl 0xc0(%r12), %ecx
addq %rcx, %rax
movl 0xe0(%r12), %ecx
addq %rcx, %rsi
addq %rax, %rsi
leaq 0xbca25(%rip), %r13     # 0x3c9f89
xorl %r14d, %r14d
movq 0x20(%rsp), %r15
movq %rdx, 0x98(%rsp)
movq %rsi, 0x28(%rsp)
movl %edi, 0x38(%rsp)
movq 0x10(%rsp), %rbp
movq 0x10(%rbp), %rdi
callq 0x2f2688
movl %r14d, 0x44(%rsp)
movzwl %r14w, %ecx
movl %ecx, 0x30(%rsp)
movl %eax, %r14d
movq 0x50(%r12), %rax
leaq (%r14,%r14,2), %rcx
movq %rcx, 0xa0(%rsp)
movl 0x8(%rax,%rcx,8), %r12d
movq 0x8(%rbp), %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x2f2688
movl %eax, %r9d
movq %r15, %rdi
leaq 0xd427e(%rip), %rsi     # 0x3e184b
movl 0x30(%rsp), %edx
movq %r14, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x17ab0
movl %eax, 0x40(%rsp)
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
movq 0x58(%rsp), %rbp
movq 0x28(%rsp), %rdx
movq %rbx, 0x30(%rsp)
movq %rbx, %rcx
movq %rbp, %r8
movq 0x90(%rsp), %rbx
movl %ebx, %r9d
callq 0x30d0f3
movl $0x0, %r12d
testq %rbx, %rbx
je 0x30d63e
xorl %r14d, %r14d
xorl %r12d, %r12d
movzbl (%rbp,%r14), %edx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x17ab0
addl %eax, %r12d
incq %r14
cmpq %r14, %rbx
jne 0x30d620
movl 0x8(%rsp), %eax
addl 0x40(%rsp), %eax
addl %r12d, %eax
movl %eax, 0x8(%rsp)
leaq 0xb2a4b(%rip), %rdi     # 0x3c009f
movq %r15, %rsi
callq 0x178c0
movl 0x44(%rsp), %r14d
incl %r14d
movq 0x18(%rsp), %r12
movq 0x50(%r12), %rax
movq 0xa0(%rsp), %rcx
movl 0x8(%rax,%rcx,8), %eax
movq 0x30(%rsp), %rbx
addq %rax, %rbx
movq 0x98(%rsp), %rdx
movq 0x28(%rsp), %rsi
addq %rdx, %rsi
movl 0x38(%rsp), %edi
decl %edi
jne 0x30d574
leaq 0xd332b(%rip), %rsi     # 0x3e09d0
movq %rbp, %rdi
movl $0xa35, %edx            # imm = 0xA35
callq 0x1045eb
testb $0x1, 0xc(%rsp)
jne 0x30d6c8
movq 0x48(%rsp), %r15
movq 0x20(%rsp), %r12
jmp 0x30da02
cmpq $0x0, 0x50(%rsp)
movq 0x20(%rsp), %r13
movl 0x8(%rsp), %ebp
je 0x30d741
movl 0xc(%rsp), %ebx
andl $0x2, %ebx
xorl %r14d, %r14d
movq 0x10(%rsp), %r15
movq 0x10(%r15), %rsi
movq 0xd0(%r12), %rax
movq 0xd8(%r12), %rcx
movl 0x4(%r15), %edx
addl (%rcx,%r14,4), %edx
movl (%rax,%r14,4), %ecx
movq %r13, %rdi
callq 0x2f1370
testl %eax, %eax
je 0x30d720
movq 0xd0(%r12), %rax
addl (%rax,%r14,4), %ebp
testl %ebx, %ebx
je 0x30d735
leaq 0xd415b(%rip), %rdi     # 0x3e1886
movq %r13, %rsi
callq 0x178c0
addl %eax, %ebp
incq %r14
cmpq %r14, 0x50(%rsp)
jne 0x30d6e8
jmp 0x30d74d
movl 0xc(%rsp), %ebx
andl $0x2, %ebx
movq 0x10(%rsp), %r15
movq 0x10(%r15), %rsi
movl 0xc0(%r12), %ecx
movl 0xe0(%r12), %eax
movl 0x4(%r15), %edx
addq %rax, %rdx
movq %r13, %rdi
callq 0x2f1370
testl %ebx, %ebx
je 0x30d785
leaq 0xd410b(%rip), %rdi     # 0x3e1886
movq %r13, %rsi
callq 0x178c0
addl %eax, %ebp
movl 0xb8(%r12), %ecx
testq %rcx, %rcx
movl %ebx, 0x28(%rsp)
je 0x30d7d1
movq 0x10(%r15), %rsi
movl 0x4(%r15), %eax
movl 0xc0(%r12), %edi
movl 0xe0(%r12), %edx
addq %rax, %rdi
addq %rdi, %rdx
movq %r13, %rdi
callq 0x2f1370
testl %ebx, %ebx
je 0x30d7d1
leaq 0xd40bf(%rip), %rdi     # 0x3e1886
movq %r13, %rsi
callq 0x178c0
addl %eax, %ebp
movl 0x68(%r12), %ebx
movl 0xb0(%r12), %r14d
movl 0xb8(%r12), %eax
testl %r14d, %r14d
je 0x30d87b
movl 0xc0(%r12), %ecx
movq %r15, %rdx
movl 0xe0(%r12), %r15d
movl 0x4(%rdx), %edx
addq %rcx, %rdx
addq %rax, %r15
addq %rdx, %r15
movq 0x10(%rsp), %r12
movq 0x10(%r12), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x2f2688
movq 0x10(%r12), %rsi
movq %r13, %rdi
movq %r15, %rdx
movq 0x88(%rsp), %rcx
callq 0x2f1370
cmpl $0x0, 0x28(%rsp)
je 0x30d852
leaq 0xd403e(%rip), %rdi     # 0x3e1886
movq %r13, %rsi
callq 0x178c0
addl %eax, %ebp
addq %rbx, %r15
decl %r14d
jne 0x30d813
movq 0x18(%rsp), %r12
movl 0xb8(%r12), %eax
movl 0x68(%r12), %ebx
movl 0xb0(%r12), %ecx
movq 0x10(%rsp), %r15
jmp 0x30d87d
xorl %ecx, %ecx
movl %ebp, 0x8(%rsp)
imull %ecx, %ebx
movq 0x10(%r15), %rsi
movl 0x4(%r15), %ecx
movl 0xc0(%r12), %edx
addq %rcx, %rdx
movl 0xe0(%r12), %ecx
addq %rdx, %rcx
movl %eax, %eax
addq %rcx, %rax
addq %rax, %rbx
movq 0x90(%r12), %rcx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2f1370
leaq 0xd3fc4(%rip), %rdi     # 0x3e1888
movq %r13, %rsi
callq 0x178c0
movl (%r15), %ebx
movl 0xb0(%r12), %r14d
testl %r14d, %r14d
je 0x30d97a
movl 0x68(%r12), %edx
movq %r12, %rbp
movl 0xb8(%r12), %r12d
movl 0xc0(%rbp), %eax
movl 0x4(%r15), %ecx
addq %rax, %rcx
movl 0xe0(%rbp), %eax
addq %rax, %r12
addq %rcx, %r12
movq %rdx, 0x38(%rsp)
movq 0x10(%rsp), %r15
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x2f2688
movq 0x50(%rbp), %rcx
movl %eax, %eax
leaq (%rax,%rax,2), %r13
movl 0x8(%rcx,%r13,8), %ecx
movq 0x8(%r15), %rsi
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x2f1370
cmpl $0x0, 0x28(%rsp)
je 0x30d95c
leaq 0xd3f36(%rip), %rdi     # 0x3e1886
movq %rbp, %rsi
callq 0x178c0
addl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rbp
movq 0x50(%rbp), %rax
movl 0x8(%rax,%r13,8), %eax
addq %rax, %rbx
movq 0x38(%rsp), %rdx
addq %rdx, %r12
decl %r14d
jne 0x30d913
movq 0x70(%rsp), %rsi
cmpq 0x68(%rsp), %rsi
movq 0x48(%rsp), %r15
movq 0x20(%rsp), %r12
je 0x30d9f3
incq %rsi
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0x30cc26
movl 0x4(%rax), %ecx
movq 0x10(%rax), %rdi
movl 0xc0(%r14), %edx
movl 0xe0(%r14), %esi
addq %rcx, %rsi
callq 0x2f37dc
movq %rax, %r14
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
movq %r14, %rcx
subq 0x60(%rsp), %rcx
movq %r12, %rdi
movq %rbx, %rdx
callq 0x2f1370
leaq 0xd3ebe(%rip), %rsi     # 0x3e18a4
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x17ab0
leaq 0xb26a5(%rip), %rdi     # 0x3c009f
movq %r12, %rsi
callq 0x178c0
movl 0x8(%rsp), %ebx
testb $0x8, 0xc(%rsp)
je 0x30da44
leaq 0xd3eb5(%rip), %rdi     # 0x3e18c9
movq %r12, %rsi
callq 0x178c0
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x80(%rsp), %rcx
movq 0x78(%rsp), %rdx
subq %rdx, %rcx
addq $0x20, %r15
movq %r12, %rsi
movq %r15, %r8
callq 0x30f9e7
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x901fb
nopl (%rax)