Mossadegh was overthrown because the US came to the conclusion that he might be crazy; that he had no desire to have any kind of compromise solution to the Anglo-Iranian Oil crisis; that he was dangerously destabilizing Iran that would benefit the Communists; and that he might be an incipient dictator in the making.
At almost any point prior to the coup, if Mossadegh had simply declared victory, accepted the generous oil revenue sharing Anglo-Iranian had offered, and given back the Ango-Iranian assets, the crisis would have been over. It makes no rational sense why Mossadegh kept escalating the crisis but refusing to make any compromise with the British. This is what turned the US from being fairly pro-Mossadegh to anti.
Mossadegh had one of those mystical personalities that saw things in absolute terms, and completely identified himself with the nation at large. This was not unusual in the Third World decolonization period. But it does tend to make a mockery of any democratic credentials Mossadegh had. By the time the coup occurred, Mossadegh had neutered the Iranian parliament and was ruling by decree. He had concentrated power completely within his own hands and run roughshod over any semblance of Iranian constitutional practice. In effect, Mossadegh's precedent is what gave the Shah his power afterwards.
In addition, he had also alienated a lot of people within Iran. While he retained popularity, many of the organized political factions were actively against him, and the people's popularity was very fickle. From what I read, Mossadegh's fall was not really mourned by the people until resentment against the Shah in the 1970s created the need for a golden age where everything went wrong.
So depending on the POD, we have several scenarios.
1) Anglo-Iranian Oil offers concessions early, avoiding the crisis in the first place. Everyone stays happy. Iran continues to build its political institutions. The Shah stays relatively powerless. Mossadegh remains a popular figure, but it eventually voted out of office.
2) Anglo-Iranian doesnt compromise early, and Mossadegh nationalizes the oil company. However, after US intervention Mossadegh compromises and agrees to return assets back to Britain in return for additional concessions. The act is immediately unpopular, but Mossadegh weathers it and retains power and eventually convinces people that Iran won. While he does not rule as a tyrant (Mossadegh appears to have been consistent in wanting to avoid bloodshed), he continues monopolizing power in Iran, in effect becoming dictator. After he dies, some kind of return to democratic government happens, or the Shah takes over in a conservative backlash.
3) There is no compromise, but there is no coup, or the coup fails. The Shah flees. Mossadegh holds onto power until the regime destabilizes later in the 1950s as economic unrest and the Soviet backed Tudeh cause problems. The Islamic clerics are not as powerful at that time, so likely the military takes power. Since most military regimes end up stultifying the country, we likely have a redux of the 1979 Revolution sometimes in the 1970s. However, it's possible that the Shah returns (or if he is dead or ill, his son) and rallies the populace towards a restoration of the Shah as a constitutional monarchy that can unite all factions. This, of course, is the ultimate ironic option, but it is not necessarily the most likely option. It all depends on the specifics on how the regime turns out.
Given the pigheadedness of both Anglo-Iranian and Mossadegh, the first two options are unlikely, which leaves us with the third.