WASHINGTON ― On Sunday night at the Oscars, PricewaterhouseCoopers had one job: hand the correct card to presenters who would go on stage and announce the winner of the category.

When it comes to the line of work it is most known for, the company’s objective is equally simple: make sure the client pays the lowest tax bill possible. On that front, PwC tends to be a bit better at its job. But if House Speaker Paul Ryan (R-Wis.) and the Trump administration have anything to say about it, one of the more ludicrous ways the company meets its numbers will no longer be available.

With the help of PwC, one of the Big Four accounting firms, a growing number of U.S. corporations have taken advantage of a tax break called the “domestic production deduction.” The obscure provision is meant to encourage U.S. manufacturing, except for the most part these companies aren’t actually manufacturing anything. They are instead relying on a poorly worded ― or brilliantly worded, depending on your perspective ― 2004 law, known as Section 199, that created what is now an out-of-control tax break. It was written by a PwC partner.

Companies are not required to disclose if they have used a particular tax break except under rare circumstances, but the IRS, in some of its public filings and court documents, has revealed the general nature of some of those claims. Others have been included in public documents when the tax break has led to a big enough windfall that investors need to know about it, and still others have emerged in unrelated court filings. The picture that emerges from interviews and a review of the paper trail is one of a loophole that has grown so large that it is barely recognizable as anything other than a giveaway to companies that can afford the sophisticated tax prep that companies like PwC can provide.

The IRS does not name the company when it divulges information on use of Section 199, but rather describes them in a way that leaves only a few suspects. Among examples The Huffington Post’s investigation found in IRS documents:

Big-box retailers have told the IRS that they should get the deduction because the house plants they sell are growing as they sit waiting to be purchased.

Big-box hardware stores are calling themselves factories because they cut blank keys for customers.

Paint stores want it because they shake the paint cans before handing them over to customers.

Fruit basket companies claim they’re “manufacturing” fruit baskets because they assemble apples and oranges and cover them with a little plastic wrap.

A company that manufactures all of its clothes overseas has tried to claim the deduction because it prints its catalogue right here in the U.S.

Restaurant chains are getting the tax break for taking pre-baked cakes and putting garnishes on them, or for simply slicing cheesecake. They took a whole cheesecake, and they manufactured slices of cheesecake, according to the tax filings they submitted to the federal government ― so for filing purposes, some restaurants are claiming they are literal cheesecake factories.

Sports teams have even tried to claim it, saying they manufacture television entertainment. Last year, the IRS advised that teams could not, in fact, consider themselves manufacturers ― but the networks could .

Television show producers have claimed they are manufacturing TV shows; TV networks claim it for airing the show, and cable companies claim it for combining channels into a bundle.

Credit card companies like Visa and MasterCard have claimed in investment filings they’re part of the American manufacturing boom.

Flower delivery giant 1800flowers.com has said it should get it, too, because it manufactures bouquets of flowers from individual stems.

The Treasury Department estimates that claims for the deduction will cost the government $178.7 billion ― that’s billion with a B, as Ronald Reagan would say ― over the next decade.

Ryan’s new tax reform proposal would upend the entire corporate tax system and replace it with an import tax meant to boost manufacturing. The Trump administration has signaled tentative support, but the Koch brothers and other major importers are balking, and it is considered endangered in the Senate. But if it becomes law, the biggest loser may be George Manousos.

***

If there’s one person to blame for the current 199 predicament, it’s Manousos, a partner at PwC.

By all accounts, Manousos is not a particularly bad person. If he were living in a different kind of republic, he would likely be nearing the midpoint of a satisfying career in the field of tax preparation ― compensated comfortably, with the fulfillment that comes from a good job done well, and looking forward to an enriching retirement: books, golf, cooking classes.

That’s not our republic. Instead, Manousos has used the combined power of his public-private career to help blow a gaping hole in the side of the U.S. Treasury, out of which global corporations have looted hundreds of billions of dollars.

Manousos was a mid-level tax specialist for PricewaterhouseCoopers before joining the George W. Bush administration’s Treasury Department in 2002 in the Office of Tax Policy.

When Congress passed the the American Jobs Creation Act of 2004, it created a new tax deduction for manufacturing; Manousos was the Treasury official tasked with helping the Republican Congress author the new section of the tax code.

“I was the Treasury representative then ― was working with Congress’ Joint Committee in enacting the provision, helping them, guiding them through it,” he told HuffPost in an interview.

He also wrote the regulations that implement the law. “And then I led the government team on the Treasury side on the underlying regulations that were subsequently issued under Section 199.”

The code allows a business conducting “qualified production activities” to claim a deduction equal to 9 percent of the income related to those activities. The claim effectively lowers a business’ tax rate on that income by 3 percent. But the legislative language and subsequent IRS regulations were worded so broadly that businesses have used it to claim lots of things no reasonable person would consider production, and allows the companies to pad out their estimates of how much income was actually related to that activity. A company that built a website might try to claim that almost all its revenue is related to that website, for instance.

His job finished, Manousos returned to PwC in 2006, this time as a partner. Today, he is held out as the leading private authority on Section 199, helping make sure businesses understand how to use it. Read any trade publication story about the fight over 199 and you’re likely to come across Manousos advocating for its broad use.

“I had a heavy hand in writing these rules and I want to make sure that, at least, that people understand what was intended by them,” he says.

