// File: /workspace/github_cpp_makefile_star2_O1/icemiliang[P]vot/src/vot/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_),
	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 0x46e4c
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
leaq 0xe0(%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 0x42cfc
movl %r14d, 0x10(%rsp)
movsd 0xd0(%rbx), %xmm0
movsd 0xd8(%rbx), %xmm1
mulsd 0x118(%rbx), %xmm0
movsd 0x77dd(%rip), %xmm2     # 0x4ab58
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x130(%rbx)
mulsd 0x120(%rbx), %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edi
movl %edi, 0x134(%rbx)
movl 0xe4(%rbx), %ecx
leal (%rcx,%rax), %edx
movl %edx, 0x138(%rbx)
movl 0xe8(%rbx), %edx
leal (%rdx,%rdi), %esi
movl %esi, 0x13c(%rbx)
leal (%rcx,%rax,2), %eax
movl %eax, 0x140(%rbx)
movq %rdi, 0x8(%rsp)
leal (%rdx,%rdi,2), %ebp
movl %ebp, 0x144(%rbx)
imull %eax, %ebp
imull 0xe0(%rbx), %ebp
movl %ebp, 0x148(%rbx)
movslq %ebp, %r12
leaq (,%r12,8), %rax
testl %r12d, %r12d
movq $-0x1, %r15
cmovnsq %rax, %r15
movq %r15, %rdi
callq 0x7030
movq %rax, 0x150(%rbx)
movq %r15, %rdi
callq 0x7030
leaq (,%r12,4), %rcx
testl %r12d, %r12d
movq %rax, 0x158(%rbx)
movq $-0x1, %r13
cmovnsq %rcx, %r13
movq %r13, %rdi
callq 0x7030
movq %rax, %r15
movq %rax, 0x160(%rbx)
movq %r13, %rdi
callq 0x7030
movq %rax, %r13
movq %rax, 0x168(%rbx)
movq %r12, %rdi
callq 0x7030
movq %rax, %r14
movq %rax, 0x170(%rbx)
movl 0x24(%rsp), %eax
movl %eax, 0x178(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x17c(%rbx)
testl %ebp, %ebp
jle 0x434a9
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 0x71e0
testl %ebp, %ebp
jle 0x434de
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 0x71e0
testl %ebp, %ebp
jle 0x43500
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 0x71e0
movq 0x8(%rsp), %rax
cmpl %eax, 0x13c(%rbx)
jle 0x435e6
movq $-0x1, %r15
movl 0x130(%rbx), %r12d
cmpl 0x138(%rbx), %r12d
jge 0x435ce
movq 0x18(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x435c6
xorl %r13d, %r13d
movl 0x178(%rbx), %ecx
movq 0x168(%rbx), %rdx
movl 0x140(%rbx), %esi
imull 0x8(%rsp), %esi
addl %r12d, %esi
imull %eax, %esi
movslq %esi, %r14
addq %r13, %r14
movl %ecx, (%rdx,%r14,4)
movslq 0x178(%rbx), %rbp
leaq (,%rbp,4), %rdi
testq %rbp, %rbp
cmovsq %r15, %rdi
callq 0x7030
movq 0x150(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movslq 0x17c(%rbx), %rax
imulq %rbp, %rax
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %r15, %rdi
callq 0x7030
movq 0x158(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movl 0xe0(%rbx), %eax
incq %r13
cmpl %eax, %r13d
jl 0x4353e
incl %r12d
jmp 0x4351f
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
cmpl 0x13c(%rbx), %eax
jl 0x43518
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x43610
jmp 0x435fc
movq %rax, %r14
movq 0x128(%rbx), %rdi
testq %rdi, %rdi
je 0x43610
callq 0x7480
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x1bad4
movq %r14, %rdi
callq 0x76c0