// File: /workspace/github_cpp_makefile_star2_O2/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 0xe2ca(%rip), %r14d     # 0x13648
movl 0xde4b(%rip), %r15d     # 0x131d0
movl 0xe2c0(%rip), %r12d     # 0x1364c
movl 0xe2bd(%rip), %r13d     # 0x13650
leaq 0x9e56(%rip), %rsi      # 0xf1f0
leaq -0x80(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x2d10
leal (%r13,%r15,2), %ecx
leal (%r12,%r15,2), %edx
leal (%r14,%r15,2), %esi
leaq -0x230(%rbp), %rdi
leaq -0x80(%rbp), %r8
callq 0x5d40
leaq -0x80(%rbp), %rdi
callq 0x2100
movl $0x90, %edi
callq 0x21e0
movq %rax, %r14
leaq -0x230(%rbp), %rsi
movq %rax, %rdi
callq 0x5fa8
movq %r14, (%rbx)
movl 0xe252(%rip), %r14d     # 0x13648
movl 0xddd3(%rip), %r15d     # 0x131d0
movl 0xe248(%rip), %r12d     # 0x1364c
movl 0xe245(%rip), %r13d     # 0x13650
leaq 0x9de3(%rip), %rsi      # 0xf1f5
leaq -0x60(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x2d10
leal (%r13,%r15,2), %ecx
leal (%r12,%r15,2), %edx
leal (%r14,%r15,2), %esi
leaq -0x110(%rbp), %rdi
leaq -0x60(%rbp), %r8
callq 0x62b4
leaq -0x60(%rbp), %rdi
callq 0x2100
pushq $0x50
popq %rdi
callq 0x21e0
movq %rax, %r14
leaq -0x110(%rbp), %rsi
movq %rax, %rdi
callq 0x646c
movq %r14, 0x8(%rbx)
movq 0xe1b3(%rip), %r15      # 0x13620
movq 0xe1a4(%rip), %rcx      # 0x13618
movq %r15, %rax
movq %rcx, %r13
subq %rcx, %rax
movq %rax, %rdi
sarq $0x2, %rdi
testq %rax, %rax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
xorl %eax, %eax
leaq -0xc0(%rbp), %r14
xorl %r12d, %r12d
movq %r13, %rsi
movq %rbx, -0x40(%rbp)
subq %rsi, %r15
sarq $0x5, %r15
cmpq %r12, %r15
jbe 0x555b
movq %r12, -0x38(%rbp)
movl 0xe183(%rip), %r15d     # 0x13648
movl 0xdd04(%rip), %r12d     # 0x131d0
movl 0xe17a(%rip), %ebx      # 0x1364c
movl 0xe177(%rip), %r13d     # 0x13650
movq %rax, -0x30(%rbp)
addq %rax, %rsi
movq %r14, %rdi
callq 0x2270
leal (%r13,%r12,2), %ecx
leal (%rbx,%r12,2), %edx
leal (%r15,%r12,2), %esi
leaq -0x1a0(%rbp), %r15
movq %r15, %rdi
movq %r14, %r8
callq 0x62b4
movq %r14, %rdi
callq 0x2100
pushq $0x50
popq %rdi
callq 0x21e0
movq -0x40(%rbp), %rbx
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x646c
movq 0x10(%rbx), %rax
movq -0x38(%rbp), %r12
movq %r13, (%rax,%r12,8)
movq %r15, %rdi
callq 0x65b0
incq %r12
movq 0xe0d9(%rip), %r15      # 0x13620
movq 0xe0ca(%rip), %rsi      # 0x13618
movq -0x30(%rbp), %rax
addq $0x20, %rax
jmp 0x54aa
movq 0xe0d6(%rip), %r15      # 0x13638
movq 0xe0c7(%rip), %rcx      # 0x13630
movq %r15, %rax
movq %rcx, %r13
subq %rcx, %rax
movq %rax, %rdi
sarq $0x2, %rdi
testq %rax, %rax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
xorl %eax, %eax
leaq -0xa0(%rbp), %r14
xorl %r12d, %r12d
movq %r13, %rsi
subq %rsi, %r15
sarq $0x5, %r15
cmpq %r12, %r15
jbe 0x5650
movq %r12, -0x38(%rbp)
movl 0xe092(%rip), %r15d     # 0x13648
movl 0xdc13(%rip), %r13d     # 0x131d0
movl 0xe089(%rip), %ebx      # 0x1364c
movl 0xe086(%rip), %r12d     # 0x13650
movq %rax, -0x30(%rbp)
addq %rax, %rsi
movq %r14, %rdi
callq 0x2270
leal (%r12,%r13,2), %ecx
leal (%rbx,%r13,2), %edx
leal (%r15,%r13,2), %esi
leaq -0x1a0(%rbp), %r15
movq %r15, %rdi
movq %r14, %r8
callq 0x5d40
movq %r14, %rdi
callq 0x2100
movl $0x90, %edi
callq 0x21e0
movq -0x40(%rbp), %rbx
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x5fa8
movq 0x18(%rbx), %rax
movq -0x38(%rbp), %rcx
movq %r12, (%rax,%rcx,8)
movq %rcx, %r12
movq %r15, %rdi
callq 0x61cc
incq %r12
movq 0xdffc(%rip), %r15      # 0x13638
movq 0xdfed(%rip), %rsi      # 0x13630
movq -0x30(%rbp), %rax
addq $0x20, %rax
jmp 0x559b
movslq 0xdff1(%rip), %rax      # 0x13648
movslq 0xdb72(%rip), %r14      # 0x131d0
leaq (%rax,%r14,2), %rax
movq %rax, %rdi
shlq $0x3, %rdi
movq %rax, -0x30(%rbp)
testl %eax, %eax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
addq %r14, %r14
movq %rax, 0x88(%rbx)
movslq %r14d, %rax
addl 0xdfbd(%rip), %r14d     # 0x1364c
movslq %r14d, %r12
leaq (,%r12,8), %rdx
movslq 0xdfaf(%rip), %rcx      # 0x13650
addq %rax, %rcx
movq %rcx, %r15
shlq $0x2, %r15
testl %ecx, %ecx
pushq $-0x1
popq %rax
cmovsq %rax, %r15
xorl %r13d, %r13d
testl %r12d, %r12d
cmovsq %rax, %rdx
movq %rdx, -0x38(%rbp)
cmovlel %r13d, %r12d
movq -0x30(%rbp), %rcx
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movq %rax, -0x30(%rbp)
cmpq -0x30(%rbp), %r13
je 0x571b
movq -0x38(%rbp), %rdi
callq 0x2030
movq 0x88(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x5716
movq %r15, %rdi
callq 0x2030
movq 0x88(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
jmp 0x56f5
incq %r13
jmp 0x56d8
leaq -0x110(%rbp), %rdi
callq 0x65b0
leaq -0x230(%rbp), %rdi
callq 0x61cc
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r14, %rdi
callq 0x21f0
jmp 0x580d
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2100
jmp 0x5819
jmp 0x5780
movq %rax, %rbx
movl $0x90, %esi
movq %r14, %rdi
callq 0x21f0
jmp 0x5819
movq %rax, %rbx
jmp 0x5819
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2100
jmp 0x5825
movq %rax, %rbx
jmp 0x5825
jmp 0x580a
jmp 0x580a
movq %rax, %rbx
movl $0x90, %esi
movq %r12, %rdi
callq 0x21f0
jmp 0x57ba
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x61cc
jmp 0x580d
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
jmp 0x5801
jmp 0x580a
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r13, %rdi
callq 0x21f0
jmp 0x57e9
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x65b0
jmp 0x580d
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x2100
jmp 0x580d
jmp 0x580a
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x65b0
leaq -0x230(%rbp), %rdi
callq 0x61cc
movq %rbx, %rdi
callq 0x2320
nop