He recognizes that he gives his clients a heavy advantage over the cash-strapped IRS. “When you have taxpayers that have advisers that have the latest and greatest thinking, and the IRS is often playing a little bit of catch-up, it can create some ambiguity about what is the right answer,” Manousos says.

That ambiguity has made Manousos and his corporate clients an awful lot of money. And when Manousos lobbies the IRS, he makes sure to remind them that he wrote the law and the underlying regulations. “I meet with the government, all levels, regularly when it comes to 199,” he says. “I work regularly with them both in advising clients, as well as always wearing a former government hat.”

Publicly traded companies are required to report when they file a tax claim that the IRS might contest, so that investors aren’t in for a shock when the company gets audited and smacked with a back-tax bill. According to the most recent IRS statistics, the manufacturing tax deduction is the third most often claimed controversial tax break. (The top one is a tax break for “research,” another area ripe for abuse.)

When Visa used the deduction in 2014, it ended up boosting profits by $191 million. According to Visa’s fourth-quarter 2015 earnings statement, it saved them $239 million ― enough to fund the average food stamp payments for more than 100,000 Americans for a full year.

The goal of tax breaks such as 199 is to boost the type of activity that society wants more of. In this case, the government wants more domestic manufacturing and the high-wage jobs that come with it. But the performance of the 199 deduction calls that logic into question.

In fact, we have a real-world answer to the question. Visa spokeswoman Connie Kim told HuffPost the $191 million deduction covers a period of more than one year.

In other words, Visa had already built much of the software it was claiming it for in previous years. It claimed the deduction after the fact, meaning that the tax policy had nothing to do with inspiring Visa to do it. The activity had already happened. Instead, somebody in the company’s accounting department ― or, more likely, at its Big Four tax preparer ― simply decided to start claiming it long after the basic business decisions had been made.

In 2013, the IRS tried to go after a gift-basket company for its use of the deduction, in the case U.S. v. Dean. District Court Judge James Selna ruled that eligibility for the deduction should be thought of broadly ― that by arranging fruit in a basket, the company had transformed it into a new product. Pulitzer Prize winner David Cay Johnston, writing in Tax Notes Today, mocked the decision: “Maybe as a columnist I can claim the section 199 deduction,” he wrote. “After all, I just ‘transformed’ the opinion of [Judge] Selna into a column, which, to cite the judge, is ‘a new product with a different demand.’”

The Treasury Department has tried to curb its use. In a March 16, 2015, memo, the department said that activities such as cutting keys and “storing agricultural products in a controlled environment” ― i.e., putting stuff in a fridge ― should not qualify for the deduction. But the directive lacks the force of law, and is unlikely to curb the enthusiasm for the deduction.

The Treasury is now in the process of writing a new rule curbing its use for software development, and hordes of companies are streaming through the building with regulatory crowbars, working to make the loophole as wide as possible.

Financial services companies that produce cloud-run automation services say they deserve the break too. And those programs don’t need to be built by American engineers ― the code says the break can be claimed as long as the products are “significantly” produced by American workers, as flexible a term as you can find.

It sets up the ultimate Orwellian irony: The American Jobs Creation Act of 2004 is being used to pay for engineers ― engineers who need not even be in the U.S. ― to build computer programs that are used to automate and eliminate American jobs.

***

Approximately $83 billion of the “manufacturing” deductions are being claimed for activities that would not count as manufacturing under any reasonable definition of the term, according to an estimate that the Joint Committee on Taxation provided to Sen. Sherrod Brown (D-Ohio) in 2013.

To put that figure in context, Congress spent months wrangling over how to pay for $7.4 billion in long-term benefits for 9/11 first responders, and later spent even more time looking for $6.3 billion to pay for a major medical research and opioid epidemic bill. They ended up raiding Medicare for the funds.

To put it a different way, eliminating the deduction would make the government so much money that it could lower corporate tax rates across the board by 1.5 points, according to reliable estimates. That might not sound like much, but it would be an enormous tax cut.

Eliminating the deduction would also free the IRS from the costly and often futile process of trying to answer such legal questions as whether a sports team “manufactures” entertainment. The IRS’s advisory opinion on a recent sports team case required page after page of legalese and analysis, which must have cost the agency a fortune in staff hours.

Audit rates have fallen to record lows, with just 0.84 percent of filers getting that dreaded letter in 2014. Unsurprisingly, collections from audits dropped in half, down to $7.32 billion; the average from 2005 to 2010 had been $14.7 billion.

The IRS has the power to narrow the definitions of what qualifies for tax breaks such as this one. But the IRS has been forced to focus mostly on the fringes. For example, the agency has long held that software is eligible for the deduction, so long as it is available for purchase on a disk or via direct download. But software designers who develop apps, streaming services or online portals have argued that this puts them at a disadvantage. The agency is currently working on a rule to determine what to do about the software problem in particular.

For the most part, though, IRS efforts to rein in the use of 199 ― going after fruit basket makers, for instance ― have been beaten back by the courts, which has cost the government time and money while emboldening other companies.

All of that time in court, and time spent negotiating over new interpretations with Manouses and the powerhouse accounting firms, is time the agency is not spending auditing the filings of the fantastically wealthy filers.

Manouses sympathizes with the IRS. “The government does the best with the resources that they’re given,” he said. “We all read about how they continue to have budget cuts handed to them and they have to adapt to that.”

But as far as he is concerned, the deduction is working just fine: “From my perspective, the incentive works as it was designed to work, in large part.”

CORRECTION: This story originally referred to the 199 deduction at times as a credit. Under tax law, it is a deduction, not a credit.