No movie in which Mark Wahlberg and a talking teddy bear break into Tom Brady’s house and try to jack him off in his sleep in an attempt to harvest his sperm can be entirely bad. And Ted 2, for a good chunk of its first half, manages to live up (down?) to the surreal grossness all that implies. It’s a hell of a thing, making a dirty movie about a teddy bear that’s come to life; you can get away with all sorts of stuff ordinary movies can’t. You can show a bunch of guys watching bears screwing on TV and have one of them yell in anguish, “Hey! That’s someone’s daughter!” And you can make a lot of dick jokes — I mean a lot of dick jokes — because, of course, teddy bears don’t have dicks.

Ted 2 begins with Ted (voiced by writer-director Seth MacFarlane), the aforementioned talking hirsute toy, marrying his girlfriend, Tami-Lynn (Jessica Barth). Over images of the happy couple celebrating with friends and family, a narrator informs us that the wedding proves two things: “One, happy endings can come true for anyone, and two, America doesn’t give a shit about anything.” A funny enough line, sure, but also an interesting one in the context of the rest of the film. Because Ted 2, surprisingly, winds up becoming about America suddenly giving a shit — and not always in a good way.

But first, more of the setup, because that’s easily the best part. Ted and Tami-Lynn’s marriage hits the rocks not long after their wedding (in a gritty handheld scene straight out of Raging Bull that MacFarlane plays straight to great comic effect — again, context is everything). To try to mend their relationship, they decide to have a baby. Unfortunately, Ted’s a teddy bear, and unable to impregnate Tami-Lynn. Thus, the aforementioned Brady Option, and several other attempts by Ted and his best friend John (Wahlberg) to try to procure a donor. But it turns out that Tami-Lynn is also infertile due to her long history of drug abuse. When the couple tries to explore adoption, the legal system starts to take notice of Ted: Suddenly, it turns out that in the eyes of the law, he is still considered property. (No, really.) To help defend him in his civil-rights case (no, really), Ted enlists the services of a very high-powered and expensive lawyer’s young, inexperienced, and significantly less expensive niece Samantha (Amanda Seyfried). She brings up the Dred Scott case, Plessy v. Ferguson, and Brown v. Board of Education. (No, really.) Ted is excited, John is smitten, and away we go.

It’s at this point that Ted 2 mostly goes off the rails. It’s not so much that MacFarlane doesn’t know what he’s doing with respect to the film’s conscious evocation of civil rights: It fits in with his nothing-sacred approach to comedy, in which the laughs often come from the sheer transgressiveness of the gags. There’s no such thing as going too far: Early on, a sperm-bank mishap leaves John covered in a crate full of semen, but a nurse instructs Ted and John not to worry; those were the “rejected sickle-cell samples.” Ted immediately ribs his friend, “You’re covered in rejected black-guy sperm — like Kim Kardashian!” It’s not a funny joke; in fact, it’s a pretty offensive one. But there’s an oh-shit-he-went-there tension to it, and that’s what MacFarlane’s going for. He couldn’t care less if you laughed. He probably hopes you’ll sue.

But as Ted 2 proceeds, there’s increasingly less there to the he-went-there. The film seems mostly content with the running, and eventually tiresome, gag of equating Ted’s ordeal with that of the civil-rights movement. At one point, Ted watches a scene of Kunta Kinte being whipped on the mini-series Roots and sighs, “That’s just like me.” Yes, yes, we get it, your inner voice yells. It’s supposed to be funny 'cause he’s a bear. Move on. The problem isn’t so much one of repetition or boundaries but, rather, purpose: If you are going to repeat a joke this much, you should probably have a point to make. But I’m not sure MacFarlane does, other than to make us admire his irreverence. The film opened with a narrator admonishing America for not giving a shit. So, wait, is Ted’s humanness supposed to be a good thing or a bad thing in the eyes of this movie?

Look, I realize that asking for consistency or a unified vision of the world from a dirty comedy about a foulmouthed teddy bear from Boston is a fool’s errand. And Ted 2 has enough decent laughs to keep things moving along. There’s an early bit with Liam Neeson anxiously buying a box of Trix that’s very hard to explain, but very very funny. There’s an out-of-nowhere bit where John and Ted go to an improv-comedy show and yell out sad suggestions. (“Can anyone suggest an event?” “9/11!”) The whole movie is mostly just an excuse to toss around a bunch of random jokes and see what sticks. Many of them do. And we’re supposed to forget the jokes that don’t, and the halfhearted excuse for a story, and the wink-wink echoes to the country’s dark past. The trouble is, lazy, opportunistic writing can be distracting in its own way, and there’s way too much of it in Ted 2 to fully ignore.

But we noticed you're visiting us with an ad blocker

We understand the reasons for blocking, but Vulture depends on ads to pay our writers and editors. We're working hard to improve the ad experience on our site, but in the mean time, we'd really appreciate it if you added us to the approved list in your ad blocker. Thanks for the support!