Left to right: Lawrence Gilliard, Jr. and Natalie Paul in The Deuce finale.

The 1970s Times Square drama The Deuce, which just wrapped its first season on HBO, does its job so well that after watching the first few episodes, I had no desire to watch it again. I caught up with it later and was glad that I did, though there were many moments — intentional, I’m certain — when watching it was an endurance test. Co-created by George Pelecanos and David Simon, who worked together on The Wire and Treme, it’s a tale of sexual exploitation, misogyny, homophobia, racism, civic corruption, economic imperatives, and social hierarchy, and how each of these factors is inseparable from the rest. It’s as far from escapism as a drama can get and still be watchable. Only the show’s mix of compassion and bleak humor prevents it from being a total bummer.

In the world of The Deuce, as in the world of Simon’s The Wire, Treme, Generation Kill, The Corner, and Show Me a Hero, society is divided into haves and have-nots (a fact underlined in recurring conversations about Charles Dickens’ A Tale of Two Cities). This being a Simon and Pelecanos series, we spend at least half our time among the have-nots (sex workers, mainly, but also bartenders, porn performers, and indie filmmakers). And we are periodically reminded that a lot of the characters that think of themselves as the “haves,” such as the pimps, the cops, and low-level mobsters and wannabes, only fit that description when they measure themselves against people who are lower on the totem pole. They’re all trying to survive in a system that seems intractably greedy and cruel. And, to paraphrase a line from The Sopranos, they’re all aware that the economy is shaped like a pyramid: money flows up, shit rolls down.

Related Stories The Deuce Director On How Men Often Direct Sex Scenes Differently Than Women

A lot of shit rolls down in the finale. Written by Simon and Pelecanos and directed by Michelle MacLaren, who also helmed the pilot, the episode intensified the show’s focus on performance and visual representation, starting with Frankie Martino (James Franco), twin brother of bar owner turned brothel and porn entrepreneur Vincent Martino (also Franco) at an adult bookstore, admiring a set of peep-show projectors encased in bathroom stalls so that patrons can masturbate in relative privacy. Frankie invites Big Mike (Mustafa Shakir), who came up with the idea of the privacy stalls, to “christen” them; when he steps into the booth, he doesn’t view a porn loop but a cartoon spooled onto the projector at Vince’s behest. It’s a good, absurdist joke of a type that could actually happen, but it’s also depressing if you think about it. There’s no indication here, or anywhere else in the season, that Big Mike, a black man, is going to receive a share of the profits from his invention, which is being financed by mobsters and their associates, all Italian-Americans — part of an ethnic group that was discriminated against for generations but has, at that point in American history, begun to insist on being thought of as white. (There’s a glimpse in an earlier episode of another character reading The Godfather, a novel about immigrants assimilating and going “legitimate.”)

Maggie Gyllenhaal’s streetwalker turned aspiring filmmaker Eileen “Candy” Merrell goes with her director, Harvey Wasserman (David Krumholtz), to visit a porn producer, who informs them that he’s started subtotaling the quarters earned by individual peep-show machines to figure out what sells (the top answers are black man/white woman, anything with lesbians, and anything that brazenly shocks or flouts taboo). Asked to speculate on why the booth’s overwhelmingly male patrons gravitate toward extreme scenarios — including Danish porn involving horses and dogs, spooled in unmarked booths to avoid police detection — Eileen replies that men have been taught from childhood that women put up with sex rather than actually enjoy it and that “we make choices … we’re particular.” The appeal of nearly all hard-core porn, Eileen says, is the idea that “women are just as sex-crazed as they are … that’s the fantasy, right? That’s the shit we’re selling here.”

Three pimps — Larry Brown (Gbenga Akinnagbe), Rodney (Method Man), and C.C. (Gary Carr) — sit in a diner arguing about whether a streetwalker that a pimp considers personally unattractive can be made salable. C.C. insists that it’s all about appealing to personal fantasy: gap-toothed Melissa (Olivia Luccardi) should be presented as “all farm-girl and shit. Fuck the boots and minis. Sell her ass in calico dresses, like she just rolled through the Lincoln Tunnel on a covered wagon and shit.” Vincent and Frankie have a meeting with their main patron, Italian mobster Rudy Pipilo (Michael Rispoli), in their new brothel, which has been classed up with backdrops taken from a Broadway show that just closed. The brothel is shaping up to be to the individual black pimps what Uber has been to cab drivers: an additional layer of “skim” that destroys an existing micro-economy. The show points out that the sudden flurry of brothel openings in Times Square in the ‘70s is a result of police cracking down on open-air prostitution. We also learn that the explosion in porn production is a direct result of judges deciding obscenity cases in favor of the accused. Like a lot of the great post-Sopranos TV dramas, including Deadwood, Mad Men, and Halt and Catch Fire, The Deuce is aware of how trends in the wider world drive and limit options for self-betterment.

