// File: suhasjains[P]AMR-Solver/src/ghost.cpp
// Function: amrsolver::prolongate_for_multilevel_ghost_exchange_at(myOctree::Octree*, myOctree::Octree*, int, int, int, int, int, int, int, int, int, int)
void prolongate_for_multilevel_ghost_exchange_at(Octree* node, Octree* par_neigh, int l, int i, int j, int k, int iv, int jv, int kv, int loc_x, int loc_y, int loc_z) {

	Block* b =node->get_block_data(); 

	if(loc_x==1) {
    		if(loc_y==1) {
                  	if(loc_z==1) {
                       		prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,b->iNx/2,b->iNy/2,b->iNz/2);
      	           	}
         		else if(loc_z==0) {
                         	prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,b->iNx/2,b->iNy/2,0);
                 	}
          	}
                else if(loc_y==0) {
                	if(loc_z==1) {
                       		prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,b->iNx/2,0,b->iNz/2);
                   	}
                 	else if(loc_z==0) {
                        	prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,b->iNx/2,0,0);
                    	}
      		}
        }
	if(loc_x==0) {
            	if(loc_y==1) {
               		if(loc_z==1) {
                    		prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,0,b->iNy/2,b->iNz/2);
                   	}
          		else if(loc_z==0) {
                        	prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,0,b->iNy/2,0);
                  	}
            	}
    		else if(loc_y==0) {
         		if(loc_z==1) {
          			prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,0,0,b->iNz/2);
            		}
           		else if(loc_z==0) {
                  		prolongate_multilevel_ghost_exchange_for_child(node, par_neigh,l,i,j,k,iv, jv, kv,0,0,0);
           		}
    		}
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movl %ecx, -0x38(%rbp)
movl %r8d, -0x3c(%rbp)
movl %r9d, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6de0
movq %rax, -0x48(%rbp)
cmpl $0x1, 0x28(%rbp)
jne 0x11289
cmpl $0x1, 0x30(%rbp)
jne 0x11190
cmpl $0x1, 0x38(%rbp)
jne 0x1110d
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %r15d
movl 0x18(%rbp), %r14d
movl 0x20(%rbp), %ebx
leaq 0x15638(%rip), %rax     # 0x266e8
movl (%rax), %eax
movl $0x2, %r10d
cltd
idivl %r10d
movl %eax, %r11d
leaq 0x15626(%rip), %rax     # 0x266ec
movl (%rax), %eax
movl $0x2, %r10d
cltd
idivl %r10d
movl %eax, %r10d
leaq 0x15614(%rip), %rax     # 0x266f0
movl (%rax), %eax
movl $0x2, %r12d
cltd
idivl %r12d
movl -0x4c(%rbp), %edx
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0xecc0
jmp 0x1118b
cmpl $0x0, 0x38(%rbp)
jne 0x11189
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %r14d
movl 0x18(%rbp), %ebx
movl 0x20(%rbp), %r11d
leaq 0x155aa(%rip), %rax     # 0x266e8
movl (%rax), %eax
movl $0x2, %r10d
cltd
idivl %r10d
movl %eax, %r10d
leaq 0x15598(%rip), %rax     # 0x266ec
movl (%rax), %eax
movl $0x2, %r15d
cltd
idivl %r15d
movl -0x50(%rbp), %edx
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
callq 0xecc0
jmp 0x1118b
jmp 0x11287
cmpl $0x0, 0x30(%rbp)
jne 0x11285
cmpl $0x1, 0x38(%rbp)
jne 0x11218
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %r14d
movl 0x18(%rbp), %ebx
movl 0x20(%rbp), %r11d
leaq 0x1551d(%rip), %rax     # 0x266e8
movl (%rax), %eax
movl $0x2, %r10d
cltd
idivl %r10d
movl %eax, %r10d
leaq 0x1550f(%rip), %rax     # 0x266f0
movl (%rax), %eax
movl $0x2, %r15d
cltd
idivl %r15d
movl -0x54(%rbp), %edx
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0xecc0
jmp 0x11283
cmpl $0x0, 0x38(%rbp)
jne 0x11281
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
leaq 0x1549f(%rip), %rax     # 0x266e8
movl (%rax), %eax
movl $0x2, %r14d
cltd
idivl %r14d
movl -0x58(%rbp), %edx
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
callq 0xecc0
jmp 0x11283
jmp 0x11285
jmp 0x11287
jmp 0x11289
cmpl $0x0, 0x28(%rbp)
jne 0x1145b
cmpl $0x1, 0x30(%rbp)
jne 0x1138b
cmpl $0x1, 0x38(%rbp)
jne 0x1131b
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %r14d
movl 0x18(%rbp), %ebx
movl 0x20(%rbp), %r11d
leaq 0x1541e(%rip), %rax     # 0x266ec
movl (%rax), %eax
movl $0x2, %r10d
cltd
idivl %r10d
movl %eax, %r10d
leaq 0x1540c(%rip), %rax     # 0x266f0
movl (%rax), %eax
movl $0x2, %r15d
cltd
idivl %r15d
movl -0x5c(%rbp), %edx
xorl %r15d, %r15d
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0xecc0
jmp 0x11386
cmpl $0x0, 0x38(%rbp)
jne 0x11384
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
leaq 0x153a0(%rip), %rax     # 0x266ec
movl (%rax), %eax
movl $0x2, %r14d
cltd
idivl %r14d
movl -0x60(%rbp), %edx
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
callq 0xecc0
jmp 0x11386
jmp 0x11459
cmpl $0x0, 0x30(%rbp)
jne 0x11457
cmpl $0x1, 0x38(%rbp)
jne 0x11400
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
leaq 0x1532a(%rip), %rax     # 0x266f0
movl (%rax), %eax
movl $0x2, %r14d
cltd
idivl %r14d
movl -0x64(%rbp), %edx
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0xecc0
jmp 0x11455
cmpl $0x0, 0x38(%rbp)
jne 0x11453
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
xorl %ebx, %ebx
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
callq 0xecc0
jmp 0x11455
jmp 0x11457
jmp 0x11459
jmp 0x1145b
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)