נזיר ו:י · Nazir 6:10

גִּלַּח עַל הַזֶּבַח וְנִמְצָא פָסוּל, תִּגְלַחְתּוֹ פְסוּלָה, וּזְבָחָיו לֹא עָלוּ לוֹ. גִּלַּח עַל הַחַטָּאת שֶׁלֹּא לִשְׁמָהּ וְאַחַר כָּךְ הֵבִיא קָרְבְּנוֹתָיו לִשְׁמָן, תִּגְלַחְתּוֹ פְסוּלָה, וּזְבָחָיו לֹא עָלוּ לוֹ. גִּלַּח עַל הָעוֹלָה אוֹ עַל הַשְּׁלָמִים שֶׁלֹּא לִשְׁמָן וְאַחַר כָּךְ הֵבִיא קָרְבְּנוֹתָיו לִשְׁמָן, תִּגְלַחְתּוֹ פְסוּלָה, וּזְבָחָיו לֹא עָלוּ לוֹ. רַבִּי שִׁמְעוֹן אוֹמֵר, אוֹתוֹ הַזֶּבַח לֹא עָלָה לוֹ, אֲבָל שְׁאָר זְבָחִים עָלוּ לוֹ. וְאִם גִּלַּח עַל שְׁלָשְׁתָּן וְנִמְצָא אֶחָד מֵהֶן כָּשֵׁר, תִּגְלַחְתּוֹ כְשֵׁרָה, וְיָבִיא שְׁאָר הַזְּבָחִים:
As taught earlier (45a) the nazirite shaves after having brought one, or all, of his offerings. This mishna discusses what the halakha is if the offering was found to be invalid after the nazirite had shaved. If a nazirite shaved based upon the requisite offering, and afterward the offering was found to be invalid for any reason, his shaving is invalid and his offerings do not count toward the fulfillment of his obligation. If he shaved based upon the sin-offering, that was found to have been sacrificed not for its own sake, which invalidates the offering, and afterward he brought his other offerings for their own sake, his shaving is invalid and his other offerings do not count toward the fulfillment of his obligation. If he shaved based upon the requisite burnt-offering or having brought the requisite peace-offering, and these were offered not for their own sake, and afterward he brought his remaining offerings for their own sake, his shaving is invalid and his offerings do not count toward the fulfillment of his obligation. Rabbi Shimon says: In the case of one who shaved based upon a burnt-offering or a peace-offering that was sacrificed not for its own sake, that offering, which was performed incorrectly, does not count toward the fulfillment of his obligation; however, his other offerings do count. And everyone agrees that if he shaved based upon all three of them, i.e., he brought all three offerings, without specifying which offering he is basing his shaving upon, and even one of them was found valid, his shaving is valid, but he must bring the other offerings in order to fulfill his obligation.

Word-by-word Breakdown (מילים ושרשים)

גִּלַּח → shaved [ג - ל - ח]עַל → upon הַזֶּבַח → the offering [ז - ב - ח]וְנִמְצָא → and was found [מ - צ - א]פָסוּל → invalid [פ - ס - ל]תִּגְלַחְתּוֹ → his shaving [ג - ל - ח]פְסוּלָה → is invalid [פ - ס - ל]וּזְבָחָיו → and his offerings [ז - ב - ח]לֹא → not עָלוּ → count [ע - ל - ה]לוֹ → for him גִּלַּח → shaved [ג - ל - ח]עַל → upon הַחַטָּאת → the sin-offering [ח - ט - א]שֶׁלֹּא → that not לִשְׁמָהּ → for its own sake [ש - מ - ה]וְאַחַר → and afterward [א - ח - ר]כָּךְ → so [כ - ו - ן]הֵבִיא → he brought [ב - ו - א]קָרְבְּנוֹתָיו → his offerings [ק - ר - ב]לִשְׁמָן → for their own sake [ש - מ - ה]תִּגְלַחְתּוֹ → his shaving [ג - ל - ח]פְסוּלָה → is invalid [פ - ס - ל]וּזְבָחָיו → and his offerings [ז - ב - ח]לֹא → not עָלוּ → count [ע - ל - ה]לוֹ → for him גִּלַּח → shaved [ג - ל - ח]עַל → upon הָעוֹלָה → the burnt-offering [ע - ל - ה]אוֹ → or עַל → upon הַשְּׁלָמִים → the peace-offerings [ש - ל - ם]שֶׁלֹּא → that not לִשְׁמָן → for their own sake [ש - מ - ה]