// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ad92
testb %al, %al
je 0xf77b
movq %r14, %rdi
callq 0x1ad92
testb %al, %al
je 0xf61c
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1adc6
movl 0x10(%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x9974
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x99da
movq %r14, %rdi
callq 0x1aed4
testb %al, %al
je 0xf683
movl 0x4(%rbx), %edx
imull (%rbx), %edx
testl %edx, %edx
jle 0xf73b
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 0xf667
jmp 0xf73b
movl $0x30, %r15d
movabsq $0x100000001, %r12      # imm = 0x100000001
leaq 0x1b646(%rip), %r13     # 0x2ace0
cmpq $0x0, -0x8(%rbx,%r15)
jne 0xf749
cmpq $0x0, -0x8(%r14,%r15)
je 0xf72d
movl $0x98, %edi
callq 0x21c0
movq %r12, 0x8(%rax)
movq %r13, (%rax)
leaq 0x10(%rax), %rcx
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 %rcx, -0x8(%rbx,%r15)
movq (%rbx,%r15), %rdi
movq %rax, (%rbx,%r15)
testq %rdi, %rdi
je 0xf710
callq 0x1af0e
movq -0x8(%rbx,%r15), %rdi
movq -0x8(%r14,%r15), %rsi
movsd (%rsp), %xmm0
callq 0xf5d6
movq -0x8(%rbx,%r15), %rax
movq %rbx, 0x68(%rax)
addq $0x10, %r15
cmpq $0x70, %r15
jne 0xf69a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x14bf0(%rip), %rsi     # 0x2434d
movq %rax, %rdi
callq 0x20a0
movq 0x1b884(%rip), %rsi     # 0x2aff0
movq 0x1b84d(%rip), %rdx     # 0x2afc0
movq %rbx, %rdi
callq 0x2290
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x14b66(%rip), %rsi     # 0x242f5
movq %rax, %rdi
callq 0x20a0
jmp 0xf765
jmp 0xf79b
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22b0