  We compute the conservative two-body Hamiltonian of a compact binary system
with a spinning black hole through $\mathcal{O}(G^3)$ to all orders in
velocity, including linear and quadratic spin terms. To obtain our results we
calculate the classical limit of the two-loop amplitude for the scattering of a
massive scalar particle with a massive spin-1 particle minimally coupled to
gravity. We employ modern scattering amplitude and loop integration techniques,
in particular numerical unitarity, integration-by-parts identities, and the
method of regions. The conservative potential in terms of rest-frame spin
vectors is extracted by matching to a non-relativistic effective field theory.
We also apply the Kosower-Maybee-O'Connell (KMOC) formalism to calculate the
impulse in the covariant spin formalism directly from the amplitude. We work
systematically in conventional dimensional regularization and explicitly
evaluate all divergent integrals that appear in full- and effective-theory
amplitudes, as well as in the phase-space integrals that arise in the KMOC
formalism.
