// File: toxaart[P]hierarchical_block_sparse_lib/test_source/test_matrix_operations.cc
// Function: void test_symm_multiply<hbsm::HierarchicalBlockSparseMatrix<double>>(hbsm::HierarchicalBlockSparseMatrix<double>::Params const&)
static void test_symm_multiply(typename MatrixType::Params const & param) {
	MatrixType A;
	A.set_params(param);
	A.resize(5, 5);
	{
		SparseMatrix As;
		set_row(As, 0, 2, 2, 3, 5, 2);
		set_row(As, 1, 0, 1, 2, 4, 3);
		set_row(As, 2, 0, 0, 3, 1, 2);
		set_row(As, 3, 0, 0, 0, 4, 5);
		set_row(As, 4, 0, 0, 0, 0, 1);
		As.assign(A);
	}
	MatrixType B;
	B.set_params(param);
	B.resize(5, 7);
	{
		SparseMatrix Bs;
		set_row(Bs, 0, 5, 3, 1, 5, 0, 3, 3);
		set_row(Bs, 1, 1, 5, 5, 4, 1, 5, 1);
		set_row(Bs, 2, 2, 1, 3, 2, 1, 1, 4);
		set_row(Bs, 3, 2, 2, 3, 3, 1, 4, 2);
		set_row(Bs, 4, 5, 1, 1, 2, 1, 2, 3);
		Bs.assign(B);
	}
	MatrixType C;
	C.set_params(param);
	C.resize(2, 5);
	{
		SparseMatrix Cs;
		set_row(Cs, 0, 5, 3, 0, 3, 3);
		set_row(Cs, 1, 1, 4, 1, 5, 1);
		Cs.assign(C);
	}
	if (verbose)
	std::cout << "Test symm_multiply 1" << std::endl;




	// A * B
	MatrixType AxB;
	MatrixType::symm_multiply(A, true, B, false, AxB);
	MatrixType AxBref;
	AxBref.set_params(param);
	AxBref.resize(5, 7);
	{
		SparseMatrix tmp;
		set_row(tmp, 0,    38,    31,    38,    43,    12,    43,    36);
		set_row(tmp, 1,    38,    24,    28,    36,    10,    35,    32);
		set_row(tmp, 2,    35,    26,    27,    36,     8,    30,    31);
		set_row(tmp, 3,    64,    49,    45,    65,    14,    62,    46);
		set_row(tmp, 4,    32,    34,    39,    43,    11,    45,    30);
		tmp.assign(AxBref);
	}


	verify_that_matrices_are_equal(AxB, AxBref);


	if (verbose)
	std::cout << "Test symm_multiply 2" << std::endl;
	// C * A
	MatrixType CxA;
	MatrixType::symm_multiply(C, false, A, true, CxA);
	MatrixType CxAref;
	CxAref.set_params(param);
	CxAref.resize(2, 5);
	{
		SparseMatrix tmp;
		set_row(tmp, 0,   37,    34,    30,    64,    37);
		set_row(tmp, 1,   40,    31,    21,    47,    42);
		tmp.assign(CxAref);
	}
	verify_that_matrices_are_equal(CxA, CxAref);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x570, %rsp            # imm = 0x570
movq %rdi, -0x8(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0x540(%rbp)
callq 0x84d0
movq -0x540(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x8570
jmp 0x7014
xorl %eax, %eax
movl %eax, %ecx
leaq -0x90(%rbp), %rdi
movl $0x5, %edx
movl %edx, %esi
callq 0x8600
jmp 0x702d
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x548(%rbp)
callq 0x8750
movq -0x548(%rbp), %rdi
xorl %esi, %esi
movsd 0x2efbf(%rip), %xmm2    # 0x36010
movsd 0x2efbf(%rip), %xmm3    # 0x36018
movsd 0x2efa7(%rip), %xmm4    # 0x36008
movaps %xmm4, %xmm0
movaps %xmm4, %xmm1
callq 0x352e0
jmp 0x706e
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
xorps %xmm0, %xmm0
movsd 0x2ef9b(%rip), %xmm1    # 0x36020
movsd 0x2ef7b(%rip), %xmm2    # 0x36008
movsd 0x2ef9b(%rip), %xmm3    # 0x36030
movsd 0x2ef73(%rip), %xmm4    # 0x36010
callq 0x352e0
jmp 0x70a4
leaq -0xe8(%rbp), %rdi
movl $0x2, %esi
xorps %xmm1, %xmm1
movsd 0x2ef55(%rip), %xmm2    # 0x36010
movsd 0x2ef5d(%rip), %xmm3    # 0x36020
movsd 0x2ef3d(%rip), %xmm4    # 0x36008
movaps %xmm1, %xmm0
callq 0x352e0
jmp 0x70d5
leaq -0xe8(%rbp), %rdi
movl $0x3, %esi
xorps %xmm2, %xmm2
movsd 0x2ef44(%rip), %xmm3    # 0x36030
movsd 0x2ef24(%rip), %xmm4    # 0x36018
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x352e0
jmp 0x7101
leaq -0xe8(%rbp), %rdi
movl $0x4, %esi
xorps %xmm3, %xmm3
movsd 0x2ef08(%rip), %xmm4    # 0x36020
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x352e0
jmp 0x7128
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8790
jmp 0x713d
leaq -0xe8(%rbp), %rdi
callq 0x87d0
leaq -0x170(%rbp), %rdi
callq 0x84d0
jmp 0x7157
movq -0x8(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x8570
jmp 0x7169
xorl %eax, %eax
movl %eax, %ecx
leaq -0x170(%rbp), %rdi
movl $0x5, %esi
movl $0x7, %edx
callq 0x8600
jmp 0x7185
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x550(%rbp)
callq 0x8750
movq -0x550(%rbp), %rdi
xorl %esi, %esi
movsd 0x2ee77(%rip), %xmm2    # 0x36020
movsd 0x2ee67(%rip), %xmm3    # 0x36018
xorps %xmm4, %xmm4
movsd 0x2ee54(%rip), %xmm6    # 0x36010
movaps %xmm3, %xmm0
movaps %xmm6, %xmm1
movaps %xmm6, %xmm5
callq 0x356d0
jmp 0x71cc
leaq -0x1b8(%rbp), %rdi
movl $0x1, %esi
movsd 0x2ee50(%rip), %xmm3    # 0x36030
movsd 0x2ee30(%rip), %xmm5    # 0x36018
movsd 0x2ee30(%rip), %xmm6    # 0x36020
movaps %xmm6, %xmm0
movaps %xmm5, %xmm1
movaps %xmm5, %xmm2
movaps %xmm6, %xmm4
callq 0x356d0
jmp 0x7203
leaq -0x1b8(%rbp), %rdi
movl $0x2, %esi
movsd 0x2edf9(%rip), %xmm2    # 0x36010
movsd 0x2ede9(%rip), %xmm3    # 0x36008
movsd 0x2edf9(%rip), %xmm5    # 0x36020
movsd 0x2ee01(%rip), %xmm6    # 0x36030
movaps %xmm3, %xmm0
movaps %xmm5, %xmm1
movaps %xmm5, %xmm4
callq 0x356d0
jmp 0x723f
leaq -0x1b8(%rbp), %rdi
movl $0x3, %esi
movsd 0x2edbd(%rip), %xmm3    # 0x36010
movsd 0x2edc5(%rip), %xmm4    # 0x36020
movsd 0x2edcd(%rip), %xmm5    # 0x36030
movsd 0x2ed9d(%rip), %xmm6    # 0x36008
movaps %xmm6, %xmm0
movaps %xmm6, %xmm1
movaps %xmm3, %xmm2
callq 0x356d0
jmp 0x727b
leaq -0x1b8(%rbp), %rdi
movl $0x4, %esi
movsd 0x2ed89(%rip), %xmm0    # 0x36018
movsd 0x2ed89(%rip), %xmm4    # 0x36020
movsd 0x2ed69(%rip), %xmm5    # 0x36008
movsd 0x2ed69(%rip), %xmm6    # 0x36010
movaps %xmm4, %xmm1
movaps %xmm4, %xmm2
movaps %xmm5, %xmm3
callq 0x356d0
jmp 0x72b7
leaq -0x1b8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x8790
jmp 0x72cc
leaq -0x1b8(%rbp), %rdi
callq 0x87d0
leaq -0x240(%rbp), %rdi
callq 0x84d0
jmp 0x72e6
movq -0x8(%rbp), %rsi
leaq -0x240(%rbp), %rdi
callq 0x8570
jmp 0x72f8
xorl %eax, %eax
movl %eax, %ecx
leaq -0x240(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x8600
jmp 0x7314
leaq -0x288(%rbp), %rdi
movq %rdi, -0x558(%rbp)
callq 0x8750
movq -0x558(%rbp), %rdi
xorl %esi, %esi
movsd 0x2ece0(%rip), %xmm0    # 0x36018
xorps %xmm2, %xmm2
movsd 0x2eccd(%rip), %xmm4    # 0x36010
movaps %xmm4, %xmm1
movaps %xmm4, %xmm3
callq 0x352e0
jmp 0x7350
leaq -0x288(%rbp), %rdi
movl $0x1, %esi
movsd 0x2eccc(%rip), %xmm1    # 0x36030
movsd 0x2ecac(%rip), %xmm3    # 0x36018
movsd 0x2ecac(%rip), %xmm4    # 0x36020
movaps %xmm4, %xmm0
movaps %xmm4, %xmm2
callq 0x352e0
jmp 0x7381
leaq -0x288(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x8790
jmp 0x7396
leaq -0x288(%rbp), %rdi
callq 0x87d0
leaq -0x310(%rbp), %rdi
callq 0x84d0
jmp 0x73b0
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
leaq -0x170(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x310(%rbp), %r8
callq 0x296d0
jmp 0x73d3
leaq -0x398(%rbp), %rdi
callq 0x84d0
jmp 0x73e1
movq -0x8(%rbp), %rsi
leaq -0x398(%rbp), %rdi
callq 0x8570
jmp 0x73f3
xorl %eax, %eax
movl %eax, %ecx
leaq -0x398(%rbp), %rdi
movl $0x5, %esi
movl $0x7, %edx
callq 0x8600
jmp 0x740f
leaq -0x3e0(%rbp), %rdi
movq %rdi, -0x560(%rbp)
callq 0x8750
movq -0x560(%rbp), %rdi
xorl %esi, %esi
movsd 0x2ec6d(%rip), %xmm1    # 0x360a0
movsd 0x2ec45(%rip), %xmm2    # 0x36080
movsd 0x2ec15(%rip), %xmm4    # 0x36058
movsd 0x2ec5d(%rip), %xmm5    # 0x360a8
movsd 0x2ebf5(%rip), %xmm6    # 0x36048
movaps %xmm2, %xmm0
movaps %xmm5, %xmm3
callq 0x356d0
jmp 0x7460
leaq -0x3e0(%rbp), %rdi
movl $0x1, %esi
movsd 0x2ec0c(%rip), %xmm0    # 0x36080
movsd 0x2ebec(%rip), %xmm1    # 0x36068
movsd 0x2ec2c(%rip), %xmm2    # 0x360b0
movsd 0x2ebbc(%rip), %xmm3    # 0x36048
movsd 0x2ebf4(%rip), %xmm4    # 0x36088
movsd 0x2ec1c(%rip), %xmm5    # 0x360b8
movsd 0x2ec1c(%rip), %xmm6    # 0x360c0
callq 0x356d0
jmp 0x74ab
leaq -0x3e0(%rbp), %rdi
movl $0x2, %esi
movsd 0x2ebf9(%rip), %xmm0    # 0x360b8
movsd 0x2ec01(%rip), %xmm1    # 0x360c8
movsd 0x2ec01(%rip), %xmm2    # 0x360d0
movsd 0x2eb71(%rip), %xmm3    # 0x36048
movsd 0x2ebf9(%rip), %xmm4    # 0x360d8
movsd 0x2ebf9(%rip), %xmm5    # 0x360e0
movsd 0x2ebb1(%rip), %xmm6    # 0x360a0
callq 0x356d0
jmp 0x74f6
leaq -0x3e0(%rbp), %rdi
movl $0x3, %esi
movsd 0x2ebde(%rip), %xmm0    # 0x360e8
movsd 0x2ebde(%rip), %xmm1    # 0x360f0
movsd 0x2ebde(%rip), %xmm2    # 0x360f8
movsd 0x2ebde(%rip), %xmm3    # 0x36100
movsd 0x2eb36(%rip), %xmm4    # 0x36060
movsd 0x2ebd6(%rip), %xmm5    # 0x36108
movsd 0x2ebd6(%rip), %xmm6    # 0x36110
callq 0x356d0
jmp 0x7541
leaq -0x3e0(%rbp), %rdi
movl $0x4, %esi
movsd 0x2eb6b(%rip), %xmm0    # 0x360c0
movsd 0x2ebbb(%rip), %xmm1    # 0x36118
movsd 0x2ebbb(%rip), %xmm2    # 0x36120
movsd 0x2eb3b(%rip), %xmm3    # 0x360a8
movsd 0x2ebb3(%rip), %xmm4    # 0x36128
movsd 0x2eb7b(%rip), %xmm5    # 0x360f8
movsd 0x2eb5b(%rip), %xmm6    # 0x360e0
callq 0x356d0
jmp 0x758c
leaq -0x3e0(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x8790
jmp 0x75a1
leaq -0x3e0(%rbp), %rdi
callq 0x87d0
leaq -0x310(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x8bb0
jmp 0x75c2
leaq -0x468(%rbp), %rdi
callq 0x84d0
jmp 0x75d0
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
leaq -0x90(%rbp), %rdx
movl $0x1, %ecx
leaq -0x468(%rbp), %r8
callq 0x296d0
jmp 0x75f3
leaq -0x4f0(%rbp), %rdi
callq 0x84d0
jmp 0x7601
movq -0x8(%rbp), %rsi
leaq -0x4f0(%rbp), %rdi
callq 0x8570
jmp 0x7613
xorl %eax, %eax
movl %eax, %ecx
leaq -0x4f0(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x8600
jmp 0x762f
leaq -0x538(%rbp), %rdi
movq %rdi, -0x568(%rbp)
callq 0x8750
movq -0x568(%rbp), %rdi
xorl %esi, %esi
movsd 0x2eac5(%rip), %xmm1    # 0x36118
movsd 0x2ea85(%rip), %xmm2    # 0x360e0
movsd 0x2ea85(%rip), %xmm3    # 0x360e8
movsd 0x2ebdd(%rip), %xmm4    # 0x36248
movaps %xmm4, %xmm0
callq 0x352e0
jmp 0x7675
leaq -0x538(%rbp), %rdi
movl $0x1, %esi
movsd 0x2e9b7(%rip), %xmm0    # 0x36040
movsd 0x2ea0f(%rip), %xmm1    # 0x360a0
movsd 0x2ebb7(%rip), %xmm2    # 0x36250
movsd 0x2ebb7(%rip), %xmm3    # 0x36258
movsd 0x2ebb7(%rip), %xmm4    # 0x36260
callq 0x352e0
jmp 0x76b0
leaq -0x538(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x8790
jmp 0x76c5
leaq -0x538(%rbp), %rdi
callq 0x87d0
leaq -0x468(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x8bb0
jmp 0x76e6
leaq -0x4f0(%rbp), %rdi
callq 0x11250
leaq -0x468(%rbp), %rdi
callq 0x11250
leaq -0x398(%rbp), %rdi
callq 0x11250
leaq -0x310(%rbp), %rdi
callq 0x11250
leaq -0x240(%rbp), %rdi
callq 0x11250
leaq -0x170(%rbp), %rdi
callq 0x11250
leaq -0x90(%rbp), %rdi
callq 0x11250
addq $0x570, %rsp            # imm = 0x570
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x78ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x87d0
jmp 0x78ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x78be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x87d0
jmp 0x78be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x78b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x87d0
jmp 0x78b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x78a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x789a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x87d0
jmp 0x789a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x788e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x7882
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x87d0
leaq -0x4f0(%rbp), %rdi
callq 0x11250
leaq -0x468(%rbp), %rdi
callq 0x11250
leaq -0x398(%rbp), %rdi
callq 0x11250
leaq -0x310(%rbp), %rdi
callq 0x11250
leaq -0x240(%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)