Chullin, Chapter 4, Mishnah 2. This chapter continues to deal with animals in the middle of labor and with the halachic standing of the fetus while it is still inside its mother. Here the Mishnah presents a case with an added layer: the animal in labor is a mevakeret, one giving birth for the first time, so the offspring emerging from her is a bechor, a firstborn male, which becomes sacred at the very moment of its birth.
A word of background. The firstborn male of a cow, a sheep or a goat carries sanctity automatically, with no act of dedication by its owner. It is given to a kohen, offered as a korban, and its meat is eaten by kohanim. And because that sanctity is real, it also carries a consequence: should the animal die before it is offered, no benefit at all may be derived from it, and it is buried.
So when does that sanctity begin? Not before birth. The Torah, in speaking of the firstborn, uses the term yuvalad, tying bechorah to an animal that has actually come out into the world through birth. As long as the young animal remains within its mother, then, it has no sanctity upon it at all. The result is arresting in its bluntness: a person may sever limbs from that fetus and hand them over to his dogs.
The case of the Mishnah
"HaMevakeret hamakshah leled": an animal bearing her first offspring is having a difficult labor. The delivery is not proceeding in the normal way; individual limbs are presenting themselves and emerging one at a time. In such a case, says the Mishnah, "mechattech evar evar umashlich lakelavim," the owner may cut off limb after limb as each one comes out and throw them to the dogs.
Why is this permitted? Because as long as neither the majority of the fetus nor its head has emerged from the mother's body, the fetus is not yet considered born. And if it is not born, the sanctity of bechorah has never taken effect, so there is no prohibition against deriving benefit from what is removed.
What makes this permissible? The fetus is not deemed to have been born until either its head or the greater part of its body has left its mother. Since it has not been born, bechorah sanctity never attached to it in the first place, and nothing that is detached from it is off limits for benefit.
The mother is exempt either way
The Mishnah ends with the words "venifterah min habechorah": the mother is now released from the obligation of bechorah. This holds however the birth unfolded, whether the limbs were removed one by one or most of the body emerged intact beforehand, and whether the offspring lived or died. Her firstborn has come. A calf, lamb or kid she bears later on will not have the status of a bechor.
The reason lies in the definition of bechorah. A bechor is a peter rechem, the one that opens the womb. This fetus, even though it died and even though it never attained the sanctity of a bechor, did in fact open its mother's womb. Any offspring born to her afterward is therefore no longer a peter rechem, and it does not carry the status of a bechor.