// File: toxaart[P]hierarchical_block_sparse_lib/test_source/test_matrix_operations.cc
// Function: void test_symm_square<hbsm::HierarchicalBlockSparseMatrix<double>>(hbsm::HierarchicalBlockSparseMatrix<double>::Params const&)
static void test_symm_square(typename MatrixType::Params const & param) {
  MatrixType A;
  A.set_params(param);
  A.resize(5, 5);
  {
    SparseMatrix tmp;
    set_row(tmp, 0, 2, 2, 3, 5, 2);
    set_row(tmp, 1, 0, 1, 2, 4, 3);
    set_row(tmp, 2, 0, 0, 3, 1, 2);
    set_row(tmp, 3, 0, 0, 0, 4, 5);
    set_row(tmp, 4, 0, 0, 0, 0, 1);
    tmp.assign(A);
  }
  if (verbose)
    std::cout << "Test symm_square" << std::endl;
  // A * A
  MatrixType AxA;
  MatrixType::symm_square(A, AxA);

  MatrixType AxAref;
  AxAref.set_params(param);
  AxAref.resize(5, 5);
  {
    SparseMatrix tmp;
    set_row(tmp, 0,    46,    38,    28,    51,    43);
    set_row(tmp, 1,     0,    34,    24,    47,    34);
    set_row(tmp, 2,     0,     0,    27,    40,    25);
    set_row(tmp, 3,     0,     0,     0,    83,    49);
    set_row(tmp, 4,     0,     0,     0,     0,    43);
    tmp.assign(AxAref);
  }

  verify_that_matrices_are_equal(AxA, AxAref);



}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x84d0
movq -0x248(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x8570
jmp 0x7924
xorl %eax, %eax
movl %eax, %ecx
leaq -0x90(%rbp), %rdi
movl $0x5, %edx
movl %edx, %esi
callq 0x8600
jmp 0x793d
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x8750
movq -0x250(%rbp), %rdi
xorl %esi, %esi
movsd 0x2e6af(%rip), %xmm2    # 0x36010
movsd 0x2e6af(%rip), %xmm3    # 0x36018
movsd 0x2e697(%rip), %xmm4    # 0x36008
movaps %xmm4, %xmm0
movaps %xmm4, %xmm1
callq 0x352e0
jmp 0x797e
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
xorps %xmm0, %xmm0
movsd 0x2e68b(%rip), %xmm1    # 0x36020
movsd 0x2e66b(%rip), %xmm2    # 0x36008
movsd 0x2e68b(%rip), %xmm3    # 0x36030
movsd 0x2e663(%rip), %xmm4    # 0x36010
callq 0x352e0
jmp 0x79b4
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
xorps %xmm1, %xmm1
movsd 0x2e645(%rip), %xmm2    # 0x36010
movsd 0x2e64d(%rip), %xmm3    # 0x36020
movsd 0x2e62d(%rip), %xmm4    # 0x36008
movaps %xmm1, %xmm0
callq 0x352e0
jmp 0x79e5
leaq -0xe8(%rbp), %rdi
movl $0x3, %esi
xorps %xmm2, %xmm2
movsd 0x2e634(%rip), %xmm3    # 0x36030
movsd 0x2e614(%rip), %xmm4    # 0x36018
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x352e0
jmp 0x7a11
leaq -0xe8(%rbp), %rdi
movl $0x4, %esi
xorps %xmm3, %xmm3
movsd 0x2e5f8(%rip), %xmm4    # 0x36020
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x352e0
jmp 0x7a38
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8790
jmp 0x7a4d
leaq -0xe8(%rbp), %rdi
callq 0x87d0
leaq -0x170(%rbp), %rdi
callq 0x84d0
jmp 0x7a67
leaq -0x90(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x2bd60
jmp 0x7a7c
leaq -0x1f8(%rbp), %rdi
callq 0x84d0
jmp 0x7a8a
movq -0x8(%rbp), %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x8570
jmp 0x7a9c
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1f8(%rbp), %rdi
movl $0x5, %edx
movl %edx, %esi
callq 0x8600
jmp 0x7ab5
leaq -0x240(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x8750
movq -0x258(%rbp), %rdi
xorl %esi, %esi
movsd 0x2e637(%rip), %xmm0    # 0x36110
movsd 0x2e59f(%rip), %xmm1    # 0x36080
movsd 0x2e5c7(%rip), %xmm2    # 0x360b0
movsd 0x2e777(%rip), %xmm3    # 0x36268
movsd 0x2e5af(%rip), %xmm4    # 0x360a8
callq 0x352e0
jmp 0x7b00
leaq -0x240(%rbp), %rdi
movl $0x1, %esi
xorps %xmm0, %xmm0
movsd 0x2e551(%rip), %xmm2    # 0x36068
movsd 0x2e739(%rip), %xmm3    # 0x36258
movsd 0x2e5f1(%rip), %xmm4    # 0x36118
movaps %xmm4, %xmm1
callq 0x352e0
jmp 0x7b31
leaq -0x240(%rbp), %rdi
movl $0x2, %esi
xorps %xmm1, %xmm1
movsd 0x2e588(%rip), %xmm2    # 0x360d0
movsd 0x2e4f0(%rip), %xmm3    # 0x36040
movsd 0x2e520(%rip), %xmm4    # 0x36078
movaps %xmm1, %xmm0
callq 0x352e0
jmp 0x7b62
leaq -0x240(%rbp), %rdi
movl $0x3, %esi
xorps %xmm2, %xmm2
movsd 0x2e6f7(%rip), %xmm3    # 0x36270
movsd 0x2e56f(%rip), %xmm4    # 0x360f0
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x352e0
jmp 0x7b8e
leaq -0x240(%rbp), %rdi
movl $0x4, %esi
xorps %xmm3, %xmm3
movsd 0x2e503(%rip), %xmm4    # 0x360a8
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x352e0
jmp 0x7bb5
leaq -0x240(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x8790
jmp 0x7bca
leaq -0x240(%rbp), %rdi
callq 0x87d0
leaq -0x170(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x8bb0
jmp 0x7beb
leaq -0x1f8(%rbp), %rdi
callq 0x11250
leaq -0x170(%rbp), %rdi
callq 0x11250
leaq -0x90(%rbp), %rdi
callq 0x11250
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x7caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x87d0
jmp 0x7caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x7c9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x7c92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x87d0
leaq -0x1f8(%rbp), %rdi
callq 0x11250
leaq -0x170(%rbp), %rdi
callq 0x11250
leaq -0x90(%rbp), %rdi
callq 0x11250
movq -0x98(%rbp), %rdi
callq 0x2340
nopw %cs:(%rax,%rax)