// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/voro++/src/unitcell.cc
// Function: voro::unitcell::images(std::vector<int, std::allocator<int>>&, std::vector<double, std::allocator<double>>&)
void unitcell::images(std::vector<int> &vi,std::vector<double> &vd) {
	const int ms2=max_unit_voro_shells*2+1,mss=ms2*ms2*ms2;
	bool *a=new bool[mss],*ac=a+max_unit_voro_shells*(1+ms2*(1+ms2)),*ap=a;
	int i,j,k;
	double vol;

	// Initialize mask
	while(ap<ac) *(ap++)=true;
	*(ap++)=false;
	while(ap<a+mss) *(ap++)=true;

	// Set up the queue and add (0,0,0) image to it
	std::queue<int> q;
	q.push(0);q.push(0);q.push(0);

	while(!q.empty()) {

		// Read the next entry on the queue
		i=q.front();q.pop();
		j=q.front();q.pop();
		k=q.front();q.pop();

		// Check intersection of this image
		if(intersects_image(i,j,k,vol)) {

			// Add this entry to the output vectors
			vi.push_back(i);
			vi.push_back(j);
			vi.push_back(k);
			vd.push_back(vol);

			// Add neighbors to the queue if they have not been
			// tested
			ap=ac+i+ms2*(j+ms2*k);
			if(k>-max_unit_voro_shells&&*(ap-ms2*ms2)) {q.push(i);q.push(j);q.push(k-1);*(ap-ms2*ms2)=false;}
			if(j>-max_unit_voro_shells&&*(ap-ms2)) {q.push(i);q.push(j-1);q.push(k);*(ap-ms2)=false;}
			if(i>-max_unit_voro_shells&&*(ap-1)) {q.push(i-1);q.push(j);q.push(k);*(ap-1)=false;}
			if(i<max_unit_voro_shells&&*(ap+1)) {q.push(i+1);q.push(j);q.push(k);*(ap+1)=false;}
			if(j<max_unit_voro_shells&&*(ap+ms2)) {q.push(i);q.push(j+1);q.push(k);*(ap+ms2)=false;}
			if(k<max_unit_voro_shells&&*(ap+ms2*ms2)) {q.push(i);q.push(j);q.push(k+1);*(ap+ms2*ms2)=false;}
		}
	}

	// Remove mask memory
	delete [] a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x242d, %edi           # imm = 0x242D
callq 0x2030
movq %rax, %r12
movl $0x1216, %edx           # imm = 0x1216
movq %rax, %rdi
movl $0x1, %esi
callq 0x20c0
movb $0x0, 0x1216(%r12)
movq %r12, 0x60(%rsp)
leaq 0x1217(%r12), %rdi
movl $0x1216, %edx           # imm = 0x1216
movl $0x1, %esi
callq 0x20c0
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movapd %xmm0, 0x40(%r12)
movapd %xmm0, 0x30(%r12)
movapd %xmm0, 0x20(%r12)
movapd %xmm0, 0x10(%r12)
movapd %xmm0, (%r12)
movq %r12, %rdi
xorl %esi, %esi
callq 0x36358
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
movq %r12, %rdi
callq 0x364ce
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x364ce
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x364ce
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x35efc
movq 0x60(%rsp), %rcx
addq $0x1216, %rcx           # imm = 0x1216
movq %rcx, 0x70(%rsp)
leaq 0x10(%rsp), %rbp
movl (%rax), %ecx
movl %ecx, 0xc(%rsp)
movq 0x30(%rsp), %rcx
leaq -0x4(%rcx), %rdx
cmpq %rdx, %rax
je 0x359bf
addq $0x4, %rax
jmp 0x359f1
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2130
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movl (%rax), %edx
movl %edx, (%rsp)
leaq -0x4(%rcx), %rdx
cmpq %rdx, %rax
je 0x35a0a
addq $0x4, %rax
jmp 0x35a3c
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2130
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movl (%rax), %edx
movl %edx, 0x4(%rsp)
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35a56
addq $0x4, %rax
jmp 0x35a8c
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2130
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movl 0x4(%rsp), %edx
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl (%rsp), %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
movq %r15, %rdi
leaq 0x68(%rsp), %rsi
callq 0x355d0
testb %al, %al
je 0x35eec
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rax
cmpq %rax, %rsi
je 0x35adb
movl 0xc(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x35af0
movq %r14, %rdi
leaq 0xc(%rsp), %rdx
callq 0x12354
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rax
cmpq %rax, %rsi
je 0x35b04
movl (%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x35b17
movq %r14, %rdi
movq %rsp, %rdx
callq 0x12354
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rax
cmpq %rax, %rsi
je 0x35b2c
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x35b39
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0x12354
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x35b57
movsd 0x68(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x35b64
movq %rbx, %rdi
leaq 0x68(%rsp), %rdx
callq 0x3672a
movslq 0xc(%rsp), %rcx
movq 0x70(%rsp), %rax
leaq (%rax,%rcx), %r12
movl (%rsp), %eax
movl 0x4(%rsp), %edx
leal (%rdx,%rdx,4), %esi
leal (%rdx,%rsi,4), %esi
addl %eax, %esi
movslq %esi, %rsi
leaq (%rsi,%rsi,4), %rdi
leaq (%rsi,%rdi,4), %r13
cmpl $-0x9, %edx
jl 0x35c1e
cmpb $0x1, -0x1b9(%r12,%r13)
jne 0x35c1e
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdx
leaq -0x4(%rdx), %rsi
cmpq %rsi, %rax
je 0x35bc0
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35bd7
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3680a
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x35bf0
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35bfb
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3680a
movl 0x4(%rsp), %eax
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movb $0x0, -0x1b9(%r12,%r13)
movl (%rsp), %eax
cmpl $-0x9, %eax
jl 0x35cad
cmpb $0x1, -0x15(%r12,%r13)
jne 0x35cad
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35c53
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35c60
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3680a
movl (%rsp), %eax
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35c9a
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35ca7
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3680a
movb $0x0, -0x15(%r12,%r13)
movl 0xc(%rsp), %eax
cmpl $-0x9, %eax
jl 0x35d47
cmpb $0x1, -0x1(%r12,%r13)
jne 0x35d3e
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq -0x4(%rcx), %rdx
cmpq %rdx, %rax
je 0x35cf8
movl (%rsp), %edx
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35d0d
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3680a
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35d27
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35d34
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3680a
movb $0x0, -0x1(%r12,%r13)
movl 0xc(%rsp), %eax
cmpl $0x9, %eax
jg 0x35dc7
cmpb $0x1, 0x1(%r12,%r13)
jne 0x35dc7
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq -0x4(%rcx), %rdx
cmpq %rdx, %rax
je 0x35d85
movl (%rsp), %edx
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35d9a
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3680a
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35db4
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35dc1
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3680a
movb $0x0, 0x1(%r12,%r13)
cmpl $0x9, (%rsp)
jg 0x35e57
cmpb $0x1, 0x15(%r12,%r13)
jne 0x35e57
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35dfd
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35e0a
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3680a
movl (%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35e44
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35e51
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3680a
movb $0x0, 0x15(%r12,%r13)
cmpl $0x9, 0x4(%rsp)
jg 0x35eec
cmpb $0x1, 0x1b9(%r12,%r13)
jne 0x35eec
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq -0x4(%rcx), %rdx
cmpq %rdx, %rax
je 0x35e91
movl 0xc(%rsp), %edx
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35ea8
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3680a
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35ec1
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35ecc
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3680a
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x364ce
movb $0x0, 0x1b9(%r12,%r13)
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x359a5
movq 0x60(%rsp), %rdi
callq 0x2180
leaq 0x10(%rsp), %rdi
callq 0x36300
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
jmp 0x35f31
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x36300
movq %rbx, %rdi
callq 0x2230