source 1998 Cohen--Miyaji--Ono "Efficient elliptic curve exponentiation using mixed coordinates", formula (5), plus common-subexpression elimination
compute Z1Z1 = Z1^2
compute Z2Z2 = Z2^2
compute U1 = X1 Z2Z2
compute U2 = X2 Z1Z1
compute S1 = Y1 Z2 Z2Z2
compute S2 = Y2 Z1 Z1Z1
compute H = U2-U1
compute HH = H^2
compute HHH = H HH
compute r = S2-S1
compute V = U1 HH
compute X3 = r^2-HHH-2 V
compute Y3 = r (V-X3)-S1 HHH
compute Z3 = Z1 Z2 H