How does a Mormon guy from Orem, Utah, wind up spending endless hours sifting through R-rated jokes for several of the big-screen comedies you’ve enjoyed in the 21st century?

Brent White’s journey started at Sundance. The Sundance Institute, more specifically.

But how White has become the go-to editor for Paul Feig, Judd Apatow and Adam McKay since first working with Feig and Apatow on TV’s Freaks and Geeks — well, that’s a profile in comedy courage told in this weekend’s New York Times Magazine by Jonah Weiner, “The Man Who Makes the World’s Funniest People Even Funnier.”

Weiner follows White through the editing process of Spy, the new movie Feig has directed Melissa McCarthy in that hits movie theaters this June. White’s previous editing credits include Anchorman and Anchorman 2, The Heat, This is 40, The Other Guys, Funny People, Step Brothers, Knocked Up, Talladega Nights, and The 40-Year-Old Virgin.

On all of those films, the directors first shot the scenes as scripted, but then allowed their actors to deliver dozens of alternate lines and tags, sometimes creating entirely new storyline possibilities from their ad-libbed jokes.

Weiner finds out how White employs assistants to transcribe it all from the set, then track the various takes and shots via blue dots for him to cull through for the best and funniest. An excerpt:

Improvisation creates spontaneous magic, but by definition it’s slapdash and unrefined. As Mike Myers once recalled the comedian Dave Foley saying, “Most improv could do with a rewrite.” In this sense, Brent White is a master rewriter, giving more felicitous form to Will Ferrell’s shaggy riffs, Steve Carell’s inspired non sequiturs and Melissa McCarthy’s profane runs — he manages to make the funniest people on the planet funnier. “He has the ability to wade into unstructured material undaunted, to not get lost worrying about the technical challenges and just tap into the rhythm of the scene,” Keith Brachmann said. Paul Feig calls White “the most talented editor I’ve worked with.” Mike Sale is even more effusive: “I’d love to have his career,” he said. “Brent’s a genius.”

Stationed at his console, White can tweak and amplify laughs much the way a music producer uses Auto-Tune to alter and improve vocals. “Avid allows us the time to try out a bunch of different ideas, because you can do it so quickly,” he said. “It allows us to finesse the timing of the joke and the content of the joke, to adjust the rhythm and the size, in a way that has actually made movies funnier.”

Or even create entirely different movies, as we saw last year with two versions of Anchorman 2 reaching cinemas.

Read “The Man Who Makes the World’s Funniest People Even Funnier” in the NYT Magazine.