  We derive the two-loop Bethe ansatz for the sl(2) twist operator sector of
N=4 gauge theory directly from the field theory. We then analyze a recently
proposed perturbative asymptotic all-loop Bethe ansatz in the limit of large
spacetime spin at large but finite twist, and find a novel all-loop scaling
function. This function obeys the Kotikov-Lipatov transcendentality principle
and does not depend on the twist. Under the assumption that one may extrapolate
back to leading twist, our result yields an all-loop prediction for the
large-spin anomalous dimensions of twist-two operators. The latter also appears
as an undetermined function in a recent conjecture of Bern, Dixon and Smirnov
for the all-loop structure of the maximally helicity violating (MHV) n-point
gluon amplitudes of N=4 gauge theory. This potentially establishes a direct
link between the worldsheet and the spacetime S-matrix approach. A further
assumption for the validity of our prediction is that perturbative BMN
(Berenstein-Maldacena-Nastase) scaling does not break down at four loops, or
beyond. We also discuss how the result gets modified if BMN scaling does break
down. Finally, we show that our result qualitatively agrees at strong coupling
with a prediction of string theory.
