The shuffling was illegal, that is why they are going to be made to repay billions. It was illegal for the Irish to not charge them the standard rate, not illegal for Apple to try to do a deal.
"Apple has assigned partial ownership of its Irish subsidiaries to Baldwin Holdings Unlimited in the British Virgin Islands, a tax haven, according to documents filed there and in Ireland. Baldwin Holdings has no listed offices or telephone number, and its only listed director is Peter Oppenheimer, Apple’s chief financial officer, who lives and works in Cupertino. Baldwin apples are known for their hardiness while traveling."
http://www.nytimes.com/2012/04/29/business/apples-tax-strate...
From what I can tell, Apple's money remains in Ireland, where they already enjoy an extremely low tax rate, and therefore have no reason to move it out. (Of course, this is why the EU is going after them now.)
I'm just going to go ahead and state, as a matter of fact, that Apple does not have any subsidiaries in Bermuda or any other Caribbean country, and anyone who believes otherwise is mistaken. Apple's international tax structure was thoroughly documented when they were called up to testify before the Senate, which you can read about in the Senate Subcommittee Memo on Offshore Profit Shifting and Apple[1], and while they do have several Irish subsidiaries, they do not have any subsidiaries in the Caribbean or move any money into the Caribbean.
This is further reinforced in Apple's testimony before the Senate[2]:
> Apple does not move its intellectual property into offshore tax havens and use it to sell products back into the US in order to avoid US tax; it does not use revolving loans from foreign subsidiaries to fund its domestic operations; it does not hold money on a Caribbean island; and it does not have a bank account in the Cayman Islands. Apple has substantial foreign cash because it sells the majority of its products outside the US. International operations accounted for 61% of Apple’s revenue last year and two-thirds of its revenue last quarter. These foreign earnings are taxed in the jurisdiction where they are earned (“foreign, post-tax income”).
[1] http://www.hsgac.senate.gov/download/?id=CDE3652B-DA4E-4EE1-...