(Job 29:4:) "When I was in the days of my youth (chorfi) [in the secret counsel of God upon my tent (ibid.)] — this speaks of the infant." Just as the rain toils in the soil and it becomes muddied, so the infant is muddied within its mother's womb. ("In the secret counsel of God upon my tent" (ibid.) — this speaks of the infant.) And just as the infant remains muddied, [so a person is muddied] by sins, and troubles come upon him. At that hour he said (Job 29:2), "O that I were as in the months of old" — and would that I had the days that I had when I was in my mother's belly! What does he say at the last? (Job 29:4) "When I was in the days of my youth." Rabbi Abbahu said: The infant comes out of its mother's belly full of slime and full of blood, and all praise it and cherish it — and all the more when it is a male. Hence (Lev. 12:2), "When a woman emits seed and bears a male."
The Muddied Infant and Job's Longing for the Womb in Tazria
Midrash Tanchuma Buber, Tazria 1:3
כאשר הייתי בימי חרפי [בסוד אלוה עלי אהלי (שם שם ד), מדבר בתינוק] כשם שהגשם טורחת בקרקע ומלוכלך, כך התינוק מלוכלך במעי אמו, (בסוד אלוה עלי אהלי (שם) מדבר בתינוק), וכשם שהתינוק עומד מלוכלך, [כך אדם מלוכלך] בעונות והצרות באות עליו, אותה שעה אמר מי יתנני כירחי קדם, ולואי היו לי הימים שהייתי במעי אמי, מהו אומר באחרונה, כאשר היתי בימי חרפי, אמר ר' אבהו התינוק יוצא ממעי אמו מלא רירין ומלא דם וכל משבחין ומחבבין, אותו, וביותר כשהוא זכר, הוי אשה כי תזריע וילדה זכר.