Were rampant misogyny and coarse racial intolerance meant to be laugh riots, 2003’s National Security would have been the blockbuster to end all blockbusters — the Avatar of asininity.

Yet another wretched excuse for a film from director Dennis Dugan, this “comedy” turned aggressively unpleasant and squirm-worthy.

Cringe comedy saw a welcome Zeroes renaissance on TV with Curb Your Enthuasiasm and both iterations of The Office, but there were on-point social ills and conventions in those, as well as a touch of heart.

Security’s ineptitude lied not with using race commentary to spark comedic fire, but a shtick so full of hatred from star Martin Lawrence that no ethnicity went unscathed, even blacks.

All of this is wrapped in a formulaic buddy-cop package, with a pair of security guards — L.A.P.D. reject Earl Montgomery (Lawrence) and former cop Hank Rafferty (Steve Zahn) — teaming to take down evil precious-metals smugglers.

Not even good action could temper this film’s repugnance, but Security lacks even that. Every gun battle is the prototypical slow-motion two-gun John Woo shootout, and every car chase ends with a car rocketing off what must be some sort of hidden jump ramp.

Otherwise, it’s all loud-mouthed ugliness spewing forth from Lawrence’s mouth. National Security reaches a true low when Earl, in a position to help Hank with a failed relationship, realizes Hank’s girlfriend is black and changes his mind.

Lawrence littered The Zeroes with terrible films — Black Knight, Rebound, two Big Momma’s House films. This was the worst.