// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rsi, %rbx
movsd %xmm2, 0x10(%rsp)
movq %rdi, %r14
movsd 0x1f48(%rip), %xmm2     # 0x2f018
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 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x2db00
leaq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x279f4
movsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd 0x1eea(%rip), %xmm3     # 0x2f018
movsd %xmm0, 0x10(%rsp)
addsd %xmm0, %xmm3
leaq 0x58(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movapd 0x20(%rsp), %xmm2
callq 0x2db1e
movsd 0x10(%rsp), %xmm0
testb %al, %al
je 0x2d31d
movapd 0x1eda(%rip), %xmm2     # 0x2f040
xorpd 0x20(%rsp), %xmm2
movsd 0x1ea4(%rip), %xmm3     # 0x2f018
subsd %xmm0, %xmm3
leaq 0x58(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
callq 0x2db1e
testb %al, %al
je 0x2d31d
movsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd 0x20(%r14), %xmm2
xorpd 0x1e96(%rip), %xmm2     # 0x2f040
movapd 0x30(%rsp), %xmm1
mulsd %xmm1, %xmm2
mulsd 0x20(%rsp), %xmm2
movsd 0x1e56(%rip), %xmm3     # 0x2f018
movsd %xmm0, 0x8(%rsp)
addsd %xmm0, %xmm3
leaq 0x58(%rsp), %rdi
xorpd %xmm0, %xmm0
callq 0x2db1e
testb %al, %al
je 0x2d31d
movapd 0x1e56(%rip), %xmm1     # 0x2f040
movapd 0x30(%rsp), %xmm0
xorpd %xmm0, %xmm1
movsd 0x20(%r14), %xmm2
mulsd %xmm0, %xmm2
mulsd 0x20(%rsp), %xmm2
movsd 0x1e0c(%rip), %xmm3     # 0x2f018
subsd 0x8(%rsp), %xmm3
leaq 0x58(%rsp), %rdi
xorpd %xmm0, %xmm0
callq 0x2db1e
testb %al, %al
je 0x2d31d
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 0x1de1(%rip), %xmm1     # 0x2f040
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 0x1d8b(%rip), %xmm3     # 0x2f018
movsd %xmm4, (%rsp)
addsd %xmm4, %xmm3
leaq 0x58(%rsp), %rdi
callq 0x2db1e
testb %al, %al
je 0x2d31d
movapd 0x1d94(%rip), %xmm0     # 0x2f040
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 0x1d2a(%rip), %xmm3     # 0x2f018
subsd (%rsp), %xmm3
leaq 0x58(%rsp), %rdi
callq 0x2db1e
testb %al, %al
je 0x2d31d
leaq 0x58(%rsp), %rdi
callq 0x69f6
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movb $0x1, %bl
jmp 0x2d31f
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
callq 0x5744
movl %ebx, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x5744
movq %rbx, %rdi
callq 0x2220
nop