Iran has provided the bulk of fighters for Assad, including Hezbollah, Shiite militias from Iraq, recruited Afghan mercenaries from the Afghan refugee population in Iran, as well as it's own IRGC and Quds Force troops. It has lost a significant number of its own soldiers and officers in direct combat and it recruited Russia to enter the war which has indiscriminately bombed civilian targets. But let's take a step back, if Iran had never entered the war on behalf of Assad, it is entirely probable that Assad leaves and the vast majority of the bloodshed is averted in the first place.