// File: /workspace/github_cpp_makefile_star2_O1/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::get_single_value(int, int) const
Treal HierarchicalBlockSparseMatrix<Treal>::get_single_value(int row, int col) const {


			if ( empty() )
			  throw std::runtime_error("Error in HierarchicalBlockSparseMatrix<Treal>::get_single_value: empty matrix occured.");


			if(!(0 <= row && row < nRows_orig && 0 <= col && col < nCols_orig ))
			  throw std::runtime_error("Error in HierarchicalBlockSparseMatrix<Treal>::get_single_value: bad index at highest level.");




			if(!(0 <= row && row < nRows && 0 <= col && col < nCols ) ){
				throw std::runtime_error("Error in HierarchicalBlockSparseMatrix<Treal>::get_single_value: bad index.");
			}

			if(lowest_level()){
				return submatrix[col*nRows + row];
			}


			int offset = nRows/2;

			// this part goes to child0
			if(row < offset && col < offset){
				if(children[0] == NULL) return 0.0;
				else return children[0]->get_single_value(row,col);
			}

			// this part goes to child1
			if(offset <= row && row < nRows && col < offset){
				if(children[1] == NULL) return 0.0;
				else return children[1]->get_single_value(row-offset,col);
			}

			// this part goes to child2
			if(row < offset && offset <= col && col < nCols){
				if(children[2] == NULL) return 0.0;
				else return children[2]->get_single_value(row,col-offset);
			}

			// this part goes to child3
			if(offset <= row && row < nRows && offset <= col && col < nCols){
				if(children[3] == NULL) return 0.0;
				else return children[3]->get_single_value(row-offset,col-offset);
			}

			throw std::runtime_error("Error in HierarchicalBlockSparseMatrix<Treal>::get_single_value: reached impossible point.");
			return 0.0;

		}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x4338
testb %al, %al
jne 0x827d
testl %r14d, %r14d
js 0x8241
testl %ebp, %ebp
js 0x8241
cmpl %r14d, 0x8(%rbx)
jle 0x8241
cmpl %ebp, 0xc(%rbx)
jle 0x8241
cmpl %r14d, (%rbx)
jle 0x825f
cmpl %ebp, 0x4(%rbx)
jle 0x825f
movq %rbx, %rdi
callq 0x6b36
testb %al, %al
jne 0x8225
movl (%rbx), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
cmpl %eax, %r14d
jge 0x81a6
cmpl %eax, %ebp
jge 0x81a6
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x812e
jmp 0x8239
cmpl %eax, %ebp
setge %dil
movl %r14d, %esi
subl %eax, %esi
setge %r8b
cmpl %r14d, %ecx
setg %dl
andb %r8b, %dl
movl %edx, %ecx
xorb $0x1, %cl
orb %dil, %cl
je 0x81ec
movl %r14d, %ecx
movl 0x4(%rbx), %esi
subl %eax, %ecx
jge 0x81fd
movl %ebp, %edi
subl %eax, %edi
jl 0x81fd
cmpl %ebp, %esi
jle 0x81fd
movq 0x48(%rbx), %rbx
testq %rbx, %rbx
je 0x8239
movl %edi, %ebp
jmp 0x812e
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
je 0x8239
movl %esi, %r14d
jmp 0x812e
movl %ebp, %edi
subl %eax, %edi
setge %al
andb %al, %dl
cmpb $0x1, %dl
jne 0x82af
cmpl %ebp, %esi
jle 0x82af
movq 0x58(%rbx), %rbx
testq %rbx, %rbx
je 0x8239
movl %ecx, %r14d
jmp 0x81e5
imull (%rbx), %ebp
addl %r14d, %ebp
movslq %ebp, %rax
movq 0x70(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
jmp 0x823c
xorps %xmm0, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x297c(%rip), %rsi      # 0xabd1
movq %rax, %rdi
callq 0x2060
jmp 0x8299
movl $0x10, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x29bb(%rip), %rsi      # 0xac2e
movq %rax, %rdi
callq 0x2060
jmp 0x8299
movl $0x10, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x28e9(%rip), %rsi      # 0xab7a
movq %rax, %rdi
callq 0x2060
movq 0x5d50(%rip), %rsi      # 0xdff0
movq 0x5d19(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x21a0
movl $0x10, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x29b7(%rip), %rsi      # 0xac7a
movq %rax, %rdi
callq 0x2060
jmp 0x8299
jmp 0x82d3
jmp 0x82d3
jmp 0x82d3
movq %rax, %r14
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
callq 0x21c0