// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: addBlock2OutputBuffer
static void
addBlock2OutputBuffer(
  struct blockCompositionSeq *newSeqIdx,
  partialSymSum *buck, GtUword blockNum,
  Symbol *block, unsigned blockSize,
  const MRAEnc *alphabet, const int *modes,
  const MRAEnc *blockMapAlphabet, AlphabetRangeSize blockMapAlphabetSize,
  BitString permCompBSPreAlloc, unsigned *compositionPreAlloc,
  unsigned compositionIdxBits, struct appendState *aState)
{
  PermCompIndex permCompIdx[2];
  unsigned significantPermIdxBits;
  /* a. update superbucket table */
  addBlock2PartialSymSums(buck, block, blockSize);
  /* b. add ranges of differently encoded symbols to
   * corresponding representation */
  addRangeEncodedSyms(newSeqIdx->rangeEncs, block, blockSize,
                      blockNum, alphabet, REGIONS_LIST,
                      modes);
  /* c. add to table of composition/permutation indices */
  gt_MRAEncSymbolsTransform(blockMapAlphabet, block, blockSize);
  /* FIXME control remapping */
  /* currently invalid characters in input can seriously break this */
  gt_block2IndexPair(&newSeqIdx->compositionTable, blockSize,
                  blockMapAlphabetSize, block, permCompIdx,
                  &significantPermIdxBits,
                  permCompBSPreAlloc, compositionPreAlloc);
  append2IdxOutput(aState, permCompIdx, compositionIdxBits,
                   significantPermIdxBits);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, 0x8(%rsp)
testl %r8d, %r8d
movl %r8d, 0x10(%rsp)
movq %rdi, 0x20(%rsp)
je 0x30a1af
movq %r9, %r12
movq 0x60(%rsp), %rbp
movl %r8d, %r15d
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
incq (%rsi,%rcx,8)
incq %rax
cmpq %rax, %r15
jne 0x30a134
movq 0x70(%rdi), %r14
movq 0x8(%rsp), %rax
imulq %r15, %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movzbl (%rbx,%r13), %esi
movq %r12, %rdi
movl $0x2, %edx
movq %rbp, %rcx
callq 0x19e32c
testl %eax, %eax
js 0x30a266
movzbl (%rbx,%r13), %esi
movq %r12, %rdi
movl $0x2, %edx
movq %rbp, %rcx
callq 0x19e32c
testl %eax, %eax
je 0x30a1a5
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %rsi
movzbl (%rbx,%r13), %edx
movq %r14, %rdi
callq 0x30eac2
incq %r13
cmpq %r13, %r15
jne 0x30a159
jmp 0x30a1b2
xorl %r15d, %r15d
movq 0x90(%rsp), %r14
movl 0x88(%rsp), %ebp
movq 0x80(%rsp), %r12
movzwl 0x70(%rsp), %r13d
movq 0x68(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x19e2dd
movq 0x20(%rsp), %rdi
addq $0x48, %rdi
movzwl %r13w, %edx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
movl 0x10(%rsp), %esi
movq %rbx, %rcx
pushq %r12
pushq 0x80(%rsp)
callq 0x30e2c1
addq $0x10, %rsp
movq 0x20(%r14), %rsi
movl %ebp, %r15d
leaq (%rsi,%r15), %rax
cmpq 0x10(%r14), %rax
ja 0x30a26b
movl 0x14(%rsp), %ebx
movq (%r14), %rdi
movl 0x18(%rsp), %ecx
movl %ebp, %edx
callq 0x2f2738
addq %r15, 0x20(%r14)
movq 0x28(%r14), %rsi
leaq (%rsi,%rbx), %rax
cmpq 0x18(%r14), %rax
ja 0x30a270
movq 0x8(%r14), %rdi
movl 0x1c(%rsp), %ecx
movl %ebx, %edx
callq 0x2f2738
addq %rbx, 0x28(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x8f70c
callq 0x8f77e
callq 0x8f745