// File: 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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x28(%rbp)
movsd %xmm4, -0x30(%rbp)
movsd %xmm5, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movl %r8d, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
movsd -0x28(%rbp), %xmm3
movsd -0x30(%rbp), %xmm4
movsd -0x38(%rbp), %xmm5
callq 0x52c20
movq -0x88(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl -0x44(%rbp), %ecx
movsd -0x10(%rbp), %xmm0
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm1
cvtsi2sd %edx, %xmm2
divsd %xmm2, %xmm1
movsd -0x38(%rbp), %xmm2
cvtsi2sd %ecx, %xmm3
divsd %xmm3, %xmm2
callq 0x4a6f0
jmp 0x4d9e1
movq -0x88(%rbp), %rdi
movq %rdi, %rax
addq $0x178, %rax            # imm = 0x178
movq %rax, -0x98(%rbp)
addq $0x30, %rdi
callq 0xb9c0
movsd %xmm0, -0x90(%rbp)
jmp 0x4da0b
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movsd -0x90(%rbp), %xmm0
movsd %xmm0, (%rcx)
movsd 0x118(%rax), %xmm0
movsd 0x160(%rax), %xmm1
mulsd %xmm1, %xmm0
movsd 0x85cf(%rip), %xmm1     # 0x56010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, 0x180(%rax)
movsd 0x120(%rax), %xmm0
movsd 0x168(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, 0x184(%rax)
movl 0x12c(%rax), %ecx
movl 0x180(%rax), %edx
addl %edx, %ecx
movl %ecx, 0x188(%rax)
movl 0x130(%rax), %ecx
movl 0x184(%rax), %edx
addl %edx, %ecx
movl %ecx, 0x18c(%rax)
movl 0x12c(%rax), %esi
movl 0x180(%rax), %ecx
movl %ecx, %edx
movl %esi, %ecx
leal (%rcx,%rdx,2), %ecx
movl %ecx, 0x190(%rax)
movl 0x130(%rax), %esi
movl 0x184(%rax), %ecx
movl %ecx, %edx
movl %esi, %ecx
leal (%rcx,%rdx,2), %ecx
movl %ecx, 0x194(%rax)
movl 0x128(%rax), %ecx
movl 0x190(%rax), %edx
imull %edx, %ecx
movl 0x194(%rax), %edx
imull %edx, %ecx
movl %ecx, 0x198(%rax)
movq %rax, %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movq %rcx, -0xa8(%rbp)
movslq 0x198(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xa0(%rbp)
jmp 0x4db25
movq -0x88(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq -0xa0(%rbp), %rdx
movq %rdx, (%rcx)
movq %rax, %rcx
addq $0x1a8, %rcx            # imm = 0x1A8
movq %rcx, -0xb8(%rbp)
movslq 0x198(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xb0(%rbp)
jmp 0x4db79
movq -0x88(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq -0xb0(%rbp), %rdx
movq %rdx, (%rcx)
movq %rax, %rcx
addq $0x1b0, %rcx            # imm = 0x1B0
movq %rcx, -0xc8(%rbp)
movslq 0x198(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xc0(%rbp)
jmp 0x4dbcd
movq -0x88(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rdx
movq %rdx, (%rcx)
movq %rax, %rcx
addq $0x1b8, %rcx            # imm = 0x1B8
movq %rcx, -0xd8(%rbp)
movslq 0x198(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xd0(%rbp)
jmp 0x4dc21
movq -0x88(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq -0xd0(%rbp), %rdx
movq %rdx, (%rcx)
movq %rax, %rcx
addq $0x1c0, %rcx            # imm = 0x1C0
movq %rcx, -0xe8(%rbp)
movslq 0x198(%rax), %rdi
callq 0x2030
movq %rax, -0xe0(%rbp)
jmp 0x4dc5f
movq -0x88(%rbp), %rax
movq -0xe8(%rbp), %rcx
movq -0xe0(%rbp), %rdx
movq %rdx, (%rcx)
movl -0x48(%rbp), %ecx
movl %ecx, 0x1c8(%rax)
movl -0x4c(%rbp), %ecx
movl %ecx, 0x1cc(%rax)
movq 0x1b0(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rax
movq 0x1b0(%rdx), %rcx
movslq 0x198(%rdx), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x4dd05
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x78(%rbp)
movl $0x0, (%rax)
jmp 0x4dc94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4df13
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x1e8c0
jmp 0x4df13
movq -0x88(%rbp), %rax
movq 0x1b8(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rax
movq 0x1b8(%rdx), %rcx
movslq 0x198(%rdx), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x4dd53
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x78(%rbp)
movl $0x0, (%rax)
jmp 0x4dd17
movq -0x88(%rbp), %rax
movq 0x1c0(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rax
movq 0x1c0(%rdx), %rcx
movslq 0x198(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x4dd9a
movq -0x80(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x80(%rbp)
movb $0x0, (%rax)
jmp 0x4dd65
movq -0x88(%rbp), %rax
movl 0x184(%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x88(%rbp), %rcx
movl -0x68(%rbp), %eax
cmpl 0x18c(%rcx), %eax
jge 0x4df0a
movq -0x88(%rbp), %rax
movl 0x180(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x88(%rbp), %rcx
movl -0x64(%rbp), %eax
cmpl 0x188(%rcx), %eax
jge 0x4defa
movl $0x0, -0x60(%rbp)
movq -0x88(%rbp), %rcx
movl -0x60(%rbp), %eax
cmpl 0x128(%rcx), %eax
jge 0x4deea
movq -0x88(%rbp), %rax
movl -0x60(%rbp), %ecx
movl -0x64(%rbp), %esi
movl 0x128(%rax), %edx
movl 0x190(%rax), %edi
movl -0x68(%rbp), %r8d
imull %r8d, %edi
addl %edi, %esi
imull %esi, %edx
addl %edx, %ecx
movl %ecx, -0x6c(%rbp)
movl 0x1c8(%rax), %esi
movq 0x1b8(%rax), %rcx
movslq -0x6c(%rbp), %rdx
movl %esi, (%rcx,%rdx,4)
movslq 0x1c8(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xf0(%rbp)
jmp 0x4de6d
movq -0x88(%rbp), %rax
movq -0xf0(%rbp), %rsi
movq 0x1a0(%rax), %rcx
movslq -0x6c(%rbp), %rdx
movq %rsi, (%rcx,%rdx,8)
movl 0x1c8(%rax), %ecx
movl 0x1cc(%rax), %eax
imull %ecx, %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0xf8(%rbp)
jmp 0x4debf
movq -0xf8(%rbp), %rdx
movq -0x88(%rbp), %rax
movq 0x1a8(%rax), %rax
movslq -0x6c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x4dded
jmp 0x4deec
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x4ddd0
jmp 0x4defc
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x4ddaa
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x51c30
movq -0x58(%rbp), %rdi
callq 0x2220
nopl (%rax,%rax)