// File: /workspace/github_cpp_makefile_star2_O3/adamnovak[P]rlcsa/suffixarray.cpp
// Function: CSA::SuffixArray::reportSize(bool) const
usint
SuffixArray::reportSize(bool print) const
{
  usint bytes = sizeof(*this) + this->data_size * (1 + sizeof(uint));
  if(this->ranks != 0) { bytes += this->data_size + sizeof(usint); }
  if(print)
  {
    std::cout << "Data:            " << (this->data_size / (double)MEGABYTE) << " MB" << std::endl;
    std::cout << "Suffix array:    " << (this->data_size * sizeof(uint) / (double)MEGABYTE) << " MB" << std::endl;
    if(this->ranks != 0)
    {
      std::cout << "Rank array:      " << (this->data_size * sizeof(usint) / (double)MEGABYTE) << " MB" << std::endl;
    }
    std::cout << "Total size:      " << (bytes / (double)MEGABYTE) << " MB" << std::endl;
    std::cout << std::endl;
  }
  return bytes;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x28(%rdi), %eax
leal (%rax,%rax,4), %ecx
addl $0x4, %eax
xorl %edx, %edx
cmpq $0x0, 0x20(%rdi)
cmovnel %eax, %edx
leal (%rdx,%rcx), %ebx
addl $0x30, %ebx
testl %esi, %esi
je 0xfddd
movq %rdi, %r15
movq 0x103e4(%rip), %r14     # 0x1ffd0
leaq 0x8ca5(%rip), %rsi      # 0x18898
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
cvtsi2sd %rax, %xmm0
mulsd 0x83ff(%rip), %xmm0     # 0x18010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r13
leaq 0x892a(%rip), %r12      # 0x1854d
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
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 0x8c48(%rip), %rsi      # 0x188aa
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
shlq $0x2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x8389(%rip), %xmm0     # 0x18010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
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
cmpq $0x0, 0x20(%r15)
je 0xfd4a
movq 0x102f8(%rip), %r12     # 0x1ffd0
leaq 0x8bdd(%rip), %rsi      # 0x188bc
movl $0x11, %edx
movq %r12, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
shlq $0x2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x830c(%rip), %xmm0     # 0x18010
movq %r12, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x8837(%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
leaq 0x8824(%rip), %rsi      # 0x18575
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x82a0(%rip), %xmm0     # 0x18010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x87cb(%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
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)