I laughed more than I thought I would.

Faint praise, I realize, for this uneven grownups-only comedy “The Machine,” which is based on comedian Bert Kreischer’s standup monologue about his errant youth that involved hard drinking, travel abroad and organized crime.

If you’re one of Kreischer’s fans, you’re doubtless familiar with his standup routine in which he recollects his college days that included a class trip to Russia, where he became known as The Machine and kept company with Russian criminals, or so he says.

Director Peter Atencio (he also directed the hilarious, brilliant “Keanu” – if you haven’t seen it, you should) helms this always-obnoxious, sometimes clever take on Kreischer’s standup bit.

The story begins 20 years after Kreischer’s trip to Russia. Kreischer is at his daughter’s 16th birthday party when he suddenly runs into Russian mobsters. Kreischer and his estranged father (Mark Hamill – yes, that Mark Hamill) are kidnapped by a mobster and taken back to her country so Kreischer can return a stolen watch.

That means he must retrace his steps from two decades before.

Some of this is dim-witted and some of it is pretty funny. Going-on-two-hours is far too long for this sort of thing, but I did laugh out loud a few times.

The action sequences were hit-and-miss, and often disrupted the tone of this raunchy comedy.

I gasped out loud, too, when I discovered that Mark Hamill was in this. He does seem to be having a good time, although I think he’s an odd choice for this role. “Star Wars” die-hards may or may not get a kick out of seeing him in this.

It’s a serviceable, if overly long comedy, that will give grownups at least a few laughs along its erratic way.

2 stars

Running time: One hour and 52 minutes.

Rated: R for drug abuse, foul language, and graphic violence.

Watch the trailer here.