Nearly every generation of Apple's (NASDAQ:AAPL) iPhone seems to have a "gate" scandal related to perceived flaws. Users complained about the iPhone 3G's cracked cases, the iPhone 3GS's overheating issues, the iPhone 4's antenna problems, the iPhone 5's camera issues, and the iPhone 6's "bendable" frames.

With the iPhone 6s, it's "chipgate," which alleges that its A9 chips -- some of which were produced by TSMC (NYSE:TSM) and others by Samsung (NASDAQOTH: SSNLF) -- were not created equally. TSMC's 16nm A9 chips are larger than Samsung's 14nm A9 chips, but several independent tests revealed that the former could offer up to two more hours of battery life than the latter.

Source: Apple.

Apple acknowledged the difference, but claimed that real-world battery life between the two chips only varied by 2% to 3%. However, that admission supports reports that TSMC may be the exclusive supplier of Apple's upcoming A10 chips, which are expected to start production next March. Since Samsung's chipmaking pain translates to TSMC's gain, should investors load up on shares of TSMC today?

How much does Apple matter to TSMC?
TSMC is the world's largest pure-play semiconductor foundry. Only a handful of other companies have comparable chipmaking facilities. This means that "fabless" manufacturers, which don't manufacture their own chips, must rely on these four giants for chip production.

TSMC doesn't disclose exactly how much of its revenue comes from Apple. But back in February, analysts cited by Taipei Times expected Apple's contribution to TSMC's top line to rise from 6.5% in 2014 to 9.6% in 2015. However, that estimate was a conservative one that expected Samsung to produce a larger percentage of A9 chips than TSMC. But since TSMC actually produced half of the A9 chips, it's likely that Apple orders will account for more than 10% of the company's revenue this year.

While Apple could potentially make TSMC the exclusive supplier of A10 chips, there's no guarantee that it will hold that position for future chips. The situation might be different if TSMC had accepted Apple's offer to buy a stake in the company back in 2011, which the foundry rejected because it wanted to stay flexible and independent.

Source: Apple.

But it's not just about Apple
Although Apple is one of TSMC's top clients, the foundry also produces chips for a large number of PC and smartphone makers. This means that while robust demand for iPhones might boost its revenue, those gains can be offset by slower growth in the PC and mobile markets.

During the third quarter, TSMC's revenue rose 1.7% to $6.56 billion. Net income slipped 1.3%, but its diluted earnings of $0.46 per ADR topped estimates by a penny. TSMC expects to generate revenues between $6.23 billion to $6.29 billion for the fourth quarter, which is in line with analyst expectations but down from $6.9 billion a year ago. That decline was attributed to tough comparisons to last year. A weak PC market and soft demand for smartphones in China also affected sales.

TSMC also reduced its capital expenditures budget for the second time this year to $8 billion, down from a prior range of $10.5 billion to $11 billion. However, that cut was expected due to oversupply and weak pricing across the sector.

A brighter 2016
The A9 split with Samsung, the sluggish PC market, and the weak Chinese smartphone sales will all weigh down TSMC's top line for a few more quarters. Nonetheless, analysts polled by Thomson Reuters still expect TSMC's revenue to grow 9.5% annually in 2015 and for earnings to rise 7.1%.

The outlook for 2016 also looks much brighter. The exclusive production of A10 chips should get sales back on track if TSMC scores it.. Research firms IDC and Gartner both expect the PC market to stabilize next year. Rising demand for smartphones in India, the third largest smartphone market in the world, could offset slower demand in China.

The key takeaway
TSMC only trades at 14 times forward earnings and has a five-year PEG ratio of 0.8 (based on Thomson Reuters estimates), making it a fairly cheap investment in the semiconductor market. The stock will likely be weighed down by short-term issues, but investors still get paid a decent 3.3% dividend yield for waiting until the outlook improves next year.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.