// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/voro++/src/unitcell.cc
// Function: voro::unitcell::intersects_image(double, double, double, double&)
bool unitcell::intersects_image(double dx,double dy,double dz,double &vol) {
	const double bxinv=1/bx,byinv=1/by,bzinv=1/bz,ivol=bxinv*byinv*bzinv;
	voronoicell c;
	c=unit_voro;
	dx*=2;dy*=2;dz*=2;
	if(!c.plane(0,0,bzinv,dz+1)) return false;
	if(!c.plane(0,0,-bzinv,-dz+1)) return false;
	if(!c.plane(0,byinv,-byz*byinv*bzinv,dy+1)) return false;
	if(!c.plane(0,-byinv,byz*byinv*bzinv,-dy+1)) return false;
	if(!c.plane(bxinv,-bxy*bxinv*byinv,(bxy*byz-by*bxz)*ivol,dx+1)) return false;
	if(!c.plane(-bxinv,bxy*bxinv*byinv,(-bxy*byz+by*bxz)*ivol,-dx+1)) return false;
	vol=c.volume()*ivol;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %rbx
movsd %xmm2, 0x10(%rsp)
movq %rdi, %r14
movsd 0x1c9a(%rip), %xmm2     # 0x37008
movapd %xmm2, %xmm3
divsd (%rdi), %xmm3
movapd %xmm3, 0x40(%rsp)
movsd %xmm1, 0x8(%rsp)
movapd %xmm2, %xmm1
divsd 0x10(%rdi), %xmm1
movapd %xmm1, 0x30(%rsp)
movsd %xmm0, (%rsp)
divsd 0x28(%rdi), %xmm2
movapd %xmm2, 0x20(%rsp)
leaq 0x50(%rsp), %r12
movsd 0x8212(%rip), %xmm0     # 0x3d5c0
movq %r12, %rdi
callq 0x6c50
leaq 0x1080b(%rip), %rax     # 0x45bc8
movq %rax, (%r12)
leaq 0x30(%r14), %r15
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x10e24
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x6fac
movsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd 0x1c16(%rip), %xmm3     # 0x37008
movsd %xmm0, 0x10(%rsp)
addsd %xmm0, %xmm3
leaq 0x50(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %rdi, %rsi
movapd 0x20(%rsp), %xmm2
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
movapd 0x1c07(%rip), %xmm2     # 0x37030
xorpd 0x20(%rsp), %xmm2
movsd 0x1bd1(%rip), %xmm3     # 0x37008
subsd 0x10(%rsp), %xmm3
leaq 0x50(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %rdi, %rsi
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
movsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd 0x20(%r14), %xmm2
xorpd 0x1bbc(%rip), %xmm2     # 0x37030
movapd 0x30(%rsp), %xmm1
mulsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
movsd 0x1b7c(%rip), %xmm3     # 0x37008
movsd %xmm0, 0x8(%rsp)
addsd %xmm0, %xmm3
leaq 0x50(%rsp), %rdi
xorpd %xmm0, %xmm0
movq %rdi, %rsi
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
movapd 0x1b77(%rip), %xmm1     # 0x37030
movapd 0x30(%rsp), %xmm0
xorpd %xmm0, %xmm1
movsd 0x20(%r14), %xmm2
mulsd %xmm0, %xmm2
mulsd 0x20(%rsp), %xmm2
movsd 0x1b2d(%rip), %xmm3     # 0x37008
subsd 0x8(%rsp), %xmm3
leaq 0x50(%rsp), %rdi
xorpd %xmm0, %xmm0
movq %rdi, %rsi
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
movapd 0x40(%rsp), %xmm0
movapd %xmm0, %xmm6
movapd 0x30(%rsp), %xmm3
mulsd %xmm3, %xmm6
mulsd 0x20(%rsp), %xmm6
movsd (%rsp), %xmm4
addsd %xmm4, %xmm4
movsd 0x8(%r14), %xmm2
movsd 0x18(%r14), %xmm5
movapd 0x1afd(%rip), %xmm1     # 0x37030
xorpd %xmm2, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm3, %xmm1
mulsd 0x10(%r14), %xmm5
mulsd 0x20(%r14), %xmm2
subsd %xmm5, %xmm2
movapd %xmm6, 0x10(%rsp)
mulsd %xmm6, %xmm2
movsd 0x1aa7(%rip), %xmm3     # 0x37008
movsd %xmm4, (%rsp)
addsd %xmm4, %xmm3
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
movapd 0x1aab(%rip), %xmm0     # 0x37030
movapd 0x40(%rsp), %xmm4
xorpd %xmm4, %xmm0
movsd 0x8(%r14), %xmm3
movsd 0x10(%r14), %xmm2
mulsd %xmm3, %xmm4
mulsd 0x18(%r14), %xmm2
mulsd 0x20(%r14), %xmm3
movapd 0x30(%rsp), %xmm1
mulsd %xmm4, %xmm1
subsd %xmm3, %xmm2
mulsd 0x10(%rsp), %xmm2
movsd 0x1a41(%rip), %xmm3     # 0x37008
subsd (%rsp), %xmm3
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
xorl %edx, %edx
callq 0xc07c
testb %al, %al
je 0x355fb
leaq 0x50(%rsp), %rdi
callq 0x84ce
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movb $0x1, %bl
jmp 0x355fd
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
callq 0x6eca
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x6eca
movq %rbx, %rdi
callq 0x2230
nop