  We study the resonant prescribed T-curvature problem on a compact
4-dimensional Riemannian manifold with boundary. We derive sharp energy and
gradient estimates of the associated Euler-Lagrange functional to characterize
the critical points at infinity of the associated variational problem under a
non-degeneracy on a naturally associated Hamiltonian function. Using this, we
derive a Morse type lemma around the critical points at infinity. Using the
Morse lemma at infinity, we prove new existence results of Morse theoretical
type. Combining the Morse lemma at infinity and the Liouville version of the
Barycenter technique of Bahri-Coron[13] developed in [46], we prove new
existence results under a topological hypothesis on the boundary of the
underlying manifold, and the entry and exit sets at infinity.
