Plenty of companies have been caught up in President Donald Trump's trade wars. Few have been jerked around more than Qualcomm.

On Wednesday, the San Diego-based chipmaker will have to abandon its $44 billion acquisition of the Netherlands' NXP Semiconductors if it fails to gain approval from regulators in Beijing. The deal, first announced more than 20 months ago, has been held up by the Chinese government for months amid the trade fight with the United States.

China could pull through and greenlight the merger at the last minute. But the situation is uncertain at best.

"If I were to lean one way or the other, I would lean toward no deal," said Susquehanna International Group analyst Christopher Rolland, who tracks semiconductor companies.

If the deal doesn't go through, Qualcomm will have to pay NXP a $2 billion termination fee.

Qualcomm has been caught up in the president's trade fights before.

In March, Trump blocked Broadcom's $117 billion bid for Qualcomm over national security concerns, an extraordinary move. The Trump administration is also considering tariffs on semiconductors imported from China. A trade organization that represents Qualcomm says that would hurt member companies.

The trade war whiplash has exacerbated Qualcomm's recent struggles. The company makes most of its money licensing smartphone radios and chips, but two of its biggest customers, Apple and Huawei, are fighting Qualcomm over royalty payments. Apple could also move to use Intel chips — and not Qualcomm chips — in its new iPhones this year.

Meanwhile, Qualcomm has faced regulatory scrutiny all around the world. The European Union fined it $1.2 billion in January for antitrust violations, three years after China fined it nearly $1 billion for an antitrust issue.

"It's just been one thing after another," said Stacy Rasgon, a chip analyst at Bernstein.

Qualcomm declined to comment Tuesday.

Related: Google and Facebook could be caught in the US-China trade war

Qualcomm announced its merger with NXP in October 2016, hoping the deal would allow it to expand into new businesses. Qualcomm focuses on smartphone chips, and NXP has expertise in microchip security and chips for cars.

Since then, the market has shifted. Demand for chips has been solid, and NXP's earnings haven't been as strong as expected, Rolland said.

This could cushion the blow for Qualcomm if the deal falls through. Qualcomm has also said it'll pursue a stock buyback if it can't buy NXP, which would appease many investors.

There's still time. According to the agreement between the two companies, Qualcomm has until 11:59 p.m. ET Wednesday to get approval from Chinese regulators. It's the last endorsement the companies need to complete the deal.

Qualcomm CEO Steve Mollenkopf told The New York Times last week that the company won't seek an extension past Wednesday, when the company reports earnings.

In China, the call now rests with political leaders, according to Paul Triolo, who specializes in global technology policy at Eurasia Group. He sees "very little upside and tremendous potential for downside" if Beijing doesn't give its OK. Triolo expects the deal to be approved.

He noted that even though the United States has eased penalties on Chinese phone and telecom equipment maker ZTE, the US government still holds tremendous power over the company. The Chinese government won't want to put ZTE (ZTCOF) in danger again, he said.

Related: ZTE can once again do business with American companies

Triolo predicted the decision will come down to the wire.

In recent months, US tensions with China have repeatedly roped in Qualcomm.

Besides the Broadcom deal, which was scuttled after US officials raised concerns that it would give China an edge on 5G technology, Qualcomm faces complications from potential American tariffs on chips imported from China.

On Tuesday, the Semiconductor Industry Association, of which Qualcomm is a member, made its case against the possible tariffs at a hearing in Washington.

US companies often send mostly finished chips to China for assembly, testing and packaging. They could then face tariffs when these chips are shipped back in to the country.