  A dirty BCS superconductor with magnetic impurities is studied. Asymptotic
solution of the thermodynamics of such superconductor with spin $1/2$ and $7/2$
magnetic impurities, is found. To this end, the system's free energy $f(H,
\beta)$ is bounded from above and below by mean-field type bounds, which are
shown to coalesce almost exactly in the thermodynamic limit, provided the
impurity concentration is sufficiently small. The resulting mean-field
equations for the gap $\Delta$ and a parameter $\nu$, characterizing the
impurity subsystem, are solved and the solution minimizing $f$ is found for
various values of magnetic coupling constant $g$ and impurity concentration
$x$. The phase diagrams of the system are depicted with five distinct phases:
the normal phase, unperturbed superconducting phase, perturbed superconducting
phase with nonzero gap in the excitation spectrum, perturbed gapless
superconducting phase and impurity phase with completely suppressed
superconductivity. Furthermore, evidence of reentrant superconductivity and
Jaccarino-Peter compensation is found. The credibility of the theory is
verified by testing the dependence of the superconducting transition
temperature $T_{\text{c}}$ on $x$. Very good quantitative agreement with
experimental data is obtained for several alloys: (La$_{1-x}$Ce$_{x}$)Al$_{2}$,
(La$_{1-x}$Gd$_{x}$)Al$_{2}$ and (La$_{0.8-x}$Y$_{0.20}$)Ce$_{x}$. The theory
presented improves earlier developments in this field.
