// File: /workspace/github_cpp_makefile_star2_O2/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::get_all_values(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<double, std::allocator<double>>&) const
void HierarchicalBlockSparseMatrix<Treal>::get_all_values(std::vector<int> & rows,
						  std::vector<int> & cols,
						  std::vector<Treal> & values) const  {


			if(!rows.empty()) rows.clear();
			if(!cols.empty()) cols.clear();
			if(!values.empty()) values.clear();

      rows.reserve(nRows * nCols);
      cols.reserve(nRows * nCols);
      values.reserve(nRows * nCols);

			if(empty()){;
				return;
			}

			if(lowest_level()){
				for(int i = 0; i < submatrix.size(); ++i){

					if(fabs(submatrix[i]) > 0.0){

						int col = i / nRows;
						int row = i % nRows;
						rows.push_back(row);
						cols.push_back(col);
						values.push_back(submatrix[i]);

					}
				}

				return;
			}

			// here we have to merge vectors obtained from children, takin into account offset of indices
			int offset = nRows/2;

			std::vector<int> rows0,rows1,rows2,rows3;
			std::vector<int> cols0,cols1,cols2,cols3;
			std::vector<Treal> vals0,vals1,vals2,vals3;


			if(children[0] != NULL){
				children[0]->get_all_values(rows0,cols0,vals0);
				assert(rows0.size() == cols0.size() && rows0.size() == vals0.size());
				// child0 - no offset applied
				for(int i = 0; i < rows0.size(); ++i){
					rows.push_back(rows0[i]);
					cols.push_back(cols0[i]);
					values.push_back(vals0[i]);
				}
			}

			if(children[1] != NULL){
				children[1]->get_all_values(rows1,cols1,vals1);
				assert(rows1.size() == cols1.size() && rows1.size() == vals1.size());
				// child1 - offset applied to row number
				for(int i = 0; i < rows1.size(); ++i){
					rows.push_back(rows1[i]+offset);
					cols.push_back(cols1[i]);
					values.push_back(vals1[i]);
				}
			}

			if(children[2] != NULL){
				children[2]->get_all_values(rows2,cols2,vals2);
				assert(rows2.size() == cols2.size() && rows2.size() == vals2.size());
				// child2 - offset applied to col number
				for(int i = 0; i < rows2.size(); ++i){
					rows.push_back(rows2[i]);
					cols.push_back(cols2[i]+offset);
					values.push_back(vals2[i]);
				}
			}


			if(children[3] != NULL){
				children[3]->get_all_values(rows3,cols3,vals3);
				assert(rows3.size() == cols3.size() && rows3.size() == vals3.size());
				// child3 - offset applied to both col and row number
				for(int i = 0; i < rows3.size(); ++i){
					rows.push_back(rows3[i]+offset);
					cols.push_back(cols3[i]+offset);
					values.push_back(vals3[i]);
				}
			}

		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x3f14
movq %rax, 0x8(%r15)
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x3f21
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0x3f2e
movq %rax, 0x8(%rbx)
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %r15, %rdi
callq 0x6790
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %r14, 0x18(%rsp)
movq %r14, %rdi
callq 0x6790
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
callq 0x6826
movq %r12, %rdi
callq 0x39bc
testb %al, %al
jne 0x452b
movq %r12, %rdi
callq 0x5a0a
testb %al, %al
je 0x400b
xorl %ebx, %ebx
leaq 0x20(%rsp), %r14
leaq 0x40(%rsp), %rbp
xorl %r13d, %r13d
movq 0x70(%r12), %rax
movq 0x78(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x452b
xorpd %xmm0, %xmm0
ucomisd (%rax,%r13,8), %xmm0
je 0x4002
movl %r13d, %eax
cltd
idivl (%r12)
movl %eax, 0x40(%rsp)
movl %edx, 0x20(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x52ae
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x52ae
movq 0x70(%r12), %rsi
addq %rbx, %rsi
movq 0x10(%rsp), %rdi
callq 0x68bc
incq %r13
addq $0x8, %rbx
jmp 0x3fa2
movl (%r12), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, 0xc(%rsp)
xorpd %xmm0, %xmm0
andq $0x0, 0x50(%rsp)
movapd %xmm0, 0x40(%rsp)
andq $0x0, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
andq $0x0, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
andq $0x0, 0x190(%rsp)
movapd %xmm0, 0x180(%rsp)
andq $0x0, 0x170(%rsp)
movapd %xmm0, 0x160(%rsp)
andq $0x0, 0x150(%rsp)
movapd %xmm0, 0x140(%rsp)
andq $0x0, 0x130(%rsp)
movapd %xmm0, 0x120(%rsp)
andq $0x0, 0x110(%rsp)
movapd %xmm0, 0x100(%rsp)
andq $0x0, 0xf0(%rsp)
movapd %xmm0, 0xe0(%rsp)
andq $0x0, 0xd0(%rsp)
movapd %xmm0, 0xc0(%rsp)
andq $0x0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x41b4
leaq 0x40(%rsp), %rsi
leaq 0x180(%rsp), %rdx
leaq 0x100(%rsp), %rcx
callq 0x3eea
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
movq %rax, %rcx
subq %rsi, %rcx
movq 0x188(%rsp), %rdx
subq 0x180(%rsp), %rdx
cmpq %rdx, %rcx
jne 0x453d
sarq $0x2, %rcx
movq 0x108(%rsp), %rdx
subq 0x100(%rsp), %rdx
sarq $0x3, %rdx
cmpq %rdx, %rcx
jne 0x453d
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %ebx, %ebx
subq %rsi, %rax
sarq $0x2, %rax
cmpq %rbx, %rax
jbe 0x41b4
addq %rbp, %rsi
movq %r15, %rdi
callq 0x52ae
movq 0x180(%rsp), %rsi
addq %rbp, %rsi
movq 0x18(%rsp), %rdi
callq 0x52ae
movq 0x100(%rsp), %rsi
addq %r13, %rsi
movq 0x10(%rsp), %rdi
callq 0x68bc
incq %rbx
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
addq $0x4, %rbp
addq $0x8, %r13
jmp 0x415c
movq 0x38(%r12), %rdi
testq %rdi, %rdi
je 0x4292
leaq 0x20(%rsp), %rsi
leaq 0x160(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
callq 0x3eea
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x168(%rsp), %rsi
subq 0x160(%rsp), %rsi
cmpq %rsi, %rdx
jne 0x455c
sarq $0x2, %rdx
movq 0xe8(%rsp), %rsi
subq 0xe0(%rsp), %rsi
sarq $0x3, %rsi
cmpq %rsi, %rdx
jne 0x455c
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %ebx, %ebx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x4292
movl (%rax,%rbx,4), %eax
addl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x71b4
movq 0x160(%rsp), %rsi
addq %rbp, %rsi
movq 0x18(%rsp), %rdi
callq 0x52ae
movq 0xe0(%rsp), %rsi
addq %r13, %rsi
movq 0x10(%rsp), %rdi
callq 0x68bc
incq %rbx
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
addq $0x4, %rbp
addq $0x8, %r13
jmp 0x422d
movq 0x48(%r12), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbp
je 0x4381
leaq 0x80(%rsp), %rsi
leaq 0x140(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
callq 0x3eea
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x148(%rsp), %rsi
subq 0x140(%rsp), %rsi
cmpq %rsi, %rdx
jne 0x457b
sarq $0x2, %rdx
movq 0xc8(%rsp), %rsi
subq 0xc0(%rsp), %rsi
sarq $0x3, %rsi
cmpq %rsi, %rdx
jne 0x457b
xorl %ebx, %ebx
leaq 0x8(%rsp), %r13
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x4381
leaq (%rax,%rbx,4), %rsi
movq %r15, %rdi
callq 0x52ae
movq 0x140(%rsp), %rax
movl (%rax,%rbx,4), %eax
addl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x71b4
leaq (,%rbx,8), %rsi
addq 0xc0(%rsp), %rsi
movq %r14, %rdi
callq 0x68bc
incq %rbx
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
jmp 0x431e
movq 0x58(%r12), %rdi
testq %rdi, %rdi
je 0x4498
leaq 0x60(%rsp), %rsi
leaq 0x120(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
callq 0x3eea
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x128(%rsp), %rsi
subq 0x120(%rsp), %rsi
cmpq %rsi, %rdx
jne 0x459a
sarq $0x2, %rdx
movq 0xa8(%rsp), %rsi
subq 0xa0(%rsp), %rsi
sarq $0x3, %rsi
cmpq %rsi, %rdx
jne 0x459a
movq $0x0, 0x98(%rsp)
leaq 0x8(%rsp), %r13
xorl %ebx, %ebx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x4498
movq %r15, %rdi
movq %rbp, %r15
movl (%rax,%rbx,4), %eax
movl 0xc(%rsp), %ebp
addl %ebp, %eax
movl %eax, 0x8(%rsp)
movq %rdi, %r12
movq %r13, %rsi
callq 0x71b4
movq 0x120(%rsp), %rax
movl (%rax,%rbx,4), %eax
addl %ebp, %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rbp
movq %r13, %rsi
callq 0x71b4
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %r13
addq %r13, %rsi
movq %r14, %rdi
callq 0x68bc
incq %rbx
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
addq $0x8, %r13
movq %r13, 0x98(%rsp)
movq %r15, %rdx
movq %r12, %r15
movq %rbp, %r13
movq %rdx, %rbp
jmp 0x4406
leaq 0xa0(%rsp), %rdi
callq 0x5c00
leaq 0xc0(%rsp), %rdi
callq 0x5c00
leaq 0xe0(%rsp), %rdi
callq 0x5c00
leaq 0x100(%rsp), %rdi
callq 0x5c00
leaq 0x120(%rsp), %rdi
callq 0x5afc
leaq 0x140(%rsp), %rdi
callq 0x5afc
leaq 0x160(%rsp), %rdi
callq 0x5afc
leaq 0x180(%rsp), %rdi
callq 0x5afc
leaq 0x60(%rsp), %rdi
callq 0x5afc
leaq 0x80(%rsp), %rdi
callq 0x5afc
leaq 0x20(%rsp), %rdi
callq 0x5afc
leaq 0x40(%rsp), %rdi
callq 0x5afc
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x47a9(%rip), %rdi      # 0x8ced
leaq 0x4042(%rip), %rsi      # 0x858d
leaq 0x47d8(%rip), %rcx      # 0x8d2a
movl $0x436, %edx            # imm = 0x436
callq 0x20d0
leaq 0x485d(%rip), %rdi      # 0x8dc0
leaq 0x4023(%rip), %rsi      # 0x858d
leaq 0x47b9(%rip), %rcx      # 0x8d2a
movl $0x441, %edx            # imm = 0x441
callq 0x20d0
leaq 0x487b(%rip), %rdi      # 0x8dfd
leaq 0x4004(%rip), %rsi      # 0x858d
leaq 0x479a(%rip), %rcx      # 0x8d2a
movl $0x44c, %edx            # imm = 0x44C
callq 0x20d0
leaq 0x4899(%rip), %rdi      # 0x8e3a
leaq 0x3fe5(%rip), %rsi      # 0x858d
leaq 0x477b(%rip), %rcx      # 0x8d2a
movl $0x458, %edx            # imm = 0x458
callq 0x20d0
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
jmp 0x45c9
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x5c00
leaq 0xc0(%rsp), %rdi
callq 0x5c00
leaq 0xe0(%rsp), %rdi
callq 0x5c00
leaq 0x100(%rsp), %rdi
callq 0x5c00
leaq 0x120(%rsp), %rdi
callq 0x5afc
leaq 0x140(%rsp), %rdi
callq 0x5afc
leaq 0x160(%rsp), %rdi
callq 0x5afc
leaq 0x180(%rsp), %rdi
callq 0x5afc
leaq 0x60(%rsp), %rdi
callq 0x5afc
leaq 0x80(%rsp), %rdi
callq 0x5afc
leaq 0x20(%rsp), %rdi
callq 0x5afc
leaq 0x40(%rsp), %rdi
callq 0x5afc
movq %rbx, %rdi
callq 0x21f0
nop