Sex is big business in dairyfarming, which is why a battle is brewing in the US over new technologies designed to make sure only milk-producing cows are born.
Most of America's 9.4 million dairy cows have been bred by artificial insemination of semen from bulls with specific genetic traits, but there's still a coin-flip randomness about the sex of the offspring.
So, more farmers are paying a premium for semen that contains only the X chromosomes for females.
It's a small but growing business dominated by one company, Inguran in Navasota, Texas.
Over the years, dairies have improved breeding to boost milk output using fewer cows.
Sex-specific semen is a recent innovation, and it's so promising that New Zealand's Engender Technologies plans to sell its own version of the product in the US.
Companies also are fighting in court over patents for the technique.
Farmers welcome more competition because sex-sorted semen vials can cost $US30 ($38) for a typical dose, about double those that can't guarantee a female calf.
"We have no choice but to pay," says Russ Warmka, owner of a dairy farm in Fox Lake, Wisconsin, that milks 500 cows a day and uses sex-sorting semen on his heifers.
"We spend our entire lives as farmers trying to breed a better cow," he said.
"If we know we'll get a heifer calf, we can spend a lot more on that semen."
That's because a young female that will eventually produce milk for four to six years is far more valuable to a dairy than a steer that gets shipped to a beef-processing plant, says Albert De Vries, a professor of animal sciences at the University of Florida in Gainesville.
At an auction on November 28 in Springfield, Missouri, heifers sold for as much as $US350 each, while bulls sold for as little as $US50, according to the Springfield Livestock Marketing Centre.
Sex-determined semen for breeding remains relatively new and accounts for only 3 per cent of a global market, so there's plenty of room for growth, as long as farmers can be convinced the extra investment will pay off.
"When you look at the dairy industry, this is a fundamental problem that hasn't yet been widely resolved," says Brent Ogilvie, managing director at Auckland-based Engender, which is largely funded by investors in New Zealand, the world's largest dairy exporter.
"Sex is the most-important genetic trait," he said.
"Farming is all about genetics, and most farmers don't have control over the sex of their herd."
In the US, the market is dominated by Inguran.
Its sexing technologies unit provides the sorted semen that is marketed through the STgenetics unit.
Inguran has patents on improvements to a technology first developed by a United States Department of Agriculture (USDA) researcher more than two decades ago.
Using the cell-sorting science of flow cytometry, the company says it can deliver heifer calves in about 90 per cent of pregnancies, a big increase on the 50-50 chances of conventional semen.
In flow cytometry, sperm cells move single file past a laser beam at about 80km/h, with special detection machines making about 180,000 measurements a second, says George Seidel, a professor at Colorado State University who worked to apply the technology to dairy farms in the 1990s.
Inguran uses a fluorescent dye that reacts differently on female X chromosomes than male Y chromosomes.
The amount of fluorescence is measured, then an electrical charge is applied, which deflects the cells into different containers.
The sorted semen is then sold in vials known as straws.
The technique has some obstacles.
More mature cows don't always get pregnant, so farmers tend to use it only on virgin heifers, which conceive more easily, says Matt Gould, Philadelphia-based analyst for the Dairy & Food Market Analyst newsletter.
Fertility rates matter because a cow has only one opportunity to get pregnant each month, and the animals will produce less milk if too many months go by.
Inguran's conception rates are now comparable to those of conventional semen vials, according to Jim Hiney, the company's marketing manager.
Engender, which hopes to start selling sex-sorted semen in the US within two years, says its product has a higher pregnancy rate because its sorting process is gentler.
It uses photons, or pulses of light, to physically nudge sperm cells into specific channels.
The company also says its product will be cheaper and easier to supply.
Of the 175 million semen straws sold globally each year, only about 5 million are sex-selected, and 2 million of those are in the US, according to Ogilvie at Engender.
While Engender targets Inguran customers, some US companies are eyeing its technology.
Genus's subsidiary ABS Global of Wisconsin, a stud company that wants to enter the sex-sorting business, has persuaded the US Patent and Trademark Office to rule two patents invalid.
An appeals court is reviewing that decision.
Inguran filed suit in June accusing ABS of infringing patents and stealing trade secrets.
The same court is considering whether to revive antitrust claims brought by another company, Trans Ova Genetics, which says many of Inguran's patents are simply combining known ideas.
Trans Ova accused Inguran of burying the US Patent and Trademark Office in paperwork so examiners wouldn't spot information that showed the applications didn't cover new inventions.
Inguran said it developed ways to preserve the cells, improve the sorting process and produce sexed embryos.
"There will be millions of dollars in intellectual property battles, no matter the merits of who or whatever," because some of the patents are written so broadly, Colorado state's Seidel says.
Want to read more stories like this?
Sign up to receive our e-newsletter delivered fresh to your email in-box twice a week.