Corporate America was supposed to be a big winner in the Republican tax plan, getting a huge cut in the corporate income tax rate and a deal that might ease the cost of bringing cash home from overseas.

But in the scramble to figure out how to build a consensus — and raise some revenue — the entire bill could fall apart.

Many companies, especially in the real estate industry, would suffer from the proposed elimination of tax breaks, loopholes and incentives. A broad business coalition known as BUILD condemned the elimination of interest deductions for businesses, while the real estate industry bemoaned the curtailment of the deductibility of large mortgages. And the National Federal of Independent Business opposed the package in its current form, declaring that the bill "leaves too many small businesses behind."

"Rewriting the tax code is hugely complicated and there are lots of unintended consequences," said Elizabeth M. Gore, policy director at the law firm Brownstein Hyatt Farber Schreck. "It's going to be hard to do. Unless they are willing to dramatically increase the deficit, there are going to be winners and losers. And that is a difficult policy to sell."

Will U.S. companies pay less in corporate income taxes?

The United States has one of the highest corporate income tax rates at 35 percent, but few companies pay that much. After taking advantage of a variety of special deductions, U.S. corporations on average paid an effective marginal tax rate of just 18.6 percent in 2012, a rate that went unchanged despite ups and downs in the economy over the previous decade, according to a Congressional Budget Office report.

That's lower than the proposed 20 percent rate. So the cut in rates will hurt some companies, and help others.

The nation's retailers pay the highest effective income tax rates of any industry, according to Matthew Shay, president of the National Retail Federation. (Walmart paid a 29.5 percent rate in its most recent statement.) The National Retail Federation has been pushing for "a rate as low as we can get it," Shay said.

Slashing rates and squeezing loopholes could hurt other companies, though. Oil and gas companies take advantage of special depreciation measures as much as a century old. International companies — such as pharmaceutical or technology firms — shelter income abroad to avoid taxes in the United States.

A report by the Institute on Taxation and Economic Policy covering 2008-2015 estimates that capital-intensive industries such as the utilities, gas and electric sector paid only 3.1 percent effective corporate tax rate, telecommunications 11.5 percent and Internet services and retailing 15.6 percent. The report said that over the eight-year period just 25 companies claimed $286 billion in tax breaks.

The Ways and Means Committee proposal would allow companies to "immediately" write off the full cost of new equipment, a huge boost for capital intensive industries. Companies in those sectors could still end up paying less than the 20 percent rate.

All this matters greatly to the Treasury. The Tax Policy Center has estimated that the corporate income tax equaled 6 percent of the gross domestic product in 1950, 3.7 percent of GDP in the late 1960s and now it equals less than 2 percent. The Tax Policy Center estimates that this new cut in corporate rates could cost the Treasury as much as $200 billion a year.

What happens to pass-through businesses?

The tax returns for pass-through businesses will not fit on a postcard. This category of businesses include partnerships, sole proprietorships, S corporations and more. They currently pay taxes at the individual tax rates of their owners.

The proposal would reduce the tax rates for pass-through businesses to 25 percent, well below the current rates. But the new rates would only apply to 30 percent of a company's net income. And some firms in services — such as accounting, investing or law — would not qualify for the lower rate at all.

Will companies still park profits abroad?

No. At least not as easily as before.

The tax bill will reduce the ability of American companies to sidestep U.S. taxes by forcing them to pay an effective 10 percent tax rate on foreign profits. But U.S. companies that currently take advantage of lower income tax rates abroad will still have incentives to do so.

The tax plan is a territorial system, which means that the United States will not make its corporate income tax a global one. That means companies can take advantage of low-tax places abroad for foreign sales.

But it also means that companies — mostly in the technology and pharmaceutical sectors — can transfer their intellectual property to a low-tax place, such as Ireland. The U.S. parent can then pay royalties on the sales to customers in the United States. That lowers their U.S. tax bill by boosting expenses in the United States, and creating profits in countries with low tax rates.

The new proposal imposes a new 20 percent excise tax on certain transfers, "a blunt instrument to go after transfer pricing," said Steven M. Rosenthal, a senior fellow at the Tax Policy Center.

Will channelling or maintaining profits abroad continue? Almost definitely yes. There will be always be an incentive for companies to move as profits abroad as long as they can find countries where taxes are lower than those in the United States.

Homebuilders and realtors

The tax bill would deal a heavy blow to the real estate business.

The House Ways and Means Committee bill would double the standardized deductions for individuals, meaning that more than 30 million people would have no need for mortgage deductions. And the bill would eliminate the ability of homeowners to deduct payments on mortgages greater than $500,000.

