  We extend the maximal-unitarity formalism at two loops to double-box
integrals with four massive external legs. These are relevant for higher-point
processes, as well as for heavy vector rescattering, VV -> VV. In this
formalism, the two-loop amplitude is expanded over a basis of integrals. We
obtain formulas for the coefficients of the double-box integrals, expressing
them as products of tree-level amplitudes integrated over specific complex
multidimensional contours. The contours are subject to the consistency
condition that integrals over them annihilate any integrand whose integral over
real Minkowski space vanishes. These include integrals over parity-odd
integrands and total derivatives arising from integration-by-parts (IBP)
identities. We find that, unlike the zero- through three-mass cases, the IBP
identities impose no constraints on the contours in the four-mass case. We also
discuss the algebraic varieties connected with various double-box integrals,
and show how discrete symmetries of these varieties largely determine the
constraints.
