  We study the thermodynamics of U(N) N=4 Super Yang-Mills (SYM) on RxS^3 with
non-zero chemical potentials for the SU(4) R-symmetry. We find that when we are
near a point with zero temperature and critical chemical potential, N=4 SYM on
RxS^3 reduces to a quantum mechanical theory. We identify three such critical
regions giving rise to three different quantum mechanical theories. Two of them
have a Hilbert space given by the SU(2) and SU(2|3) sectors of N=4 SYM of
recent interest in the study of integrability, while the third one is the
half-BPS sector dual to bubbling AdS geometries. In the planar limit the three
quantum mechanical theories can be seen as spin chains. In particular, we
identify a near-critical region in which N=4 SYM on RxS^3 essentially reduces
to the ferromagnetic XXX_{1/2} Heisenberg spin chain. We find furthermore a
limit in which this relation becomes exact.
