// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movl %r9d, 0x8(%rsp)
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movsd %xmm5, (%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
callq 0x34578
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
leaq 0x128(%rbx), %rdi
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2sd %r15d, %xmm2
movsd 0x20(%rsp), %xmm1
divsd %xmm2, %xmm1
xorps %xmm3, %xmm3
cvtsi2sd %ebp, %xmm3
movsd (%rsp), %xmm2
divsd %xmm3, %xmm2
movl %r12d, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x2f188
leaq 0x30(%rbx), %rdi
callq 0x9a14
movsd %xmm0, 0x178(%rbx)
movupd 0x118(%rbx), %xmm0
movupd 0x160(%rbx), %xmm1
mulpd %xmm0, %xmm1
addpd 0x8b84(%rip), %xmm1     # 0x39530
cvttpd2dq %xmm1, %xmm2
movq 0x12c(%rbx), %xmm3
movdqa %xmm3, %xmm1
paddd %xmm2, %xmm1
movdqa %xmm2, %xmm0
movdqa %xmm1, 0x10(%rsp)
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqu %xmm0, 0x180(%rbx)
movaps %xmm2, 0x40(%rsp)
movdqa %xmm2, %xmm0
paddd %xmm2, %xmm0
movdqa %xmm3, 0x20(%rsp)
paddd %xmm3, %xmm0
movq %xmm0, 0x190(%rbx)
movl 0x128(%rbx), %r13d
movd %xmm0, %ebp
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %eax
imull %r13d, %ebp
imull %eax, %ebp
movl %ebp, 0x198(%rbx)
movslq %ebp, %r15
leaq (,%r15,8), %rax
testl %r15d, %r15d
movq $-0x1, %r12
cmovnsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x1a0(%rbx)
movq %r12, %rdi
callq 0x2030
leaq (,%r15,4), %rcx
testl %r15d, %r15d
movq %rax, 0x1a8(%rbx)
movq $-0x1, %r12
movq %rcx, 0x38(%rsp)
cmovnsq %rcx, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x1b0(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, 0x1b8(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, %rsi
movq %rax, 0x1c0(%rbx)
movl %r14d, 0x1c8(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x1cc(%rbx)
testl %ebp, %ebp
jle 0x30b37
movq 0x38(%rsp), %rbp
movq (%rsp), %rdi
leaq (%rdi,%rbp), %rax
leaq 0x4(%rdi), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rdi, %rdx
notq %rdx
addq %rcx, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %rsi, 0x8(%rsp)
xorl %esi, %esi
callq 0x20c0
addq %r12, %rbp
leaq 0x4(%r12), %rax
cmpq %rax, %rbp
cmovbeq %rax, %rbp
movq %r12, %rdx
notq %rdx
addq %rbp, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x20c0
movq 0x8(%rsp), %rdi
addq %rdi, %r15
leaq 0x1(%rdi), %rax
cmpq %rax, %r15
cmovbeq %rax, %r15
subq %rdi, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x20c0
pshufd $0x55, 0x20(%rsp), %xmm0 # xmm0 = mem[1,1,1,1]
movd %xmm0, %eax
testl %eax, %eax
jle 0x30c44
pshufd $0x55, 0x40(%rsp), %xmm0 # xmm0 = mem[1,1,1,1]
movd %xmm0, (%rsp)
movdqa 0x10(%rsp), %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
movd %xmm0, %ecx
movd %xmm1, %eax
movq $-0x1, %rsi
movq $-0x1, %r15
movl 0x180(%rbx), %r12d
cmpl %eax, %r12d
jge 0x30c34
testl %r13d, %r13d
jle 0x30c22
xorl %ebp, %ebp
movq 0x1b8(%rbx), %rax
movl 0x190(%rbx), %ecx
imull (%rsp), %ecx
addl %r12d, %ecx
imull %r13d, %ecx
movslq %ecx, %r13
addq %rbp, %r13
movl %r14d, (%rax,%r13,4)
movslq 0x1c8(%rbx), %r14
leaq (,%r14,4), %rdi
testq %r14, %r14
cmovsq %rsi, %rdi
callq 0x2030
movq 0x1a0(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movslq 0x1cc(%rbx), %rax
imulq %r14, %rax
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %r15, %rdi
callq 0x2030
movq 0x1a8(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movl 0x128(%rbx), %r13d
incq %rbp
cmpl %r13d, %ebp
movq $-0x1, %rsi
jl 0x30b92
movl 0x188(%rbx), %eax
incl %r12d
cmpl %eax, %r12d
jl 0x30b87
movl 0x18c(%rbx), %ecx
movl (%rsp), %edx
incl %edx
movl %edx, (%rsp)
cmpl %ecx, %edx
jl 0x30b77
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x30c6e
jmp 0x30c5a
movq %rax, %r14
movq 0x170(%rbx), %rdi
testq %rdi, %rdi
je 0x30c6e
callq 0x2180
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x6ed4
movq %r14, %rdi
callq 0x2230