// File: /workspace/github_cpp_makefile_star2_O2/toxaart[P]hierarchical_block_sparse_lib/test_source/test_matrix_alloc_problem.cc
// Function: main
int main(int argc, const char* argv[]) {
  if(argc != 6) {
    std::cerr << "Please give 5 args: N blockSize nMat nRep nonzeroFraction" << std::endl;
    return -1;
  }
  int N = atoi(argv[1]);
  int blockSize = atoi(argv[2]);
  int nMat = atoi(argv[3]);
  int nRep = atoi(argv[4]);
  double nonzeroFraction = atof(argv[5]);
  std::cout << "N = " << N << std::endl;
  std::cout << "blockSize = " << blockSize << std::endl;
  std::cout << "nMat = " << nMat << std::endl;
  std::cout << "nRep = " << nRep << std::endl;
  std::cout << "nonzeroFraction = " << nonzeroFraction << std::endl;
  if(N < 7) {
    std::cerr << "Error: N must be 7 or greater." << std::endl;
    return -1;
  }
  if(nonzeroFraction < 0 || nonzeroFraction > 1) {
    std::cerr << "Error: nonzeroFraction must be between 0 and 1." << std::endl;
    return -1;
  }
  double nElementsPerMatrix = N*N*nonzeroFraction;
  double nBytesPerMatrix = nElementsPerMatrix * sizeof(double);
  double nBytesForAllMatrices = nBytesPerMatrix * nMat;
  double memUsageForAllMatricesInGB = nBytesForAllMatrices / ( 1000*1000*1000 );

  double startTime = get_wall_seconds();
  int resultCode = test_creation<hbsm::HierarchicalBlockSparseMatrix<double> >(N, blockSize, nonzeroFraction, nMat, nRep);
  double secondsTaken = get_wall_seconds() - startTime;
  printf("secondsTaken = %12.3f wall seconds\n", secondsTaken);
  return resultCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
cmpl $0x6, %edi
jne 0x24d4
movq %rsi, %r14
movq 0x8(%rsi), %rdi
callq 0x21b0
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x21b0
movl %eax, %ebp
movq 0x18(%r14), %rdi
callq 0x21b0
movl %eax, %r12d
movq 0x20(%r14), %rdi
callq 0x21b0
movl %eax, %r15d
movq 0x28(%r14), %rdi
callq 0x2160
movsd %xmm0, (%rsp)
movq 0x7bbc(%rip), %r14      # 0x9fc8
leaq 0x3c67(%rip), %rsi      # 0x607a
movq %r14, %rdi
callq 0x2130
movq %rax, %rdi
movl %ebx, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20a0
leaq 0x3c4b(%rip), %rsi      # 0x607f
movq %r14, %rdi
callq 0x2130
movq %rax, %rdi
movl %ebp, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20a0
leaq 0x3c37(%rip), %rsi      # 0x608c
movq %r14, %rdi
callq 0x2130
movq %rax, %rdi
movl %r12d, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20a0
leaq 0x3c1d(%rip), %rsi      # 0x6094
movq %r14, %rdi
callq 0x2130
movq %rax, %rdi
movl %r15d, 0x8(%rsp)
movl %r15d, %esi
callq 0x2210
movq %rax, %rdi
callq 0x20a0
leaq 0x3bfe(%rip), %rsi      # 0x609c
movq %r14, %rdi
callq 0x2130
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20a0
movl %ebx, 0xc(%rsp)
cmpl $0x6, %ebx
jg 0x2504
movq 0x7b1d(%rip), %rdi      # 0x9fe8
leaq 0x3bdd(%rip), %rsi      # 0x60af
jmp 0x24e2
movq 0x7b0d(%rip), %rdi      # 0x9fe8
leaq 0x3b5e(%rip), %rsi      # 0x6040
callq 0x2130
movq %rax, %rdi
callq 0x20a0
pushq $-0x1
popq %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm1, %xmm0
ja 0x287f
ucomisd 0x3ae9(%rip), %xmm1     # 0x6008
ja 0x287f
callq 0x2d92
movsd %xmm0, 0xa0(%rsp)
leaq 0x1c(%rsp), %rsi
xorpd %xmm0, %xmm0
leaq 0x140(%rsp), %rdi
movapd %xmm0, (%rdi)
orl $-0x1, 0x10(%rdi)
movl %ebp, (%rsi)
movupd %xmm0, 0x18(%rdi)
movupd %xmm0, 0x28(%rdi)
movupd %xmm0, 0x38(%rdi)
movupd %xmm0, 0x48(%rdi)
movupd %xmm0, 0x58(%rdi)
movupd %xmm0, 0x68(%rdi)
movupd %xmm0, 0x78(%rdi)
callq 0x2e0e
leaq 0x140(%rsp), %rdi
callq 0x2e72
testb %al, %al
je 0x2c2e
leaq 0x140(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x7
popq %rdx
xorl %ecx, %ecx
callq 0x2e9a
leaq 0x140(%rsp), %rdi
callq 0x2e72
testb %al, %al
jne 0x2c4a
leaq 0x140(%rsp), %rdi
callq 0x2f4e
leaq 0x140(%rsp), %rdi
callq 0x2e72
testb %al, %al
je 0x2c66
leaq 0x140(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x7
popq %rdx
xorl %ecx, %ecx
callq 0x2e9a
leaq 0x140(%rsp), %rdi
callq 0x302e
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2c82
jp 0x2c82
movl 0xc(%rsp), %eax
cltd
idivl %ebp
movl %eax, %r14d
movslq %r12d, %rsi
leaq 0x48(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
movq %rsi, 0x60(%rsp)
callq 0x30f6
cvtsi2sd %r14d, %xmm0
mulsd %xmm0, %xmm0
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movl %eax, 0x14(%rsp)
cltq
xorl %ebx, %ebx
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
movl %ecx, 0x18(%rsp)
testl %r12d, %r12d
movl %r12d, 0x40(%rsp)
movl %r12d, %ecx
cmovlel %ebx, %ecx
movq %rcx, 0x20(%rsp)
movl %eax, %ecx
negl %ecx
movq %rcx, (%rsp)
movl %r14d, %r12d
movq %rax, %r14
leaq 0xb0(%rsp), %r13
leaq 0x88(%rsp), %r15
movq %rax, 0x68(%rsp)
cmpq 0x20(%rsp), %rbx
je 0x2892
movl $0x88, %edi
callq 0x2140
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
orl $-0x1, 0x10(%rax)
movupd %xmm0, 0x18(%rax)
movupd %xmm0, 0x28(%rax)
movupd %xmm0, 0x38(%rax)
movupd %xmm0, 0x48(%rax)
movupd %xmm0, 0x58(%rax)
movupd %xmm0, 0x68(%rax)
movupd %xmm0, 0x78(%rax)
movq 0x48(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x2e0e
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movl 0xc(%rsp), %edx
movl %edx, %esi
xorl %ecx, %ecx
callq 0x2e9a
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3148
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3148
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x319a
xorl %eax, %eax
xorl %ecx, %ecx
cmpl 0x18(%rsp), %ecx
je 0x27cb
movl %ecx, %edx
cvtsi2sd %ecx, %xmm0
imull %ebp, %edx
mulsd 0x38b8(%rip), %xmm0     # 0x6010
addsd 0x38b8(%rip), %xmm0     # 0x6018
movslq %eax, %rsi
movl %esi, %edi
leaq (,%rsi,8), %r8
addq 0x88(%rsp), %r8
addq (%rsp), %rdi
shlq $0x2, %rsi
movq 0x70(%rsp), %r9
addq %rsi, %r9
addq 0x28(%rsp), %rsi
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpl %r11d, %r12d
je 0x27b8
movl %edx, (%rsi,%r11,4)
movl %r10d, (%r9,%r11,4)
movsd %xmm0, (%r8,%r11,8)
incq %r11
addl %ebp, %r10d
movl %edi, %r14d
addl %r11d, %r14d
movq 0x68(%rsp), %r14
jne 0x2790
jmp 0x27d5
addl %r11d, %eax
incl %ecx
movq (%rsp), %rdx
addl %eax, %edx
jne 0x273d
jmp 0x27d5
cmpl 0x14(%rsp), %eax
jne 0x2c11
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movq %r15, %rcx
callq 0x31ec
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
orl $-0x1, 0xc0(%rsp)
leaq 0xc8(%rsp), %rax
movupd %xmm0, 0x60(%rax)
movupd %xmm0, 0x50(%rax)
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x31f8
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r13, %rdi
callq 0x3359
movq %r13, %rdi
callq 0x35cc
movq %r15, %rdi
callq 0x3b38
leaq 0x70(%rsp), %rdi
callq 0x3a34
leaq 0x28(%rsp), %rdi
callq 0x3a34
incq %rbx
jmp 0x2695
movq 0x7762(%rip), %rdi      # 0x9fe8
leaq 0x3841(%rip), %rsi      # 0x60ce
jmp 0x24e2
pushq $0x1
popq %rbx
cmpq 0x60(%rsp), %rbx
jge 0x28c5
movq 0x48(%rsp), %rax
movq (%rax,%rbx,8), %r14
testq %r14, %r14
je 0x28b2
movq %r14, %rdi
callq 0x35cc
movl $0x88, %esi
movq %r14, %rdi
callq 0x2150
addq $0x2, %rbx
jmp 0x2895
pushq $0x2
popq %rcx
movl 0x40(%rsp), %eax
cltd
idivl %ecx
cltq
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
movq %rax, 0xa8(%rsp)
cmovgl %eax, %edx
movq %rdx, 0x20(%rsp)
movl 0x8(%rsp), %eax
testl %eax, %eax
cmovlel %ecx, %eax
movl %eax, 0x8(%rsp)
leaq 0xb0(%rsp), %r15
movq %rcx, 0x40(%rsp)
cmpl 0x8(%rsp), %ecx
je 0x2b6a
leaq 0x28(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq %r15, %rdx
callq 0x30f6
xorl %ebx, %ebx
cmpq 0x20(%rsp), %rbx
je 0x2b22
movl $0x88, %edi
callq 0x2140
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
orl $-0x1, 0x10(%rax)
movupd %xmm0, 0x18(%rax)
movupd %xmm0, 0x28(%rax)
movupd %xmm0, 0x38(%rax)
movupd %xmm0, 0x48(%rax)
movupd %xmm0, 0x58(%rax)
movupd %xmm0, 0x68(%rax)
movupd %xmm0, 0x78(%rax)
movq 0x28(%rsp), %rcx
movq %rax, (%rcx,%rbx,8)
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x2e0e
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movl 0xc(%rsp), %edx
movl %edx, %esi
xorl %ecx, %ecx
callq 0x2e9a
movq %r15, %rdi
movq 0x68(%rsp), %r13
movq %r13, %rsi
leaq 0x70(%rsp), %r14
movq %r14, %rdx
callq 0x3148
movq %r14, %rdi
movq %r13, %rsi
leaq 0x88(%rsp), %r14
movq %r14, %rdx
callq 0x3148
movq %r14, %rdi
movq %r13, %rsi
leaq 0x13(%rsp), %rdx
callq 0x319a
xorl %eax, %eax
xorl %ecx, %ecx
cmpl 0x18(%rsp), %ecx
je 0x2a69
movl %ecx, %edx
cvtsi2sd %ecx, %xmm0
imull %ebp, %edx
mulsd 0x3618(%rip), %xmm0     # 0x6010
addsd 0x3618(%rip), %xmm0     # 0x6018
movslq %eax, %rsi
movl %esi, %edi
leaq (,%rsi,8), %r8
addq 0x88(%rsp), %r8
addq (%rsp), %rdi
shlq $0x2, %rsi
movq 0x70(%rsp), %r9
addq %rsi, %r9
addq 0xb0(%rsp), %rsi
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpl %r11d, %r12d
je 0x2a56
movl %edx, (%rsi,%r11,4)
movl %r10d, (%r9,%r11,4)
movsd %xmm0, (%r8,%r11,8)
incq %r11
addl %ebp, %r10d
movl %edi, %r13d
addl %r11d, %r13d
jne 0x2a33
jmp 0x2a73
addl %r11d, %eax
incl %ecx
movq (%rsp), %rdx
addl %eax, %edx
jne 0x29dd
jmp 0x2a73
cmpl 0x14(%rsp), %eax
jne 0x2bf2
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movq %r15, %rsi
leaq 0x70(%rsp), %r13
movq %r13, %rdx
leaq 0x88(%rsp), %r14
movq %r14, %rcx
callq 0x31ec
movq %r14, %rdi
callq 0x3b38
movq %r13, %rdi
callq 0x3a34
movq %r15, %rdi
callq 0x3a34
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
orl $-0x1, 0xc0(%rsp)
leaq 0xc8(%rsp), %rax
movupd %xmm0, 0x60(%rax)
movupd %xmm0, 0x50(%rax)
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x31f8
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
callq 0x3359
movq %r15, %rdi
callq 0x35cc
incq %rbx
jmp 0x2925
xorl %r13d, %r13d
cmpq %r13, 0x20(%rsp)
je 0x2b54
movq 0x28(%rsp), %rax
movq (%rax,%r13,8), %rbx
testq %rbx, %rbx
je 0x2b42
movq %rbx, %rdi
callq 0x35cc
movl $0x88, %esi
movq %rbx, %rdi
callq 0x2150
incq %r13
jmp 0x2b25
leaq 0x28(%rsp), %rdi
callq 0x392e
movq 0x40(%rsp), %rcx
incl %ecx
jmp 0x28ff
xorl %r14d, %r14d
cmpq 0x60(%rsp), %r14
jge 0x2b9d
movq 0x48(%rsp), %rax
movq (%rax,%r14,8), %rbx
testq %rbx, %rbx
je 0x2b8a
movq %rbx, %rdi
callq 0x35cc
movl $0x88, %esi
movq %rbx, %rdi
callq 0x2150
addq $0x2, %r14
jmp 0x2b6d
movq 0x7424(%rip), %rdi      # 0x9fc8
leaq 0x36a2(%rip), %rsi      # 0x624d
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x48(%rsp), %rdi
callq 0x392e
leaq 0x140(%rsp), %rdi
callq 0x35cc
callq 0x2d92
subsd 0xa0(%rsp), %xmm0
leaq 0x351a(%rip), %rdi      # 0x60fe
movb $0x1, %al
callq 0x2030
xorl %eax, %eax
jmp 0x24f2
leaq 0x35bd(%rip), %rdi      # 0x61b6
leaq 0x35c7(%rip), %rsi      # 0x61c7
leaq 0x35dd(%rip), %rcx      # 0x61e4
movl $0x81, %edx
callq 0x20d0
leaq 0x359e(%rip), %rdi      # 0x61b6
leaq 0x35a8(%rip), %rsi      # 0x61c7
leaq 0x35be(%rip), %rcx      # 0x61e4
pushq $0x52
popq %rdx
callq 0x20d0
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x3517(%rip), %rsi      # 0x6157
movq %rax, %rdi
callq 0x2060
jmp 0x2c9c
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x34fb(%rip), %rsi      # 0x6157
movq %rax, %rdi
callq 0x2060
jmp 0x2c9c
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x34df(%rip), %rsi      # 0x6157
movq %rax, %rdi
callq 0x2060
jmp 0x2c9c
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x34e7(%rip), %rsi      # 0x617b
movq %rax, %rdi
callq 0x2060
movq 0x734d(%rip), %rsi      # 0x9ff0
movq 0x730e(%rip), %rdx      # 0x9fb8
movq %r14, %rdi
callq 0x2200
jmp 0x2cb8
jmp 0x2cb8
jmp 0x2cb8
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f0
jmp 0x2d7d
jmp 0x2ccc
jmp 0x2d1a
movq %rax, %rbx
jmp 0x2d7d
jmp 0x2d1a
movq %rax, %rbx
jmp 0x2d04
movq %rax, %rbx
jmp 0x2cf7
jmp 0x2d1a
movq %rax, %rbx
jmp 0x2d0e
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x35cc
leaq 0x88(%rsp), %rdi
callq 0x3b38
leaq 0x70(%rsp), %rdi
callq 0x3a34
leaq 0x28(%rsp), %rdi
callq 0x3a34
jmp 0x2d73
movq %rax, %rbx
jmp 0x2d73
movq %rax, %rbx
jmp 0x2d34
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x3b38
leaq 0x70(%rsp), %rdi
callq 0x3a34
jmp 0x2d45
jmp 0x2d66
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x3a34
jmp 0x2d69
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x35cc
jmp 0x2d69
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x392e
leaq 0x48(%rsp), %rdi
callq 0x392e
leaq 0x140(%rsp), %rdi
callq 0x35cc
movq %rbx, %rdi
callq 0x2220