// File: /workspace/github_cpp_makefile_star2_O1/adamnovak[P]rlcsa/docarray.cpp
// Function: CSA::DocArray::reportSize(bool) const
usint
DocArray::reportSize(bool print) const
{
  usint bytes = sizeof(*this);

  usint tree_bytes = this->leaf_ranges->reportSize() +
    this->first_children->reportSize() +
    this->parents->reportSize() +
    this->next_leaves->reportSize();
  if(print)
  {
    std::cout << "Tree:            " << (tree_bytes / (double)MEGABYTE) << " MB" << std::endl;
  }

  usint rule_bytes = 0, block_bytes = 0;
  if(this->hasGrammar())
  {
    rule_bytes = this->rule_borders->reportSize() + this->rules->reportSize();
    block_bytes = this->block_borders->reportSize() + this->blocks->reportSize();
  }
  if(print && this->hasGrammar())
  {
    std::cout << "Rules:           " << (rule_bytes / (double)MEGABYTE) << " MB" << std::endl;
    std::cout << "Blocks:          " << (block_bytes / (double)MEGABYTE) << " MB" << std::endl;
  }

  bytes += tree_bytes + rule_bytes + block_bytes;
  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, %ebx
movq %rdi, %r15
movq 0x8(%rdi), %rdi
callq 0x18438
movl %eax, %ebp
movq 0x10(%r15), %rdi
callq 0x1a62a
movl %eax, %r12d
addl %ebp, %r12d
movq 0x18(%r15), %rdi
callq 0x16d28
movl %eax, %ebp
movq 0x20(%r15), %rdi
callq 0x16d28
movl %eax, %r14d
addl %ebp, %r14d
addl %r12d, %r14d
testl %ebx, %ebx
je 0x1408b
movq 0x13fb0(%rip), %r12     # 0x27fd0
leaq 0xaab3(%rip), %rsi      # 0x1eada
movl $0x11, %edx
movq %r12, %rdi
callq 0x32b0
movl %r14d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0xa344(%rip), %xmm0     # 0x1e388
movq %r12, %rdi
callq 0x33d0
movq %rax, %r12
leaq 0xa517(%rip), %rsi      # 0x1e56d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
xorl %ebp, %ebp
cmpb $0x1, 0x49(%r15)
movl $0x0, %r12d
jne 0x140cf
movq 0x28(%r15), %rdi
callq 0x1a62a
movl %eax, %r12d
movq 0x30(%r15), %rdi
callq 0x16d28
movl %eax, %ebp
addl %r12d, %ebp
movq 0x38(%r15), %rdi
callq 0x1a62a
movl %eax, %r13d
movq 0x40(%r15), %rdi
callq 0x16d28
movl %eax, %r12d
addl %r13d, %r12d
testb %bl, %bl
je 0x141c3
cmpb $0x1, 0x49(%r15)
jne 0x141c3
movq 0x13ee7(%rip), %r15     # 0x27fd0
leaq 0xa9fc(%rip), %rsi      # 0x1eaec
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xa279(%rip), %xmm0     # 0x1e388
movq %r15, %rdi
callq 0x33d0
movq %rax, %r13
leaq 0xa44c(%rip), %rsi      # 0x1e56d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
leaq 0xa9a1(%rip), %rsi      # 0x1eafe
movl $0x11, %edx
movq %r15, %rdi
callq 0x32b0
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xa20b(%rip), %xmm0     # 0x1e388
movq %r15, %rdi
callq 0x33d0
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0xa3d6(%rip), %rsi      # 0x1e56d
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
addl %ebp, %r14d
leal (%r12,%r14), %ebp
addl $0x50, %ebp
testb %bl, %bl
je 0x1426f
movq 0x13df4(%rip), %rbx     # 0x27fd0
leaq 0xa3b2(%rip), %rsi      # 0x1e595
movl $0x11, %edx
movq %rbx, %rdi
callq 0x32b0
movl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xa186(%rip), %xmm0     # 0x1e388
movq %rbx, %rdi
callq 0x33d0
movq %rax, %r14
leaq 0xa359(%rip), %rsi      # 0x1e56d
movl $0x3, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3190
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq