Before Amy Winehouse, there was Shane MacGowan, another, earlier figure who captivated Britannia at first with irreverent songwriting brilliance, then train-wreck levels of unbridled consumption. That MacGowan has, unlike Winehouse, survived decades into a death watch and been able to participate in an A-list documentary feels almost like an eighth wonder of the modern world. Which is not to say that Julien Temple’s “Crock of Gold: A Few Rounds With Shane McGowan” is framed as a triumphant tale: MacGowan, now in his early 60s, seems so far removed from being able to make music anymore that the documentary takes on an almost eulogistic tone, amid a lot of nostalgic raucousness to spare.

Temple’s film is certainly in the upper echelon of recent rock docs, as might be indicated by the special jury prize it received at the San Sebastian Film Festival, that gathering’s second-highest honor. Over the course of 40 years, Temple, probably still best known for “Absolute Beginners,” has accumulated a filmography that now includes more rockumentaries than not. So his skills are well honed enough to take on as prickly a subject as MacGowan, an Irish immigrant to England whose wild behavior in the Pogues’ ’80s heyday and onward makes Johnny Rotten, star of a couple of earlier Temple docs, just about seem like a Tory.

So, how is MacGowan doing? That’ll be the immediate question if you were a fan of 1985’s “Rum, Sodomy and the Lash,” the Elvis Costello-produced album that represented a landmark melding of punk spirit and traditional Irish music, but you last recall seeing him being even more sheets to the wind, an object of English chat-show snickers in the ‘90s. (He last released a full new album in 1997, although the Pogues did reunion tours through 2014.) The short answer to this question is: “not well.” Brian Wilson seems likelier to take an Olympic sprint than the much younger but markedly older-seeming MacGowan is to headline a show again anytime soon.

The singer has things going for him, like the love of a longtime girlfriend whom he has finally wed, and the respect of famous fans like Johnny Depp (one of this film’s producers) and Sinn Fein leader Gerry Adams. (All three of the above engage MacGowan in friendly chats for the film, in lieu of the formal interviews he is said to have refused Temple.) There’s a 60th birthday celebration in which Bono and Nick Cave lovingly serenade him. MacGowan presumably gets by on massive royalties from “Fairytale of New York,” the cheeky holiday smash he claims to hate but which has wickedly and wonderfully endured as Europe’s most popular modern Christmas song.

Prepare for a bit of a shock, anyway, when Temple first reveals MacGowan in his contemporary state, wheelchair-bound, perpetually slumped over to his right, slurring to the point that all his dialogue is subtitled, and raising his pints to his mouth so slowly you’d almost think the footage was at half-speed. The film doesn’t address exact particulars of how the singer came to be in this condition; although viewers may suspect a stroke, apparently it’s the combination of a pelvic injury in 2015 (unmentioned in the movie) with decades of constant drink and eventually acid and heroin (very much mentioned). Recent causation aside, it’s inescapably alarming to see that MacGowan, at an age when he could still have another decade of bounding across the stage ahead of him, already resembles a cockier version of Robert DeNiro at the end of “The Irishman.”

If this sounds depressing, it is. Yet “Crock of Gold” also manages to feel like a lot of fun for long stretches along the way, as weird and maybe wrong as that feels to say, because Temple has accumulated enough filmmaking tricks to make a downer story feel like a head rush. Recounting MacGowan’s childhood and teen years in the first of the two hours, Temple employs what feel like hundreds of vintage film clips to illustrate voiceover bits, along with funny, luridly colorful animations and freshly filmed, black-and-white footage of pastoral Irish village life in such gorgeously silver tones, they feel like a vision of the afterlife. When the Pogues become an inebriated post-punk phenomenon at the halfway point, the film gets even rowdier — but it also makes a great, sober case for MacGowan as a real poet, an expat national statesman, and someone who might have changed ideas about how traditional music and rock can meld for all time.

Beyond music buffs, “Crock of Gold” may be most fascinating to addiction counselors, who may have their own answers to the question of whether someone whose local culture let hm get plastered at age 6 ever stood a chance of sobriety. (One of the best details is how the singer’s very Catholic auntie would get him drunk as an everyday incentive for catechism.) MacGowan’s sister insists her brother’s self-medication is, for him, the opposite of a “self-destructive” streak. Depp, in his cameo, seems committed to celebrating the singer as one of the outlaws he admires, a la Hunter S. Thompson, not the casualty most will see him as.

Whatever Depp’s motivation for producing, the director himself, thankfully, takes a more ambiguous approach, steering back and forth between sadness and bottoms-up veneration. MacGowan has surely been a lifelong brat, but Temple’s terrific, unmoralizing film is compassionate enough to leave you rooting for the singer to get his pot of gold, even if, at this point, that might just mean being able to write songs and stand upright on a stage again.