Many people were wondering what Apple would do with its $98 billion stockpile of cash. On Monday, the company gave a partial answer: It will spend $45 billion over the next three years paying dividends to investors and buying back shares. But what about the rest of its cash? That’s where things get tricky. Due to quirks in the U.S. tax code, Apple may just keep sitting on it.

Siri, how do I repatriate my profits? (ALY SONG/REUTERS)

Since Apple would prefer not to pay this tax, it’s just sitting on that $64 billion for now. One thing the company can do, however, is hope that Congress changes the tax laws. There’s reason for Apple to be optimistic: Back in 2004, the Republican-controlled Congress passed a one-year tax holiday that temporarily set the maximum rate paid on profits brought back home at 5.25 percent. At the time, critics warned that this “repatriation holiday” would have perverse effects. Once the holiday ended, companies would stash even more money abroad in the hopes that Congress would give them another reprieve later on.

Indeed, that seems to be exactly what happened. As the Center on Budget and Policy Priorities details, some companies still repatriate profits from abroad — about $129 billion every year since 2004. But a growing number of multinational corporations are amassing more cash overseas, either by holding on to profits earned abroad, as Apple has done, or by employing complicated tax-avoidance schemes. (A 2011 report by the Senate Permanent Subcommittee on Investigations found that several large multinationals had engaged in complex accounting maneuvers to shift money into overseas tax havens — and then brought much of it home in 2004.)

Lately, Apple has been lobbying Congress for a new repatriation holiday. And plenty of politicians have proved receptive to the notion, including the major Republican candidates for president. The CBPP estimates that such a holiday would boost U.S. tax revenues in the first few years, as companies like Apple and Google brought their war chests home and paid the lower rate. But the holiday would then lead to bigger deficits over the long run, as those companies gambled that tax holidays would become a regular occurrence and park even more cash overseas, biding their time. All told, CBPP projects that a new repatriation holiday would add $79 billion to the deficit over ten years.

Apple’s not being irrational by keeping its cash abroad. The taxes are significant, and it’s a fair bet that sooner or later a Republican will take back the White House — if not Mitt Romney, who has endorsed a repatriation holiday, then someone else. Which means Apple’s overseas pile of cash will continue to grow. “In a funny way,” writes Matt Yglesias, “the fact that a tax holiday might happen ends up strengthening the case for doing a tax holiday.” It’s a reminder that the current tax code can have some odd, distorting effects.

Related stories:

Apple finally drawing from $98B war chest

What Apple’s decision tells us about company’s leadership switch

Main complaints about the new iPad

View Photo Gallery: Apple announced March 19 that it would start using its $98 billion to reward its investors with a dividend- and share-purchase program. We asked our readers and some experts what they would have done with the massive cash pile. Here are some of their ideas.