// File: /workspace/github_cpp_makefile_star2_O3/suhasjains[P]AMR-Solver/src/block.cpp
// Function: myOctree::Block::set_domain_masking()
void Block::set_domain_masking() {

	//Domain masking
	for(int i=0;i<(this->iNx+2*pad);i++) {
 		for(int j=0;j<(this->iNy+2*pad);j++) {
 			for(int k=0;k<(this->iNz+2*pad);k++) {
		
				if(k<pad) {
					if(j<pad) {
						this->flag[i][j][k] = CORNER;
					}
					else if(j>=(this->iNy+pad)) {
						this->flag[i][j][k] = CORNER;
					}	
					if(i<pad) {
						this->flag[i][j][k] = CORNER;
					}
					else if(i>=(this->iNx+pad)) {
						this->flag[i][j][k] = CORNER;
					}
					if(i>=pad && i<(this->iNx+pad) && j>=pad && j<(this->iNy+pad)) {
						this->flag[i][j][k] = BOTTOM_GHOST;
					}	
				}
				else if(k>=(this->iNz+pad)) {
					if(j<pad) {
						this->flag[i][j][k] = CORNER;
					}
					else if(j>=(this->iNy+pad)) {
						this->flag[i][j][k] = CORNER;
					}	
					if(i<pad) {
						this->flag[i][j][k] = CORNER;
					}
					else if(i>=(this->iNx+pad)) {
						this->flag[i][j][k] = CORNER;
					}	
					if(i>=pad && i<(this->iNx+pad) && j>=pad && j<(this->iNy+pad)) {
						this->flag[i][j][k] = TOP_GHOST;
					}	
				}
				else if (k>=pad && k<(this->iNz+pad)) {
					if(i<pad) {
						if(j<pad) {
							this->flag[i][j][k] = CORNER;
						}
						else if(j>=(this->iNy+pad)) {
							this->flag[i][j][k] = CORNER;
						}
						else if(j>=pad && j<(this->iNy+pad)) {
							this->flag[i][j][k] = WEST_GHOST;	
						}	
					}
					else if(i>=(this->iNx+pad)) {
						if(j<pad) {
							this->flag[i][j][k] = CORNER;
						}
						else if(j>=(this->iNy+pad)) {
							this->flag[i][j][k] = CORNER;
						}
						else if(j>=pad && j<(this->iNy+pad)) {
							this->flag[i][j][k] = EAST_GHOST;	
						}	
					}
					else if(i>=pad && i<(this->iNx+pad)) {
						if(j<pad) {
							this->flag[i][j][k] = SOUTH_GHOST;	
						}
						else if(j>=(this->iNy+pad)) {
							this->flag[i][j][k] = NORTH_GHOST;	
						}	
						else if(j>=pad && j<(this->iNy+pad)) {
							this->flag[i][j][k] = DOMAIN;	
						}	
					}
				}	
			}
		}
	}	
}

// Assembly:
movl 0xffa5(%rip), %r9d      # 0x15668
movslq 0xfb1e(%rip), %rax      # 0x151e8
leal (%rax,%rax), %ecx
movl %ecx, %r10d
addl %r9d, %r10d
jle 0x5884
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0xff7f(%rip), %r8d      # 0x1566c
leal (%r8,%rcx), %edx
movl 0xff79(%rip), %esi      # 0x15670
addl %esi, %ecx
addl %eax, %esi
addl %eax, %r8d
addl %eax, %r9d
movslq %esi, %rsi
movslq %r8d, %r8
movslq %r9d, %r9
movl %r10d, %r10d
movq %r10, -0x30(%rbp)
xorl %r11d, %r11d
testl %edx, %edx
jle 0x586d
xorl %ebx, %ebx
testl %ecx, %ecx
jle 0x5861
cmpq %r9, %r11
setl %r14b
cmpq %rax, %rbx
setge %r10b
movq 0x88(%rdi), %r15
cmpq %r8, %rbx
setl %r12b
andb %r10b, %r12b
andb %r12b, %r14b
xorl %r13d, %r13d
cmpq %rax, %r13
jge 0x5796
testb %r12b, %r12b
jne 0x5765
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x0, (%r10,%r13,4)
cmpq %rax, %r11
jl 0x57d6
cmpq %r9, %r11
jl 0x577f
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x0, (%r10,%r13,4)
testb %r14b, %r14b
je 0x57e6
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x6, (%r10,%r13,4)
jmp 0x57e6
cmpq %rsi, %r13
jge 0x57bc
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
cmpq %rax, %r11
jge 0x57f4
cmpq %rax, %rbx
jl 0x57de
cmpq %r8, %rbx
jge 0x57de
movl $0x2, (%r10,%r13,4)
jmp 0x57e6
testb %r12b, %r12b
jne 0x57d1
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x0, (%r10,%r13,4)
cmpq %rax, %r11
jge 0x5808
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x0, (%r10,%r13,4)
incq %r13
cmpq %r13, %rcx
jne 0x574b
jmp 0x5861
cmpq %r9, %r11
jge 0x5834
cmpq %rax, %rbx
jge 0x5848
movl $0x4, (%r10,%r13,4)
jmp 0x57e6
cmpq %r9, %r11
jl 0x581d
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x0, (%r10,%r13,4)
testb %r14b, %r14b
je 0x57e6
movq (%r15,%r11,8), %r10
movq (%r10,%rbx,8), %r10
movl $0x5, (%r10,%r13,4)
jmp 0x57e6
cmpq %rax, %rbx
jl 0x57de
cmpq %r8, %rbx
jge 0x57de
movl $0x1, (%r10,%r13,4)
jmp 0x57e6
cmpq %r8, %rbx
jge 0x5857
movl $0x7, (%r10,%r13,4)
jmp 0x57e6
movl $0x3, (%r10,%r13,4)
jmp 0x57e6
incq %rbx
cmpq %rdx, %rbx
jne 0x571e
incq %r11
cmpq -0x30(%rbp), %r11
jne 0x5714
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop