[Warning: This story contains spoilers for Wednesday's episode of Mr. Robot, "eps3.2_legacy.so."]

Were you wondering what happened to Martin Wallstrom's Tyrell Wellick during the time he was away from the action in season two? Wonder no more!

The third episode of Mr. Robot season three finally pulled back the curtain on this missing period of time, filling in the gaps about what exactly befell the ice-cold Tyrell in the immediate aftermath of the Five/Nine Hack. The episode, which focuses almost entirely on Tyrell and draws inspiration from Stanley Kubrick's The Shining (among other sources), brings viewers up to speed on exactly how Tyrell kept himself busy all of these months: chopping wood, growing an incredibly formidable beard, almost getting captured but saved through the help of a crooked federal agent, and ultimately reuniting with Rami Malek's Elliot Alderson — just in time to shoot the man and learn that sometimes, Elliot isn't Elliot after all.

As we're doing every week this season, THR is once again joined by writer-producer and tech expert Kor Adana to hack into the latest round of Mr. Robot. Here's what Adana has to say about the Tyrell-centric episode, how long the writers room knew about the specific events surrounding this character, and much more.

Episode three fills us in on Tyrell's whereabouts while he was missing in season two, beginning with the night of the Five/Nine Hack, and ending shortly after he shot Elliot. How long have you and the writers known exactly what happened to Tyrell in between seasons? Is this a carefully crafted plot finally fully revealed, or were elements of Tyrell's story discovered closer to the episode's construction?

We knew parts of the story ... little details here and there, before we started the season three writers room. While we were outlining this season, the intricacies and machinations of Tyrell, Irving and Dark Army came into focus. From a viewer perspective, season two posed a lot of questions that needed answering. This episode was an opportunity to answer those questions in a compelling way that also deepened our characters. What really happened on the night of Five/Nine? Where did that bullet casing come from? Who shot the gun? Where is Tyrell and WTF is he doing? These kinds of questions actually led to the creation of Irving. We knew that there had to be some kind of Dark Army influence that was helping to facilitate things behind the scenes.

What I love about writing for this show is that we strive to subvert expectations and spin what you think you know. Elliot and the rest of fsociety were supposed to enact the hack on E Corp. together. Then we reveal that was really Tyrell and Elliot together ... and you thought you knew what happened. Maybe Elliot turned into Mr. Robot and killed Tyrell and that's why he's missing? We spent an entire season thinking that. Now we learn how and why Mr. Robot and Tyrell separated. Another example of this is the prison phone call with Elliot and Tyrell in season two. On that call, Tyrell is presented as this force of nature … one with unbelievable power and confidence. In this episode, we see how vulnerable and controlled Tyrell was during and after that phone call.

Can you talk about how The Shining acted as a source of inspiration for this story, beginning with the title reveal? There's certainly an "all work and no play" element to what Tyrell's dealing with in his time in isolation.

I'm probably the biggest Kubrick fan you will ever meet, so I was psyched to see all these references to The Shining come together. This episode didn't start out that way, but as we were breaking down the beats of the story, there were elements of isolation and madness that Tyrell was experiencing that had some parallels to Jack Torrance in The Shining. Even the wood chopping with the axe … when we were first discussing it, it was just a pitch to try and get Tyrell centered and it gave us a small window into his past. Later in production, we really leaned into it as an homage to The Shining, which informed how it was filmed, scored and cut.

The opening title sequence is definitely a nod to the opening of the film (except we don't have a helicopter shadow in our shot). There's also a music choice in the interrogation scene with Wallace Shawn where you can hear a track called "Polymorphia," which was composed by Krzysztof Penderecki. It was used in The Exorcist first, but Stanley Kubrick ended up using it in The Shining as well. Also, for those who noticed the name of the hotel that that Dark Army takes Tyrell to, that's a pretty fun reference — if you can figure it out.

There's another interesting connection with The Shining and our series. In the book, Jack Torrance comes home to find that his son, Danny, made a mess of all of his papers, so he yanks the kid up to his feet and breaks his arm. It's what motivated Jack to stop drinking. In our show, Edward Alderson got mad at a young Elliot and pushed him out of a window. Elliot broke his arm in the fall.

Let's dig into the first scene of the episode. What was the origin of the idea behind Elliot pulling the trigger on Tyrell after the Five/Nine Hack? Was Pulp Fiction an inspiration? And what's the significance of this apparent divine intervention, as Tyrell interprets it?

Josh, what happened in this scene was a miracle, and I want you to fucking acknowledge it!

Mr. Robot pulling the gun on Tyrell builds on an idea that we planted at the end of season one, with Elliot wondering what happened to Tyrell in the finale episode and worrying if Mr. Robot did something to harm him. Pulp Fiction is a favorite among the writers in our room and the gun beat was definitely inspired by it. But the divine intervention was hinted at much earlier.

Tyrell comes home to Joanna in season one and says we have to start looking at what's above us … God. Early in season two, we hear Tyrell on the phone referencing the night of the Five/Nine Hack as the night he and Elliot became gods together. Like many of our other characters, Tyrell fully believes that his actions will bring about a new world.

Without stepping into any .puddles, I believe this quote does a good job of capturing Tyrell's position:

Teach me, dear creature, how to think and speak;

Lay open to my earthy-gross conceit,

Smother'd in errors, feeble, shallow, weak,

The folded meaning of your words' deceit.

Tyrell oscillates between speaking very clearly about what he can contribute to Stage Two, while also powerfully conveying this "uncanny bond" with Elliot with the passion of a true zealot or unrequited lover. Is Elliot right in referring to Tyrell as "Looney Tunes," or is Tyrell more collected than he's given credit for? What goes into finding that balance within this character?

I think both can be true, which helps to create some compelling character contradiction. I see Tyrell as someone who can be collected with laser-focus on his goal while still being completely batshit. The easy example I always turn to when it comes to this kind of character is the Joker in The Dark Knight. There are scenes in that film where he utters these kernels of truth, making 100 percent logical sense, yet he also has these moments of insanity where he begs the hero to violently beat him. To me, Tyrell is doing something similar here. His plans for Stage Two are sound and logical, yet his belief in Elliot (and in the two of them being gods) is so strong that he begs Mr. Robot to pull the trigger again in order to prove his point.

An important turn here is that Mr. Robot realizes how he can utilize Tyrell's belief/focus to his advantage. It actually parallels what Whiterose spoke to Angela about in season two. She tells Angela that she wants her "belief." Now, Angela is working for the Dark Army.

Bobby Cannavale's Irving is the man who relocates Tyrell. He hands Elliot a parking ticket and asks: "Put this on the dash, heh?" Is that or is that not the best line read in Mr. Robot history — and if not, what is? Top five, allowable.

It's pretty good. I think there are a couple of doozies coming up this season that would probably make my top five. In the room, we usually default to that scene in season one when Scott Knowles points at Tyrell and says, "There! That's the look I was looking for."

At one point in the episode, Irving reveals some backstory to Tyrell, and none of it seems to be true. What fueled the idea to have Irving tell such an elaborate lie here? Will there always be an arms-length quality to Irving?

To an extent, yes. We wanted to build out some mystery for Irving and deepen his character. This is another example of us subverting expectations, peeling back the layers of what you think you know about this person. He's a salesman, through and through. The elaborate lie is a way for him to relate to the client he's dealing with. He needed to find a way to relate to Tyrell because Tyrell wasn't answering him. Just like the collection of mugs that he uses to connect with various car buyers … it's the same idea. He has a variety of personalities he can tap into in order to make his "sale."

Irving's a Big Brother fan, apparently. Are there Big Brother fans in the Mr. Robot writers' room? And thank you in advance for finding a way to sneak a Survivor reference into season four for yours truly.

Writers Courtney Looney and Adam Penn love Big Brother. I think Sam watches it, too. I'll see what I can do about Survivor for next season.

Antonio Mazzaro, my co-host on the Mr. Robot podcasts here on THR and Post Show Recaps, tells me that the season of Big Brother depicted in this episode featured a houseguest "who claimed to have a second persona named Judas who was darker and angrier than he was, and there was a set of twins who was switching in and out of the show, pretending to be one person." This was news to me. News to you?

News to me. I'm pretty sure Adam and Courtney had a say in choosing this footage. I wouldn't be surprised if they chose that season because of the houseguest.

When Irving spoke in the season premiere about "working on my book," he really meant that he's writing a book: Beach Towel – A Novel, including "Chapter 4: A Wink Gone Wrong." Who wrote the copy for this, in reality, and how was the story of poor Jonathan and the steel-toed boots conceived?

The fact that Irving is an aspiring writer working on a novel called Beach Towel always made us laugh in the room. One of our writers, Jeff McKibben, was the one who created the copy for "A Wink Gone Wrong." His meaty damn hands are responsible for what you see onscreen. The chapter is based on an old novel that Jeff had written years ago.

How would you grade Irving's abilities as a writer? "Meaty damn hands" is a memorable turn of phrase, to be sure.

I think he has a future.

Does a full version of this book actually exist, or will it exist? Certainly wouldn't be the first time a book burst from out of the screen on Mr. Robot and into reality.

Maybe some chapters might show up on one of our sites, but I don't believe a cover-to-cover version exists … yet.

Returning to Tyrell's isolation, what's the story behind getting Wallace Shawn onto Mr. Robot? Was the character of Mr. Williams created with Shawn in mind, and how hard was it to keep the word "inconceivable" out of his scene?

Actually, I believe Wallace Shawn was thrown out as an early casting idea when we were coming up with the Irving character. I was really excited by this because I'm a huge Wallace Shawn fan. He's great in The Princess Bride, but he's amazing in My Dinner With Andre. The character of Irving ended up going through many iterations, and when Bobby came on board, he made it even better. Mr. Williams still hadn't been cast and I know everyone in the room was still excited by the possibility of Wallace Shawn being on the show, so Sam tried to make it happen with Mr. Williams. I don't believe Mr. Williams was originally created with Shawn in mind, but now I can't imagine anyone else in that role.

Mr. Williams boasts a striking resemblance to Mr. Monopoly, and therefore Uncle Conrad of "The Careful Massacre of the Bourgeoisie," effectively the fsociety mascot. Coincidence or intentional?

This is a coincidence. Mr. Williams' look is actually based on Ty Cobb, the lawyer who's on Trump's legal team.

The interrogation scene plays almost as Vizzini's game of wits on crack, to the point that he's snorting an "-ocane powder." The tea kettle and the degeneration of Tyrell's ability to withstand the heat makes it feel like he's actively being poisoned somehow. The Princess Bride inspiration, that nightmarish sensation, and the idea of Tyrell being physically manipulated — is that all by design?

Wallace Shawn is working hard to build up his immunity to iocane powder in this scene.

Seriously, the initial inspiration for this scene was that interrogation in The Master, a film that Rami was also in. Our brilliant editor, Rosanne Tan, spent a lot of time crafting the pacing, the sound design and the music with Sam. It had to have the right intensity and suspense or it just wouldn't work. The "Polymorphia" track, and also Mac Quayle's music, really brought this scene to life. The tea-kettle sound design was a great device used in the scene as well, which is something our assistant editor, Zachary Dehm, spent a lot of time building.

During his time in isolation, Tyrell spies on Joanna and their son. Considering his baggage with his own father, how determined is Tyrell to not make similar mistakes with his own son — and how impossible will that be to achieve, not only given that Tyrell's son will be in social services soon, but that Tyrell himself is already the most wanted man in America?

For Tyrell (and the episode's title hints at it), this work is about cementing his legacy. In season one, Joanna told him not to come back until he "fixed" the problem he created. Tyrell needs to become the man who is worthy of Joanna, a man his son can look up to. This notion is further reinforced by the fact that Tyrell never looked up to his father. He didn't want to become anything like him. Tyrell grew up with a poor farmer for a father, which is why he was so driven to make something of himself in the corporate world. He doesn't want his son experience that kind of shame.

Martin Wallstrom spoke with me about the episode needing to shoot around his epic beard. Can you weigh in on that? Was this episode challenging to put together because of Wallstrom's need to grow a beard?

The planning was challenging for our AD department. We had to organize our schedule in a way so we could give him time to grow the beard, shoot out all of the farmhouse/beard scenes, and then film the rest of his scenes clean shaven. The first time I saw Martin with the beard, I didn't recognize him. In fact, my brother and sister-in-law were watching the promo for this episode last week and asked me, "Who's the new guy with his shirt off chopping wood?"

Also, when Tyrell is at the hotel at the end of this episode, you can hear a track by Henry Mancini's called "Experiment in Terror." Our post consultant Sean Schuyler was the one who recommended it. After hearing it, Sam loved it and wanted to use it, but he also listened to a bunch of other Henry Mancini tracks, which is how we ended up with "Whistling Away the Dark" in the opening of the premiere.

How much wood was chopped in the making of this episode?

We don't respect wood. So … lots.

Tyrell escapes the compound, and is ultimately brought back in thanks to a friend in the FBI: Santiago, someone fans have long suspected as in league with the Dark Army ever since he just so happened to miss out on the shoot-out in China. How long has this reveal been in the works, and how was it decided that this would be the best method of revealing the information — rather than, say, the viewer finding out alongside Dom DiPierro? What does it buy you to give this information to the viewer before giving this information to DDP?

We knew that Santiago was working with the Dark Army in season two, but this moment felt like an organic way of revealing that information to Tyrell and our viewers. Doing it this way gives us many opportunities for dramatic irony in the future. Since you (the viewer) know about this and Dom doesn't, every time you see Dom and Santiago onscreen together, you're going to be like, "Don't trust him! He's Dark Army!" It's a great way to build tension and conflict in future scenes, up to the moment when/if she learns the truth.

At the end of the episode, Tyrell learns from Angela that sometimes Elliot becomes a different person. Is this the first time he's truly seeing the difference between Elliot and Mr. Robot? And what can you say about how he's reacting to the news? Is it still love that he feels toward Elliot, is it fear, or is it something else?

I think he's starting to feel some doubt and worry. He was attracted to the power and vision that Mr. Robot had. He respected it. Worshipped it. Then he had a heartbreaking experience with Elliot at the end of season two. Why would this guy want to jeopardize everything we worked so hard for? That doesn't compute for Tyrell. Even after Angela tells him the truth, I don't think it helps to resolve that conflict. He's starting to question his faith. This also explains why he's so delicate with Mr. Robot at the end of our season three premiere. He wants to be sure that Mr. Robot understands why he did what he did.

Any final shout-outs about this episode?

The editor of this episode, Rosanne Tan, was eight months pregnant when she cut this. She's still in the cutting room, working 16-hour days, and she's giving birth this Saturday. It's amazing. Her son has spent so much of his time in the womb listening to Gordon Lightfoot, Polymorphia, ax chopping, and the ravings of a madman like Tyrell Wellick.

Cue us up for episode four! What can viewers expect from Mr. Robot as season three continues next week?

One of the best line readings of the series. Definitely top five.

Follow THR.com/MrRobot for interviews, theories, podcasts and more all season long.