Republican plans for corporate tax reform would see Apple as the biggest beneficiary if the company chooses to repatriate its overseas cash hoard. It has been estimated that in that eventuality, Apple would save a cool $47B in taxes …

Apple’s foreign cash and investments total $252B. Currently, if Apple were to repatriate that cash, it would pay the full rate of corporate tax of 35%, making for a tax bill of $78.6B.

Fortune reports that Republican plans would slash that bill to $31.4B.

Although the tax plans have yet to be agreed, Fortune reports that Senate and House are both in broad agreement on treatment of past overseas earnings. Earlier proposals had gone even further, with a rate as low as 12%.

Richard Harvey, a tax professor at Villanova University who has testified before the Senate on Apple’s tax affairs, says the Senate version of the tax bill would require Apple to pay $31.4 billion on its past earnings – a full $47 billion below what it would pay today if it repatriated.

The numbers are all somewhat theoretical, as there’s no saying how much of the cash Apple would choose to bring back to the USA, but the company has repeatedly called for tax reform, specifically highlighting the current disincentive to repatriating overseas holdings.

The potential tax saving here would dwarf the €13B ($15B) Apple is due to hand over in back taxes to Ireland.

It also presents presents a quandary for Apple CEO Tim Cook, who is obviously in favor of repatriation savings but not other facets of the Republican agenda – including his native Alabama Senate race, where accused child molester Roy Moore’s victory would help Republicans pass the legislation.