Freescale Semiconductor (NYSE: FSL) might scare you off at first. Even though its quarterly revenue is more than $1 billion, it has posted a net loss over each of the last four years and is saddled with close to $6 billion in debt. The debt and the losses are closely connected, and they have to do with Freescale's curious history.

"One of the ugliest buyouts in history"
Once a long-running division of Motorola, Freescale was spun off from the parent company in 2004. Then, in 2006, in the most expensive tech buyout at the time, it was acquired by a consortium of private equity companies for $17.6 billion. At that time, $9.5 billion in debt went on the company's books, and Freescale has been struggling to service this ever since -- going public again in 2011.

The debt has been a major factor behind Freescale's net losses in recent years. For example, in 2013, Freescale recorded $531 million in operating income on revenue of $4.17 billion. This compares favorably with competitors such as Broadcom (NASDAQ: BRCM), which managed income of $472 million from $8.21 billion of revenue. However, Freescale spent almost $700 million servicing and restructuring its debt in 2013, resulting in a net loss of $208 million.

Gregg Lowe took over as CEO in 2012, and Freescale embarked on a restructuring to cut costs, direct research and development spending to profitable areas, and regain share in key markets. Management has mainly been focused on increasing revenue and gross margin, tying employee compensation to those two metrics. What has been the outcome?

Freescale sees some sunshine
After a long time, Freescale has been seeing some positive results from all the hard work. In the first quarter of 2014, revenue was up 15%, year over year, to $1.13 billion, and gross margin was 44.8%, close to the "higher 40% range" that management set as a goal. The operating loss, which included $59 million connected to debt retirement, was $23 million, an improvement over the $48 million loss in the first quarter of last year .

What's behind the revenue growth? Automotive microcontrollers being its largest segment, Freescale is benefiting from an increase in automotive production and more chips inside cars. The radio frequency and digital networking segments have grown in the double digits, spurred on by the LTE rollout in China. Finally, the general microcontroller segment, which is the company's most diverse and fragmented in terms of the customer base, grew at 26% year over year, thanks to the increase in the size of the product portfolio over the last several years.

Just as important, the debt is coming under control. Thanks to refinancing, the interest payments are expected to come down by $70 million this year, giving Freescale more cash to operate with. Also, 90% of the debt will mature in 2020 or later, though the company might choose to pay some of this earlier if its prospects continue to improve.

Looking forward
The prospects, at least in the near term, appear good. For the second quarter, management is estimating revenue between $1.14 billion and $1.20 billion, and an increase of 50 to 75 basis points in the gross margin. Along with the more manageable debt, this should help Freescale move closer to permanent profitability.

So is this a good time to buy? Following the earnings announcement for the fourth quarter last year, Freescale's share price rose from $15.30 to $25.88, a 70% gain. After the first-quarter announcement, which beat estimates and provided positive guidance for the upcoming quarter, the stock dropped unexpectedly and is now trading at a tempting $21.80.

Freescale is unlikely to give any of its hard-earned cash back to investors any time soon, and will instead use it to invest in the company and to pay off debt. Nonetheless, if it manages to continue growing revenue and improving the gross margin, an increase in the stock price seems likely. If you are bullish on the semiconductor market, Freescale Semiconductor is worth a look.