By all accounts, "Me and Earl and the Dying Girl" shouldn't work. There's the title, which reads like a quirky nightmare, a premise that seems to suggest a run-of-the-mill teen weepie and a faint aura of tired Michel Gondry-like whimsy in the low-fi DIY cinematic re-enactments made by its main characters.

But there's an uncommon wisdom in the marrow of this movie, promulgated by director Alfonso Gomez-Rejon's sensitive work and screenwriter Jesse Andrews' understanding of the way we keep growing and developing until the end. It's deeply moving, earning its tears through the authenticity of the emotional experiences depicted rather than by extracting them through sheer blunt force.

The story concerns high-school senior Greg (Thomas Mann), a loner who spends most of his time making snarky spinoffs of classic movies such as "Apocalypse Now" and "The Third Man" with his best and only friend Earl (RL Cyler). That changes when his mom forces him to befriend Rachel (Olivia Cooke), a classmate battling cancer, and the movie chronicles the transformative effect of their time together for both individuals.

The picture is relentlessly unsentimental, sidestepping the pitfalls that have trapped so many of its ostensible counterparts in this genre. It communicates the nuances of friendship in scenes that are blessed with a quiet grace, through conversations and small shared moments that are about so much more than they seem to be on the surface, creating a love between Greg and Rachel that is deeper and more interesting than simple romance.

Plus, for a movie that references dying in its title, the picture sure is lively. Gomez-Rejon directs in a zippy, pop-friendly style that invigorates the narrative and gives strength to the idea that there's a lot to be lived and experienced, even when death rears its foreboding head. You don't just like these characters, you flat out admire them for their relentless optimism amid the finality looming over it all.

"Me and Earl and the Dying Girl" comforts in a very real way, unsettles preconceptions by suggesting that there's much left to learn about a person even after they've left this Earth.