// File: /workspace/github_cpp_makefile_star2_O3/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::rescale(hbsm::HierarchicalBlockSparseMatrix<double> const&, double)
void HierarchicalBlockSparseMatrix<Treal>::rescale(HierarchicalBlockSparseMatrix<Treal> const & other, Treal alpha){

			if(!empty()) throw std::runtime_error("Error in HierarchicalBlockSparseMatrix::rescale(): non-empty matrix called this method!");

            if(other.empty()){
                clear();
                return;
            }

			set_params(other.get_params());
            resize(other.nRows_orig,other.nCols_orig);

            if(other.lowest_level()){
                for(int i = 0; i < nRows * nCols; ++i) submatrix[i] = other.submatrix[i] * alpha;
                return;
            }

            for(int i = 0; i < 4; ++i){
                if(children[i] != NULL)
                    throw std::runtime_error("Error in HierarchicalBlockSparseMatrix::rescale(): non-null child exist!");

                if(other.children[i] != NULL){
                    children[i] = std::make_shared<HierarchicalBlockSparseMatrix<Treal> >();
                    children[i]->rescale(*other.children[i], alpha);
										children[i]->parent = this;
                }

            }

		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1b2de
testb %al, %al
je 0xf8f4
movq %r14, %rdi
callq 0x1b2de
testb %al, %al
je 0xf78e
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1b326
movl 0x10(%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x9920
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9986
movq %r14, %rdi
callq 0x1b448
testb %al, %al
je 0xf7f5
movl 0x4(%rbx), %edx
imull (%rbx), %edx
testl %edx, %edx
jle 0xf8b4
movq 0x70(%r14), %rax
movq 0x70(%rbx), %rcx
movl %edx, %edx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0xf7d9
jmp 0xf8b4
movl $0x30, %r15d
movabsq $0x100000001, %r12      # imm = 0x100000001
leaq 0x1c50c(%rip), %r13     # 0x2bd18
cmpq $0x0, -0x8(%rbx,%r15)
jne 0xf8c2
cmpq $0x0, -0x8(%r14,%r15)
je 0xf8a6
movl $0x98, %edi
callq 0x21c0
movq %r12, 0x8(%rax)
movq %r13, (%rax)
leaq 0x10(%rax), %rdi
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movupd %xmm0, 0x28(%rax)
movupd %xmm0, 0x38(%rax)
movupd %xmm0, 0x48(%rax)
movupd %xmm0, 0x58(%rax)
movupd %xmm0, 0x68(%rax)
movupd %xmm0, 0x78(%rax)
movupd %xmm0, 0x88(%rax)
movq %rdi, -0x8(%rbx,%r15)
movq (%rbx,%r15), %rcx
movq %rax, (%rbx,%r15)
testq %rcx, %rcx
je 0xf88e
movq %rcx, %rdi
callq 0x1b482
movq -0x8(%rbx,%r15), %rdi
movq -0x8(%r14,%r15), %rsi
movsd (%rsp), %xmm0
callq 0xf748
movq -0x8(%rbx,%r15), %rax
movq %rbx, 0x68(%rax)
addq $0x10, %r15
cmpq $0x70, %r15
jne 0xf80c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x15ad7(%rip), %rsi     # 0x253ad
movq %rax, %rdi
callq 0x20a0
movq 0x1c70b(%rip), %rsi     # 0x2bff0
movq 0x1c6d4(%rip), %rdx     # 0x2bfc0
movq %rbx, %rdi
callq 0x2290
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x15a4d(%rip), %rsi     # 0x25355
movq %rax, %rdi
callq 0x20a0
jmp 0xf8de
jmp 0xf914
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22b0
nop