“And under Irish tax law, the second Irish resident subsidiary is not taxed on the royalty payment because it is controlled by managers elsewhere.”
http://www.theregister.co.uk/2012/11/22/how_vendors_avoid_ta...
Google (as a verb, no pun intended) for “Double Irish” and “Dutch Sandwich” if you want the full picture of the scheme.