// File: /workspace/github_cpp_makefile_star2_O1/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 0xfb31
movq %rdi, %r15
movq 0xf690(%rip), %r14      # 0x1efd0
leaq 0x7f04(%rip), %rsi      # 0x1784b
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
cvtsi2sd %rax, %xmm0
mulsd 0x76ab(%rip), %xmm0     # 0x17010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r13
leaq 0x7b89(%rip), %r12      # 0x17500
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 0x7ea7(%rip), %rsi      # 0x1785d
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
shlq $0x2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x7635(%rip), %xmm0     # 0x17010
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 0xfa9e
movq 0xf5a4(%rip), %r12      # 0x1efd0
leaq 0x7e3c(%rip), %rsi      # 0x1786f
movl $0x11, %edx
movq %r12, %rdi
callq 0x32b0
movl 0x28(%r15), %eax
shlq $0x2, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x75b8(%rip), %xmm0     # 0x17010
movq %r12, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x7a96(%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
leaq 0x7a83(%rip), %rsi      # 0x17528
movl $0x11, %edx
movq %r14, %rdi
callq 0x32b0
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x754c(%rip), %xmm0     # 0x17010
movq %r14, %rdi
callq 0x33c0
movq %rax, %r15
leaq 0x7a2a(%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
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)