Before us is the second Mishnah in Maseches Shabbos, which deals with preparing food for animals on Shabbos. The principle that emerges from it: one may prepare food for an animal on Shabbos, but only to the extent necessary - so that the food will be fit for the animal to eat. Any further handling beyond that is considered unnecessary exertion, and one may not trouble oneself with it on Shabbos.
The permitted preparations:
"Matirin p'kiei amir lifnei behemah" - one may untie on Shabbos the bound bundles of straw placed before an animal. As long as they remain tied they are not considered fit to be eaten, and therefore untying the knots was permitted in order to make them fit for food.
"U'mfaspesin es hakipin" - kipin are cedar branches, which are also suitable as animal food. However, in order to make them fit to be eaten one must scatter them - spread them out and separate them before the animal, and only in this way do they become fit for it.
"Aval lo es hazirin":
Zirin are similar to the bundles of straw, except that the bundles are tied with only two knots while the zirin are tied with three knots, bound more tightly. One might therefore have thought that it would be permitted to scatter them - to separate them and move them about in order to make them fit for the animal to eat. The Mishnah teaches that this is not so: even though they are tied more tightly, untying the knot is enough to make them fit to be eaten, and they do not require scattering the way the kipin did.
"Ein merasekin":
The Mishnah continues and lists foods that one may not chop up before an animal:
"Lo es hashachas" - grain that has not yet fully ripened, which serves as animal food; one is not permitted to chop it up.
"V'lo es hecharuvin lifnei behemah" - carobs, too, may not be chopped up before an animal, since they are considered food even without being chopped.
"Bein dakah bein gasah" - whether a small animal or a large animal, each of them is able to eat these foods even without their being chopped, and chopping is nothing but unnecessary exertion.
"Rabbi Yehudah matir b'charuvin l'dakah":
Rabbi Yehudah disagrees and holds that carobs intended for a small animal may be cut up, because they are not fit for it to eat: its teeth are smaller, and it is unable to break the food down unless it is broken down for it in advance.
In summary: in this Mishnah we learned that any preparation that renders the food fit for the animal is permitted on Shabbos - untying bundles of straw and scattering the kipin; whereas any handling that is not needed in order to make the food edible is forbidden as unnecessary exertion - the zirin, for which untying suffices, as well as chopping unripened grain and carobs, which are fit to be eaten as they are, both for a small animal and for a large one. Rabbi Yehudah disagrees and permits cutting up carobs for a small animal, which is unable to eat them otherwise.