Whew, that was a close one. As Microsoft (MSFT 2.69%) loses its Xbox boss Don Mattrick to Zynga (ZNGA) in an effort to save the latter from itself, it turns out that the software giant nearly acquired the social game maker years ago.

Bloomberg reports that Mattrick had met with Zynga founder Mark Pincus to negotiate a possible sale to Microsoft. The talks dated way back to 2010 before the social game maker went public in 2011 at an incredible $8.9 billion valuation that easily looks frothy in hindsight.

Taking a trip down memory lane (i.e., perusing Zynga's original S-1 registration statement with the SEC), the company grew revenue in 2010 by nearly five times to almost $600 million. Thanks to its growing popularity on Facebook with games like FarmVille, Zynga had also grew its monthly active user, or MAU, base by 42% to 217 million. As an early investor in Facebook, Microsoft was possibly privy to additional details surrounding Zynga's rise.

Microsoft realized how big social gaming was becoming, and felt it needed to expand the social horizons of the Xbox. No valuations are discussed, but for reference Zynga went public at 8.9 times trailing-12-month sales. By the time of its IPO, Zynga had put up $1.02 billion in TTM revenue. Using a similar multiple would imply an approximate purchase price of over $5.3 billion. Today, Zynga is worth just $2.6 billion and trades at only 2.2 times sales as investors have lost faith in its ability to redeploy its imitative strategy on mobile platforms.

Much like how Zynga was forced to promptly write down the value of questionable acquisitions like OMGPOP, Microsoft would have had to impair Zynga's value had it made the plunge. Microsoft has already had its fair share of acquisition-related impairments, such as the $6.2 billion goodwill impairment last year from aQuantive.

It's safe to say that Microsoft dodged a bullet on this one. Bloomberg notes that Mattrick and Pincus are both "road-bike enthusiasts" that ride together. With Pincus handing over the CEO title to Mattrick, the two can now ride off into the sunset.