Weighed down by several weak earnings reports, the stock market was flat for most of Wednesday's trading session. Yet an announcement by the Federal Reserve helped spark an afternoon jump that left indexes with solid gains on the day.

By the closing bell, the Dow Jones Industrial Average (^DJI 0.56%) added 51 points, or 0.3%, and the S&P 500 (^GSPC -0.88%) gained three points, or 0.1%:

^INX Chart

^INX data by YCharts.

The Federal Reserve left interest rates unchanged following its two-day meeting. In an updated monetary policy statement, officials at the central bank said they were closely monitoring inflation and economic growth data as they decide when to pull the trigger on a rate increase to follow December's boost, which was the first in almost a decade.

Individual stocks making notable moves today included Apple (AAPL -1.22%) and Chipotle (CMG -1.34%), which both fell hard after announcing quarterly earnings results.

Apple's iPhone decline
Apple was the Dow's biggest loser, dropping 6%, to bring the stock's 52-week decline to 30% (versus a flat S&P 500). The consumer tech giant posted lower quarterly sales in each of its hardware sectors, with the most notable drop coming in the iPhone business that logged its first year-over-year drop on record. Apple sold 51 million smartphone devices this quarter, down 16% from the prior year's 61 million sales.

Image source: Apple.

The business is far from broken, though. Apple produced $10.5 billion of net income, and generated $12 billion of cash flow. Its services segment grew at a 20% clip, while the division that includes the Apple Watch and Apple TV expanded at a respectable 30% rate. Unfortunately for shareholders, those two segments together don't amount to even one-tenth of the iPhone business that's now in retreat.

CEO Tim Cook and his team forecast another quarter of declines ahead, with fiscal Q3 sales and profit margin set to drop to about $42 billion and 39%, respectively. Yet strong cash flows will fund increasing share repurchases along with a just-announced 10% boost to Apple's dividend. Looking further out, investors have to hope for a killer upgrade cycle on the next iPhone model.

Chipotle's net loss
Chipotle stock fell 6% after shareholders saw something they haven't witnessed since the restaurant chain went public a decade ago: a quarterly net loss. Earnings dove from a $3.88 per-share profit a year ago to a loss of $0.88 per share as the financial fallout from its food safety crises continues to mount.

Image source: Chipotle.

Sales at existing locations fell 30% in Q1, which isn't an improvement from the last update Chipotle announced (-26% comps in February). That traffic drop, plus added food-safety expenses, caused significantly lower profitability as restaurant level margins sank to 7% from 28% a year ago.

Management was optimistic that things will eventually improve, though. "The best approach to rebuilding our business is to proudly serve safe and delicious food in our high-quality restaurants every single day, which is exactly what we will continue to do," CEO Steve Ells said in a press release.

Ells and his team acted on that optimism by repurchasing a whopping $600 million of Chipotle's stock during the last few months, for more than 10 times the company's average quarterly buyback spending.

CMG Stock Buybacks (Quarterly) Chart

CMG Stock Buybacks (Quarterly) data by YCharts.

Five years from now, that spending could pay huge dividends -- assuming executives are right in their assessment that, as Ells put it, Chipotle is on "a gradual path to recovery."