The fifth feature from Martin McDonagh, playing in competition at Venice International Film Festival, is a deconstructed spy film powered along by bromantic barbs and imperialist skulduggery.

John Malkovich and Sam Rockwell star as Chris and Lee, American agents who, in the mid-1970s, have weaseled their way to Chile as the CIA works to undermine Salvador Allende’s elected government.

Their careers have involved coups, political killings and the routine elimination of figures judged too far to the left. Which is just about everybody. “Guatemala ’64, Congo ’60, Dallas ’63”, Chris says, listing his successes with the bleak comic matter-of-factness of a shopping list. There is little suggestion that these men are ideologues. They are merely murderous bureaucrats.

Chris is dying, however, and facing a late, morphine-enhanced crisis of conscience. He frets about the fate of moths in the rain. He ponders the possibility of dinosaur souls. Most troublingly for his concerned boss (Steve Buscemi), he is talking freely about operations and is threatening to write a memoir.

“Enjoy your left-wing president while you can,” he cheerfully tells a horrified young woman he meets at an airport.

Taking a break from destabilising democracies, Chris and Lee journey to Easter Island for what it slowly becomes apparent are grim purposes.

The film’s furious pessimism is precisely counterpointed by its agreeably rambling, profane comedy. From as long ago as his early play The Lonesome West, nobody has written bickering lads better than McDonagh. Here he juxtaposes absurd associations between homosexuality and cheese with state-sponsored assassination, torture and destabilisation.

Malkovich dives headlong into all the contradictions of a forgetful man pricked by conscience yet unashamed of his darkest deeds. Killing, he observes, gets easier after the first six or seven. Rockwell, a regular McDonagh player, draws Chris in unexpectedly vulnerable shades for a professional apparently unmoved by the questions consuming his colleague.

There are digressions, jokes about Irish bombmaking, endless yarns and elaborate arguments about subjects that have little to do with espionage or common sense. Yet beneath the eccentricity lies a serious historical charge. Wild Horse Nine looks back to Chile in 1973 and finds a familiar question: what happens when a government thuggishly determines that another country’s democracy is expendable?

In the fine tradition of Jenny, the donkey in The Banshees of Inisherin, the soulful horse of this film’s title provides a moment of grace in McDonagh’s unsparing takedown of geopolitical gloom.