“The Accountant 2” is a joyously ridiculous, enjoyably profane sequel to “The Accountant” (2016), about a math whiz portrayed by Ben Affleck, who has excellent marksmanship but questionable interpersonal skills. Like the previous film, the sequel embraces brutality without apologies, splatters the screen with (fake) blood, and unleashes a tiny army of stunt artists who convincingly play dead. This one has another convoluted intrigue and a lot of narrative, but the most of the suspense comes from seeing Affleck battle to stifle a smile while sharing the screen with an exuberantly showboating Jonathan Bernthal.

The sequel follows up eight years after the original film, which introduced Affleck’s Christian Wolff, a brilliant autistic forensic accountant who moonlights as a freelance avenger with the assistance of pals. (The film’s casual use of clichés includes the stereotype of the autistic savant.) J.K. Simmons appears as Ray King, the former director of the Treasury Department’s criminal investigations branch. He momentarily arrives wearing a hat and quickly departs without a pulse, but not before putting the plot in motion. Cue the gunshots and orchestrated pandemonium, as well as amnesia, cosmetic surgery, trafficking women, kid captives, and a slew of villains who are vicious enough to arouse (and exaggerate) the audience’s bloodlust.

Marybeth Medina (Cynthia Addai-Robinson), King’s replacement, returns later to assist move the plot ahead, as does Christian’s younger brother, Braxton (Bernthal). Everything (and everyone) flows together, more or less, even when the narrative defies belief, as B-movie shoot-em-ups sometimes do. It helps that there’s less backstory here than in the previous film, which focused on Christian’s traumatic background and his Oedipally shaped violent skill set. That allows the filmmakers — like the previous film, this was written by Bill Dubuque and directed by Gavin O’Connor — to focus on keeping all of the people and pieces flowing smoothly. Affleck, for example, commands attention with his controlled, inward-directed performance.

One enticing pull of a diversion like this is that, while the nice folks are frequently awful, the evil ones are undoubtedly worse. Both Christian and, notably, Braxton have apparent moral flaws (ha!), yet their kill numbers are never an issue, placing them in good, packed company. Gunslingers are popular in American movies, whether they have Texas or British accents, wear white or gray caps, or look like Christian. Among these are seemingly regular guys — blue-collar workers, next-door parents, computer jockeys — who, when pushed to the brink of cataclysmic bloodshed, will remove their spectacles like Clark Kent to change into near-mystically talented avengers. They lock and load, bringing order to a shattered world.

That may mean anything about American violence, gun culture, or contemporary masculinity. Mostly, it implies that filmmakers and viewers have an insatiable thirst for entertainments that disregard the niceties of civilization (judge, jury, and trial included) in the name of civilization. Christian, like many other marauding heroic outlaws, engages in severe frontier justice that only Marybeth (feebly) criticizes. In the first film, Christian and Braxton’s upbringing by a cruel military doctor provided the most implausible reason for how they became the violent men they were. The sequel uses another family’s sorrow as a justification for regenerating slaughter.