// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movsd %xmm5, 0x10(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x2cc3c
cvtsi2sd %r13d, %xmm1
leaq 0x128(%rbx), %rdi
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
cvtsi2sd %r12d, %xmm2
movsd 0x20(%rsp), %xmm1
divsd %xmm2, %xmm1
cvtsi2sd %r15d, %xmm3
movsd 0x10(%rsp), %xmm2
divsd %xmm3, %xmm2
movq %rdi, (%rsp)
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x28234
leaq 0x30(%rbx), %rdi
callq 0x7c2c
movsd %xmm0, 0x178(%rbx)
movupd 0x118(%rbx), %xmm0
movupd 0x160(%rbx), %xmm1
mulpd %xmm0, %xmm1
addpd 0x7b1a(%rip), %xmm1     # 0x314e0
cvttpd2dq %xmm1, %xmm2
movq 0x12c(%rbx), %xmm0
movapd %xmm2, %xmm1
paddd %xmm2, %xmm1
paddd %xmm0, %xmm1
movdqa %xmm0, %xmm3
paddd %xmm2, %xmm3
movaps %xmm2, 0x10(%rsp)
movdqa %xmm2, %xmm0
movdqa %xmm3, 0x20(%rsp)
punpcklqdq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0]
movdqu %xmm0, 0x180(%rbx)
movq %xmm1, 0x190(%rbx)
movl 0x128(%rbx), %r12d
movd %xmm1, %eax
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
movd %xmm0, %ecx
imull %r12d, %eax
imull %ecx, %eax
movl %eax, 0x198(%rbx)
cltq
leaq (,%rax,8), %r15
movq %rax, %rbp
testl %eax, %eax
pushq $-0x1
popq %rax
cmovsq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1a0(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rbp, %rcx
leaq (,%rbp,4), %r13
testl %ecx, %ecx
movq %rax, 0x1a8(%rbx)
pushq $-0x1
popq %rax
cmovsq %rax, %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 %rbp, %rdi
callq 0x2030
movq %rax, 0x1c0(%rbx)
movl %r14d, 0x1c8(%rbx)
movl 0xc(%rsp), %ecx
movl %ecx, 0x1cc(%rbx)
leaq (%r15,%rbp,4), %rcx
movq %rbx, %r8
cmpq %rcx, %r15
jae 0x29acc
andl $0x0, (%r15)
addq $0x4, %r15
jmp 0x29abd
leaq (,%rbp,4), %rcx
addq %r13, %rcx
cmpq %rcx, %r13
jae 0x29ae7
andl $0x0, (%r13)
addq $0x4, %r13
jmp 0x29ad7
movq %rax, %rsi
addq %rbp, %rsi
movdqa 0x20(%rsp), %xmm0
movd %xmm0, %ecx
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %edx
pshufd $0x55, 0x10(%rsp), %xmm0 # xmm0 = mem[1,1,1,1]
movd %xmm0, %edi
cmpq %rsi, %rax
jae 0x29b18
movb $0x0, (%rax)
incq %rax
jmp 0x29b0b
pushq $-0x1
popq %r15
cmpl %edx, %edi
jge 0x29bf4
movl 0x180(%r8), %edx
movl %edi, 0x10(%rsp)
cmpl %ecx, %edx
jge 0x29be6
xorl %r9d, %r9d
cmpl %r12d, %r9d
jge 0x29bd8
movq 0x1b8(%r8), %rax
movl 0x190(%r8), %ecx
imull %edi, %ecx
movl %edx, %ebx
addl %edx, %ecx
imull %ecx, %r12d
movslq %r12d, %r12
movq %r9, %r13
addq %r9, %r12
movl %r14d, (%rax,%r12,4)
movslq 0x1c8(%r8), %rbp
leaq (,%rbp,4), %rdi
testq %rbp, %rbp
cmovsq %r15, %rdi
movq %r8, %r14
callq 0x2030
movq 0x1a0(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movslq 0x1cc(%r14), %rax
imulq %rbp, %rax
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %r15, %rdi
callq 0x2030
movq 0x1a8(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movl 0x128(%r14), %r12d
movq %r13, %r9
incq %r9
movl 0x10(%rsp), %edi
movl %ebx, %edx
movq %r14, %r8
movq %rbp, %r14
jmp 0x29b3a
incl %edx
movl 0x188(%r8), %ecx
jmp 0x29b2f
incl %edi
movl 0x18c(%r8), %edx
jmp 0x29b1c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x29c19
jmp 0x29c0d
movq %r14, %rbx
movq %rax, %r14
movq (%rsp), %rdi
callq 0x11bcc
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x5744
movq %r14, %rdi
callq 0x2220
nop