[Machine] The Messenger of Allah ﷺ said, "When the sperm settles in the womb for forty days or forty nights, an angel is sent to it and asks, 'O Lord, what will be its provision?' And it is said to him, 'O Lord, what will be its lifespan?' And it is said to him, 'O Lord, will it be a male or a female?' Then it is informed, and it says, 'O Lord, will it be miserable or happy?' Then it is informed."
قَالَ رَسُولُ اللهِ ﷺ إِذَا اسْتَقَرَّتْ النُّطْفَةُ فِيالرَّحِمِ أَرْبَعِينَ يَوْمًا أَوْ أَرْبَعِينَ لَيْلَةً بَعَثَ إِلَيْهَا مَلَكًا فَيَقُولُ يَا رَبِّ مَا رِزْقُهُ؟ فَيُقَالُ لَهُ فَيَقُولُ يَا رَبِّ مَا أَجَلُهُ؟ فَيُقَالُ لَهُ فَيَقُولُ يَا رَبِّ ذَكَرٌ أَوْ أُنْثَى؟ فَيُعْلَمُ فَيَقُولُ يَا رَبِّ شَقِيٌّ أَمْ سَعِيدٌ؟ فَيُعْلَمُ