The year 1971 — the same year, coincidentally, when Mad Men ended and HBO’s one-season show Vinyl began — looms in the foreground, background, and margins. All the obvious cultural signifiers are here, plus marvelous incidental details: the platform shoes, hot pants and ostentatious wigs, the spectacular naturals, the wide-lapel shirts and landing-strip ties, the pimp finery augmented by fedoras, processed hair and canes, the huge blocky cars and buzzing neon marquees showing Deep Throat and Buck and the Preacher, and tying it all together, a sense of cultural rot signaling the end of something and the start of something else. We can’t help but view the show’s characters and events through a 2017 lens and think about how antiseptic Times Square is now, compared to the Travis Bickle era, as well as how pornography and sex work have been driven largely indoors and routed through computers and phones, which can order a smorgasbord of options, Amazon-style, and have them delivered straight to a bedroom or a screen, eliminating the necessity of traveling to a porn theater, brothel, or designated street corner. But there’s no false nostalgia here for how things used to be.

And despite subplots about exploited people trying to escape or fight back against their circumstances, there are no characters that anachronistically represent a modern progressive viewpoint. That makes viewing the show a somewhat unstable experience. The show never gets off on the behavior it depicts. But hour by hour, the sheer scuzziness can be overwhelming. It’s easy to imagine clips of black pimps beating up white or black streetwalkers, or men beating or murdering sex workers, being lifted out of their narrative contexts and posted on YouTube, so that sexists and racists can fill the comments sections with invective, though of course that’s a risk that every grim, adult-oriented TV show or film must invariably take. That the series stays mostly on the right side of depiction-not-endorsement is a testament to the discernment of Simon and Pelecanos as well as their key collaborators. Although a couple of white guys are driving the series, the writers room includes transgender, black, and gay writers, and there are female names all over the credits: executive producer Nina Kostroff-Noble (who has worked on every Simon series and miniseries since The Wire); star and co-producer Maggie Gyllenhaal; directors MacLaren, Roxann Dawson and Uta Briesewitz (formerly the cinematographer on The Wire); and writers Megan Abbott and Lisa Lutz.

Still, it’s a lot to take, and I don’t blame anyone who looks at the subject matter and thinks, “I’m sure it’s well done, but nevertheless, no thank you.” There’s a lot of violence against women on this show, all shocking but none lingered over. We only see the beginning of the beating that drives Eileen off the streets and into filmmaking; the episode goes straight to the aftermath, the bruises and cuts. The sex isn’t sexy and isn’t trying to be. The johns are often fat, sweaty, or otherwise unglamorous. The women keep an eye on the clock and try to satisfy their clients as quickly as possible, to maximize their efficiency as well as that of the pimp or brothel owner who’s taking some (or most) of their income. An overweight, wheezing john dies while Eileen is blowing him; when Eileen looks up in close-up and realizes what just happened, the john’s still-rigid penis is visible in the frame, a vestige of its departed owner. Hilariously, the sexual encounter presented as most “out there” is Dominique Fishback’s Darlene being hired by a regular client named Louis (John B. McCann) to lie in bed and watch movies with him, including Mildred Pierce (about a divorced single mother who becomes an entrepreneur) and A Tale of Two Cities (shades of what an episode of The Wire termed “The Dickensian Aspect”).

None of the male characters, even ones coded as comparatively “sensitive,” are aware of what pigs they are, or can be. Even the women who talk about social mobility, liberation, and dignity seem unaware of how deep they’re sunk into the quicksand of capitalist patriarchy. How much of a victory is it for Eileen to migrate from streetwalking to porno performance to directing her first X-rated movie (understudying the assigned director — a man, of course)? It’s a matter of degrees. The streetwalkers who escape into porn are swapping an inherently degrading profession ruled by the constant threat of violence for a slightly less degrading and abusive one. Other streetwalkers who leave Times Square eventually come back because the world they left behind is more judgmental or dull, or because they don’t have a plan beyond vaguely “getting out.”

