NOTE: If the headline of this piece was not indication enough here is your official warning that this post contains SPOILERS for Avengers: Infinity War. Also, if the headline of this piece was not indication enough, you probably should go see a doctor and get an MRI.

RIP the Avengers.

Okay, so technically not all the Avengers are dead. In fact, most of the ones we expected to die in Infinity War are still around. Tony Stark looked like he was about to croak (one crazy dude in my audience even screamed “NOOOOO!” at the top of his lungs when Thanos stabbed him) but he got better. Chris Evans’ Marvel contract may be up after Avengers 4, but he made it through Infinity War unscathed. Black Widow has no super powers to speak of, but she stood tall against the awesome might of the Black Order. (All the original Avengers survived, in fact, unless Hawkeye was smushed by a rock while he hanging out with his kids or something.)

But Gamora got tossed off a cliff. Vision had the Soul Stone ripped out of his forehead. And then half the universe and a ton of the heroes got blinked out of existence, including Scarlet Witch, Star-Lord, Spider-Man, Doctor Strange, Drax, Falcon, and Black Panther. The movie ends with Thanos doing exactly what he promised to do, and then kicking back and loving life while the surviving heroes are broken and destroyed. Space genocide: Good for the soul, apparently!

There’s been a lot of speculation about who would die in Infinity War and the movie definitely delivered on that front. But now I’m more convinced than ever that almost no one will die in Avengers 4, and most of the people who are dead currently (even the ones like Gamora or Loki, who bit it before Thanos got all six Infinity Stones) will be brought back to life. While it would be a bold move to kill off these characters permanently, Disney has this thing where they really like making money. So they’re not going to do that. It’s not a matter of if, it’s a matter of how.

Obviously we won’t know for sure until next May when Avengers 4 opens in theaters. But the first film was surprisingly faithful to the broad contours of the comic it was based on, The Infinity Gauntlet. In the comic Thanos murders half the universe, and all of the Avengers, before he’s eventually defeated and all those lives are restored. Which means Infinity War’s endgame could be taken from the comic as well.

First, a little about the Infinity Gauntlet comic. Written by Jim Starlin and drawn by George Perez and Ron Lim, the series ran for six issues (plus numerous tie-ins) through the summer and fall of 1991. If you’ve seen the Infinity War film (not the Infinity War comic, which was the sequel to Infinity Gauntlet), you know the basic idea; Thanos wants to kill half the universe’s population and in order to do it he needs the Infinity Gauntlet. The Avengers and Doctor Strange assemble to stop him. Just like in the movie, there’s even a moment when Captain America stands up against the godly power of Thanos despite the fact that he has absolutely no chance of defeating him.

Marvel

There are some significant differences to the film version, though. A lot of them are a result of tangled rights to Marvel characters that belong to other film studios; in the Gauntlet comic, the hero who shows up to warn Dr. Strange that Thanos is coming is Silver Surfer, but since he belongs to Fox, that role falls to Mark Ruffalo’s Bruce Banner. And the book version isn’t really about Thanos trying to get the Infinity Stones (or Gems, as they’re known in the comics); when Infinity Gauntlet begins, he’s already got them all. Within a few pages of the opening of issue #1, Thanos snaps his fingers and does the erase-half-of-everything trick. Then later, the survivors gather to try to stop Thanos, retrieve the Stones/Gems, and maybe fix the damage he’s caused.

The events of Infinity War mirror the events of the first half of the Infinity Gauntlet comic book. The second half of the comic gets very trippy and cosmic; after killing the Avengers (Iron Man gets his head ripped off!), Thanos winds up confronting a bunch of space gods like Galactus. He defeats them all and ascends to a higher plane of consciousness. But when he does that he leaves his body unprotected and Nebula — who, in the comic is his granddaughter instead of his adopted daughter, and also a walking desiccated corpse trapped in torturous limbo between life and death (don’t ask) — snatches the Gauntlet off Thanos’ hand and claims its power for herself.

An angry Nebula transports Thanos to deep space, but he’s rescued by Strange and Adam Warlock (who’s basically the Poochie of Infinity Gauntlet; he’s this incredibly smart and powerful alien who wants everyone to listen to him and follow his orders and talk about him when he’s not around). The heroes manage to get the Gauntlet back from Nebula by tricking her into restoring the universe to the way it was 24 hours earlier.

Marvel

Remember: You can have control over the entire universe and everyone in it and still be kind of dumb.

Anyway, just like that, everyone who died is alive again, even the heroes who perished gruesomely at Thanos’ hands.

There’s no guarantee things will happen in the same way in Avengers 4, but it would make a lot of sense if they did. Nebula, played by Karen Gillan, was even one of the few characters who survived Infinity War. She could wind up at Thanos’ house, get her hands on the Gauntlet, and wreak even more havoc (or bring everyone, including the sister she recently reconciled with, back to life).

The other character who will definitely play into the end of Avengers 4 is Tony Stark. Somehow he will save the day, partly because he’s the first MCU hero and that makes for very nice symmetry with the end of Phase 3, and partly because of something that only Dr. Strange knows. After insisting in the early parts of Infinity War that protecting the Time Stone was more important than any one life, Strange reverses course and gives Thanos the Stone in exchanging for sparing Tony’s life. This seems like a very dumb, sentimental gesture - but remember: Before he forked over the Time Stone, Dr. Strange used it to watch millions of possible futures, like me when I’m trying to fast-forward through my DVR to get to the end of a Mets game. Of the 14 million possible outcomes Strange saw, only one had an outcome where the good guys wind up victorious.

While the end of Infinity War looks like our heroes’ lowest point, that’s a smokescreen. Clearly Thanos has to temporarily win and half the universe has to temporarily die to bring about the conditions Doctor Strange realized were necessary for the Avengers’ long-term victory. Those conditions may or may not involve Nebula getting the Infinity Stones, but I would bet almost anything someone whose name is not Thanos does get them, and uses them to erase the previous 24 hours and restore everyone to life the way she does in the comic. And one more prediction: Right before the very last fight with Thanos someone is finally going to say “Avengers assemble!” That one you can take to the bank.

Every Marvel Cinematic Universe Movie Ranked From Worst to First