// File: /workspace/github_cpp_makefile_star2_O3/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 0x5b79
movq %r14, %rdx
movq %rdx, %rcx
movq 0x68(%rdx), %rdx
testq %rdx, %rdx
jne 0x5b6d
movl 0x8(%rcx), %edx
movq 0x68(%rbx), %rcx
movq %rbx, %rsi
testq %rcx, %rcx
je 0x5b97
movq %rbx, %rdi
movq %rdi, %rsi
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
jne 0x5b8b
cmpl 0x8(%rsi), %edx
jne 0x5e4f
movq %r14, %rdx
testq %rax, %rax
je 0x5bb7
movq %r14, %rax
movq %rax, %rdx
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x5bab
movl 0xc(%rdx), %eax
movq %rbx, %rdx
testq %rcx, %rcx
je 0x5bd1
movq %rbx, %rcx
movq %rcx, %rdx
movq 0x68(%rcx), %rcx
testq %rcx, %rcx
jne 0x5bc5
cmpl 0xc(%rdx), %eax
jne 0x5e4f
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 0x474a
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x68(%r14)
je 0x5c55
movq %r14, %rax
movq %rax, %rcx
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x5c35
movl 0x8(%rcx), %edx
movq %r14, %rax
movq 0x68(%r14), %r14
testq %r14, %r14
jne 0x5c44
movq %rax, %r14
jmp 0x5c59
movl 0x8(%r14), %edx
movl 0xc(%r14), %ecx
leaq 0x90(%rsp), %rdi
movq %rsp, %rsi
callq 0x8418
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 0x474a
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x68(%rbx)
je 0x5ce0
movq %rbx, %rax
movq %rax, %rcx
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x5cc0
movl 0x8(%rcx), %edx
movq %rbx, %rax
movq 0x68(%rbx), %rbx
testq %rbx, %rbx
jne 0x5ccf
movq %rax, %rbx
jmp 0x5ce3
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %ecx
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8418
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 0x5e81
cmpq %rax, %rdx
je 0x5d4b
sarq $0x3, %rcx
movl $0x1, %edx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
ucomisd (%rdi,%rsi,8), %xmm0
jne 0x5e1d
jp 0x5e1d
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x5d2a
jmp 0x5d50
testq %rdi, %rdi
je 0x5d5d
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5d77
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x5d8e
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5da5
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5dbb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x5dd8
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x5df5
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5e12
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 0x52d2(%rip), %rsi      # 0xb103
movq %rax, %rdi
callq 0x2060
movq 0x81b0(%rip), %rsi      # 0xdff0
movq 0x8179(%rip), %rdx      # 0xdfc0
movq %r14, %rdi
callq 0x21a0
movl $0x10, %edi
callq 0x2070
movq %rax, %r14
leaq 0x51b4(%rip), %rsi      # 0xb017
movq %rax, %rdi
callq 0x2060
movq 0x817e(%rip), %rsi      # 0xdff0
movq 0x8147(%rip), %rdx      # 0xdfc0
movq %r14, %rdi
callq 0x21a0
leaq 0x51bc(%rip), %rdi      # 0xb044
leaq 0x51de(%rip), %rsi      # 0xb06d
leaq 0x51e6(%rip), %rcx      # 0xb07c
movl $0x40, %edx
callq 0x20a0
jmp 0x5ebe
movq %rax, %rbx
jmp 0x5ee5
movq %rax, %rbx
jmp 0x5eef
movq %rax, %rbx
jmp 0x5f05
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
jmp 0x5f12
movq %rax, %rbx
jmp 0x5ece
movq %rax, %rbx
movq %r14, %rdi
callq 0x20e0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5ee5
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq 0x40(%rsp), %rdi
callq 0x849e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5f05
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq 0x90(%rsp), %rdi
callq 0x849e
movq %rbx, %rdi
callq 0x21c0