// File: jamesliu516[P]amrdg2d/findrefp.cpp
// Function: findrefp(bodygridclass**, bodygridclass*)
void findrefp(OctCell *pp[], OctCell *parent)
{                        		
/*	pp[0]=EastNeighbor(parent);
	pp[1]=NorthNeighbor(pp[0]);
       pp[2]=NorthNeighbor(parent);
	pp[3]=WestNeighbor(pp[2]);
	pp[4]=WestNeighbor(parent);
	pp[5]=SouthNeighbor(pp[4]);
	pp[6]=SouthNeighbor(parent);
	pp[7]=EastNeighbor(pp[6]);
	
	pp[8]=NorthNeighbor(pp[1]);

	pp[9]=WestNeighbor(pp[8]);
	pp[10]=WestNeighbor(pp[9]);
    pp[11]=WestNeighbor(pp[10]);
	pp[12]=WestNeighbor(pp[3]);
	pp[13]=WestNeighbor(pp[4]);
	pp[14]=WestNeighbor(pp[5]);
	pp[15]=SouthNeighbor(pp[14]);
	pp[16]=EastNeighbor(pp[15]);
	pp[17]=EastNeighbor(pp[16]);
	pp[18]=EastNeighbor(pp[17]);
	pp[19]=EastNeighbor(pp[18]);
    pp[20]=NorthNeighbor(pp[19]);
	pp[21]=NorthNeighbor(pp[20]);
	pp[22]=NorthNeighbor(pp[21]);
	pp[23]=NorthNeighbor(pp[22]);  */

	pp[0]=WestNeighbor(parent);
	pp[1]=WestNeighbor(pp[0]);
	pp[2]=WestNeighbor(pp[1]);
	pp[3]=EastNeighbor(parent);
	pp[4]=EastNeighbor(pp[3]);
	pp[5]=EastNeighbor(pp[4]);

	pp[6]=NorthNeighbor(pp[2]);
	pp[7]=NorthNeighbor(pp[6]);
	pp[8]=NorthNeighbor(pp[7]);

	pp[9]=SouthNeighbor(pp[2]);
	pp[10]=SouthNeighbor(pp[9]);
	pp[11]=SouthNeighbor(pp[10]);

	pp[12]=NorthNeighbor(pp[1]);
	pp[13]=NorthNeighbor(pp[12]);
	pp[14]=NorthNeighbor(pp[13]);

	pp[15]=SouthNeighbor(pp[1]);
	pp[16]=SouthNeighbor(pp[15]);
	pp[17]=SouthNeighbor(pp[16]);

	pp[18]=NorthNeighbor(pp[0]);
	pp[19]=NorthNeighbor(pp[18]);
	pp[20]=NorthNeighbor(pp[19]);

	pp[21]=SouthNeighbor(pp[0]);
	pp[22]=SouthNeighbor(pp[21]);
	pp[23]=SouthNeighbor(pp[22]);

	pp[24]=NorthNeighbor(parent);
	pp[25]=NorthNeighbor(pp[24]);
	pp[26]=NorthNeighbor(pp[25]);

	pp[27]=SouthNeighbor(parent);
	pp[28]=SouthNeighbor(pp[27]);
	pp[29]=SouthNeighbor(pp[28]);

	pp[30]=NorthNeighbor(pp[3]);
	pp[31]=NorthNeighbor(pp[30]);
	pp[32]=NorthNeighbor(pp[31]);

	pp[33]=SouthNeighbor(pp[3]);
	pp[34]=SouthNeighbor(pp[33]);
	pp[35]=SouthNeighbor(pp[34]);

	pp[36]=NorthNeighbor(pp[4]);
	pp[37]=NorthNeighbor(pp[36]);
	pp[38]=NorthNeighbor(pp[37]);

	pp[39]=SouthNeighbor(pp[4]);
	pp[40]=SouthNeighbor(pp[39]);
	pp[41]=SouthNeighbor(pp[40]);

	pp[42]=NorthNeighbor(pp[5]);
	pp[43]=NorthNeighbor(pp[42]);
	pp[44]=NorthNeighbor(pp[43]);

	pp[45]=SouthNeighbor(pp[5]);
	pp[46]=SouthNeighbor(pp[45]);
	pp[47]=SouthNeighbor(pp[46]);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x117a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x117a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x117a0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rdi
callq 0x118d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x118d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x118d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x78(%rax)
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x80(%rax)
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x88(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x90(%rax)
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x10(%rsp), %rax
movq 0x98(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x10(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb0(%rax)
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x8(%rsp), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xc0(%rax)
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xc8(%rax)
movq 0x10(%rsp), %rax
movq 0xc8(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xd0(%rax)
movq 0x8(%rsp), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xd8(%rax)
movq 0x10(%rsp), %rax
movq 0xd8(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xe0(%rax)
movq 0x10(%rsp), %rax
movq 0xe0(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xe8(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xf0(%rax)
movq 0x10(%rsp), %rax
movq 0xf0(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xf8(%rax)
movq 0x10(%rsp), %rax
movq 0xf8(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x100(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x108(%rax)
movq 0x10(%rsp), %rax
movq 0x108(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x110(%rax)
movq 0x10(%rsp), %rax
movq 0x110(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x118(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x120(%rax)
movq 0x10(%rsp), %rax
movq 0x120(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x128(%rax)
movq 0x10(%rsp), %rax
movq 0x128(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x130(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x138(%rax)
movq 0x10(%rsp), %rax
movq 0x138(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x10(%rsp), %rax
movq 0x140(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x148(%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x150(%rax)
movq 0x10(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x158(%rax)
movq 0x10(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x11670
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x160(%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x168(%rax)
movq 0x10(%rsp), %rax
movq 0x168(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x170(%rax)
movq 0x10(%rsp), %rax
movq 0x170(%rax), %rdi
callq 0x11a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x178(%rax)
addq $0x18, %rsp
retq
nop