// File: /workspace/github_cpp_makefile_star2_O1/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 $0x188, %rsp            # imm = 0x188
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x47c0
movq %rax, 0x8(%r15)
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x47cd
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0x47da
movq %rax, 0x8(%rbx)
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %r15, %rdi
callq 0x7c5c
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %r14, %rdi
callq 0x7c5c
movslq (%r12), %rax
movslq 0x4(%r12), %rsi
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x7cf2
movq %r12, %rdi
callq 0x4338
testb %al, %al
jne 0x5003
movq %r12, %rdi
callq 0x6b36
testb %al, %al
je 0x4909
movq 0x70(%r12), %rax
cmpq %rax, 0x78(%r12)
je 0x5003
xorl %ebp, %ebp
xorl %r13d, %r13d
xorpd %xmm0, %xmm0
ucomisd (%rax,%rbp), %xmm0
je 0x48e3
movl %r13d, %eax
cltd
idivl (%r12)
movl %eax, 0x10(%rsp)
movl %edx, 0x30(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x4883
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x4890
movq %r15, %rdi
leaq 0x30(%rsp), %rdx
callq 0x8728
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x48aa
movl 0x10(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x48b7
movq %r14, %rdi
leaq 0x10(%rsp), %rdx
callq 0x8728
movq 0x70(%r12), %rdx
addq %rbp, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x48db
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x48e3
movq %rbx, %rdi
callq 0x7fd4
incq %r13
movq 0x70(%r12), %rax
movq 0x78(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
addq $0x8, %rbp
cmpq %r13, %rcx
ja 0x484e
jmp 0x5003
movl (%r12), %eax
movl %eax, 0x8(%rsp)
xorl %eax, %eax
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq %rax, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
movq %rax, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
movq %rax, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
movq %rax, 0x180(%rsp)
movapd %xmm0, 0x170(%rsp)
movq %rax, 0x160(%rsp)
movapd %xmm0, 0x150(%rsp)
movq %rax, 0x140(%rsp)
movapd %xmm0, 0x130(%rsp)
movq %rax, 0x120(%rsp)
movapd %xmm0, 0x110(%rsp)
movq %rax, 0x100(%rsp)
movapd %xmm0, 0xf0(%rsp)
movq %rax, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movq %rax, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movq %rax, 0xa0(%rsp)
movapd %xmm0, 0x90(%rsp)
movq %r12, 0x88(%rsp)
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x4afc
leaq 0x10(%rsp), %rsi
leaq 0x170(%rsp), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x4796
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movq 0x178(%rsp), %rcx
subq 0x170(%rsp), %rcx
cmpq %rcx, %rax
jne 0x5015
sarq $0x2, %rax
movq 0xf8(%rsp), %rcx
subq 0xf0(%rsp), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x5015
movq 0x10(%rsp), %rdx
cmpq %rdx, 0x18(%rsp)
je 0x4afc
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %r12d, %r12d
addq %rbp, %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x4a75
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x4a7d
movq %r15, %rdi
callq 0x8728
movq 0x170(%rsp), %rdx
addq %rbp, %rdx
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4aa0
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x4aa8
movq %r14, %rdi
callq 0x8728
movq 0xf0(%rsp), %rdx
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4acf
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4ad7
movq %rbx, %rdi
callq 0x7fd4
incq %r12
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
subq %rdx, %rax
sarq $0x2, %rax
addq $0x8, %r13
addq $0x4, %rbp
cmpq %r12, %rax
ja 0x4a5a
movl 0x8(%rsp), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x4c46
leaq 0x30(%rsp), %rsi
leaq 0x150(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
callq 0x4796
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
movq 0x158(%rsp), %rcx
subq 0x150(%rsp), %rcx
cmpq %rcx, %rax
jne 0x5034
sarq $0x2, %rax
movq 0xd8(%rsp), %rcx
subq 0xd0(%rsp), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x5034
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0x4c46
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r12d, %r12d
movl (%rax,%r13), %eax
addl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x4bba
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x4bc7
movq %r15, %rdi
leaq 0xc(%rsp), %rdx
callq 0x8528
movq 0x150(%rsp), %rdx
addq %r13, %rdx
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4bea
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x4bf2
movq %r14, %rdi
callq 0x8728
movq 0xd0(%rsp), %rdx
addq %rbp, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c19
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4c21
movq %rbx, %rdi
callq 0x7fd4
incq %r12
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
addq $0x8, %rbp
addq $0x4, %r13
cmpq %r12, %rcx
ja 0x4b98
movq 0x88(%rsp), %rax
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x4d7f
leaq 0x70(%rsp), %rsi
leaq 0x130(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x4796
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
movq 0x138(%rsp), %rcx
subq 0x130(%rsp), %rcx
cmpq %rcx, %rax
jne 0x5053
sarq $0x2, %rax
movq 0xb8(%rsp), %rcx
subq 0xb0(%rsp), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x5053
movq 0x70(%rsp), %rdx
cmpq %rdx, 0x78(%rsp)
je 0x4d7f
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r12d, %r12d
addq %r13, %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x4cec
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x4cf4
movq %r15, %rdi
callq 0x8728
movq 0x130(%rsp), %rax
movl (%rax,%r13), %eax
addl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4d1e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x4d2b
movq %r14, %rdi
leaq 0xc(%rsp), %rdx
callq 0x8528
movq 0xb0(%rsp), %rdx
addq %rbp, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4d52
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4d5a
movq %rbx, %rdi
callq 0x7fd4
incq %r12
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rax
subq %rdx, %rax
sarq $0x2, %rax
addq $0x8, %rbp
addq $0x4, %r13
cmpq %r12, %rax
ja 0x4cd1
movq 0x88(%rsp), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4ebc
leaq 0x50(%rsp), %rsi
leaq 0x110(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x4796
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
movq 0x118(%rsp), %rcx
subq 0x110(%rsp), %rcx
cmpq %rcx, %rax
jne 0x5072
sarq $0x2, %rax
movq 0x98(%rsp), %rcx
subq 0x90(%rsp), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x5072
movq 0x50(%rsp), %rax
cmpq %rax, 0x58(%rsp)
je 0x4ebc
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
xorl %ebp, %ebp
movl (%rax,%rbp,4), %eax
addl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x4e2d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x4e38
movq %r15, %rdi
movq %r12, %rdx
callq 0x8528
movq 0x110(%rsp), %rax
movl (%rax,%rbp,4), %eax
addl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4e61
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x4e6c
movq %r14, %rdi
movq %r12, %rdx
callq 0x8528
movq 0x90(%rsp), %rdx
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4e93
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4e9b
movq %rbx, %rdi
callq 0x7fd4
incq %rbp
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
addq $0x8, %r13
cmpq %rbp, %rcx
ja 0x4e0c
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4ed9
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x4ef6
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x4f13
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x4f30
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x4f4d
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x4f6a
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x4f87
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x4fa4
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4fbb
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x4fd5
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x4fec
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5003
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5cb9(%rip), %rdi      # 0xacd5
leaq 0x5552(%rip), %rsi      # 0xa575
leaq 0x5ce8(%rip), %rcx      # 0xad12
movl $0x436, %edx            # imm = 0x436
callq 0x20a0
leaq 0x5d6d(%rip), %rdi      # 0xada8
leaq 0x5533(%rip), %rsi      # 0xa575
leaq 0x5cc9(%rip), %rcx      # 0xad12
movl $0x441, %edx            # imm = 0x441
callq 0x20a0
leaq 0x5d8b(%rip), %rdi      # 0xade5
leaq 0x5514(%rip), %rsi      # 0xa575
leaq 0x5caa(%rip), %rcx      # 0xad12
movl $0x44c, %edx            # imm = 0x44C
callq 0x20a0
leaq 0x5da9(%rip), %rdi      # 0xae22
leaq 0x54f5(%rip), %rsi      # 0xa575
leaq 0x5c8b(%rip), %rcx      # 0xad12
movl $0x458, %edx            # imm = 0x458
callq 0x20a0
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
jmp 0x50a1
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x50c1
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x50de
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x50fb
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x5118
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x5135
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x5152
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x516f
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x518c
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x51a3
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x51bd
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x51d4
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x51eb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
nop