Earlier this week, the nation's homebuilders and realtors withdrew support. Real estate and homebuilding companies are powerful in every congressional district across the country, and their oppositioncould hurt the bill's chances of passage.

Increasing the use of standardized deductions would sharply reduce the number of taxpayers who would itemize deductions, including mortgage payments. And that, the homebuilders and realtors say, would undercut purchases of homes and hurt their businesses.

"Lawmakers missed a golden opportunity to give the American people a tax reform package that would boost middle-class families and promote greater housing opportunity for Americans across the economic spectrum," Granger MacDonald, head of the National Association of Home Builders, said Oct. 30.

MacDonald, a home builder and developer from Kerrville, Texas, added that the House plan was "particularly disappointing, given that the nation's home builders warned that the proposal would severely diminish the effectiveness of the mortgage interest deduction and presented alternative policies that would retain an effective housing tax incentive in the tax code."

MacDonald said that he thought "we had a deal" to establish a homeownership tax credit that would benefit tens of millions of households, but the credit was shelved.

Oil and gas tax breaks

These cost about $2 billion a year, but they are among the most durable tax breaks in the code. A century ago Congress adopted a provision that allowed companies to write off "intangible drilling costs" in the first year of exploration. The provision still exists. The depletion allowance, first adopted 91 years ago, lets companies treat oil and gas in the ground as capital equipment; thus they can write off a about a quarter of it as they take it out of the ground.

The industry says it deserves special treatment because of the high risks involved in drilling, although advances in seismic testing have greatly reduced the chances of drilling dry holes.

The largest oil and gas companies have not been able to benefit fully from the depletion allowance since a change in the law in 1975 reduced the allowance somewhat. But there are still plenty of big independent companies that qualify, including companies like Apache and Continental Resources and during the campaign President Trump listened to a lot of the advice given by Continental's chief executive Harold Hamm.

Renewable energy tax credits

The proposed bill would eliminate federal tax credits of up to $7,500 each for electric vehicles. And it strikes a blow against wind and solar credits, reneging on a bipartisan deal made in Congress in 2015.

The new bill also gets big revenues from seemingly small tweaks in the rules for these tax credits.

The credits were extended and will be phased out under a deal made by President Obama in exchange for allowing crude oil exports. Solar and wind companies were eager to make sure those credits remain untouched. But the new bill would increase how much work must be done to qualify for a production tax credit and it would reduce inflation adjustments for future production tax credits. The changes would generate $12.3 billion in revenues — ultimately an added cost for renewable energy sources.

"This proposal reneges on the tax reform deal that was already agreed to, and would impose a retroactive tax hike on an entire industry," said Tom Kiernan, chief executive of the American Wind Energy Association.

Manufacturers' preference

One large item that will likely disappear: the lower corporate income tax rate for manufacturers. The idea was to promote manufacturing, but retailers and others saw it as penalizing their businesses. Moreover, it led to controversy over what kind of company could qualify as a manufacturer. Oil refiners demanded to be included. Starbucks and film makers were included.

Green eye shade (and eye-glazing) stuff

House negotiators have been searching to raise revenue to pay for the big cuts in the tax bill, and many have been looking for loopholes they could eliminate that are too complicated or obscure to arouse public outcry.

As a result, many businesses have been waging a lobbying battle to keep those proposals out of the bill. For example, the insurance business has been worried that the tax bill would limit their ability to deduct additions to reserves against future claims. The fears were justified.

How much is at stake? The Ways and Means Committee said the change would generate about $14.9 billion over ten years.

Other business sectors breathed sighs of relief. Federal credit unions thanked lawmakers for leaving their special provision untouched. The 1934 Federal Credit Union Act gave credit unions a tax exemption because "credit unions are mutual or cooperative organizations operated entirely by and for their members."

Puerto Rico

Puerto Rico's governor Ricardo Rossello has been in Washington this week pressing lawmakers to maintain tax preferences for the commonwealth, which is treated as a foreign tax jurisdiction for corporations.

U.S. corporations there pay a 4 percent excise tax. Pharmaceutical and medical device companies have flocked to the island, and in 2016 accounted for 75 percent of Puerto Rico's exports and a third of the territory's tax revenues, according to the Puerto Rican government.

The governor wants to prevent Congress from applying the foreign minimum tax on businesses, mostly pharmaceutical. Or, at worst, he wants the minimum tax to be no more than 10 percent if the global rate is 15 percent, according to presentation documents obtained by The Post.