Interplay between superconductivity and non-Fermi liquid at a quantum critical point in a metal. IV. The γ model and its phase diagram at 1