// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq %rdx, (%rsp)
movq 0x60(%rsp), %rbp
movl %r8d, 0x8(%rsp)
movl %r8d, %ebx
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2a8d57
movzbl (%r14,%rax), %ecx
incq (%rsi,%rcx,8)
incq %rax
jmp 0x2a8d44
movq %rdi, 0x18(%rsp)
movq 0x70(%rdi), %rax
movq %rax, 0x20(%rsp)
movq (%rsp), %rax
imulq %rbx, %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
pushq $0x2
popq %r13
cmpq %r15, %rbx
je 0x2a8dcb
movzbl (%r14,%r15), %esi
movq %r12, %rdi
movl %r13d, %edx
movq %rbp, %rcx
callq 0x1493cf
testl %eax, %eax
js 0x2a8e7d
movzbl (%r14,%r15), %esi
movq %r12, %rdi
movl %r13d, %edx
movq %rbp, %rcx
callq 0x1493cf
testl %eax, %eax
je 0x2a8dc6
movq (%rsp), %rax
leaq (%rax,%r15), %rsi
movzbl (%r14,%r15), %edx
movq 0x20(%rsp), %rdi
callq 0x2adb9e
incq %r15
jmp 0x2a8d78
movq 0x68(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x149352
movq 0x18(%rsp), %rdi
addq $0x48, %rdi
movzwl 0x70(%rsp), %edx
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
movl 0x8(%rsp), %esi
movq %r14, %rcx
pushq 0x80(%rsp)
pushq 0x80(%rsp)
callq 0x2ad2ee
addq $0x10, %rsp
movq 0x90(%rsp), %r15
movq 0x20(%r15), %rsi
movl 0x88(%rsp), %edx
movl %edx, %r14d
leaq (%rsi,%r14), %rax
cmpq 0x10(%r15), %rax
ja 0x2a8eb5
movl 0xc(%rsp), %ebx
movq (%r15), %rdi
movl 0x10(%rsp), %ecx
callq 0x28ca84
addq %r14, 0x20(%r15)
movq 0x28(%r15), %rsi
leaq (%rsi,%rbx), %rax
cmpq 0x18(%r15), %rax
ja 0x2a8ee3
movq 0x8(%r15), %rdi
movl 0x14(%rsp), %ecx
movl %ebx, %edx
callq 0x28ca84
addq %rbx, 0x28(%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18f0e4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3c185(%rip), %rsi     # 0x2e5013
leaq 0xd82b2(%rip), %rdx     # 0x381147
leaq 0xd82fb(%rip), %rcx     # 0x381197
leaq 0xd7edd(%rip), %r8      # 0x380d80
movl $0x9b2, %r9d            # imm = 0x9B2
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x18f0ac(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3c14d(%rip), %rsi     # 0x2e5013
leaq 0xd82de(%rip), %rdx     # 0x3811ab
leaq 0xd8315(%rip), %rcx     # 0x3811e9
leaq 0xd7ea5(%rip), %r8      # 0x380d80
movl $0x6e7, %r9d            # imm = 0x6E7
jmp 0x2a8ea9
movq 0x18f07e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3c11f(%rip), %rsi     # 0x2e5013
leaq 0xd82ff(%rip), %rdx     # 0x3811fa
leaq 0xd82e7(%rip), %rcx     # 0x3811e9
leaq 0xd7e77(%rip), %r8      # 0x380d80
movl $0x6eb, %r9d            # imm = 0x6EB
jmp 0x2a8ea9