 The defeat of Apep and the meeting with Osiris ensured the rising of the sun the next morning, an event that represented rebirth and the victory of order over chaos.The procedures for religious rituals were frequently written on papyri, which were used as instructions for those performing the ritual.These ritual texts were kept mainly in the temple libraries.