It was hard to listen to the second quarter financial report from Apple and not imagine Steve Jobs spinning like a top in his grave.When Jobs took over Apple, the company was awash with debt, mere months from going bankrupt and selling way too many products to manage. Cook's stated plan is to eliminate Apple's cash reserves, increase debt and build a lot more variety into Apple product lines. It reads like he's planning to return Apple to how it was when Jobs took over\u2014hopefully short of the "nearly bankrupt" part.What's really going on? Did Cook really miss everything Jobs should have taught him in the years the two worked together\u2014or is there a plan afoot that we don't understand? Assuming someone at Cook's level is an idiot isn't in itself wise; rising to that level requires a certain amount of intelligence and, as COO, if nothing else Cook should understand numbers.Here's what I think could be going on. Tim Cook Is Toast as Apple CEOAt the outset, Cook had to know that the only reason Jobs wanted him for CEO was because Jobs thought until the very end that he could come back. Given the choice, Jobs believed Apple's board would pick him. In other words, Cook was selected specifically because Jobs knew he couldn't do the job and would be an excellent placeholder because he was so badly matched.Commentary: An Apple Without Jobs Is Cooked and Thank You, Mr. JobsEven if Cook missed that mythical board meeting, watching the company shed value at a nearly unheard of rate\u2014basically undoing years of slow-valuation increase in a few short months\u2014would be enough to put him on the short list of soon to be ex-CEOs anyway. Given his astronomic salary, it's unlikely he'd ever get another CEO job\u2014unless he founded a company, and he really isn't the entrepreneurial type.Cook likely knows his days are numbered, but he likely wants two things: To maximize his stock holdings, which he'll likely have to divest soon after leaving Apple, and to leave a legacy of being better than any Apple CEO who follows him. What happens to Apple after Cook leaves will reflect directly on him. If Apple gets better, Cook will look like an idiot. If Apple continues to decline, the impression will be left that no one could have stopped the free fall, and the board will look like idiots for letting Cook go.Cook's Stated Plan\u2014and a Possible PlanCook's plan is to give back nearly $100 billion of Apple's reserves to stockholders, to build a new Apple headquarters (currently estimated to cost $5 billion) and then institutionalize a dividend program that will make it nearly impossible to build back up a reserve. In addition, because most of the money is held overseas to avoid U.S. taxes, Apple will have to borrow most of the $100 billion it has slated for a stock buyback. This will tie Apple to a massive amount of debt.In the near term, though, the buyback will reduce the number of shares in the market. In addition, offering a huge dividend will entice more people to buy Apple stock. By the law of supply and demand, which a logistics guy like Cook knows backwards and forwards, the end result, regardless of Apple's performance, should be a massive stock price increase. And Tim Cook holds a lot of stock.Transcript: Apple's Cook Talks Quarterly Earnings, New ProductsIf Cook times his departure right, the market will bid Apple's stock even more as he leaves\u2014and, when it's time for him to sell those shares, Apple stock will peak. His forced sale will be tied to his firing, and any related price decline due to his sale will likely be minimal. Then his successor as CEO will take over a company with massive debt, vastly smaller cash reserves and an institutionalized huge dividend that consumes most of Apple's profits. In effect, the firm will be in a nose dive but lack the resources to effectively pull out. Cook will look pretty darn good against what happens after he leaves.This May Not Quite Work to PlanWhile it was expected that Apple shares would increase on the news of this massive stock buyback and dividend, investors actually sold off shares and Apple stock declined instead. It's been all over the map since.This suggests that the plan is not without risk. Investors may have figured out that the vast majority of what was announced will make Apple less competitive, potentially hastening the firm's downward spiral. If so, Cook's plan could backfire. Rather than increase stock value, it could cause a decline\u2014and, in the process, tie Cook to the company's problems and speed up his departure.Commentary: 7 Ways to Get Your CEO Fired and How a CIO Can Save an Incompetent CEOThis may serve as a good showcase of three things: Executive compensation can lead to unfortunate executive behavior, Jobs' efforts to assure his job may have posthumously damaged his company, and whoever takes over from Cook is still royally screwed. Actually, there's a fourth thing: Plans that assume investors are idiots don't always work.Rob Enderle is president and principal analyst of the Enderle Group. Previously, he was the Senior Research Fellow for Forrester Research and the Giga Information Group. Prior to that he worked for IBM and held positions in Internal Audit, Competitive Analysis, Marketing, Finance and Security. Currently, Enderle writes on emerging technology, security and Linux for a variety of publications and appears on national news TV shows that include CNBC, FOX, Bloomberg and NPR.Follow everything from CIO.com on Twitter @CIOonline, Facebook, Google + and LinkedIn.