Task: Question Generation
Input (English): Passage: Abbasid power dwindled during the 10th century, when the empire disintegrated and was divided among a number of vassals. Most of the new rulers acknowledged the caliph as their nominal sovereign, a situation which continued until the Mongol destruction of the Abbasid Caliphate in 1258.In 955 Sayf al-Dawla, the Hamdanid prince of Aleppo, defeated the nomads near the city, and built a kasbah (fortress) in response to campaigns by the Byzantine emperors Nikephoros II Phokas and John I Tzimiskes. After the early-11th-century Hamdanid collapse, the region of Homs was controlled by the successor Mirdasid dynasty. Earthquakes devastated Palmyra in 1068 and 1089. In the 1070s Syria was conquered by the Seljuk Empire, and in 1082, the district of Homs came under the control of the Arab lord Khalaf ibn Mula'ib. The latter was a brigand and was removed and imprisoned in 1090 by the Seljuq sultan Malik-Shah I. Khalaf's lands were given to Malik-Shah's brother, Tutush I, who gained his independence after his brother's 1092 death and established a cadet branch of the Seljuk dynasty in Syria.
During the early 12th century Palmyra was ruled by Toghtekin, the Burid atabeg of Damascus, who appointed his nephew governor. Toghtekin's nephew was killed by rebels, and the atabeg retook the city in 1126. Palmyra was given to Toghtekin's grandson, Shihab-ud-din Mahmud, who was replaced by governor Yusuf ibn Firuz when Shihab-ud-din Mahmud returned to Damascus after his father Taj al-Muluk Buri succeeded Toghtekin. The Burids transformed the Temple of Bel into a citadel in 1132, fortifying the city, and transferring it to the Bin Qaraja family three years later in exchange for Homs.During the mid-12th century, Palmyra was ruled by the Zengid king Nur ad-Din Mahmud. It became part of the district of Homs, which was given as a fiefdom to the Ayyubid general Shirkuh in 1168 and confiscated after his death in 1169. Homs region was conquered by the Ayyubid sultanate in 1174; the following year, Saladin gave Homs (including Palmyra) to his cousin Nasir al-Din Muhammad as a fiefdom. After Saladin's death, the Ayyubid realm was divided and Palmyra was given to Nasir al-Din Muhammad's son Al-Mujahid Shirkuh II (who built the castle of Palmyra known as Fakhr-al-Din al-Maani Castle around 1230). Five years earlier, Syrian geographer Yaqut al-Hamawi described Palmyra's residents as living in "a castle surrounded by a stone wall".
Output (English): What is the full name of the ruler of Palmyra before it became part of the district of Homs?