(1) Most farm animals live in abysmal conditions and die miserable deaths.
(2) Some regulations do/would offer significant improvement to the lives of farm animals (e.g. regulations that improve the slaughter process; regulations that would abolish sow crates).
(3) Individual animals benefitted by such improvements have a prima facie right to them from people who control their living conditions, irrespective of whether those improvements would save any lives (prima facie means: so long as that right is not outweighed).
Analogy involving people instead of animals: suppose in a Korean orphanage, the living conditions are awful (tiny beds, horrible food, no affection, etc.) and half that enter wind up dying. If children have rights, they have a right to better food, bigger beds, etc., even if those improvements won't increase the adoption rate and reduce the death rate. Likewise, if animals have rights at all, they have a right to reasonable living conditions when humans control their living conditions, even if improvements won't change the basic fact that they're being used and killed for food.(3) Farm animals' rights to reasonable living conditions (from people who control their living conditions) can be outweighed, if (a) respecting their rights would create a huge increase in demand for animal products, thus significantly increasing the number raised and killed for food or (b) respecting their rights would eliminate a huge decrease that could otherwise be predicted; the rights are not outweighed if these increases/decreases are small.
Analogy involving people instead of animals: suppose we respect the rights of the kids in the orphanage, and that assuages the concern of some would-be adopters, who thus don't adopt. There's a small increase in children who die in the orphanage. Or alternatively, imagine that without the improvements, there would have been a decrease in children who would die. These consequences are surely not a reason to leave the kids in their tiny beds, eating horrible food, and receiving no affection. The kids in the orphanage, we are assuming, have rights! We could only begin to think of preserving the squalor if improvements would have hugely negative consequences--for example, leading to half as many adoptions, twice as many deaths. Such is the nature of rights. Respecting them doesn't always dovetail with maximizing utility.(4) Improving the conditions of farm animals won't create a huge increase in demand for animal products, if any increase at all; and improving conditions won't preempt a huge decrease that could otherwise be anticipated.
Discussion: (a) Improving conditions won't generate a huge increase in demand; such an increase presupposes that there are now a large number of people not eating animal products because of the way animals are treated. But the very small number of vegans and vegetarians says otherwise. (b) Improving conditions won't preempt a huge decrease that could otherwise be predicted. All the evidence is that affluence is the main driver of animal product consumption. When people have more money, they consume more animal products--until some high level of affluence is reached, at which point they taper off a bit. The tapering of the very affluent might be reduced, with better conditions for farm animals, but that can't be expected to have a major effect on the total level of consumption.Thus,
(5) Farm animals have a right to improvements in their living conditions, and that right is not outweighed by considerations having to do with impact on consumption.
Discussion: This is how rights are understood in other social justice realms. Because death row prisoners are rights holders, their living conditions must be improved now, even if that could delay the day when the death penalty is abolished, thereby increasing the total number of executions. Inmates who have a voice in the matter want the better living conditions and release from prison and abolition of the death penalty. It would take heroic self-sacrifice to endue terrible living conditions, for the sake of saving others from it, possibly in the far future. It ought to be assumed that animals, if they had a voice, wouldn't be more heroic than death row inmates. In fact, they'd be less so, given the greater ability of humans to dedicate themselves to abstract principles, total strangers, and goods in the far future. Like we say prisoners have a right to better food, bigger cells, and more humane killing methods now, anyone who believes in animal rights should say the same of pigs, cows, and chickens.***
Of course, you can also argue for regulations from a utilitarian perspective, but there's nothing especially utilitarian about supporting regulations. A rights perspective allows it ... no, in fact demands it.