// File: suhasjains[P]AMR-Solver/src/octree.cpp
// Function: myOctree::Octree::Octree(myOctree::Octree const&)
Octree::Octree(const Octree &obj) {
    
//	std::cerr << " copy constructor of octree is working " << std::endl;

  	x_min = obj.x_min;
    	y_min = obj.y_min;
    	z_min = obj.z_min;
    	x_max = obj.x_max;
    	y_max = obj.y_max;
    	z_max = obj.z_max;
    	x_centre = obj.x_centre;
    	y_centre = obj.y_centre;
    	z_centre = obj.z_centre;
    	level = obj.level;

    	for(int i=0; i<2; i++) {
        	for(int j=0; j<2; j++) {
            		for(int k=0; k<2; k++)
                		children[i][j][k] = obj.children[i][j][k];
        	}
    	}

    	parent = obj.parent;
    	block_data = new Block(*(obj.block_data));
	setToRefine = obj.setToRefine;
	setToCoarsen = obj.setToCoarsen;

	number = obj.number;

	//neighbors
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			neighbour[m][n] = obj.neighbour[m][n];
		}
	}	
	
	//boundary conditions
	for(int m=0;m<3;m++) {
		for(int n=0;n<2;n++) {
			bc[m][n] = obj.bc[m][n];
		}
	}	
    	

	nodes.push_back(this);
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rcx
movsd 0x68(%rcx), %xmm0
movsd %xmm0, 0x68(%rax)
movq -0x10(%rbp), %rcx
movsd 0x78(%rcx), %xmm0
movsd %xmm0, 0x78(%rax)
movq -0x10(%rbp), %rcx
movsd 0x88(%rcx), %xmm0
movsd %xmm0, 0x88(%rax)
movq -0x10(%rbp), %rcx
movsd 0x70(%rcx), %xmm0
movsd %xmm0, 0x70(%rax)
movq -0x10(%rbp), %rcx
movsd 0x80(%rcx), %xmm0
movsd %xmm0, 0x80(%rax)
movq -0x10(%rbp), %rcx
movsd 0x90(%rcx), %xmm0
movsd %xmm0, 0x90(%rax)
movq -0x10(%rbp), %rcx
movsd 0x50(%rcx), %xmm0
movsd %xmm0, 0x50(%rax)
movq -0x10(%rbp), %rcx
movsd 0x58(%rcx), %xmm0
movsd %xmm0, 0x58(%rax)
movq -0x10(%rbp), %rcx
movsd 0x60(%rcx), %xmm0
movsd %xmm0, 0x60(%rax)
movq -0x10(%rbp), %rcx
movl 0xf0(%rcx), %ecx
movl %ecx, 0xf0(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x872c
movl $0x0, -0x18(%rbp)
cmpl $0x2, -0x18(%rbp)
jge 0x871c
movl $0x0, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x870f
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0xa0, %rcx
movslq -0x14(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rdx
addq $0xa0, %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x86ad
jmp 0x8711
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x86a0
jmp 0x871e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x868f
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xe8(%rcx), %rcx
movq %rcx, 0xe8(%rax)
movl $0x90, %edi
callq 0x3250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rsi
callq 0xaa10
jmp 0x8768
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0xe0(%rax)
movq -0x10(%rbp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
movb 0x1(%rcx), %cl
andb $0x1, %cl
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rcx
movl 0x98(%rcx), %ecx
movl %ecx, 0x98(%rax)
movl $0x0, -0x30(%rbp)
cmpl $0x3, -0x30(%rbp)
jge 0x8826
movl $0x0, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jge 0x8819
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movslq -0x30(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rdx
addq $0x8, %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x87b3
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x90, %esi
callq 0x3260
jmp 0x88aa
jmp 0x881b
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x87a6
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x888c
movl $0x0, -0x3c(%rbp)
cmpl $0x2, -0x3c(%rbp)
jge 0x887f
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x38, %rcx
movslq -0x38(%rbp), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movslq -0x3c(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
addq $0x38, %rax
movslq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x883a
jmp 0x8881
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x882d
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x1d9fd(%rip), %rdi     # 0x26298
leaq -0x48(%rbp), %rsi
callq 0x8e80
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)