Iraq and Libya, both of which seemed moderate compared to SA (Saddam less so then Qaddafi). Neither Iraq nor Libya have, to my knowledge, ever been used as an argument for why "we" have to unconditionally support SA, though. Neither of them have been an ally before "spreading democracy", so they don't make good analogies either imho.
Also, "unwavering ally" and "we'll remove their state and let the country fall into civil war" aren't the only options on the table.
>I believe the point is that sometimes a tyrant is worse than cutting off the head and seeing the hydra.
If the last several dictators ousted from nations in the middle east teaches us anything it's that we do not want the hydra. It cost trillions of dollars and thousands of lives to dump all the crap out of the Iraq vacuum. Egypt was teetering on the edge for quite awhile after the arab spring. Libya is still in ruins. Syria speaks for itself. Afghanistan is slipping back into Taliban control. Every time we touch it it gets worse.
While I think we can all agree that totalitarian rulers are not the global maximum they seem to be a pretty clear local maximum in the middle east. The situations that develop in their absence are so much worse on a "suffering per time" basis that it's basically impossible to justify trying to oust them.
Sometimes that may be true. In these examples it certainly hasn't, and has destabilized the whole region.
Even a bad ruler is better than anomie, especially for local minorities. The yazidis may not have been happy with Assad or Saddam, but I'm pretty sure they preferred them to ISIS and similar groups.
Also, "unwavering ally" and "we'll remove their state and let the country fall into civil war" aren't the only options on the table.