George Simmons is a dying comic. Not just dying onstage — he's really dying, of leukemia. In Judd Apatow's "Funny People," Adam Sandler, in a strong and resolutely unsentimental performance, plays this character as a guy who's worked his way to the top of his trade — from bottom-rung standup gigs to blockbuster movies — and now, at 40, doesn't know what to do with the news that his time is up. What's it all been for? He recently moved into a huge Malibu mansion, through which he wanders like Charles Foster Kane adrift in the empty splendor of Xanadu. Which is to say, alone. "I don't have any friends," he tells Ira Wright, the guy he's hired to impersonate one. "I have showbiz friends."

Ira (Seth Rogen at his most winning) is just starting out in the comedy business. George caught his act at an L.A. club — one of the places where George himself started out — and while he didn't much care for the muddled performance, he liked the material Ira had written. So he's hired the younger man to write some similarly funny stuff for him — and, in addition, to share beers, shoot the breeze, tuck him in at night and help him sort through all the memorabilia and expensive cars he's accumulated over the course of his now suddenly abbreviated career, and start getting rid of it. Ira is star-struck and delighted: Finally he can start spending a lot less time with his roommates — Mark (Jason Schwartzman), a comic who's hit it big in a witless TV sitcom (and annoyingly leaves his hefty paychecks lying around the apartment), and Leo (Jonah Hill), a bristly and talented fellow writer who's also trying to make it in standup.

Directing his third movie (which he also wrote), Apatow hasn't exactly turned his back on the sort of raunchy man-child characters who featured in "Knocked Up" and "The 40-Year-Old Virgin." He's simply set his story in the standup-comedy world, where arrested development (and its attendant di-- jokes, fart jokes, etc.) is part of the professional DNA. Apatow, Rogen and Sandler (whose own career obviously resembles George's) all started out in standup, and Apatow and Sandler were roommates back in their scuffling days. They know the terrain — the grubby clubs, the tough crowds — and Apatow presents it to us in fond, knowing detail, spiced with cameos by such comedy-club vets as Sarah Silverman, Andy Dick and Ray Romano (who has a startling scene with an explosively hostile Eminem).

The picture is necessarily darker than the usual Apatow comedy, and it's more openly emotional, too. Looking back on the steely self-absorption that's characterized his life, George realizes that his biggest mistake was cheating on Laura (Leslie Mann), his one great love, who left him years earlier and is now happily married (to a surprisingly funny Eric Bana), with kids.

Unfortunately, George's attempt to re-connect with Laura after he's told her his bad news leads the movie off to a different, less-interesting place, where it stays for too long. The first half of the film, filled with hustling one-upmanship and scabrous jibes, is pure, hilarious Apatow. (I won't bother trying to convey some of the really hysterical lines here, but they're not all sublimely gross: Responding to a girl in a bar who's raving about the hookup wonders of JDate, Rogen deadpans, "I didn't think Jews liked to be on lists.") Then, however, when George and Ira drive up to San Francisco for a gig, and decide to drop in on Laura, whose husband is away, the picture sags into rom-com blandness (although there are still some great bits). We miss all those wisecracking comics (especially Hill), and we begin to feel the movie's excessive length (it runs nearly two and a half hours). The film's sweet conclusion finally returns us to the world of funnyman camaraderie. By this time, though, we're wondering why we ever had to leave.

Don't miss Kurt Loder's reviews of "Not Quite Hollywood," "Thirst" and "The Collector," also new in theaters this week.

Check out everything we've got on "Funny People."

For breaking news, celebrity columns, humor and more — updated around the clock — visit MTVMoviesBlog.com.