Taiwan Semiconductor Manufacturing Corporation (NYSE:TSM) is the world's leading independent semiconductor foundry. While shares are up nicely since the beginning of 2011 (a cool 32%), the shares have spent a good chunk of the second half of 2013 rather range-bound. This is, in no small part, due to fears of potential underutilization of its 28nm capacity and increased competitive pressures from the likes of Samsung (OTC:SSNLF), Global Foundries, and Intel (NASDAQ:INTC). While the challenges are real, it's far too early to count this semiconductor stalwart out.

Hello, Apple!
The most poorly kept secret in the semiconductor industry is that Apple (NASDAQ:AAPL), one of the world's largest consumers of smartphone apps processors, will be moving production of its next-generation A8 system-on-chip (at least in part) to Taiwan Semiconductor. The ramifications of this deal are rather meaningful, since Apple's mobile devices total roughly 200 million units per year.

Now, TSMC probably isn't going to get all of Apple's business, as Samsung is likely to fight viciously to win back part of those orders. Further, as Apple's Tim Cook is a veritable master of supply chain management, he is likely to want to pit these two players against each other to score the best deal possible (which means the lowest margins possible for the foundries). That being said, while TSMC owns the vast majority of the 28nm mobile chip business (thanks to a first-mover advantage), one notable omission is Apple, so any orders from Apple would represent meaningful upside.

If TSMC can fetch $19 per chip at 20nm (which is about the price that iSuppli estimates Apple pays Samsung today), and if it's in all of the upcoming iPhone 6 models, then this could represent (assuming sales of, perhaps, 30 million - 40 million units in 2014) an incremental opportunity of $570 million-$760 million for the year. At 45% gross margin, which is below the corporate average, TSMC would pocket around $342 million in gross profit that wasn't there before.

It's not all roses, though
While this is a nice piece of business, and while the handset market will continue to grow to TSMC's benefit, there's no discounting that Global Foundries and Samsung are becoming very aggressive at the 28-nanometer node. It is likely that TSMC will be first out of the gate at 20nm, and it is likely that all of the heavy hitters in the fabless space will be giving TSMC plenty of chips to build. But, TSMC could still lose share at the 28-nanometer node. Since this is a mature, low-cost node that will probably live a very long life (especially considering that 20-nanometers doesn't bring the traditional cost-per-transistor improvements seen in past node transitions), chips built on it still matter quite a bit from a profitability standpoint.

If TSMC can keep its 28nm factories full, then those (coupled with what is likely to be a headstart on 20nm) will help drive impressive profitability during 2014. If it starts to run into underutilization, then gross margins taken as non-cash excess capacity charges start to flow through to the bottom line. TSMC's Chairman, Morris Chang, was adamant on numerous calls that the capacity the company was putting in was the right amount, so investors should be looking to validate that belief as the next year plays out.

Foolish bottom line
While TSMC is spending quite a bit on capital expenditures in a bid to fortify its position as the leading independent semiconductor foundry, the upcoming Apple contracts should go a long way to justifying those expenses. Further, as the vast majority of mobile chip vendors build at TSMC, the company is still nicely levered to this key growth market. The major risk is that Samsung and Global Foundries could get super aggressive on pricing in a bid to gain share. While these sorts of suicide tactics can work in the short run, over the long run they are highly capital-intensive businesses that need very healthy cash flows to survive.

Taiwan Semiconductor is a great chip fab with a proven track record of competitiveness and profitability. It will be very interesting to see how it holds up as competition really starts to kick in.