"F— you all for giving me chest pains because of the staggering f—ing incompetence," creator Frank Darabont wrote to his collaborators as his nasty legal fight reveals thousands of pages of confidential documents.

In seven years, The Walking Dead has become the most prosperous drama ever to air on cable television. The AMC zombie drama has likely booked more than $1 billion in gross receipts based on an analysis of newly filed court documents that shed unprecedented light on the economics of the show and on Hollywood in general. But after Walking Dead premiered in October 2010 to 5 million viewers (it now draws 17 million, more even than primetime NFL games on broadcast networks), AMC decided to cut the show's second-season budget by 25 percent.

The summer of 2011 was a trying time for Frank Darabont, the Oscar-nominated writer and director of The Shawshank Redemption who adapted Robert Kirkman's postapocalyptic graphic novel. Darabont worked hard to get the show on the air — NBC once had it in turnaround, and other networks like Fox and Turner passed — but once Walking Dead came out, the series about middle America citizens struggling to survive a zombie apocalypse earned instant adoration. So Darabont was stunned by AMC's decision to slash the budget. What's more, after Darabont decided that a single set location — a Georgia farmhouse — would be the solution to the financial crunch, AMC executives demanded to see all of the season's scripts up front before shooting. According to Darabont, AMC's Breaking Bad creator Vince Gilligan told him "it's unheard of" to have scripts delivered so early in the process of producing a season.

Pressure was mounting for Darabont, who felt he was wrestling a giant alligator on a daily basis. And after footage came in, Darabont wasn't liking what he saw — and he wasn't shy about expressing his distaste in a highly obscene way, according to the newly revealed documents in his lawsuit against AMC.

In one June 2011 email to executive producer Gale Anne Hurd and others, he wrote, "Fuck you all for giving me chest pains because of the staggering fucking incompetence, blindness to the important beats, and the beyond-arrogant lack of regard for what is written being exhibited on set every day. I deserve better than a heart attack because people are too stupid to read a script and understand the words. Does anybody disagree with me? Then join the C-cam operator and go find another job that doesn't involve deliberately fucking up my show scene by scene."

That wouldn't be the only profane rant that month. In one email, Darabont asked why camera operators were being paid when "Ray Charles could operate better." In yet another, he compared one of the show's directors to someone whom he'd formerly worked with who had suffered massive, debilitating strokes. "It's like we yanked some kid with no experience out of high school and put her in charge of directing a show," wrote Darabont.

And to AMC's executives, he was no less polite. "Please let's stop invoking 'the writers room,'" he emailed AMC's Ben Davis. "There IS no writers room, which you know as well as I do. I am the writers room. The fucking lazy assholes who were supposedly going to be my showrunners threw that responsibility on me after wasting five months of my time."

Darabont was fired.

But he wasn't buried quietly. Like the fictional "walkers" on the series, Darabont and his agents at Creative Artists Agency came back for blood, filing a massive lawsuit in December 2013 alleging they were denied rightful profit participation from Walking Dead. They are claiming $280 million in damages. Now, a treasure trove of materials has been made public after the parties spent more than half a year arguing about what should remain confidential. What's been revealed — thousands of pages of summary judgment arguments, depositions, redacted profit participation statements, expert testimony, and even details about the financials for other AMC shows like Mad Men, Breaking Bad and Better Call Saul — represent a huge exposure of Hollywood financial secrets.

The volume of newly released information is perhaps surpassed only by its magnitude. For in an industry that is witnessing both technological changes as well as consolidation, Darabont's lawsuit addresses how creatives (and their agents) get compensated when studios producing content share a parent company with the outlet distributing the content. Past lawsuits like the groundbreaking one over Coming to America in the early 1990s against Paramount Pictures or the equally revealing trial over the Police Academy films a decade later against Warner Bros. showcased how "Hollywood accounting" can make profits disappear under a fog of distribution fees and questionable packaging practices. Darabont's agents and deal attorneys thought they had figured out a way to protect him. They allege that when it came time to negotiate how AMC's studio arm would license Walking Dead to the AMC network, they obtained a specific protection aimed at ensuring a fair share of profits. Despite allegedly getting what they wanted, however, participation statements would until recently show Walking Dead in the red. For example, a March 2014 statement to Darabont represented that the drama had earned more than $159 million in total gross receipts from inception to September 2013. But then came $13 million in distribution fees, another $11 million in distribution charges, and $160 million in production costs which included 12.5 percent for administrative overhead. That meant Walking Dead was allegedly in deficit to the tune of nearly $24 million, leaving profit participants empty.

