// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %rdi, %r15
addq $0x28, %rdi
leaq 0x38(%r15), %rax
movq %rax, -0x40(%rbp)
movq %rax, 0x28(%r15)
movq $0x0, 0x30(%r15)
movb $0x0, 0x38(%r15)
movl (%rsi), %eax
movl %eax, (%r15)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%r15)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%r15)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%r15)
movq %rsi, -0x30(%rbp)
addq $0x28, %rsi
movq %rdi, -0x38(%rbp)
callq 0x2120
movslq (%r15), %r14
leaq (,%r14,8), %rax
testq %r14, %r14
movq $-0x1, %r12
cmovnsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x10(%r15)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x18(%r15)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x20(%r15)
testl %r14d, %r14d
jle 0x6803
movl 0x4(%r15), %r13d
xorl %ebx, %ebx
movslq %r13d, %rax
leaq (,%rax,8), %r12
testl %eax, %eax
movq $-0x1, %rax
cmovsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq 0x10(%r15), %rcx
movq %rax, (%rcx,%rbx,8)
movq %r12, %rdi
callq 0x2030
movq 0x18(%r15), %rcx
movq %rax, (%rcx,%rbx,8)
movq %r12, %rdi
callq 0x2030
movq 0x20(%r15), %rcx
movq %rax, (%rcx,%rbx,8)
testl %r13d, %r13d
jle 0x67f4
xorl %r14d, %r14d
movslq 0x8(%r15), %rax
leaq (,%rax,8), %r12
testq %rax, %rax
movq %r12, %r13
movq $-0x1, %rax
cmovsq %rax, %r13
movq %r13, %rdi
callq 0x2030
movq 0x10(%r15), %rcx
movq (%rcx,%rbx,8), %rcx
movq %rax, (%rcx,%r14,8)
movq %r13, %rdi
callq 0x2030
movq 0x18(%r15), %rcx
movq (%rcx,%rbx,8), %rcx
movq %rax, (%rcx,%r14,8)
movq %r13, %rdi
callq 0x2030
movq 0x20(%r15), %rcx
movq (%rcx,%rbx,8), %rcx
movq %rax, (%rcx,%r14,8)
movq 0x10(%r15), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rdi
movq -0x30(%rbp), %r13
movq 0x10(%r13), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rsi
movq %r12, %rdx
callq 0x2190
movq 0x18(%r15), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rdi
movq 0x18(%r13), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rsi
movslq 0x8(%r15), %rdx
shlq $0x3, %rdx
callq 0x2190
movq 0x20(%r15), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rdi
movq 0x20(%r13), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rsi
movslq 0x8(%r15), %rdx
shlq $0x3, %rdx
callq 0x2190
incq %r14
movslq 0x4(%r15), %r13
cmpq %r13, %r14
jl 0x671a
movl (%r15), %r14d
incq %rbx
movslq %r14d, %rax
cmpq %rax, %rbx
jl 0x66c6
movq $-0x3, %rax
movq -0x30(%rbp), %rdx
movq 0x60(%rdx,%rax,8), %rcx
movq %rcx, 0x60(%r15,%rax,8)
movq 0x78(%rdx,%rax,8), %rcx
movq %rcx, 0x78(%r15,%rax,8)
movq 0x90(%rdx,%rax,8), %rcx
movq %rcx, 0x90(%r15,%rax,8)
incq %rax
jne 0x680e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x684a
jmp 0x684a
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x6868
movq (%rax), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350