Image source: Getty Images.

Valeant Pharmaceuticals International, Inc. (BHC 0.35%) may be the most unpopular stock on Wall Street. That said, markets have a tendency to overreact to bad news, and after losing 90% in the past year, the stock might make sense. Meanwhile, Allergan (AGN) shares took a beating after the collapse of the Pfizer megamerger, and they're looking attractive as well.

With both stocks trading at what looks like a discount, investors would like to know which is the better buy. Let's compare the two on a handful of important criteria and see if we can find a winner.

Recent performance

When Valeant finally reported first-quarter results this year, revenue had risen 9% from Q1 2015 to $2.4 billion. Those hardly seem the results of a company in trouble. However, the increase was almost entirely due to acquisitions completed in 2015. Organic sales from operations existing during Q1 2015 fell $289 million.

A $694.5 million drop in intangible assets (those without a physical form) dragged Q1 2016 operating profit down to just $66.2 million from $571 million in Q1 2015. A whopping $425.7 million spent servicing an enormous debt load pulled the bottom line from a positive $98.5 million in Q1 2015 to a loss of $372.9 million in the latest quarter.

Image source: Allergan.

Allergan's first-quarter results were far better than Valeant's, with net revenue growing 48% year over year to $3.8 billion. On the bottom line, the company reported a $186 million profit.

The view beneath the surface isn't quite as pretty. Allergan's planned $40 billion-plus sale of its generics segment to Teva Pharmaceutical Industries might put a heap of cash in its coffers any day now, but the sale would leave it with operations that are still unprofitable. In the first quarter, Allergan's operations -- the ones it's not selling to Teva -- recorded a $153.8 million loss.

Looking ahead

Allergan's bottom line was hit by a whopping $332.8 million in interest expense in the first quarter. A $40 billion sale of its generics segment to Teva should help the company pay down over $38.6 billion in long-term debt on Allergan's books at the end of March.

Image source: Valeant Pharmaceuticals.

First-quarter sales of Allergan's U.S. brands rose 27.3%, and a 2.9% wider operating margin for the segment is a big step in the right direction. A handful of new and label-expanding drug applications submitted to the FDA in the first quarter alone could feasibly put Allergan's "continuing" operations on a path to profitability.

The same can't be said of Valeant. Its previous model of buying commercial-stage drugs and then raising their prices is under a microscope, and it has few potential growth-drivers. Three products under review at the FDA -- for glaucoma, opioid-induced constipation, and AstraZeneca-partnered brodalumab for treatment of psoriasis -- might provide some lift in the years ahead.

Unlike Allergan, Valeant is losing pricing power on its existing product portfolio. Provisions (including rebates and charge-backs) as a percentage of gross sales grew from 31% in Q1 2015 to 41% during the latest quarter.

It also seems the recent deal to distribute products through leading retail pharmacy chain Walgreens Boots Alliance isn't the life raft Valeant investors had hoped for. Net sales recognized through the new arrangement comprised less than 3% of Valeant's total during the first quarter. An approximate 10% price reduction to Valeant's important branded skin and eye-care products in association with the deal, along with revelations that some prescriptions actually have a negative average selling price, don't bode well for the partnership.

Solvency issues

Valeant squeaked out operating income of just $66.2 million in Q1 2016. If it continues at this pace, I don't see how it can service its massive long-term debt obligations of about $41.9 billion. Payments of about $1.9 billion due by the end of this year, $8.3 billion over 2017 and 2018, and $12.7 billion over 2019 and 2020 will most likely require the company to sell off some assets.

As my Foolish colleague Sean Williams pointed out, Valeant's desperate situation is hardly a secret, which would put it in an unfavorable position to negotiate potential asset sales. Once assets are sold, its ability to generate profits comes into question.

Allergan also has a huge debt load. However, it's positioned for growth and would probably generate enough operating profit to service that debt, even if the Teva deal falls through.

Valeant's shares might look cheap, but Allergan's relative safety makes it a better buy, hands-down.