First you should know that law enforcement in the Middle East depends a lot on the people rather than the law, for instance, check Article Two of the Egyptian Constitution, it says that "Islam is the religion of the state, Arabic is its language, and the Islamic Sharia is the main source of law", however, I don't think that in all past decades any of these Islamic laws have been applied.
The answers to your questions:
What exactly is illegal in Iran w.r.t. religious non-belief, if anything? Specifically, if you're an Atheist, and you say out loud that you don't believe in the existence of gods or supernatural phenomena etc. - have you violated Iranian law?
I'd say it's allowed only by the people: no one (either in the government or the Iranian societies) will give much attention about that, unless you tried to make a lot of hubbub. Something you should know about apostasy in Islam: the unanimous law between Muslims scholars says that "whoever is in charge of apostasy, should have been Ostatab يُستتاب (Be asked for showing repentance), and if he did not, he should be killed". I think anyone in such situation will be capable of showing repentance.
However, a lot of Muslims scholars are confused about what you should do to be accused of apostasy? In the era of the caliphate, and in the first war on the apostates, one of the main reasons for the war was that they violated the law and refrained from paying zakat. Some of them interpret the Hudud of apostasy as a Hudud of normal law rather than belief.
A tyrannical country will make use of those nominal laws just to arrest opponents. It happens a lot in Egypt, the law enforcement forces don't care a lot of you if you're cursing Muslims and criticizing Islam, but if you said something bad about the governor, you will be tried in an Islamic court from the eleventh century. Same thing applies in Iran.
Do people get prosecuted for holding atheist views? For expressing atheist views? For promoting atheism?
By people? No, "The average American is slightly more religious than the average Iranian" says Robert Putnam. Of course, you may experience some harassment.