We did side with the Shah. But for the years after Vietnam, Watergate, and the oil embargo, we were too scared as a nation to do bold things like defend him when the idiot college students and theocrats threatened him.
Just asking who you mean by “we”. Carter did not side with the Shah.
Iran did not join the oil embargo.
Then this hypothetical president would have made a deal with the USSR not to get involved in arming the resistance. We would have had to allow the Soviets a free hand in Afghanistan but we now know the world and the USA would have been better off if we had done that.
We invade Iran. Occupy it with our large drafted army and enforce secularization and install the Shah's kid as a constitutional westernizing monarch. Do to Iran what we did to the Japanese and their fanatic Shinto-Bushido religion.
Iran would be America's base of operation to this day and the Middle East would have been a better place. No Iran/Iraq war, and no 9/11 because we stayed out of Afghanistan.
The USSR falls the same way at the same time - maybe collapses even earlier due to cheap oil.