Apple faces government investigations and a class-action lawsuit over a software update that slowed down some iPhone processors.

Apple said the software was designed to improve the user experience and prevent unexpected shutdowns in older phones.

Now, Apple has set aside some money to pay to resolve these issues, according to a recent company filing.

As 2017 turned to 2018, Apple faced a swell of consumer anger.

Users had said for years that Apple slowed down their older iPhones through software updates. When one maker of benchmark software produced data and an analysis that showed a few notable software updates seemed to slow down the iPhone's processor, criticism exploded.

Apple said the processor slowdown was related to aging batteries, and that the processor-throttling software was introduced to prevent older iPhones from shutting down unexpectedly. But there was a lot of consumer anger, leading to class-action lawsuits and even investigations from the Department of Justice and the Securities and Exchange Commission (SEC).

Apple said in a recent SEC filing that it has set aside some money to pay for the litigation as a contingency.

"Apple believes that its iPhones were not defective, that the performance management feature introduced with iOS updates 10.2.1 and 11.2 was intended to, and did, improve customers' user experience, and that the Company did not make any misleading statements or fail to disclose any material information," Apple said in the 10-Q filing. "The Company has accrued its best estimate for the ultimate resolution of these matters."

Apple declined to comment when asked by Business Insider about the monetary value of that estimate.

While there are a lot of minor news stories about Apple bugs and issues with its latest products, there are some signs that Apple's battery saga could end up being material to the company's massive bottom line.

As part of its apology, Apple offered discount battery replacements to some iPhone users, which was cited by Apple executives as one reason for its sales miss during this past holiday season. Apple replaced 11 million batteries during 2018, up from the 1 to 2 million it would expect to replace during a typical year, according to Apple blogger John Gruber.

There is also a class-action lawsuit that is starting to progress, as Apple said in its filing. While class-action lawsuits like that often take years to work through the courts, previous class-action suits have resulted in $450 million judgments against the iPhone maker.

So it's not surprising that Apple is setting aside money to pay for litigation surrounding the processor-throttling update. The filing also noted a lawsuit related to VirnetX over patents and the battle with Qualcomm as other contingencies.

Here's the full language from Apple's filing:

iOS Performance Management Cases

"Various civil litigation matters have been filed in state and federal courts in the U.S. and in various international jurisdictions alleging violation of consumer protection laws, fraud, computer intrusion and other causes of action related to the Company’s performance management feature used in its iPhone operating systems, introduced to certain iPhones in iOS updates 10.2.1 and 11.2. The claims seek monetary damages and other non-monetary relief. On April 5, 2018, several U.S. federal actions were consolidated through a Multidistrict Litigation process into a single action in the U.S. District Court for the Northern District of California. In addition to civil litigation, the Company is also responding to governmental investigations and requests for information relating to the performance management feature. The Company believes that its iPhones were not defective, that the performance management feature introduced with iOS updates 10.2.1 and 11.2 was intended to, and did, improve customers’ user experience, and that the Company did not make any misleading statements or fail to disclose any material information. The Company has accrued its best estimate for the ultimate resolution of these matters."