Yevamos8: 2
אֵיזֶהוּ פְּצוּעַ דַּכָּא? כֹּל שֶׁנִּפְצְעוּ הַבֵּיצִים שֶׁלּוֹ, וַאֲפִלּוּ אַחַת מֵהֶן. וּכְרוּת שָׁפְכָה? כֹּל שֶׁנִּכְרַת הַגִּיד; וְאִם נִשְׁתַּיֵּר מֵהָעֲטָרָה אֲפִלּוּ כְּחוּט הַשַּׂעֲרָה — כָּשֵׁר.  פְּצוּעַ דַּכָּא וּכְרוּת שָׁפְכָה מֻתָּרִין בְּגִיּוֹרֶת וּמְשֻׁחְרֶרֶת, וְאֵינָן אֲסוּרִין אֶלָּא מִלָּבוֹא בַקָּהָל, שֶׁנֶּאֱמַר (דברים כג, ב): ,,לֹא יָבֹא פְצוּעַ דַּכָּא וּכְרוּת שָׁפְכָה בִּקְהַל ה' ”.
Who is [considered] someone with mutilated testicles? Anyone whose testicles were cut, even if only one of them. And [who is considered] a person whose phallus was severed? Anyone whose phallus was cut off; [however,] if even a hairsbreadth of the corona remained, he is fit.  Persons with mutilated testicles or a severed phallus are permitted to [marry] a convert or an emancipated slavewoman; they are forbidden only to enter into the congregation, as it is stated (Deut. 23:2): A person with mutilated testicles or a severed phallus may not enter the congregation of God.
Yevamos8: 3
עַמּוֹנִי וּמוֹאָבִי אֲסוּרִים, וְאִסּוּרָן אִסּוּר עוֹלָם, אֲבָל נְקֵבוֹתֵיהֶם מֻתָּרוֹת מִיָּד. מִצְרִי וַאֲדוֹמִי אֵינָם אֲסוּרִים אֶלָּא עַד שְׁלֹשָׁה דוֹרוֹת, אֶחָד זְכָרִים וְאֶחָד נְקֵבוֹת. רַבִּי שִׁמְעוֹן מַתִּיר אֶת הַנְּקֵבוֹת מִיָּד. אָמַר רַבִּי שִׁמְעוֹן: קַל וָחֹמֶר הַדְּבָרִים, וּמָה אִם בִּמְקוֹם שֶׁאָסַר אֶת הַזְּכָרִים אִסּוּר עוֹלָם, הִתִּיר אֶת הַנְּקֵבוֹת מִיָּד — מָקוֹם שֶׁלֹּא אָסַר אֶת הַזְּכָרִים אֶלָּא עַד שְׁלֹשָׁה דוֹרוֹת, אֵינוֹ דִין שֶׁנַּתִּיר אֶת הַנְּקֵבוֹת מִיָּד! אָמְרוּ לוֹ: אִם הֲלָכָה — נְקַבֵּל, וְאִם לְדִין — יֵשׁ תְּשׁוּבָה. אָמַר לָהֶם: לֹא כִי, הֲלָכָה אֲנִי אוֹמֵר. מַמְזֵרִין וּנְתִינִין אֲסוּרִין, וְאִסּוּרָן אִסּוּר עוֹלָם, אֶחָד זְכָרִים וְאֶחָד נְקֵבוֹת.
The Ammonite and the Moabite are prohibited [from marrying into the congregation], and their prohibition is per- petual. However, their women are permitted immediately. The Egyptian and the Edomite are prohibited [from marrying into the congregation] only until three generations, both males and females. R' Shimon permits the females immediately. R' Shimon said: This matter is [subject to] a fortiori reasoning —- if, in the case where the males were prohibited perpetually, the females were permitted immediately; then [how much more so] in the case where the males were prohibited only until three generations, that the females should be permitted immediately! They replied to him: If this is a precept [handed down], we will accept [it], but if it is a ruling, there is a rebuttal [to it]. He said to them: Not so, what I say is a precept. Mamzerim and Nesinites are prohibited [from marrying into the congregation], and their prohibition is perpetual, both male and female.