Reference for Niddah 3:5
הַמַּפֶּלֶת טֻמְטוּם, וְאַנְדְּרוֹגִינוֹס, תֵּשֵׁב לְזָכָר וְלִנְקֵבָה. טֻמְטוּם וְזָכָר, אַנְדְּרוֹגִינוֹס וְזָכָר, תֵּשֵׁב לְזָכָר וְלִנְקֵבָה. טֻמְטוּם וּנְקֵבָה, אַנְדְּרוֹגִינוֹס וּנְקֵבָה, תֵּשֵׁב לִנְקֵבָה בִלְבָד. יָצָא מְחֻתָּךְ אוֹ מְסֹרָס, מִשֶּׁיָּצָא רֻבּוֹ, הֲרֵי הוּא כְיָלוּד. יָצָא כְדַרְכּוֹ, עַד שֶׁיֵּצֵא רֹב רֹאשׁוֹ. וְאֵיזֶהוּ רֹב רֹאשׁוֹ, מִשֶּׁתֵּצֵא פַדַּחְתּוֹ:
If she miscarries an asexual [fetus], or an androgynous [fetus], she should sit for [the number of days of impurity and purity required for one who gives birth to] a male and for [one who gives birth to] a female. If [she miscarries] an asexual [fetus] and a male [fetus, at once], or an androgynous and a male, she should sit for [the required number of days for one who gives birth to] a male and for [one who gives birth to] a female. If [she miscarries] an asexual [fetus] and a female [fetus, at once], or an androgynous and a female, she should sit only for [the required number of days for one who gives birth to] a female. If it emerged in pieces or backwards, once the majority of it has emerged it is regarded as having been born. If it came out normally, [it is not considered born] until the majority of its head has emerged. And what is [considered to be] the majority of its head? Once its forehead emerges.