// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/voro++/src/container_prd.cc
// Function: voro::container_periodic_base::container_periodic_base(double, double, double, double, double, double, int, int, int, int, int)
container_periodic_base::container_periodic_base(double bx_,double bxy_,double by_,
		double bxz_,double byz_,double bz_,int nx_,int ny_,int nz_,int init_mem_,int ps_)
	: unitcell(bx_,bxy_,by_,bxz_,byz_,bz_),
	voro_base(nx_,ny_,nz_,bx_/nx_,by_/ny_,bz_/nz_), max_len_sq(unit_voro.max_radius_squared()),
	ey(int(max_uv_y*ysp+1)), ez(int(max_uv_z*zsp+1)), wy(ny+ey), wz(nz+ez),
	oy(ny+2*ey), oz(nz+2*ez), oxyz(nx*oy*oz), id(new int*[oxyz]), p(new double*[oxyz]),
	co(new int[oxyz]), mem(new int[oxyz]), img(new char[oxyz]), init_mem(init_mem_), ps(ps_) {
	int i,j,k,l;

	// Clear the global arrays
	int *pp=co;while(pp<co+oxyz) *(pp++)=0;
	pp=mem;while(pp<mem+oxyz) *(pp++)=0;
	char *cp=img;while(cp<img+oxyz) *(cp++)=0;

	// Set up memory for the blocks in the primary domain
	for(k=ez;k<wz;k++) for(j=ey;j<wy;j++) for(i=0;i<nx;i++) {
		l=i+nx*(j+oy*k);
		mem[l]=init_mem;
		id[l]=new int[init_mem];
		p[l]=new double[ps*init_mem];
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movl %r8d, 0x24(%rsp)
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movsd %xmm5, 0x8(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
callq 0x342b4
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
leaq 0x128(%rbx), %rdi
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %r15d, %xmm2
movsd 0x18(%rsp), %xmm1
divsd %xmm2, %xmm1
xorps %xmm3, %xmm3
cvtsi2sd %ebp, %xmm3
movsd 0x8(%rsp), %xmm2
divsd %xmm3, %xmm2
movq %rdi, 0x18(%rsp)
movl %r12d, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x2ebc0
movl %r14d, 0x10(%rsp)
leaq 0x30(%rbx), %rdi
callq 0x9b0a
movsd %xmm0, 0x178(%rbx)
movsd 0x118(%rbx), %xmm0
movsd 0x120(%rbx), %xmm1
mulsd 0x160(%rbx), %xmm0
movsd 0x6ab0(%rip), %xmm2     # 0x37008
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x180(%rbx)
mulsd 0x168(%rbx), %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edi
movl %edi, 0x184(%rbx)
movl 0x12c(%rbx), %ecx
leal (%rcx,%rax), %edx
movl %edx, 0x188(%rbx)
movl 0x130(%rbx), %edx
leal (%rdx,%rdi), %esi
movl %esi, 0x18c(%rbx)
leal (%rcx,%rax,2), %eax
movl %eax, 0x190(%rbx)
movq %rdi, 0x8(%rsp)
leal (%rdx,%rdi,2), %ebp
movl %ebp, 0x194(%rbx)
imull %eax, %ebp
imull 0x128(%rbx), %ebp
movl %ebp, 0x198(%rbx)
movslq %ebp, %r12
leaq (,%r12,8), %rax
testl %r12d, %r12d
movq $-0x1, %r15
cmovnsq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1a0(%rbx)
movq %r15, %rdi
callq 0x2030
leaq (,%r12,4), %rcx
testl %r12d, %r12d
movq %rax, 0x1a8(%rbx)
movq $-0x1, %r13
cmovnsq %rcx, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, %r15
movq %rax, 0x1b0(%rbx)
movq %r13, %rdi
callq 0x2030
movq %rax, %r13
movq %rax, 0x1b8(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x1c0(%rbx)
movl 0x24(%rsp), %eax
movl %eax, 0x1c8(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x1cc(%rbx)
testl %ebp, %ebp
jle 0x30686
leaq (%r15,%r12,4), %rax
leaq 0x4(%r15), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %r15, %rdx
notq %rdx
addq %rcx, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20c0
testl %ebp, %ebp
jle 0x306bb
leaq (,%r12,4), %rax
addq %r13, %rax
leaq 0x4(%r13), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %r13, %rdx
notq %rdx
addq %rcx, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x20c0
testl %ebp, %ebp
jle 0x306dd
addq %r14, %r12
leaq 0x1(%r14), %rax
cmpq %rax, %r12
cmovbeq %rax, %r12
subq %r14, %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20c0
movq 0x8(%rsp), %rax
cmpl %eax, 0x18c(%rbx)
jle 0x307c3
movq $-0x1, %r15
movl 0x180(%rbx), %r12d
cmpl 0x188(%rbx), %r12d
jge 0x307ab
movq 0x18(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x307a3
xorl %r13d, %r13d
movl 0x1c8(%rbx), %ecx
movq 0x1b8(%rbx), %rdx
movl 0x190(%rbx), %esi
imull 0x8(%rsp), %esi
addl %r12d, %esi
imull %eax, %esi
movslq %esi, %r14
addq %r13, %r14
movl %ecx, (%rdx,%r14,4)
movslq 0x1c8(%rbx), %rbp
leaq (,%rbp,4), %rdi
testq %rbp, %rbp
cmovsq %r15, %rdi
callq 0x2030
movq 0x1a0(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movslq 0x1cc(%rbx), %rax
imulq %rbp, %rax
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %r15, %rdi
callq 0x2030
movq 0x1a8(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movl 0x128(%rbx), %eax
incq %r13
cmpl %eax, %r13d
jl 0x3071b
incl %r12d
jmp 0x306fc
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
cmpl 0x18c(%rbx), %eax
jl 0x306f5
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x307ed
jmp 0x307d9
movq %rax, %r14
movq 0x170(%rbx), %rdi
testq %rdi, %rdi
je 0x307ed
callq 0x2180
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x6eca
movq %r14, %rdi
callq 0x2230
nop