Editor’s Note: David A. Andelman, executive director of The RedLines Project, is a contributor to CNN and a former foreign correspondent for The New York Times and CBS News. His next book, “A Line in the Sand: Red Lines, War, and Peace,” is due out next year. The opinions expressed in this commentary are his own.

There’s one defining question in the China-US trade war: Who’s more desperate to see it end, Donald Trump or Xi Jinping?

It is clear that each side is already suffering considerable pain. Though conventional wisdom suggests that an autocracy should be more resistant to political upheaval (Xi won’t have to face his people at the polls in the foreseeable future while Trump is up for reelection next year) — both will have to pay a heavy price.

The economies of both countries and the fortunes of both leaders have been damaged by the trade war, which does not seem to have hit its peak yet. In the United States last month, the bond market inverted yet again to its lowest level since 2007, sending new chills through a stock market Trump has long labeled the great success of his presidency. Economic growth is heading down toward 2%, well below the solid 3% at the start of the year and half the 4.2% Trump was basking in last year.

In China, the yuan has hit an 11-year low, and overall economic growth has slumped to its lowest level in 27 years, with its domestic GDP growing at the slowest rate since 1992. Though at 6.2%, it’s still triple American growth figures.

In a real economic downturn, companies begin cinching their belts. Capital spending is often the first to go, which can in turn hit companies that manufacture equipment that is used to produce other goods. Profit margins can be trimmed, wage hikes delayed and consumer prices raised. But there is only so much that can be done to absorb escalating hits from tariffs. Eventually, jobs have to go.

So far, the American labor market has held strong, with unemployment at 3.7%, hovering at the lowest point in 50 years, according to the US Bureau of Labor Statistics. But cracks are beginning to appear, especially among groups that Trump counted on for his victory in 2016 and will need to tap again next year. So far in 2019, companies have announced layoffs of 36% more workers than this time last year, employment consultants Challenger Gray & Christmas reported. That could be just the tip of the iceberg.

The pain is especially being felt in the farm belt that served as the bedrock of Trump’s 2016 presidential election. China’s soybean imports alone from the United States plunged from 25 million tons in October 2017 to 8.7 million tons in the same period a year later. The latest round is likely to be especially brutal. The National Milk Producers Federation reported that shipments to China plunged 40% in the first quarter this year. One research firm, Trade Partnership Worldwide LLC, projected total losses of as many as 2.2 million US jobs as a result of US tariffs on Chinese imports and China’s retaliation. At the same time, researchers have found that, more broadly, tariffs will result in higher US consumer prices and a $7.8 billion-per-year decline in income.

Of course, Chinese companies are facing their own problems.

Even before Trump “hereby ordered” American companies to move their operations out of China and before tariffs began rising, as many as 50 companies, including some domestic Chinese manufacturers, had already begun leaving China. Some, like Nintendo and Google, are heading to Vietnam, as is Chinese TV maker TCL. Apple has even been exploring the costs of moving as much as a quarter of its production capacity from China to India.

All of this could cost the shrinking Chinese economy jobs and output. Still, as China has shifted some of its exports to other customers, it has managed to sustain a somewhat robust output. In July, exports rose 3.3% over a year earlier.

Trade, like diplomacy, should never be played as a zero-sum game. As President Trump, who prides himself on being the master dealmaker, should know, the best deals are those where both sides come out feeling like winners. In such a scenario, low tariffs, freer trade and broader exchanges of ideas can only result in faster growth, greater innovation and prosperity for both nations.