// File: /workspace/github_cpp_makefile_star2_O1/suhasjains[P]AMR-Solver/src/octreegrid.cpp
// Function: myOctree::set_root_neighbours()
void set_root_neighbours() {

	create_list_of_root_nodes();

	for (std::list<Octree*>::iterator i = root_nodes.begin(), end = root_nodes.end(); i != end; ++i) {

		double xmax = (*i)->x_max;			
		double ymax = (*i)->y_max;			
		double zmax = (*i)->z_max;			
		double xmin = (*i)->x_min;			
		double ymin = (*i)->y_min;			
		double zmin = (*i)->z_min;

		for (std::list<Octree*>::iterator j = root_nodes.begin(), end = root_nodes.end(); j != end; ++j) {
			/*change it to xmax_nbr*/
			double x_max = (*j)->x_max;			
			double y_max = (*j)->y_max;			
			double z_max = (*j)->z_max;			
			double x_min = (*j)->x_min;			
			double y_min = (*j)->y_min;			
			double z_min = (*j)->z_min;
	
		//	if(xmax==x_min&&ymax==y_max&&zmax==z_max)
		//		(*i)->east = (*j);	

		//	if(xmin==x_max&&ymax==y_max&&zmax==z_max)
		//		(*i)->west = (*j);	
		//	
		//	if(xmax==x_max&&ymax==y_min&&zmax==z_max)
		//		(*i)->north = (*j);	
		//		
		//	if(xmax==x_max&&ymin==y_max&&zmax==z_max)
		//		(*i)->south = (*j);	
		//	
		//	if(xmax==x_max&&ymax==y_max&&zmax==z_min)
		//		(*i)->top = (*j);	
		//	
		//	if(xmax==x_max&&ymax==y_max&&zmin==z_max)
		//		(*i)->bottom = (*j);	
			if(xmax==x_min&&ymax==y_max&&zmax==z_max)
				(*i)->neighbour[XDIR][RIGHT] = (*j);	

			if(xmin==x_max&&ymax==y_max&&zmax==z_max)
				(*i)->neighbour[XDIR][LEFT] = (*j);	
			
			if(xmax==x_max&&ymax==y_min&&zmax==z_max)
				(*i)->neighbour[YDIR][RIGHT] = (*j);	
				
			if(xmax==x_max&&ymin==y_max&&zmax==z_max)
				(*i)->neighbour[YDIR][LEFT] = (*j);	
			
			if(xmax==x_max&&ymax==y_max&&zmax==z_min)
				(*i)->neighbour[ZDIR][RIGHT] = (*j);	
			
			if(xmax==x_max&&ymax==y_max&&zmin==z_max)
				(*i)->neighbour[ZDIR][LEFT] = (*j);	
				
				
		}			
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x2f9c
movq 0x11df7(%rip), %rax     # 0x15238
leaq 0x11df0(%rip), %rcx     # 0x15238
cmpq %rcx, %rax
je 0x35ab
movq %rax, %rdx
movq 0x10(%rdx), %rsi
movsd 0x68(%rsi), %xmm0
movsd 0x70(%rsi), %xmm1
movsd 0x80(%rsi), %xmm2
movsd 0x90(%rsi), %xmm3
movsd 0x78(%rsi), %xmm4
movsd 0x88(%rsi), %xmm5
movq %rax, %rsi
movq 0x10(%rsi), %rdi
movsd 0x70(%rdi), %xmm8
movsd 0x78(%rdi), %xmm10
movsd 0x80(%rdi), %xmm9
movsd 0x90(%rdi), %xmm6
movsd 0x88(%rdi), %xmm7
ucomisd 0x68(%rdi), %xmm1
jne 0x34cd
jp 0x34cd
ucomisd %xmm9, %xmm2
jne 0x34cd
jp 0x34cd
ucomisd %xmm6, %xmm3
jne 0x34cd
jp 0x34cd
movq 0x10(%rdx), %r8
movq %rdi, 0x8(%r8)
ucomisd %xmm8, %xmm0
jne 0x34f3
jp 0x34f3
ucomisd %xmm9, %xmm2
jne 0x34f3
jp 0x34f3
ucomisd %xmm6, %xmm3
jne 0x34f3
jp 0x34f3
movq 0x10(%rsi), %rdi
movq 0x10(%rdx), %r8
movq %rdi, 0x10(%r8)
ucomisd %xmm8, %xmm1
jne 0x3519
jp 0x3519
ucomisd %xmm10, %xmm2
jne 0x3519
jp 0x3519
ucomisd %xmm6, %xmm3
jne 0x3519
jp 0x3519
movq 0x10(%rsi), %rdi
movq 0x10(%rdx), %r8
movq %rdi, 0x18(%r8)
ucomisd %xmm8, %xmm1
jne 0x353f
jp 0x353f
ucomisd %xmm9, %xmm4
jne 0x353f
jp 0x353f
ucomisd %xmm6, %xmm3
jne 0x353f
jp 0x353f
movq 0x10(%rsi), %rdi
movq 0x10(%rdx), %r8
movq %rdi, 0x20(%r8)
cmpeqpd %xmm2, %xmm9
cmpeqpd %xmm1, %xmm8
andpd %xmm9, %xmm8
movd %xmm8, %edi
testb $0x1, %dil
je 0x356f
ucomisd %xmm7, %xmm3
jne 0x356f
jp 0x356f
movq 0x10(%rsi), %r8
movq 0x10(%rdx), %r9
movq %r8, 0x28(%r9)
ucomisd %xmm6, %xmm5
setnp %r8b
sete %r9b
andb %r8b, %r9b
andb %r9b, %dil
cmpb $0x1, %dil
jne 0x3593
movq 0x10(%rsi), %rdi
movq 0x10(%rdx), %r8
movq %rdi, 0x30(%r8)
movq (%rsi), %rsi
cmpq %rcx, %rsi
jne 0x3482
movq (%rdx), %rdx
cmpq %rcx, %rdx
jne 0x3454
popq %rbp
retq