Chicago drugmaker AbbVie's (NYSE:ABBV) wooing days are finally over, and it's time for those so inclined to break out the Irish whiskey. After two months of negotiations, five offers, and some goodies thrown in for the top executives, Irish-based Shire (NASDAQ:SHPG) agreed to become AbbVie's tax arbitrage bride.

Few expected the courtship to end otherwise, but the price tag lifted the Street's eyebrows. AbbVie will pay a whopping 53% premium  to where Shire's shares were valued in the market before the courtship began.

If approved, Shire shareholders will own 25% of the new AbbVie and receive $91.07 in cash and stock per Shire share. Shire's former top executive Flemming Ornskov will also be getting a nice chunk of change for staying with the new company and heading up a rare diseases division. He will directly report to AbbVie boss Richard Gonzalez. 

AbbVie's shareholders should also get some nice perquisites. AbbVie had strong performance the first five months of the year, but Shire's double-digit sales growth should help kick the new company into high gear. With $5 billion in revenue last year, Shire delivered record quarterly revenue growth in Q2 of 20%. The company also increased earnings guidance to around 30% growth for full year 2014.

In addition, Shire's levered free cash flow is strong, coming in at over $1 billion last year. The added cash flow could be used by AbbVie to increase the dividend it pays shareholders, already a healthy 3% yield.

It adds up to a pretty decent deal for everyone, but there is a nasty spoiler looming. 

No emergency exit if tax loophole closes

Changing its address to Ireland will reduce AbbVie's tax base from 22% to 13%, according to the company's executives. The projected savings is hefty, an estimated $1.3 billion by 2020.

The trouble is, it may not happen. This past week the Obama administration called for action to close the loophole. U.S. Treasury Secretary Jacob Lew urged Congress to enact legislation immediately, while the government works on more comprehensive tax reform, and make it retroactive to May.

Medtronic (NYSE:MDT) execs were well aware of the risk when they negotiated their $43 billion merger with Ireland-based Covidien. To protect the proposed new company, Medtronic's executives managed to negotiate the right to walk away should U.S. tax rules change.

According to a report in The New York Times, citing people with knowledge of the negotiations, if AbbVie needs to back out, they don't have a similar emergency exit. Instead, Shire sought protection and got it. AbbVie will have to pay Shire a breakup fee of 3% of the deal's value, about $1.6 billion, if AbbVie walks away.

AbbVie to become a rare disease powerhouse?

The answer was simple, coming straight from AbbVie's CEO: "We wouldn't be doing it if it was just the tax impact."

That quote is a standard response of CEOs when attempting tax inversion deals, but in AbbVie's case, it rings true.

Ever since it spun out of Abbott Labs, AbbVie has suffered from its dangerous dependence on a single product. About 60% of AbbVie's sales come from Humira, a drug for rheumatoid arthritis. While Humira is the world's best-selling drug, its patent expires in 2016, likely leading to a massive drop-off in sales.

Shire's stable of neuroscience products should help protect AbbVie's immediate future. Those drugs include ADHD treatments Vyvanse and Adderal. As a nice kicker, Vyvanse could become the first drug to be approved for binge eating.

The real prize however, lies elsewhere. Rare disease treatments are rapidly becoming a red hot area in drugs. Governments and insurers will pay upwards of $300,000 a year for them with no grumbling. With all the pressure on drug costs elsewhere, rare disease treatments have moved to center stage--and they'll stay there so long as they fly under the cost-cutting radar. In addition, rare disease drugs are often cheaper to develop (requiring smaller trials). 

Gems in Shire's rare-diseases, mid-to-late-stage development pipeline include lifitegrast to treat dry-eye disease and Premiplex for a neonatal blinding disorder. If approved, these drugs and several others could launch next year.

Peak sales for lifitegrast range as high as $1 billion, but that's anything but a sure thing. The late-stage clinical trial a few months ago wasn't compelling. Shire also has several rare disease drugs commercially available, including Replagal, to treat Fabry disease.

Shire and AbbVie expect the deal to close in the fourth quarter. If it does -- and that seems almost a given -- it will create a mammoth company -- one of the 50 biggest in the world, generating almost $25 billion in yearly sales.

Pinch yourself, AbbVie shareholders. By the end of the year, you could be wearing the green, in more ways than one.