Iran didn't collapse, but no one can deny it got its handed to them in a very embarassing manner. It's one thing for your enemy have superior fire power over you. It's another for your country to be known for having one of the most ruthless internal security apparatuses in the world and yet be so compromised, foreign agents are able to set up literal drone bases near your capital. Iran still had strategic depth and could've salvaged the situation if they pushed forward with nukes and rallied its population. Instead, it still continued to pussyfoot on nukes in the hopes of reaching some kind of deal with US and continued to alienate its population with its corruption and poor policies. Like seriously, Iran is a desert country and you mean to tell me the government couldn't even manage its water resources properly?
To all the people who want the ministry of foreign affairs to basically to slam the file documents down on a table and go, "Fine, I'll do it myself!" like in a movie, how much engagement is the CPC responsible for? With the level of competence Iran displayed, nothing short of occupying the country like what Trump wants with Venezuela would turn it around. Sure, some would point to Ukraine, but on top of being a multi-nation effort in addition to the US, Ukraine despite its poverty and corruption was motivated to defend themselves against the Russians because they all had the hope of building their country to mirror a Western European one. On the other hand, the Islamic revolutionary ideaology was basically forced on Iran's population, so outside of external threats like Saddam and Israel its people are not motivated in the slightest to die for it. For China, supporting it would be tantamount to the US's support for the Islamic Republic of Afghanistan, ie. a total money sinkhole.
Best to see how the situation unfolds and work with whatever.