// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, -0x98(%rbp)
movl 0x10176(%rip), %edx     # 0x15658
movslq 0xfcf7(%rip), %rax      # 0x151e0
leal (%rax,%rax), %ecx
movl %ecx, %edi
addl %edx, %edi
jle 0x579f
movl 0x1015f(%rip), %r8d     # 0x1565c
leal (%r8,%rcx), %esi
movq %rsi, -0x50(%rbp)
movl 0x10155(%rip), %esi     # 0x15660
addl %esi, %ecx
addl %eax, %esi
leal (%r8,%rax), %r9d
leal (%rax,%rdx), %r10d
leal (%r8,%rax), %r11d
leal (%rax,%rdx), %ebx
leal (%r8,%rax), %r14d
leal (%r8,%rax), %r15d
leal (%r8,%rax), %r12d
addl %eax, %edx
addl %eax, %r8d
movslq %esi, %rsi
movq %rsi, -0xa8(%rbp)
movslq %r11d, %r11
movq %r11, -0x60(%rbp)
movslq %r8d, %r8
movq %r8, -0xa0(%rbp)
movslq %r14d, %r8
movq %r8, -0x90(%rbp)
movslq %r15d, %r8
movq %r8, -0x88(%rbp)
movslq %r9d, %r8
movq %r8, -0x80(%rbp)
movslq %r12d, %r8
movq %r8, -0x78(%rbp)
movslq %ebx, %r8
movq %r8, -0x58(%rbp)
movslq %r10d, %r8
movq %r8, -0x48(%rbp)
movslq %edx, %rdx
movq %rdx, -0x68(%rbp)
movl %edi, %edx
movq %rdx, -0x70(%rbp)
xorl %edi, %edi
cmpl $0x0, -0x50(%rbp)
jle 0x5792
cmpq %rax, %rdi
setl %r9b
cmpq -0x48(%rbp), %rdi
setge %sil
cmpq %rax, %rdi
setl %r8b
cmpq -0x68(%rbp), %rdi
setge %dl
orb %r9b, %sil
movb %sil, -0x2c(%rbp)
orb %r8b, %dl
movb %dl, -0x2e(%rbp)
xorl %r14d, %r14d
testl %ecx, %ecx
jle 0x5785
cmpq -0x58(%rbp), %rdi
setge %r10b
cmpq %rax, %rdi
setl -0x2a(%rbp)
cmpq -0x48(%rbp), %rdi
setge %sil
cmpq %rax, %rdi
setl %r8b
cmpq %rax, %r14
setl %dl
movb %dl, -0x29(%rbp)
movq -0x98(%rbp), %r9
movq 0x88(%r9), %r15
cmpq -0x80(%rbp), %r14
setge %r13b
orb %dl, %sil
leaq (%r15,%rdi,8), %r12
xorl %r9d, %r9d
cmpq -0x90(%rbp), %r14
setl %r9b
movl %r9d, -0x38(%rbp)
xorl %r11d, %r11d
cmpq -0x60(%rbp), %r14
setl %r11b
xorl %ebx, %ebx
cmpq -0x88(%rbp), %r14
setl %bl
cmpq %rax, %r14
setl %dl
cmpq -0x78(%rbp), %r14
setge %r9b
orb %dl, %r10b
orb -0x29(%rbp), %r13b
movb %r13b, -0x2d(%rbp)
movb %sil, -0x29(%rbp)
orb %sil, %r8b
movb %r8b, -0x2b(%rbp)
leal 0x3(,%r11,4), %esi
movl %esi, -0x34(%rbp)
addl %ebx, %ebx
movl %ebx, -0x3c(%rbp)
orb %dl, %r9b
orb %r10b, -0x2a(%rbp)
xorl %r13d, %r13d
cmpq %rax, %r13
jge 0x56cf
testb %r9b, %r9b
je 0x568d
movq (%r15,%rdi,8), %r8
movq (%r8,%r14,8), %r8
movl $0x0, (%r8,%r13,4)
movl %r10d, %r8d
cmpb $0x0, -0x2e(%rbp)
je 0x56aa
movq (%r15,%rdi,8), %r8
movq (%r8,%r14,8), %r8
movl $0x0, (%r8,%r13,4)
movb -0x2a(%rbp), %r8b
testb $0x1, %r8b
jne 0x5779
movl $0x6, %r8d
movq %r12, %r11
cmpq -0xa0(%rbp), %r14
jl 0x576e
jmp 0x5779
cmpq -0xa8(%rbp), %r13
jge 0x56ed
cmpq %rax, %rdi
jge 0x5738
cmpq %rax, %r14
movq %r12, %r11
cmovlq %r12, %r11
movl -0x3c(%rbp), %r8d
jmp 0x5765
cmpb $0x0, -0x2d(%rbp)
je 0x5703
movq (%r15,%rdi,8), %r8
movq (%r8,%r14,8), %r8
movl $0x0, (%r8,%r13,4)
movb -0x29(%rbp), %r8b
cmpb $0x0, -0x2c(%rbp)
je 0x5721
movq (%r15,%rdi,8), %r8
movq (%r8,%r14,8), %r8
movl $0x0, (%r8,%r13,4)
movb -0x2b(%rbp), %r8b
testb $0x1, %r8b
jne 0x5779
movl $0x5, %r8d
movq %r12, %r11
cmpq -0x60(%rbp), %r14
jl 0x576e
jmp 0x5779
cmpq -0x58(%rbp), %rdi
jge 0x5757
cmpq %rax, %r14
movq %r12, %r11
cmovlq %r12, %r11
movl -0x34(%rbp), %r8d
movl $0x4, %edx
cmovll %edx, %r8d
jmp 0x576e
cmpq %rax, %r14
movq %r12, %r11
cmovlq %r12, %r11
movl -0x38(%rbp), %r8d
movl $0x0, %esi
cmovll %esi, %r8d
movq (%r11), %r11
movq (%r11,%r14,8), %r11
movl %r8d, (%r11,%r13,4)
incq %r13
cmpq %r13, %rcx
jne 0x5673
incq %r14
cmpq -0x50(%rbp), %r14
jne 0x55c0
incq %rdi
cmpq -0x70(%rbp), %rdi
jne 0x5589
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq