// File: /workspace/github_cpp_makefile_star2_O1/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 0x360cc
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
movq %r12, %rdi
callq 0x36242
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x36242
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x36242
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x35c78
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
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3573b
addq $0x4, %rax
jmp 0x3576d
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), %ecx
movl %ecx, (%rsp)
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3578b
addq $0x4, %rax
jmp 0x357bd
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), %ecx
movl %ecx, 0x4(%rsp)
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x357dc
addq $0x4, %rax
jmp 0x3580e
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)
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl (%rsp), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0x4(%rsp), %xmm2
movq %r15, %rdi
leaq 0x68(%rsp), %rsi
callq 0x3534c
testb %al, %al
je 0x35c68
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x3585c
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x35869
movq %r14, %rdi
leaq 0xc(%rsp), %rdx
callq 0x12486
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x35882
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x3588d
movq %r14, %rdi
movq %rsp, %rdx
callq 0x12486
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x358a7
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x358b4
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0x12486
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x358d2
movsd 0x68(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x358df
movq %rbx, %rdi
leaq 0x68(%rsp), %rdx
callq 0x3649e
movslq 0xc(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq (%rcx,%rax), %r12
movslq (%rsp), %rcx
movslq 0x4(%rsp), %rdx
leaq (%rdx,%rdx,4), %rsi
leaq (%rdx,%rsi,4), %rsi
addq %rcx, %rsi
leaq (%rsi,%rsi,4), %rcx
leaq (%rsi,%rcx,4), %r13
cmpq $-0x9, %rdx
jl 0x35999
cmpb $0x1, -0x1b9(%r12,%r13)
jne 0x35999
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x3593e
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x3594b
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3657e
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x3596e
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35979
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3657e
movl 0x4(%rsp), %eax
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movb $0x0, -0x1b9(%r12,%r13)
cmpl $-0x9, (%rsp)
jl 0x35a29
cmpb $0x1, -0x15(%r12,%r13)
jne 0x35a29
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x359cf
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x359dc
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3657e
movl (%rsp), %eax
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35a16
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35a23
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3657e
movb $0x0, -0x15(%r12,%r13)
movl 0xc(%rsp), %eax
cmpl $-0x9, %eax
jl 0x35ab6
cmpb $0x1, -0x1(%r12,%r13)
jne 0x35ab6
decl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35a74
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35a7f
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3657e
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35aa3
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35ab0
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3657e
movb $0x0, -0x1(%r12,%r13)
movl 0xc(%rsp), %eax
cmpl $0x9, %eax
jg 0x35b43
cmpb $0x1, 0x1(%r12,%r13)
jne 0x35b43
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35b01
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35b0c
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3657e
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35b30
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35b3d
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3657e
movb $0x0, 0x1(%r12,%r13)
cmpl $0x9, (%rsp)
jg 0x35bd3
cmpb $0x1, 0x15(%r12,%r13)
jne 0x35bd3
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35b79
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35b86
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3657e
movl (%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35bc0
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35bcd
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3657e
movb $0x0, 0x15(%r12,%r13)
cmpl $0x9, 0x4(%rsp)
jg 0x35c68
cmpb $0x1, 0x1b9(%r12,%r13)
jne 0x35c68
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35c0d
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35c1a
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x3657e
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x35c3d
movl (%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x35c48
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x3657e
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x36242
movb $0x0, 0x1b9(%r12,%r13)
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x35721
movq 0x60(%rsp), %rdi
callq 0x2180
leaq 0x10(%rsp), %rdi
callq 0x3607c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
jmp 0x35cad
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3607c
movq %rbx, %rdi
callq 0x2230