United Airlines’ three-year bankruptcy restructuring, the largest and longest in the industry’s history, will end up costing the carrier more than $335 million in fees to lawyers and consultants, court documents show.

The fees include $99.8 million charged by the airline’s lead law firm during the 38-month process, Chicago-based Kirkland & Ellis LLC, pending formal approval by U.S. Bankruptcy Court.