// File: /workspace/github_cpp_makefile_star2_O1/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::get_errors_of_approx_multiplication(hbsm::HierarchicalBlockSparseMatrix<double> const&, bool, hbsm::HierarchicalBlockSparseMatrix<double> const&, bool, std::vector<double, std::allocator<double>> const&, bool const&, bool const&)
std::vector<Treal> HierarchicalBlockSparseMatrix<Treal>::get_errors_of_approx_multiplication(HierarchicalBlockSparseMatrix<Treal> const & A, const bool tA, HierarchicalBlockSparseMatrix<Treal> const & B, const bool tB, std::vector<Treal> const & taus, const bool & apply_truncation, const bool & apply_spamm){

			std::vector<unsigned long int> skips = count_skips(A, tA, B, tB, taus, apply_truncation, apply_spamm);

			assert(skips.size() == taus.size());

			std::vector<Treal> errors;
			errors.resize(skips.size());

			Treal c1 = A.get_max_abs_value();
			Treal c2 = B.get_max_abs_value();

			//truncmul
			if(apply_truncation && !apply_spamm){
				for(int i = 0; i < errors.size(); ++i){
					errors[i] = std::max(c1,c2) * std::sqrt(taus[i] * taus[i] * skips[i]);
				}
			}

			//spamm
			if(!apply_truncation && apply_spamm){
				for(int i = 0; i < errors.size(); ++i){
					errors[i] = std::sqrt(taus[i] * taus[i] * skips[i]);
				}
			}

			//hybrid
			if(apply_truncation	&& apply_spamm){
				for(int i = 0; i < errors.size(); ++i){
					errors[i] = std::max(1.0,std::max(c1,c2)) * std::sqrt(taus[i] * taus[i] * skips[i]);
				}
			}

			//regular multiplication - do nothing
			if(!apply_truncation && !apply_spamm){

			}

			return errors;

		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x70(%rsp), %rax
leaq 0x18(%rsp), %r13
movq %r13, %rdi
pushq 0x78(%rsp)
movq %rax, %rbp
pushq %rax
callq 0x15e78
addq $0x10, %rsp
movq 0x8(%r13), %rsi
subq (%r13), %rsi
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq %rax, %rsi
jne 0x18637
sarq $0x3, %rsi
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x1aea2
movq %r12, %rdi
callq 0x214ec
movsd %xmm0, 0x10(%rsp)
movq 0x78(%rsp), %r12
movq %r15, %rdi
callq 0x214ec
movsd %xmm0, 0x8(%rsp)
cmpb $0x1, (%rbp)
jne 0x1849c
cmpb $0x0, (%r12)
jne 0x1849c
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x1849c
movsd 0x8(%rsp), %xmm3
maxsd 0x10(%rsp), %xmm3
xorl %r15d, %r15d
movsd 0xaef0(%rip), %xmm4     # 0x23300
movapd 0xaef8(%rip), %xmm5     # 0x23310
xorpd %xmm6, %xmm6
movsd %xmm3, 0x30(%rsp)
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x18(%rsp), %rax
movsd (%rax,%r15,8), %xmm2
unpcklps %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm5, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
ucomisd %xmm6, %xmm0
jb 0x1845d
sqrtsd %xmm0, %xmm0
jmp 0x1847c
callq 0x2170
xorpd %xmm6, %xmm6
movapd 0xaea2(%rip), %xmm5     # 0x23310
movsd 0xae8a(%rip), %xmm4     # 0x23300
movsd 0x30(%rsp), %xmm3
mulsd %xmm3, %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x18422
cmpb $0x0, (%rbp)
jne 0x18545
cmpb $0x1, (%r12)
jne 0x18545
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x18545
xorl %r15d, %r15d
movsd 0xae37(%rip), %xmm3     # 0x23300
movapd 0xae3f(%rip), %xmm4     # 0x23310
xorpd %xmm5, %xmm5
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x18(%rsp), %rax
movsd (%rax,%r15,8), %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm4, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
ucomisd %xmm5, %xmm0
jb 0x18510
sqrtsd %xmm0, %xmm0
jmp 0x18529
callq 0x2170
xorpd %xmm5, %xmm5
movapd 0xadef(%rip), %xmm4     # 0x23310
movsd 0xadd7(%rip), %xmm3     # 0x23300
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x184d5
cmpb $0x1, (%rbp)
jne 0x1860e
cmpb $0x1, (%r12)
jne 0x1860e
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x1860e
movsd 0x8(%rsp), %xmm0
maxsd 0x10(%rsp), %xmm0
maxsd 0xaaa5(%rip), %xmm0     # 0x23020
movsd %xmm0, 0x8(%rsp)
xorl %r15d, %r15d
movsd 0xad74(%rip), %xmm3     # 0x23300
movapd 0xad7c(%rip), %xmm4     # 0x23310
xorpd %xmm5, %xmm5
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x18(%rsp), %rax
movsd (%rax,%r15,8), %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subpd %xmm4, %xmm2
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
ucomisd %xmm5, %xmm0
jb 0x185d3
sqrtsd %xmm0, %xmm0
jmp 0x185ec
callq 0x2170
xorpd %xmm5, %xmm5
movapd 0xad2c(%rip), %xmm4     # 0x23310
movsd 0xad14(%rip), %xmm3     # 0x23300
mulsd 0x8(%rsp), %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x18598
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x18625
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc680(%rip), %rdi      # 0x24cbe
leaq 0xb0fa(%rip), %rsi      # 0x2373f
leaq 0xc68e(%rip), %rcx      # 0x24cda
movl $0x144d, %edx           # imm = 0x144D
callq 0x2100
jmp 0x1865a
jmp 0x1865a
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x18671
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x18688
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22b0