// File: /workspace/github_c_makefile_star2_O1/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 %r9, %r12
movq %rcx, %rbx
movq %rdx, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movl %r8d, %r15d
testl %r8d, %r8d
je 0x314320
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
incq (%rsi,%rcx,8)
incq %rax
cmpq %rax, %r15
jne 0x314310
movl %r8d, 0x10(%rsp)
testl %r8d, %r8d
je 0x31439d
movq 0x60(%rsp), %r14
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rbp
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 %r14, %rcx
callq 0x1a6a6a
testl %eax, %eax
js 0x314451
movzbl (%rbx,%r13), %esi
movq %r12, %rdi
movl $0x2, %edx
movq %r14, %rcx
callq 0x1a6a6a
testl %eax, %eax
je 0x314395
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %rsi
movzbl (%rbx,%r13), %edx
movq %rbp, %rdi
callq 0x318c50
incq %r13
cmpq %r13, %r15
jne 0x314349
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 0x1a6a1b
movq 0x18(%rsp), %rdi
addq $0x48, %rdi
movzwl %r13w, %edx
leaq 0x20(%rsp), %r8
leaq 0x14(%rsp), %r9
movl 0x10(%rsp), %esi
movq %rbx, %rcx
pushq %r12
pushq 0x80(%rsp)
callq 0x31847b
addq $0x10, %rsp
movq 0x20(%r14), %rsi
movl %ebp, %r15d
leaq (%rsi,%r15), %rax
cmpq 0x10(%r14), %rax
ja 0x314456
movl 0x14(%rsp), %ebx
movq (%r14), %rdi
movl 0x20(%rsp), %ecx
movl %ebp, %edx
callq 0x2fbb6b
addq %r15, 0x20(%r14)
movq 0x28(%r14), %rsi
leaq (%rsi,%rbx), %rax
cmpq 0x18(%r14), %rax
ja 0x31445b
movq 0x8(%r14), %rdi
movl 0x24(%rsp), %ecx
movl %ebx, %edx
callq 0x2fbb6b
addq %rbx, 0x28(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x9145d
callq 0x914cf
callq 0x91496