It’s a charged metaphor to use at the moment, but some standup comics function as border patrol agents. They may not stand in airports checking the papers of arriving travelers, but many of the best ones — and Dave Chappelle undoubtedly belongs in that elite group — are obsessed with moral positions and cultural territories, who gets to occupy them, and why.

Many of the most thoughtful and incendiary comics explore the ways in which power dynamics worked in the past, as well as the kinds of words, actions and attitudes are acceptable in the present. How are flawed human beings, all of whom carry their own personal baggage along with the ingrained attitudes of the cultures they were raised in, supposed to negotiate evolving attitudes and new social protocols while holding on to their identities and at least part of their dignity? In two new standup specials that arrive Tuesday on Netflix, Chappelle explores those knotty, unpredictable issues with quite a bit of success.

One of the opening bits in the first special, “Deep in the Heart of Texas,” finds Chappelle riffing on a moment in which a white man threw a banana peel at him. It’s a “tough time for the blacks,” he says, which is one reason he thanks Muslim Americans and Mexicans for taking some of the heat off African-Americans.

The 2015 special, which was filmed in Austin, bounces through various topics but finds Chappelle continually returning the themes of race, bias and power. The 2016 special, which was recorded in L.A., is the more generally taut and robust of the two hourlong specials: “The Age of Spin” was recorded during the run of “The People v. O.J. Simpson: American Crime Story” on FX, and Chappelle talks about eagerly watching the series, which boldly took on many of the themes he explores in his work.

Watch the trailer for Dave Chappelle’s comedy special:

Like “People v. O.J.” and so many other sharp-edged shows that came along a decade after “Chappelle’s Show,” he keeps returning to the ways in which the agendas of women, the LGBTQ community, African-Americans, Asian-Americans and other historically oppressed groups converge, diverge and come into messy conflict. As was the case with the FX drama, there’s a strong through-line to “The Age of Spin”: He structures the hour around the four times he met O.J. Simpson in person. (The third encounter, which took place in a comedy club long after Simpson was acquitted, is the funniest, but reasonable men and women may disagree on this point.)

Even more interesting — and painfully hilarious — are his musings on Bill Cosby, whom he identifies as both one of his most formative influences and also as a horrifying monster. It’s a testament to Chappelle’s skills that his musings about Cosby’s alleged rapes not only avoid the obvious landmines, but they also allow the audience, many of whom also grew up thinking of Cosby as a relatively benign cultural figure, the collective pressure-valve release of shocked laughter.

Throughout both hours, the ways in which fame, race, and opportunism intersect are mined for the kinds of jokes that aren’t necessarily devoted to making Chappelle look good: He talks with unashamed frankness about choosing to go to the Oscars instead of appearing at a benefit in Flint, Mich. A disastrous gig in Detroit is explained in incisive and witty detail, and he makes a few references to his decade away from the spotlight. Several inspired riffs dwell on encounters with cops, which involve real fear but also the knowledge that his celebrity status will probably count for something.

The comic’s unexpected swerves and inspired segues are often the best thing about the specials: They add suspense, because you never really know what he’s going to say about Key and Peele, Chris Rock, Kevin Hart or the Care Bears, or where those comments will land on the sincerity scale (though it’s not a stretch to conclude that Chappelle really does love the Care Bears). Leaning against a speaker or perching on a stool, Chappelle looks utterly relaxed, and has the great, unforced timing of someone who knows exactly where his routine is headed and how he’ll get there.

“Deep in the Heart of Texas” can feel a bit dated — given that it’s two years old, there are references to Ebola and the infamous recording of Ray Rice in that elevator — but it also contains a long set piece in which Chappelle hilariously imagines Lil Wayne as a gravel-voiced detective on “CSI.” Another story in the “Texas” special, in which Chappelle talks about being pelted by snowballs thrown by racist young men in his home state of Ohio, turns into a deft yet shaggy anecdote set in a small town’s police station. It’s equal parts Frank Capra, “Fargo” and Black Lives Matter.

“I live among the whites,” Chappelle says with a sigh more than once, and that sentence succinctly provides all the set-up that a number of jokes need. In both specials, his musings reflect the push-pull going on in the broader culture, the tug of war between the desire for — or the demand for — the recognition of different groups’ histories and struggles, and the plea of an exhausted adult who wants people to “get over themselves.” Whether it’s due to maturity or just a general state of being tired of the world’s shenanigans, Chappelle’s humor can drift toward dad comedy — “You have to Google s–t I lived through!” — but most of the time, his tales and punchlines display compassion for human frailty and confusion.

Of course, it’s not a rare occurrence for a comic to end up on the wrong side of a newly drawn line in the culture wars; the more established a comic, the more likely he or she carries attitudes that were au courant a decade or two ago but can seem a little (or more than a little) creaky and defensive in the present day. Combine that slightly outmoded thinking with a desire to make fun of judgmental piety, and you often get jokes that are more than just sloppy and superficial. The whole idea of “punching up” or “punching down” is, of course, reductive; good comedy often relies on an awareness of just how many power vectors there are in a given situation. A lot of Chappelle’s humor displays that fine-grained awareness, which is why a few comments that come off as unkind or purposely dense seem all the more clanky and out of place.

This is all to say that, in these two specials, Chappelle uses a couple of words that drop to the stage like lead balloons. Those words — one of which he uses in reference to gay men, and the other is a term that is offensive to trans individuals — come up briefly during Chappelle’s meditations on gender roles, sexuality and what it means to be masculine and feminine. Some of those riffs leads to inspired bits about conversations with gay friends about what it’s like to be in a committed relationship (whatever the gender of either partner).

But some of the jokes about gender and sexuality seem like they were exhumed from a comedy special from the ‘70s or ‘80s: No, feminists don’t necessarily have short hair; yes, it’s worth changing your “pronoun game” for trans people because there’s no justifiable reason not to.

All that said, the tin-eared moments are parts of a whole, and it’s not entirely fair to examine them outside of the context of his extended musings, which are often bemused rather than cynical, and indicative of his genuine curiosity about difficult subjects. Time and again, Chappelle shows a willingness to dissect his own thinking, share his own foibles and be honest about his mistakes and doubts. He talks at length about a woman who took him to task during a live performance, and he also discusses LGBTQ commentators who have taken issue with the way he addressed topics of interest to their community. In typical Chappelle form, he finds an oblique way to come at the latter situation: He says he has no problem with gay people, but adds, “I hate bloggers.”

He says it with a smile, but he recognizes a truth that animates our times: “Everybody’s mad about something” these days. And he offers what may be unsolicited advice, but it comes from a man who’s negotiated matters of race, success and perception for decades: “Slow your roll,” he counsels. “It takes a minute” for society as a whole to decide that a cause has merit.

The irony is that the most people are less patient than ever with the current state of the world, and that’s unlikely to change. In a way, these specials function as appetizers of a sort for what’s coming later this year: A third Chappelle special, one recorded in the age of Trump. It’s impossible to predict what he’ll say about the past six months, and that’s why it will probably be essential viewing.

POPULAR VARIETY VIDEO: