// File: /workspace/github_cpp_makefile_star2_O3/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 $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 0x476f0
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
leaq 0xe0(%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 0x43718
movupd 0xd0(%rbx), %xmm0
movupd 0x118(%rbx), %xmm1
mulpd %xmm0, %xmm1
addpd 0xc1bd(%rip), %xmm1     # 0x4ffa0
cvttpd2dq %xmm1, %xmm2
movq 0xe4(%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, 0x130(%rbx)
movaps %xmm2, 0x40(%rsp)
movdqa %xmm2, %xmm0
paddd %xmm2, %xmm0
movdqa %xmm3, 0x20(%rsp)
paddd %xmm3, %xmm0
movq %xmm0, 0x140(%rbx)
movl 0xe0(%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, 0x148(%rbx)
movslq %ebp, %r15
leaq (,%r15,8), %rax
testl %r15d, %r15d
movq $-0x1, %r12
cmovnsq %rax, %r12
movq %r12, %rdi
callq 0x7030
movq %rax, 0x150(%rbx)
movq %r12, %rdi
callq 0x7030
leaq (,%r15,4), %rcx
testl %r15d, %r15d
movq %rax, 0x158(%rbx)
movq $-0x1, %r12
movq %rcx, 0x38(%rsp)
cmovnsq %rcx, %r12
movq %r12, %rdi
callq 0x7030
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x160(%rbx)
movq %r12, %rdi
callq 0x7030
movq %rax, %r12
movq %rax, 0x168(%rbx)
movq %r15, %rdi
callq 0x7030
movq %rax, %rsi
movq %rax, 0x170(%rbx)
movl %r14d, 0x178(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x17c(%rbx)
testl %ebp, %ebp
jle 0x43f6e
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 0x71e0
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 0x71e0
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 0x71e0
pshufd $0x55, 0x20(%rsp), %xmm0 # xmm0 = mem[1,1,1,1]
movd %xmm0, %eax
testl %eax, %eax
jle 0x4407b
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 0x130(%rbx), %r12d
cmpl %eax, %r12d
jge 0x4406b
testl %r13d, %r13d
jle 0x44059
xorl %ebp, %ebp
movq 0x168(%rbx), %rax
movl 0x140(%rbx), %ecx
imull (%rsp), %ecx
addl %r12d, %ecx
imull %r13d, %ecx
movslq %ecx, %r13
addq %rbp, %r13
movl %r14d, (%rax,%r13,4)
movslq 0x178(%rbx), %r14
leaq (,%r14,4), %rdi
testq %r14, %r14
cmovsq %rsi, %rdi
callq 0x7030
movq 0x150(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movslq 0x17c(%rbx), %rax
imulq %r14, %rax
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %r15, %rdi
callq 0x7030
movq 0x158(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movl 0xe0(%rbx), %r13d
incq %rbp
cmpl %r13d, %ebp
movq $-0x1, %rsi
jl 0x43fc9
movl 0x138(%rbx), %eax
incl %r12d
cmpl %eax, %r12d
jl 0x43fbe
movl 0x13c(%rbx), %ecx
movl (%rsp), %edx
incl %edx
movl %edx, (%rsp)
cmpl %ecx, %edx
jl 0x43fae
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x440a5
jmp 0x44091
movq %rax, %r14
movq 0x128(%rbx), %rdi
testq %rdi, %rdi
je 0x440a5
callq 0x7490
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x1bc00
movq %r14, %rdi
callq 0x76d0
nop