[UPDATE: According to the Wall Street Journal’s Peg Brickley, the judge supervising GT’s bankruptcy has ordered the unsealing of the original, unexpurgated version of the Squiller declaration excerpted below. Bankruptcy-code protections against defamatory information don’t apply to Squiller’s characterizations of Apple’s behavior, Judge Henry Boroff said Thursday. “I simply do not think that they are sufficiently egregious that they are unusually prejudicial to Apple.” Despite Apple’s objections, we could see the missing pieces of Squiller’s testimony as early as next week.]

When Apple’s chief supplier of sapphire filed for bankruptcy three weeks ago, included in the court documents was a sealed affidavit offered by Daniel Squiller, the COO of GT Advanced Technologies GTATQ . It was sealed, according to GT’s lawyers, because it contained details covered by an Apple non-disclosure agreement that was going to cost GT $50 million for each violation.

With that, the so-called Squiller Declation became a legal hot potato — the hottest in what may turn out to be the biggest bankruptcy in GT’s home state of New Hampshire.

On Tuesday, after three weeks of legal wrangling, Squiller filed a revised declaration that is probably as close as we’re going to get to a definitive account of where the deal went south. His summary:

The key to making the transaction profitable for both sides was the production of a sufficient number of 262kg boules of sapphire crystal meeting the specifications required by Apple. GTAT has sold over 500 sapphire furnaces to Asian customers that produce 115kg boules. Most sapphire manufacturers using non-GTAT furnaces produce boules of less than 100kg in size. Production of sapphire at 262kg would provide for scale, that if accomplished, would be profitable to both Apple and GTAT. Unfortunately, the production of 262kg boules of sapphire could not be accomplished within the time frames the parties had agreed, and was more expensive than anticipated. These problems and difficulties resulted in a liquidity crisis at GTAT, which led to the commencement of these chapter 11 cases.”

The juicy stuff, however, is in the details.

In 21 pages of testimony, Squiller tells a tale of woe that says volumes about what it’s like for a small manufacturer to do business with a company as powerful and demanding as Apple.

His complaints fall into two categories: 1) Contractual obligations that favored Apple and put GT at risk and 2) things that went wrong on the ground over which GT had no control.

Screen Shot 2014-10-29 at 12.41.52 PMStarting with the agreement it signed, Squiller lists 20 examples of terms dictated by Apple that laid all the risk on GT. A sample:

  • GTAT committed to supply millions of units of sapphire material. Apple, however, has no obligation to buy any of that sapphire material.
  • GTAT is prohibited from modifying any equipment, specifications, manufacturing process or materials without Apple’s prior consent. Apple can modify any of these terms at any time and GTAT must immediately implement Apple’s modifications.
  • GTAT must accept and fulfill any purchase order placed by Apple on the date selected by Apple. If there is any delay, GTAT must either use expedited shipping (at its own cost) or purchase substitute goods (at its own cost). If GTAT’s delivery is late, GTAT must pay $320,000 per boule of sapphire (and $77 per millimeter of sapphire material) as liquidated damages to Apple. To put this figure in perspective, a boule has a cost of less than $20,000. Apple, however, has the right, without compensating GTAT, to cancel a purchase order in whole or in part at any time and reschedule a delivery date at any time.

.

Meanwhile in Mesa, Apple was making unilateral decisions that, according to Squiller, made it increasingly difficult for GT to make good on its obligations. I quote:

  • Apple selected the Mesa Facility and negotiated all power and construction contracts to design and build out the facility with third parties… The first phase of the Mesa Facility was not operational until December 2013—which was only 6 months before GTAT was expected to be operating at full capacity. Additional unplanned delays continued to surface, because the Mesa Facility required a significant amount of reconstruction, including reconstruction of floors roughly the size of multiple football fields.
  • After much discussion, it was determined that implementing power back-up for the furnaces was too expensive and, therefore, non-essential. That decision was not made by GTAT. On at least three occasions, power interruptions occurred, leading to significant delays and losses of whole production runs of sapphire boules.
  • In addition, Apple sent a significant number of employees to the Mesa Facility… As much as 30% of GTAT’s R&D and manufacturing team’s time was spent interacting with Apple’s employees.
  • Many of the processes associated with cutting, polishing, and shaping sapphire (this is the “fabrication process”, in contrast to the “growth process” that takes place in the furnaces) were new, given the unprecedented volume of sapphire being grown at the Mesa Facility. GTAT did not select what tools to use and what fabrication processes to implement at the Mesa Facility. GTAT had no direct contact with suppliers of cutting and polishing equipment to specify and in some cases develop such tools.
  • GTAT believes that it was unable to achieve its planned fabrication cost and production targets because many of the tools did not meet their performance and reliability specifications. Over time, a majority of the selected fabrication tools had to be replaced with alternative tools, resulting in additional capital investment and operating costs to GTAT and months of lost time in production. The fabrication cost was approximately 30% higher than planned, requiring nearly 350 additional employees and significantly higher consumption of diamond wire and other wear items than originally planned. GTAT was required to absorb these additional costs.

By the time it sought protection from its creditors, according to a separate court filing, GT was losing $1.5 million a day.

Apple has not yet responded to Squiller’s latest declaration (but see UPDATE). Its most recent statement was issued last week:

Apple put a lot of effort into an ambitious new sapphire manufacturing process with GTAT which is not ready for production. We’re going to continue evaluating GTAT’s progress on larger sapphire boule development, as well as consider other options for the facility. We remain committed to the city and we’re going to work with Mesa and Maricopa County to help the GT Advanced employees who will be impacted by this find new jobs.”

Squiller, meanwhile, may have to answer for his own actions. The Wall Street Journal’s Daisuke Wakabayashi reported two weeks ago that in May 2014, after the initial signs of trouble surfaced in Mesa but before GT filed for bankruptcy, Squiller sold $1.2 million of GT stock and set up a plan under which he sold another $750,000 of shares over ensuing months.

According to the Journal, GT CEO Thomas Gutierrez also set-up a pre-arranged plan in March and sold $160,000 worth of GT shares on Sept. 8, the day before Apple announced that its new iPhones would not use sapphire screens made by GT.

UPDATE: Missed this the first time through. Squiller wraps up his testimony by switching sides and offering the Court Apple’s objections to his story:

Based on my own discussions with Apple executives (or on recent press statements by Apple), I would expect Apple to forcefully contend, among other things, that (a) the failure of the sapphire project was due to GTAT’s inability to manufacture sapphire in accordance with the terms of the agreements between the parties, (b) GTAT was free to walk away from the bargaining table at any time in 2013 and yet knowingly entered into the transaction after extensive negotiations because of the enormous growth opportunity that doing business with Apple represented, (c) Apple accepted substantial risks by entering into the transaction, (d) any specifications GTAT failed to meet were mutually agreed to, (e) Apple did not wrongfully control or interfere with GTAT’s operations, (f) Apple collaborated with GTAT in good faith, and (g) Apple was not aware of the losses (or the magnitude of the losses) being incurred by GTAT in connection with the transaction. Given that Apple and GTAT have reached a settlement, it serves no purpose for me to go through these issues in detail at this stage.”

For more details, see DECLARATION OF DANIEL W. SQUILLER.

Follow Philip Elmer-DeWitt on Twitter at @philiped. Read his Apple AAPL coverage at fortune.com/ped or subscribe via his RSS feed.