// File: /workspace/github_cpp_makefile_star2_O1/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::VecField(myOctree::VecField const&)
VecField::VecField(const VecField &obj) {

//              std::cerr << "copy constructor of vecfield is working" << std::endl;

        Nx = obj.Nx;
        Ny = obj.Ny;
        Nz = obj.Nz;
        N = obj.N;
        name = obj.name;

        x = new double** [Nx];
        y = new double** [Nx];
        z = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                x[i] = new double* [Ny];
                y[i] = new double* [Ny];
                z[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        x[i][j] = new double [Nz];
                        y[i][j] = new double [Nz];
                        z[i][j] = new double [Nz];
                        memcpy(x[i][j],obj.x[i][j],sizeof(double)*Nz);
                        memcpy(y[i][j],obj.y[i][j],sizeof(double)*Nz);
                        memcpy(z[i][j],obj.z[i][j],sizeof(double)*Nz);
                }
        }

	for(int i = 0; i < 3; ++ i) {
                 memcpy(&(xbc[i][0]), &(obj.xbc[i][0]), 2 * sizeof(FieldBc));
                 memcpy(&(ybc[i][0]), &(obj.ybc[i][0]), 2 * sizeof(FieldBc));
                 memcpy(&(zbc[i][0]), &(obj.zbc[i][0]), 2 * sizeof(FieldBc));
     	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %rbx
addq $0x28, %rdi
leaq 0x38(%rbx), %rax
movq %rax, -0x40(%rbp)
movq %rax, 0x28(%rbx)
movq $0x0, 0x30(%rbx)
movb $0x0, 0x38(%rbx)
movl (%rsi), %eax
movl %eax, (%rbx)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rbx)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rbx)
addq $0x28, %rsi
movq %rdi, -0x38(%rbp)
callq 0x2120
movslq (%rbx), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %r12
cmovnsq %rcx, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
cmpl $0x0, (%rbx)
jle 0x6754
xorl %r14d, %r14d
movq %r13, -0x48(%rbp)
movslq 0x4(%rbx), %rax
leaq (,%rax,8), %r12
testq %rax, %rax
movq $-0x1, %rax
cmovsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq %r12, %rdi
callq 0x2030
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq %r12, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq %r14, -0x30(%rbp)
movq %rax, (%rcx,%r14,8)
cmpl $0x0, 0x4(%rbx)
jle 0x6741
xorl %r14d, %r14d
movslq 0x8(%rbx), %rax
leaq (,%rax,8), %r12
testq %rax, %rax
movq %r12, %r13
movq $-0x1, %rax
cmovsq %rax, %r13
movq %r13, %rdi
callq 0x2030
movq -0x30(%rbp), %r15
movq 0x10(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq %rax, (%rcx,%r14,8)
movq %r13, %rdi
callq 0x2030
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq %rax, (%rcx,%r14,8)
movq %r13, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq %rax, (%rcx,%r14,8)
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rdi
movq -0x48(%rbp), %r13
movq 0x10(%r13), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rsi
movq %r12, %rdx
callq 0x2180
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rdi
movq 0x18(%r13), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x2180
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rdi
movq 0x20(%r13), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r14,8), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x2180
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x6666
movq -0x30(%rbp), %r14
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x660b
movq $-0x3, %rax
movq 0x60(%r13,%rax,8), %rcx
movq %rcx, 0x60(%rbx,%rax,8)
movq 0x78(%r13,%rax,8), %rcx
movq %rcx, 0x78(%rbx,%rax,8)
movq 0x90(%r13,%rax,8), %rcx
movq %rcx, 0x90(%rbx,%rax,8)
incq %rax
jne 0x675b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6797
jmp 0x6797
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x67b5
movq (%rax), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2340
nop