The attorneys for Darabont and CAA say something is amiss.

"AMC has massively increased its own profits — and grossly reduced, if not eliminated, Plaintiffs' profit participation — on the highest rated television series in cable history," states a summary judgment memorandum filed in the case. "They have accomplished this by completely ignoring the contract's protection against inter-company self-dealing."

As evidenced by the inflammatory emails sent to his colleagues, Darabont may indeed have been a jerk. The question his lawyers are essentially putting forward: Has he been jerked around by Hollywood?

Is Walking Dead Worth $30M Per Episode?

In the Walking Dead lawsuit, both sides are now asking a judge to read contracts and come to respective preferred interpretations. In doing so, they've dumped scores of exhibits before New York State Supreme Court Justice Eileen Bransten to lay the foundation for winning arguments.

Some of the information is salacious and will likely not factor into the case. For example, buried in the submissions is a "standards & practices" guide for producers of AMC shows that lays out such oddities as an allowance on the words "Jesus" and "Christ" but not "Jesus Christ" together. Shows are forbidden from using the words "goddamn" and "faggot," but are allowed to use "shit," "asshole," "pendejo" (the Spanish word for asshole), and "pussy," so long as the program doesn't use more than four instances of such words in a given episode and the use is not sexual in nature.

Most of the attention in court papers, though, is directed at 2010 deals for Darabont and CAA (which got contingent profits for "packaging" the show's creative elements) as well as an amendment the following year. The deals, which included flat fees for writing and directing services plus generous bonuses for Emmy and Golden Globe awards ($25,000 for each nomination, $50,000 for each win, which should put some unique perspective on today's Emmy award nominations), were primarily negotiated by Robert Getman, Darabont's transactional counsel, and Roger Arar, a partner at Loeb & Loeb who handled AMC's side.

The Walking Dead litigation is not by any stretch the only accounting dispute that Hollywood has witnessed. Among current court actions, Sylvester Stallone is battling Warner Bros. over Demolition Man while Harry Shearer and others are fighting Vivendi for money from This Is Spinal Tap. Most lawsuits in this genre raise objections like inflated or undocumented marketing costs to explain how studios allegedly cook books to deny meaningful profits to creative talent. There's a reason why Eddie Murphy once called net points on a film's profits "monkey points." What makes the Walking Dead case special is how the plaintiffs — including a humongous talent agency that also reps stars like Tom Cruise, Will Smith and Tom Hanks — are largely focusing on the revenue side of the ledger. A billion dollars might sound like a lot of income for a series, but if Walking Dead is commanding ratings on par with professional football games (for which the NFL takes in $8.66 billion a year) and aids AMC in commanding high advertising fees, carriage agreements with satellite and cable operators, and promotion of other shows, should Walking Dead have booked billions more?

To explain why the series hasn't, Darabont and CAA point to "vertical integration," a business term of art to describe consolidation between a supplier and distributor. This is a particularly thorny topic given that the U.S. Justice Department is currently reviewing AT&T's proposed acquisition of Time Warner. Darabont and CAA say that the deals struck by AMC for Walking Dead don't truly reflect arm's length transactions between the company's affiliates nor a fair market value.

