// File: /workspace/github_cpp_makefile_star2_O1/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 0x8aa3
callq 0x13388
addl %eax, %r15d
movq 0x8(%r14,%rbx,8), %rdi
callq 0x11ff8
addl %eax, %r12d
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0x8a84
movq 0x808(%r14), %rdi
callq 0xcf20
movl %eax, %ebx
movq 0x828(%r14), %rdi
callq 0x12738
addl %ebx, %r15d
leal (%rax,%r15), %ebx
addl $0x830, %ebx            # imm = 0x830
testb %bpl, %bpl
je 0x8bbd
movq 0x164ea(%rip), %r15     # 0x1efd0
leaq 0xea01(%rip), %rsi      # 0x174ee
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %ebx, %eax
cvtsi2sd %rax, %xmm0
mulsd 0xe507(%rip), %xmm0     # 0x17010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r13
leaq 0xe9e5(%rip), %rsi      # 0x17500
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 0xe9ad(%rip), %rsi      # 0x17504
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe499(%rip), %xmm0     # 0x17010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0xe96f(%rip), %rsi      # 0x17500
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 0x8bd5
cmpb $0x1, 0x819(%r14)
jne 0x8c60
movq 0x810(%r14), %rdi
callq 0xc400
movl %eax, %r14d
testb %bpl, %bpl
je 0x8c5d
movq 0x163e0(%rip), %r15     # 0x1efd0
leaq 0xe91f(%rip), %rsi      # 0x17516
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe3f9(%rip), %xmm0     # 0x17010
movq %r15, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0xe8d7(%rip), %rsi      # 0x17500
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 0x8d03
movq 0x16360(%rip), %r14     # 0x1efd0
leaq 0xe8b1(%rip), %rsi      # 0x17528
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xe37a(%rip), %xmm0     # 0x17010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0xe858(%rip), %rsi      # 0x17500
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