The college-educated, white, entitled Abby (Margarita Levieva) tries to “save” Darlene by giving her a bus ticket back to her small town in the South, but she’s instantly bored by the smallness and small-mindedness of the place (she tells everyone she’s a model) and returns to New York City. Ashley (Jamie Neumann), one of C.C.’s prostitutes, goes AWOL and has a fling with Frankie; they attend the premiere of a gay-porn landmark, the 1971 Fire Island romp Boys in the Sand, then spend the night in a hotel. Afterward, Frankie admits that he’s essentially homeless, flopping wherever he can. “Sounds like you’re free,” says Ashley, who got pushed out of her top slot in C.C.’s stable when the younger Lori (Emily Meade) arrived from Minneapolis. But Frankie’s freedom is of a type that men experience more readily than women. Men are allowed to exist unmoored and unclaimed and be the agents of their own destiny, regardless of whether they succeed or fail. Women aren’t. Because of the way the world is constructed, they are expected to have male allies (often lovers or husbands) or else relinquish ambition entirely.

Every woman on The Deuce experiences this hard truth eventually — even Abby, who is able to remake Vince’s bar The Hi-Hat in her own image only because she has beguiled him sexually. Sandra Washington (Natalie Paul), an investigative reporter for the Amsterdam News, gets access to the local precinct only because she charms (and is charmed by) Officer Alston (Lawrence Gilliard Jr.). Her male editor waters down her story because she can’t get anyone to go on the record and prove that the cops of Times Square are essentially the pimps of local entrepreneurs, demanding payments in exchange for letting businesses exist. Eileen suffers greatly because she refuses to let a pimp skim her take (and probably help himself to sexual favors) in exchange for acting as retaliatory muscle against clients who abuse her. She experiences a much more fulfilling life in the porno-movie industry, where she starts out as a performer but quickly becomes an art director (a job nobody considered important until she showed up), and then finally a director. But she exists in this space with the permission of the men who run it, and she doesn’t get a piece of the action. Not yet, anyway. After a client pushes Ruby, a.k.a. Thunder Thighs (Pernell Walker), through a window to her death, Ralston punches a bystander who jokes about her death, but it’s doubtful he would have done that a few months earlier, before Sandra arrived on the scene on a mission to humanize the streetwalkers in print. The diner owner Leon (Anwan Glover) shoots and kills Reggie Love (Tariq Trotter) for getting violent with Melissa — a nifty inversion of the indifference to violence against women shown at the end of the pilot — but he would not have intervened so decisively if he wasn’t sweet on Melissa.

The men of The Deuce don’t side with women against abusive men unless they feel on some level that the women “belong” to them. They think they’re defending other people, and they are, but they are also defending property. The further into the initial eight-episode season we get, the more aware we become that this world’s economic, racial, and sexual divisions have practically been frozen in sheets of Lucite, like a soil sample cross-sectioned for display in a museum of natural history: the rich above the middle class above the poor; whites and people identifying as white over black and brown people; heterosexual men over straight women, gays, and lesbians. Depending on circumstances, certain characteristics can become status tiebreakers: race or gender, usually. But when in doubt: money and power.

A pervasive moral ugliness and indifference to suffering is kept front and center at all times, even when the show is leavening its despair with gallows humor and a worldly wise attitude. Vincent and Frankie only seem nice because they’re played by James Franco, a likable performer; like most straight men circa 1971, the twins think of women as resources to be exploited or protected, and sometimes companions to be enjoyed, but rarely as people, and never as equals. Frankie is a homophobe, so disgusted by gay sex that he can only remain in the screening of Boys in the Sand by making fun of it; he eventually flees the theater because he can’t handle it anymore.

The show’s attitude toward sex work often reminds me of documentaries like In the Flesh and indie dramas like Lizzie Borden’s Working Girls, which follows the lives of three brothel workers as they interact with clients. As Roger Ebert wrote in his review of the latter, the film is primarily concerned with “management and capitalism, not sex. We learn a great deal about clean towels, birth control, disease prevention, and never putting the phones on hold.” The Deuce is similarly a down-in-the-muck look at vice-squad subject matter, boasting a characteristically Simon-esque mix of compassion and merciless, at times clinically cold, observation; to be fair, though, if the show represents an escalation of Simon-esque qualities, Pelecanos might be the agent of escalation, considering that he seems to occupy the driver’s seat on this series and was responsible for writing the penultimate episode of all five seasons of The Wire: the hours that killed off important characters and ripped viewers’ hearts out. It’s a hard show to watch. But once you commit to it, it’s hard to look away, because you care about these people, even when the world of The Deuce does not.