Watch the fights live on ESPN+ on the ESPN app.

BROOKLYN, N.Y. -- When TJ Dillashaw agreed to fight Henry Cejudo for the UFC's 125-pound title, he weighed 154 pounds with 8 percent body fat.

So, how in the world did Dillashaw, the UFC's 135-pound bantamweight champion, safely cut 29 pounds in the past 12 weeks for his flyweight title fight on Saturday? The answers lie in his work ethic and a complicated algorithm designed by his strength and conditioning coach Sam Calavitta.

"It makes sure to stay within the bounds of safety, so as not to allow the body to go into siege mode -- a state of withholding that is basically a never-ending circle you can't get out of," says Calavitta, a former aerospace engineer. "That's where guys end up killing themselves."

ESPN went behind the scenes with Dillashaw, 32 -- from his home in Orange County to Calavitta's Treigning Lab to Brooklyn -- to get a real look at his cut to 125 pounds.

"I am a little f---ing insane," Dillashaw admits. "But it's nothing I couldn't do."