// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
pushq $0x2
popq %r15
movq %rbx, %rdi
callq 0x39bc
testb %al, %al
jne 0x6e9c
testl %r14d, %r14d
js 0x6e64
testl %ebp, %ebp
js 0x6e64
cmpl %r14d, 0x8(%rbx)
jle 0x6e64
cmpl %ebp, 0xc(%rbx)
jle 0x6e64
cmpl %r14d, (%rbx)
jle 0x6e80
cmpl %ebp, 0x4(%rbx)
jle 0x6e80
movq %rbx, %rdi
callq 0x5a0a
testb %al, %al
jne 0x6e42
movl (%rbx), %ecx
movl %ecx, %eax
cltd
idivl %r15d
cmpl %eax, %r14d
jge 0x6dca
cmpl %eax, %ebp
jge 0x6dca
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
jne 0x6d55
jmp 0x6e56
movl %r14d, %edx
subl %eax, %edx
setge %dil
cmpl %r14d, %ecx
setg %sil
andb %dil, %sil
cmpl %eax, %ebp
jge 0x6de6
testb %sil, %sil
jne 0x6e0f
movl %ebp, %ecx
subl %eax, %ecx
setge %r8b
movl 0x4(%rbx), %edi
cmpl %eax, %r14d
jge 0x6e1a
testb %r8b, %r8b
je 0x6e1a
cmpl %ebp, %edi
jle 0x6e1a
movq 0x48(%rbx), %rbx
testq %rbx, %rbx
je 0x6e56
subl %eax, %ebp
jmp 0x6d55
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
jne 0x6e3a
jmp 0x6e56
andb %r8b, %sil
cmpb $0x1, %sil
jne 0x6ecc
cmpl %ebp, %edi
jle 0x6ecc
movq 0x58(%rbx), %rbx
testq %rbx, %rbx
je 0x6e56
movl %ecx, %ebp
movl %edx, %r14d
jmp 0x6d55
imull (%rbx), %ebp
addl %r14d, %ebp
movslq %ebp, %rax
movq 0x70(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
jmp 0x6e59
xorps %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %rbx
leaq 0x1d73(%rip), %rsi      # 0x8be9
movq %rax, %rdi
callq 0x2050
jmp 0x6eb6
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %rbx
leaq 0x1db4(%rip), %rsi      # 0x8c46
movq %rax, %rdi
callq 0x2050
jmp 0x6eb6
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %rbx
leaq 0x1ce4(%rip), %rsi      # 0x8b92
movq %rax, %rdi
callq 0x2050
movq 0x6133(%rip), %rsi      # 0xcff0
movq 0x60fc(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x21d0
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %rbx
leaq 0x1db4(%rip), %rsi      # 0x8c92
movq %rax, %rdi
callq 0x2050
jmp 0x6eb6
jmp 0x6eee
jmp 0x6eee
jmp 0x6eee
movq %rax, %r14
movq %rbx, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x21f0
nop