// File: /workspace/github_cpp_makefile_star2_O2/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 0x20(%rsp), %r13
movq %r13, %rdi
pushq 0x78(%rsp)
movq %rax, %rbp
pushq %rax
callq 0x118e2
addq $0x10, %rsp
movq 0x8(%r13), %rsi
subq (%r13), %rsi
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq %rax, %rsi
jne 0x133f4
sarq $0x3, %rsi
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x14f62
movq %r12, %rdi
callq 0x1a682
movsd %xmm0, 0x10(%rsp)
movq 0x78(%rsp), %r12
movq %r15, %rdi
callq 0x1a682
movsd %xmm0, 0x8(%rsp)
movb (%rbp), %al
cmpb $0x1, %al
jne 0x13277
cmpb $0x0, (%r12)
jne 0x13277
movsd 0x8(%rsp), %xmm3
maxsd 0x10(%rsp), %xmm3
movq (%rbx), %rax
xorl %r15d, %r15d
movsd 0x912a(%rip), %xmm4     # 0x1c310
movapd 0x9132(%rip), %xmm5     # 0x1c320
xorpd %xmm6, %xmm6
movsd %xmm3, 0x18(%rsp)
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x13274
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x20(%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 0x13243
sqrtsd %xmm0, %xmm0
jmp 0x13262
callq 0x2160
xorpd %xmm6, %xmm6
movapd 0x90cc(%rip), %xmm5     # 0x1c320
movsd 0x90b4(%rip), %xmm4     # 0x1c310
movsd 0x18(%rsp), %xmm3
mulsd %xmm3, %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
jmp 0x131f8
movb (%rbp), %al
testb $0x1, %al
jne 0x13319
cmpb $0x1, (%r12)
jne 0x13319
movq (%rbx), %rax
xorl %r15d, %r15d
movsd 0x9078(%rip), %xmm3     # 0x1c310
movapd 0x9080(%rip), %xmm4     # 0x1c320
xorpd %xmm5, %xmm5
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x13316
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x20(%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 0x132ef
sqrtsd %xmm0, %xmm0
jmp 0x13308
callq 0x2160
xorpd %xmm5, %xmm5
movapd 0x9020(%rip), %xmm4     # 0x1c320
movsd 0x9008(%rip), %xmm3     # 0x1c310
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
jmp 0x132a4
movb (%rbp), %al
testb $0x1, %al
je 0x133d8
cmpb $0x1, (%r12)
jne 0x133d8
movsd 0x8(%rsp), %xmm0
maxsd 0x10(%rsp), %xmm0
maxsd 0x8ce0(%rip), %xmm0     # 0x1c020
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
xorl %r15d, %r15d
movsd 0x8fbc(%rip), %xmm3     # 0x1c310
movapd 0x8fc4(%rip), %xmm4     # 0x1c320
xorpd %xmm5, %xmm5
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x133d8
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
mulsd %xmm1, %xmm1
movq 0x20(%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 0x133ab
sqrtsd %xmm0, %xmm0
jmp 0x133c4
callq 0x2160
xorpd %xmm5, %xmm5
movapd 0x8f64(%rip), %xmm4     # 0x1c320
movsd 0x8f4c(%rip), %xmm3     # 0x1c310
mulsd 0x8(%rsp), %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
jmp 0x13360
leaq 0x20(%rsp), %rdi
callq 0x1a378
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa8d3(%rip), %rdi      # 0x1dcce
leaq 0x934d(%rip), %rsi      # 0x1c74f
leaq 0xa8e1(%rip), %rcx      # 0x1dcea
movl $0x144d, %edx           # imm = 0x144D
callq 0x2100
jmp 0x13417
jmp 0x13417
movq %rax, %r14
movq %rbx, %rdi
callq 0x1722c
leaq 0x20(%rsp), %rdi
callq 0x1a378
movq %r14, %rdi
callq 0x2290