Darabont and CAA claim they had anticipated that this problem might arise in negotiations seven years ago and had come to a method to prevent funny business. In particular, they want the judge to address a provision where AMC agreed to conduct its transactions with affiliated companies "on monetary terms comparable to the terms" made with non-affiliated companies. They seek a declaration that this applies to the "imputed license fee," meaning the amount that AMC Network "paid" AMC Studios for the right to air Walking Dead. Since AMC Studios then has to account to profit participants (Darabont claims he's entitled to about 15 percent of defined profits while CAA gets 10 percent), this figure is important. It also prompts discussion of what AMC Network paid Lionsgate for the right to Mad Men and what it paid Sony for Breaking Bad and Better Call Saul, among other shows licensed from nonaffiliated third parties.

According to the court papers, the license fees for Mad Men started out at $1.85 million per episode, Breaking Bad at $1.75 million, and Better Call Saul (a Breaking Bad spinoff) at $2.5 million, with negotiated bumps for subsequent seasons. By the end of its run, Mad Men, for example, would contribute about $4 million per episode to Lionsgate's coffers.

There are various ways to analyze whether the $1.45 million per episode license fee recorded by AMC during the first four seasons of Walking Dead was "comparable." Thanks to a recent development (more on that in a moment), AMC is now imputing a license fee of $1.87 million to $2.4 million an episode.

Richard Marks, one of the plaintiffs' experts, measures how much of the production costs were covered by the license fee, finding that 65 percent for the zombie show was inferior to the around 80 percent for the other three AMC shows. Both he and James Dertouzos, another plaintiffs' expert, also look at other factors like Walking Dead's superior ratings to estimate what the show would have sold for if it had been on the open market. Dertouzos concludes that the show would be licensed for $23.2 million to $28.7 million per episode. On the other hand, AMC appears primed to emphasize the fact that almost every major network got a chance to air Walking Dead when it was initially shopped around almost a decade ago. At his deposition, Darabont's CAA agent Bruce Vinokour had to recount the many networks that passed. (CBS wasn't pitched because its demographic was seen as too old, and after NBC rejected a commissioned script from Darabont in 2005, ABC, Fox, FX and TNT all turned down the project.) In court papers, AMC pats itself on the back for taking a financial risk that others didn't. Of course, that was before the show was a hit. In Hollywood, renegotiations are common.

For now, the proper imputed license fee isn't what a judge is being asked to decide. Darabont and AMC just want the judge to rule the contract mandates comparable treatment for licensing. A trial, still a couple years away thanks to an overloaded court docket in New York, would determine the rest. The plaintiffs say they will establish at trial that "a fair market license fee for TWD — the most popular show on television — is $20-30 million per episode."

AMC, of course, sees the claim differently, arguing that there's really no "transaction" happening in the first place and that Darabont is trying to achieve through post-agreement litigation what he couldn't through pre-agreement negotiation.

"The fatal flaw in Plaintiffs' primary claim is that the parties agreed that any transactions between AMC affiliates in connection with exhibitions of the Series on AMC Network would be irrelevant for purposes of calculating contingent compensation," writes Marc Kasowitz, attorney for AMC in the studio's own summary judgment brief. "In lieu of calculating contingent compensation by referencing any actual licensing transaction between AMC affiliates, the parties agreed to use an 'imputed license fee.'"

The only requirement, he adds, is that Darabont's and CAA's imputed fee formula be no less favorable than any other Walking Dead profit participant and that a distribution fee wouldn't be charged with respect to this. When Darabont's deal was negotiated in 2010, he adds, the only person who had ever gotten a better imputed license fee in the history of the company was Steven Spielberg.

The plaintiff attorneys think this is ludicrous.

"Under its self-serving and convoluted interpretation, AMC and its lawyers maintain, and have even testified, that AMC would be in full compliance with the Agreement by imputing a license fee for TWD of $100 per episode — millions of dollars below fair market value — so long as AMC imputed the same miniscule license fee to all other MAGR [modified adjusted gross receipts] participants," state the lawyers at Kinsella Weitzman and Blank Rome handling the Darabont/CAA side.

After summary judgment papers were privately exchanged between the parties last autumn, something interesting happened. AMC came to an amended deal with Walking Dead makeup effects guru Greg Nicotero, making him a 1 percent profit participation on the show. The deal also imputed an improved license fee formula, bumping up the per episode license fee and meaning that the studio then had to give Darabont and CAA equal treatment. This year, each received checks for more than $3 million. That's also being revealed for the first time today.

Was it an attempt by AMC to show compliance with its interpretation of the agreement guaranteeing most favored status or, more cynically, a way to present itself before the judge as slightly less greedy? The parties are fighting how to frame this development. It will probably come up in a court hearing next month.

Darabont Attempts to Save Face for Nasty Emails

"YOU NEED TO PAY ATTENTION TO THE MOTHERFUCKING SCRIPT! I EVEN CHOOSE MY GODDAMN COMMAS FOR A REASON!"

This quote is from one of the many ornery emails sent by Darabont to colleagues in June 2011, a month before he was fired from the show he had created. Once he was terminated, Darabont couldn't even watch Walking Dead. Asked at his deposition about the extent of editing after his departure, Darabont responded, "Honestly couldn't say because I didn't watch the show." When the opposing lawyer mentioned he had, Darabont shot back, "I hope you enjoyed it."

AMC may be cutting checks now to demonstrate that a billion-dollar show can indeed generate profits to those who have a share, but Darabont is in the midst of his own damage control.

"Each of these emails must be considered in context," states Darabont in an affidavit. "They were sent during an intense and stressful two-year period of work during which I was fighting like a mother lion to protect the show from harm — not only on my own behalf, but ironically also on behalf of AMC."

Continuing, Darabont can't help but take a few more shots.

"Each of these emails was sent because a 'professional' showed up whose laziness, indifference, or incompetence threatened to sink the ship of production and added unfair and unnecessary burden to their colleagues in the cast and crew. … My tone was the result of the stress and magnitude of this extraordinary crisis. The language and hyperbole of my emails were harsh, but so were the circumstances. As for the enormous problems they describe, I stand by these emails to the last detail."

AMC, of course, is trumpeting his rants in court papers in an attempt to demonstrate he was properly terminated from the series.

"Darabont's erratic and unprofessional performance and his behavioral and interpersonal issues during Season 2 raised a number of concerns for AMC Studios," writes AMC's lawyer. "Among other things, his failure to timely deliver scripts, failure to adequately supervise the writers' room, and his volatile and disturbing interactions with staff and talent were impacting production."

This argument is supported by deposition testimony from a couple of former AMC executives including Joel Stillerman (now chief content officer for Hulu), who testified that Darabont was removed because he was "jeopardizing" the long-term sustainability and success of Walking Dead and that problems included "some incredibly unacceptable behavior going on with respect to how he treated people."

The studio also nods to testimony from Glen Mazzara, who took over showrunning duties in the middle of the second season (before leaving after the third). During his deposition, Mazzara had used the words "show killer" to describe the state of affairs at the beginning of the second season.

Then again, when questioned by plaintiff lawyers, Mazzara also testified that he thought Darabont was a "good showrunner," working around the clock on the show, and that AMC had treated Darabont unfairly.

"I believe that Frank was executing his responsibilities and duties as showrunner and there was a personal rift between Kirkman and Darabont and between Darabont and the AMC executives," said Mazzara. "When the material for the [season two premiere] came in and Frank said I need some time to figure out a plan of how to pursue this and what we're going to re-shoot and what it will take to do this, AMC was unwilling to give him that time to solve the issue and they let him go without notifying him that he was, that the issues were that serious. That if he did not appropriately solve these issues, he was about to be fired."

Thanks to AMC's budget cuts and demands for early looks at all second-season scripts, which necessitated some big advance planning, Darabont can say he indeed worked on episodes even past the point of his firing. He not only decided that shooting at a single location would ease the show's expenses, he also worked hard to convince a religious family who owned the "Hershel Greene farm" to allow shooting there. (The owners had objections to the content of the AMC show.)

That Darabont can claim a hand in all of the second season's episodes is important because his contract entitles him to contingent compensation bumps upon reaching certain milestones. Whether or not he gets 15 percent of defined profits rather than just 11 percent depends on a contractual interpretation. One of AMC's biggest asks in its own summary judgment motion is to have the judge declare he wasn't vested at the higher level because he wasn't physically present at the end of that season. They argue he was required to provide on a "full-time and in-person basis … all services customarily rendered by persons employed in the television industry."

Until now, AMC has been vague about the reasons for Darabont's departure. For example, headed in 2012 to the Television Critics Association conference where networks promote their shows, AMC's marketing team scripted out answers to questions they expected to get from reporters. AMC executives Charlie Collier and Stillerman were instructed to say that budgets played no role in Darabont's departure, and if pushed, to refuse to get into specifics. As for an expected question about whether Darabont wrote the first six episodes and Mazzara wrote the second six, the answer would be, "That's just not accurate, as it's impossible to parse where Frank's role ended and Glenn's began."

AMC also seeks to toss Darabont's claim that he was improperly denied the right to negotiate for employment on the third season of Walking Dead as well as spin-offs Talking Dead and Fear the Walking Dead. The studio argues it rightfully fired him and thus extinguished its continuing obligations. It also says he never expressed interest in rendering services in connection with those latter two shows.

Darabont's position is that AMC never really fired him for cause, that the network just decided to execute a "pay or play" provision that didn't cancel those obligations. His attorneys believe that AMC is as edacious as Walking Dead villain Negan. Among the exhibits lodged is a Hollywood Reporter story about how AMC CEO Josh Sapan's pay rose 323 percent to $40.3 million in 2014. Another is a 2012 conference call that Sapan conducted with stock analysts where he said, "I mean the standard rule in TV is if the show is successful, you'll pay more. If you are the studio, then you're paying yourself in many cases. So it's why we have such a strong bias toward owning."

So, who is the bigger pendejo in this case?

"Rather than a referendum on me, this lawsuit is about AMC's radically undervaluing The Walking Dead in order not to share profits in a manner reflecting the show's actual fair market value," says Darabont in his affidavit. "This lawsuit is also about AMC's refusal to share the unprecedented success of the show with the people who actually created that success for them, and about AMC's self-dealing and corporate greed."