Complex sentence: Later in the medieval Maghrib, elaborate but fictitious genealogies would be created on the assumed foundation of an ancient Yemeni origin of the Berber people, which genealogies were mocked by Ibn Hazm (994-1064) and discounted by Ibn Khaldun (1332--1406).
Split into simpler sentences: Later in the medieval Maghrib, elaborate but fictitious genealogies would be created on the assumed foundation of an ancient Yemeni origin of the Berber people. Those fake Yemeni origins and genealogies of the Berbers were mocked by Ibn Hazm (994-1064) and discounted by Ibn Khaldun (1332--1406).