// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: writeOutputBuffer
static int
writeOutputBuffer(struct blockCompositionSeq *newSeqIdx,
                  struct appendState *aState, bitInsertFunc biFunc,
                  GtUword lastUpdatePos, size_t bucketLen,
                  unsigned callBackDataOffsetBits, void *cbState,
                  const partialSymSum *buckLast)
{
  if (biFunc)
    if (appendCallBackOutput(aState, newSeqIdx, biFunc,
                             lastUpdatePos, bucketLen,
                             callBackDataOffsetBits, cbState)
        == (BitOffset)-1)
    {
      perror("error condition while writing block-compressed"
             " index data");
      return -1;
    }
  if (!updateIdxOutput(newSeqIdx, aState, buckLast))
  {
    perror("error condition while writing block-compressed"
           " index data");
    return -1;
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x314553
testq %rbx, %rbx
je 0x314739
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r12
movq 0x40(%rsp), %rbp
testl %r9d, %r9d
je 0x3144c2
movl 0xc0(%r14), %eax
movl 0xe0(%r14), %ecx
addq %rcx, %rax
movl 0x44(%rbx), %esi
addq %rax, %rsi
movq (%rbx), %rdi
movq 0x28(%rbx), %rcx
movl 0x40(%rbx), %eax
subq %rax, %rcx
movl %r9d, %edx
callq 0x2fcd13
movl 0x44(%rbx), %eax
movl 0xe0(%r14), %ecx
addq %rax, %rcx
movl 0xc0(%r14), %eax
movl 0x68(%r14), %esi
movl 0xb8(%r14), %edx
addq %rax, %rdx
addq %rcx, %rdx
imull 0xb0(%r14), %esi
addq %rdx, %rsi
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq %rbp, (%rsp)
movq %r13, %r8
movq %r15, %r9
callq *%r12
cmpq $-0x1, %rax
je 0x314706
movl 0xe0(%r14), %ecx
movl 0xc0(%r14), %edx
addq %rcx, %rdx
movl 0x68(%r14), %ecx
movl 0xb8(%r14), %esi
addq %rdx, %rsi
imull 0xb0(%r14), %ecx
movl 0x44(%rbx), %edx
addq %rsi, %rdx
addq %rcx, %rdx
addq 0x90(%r14), %rdx
movq %rdx, 0x20(%rbx)
addq %rax, 0x28(%rbx)
testq %r14, %r14
je 0x314719
testq %rbx, %rbx
je 0x314719
movq 0x48(%rsp), %r12
testq %r12, %r12
je 0x314719
movq 0x30(%r14), %rdi
movq 0x38(%rbx), %rax
addq %rdi, %rax
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rcx
shrq $0x3, %rcx
addq 0x38(%r14), %rcx
cmpq %rcx, %rax
jae 0x31471e
cmpl $0x40, 0xbc(%r14)
ja 0x314734
movzwl 0xc4(%r14), %ebp
testw %bp, %bp
je 0x3145f8
movb $0x1, %r13b
leal -0x1(%r13), %eax
movq (%rbx), %rdi
movq 0xd0(%r14), %rcx
movq 0xd8(%r14), %rdx
movzbl %al, %eax
leal (,%rax,4), %r8d
movl (%rdx,%r8), %esi
addl 0x44(%rbx), %esi
movl (%rcx,%r8), %edx
movq (%r12,%rax,8), %rcx
callq 0x2fcd13
movzbl %r13b, %eax
movl %eax, %r13d
incb %r13b
cmpw %ax, %bp
ja 0x3145b5
movl 0x44(%rbx), %eax
movl 0xc0(%r14), %edx
movl 0xe0(%r14), %esi
addq %rax, %rsi
movq (%rbx), %rdi
movq 0x30(%rbx), %rcx
callq 0x2fcd13
movq 0x18(%r14), %rdi
movq 0x38(%rbx), %rsi
addq 0x30(%r14), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x314706
movq (%rbx), %rdi
movq 0x20(%rbx), %r12
shrq $0x3, %r12
movq 0x18(%r14), %rcx
movl $0x1, %esi
movq %r12, %rdx
callq 0x125658
movl 0x20(%rbx), %eax
andl $0x7, %eax
movl %eax, 0x44(%rbx)
je 0x314663
movq (%rbx), %rax
movb (%rax,%r12), %cl
movb %cl, (%rax)
movq 0x18(%r14), %rdi
movq (%r15), %rsi
shrq $0x3, %rsi
addq 0x38(%r14), %rsi
xorl %edx, %edx
callq 0x17cf0
testl %eax, %eax
jne 0x314706
movq 0x8(%rbx), %rdi
movq 0x28(%rbx), %r15
shrq $0x3, %r15
movq 0x18(%r14), %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x125658
testb $0x7, 0x28(%rbx)
je 0x3146ae
movq 0x8(%rbx), %rax
movb (%rax,%r15), %cl
movb %cl, (%rax)
addq %r12, 0x38(%rbx)
movl 0xe0(%r14), %eax
movl 0xb8(%r14), %ecx
movl 0xc0(%r14), %edx
addq %rax, %rdx
movl 0x44(%rbx), %eax
addq %rcx, %rax
addq %rdx, %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rax
movl 0x40(%rbx), %ecx
movq %rax, %rdx
subq %rcx, %rdx
addq %rdx, 0x30(%rbx)
andl $0x7, %eax
movq %rax, 0x28(%rbx)
movl %eax, 0x40(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd5b6e(%rip), %rdi     # 0x3ea27b
callq 0x17690
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3146f7
callq 0x91541
addq $0x38, %rbx
addq $0x38, %r14
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x9157a
callq 0x91666
callq 0x91508