This might be what Iran will have to choose. If they are to save their regime and take the time to root out the infiltration problem they have as well as work quietly on all their interests.
They will need a security guarantor to ensure if they stop, they won’t be attack sporadically in their rebuilding phase. Otherwise they will have to plan to do it alone and take their chances. Russia is the country likely to back Iran. Iran will also need to buy arms after this and it only looks like Russia will sell it to them. Equipment like the Su-75, S-400, and everything else Russia has learned from the Ukraine war. Acquisitions funded by oil sales to China and India.