// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/rlcsa.cpp
// Function: CSA::RLCSA::reportSize(bool) const
usint
RLCSA::reportSize(bool print) const
{
  usint bytes = 0, temp = 0, bwt = 0;

  for(usint c = 0; c < CHARS; c++)
  {
    if(this->array[c])
    {
      bytes += this->array[c]->reportSize();
      bwt += this->array[c]->getCompressedSize();
    }
  }
  bytes += sizeof(*this) + this->alphabet->reportSize() + this->end_points->reportSize();
  if(print)
  {
    std::cout << "RLCSA:           " << (bytes / (double)MEGABYTE) << " MB" << std::endl;
    std::cout << "  BWT only:      " << (bwt / (double)MEGABYTE) << " MB" << std::endl;
  }

  if(this->support_locate || this->support_display)
  {
    temp = this->sa_samples->reportSize();
    if(print) { std::cout << "SA samples:      " << (temp / (double)MEGABYTE) << " MB" << std::endl; }
    bytes += temp;
  }

  if(print)
  {
    std::cout << "Total size:      " << (bytes / (double)MEGABYTE) << " MB" << std::endl;
    std::cout << std::endl;
  }

  return bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x8(%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x8b91
callq 0x13750
addl %eax, %r15d
movq 0x8(%r14,%rbx,8), %rdi
callq 0x1235e
addl %eax, %r12d
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0x8b72
movq 0x808(%r14), %rdi
callq 0xd048
movl %eax, %ebx
movq 0x828(%r14), %rdi
callq 0x12ab4
addl %ebx, %r15d
leal (%rax,%r15), %ebx
addl $0x830, %ebx            # imm = 0x830
testb %bpl, %bpl
je 0x8cab
movq 0x173fc(%rip), %r15     # 0x1ffd0
leaq 0xf960(%rip), %rsi      # 0x1853b
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %ebx, %eax
cvtsi2sd %rax, %xmm0
mulsd 0xf419(%rip), %xmm0     # 0x18010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r13
leaq 0xf944(%rip), %rsi      # 0x1854d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
leaq 0xf90c(%rip), %rsi      # 0x18551
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xf3ab(%rip), %xmm0     # 0x18010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0xf8ce(%rip), %rsi      # 0x1854d
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
cmpb $0x0, 0x818(%r14)
jne 0x8cc3
cmpb $0x1, 0x819(%r14)
jne 0x8d4e
movq 0x810(%r14), %rdi
callq 0xc534
movl %eax, %r14d
testb %bpl, %bpl
je 0x8d4b
movq 0x172f2(%rip), %r15     # 0x1ffd0
leaq 0xf87e(%rip), %rsi      # 0x18563
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xf30b(%rip), %xmm0     # 0x18010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0xf836(%rip), %rsi      # 0x1854d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
addl %r14d, %ebx
testb %bpl, %bpl
je 0x8df1
movq 0x17272(%rip), %r14     # 0x1ffd0
leaq 0xf810(%rip), %rsi      # 0x18575
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xf28c(%rip), %xmm0     # 0x18010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0xf7b7(%rip), %rsi      # 0x1854d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq