// File: /workspace/github_cpp_makefile_star2_O1/suhasjains[P]AMR-Solver/src/block.cpp
// Function: myOctree::Block::Block()
Block::Block() {
  //		std::cerr << "default constructor of block is working" << std::endl;

        VecField mesh_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, "mesh");
        mesh = new VecField(mesh_field);
	
        Field field_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, "field");
	field = new Field(field_field);
	
	scalarfields = new Field* [scalar_fields.size()];
	for(int i = 0; i<scalar_fields.size() ; i++) {
        	Field field_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, scalar_fields[i]);
	       	scalarfields[i] = new Field(field_field);	
	}       
	
	vectorfields = new VecField* [vector_fields.size()];
	for(int i = 0; i<vector_fields.size() ; i++) {
        	VecField vec_field(iNx+2*pad,iNy+2*pad,iNz+2*pad, vector_fields[i]);
	       	vectorfields[i] = new VecField(vec_field);	
	}       

	//dynamic allocation of domain masking - stored here because it is common for all fields. 
	flag = new Mask** [iNx+2*pad];
	for(int i=0;i<(iNx+2*pad);i++) {
		flag[i] = new Mask* [iNy+2*pad];
 		for(int j=0;j<(iNy+2*pad);j++) {
                  	flag[i][j] = new Mask [iNz+2*pad];
           	}
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movl 0xfa18(%rip), %r14d     # 0x151e0
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
addl %r14d, %r14d
movl 0xfe83(%rip), %r15d     # 0x15660
addl %r14d, %r15d
movl 0xfe75(%rip), %r12d     # 0x1565c
addl %r14d, %r12d
addl 0xfe67(%rip), %r14d     # 0x15658
leaq 0xb9f8(%rip), %rsi      # 0x111f0
leaq 0xb9f5(%rip), %rdx      # 0x111f4
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
callq 0x2e8e
leaq -0x230(%rbp), %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movq %r13, %r8
callq 0x62d0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x5848
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2200
movl $0x90, %edi
callq 0x21f0
movq %rax, %r14
leaq -0x230(%rbp), %rsi
movq %rax, %rdi
callq 0x6568
movq %rbx, -0x38(%rbp)
movq %r14, (%rbx)
movl 0xfde6(%rip), %r15d     # 0x15658
movl 0xf967(%rip), %r12d     # 0x151e0
movl 0xfddc(%rip), %r13d     # 0x1565c
movl 0xfdda(%rip), %ebx      # 0x15660
leaq -0xb0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xb95d(%rip), %rsi      # 0x111f5
leaq 0xb95b(%rip), %rdx      # 0x111fa
leaq -0xc0(%rbp), %rdi
callq 0x2e8e
leal (%rbx,%r12,2), %ecx
leal (%r13,%r12,2), %edx
leal (%r15,%r12,2), %esi
leaq -0x110(%rbp), %rdi
leaq -0xc0(%rbp), %r8
callq 0x68cc
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
movq -0x38(%rbp), %rbx
je 0x58ea
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2200
movl $0x50, %edi
callq 0x21f0
movq %rax, %r14
leaq -0x110(%rbp), %rsi
movq %rax, %rdi
callq 0x6aae
movq %r14, 0x8(%rbx)
movq 0xfd1f(%rip), %rax      # 0x15630
subq 0xfd10(%rip), %rax      # 0x15628
movq %rax, %rcx
sarq $0x2, %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
movq 0xfceb(%rip), %rax      # 0x15628
cmpq %rax, 0xfcec(%rip)      # 0x15630
je 0x5a2c
movl $0x8, %edx
xorl %r13d, %r13d
leaq -0x80(%rbp), %r14
movq %r13, -0x30(%rbp)
movl 0xfcf7(%rip), %r12d     # 0x15658
movl 0xf878(%rip), %r15d     # 0x151e0
movl 0xfcee(%rip), %ebx      # 0x1565c
movl 0xfceb(%rip), %r13d     # 0x15660
leaq -0x70(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movq -0x8(%rax,%rdx), %rsi
movq %rdx, -0x40(%rbp)
movq (%rax,%rdx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x391e
leal (%r13,%r15,2), %ecx
leal (%rbx,%r15,2), %edx
leal (%r12,%r15,2), %esi
leaq -0x1a0(%rbp), %r13
movq %r13, %rdi
movq %r14, %r15
movq %r14, %r8
callq 0x68cc
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %rbx
je 0x59d4
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
movl $0x50, %edi
callq 0x21f0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x6aae
movq %r13, %rdi
movq -0x30(%rbp), %r13
movq 0x10(%rbx), %rax
movq %r12, (%rax,%r13,8)
callq 0x6c20
incq %r13
movq 0xfc26(%rip), %rcx      # 0x15630
movq 0xfc17(%rip), %rax      # 0x15628
subq %rax, %rcx
sarq $0x5, %rcx
movq -0x40(%rbp), %rdx
addq $0x20, %rdx
cmpq %r13, %rcx
movq %r15, %r14
ja 0x5956
movq 0xfc15(%rip), %rax      # 0x15648
subq 0xfc06(%rip), %rax      # 0x15640
movq %rax, %rcx
sarq $0x2, %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
movq 0xfbe1(%rip), %rax      # 0x15640
cmpq %rax, 0xfbe2(%rip)      # 0x15648
je 0x5b4e
movl $0x8, %edx
xorl %r13d, %r13d
leaq -0x60(%rbp), %r14
movq %r13, -0x30(%rbp)
movl 0xfbd5(%rip), %r12d     # 0x15658
movl 0xf756(%rip), %r15d     # 0x151e0
movl 0xfbcc(%rip), %ebx      # 0x1565c
movl 0xfbc9(%rip), %r13d     # 0x15660
leaq -0x50(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq -0x8(%rax,%rdx), %rsi
movq %rdx, -0x40(%rbp)
movq (%rax,%rdx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x391e
leal (%r13,%r15,2), %ecx
leal (%rbx,%r15,2), %edx
leal (%r12,%r15,2), %esi
leaq -0x1a0(%rbp), %r13
movq %r13, %rdi
movq %r14, %r15
movq %r14, %r8
callq 0x62d0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %rbx
je 0x5af6
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2200
movl $0x90, %edi
callq 0x21f0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x6568
movq %r13, %rdi
movq -0x30(%rbp), %r13
movq 0x18(%rbx), %rax
movq %r12, (%rax,%r13,8)
callq 0x67be
incq %r13
movq 0xfb1c(%rip), %rcx      # 0x15648
movq 0xfb0d(%rip), %rax      # 0x15640
subq %rax, %rcx
sarq $0x5, %rcx
movq -0x40(%rbp), %rdx
addq $0x20, %rdx
cmpq %r13, %rcx
movq %r15, %r14
ja 0x5a78
movslq 0xfb03(%rip), %rax      # 0x15658
movslq 0xf684(%rip), %r15      # 0x151e0
leaq (%rax,%r15,2), %r14
movq %r14, %rax
shlq $0x3, %rax
testl %r14d, %r14d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, 0x88(%rbx)
testl %r14d, %r14d
jle 0x5c1a
addq %r15, %r15
movslq 0xfac8(%rip), %rax      # 0x1565c
movslq %r15d, %rcx
addq %rcx, %rax
movq %rax, %rsi
shlq $0x3, %rsi
testl %eax, %eax
movq $-0x1, %rdx
cmovsq %rdx, %rsi
movq %rsi, -0x38(%rbp)
movslq 0xfaa7(%rip), %rsi      # 0x15660
addq %rcx, %rsi
movq %rsi, %r15
shlq $0x2, %r15
testl %esi, %esi
cmovsq %rdx, %r15
movl %r14d, %ecx
movq %rcx, -0x30(%rbp)
movl %eax, %r13d
xorl %r14d, %r14d
movq -0x38(%rbp), %rdi
callq 0x2030
movq 0x88(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
testl %r13d, %r13d
jle 0x5c11
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x2030
movq 0x88(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
cmpq %r12, %r13
jne 0x5bf2
incq %r14
cmpq -0x30(%rbp), %r14
jne 0x5bd6
leaq -0x110(%rbp), %rdi
callq 0x6c20
leaq -0x230(%rbp), %rdi
callq 0x67be
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x50, %esi
movq %r14, %rdi
jmp 0x5d1b
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0x5d54
movq -0xb0(%rbp), %rsi
incq %rsi
jmp 0x5c80
jmp 0x5c8a
movq %rax, %rbx
movl $0x90, %esi
movq %r14, %rdi
callq 0x2200
jmp 0x5d54
movq %rax, %rbx
jmp 0x5d54
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x5d60
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x5d60
jmp 0x5d45
jmp 0x5d45
jmp 0x5d45
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x5d48
movq -0x50(%rbp), %rsi
jmp 0x5d18
movq %rax, %rbx
jmp 0x5cf4
movq %rax, %rbx
movl $0x90, %esi
movq %r12, %rdi
callq 0x2200
leaq -0x1a0(%rbp), %rdi
callq 0x67be
jmp 0x5d48
jmp 0x5d45
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x5d48
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x5d48
movq %rax, %rbx
jmp 0x5d37
movq %rax, %rbx
movl $0x50, %esi
movq %r12, %rdi
callq 0x2200
leaq -0x1a0(%rbp), %rdi
callq 0x6c20
jmp 0x5d48
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x6c20
leaq -0x230(%rbp), %rdi
callq 0x67be
movq %rbx, %rdi
callq 0x2340