Maseches Beitzah, Chapter 3, Mishnah 4. This mishnah deals with the laws of Yom Tov as they apply to a firstborn animal.
Halachic background - the law of a firstborn animal:
When the Beis HaMikdash stood, a firstborn animal was brought as an offering in the Beis HaMikdash.
Even nowadays, when there is no Beis HaMikdash, the only way it may be eaten is if it developed a blemish that disqualifies it. Then it may be eaten outside the Beis HaMikdash even today.
As long as it has not been established that the firstborn has a blemish that permits it, it is muktzeh, and it may not be used or eaten on Yom Tov. And if the blemish appeared on Yom Tov itself, then at the onset of Yom Tov it was muktzeh, and it retains that status even though a blemish later developed.
The case in the mishnah:
"Bechor shenafal labor" - the case is a firstborn that may have developed a blemish before Yom Tov, except that it was not determined before Yom Tov whether the blemish is indeed of the type that permits it, perhaps it is not significant enough or is not permanent, and it needs to be examined. This firstborn fell into a pit, and there is also no way to bring it up from there, since perhaps it is muktzeh.
The view of Rabbi Yehudah:
Rabbi Yehudah says: "Yeired mumcheh veyireh" - an expert should go down into the pit, a person who is well versed in the halachah and knows how to determine whether the blemish is valid, and he will see whether the animal has a blemish. That is, whether the blemish that was on the animal before Yom Tov was significant and permanent enough.
"Im yeish bo mum - yaaleh veyishchot" - if that is indeed the case, the animal is brought up out of the pit and slaughtered, since it was already in the person's mind and intention before Yom Tov, and it is not considered muktzeh.
"Ve'im lav - lo yishchot" - if the expert went down and determined that one cannot say with certainty that the animal had a valid blemish before Yom Tov. And even though it does have a blemish now - and that is indeed how it must be, since the only way to slaughter it now is if it has a blemish - nevertheless, since it is not known whether the blemish it has now was already on it before Yom Tov, it falls into the category of a doubtful muktzeh. Therefore it is not slaughtered, and consequently it is also not brought up out of the pit, since it is not known that it had a blemish before the onset of Yom Tov.
The view of Rabbi Shimon:
Rabbi Shimon says: "Kol she'ein mumo nikar be'od yom - ein zeh min hamuchan" - anything whose blemish could not be determined, or was not evident, before the onset of Yom Tov is not considered 'prepared'. 'Prepared' is the opposite of 'muktzeh': muktzeh is something that was removed from one's mind, whereas 'prepared' is something that stands ready and available for use. This firstborn is not prepared, and therefore its status is that of muktzeh, unless we had a ruling in hand, meaning that the halachah was established that this is a blemish before Yom Tov began.
There are commentators who understand Rabbi Shimon to mean that his concern is not on account of muktzeh itself, since Rabbi Shimon generally does not hold of muktzeh in this manner. Rather, his concern is that one is not permitted to rule and establish the halachic status of the blemish on Yom Tov, since this is like a case of judgment brought before him. And as they said, one is not permitted to judge certain types of cases on Yom Tov - an actual ruling on the matter, as opposed to merely stating a halachah.
Therefore Rabbi Shimon says: if the matter was not determined before Yom Tov, it may not be determined on Yom Tov. And even if the blemish itself was already on the animal from before Yom Tov, this is not something that may be done on Yom Tov.
In summary: In this mishnah we learned the law of a firstborn that fell into a pit on Yom Tov, where it is not known whether its blemish permits it. According to Rabbi Yehudah, an expert goes down and examines it: if it has a blemish, he brings it up and slaughters it, since it was in his mind from before Yom Tov; and if not, he does not slaughter it, because the animal is in the category of muktzeh. And according to Rabbi Shimon, anything whose blemish was not evident while it was still day is not considered prepared, and its status may not be determined on Yom Tov.