> Imagine if, Islam was opposing to the idea of science, as the largest religion of that area (which not only included Iran, but many others), what would happen?
We don't have to imagine. A shunning of empiricism and natural philosophy is one of the reasons the Islamic Golden Age came to an end. Islam as a religion was never a monolith, and like in Christianity some movements embrace science more than others, and their rise and fall in prominence is reflected in the society.
Traditionally the age is considered to have come to an end with the Mongol Siege of Baghdad, wherein the invaders sacked the city. Baghdad was the center of learning, and the fact that scholars from all around the empire (including non-Arab, and even non-Muslim) were able to travel to and, more importantly, find institutional support in Baghdad was one of the main drivers behind the age.
But institutional support had already begun to wane as a consequence of a theological shift in Arabic Islam from Mu'tazilism to Ash'arism. Ash'arism is often described as pro-rationalism, but compared to Mu'tazilism it was a significant regression, especially in terms of the motivation for official, institutional support for the study of natural philosophy. Despite the sacking, Baghdad recovered relatively quickly, but institutional support for natural philosophy never did recover.
Work in mathematics, medicine, and natural philosophy in the Islamic world didn't end. But it found much less support, and often came from the periphery, further away from the now more theologically conservative Arab world, and fragmented. Proximity is everything, especially before the age of telecommunications. There were no fewer geniuses in the Islamic world, but now they were cut off from each other. It's much like the Dark Ages in Europe--there was no shortage of smart people doing smart things, but they lost networking benefits and enjoyed less patronage.
We don't have to imagine. A shunning of empiricism and natural philosophy is one of the reasons the Islamic Golden Age came to an end. Islam as a religion was never a monolith, and like in Christianity some movements embrace science more than others, and their rise and fall in prominence is reflected in the society.