You might be so turned off by Brad Pitt’s broadly comic performance in “War Machine” you’ll bail on this wartime satire within the first hour.

You might think: What is he even DOING?

Pitt clenches his jaw as if he’s just seen “Sling Blade,” speaks in an attention-getting bark, makes weird hand gestures and even walks (and runs) with a stride so uniquely strange he looks like a cartoon character come to life.

It’s deliberately over the top, and I wouldn’t be surprised if some observers say Pitt made huge miscalculations in his acting choices with the result being the worst performance of his career — but I found it to be a brazenly effective piece of work, well-suited to the material.

Writer-director David Michôd’s “War Machine” is a pitch-black wartime comedy in the tradition of “Dr. Strangelove,” “Catch-22,” “M*A*S*H” (the movie), “Wag the Dog” and “Three Kings.”

Based on Michael Hastings’ non-fiction book “The Operators,” this is a thinly disguised dramatization of the American war effort in Afghanistan in the late 2000s as spearheaded by Gen. Stanley McChrystal. After Hastings published an extraordinary article in Rolling Stone magazine in which McChrystal was openly critical of high-ranking government officials, McChrystal was forced to resign as Commander of U.S. and NATO Coalition Forces in Afghanistan.

In “War Machine,” Pitt isn’t playing Gen. McChrystal, not at all! He’s Gen. Glen McMahon, a made-up character!

Ahem.

Scoot McNairy plays Sean Cullen, the doppelganger for journalist Hastings. Cullen’s voice-over narration provides invaluable guidance through the chaos and tumult and uncertainty of the American military mission in Afghanistan.

During one strategy session about the counter-insurgency effort, a Marine raises his hand and has a question: What exactly is the end game here? Keep the peace, protect the people, avoid conflict at all costs, gun down the bad guys, what? He’s all for executing the plan if someone would just tell him the damn plan.

Enter Pitt’s Gen. McMahon, a supremely confident commander who arrives on the scene, announces he will break the Taliban’s seemingly unbreakable grip on the Helmand province, “turn this thing around” and claim total victory for U.S. forces thanks to “the power of [our] … ideals.”

Barks McMahon: “We will win this thing!”

It’s as if a World War II caricature has been parachuted in time and has landed in 2009.

Nearly every scene in “War Machine” is bolstered by some terrific supporting work courtesy of nearly a dozen familiar (and most welcome) faces.

Ben Kingsley — I’m sorry, SIR Ben Kingsley — is the Afghan president, who isn’t sure how to react to this gung-ho American general.

Anthony Michael Hall, continuing his string of beefed-up character roles a million miles removed from his teen-geek John Hughes days, is McMahon’s second in command, Pulver. (At one point when McMahon flies off the handle during a black-tie dinner, complaining there’s not even a single Afghan sitting at their table, Pulver deadpans, “Um boss, I’m pretty sure the Afghan ambassador here is from Afghanistan.”)

Meg Tilly is McMahon’s long-suffering wife. Topher Grace is McMahon’s media advisor. Griffin Dunne and Alan Ruck (speaking of John Hughes alums) drop by. Will Poulter (“The Revenant”) and Lakeith Stanfield (“Get Out”) represent the soldiers risking their lives for … whatever it is they’re risking their lives for.

We even get a cameo by Reggie Brown, the Chicago actor-comedian who burst onto the scene with his Barack Obama impersonation early in Obama’s first term — and yes, he plays Obama in a key scene that illustrates McMahon’s disillusionment with the president.

At the center of it all is Pitt’s Gen. McMahon, who might be a little bit crazy and might be out of touch, but is wholeheartedly and unabashedly dedicated to his country and to his troops. He all but invites us to laugh at him, and yet there’s something admirable about the guy, even in his most absurd moments, because he always comes across as committed and sincere.

★★★1⁄2

Netflix presents a film written and directed by David Michôd, inspired by the book “The Operators: The Wild & Terrifying Inside Story of America’s War in Afghanistan” by Michael Hastings. No MPAA rating. Running time: 122 minutes. Premieres Friday on Netflix.