// File: /workspace/github_cpp_makefile_star2_O1/toxaart[P]hierarchical_block_sparse_lib/test_source/./test_utils.h
// Function: void verify_that_matrices_are_equal<hbsm::HierarchicalBlockSparseMatrix<double>>(hbsm::HierarchicalBlockSparseMatrix<double> const&, hbsm::HierarchicalBlockSparseMatrix<double> const&)
void verify_that_matrices_are_equal(const MatrixType & A,
				    const MatrixType & B) {
  if(A.get_n_rows() != B.get_n_rows() || A.get_n_cols() != B.get_n_cols())
    throw std::runtime_error("Error: matrices do not have same dimensions.");
  SparseMatrix spA;
  A.get_all_values(spA.rows, spA.cols, spA.values);
  std::vector<double> fullMatrixA;
  spA.to_full(fullMatrixA, A.get_n_rows(), A.get_n_cols());
  SparseMatrix spB;
  B.get_all_values(spB.rows, spB.cols, spB.values);
  std::vector<double> fullMatrixB;
  spB.to_full(fullMatrixB, B.get_n_rows(), B.get_n_cols());

  assert( fullMatrixA.size() == fullMatrixB.size() );
  for(unsigned int ind=0; ind<fullMatrixA.size(); ind++) {
    if (verbose)
      std::cout << std::setw(5) << ind << "  " 
		<< std::setw(14) << fullMatrixA[ind] << "  " 
		<< std::setw(14) << fullMatrixB[ind] 
		<< std::endl;
    if(fullMatrixA[ind] != fullMatrixB[ind])
      throw std::runtime_error("Error: matrices not equal.");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rdi), %rax
movq %rdi, %rcx
testq %rax, %rax
je 0x5bad
movq %r14, %rdx
movq %rdx, %rcx
movq 0x68(%rdx), %rdx
testq %rdx, %rdx
jne 0x5ba1
movl 0x8(%rcx), %edx
movq 0x68(%rbx), %rcx
movq %rbx, %rsi
testq %rcx, %rcx
je 0x5bcb
movq %rbx, %rdi
movq %rdi, %rsi
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
jne 0x5bbf
cmpl 0x8(%rsi), %edx
jne 0x5e8d
movq %r14, %rdx
testq %rax, %rax
je 0x5beb
movq %r14, %rax
movq %rax, %rdx
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x5bdf
movl 0xc(%rdx), %eax
movq %rbx, %rdx
testq %rcx, %rcx
je 0x5c05
movq %rbx, %rcx
movq %rcx, %rdx
movq 0x68(%rcx), %rcx
testq %rcx, %rcx
jne 0x5bf9
cmpl 0xc(%rdx), %eax
jne 0x5e8d
xorpd %xmm0, %xmm0
leaq 0xc0(%rsp), %rcx
movapd %xmm0, (%rcx)
movapd %xmm0, -0x10(%rcx)
movapd %xmm0, -0x20(%rcx)
movapd %xmm0, -0x30(%rcx)
movq $0x0, 0x10(%rcx)
leaq 0xa8(%rsp), %rdx
leaq 0x90(%rsp), %rsi
movq %r14, %rdi
callq 0x4796
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x68(%r14), %rax
movq %r14, %rcx
testq %rax, %rax
je 0x5c7a
movq %r14, %rdx
movq %rdx, %rcx
movq 0x68(%rdx), %rdx
testq %rdx, %rdx
jne 0x5c6e
movl 0x8(%rcx), %edx
testq %rax, %rax
je 0x5c90
movq %r14, %rax
movq 0x68(%r14), %r14
testq %r14, %r14
jne 0x5c82
jmp 0x5c93
movq %r14, %rax
movl 0xc(%rax), %ecx
leaq 0x90(%rsp), %rdi
movq %rsp, %rsi
callq 0x845c
xorpd %xmm0, %xmm0
leaq 0x70(%rsp), %rcx
movapd %xmm0, (%rcx)
movapd %xmm0, -0x10(%rcx)
movapd %xmm0, -0x20(%rcx)
movapd %xmm0, -0x30(%rcx)
movq $0x0, 0x10(%rcx)
leaq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x4796
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x68(%rbx), %rax
movq %rbx, %rcx
testq %rax, %rax
je 0x5d0a
movq %rbx, %rdx
movq %rdx, %rcx
movq 0x68(%rdx), %rdx
testq %rdx, %rdx
jne 0x5cfe
movl 0x8(%rcx), %edx
testq %rax, %rax
je 0x5d20
movq %rbx, %rax
movq 0x68(%rbx), %rbx
testq %rbx, %rbx
jne 0x5d12
jmp 0x5d23
movq %rbx, %rax
movl 0xc(%rax), %ecx
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x845c
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
cmpq %rsi, %rcx
jne 0x5ebf
cmpq %rax, %rdx
je 0x5d89
sarq $0x3, %rcx
movl $0x1, %edx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
ucomisd (%rdi,%rsi,8), %xmm0
jne 0x5e5b
jp 0x5e5b
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x5d6a
testq %rdi, %rdi
je 0x5d9b
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5db5
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x5dcc
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5de3
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5df9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x5e16
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x5e33
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5e50
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x2070
movq %rax, %r14
leaq 0x527c(%rip), %rsi      # 0xb0eb
movq %rax, %rdi
callq 0x2060
movq 0x8172(%rip), %rsi      # 0xdff0
movq 0x813b(%rip), %rdx      # 0xdfc0
movq %r14, %rdi
callq 0x21a0
movl $0x10, %edi
callq 0x2070
movq %rax, %r14
leaq 0x515e(%rip), %rsi      # 0xafff
movq %rax, %rdi
callq 0x2060
movq 0x8140(%rip), %rsi      # 0xdff0
movq 0x8109(%rip), %rdx      # 0xdfc0
movq %r14, %rdi
callq 0x21a0
leaq 0x5166(%rip), %rdi      # 0xb02c
leaq 0x5188(%rip), %rsi      # 0xb055
leaq 0x5190(%rip), %rcx      # 0xb064
movl $0x40, %edx
callq 0x20a0
jmp 0x5efc
movq %rax, %rbx
jmp 0x5f23
movq %rax, %rbx
jmp 0x5f2d
movq %rax, %rbx
jmp 0x5f43
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
jmp 0x5f50
movq %rax, %rbx
jmp 0x5f0c
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5f23
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq 0x40(%rsp), %rdi
callq 0x84e2
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5f43
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq 0x90(%rsp), %rdi
callq 0x84e2
movq %rbx, %rdi
callq 0x21c0