If you were involved in a friendship that was bad for you, would you know it?

That’s the premise of the comedy of discomfort, “The Climb.” It plays out in a series of long takes, beginning with a tricky, bicycling-up-a-mountain scene in which Mike (Michael Angelo Covino, who also directed) confesses to Kyle (Kyle Marvin) that he had sex with Kyle’s fiancée and then, because he’s in better shape, sprints off. The lengthy scenes, separated by months or even years, are often funny because of the way they situate the frenemies within the frame, but they also make us pay close attention to every little detail of their toxic dynamic, hoping that something will change.

There’s a bit of Alfonso Cuarón’s “Y Tu Mamá También” in “The Climb,” which briefly flirts with the same twist that ended “Y Tu Mamá,” but it’s distinguished by a filming style that is common in dramas, not comedies.

In many ways, how “The Climb” tells its story is more interesting than the story itself, but the performers supply timing and nuance under challenging circumstances, especially in that huffy-puffy bike scene. Covino and Marvin, who co-wrote the script and are actual buddies but have not slept with each other’s fiancées, give utterly natural performances.

One of the most fascinating things about “The Climb,” which was at least year’s Cannes Film Festival, is what we don’t see. The movie’s format is less like a novel than a collection of linked stories such as “Olive Kitteridge.” Each time we plop into a new scene, often with the leads in new fake bellies or facial hair, we’re curious to know what has happened since the last time we saw these characters. And when a scene ends, a cliffhanger usually leaves us curious about whether they’ll still be friends in the next scene or if one of them will have murdered the other in his sleep.

I suspect I’m not the only one who will spend a lot of time wondering about the women in the movie, who lurk on the margins but seem far more interesting than these brahs. Fed-up Gayle Rankin, who gets involved with both men, conveys a lot with exasperated expressions and one spectacularly miffed ashing of her cigarette. Talia Balsam, at a family celebration that the men spoil, urges Mike, “Think about somebody else!” and when he replies that he knows he’s a lousy friend, she insists, “OK. So fix it.”

As they help each other pack up a house or head off on fishing trips (there’s more ice fishing in “The Climb” than any movie since “Grumpy Old Men”), Mike and Kyle seem both to love and hate each other, and it’s left to us to wonder why there seems to be some essential element missing from their bond. Other people drift in and out of their lives, but for some mysterious reason, these two do the work it takes to maintain a friendship.

As they jockey for position, that’s another way the movie benefits from those drawn-out sequences — they give us time to ponder the big questions of “The Climb”: Can this friendship be saved? Should it be?