Allegri is pooping in his pants because he knows that a couple slips more and his seat will be underfire.
He definitely is ready to sacrifice rugani if that means saving face. In the end, is his job vs ruganis job, and oh yes he will prefer to see rugani gone before him getting fired.
The funny thing is that right now, chiellini is closer to getting him fired than rugani.