When Todd Phillips was announced as the director of a standalone R-rated Joker movie, there was some surprise amongst DC fans. Was the man behind the hugely successful Hangover series and the Will Ferrell/Owen Wilson frat comedy Old School the right man to tackle a dark, gritty look at the origins of perhaps the most iconic comic book villain of all time? But buried far back in Phillips' filmography is another movie that provides more insight into why he would be drawn to Joker. And now Joker is in theaters, it provides a fascinating contrast. That film is Hated: GG Allin and the Murder Junkies.

Hated was Phillip's first movie. It's a 53-minute documentary that he made while attending New York University, and was finished in 1994. It follows the notorious punk singer GG Allin and his band; while Allin's music remained underground throughout his life, his on-and-off stage behaviour helped created much notoriety and inspired a small but dedicated fanbase.

On a seemingly nightly-basis Allin would perform naked, fight with the audience, defecate on stage, cut himself, and quickly leave the venue before the police arrived. Hated follows Allin, his bass playing brother Merle, and the rest of the Murder Junkies on a US tour, and intercuts wild performance footage with interviews with the band, fans, Allin's former schoomates and teachers, plus footage from various news reports and TV appearances at the time. The movie ends with footage from Allin's funeral; he died of a drug overdose in June 1993, before the film was completed.

Unlike most student films, Hated managed to secure distribution; it hit VHS in the late-'90s and DVD a decade later, and has gained a small reputation as a jaw-dropping must-watch film for fans of punk music and extreme cinema. But for most audiences, Phillips is the man who helped The Hangover earn $467 million at the box office. He made a star of Bradley Cooper. Hated was seemingly left as a barely-remembered artefact from another era.

Even now, it's not as if the millions of comic book fans currently packing theaters are going to be seeking out a 25-year-old micro-budget documentary about a punk singer very few people have ever heard of. But it's fascinating to see how much of GG Allin's personality, his view of himself, his role as an entertainer, and his opinions of humanity can be applied to Joker.

Hated opens with a quote: "GG Allin is an entertainer with a message to a sick society. He makes us look at it for what we really are." This is attributed to the notorious serial killer John Wayne Gacy, who Allin visited and befriended in prison, but it could easily be applied to the portrayal of Joker in Phillips's latest film. The "sick society" of Gotham is right there on screen within the opening minutes, from the garbage strike, to the mutant rats, to Arthur Fleck's struggles with social care and his difficulty holding down a job. Arthur is also a would-be entertainer, and his behaviour throughout the movie is very much portrayed as a product of this society.

It is Arthur's attempts to make it as a stand-up comedian that draw some of the biggest parallels with Hated. GG Allin might have been a touring musician with fans, but he is as far away from being a conventional "entertainer" as Arthur is. The feelings of deep unease and dread that Phillips evokes in the scene in which Arthur makes his stage debut in a comedy club are similar to those as we watch Allin in front of audiences in Hated. In particular the two sequences in which Allin performs solo at the mic, both of which end in violence as he attacks his audience.

The anger that GG unleashes on stage is still bottled within Arthur at this point, but in both ultimately seem to blame society--rather than themselves--for the way they behave. "The government chain you down so never get out of their grip," Allin says. "Someone like me can do whatever they want. That's the only way to f***ing live."

But while Arthur's attempts to make it as a regular comedian are doomed to failure, it's as the anonymous killer of three bankers that ultimately creates a terrifying, dedicated fanbase. His clown-faced acolytes view society as evil and corrupt and, inspired by the murderous actions of their "leader," look to bring it down. In Hated, we hear that GG's fans are his "troops," who are drawn to the negative rage that they see spilling out on stage each night. As a former Murder Junkies guitarist "Chicken" John says in the movie: "He just seems to attract the people with the worst attitudes in life. They flock to him like a magnet. If he had any kind of sense, he'd rally these people like troops, like a bogus religion." Sound familiar?

There is also a striking similarity between the scenes in both movies in which their subjects appear on talk shows, for the amusement of a sneering, patronising host. In Joker, Arthur Fleck fulfills in his dream by appearing as a guest on Tonight with Murray Franklin. But he's not there to showcase his comedy, he's there as a figure of fun, as Franklin mocks his inability to tell a joke or, indeed, function socially.

GG made perhaps his biggest mainstream appearance when he appeared on an episode of Geraldo Rivera's show in the early '90s, along with his brother Merle and various fans. In the clips that appears in Hated, Rivera prods at Allin, trying to provoke a reaction, asking why he felt the need to "defecate in front of a live audience." Thankfully, GG doesn't respond by admitting murder--unlike Arthur--but his message to the audience is not so different: "There are no limits and no laws, and I'll breakdown every barrier out it front of me till the day I die."

Allin's death is also something that hangs over the entire movie. The singer frequently spoke about killing himself in front of an audience, announcing various dates that would be the day he dies. One of the most shocking moments in Hated is where he attacks a woman who asks him why he doesn't just kill himself sooner.

Of course, this was just talk, and Allin died from a heroin overdose one night after a particularly violent New York gig. But the idea of a public suicide is one that feeds right through to Joker, the idea of using a public platform for this most final of acts. In the build-up to his appearance on Murray Franklin's show, we see Arthur practicing what he will say when introduced on air, before he pulls out a gun and pretends to blow his brains out. On the night itself, Arthur turns the gun on Franklin rather than himself, but an argument could be made that this is the moment where Arthur "dies" and Joker takes over.

Ultimately, Joker is a fictional movie based on a comic book, while Hated is a real-life portrayal of a deeply troubled man whose behaviour towards others--and himself--is hard to condone. As shockingly funny as Hated frequently is, GG was a violent abuser, who went to prison for assaulting a female acquaintance in 1989, and while Joker touches on various issues of mental health, it still takes place within the familiar context of a comic book movie. GG and Arthur are both products of a terrible upbringing, but this hardly makes them unique; a difficult childhood leading to an equally troubled life in adulthood is sadly all too common.

Nevertheless, it's clear that what drew Phillips to GG Allin in the early '90s has much in common with his treatment of Joker 2 over two decades later. As Slate recently reported, Phillips himself made reference to Hated while talking about Joker at Toronto International Film Festival, and the director also introduced a Hated screening in New York in 2014. Unlike many comic book movies directors, Phillips wasn't hired for a movie that was already in development. He had already turned down the opportunity to make more conventional superhero films, and specifically pitched Warner with his idea for a standalone Joker movie, which he believed should be a grittier, more grounded take on familiar pop culture material.

Phillips might now be 46, but for better or worse, that punk rock spirit and fascination with dangerous outsiders remains. As Phillips himself says about GG and his fans in Hated: "I don't know if GG was born this way, or if society created him, but I do know the Murder Junkies and their fans are exceptional. They represent a part of American that most people would rather not think about, an alienated directionless minority that appears to have found its voice in a punk rocker with a death wish." Or a murderous clown ready to lay siege to the city of Gotham.