The exterior of an Apple Store on April 23, 2013 in San Francisco, California. Apple shares swung sharply from red to black and back again Wednesday after the company's shock earnings report, but its huge boost to its capital return program helped the stock end nearly flat.

Apple shares swung sharply from red to black and back again Wednesday after the company's shock earnings report, but its huge boost to its capital return program helped the stock end nearly flat.

Shares in the and maker plunged more than $13 at the opening after Apple reported a fall in quarterly profits for the first time in nearly a decade after markets closed Tuesday.

But the other news from the earnings announcement—that Apple would more than double the money put to and share buybacks to $100 billion—took hold and brought the shares back to the break-even level.

At the close, shares were down 67 cents to $405.46, clinging for a second day above the $400 line.

Sentiment was clearly mixed after the company's fiscal second quarter report late Tuesday (covering to March 31), which showed Apple less able to squeeze profits from its big products than before in the face of tough competition in the and tablet markets.

The California-based company posted a profit of $9.5 billion on revenue of $43.6 billion in the first three months of this year, compared to $11.6 billion on $39.2 billion in revenues a year earlier.

Revenue growth of 11.3 percent "would be good for most companies, but Apple isn't most companies," said Patrick O'Hare at Briefing.com.

"That marks a major from the 59 percent year-over-year growth registered in the same period a year ago.

Product sales numbers grew—iPhones sold in the quarter rose to 37.4 million from 35.1 million a year earlier, and iPads sold surged to 19.5 million from 11.8 million.

But margins were clearly shrinking: the fell to 37.5 percent from 47.5 percent.

The , after a performance over recent years that regularly stunned the markets and sent Apple shares soaring to $705 in September, was expected by analysts, and in fact profits came in better than forecast.

But it also came with a warning from chief executive that the next quarter would not come in as well as expected by analysts.

"Although we've achieved incredible results, we acknowledge our growth rate has slowed," Cook said.

"We will continue to focus on the long term and we remain very optimistic about our future."

What buoyed shares as much was the plan to return more of the company's $145 billion war chest to shareholders, and several analysts keeping a target for the company's price well above where it traded Wednesday.

Apple said it would add $55 billion to the previous $45 billion in its capital return program, including a 15 percent dividend increase.

"We will fund the capital return program from operations and borrowing," said Peter Oppenheimer, Apple's chief financial officer.

Silicon Valley analyst Rob Enderle said Apple was "selling off Apple's future to prop up Apple's stock price in the short term."

A number of analysts cut their price targets for the company after the results, but still rated it a buy. Deutsche Bank lowered its target to $480; UBS to $500; Canaccord Genuity to $560 and BMO Capital a less enthusiastic $435.