Scott Forstall, The Apple senior vice president of iOS software, just scored a $38.7 million payday, according to an SEC filing cited by Fortune Magazine.

Forstall, 42, recently cashed in over 64,000 company shares, which netted him close to $40 million.

While the sale cleared him out of 95 percent of his Apple stock, the five percent that he does still own are still worth over $1.7 million.

Although major public garage sales of stock, much like this one, tend to imply that an executive is leaving a company, that might not be the case with Forstall.

According to Fortune Magazine, which was first to report on the news, Forstall still has 100,000 restricted stock units, which were granted to him in 2010, that should be fully vested in 2014.

This means that the restricted stock units, a.k.a. retention bonuses, will be sellable for Forstall in around two years -- that is if he stays with the company.

And why wouldn't he? If Apple's stock price continues to rise, they could be worth at least $250 million, if Forstall stays, according to Fortune.

Apple, named the most valuable company in the world by the New York Times in 2011, claims the right to stock that has skyrocketed in recent years and was at $584.37 on Wednesday afternoon from $235.86 around the same period in 2010.

If Forstall needs any advice as to what his next move should be, he might as well look to Apple CEO Tim Cook.

The stock launched Cook's worth to new heights when he was given shares that were estimated to be valued at $376.2 million, according to The New York Times. Now, thanks to Apple's rising stock price, it has increased two-thirds as of early April to $634 million.

Let it suffice to say that if Forstall stays, he will have made the right decision.

Forstall is a graduate of Stanford and has been with Team Jobs since core technologies at Steve Jobs' startup, Next.

After joining Apple in 1997, Forstall handled the development of Mac OS X before jumping to iOS. Over the last couple of years, there have been rumors that Forstall might eventually take Tim Cook's place as Apple CEO.