Diablo Cody arrives to the Los Angeles premiere of Focus Features' "Tully" in April 2018. (Michael Tran/FilmMagic)

When Diablo Cody set out to write her first screenplay more than a decade ago, she said her inspiration came from one question: “What’s a story that’s never been told?”

With that, the 2007 Oscar-winning film “Juno” was born — a coming-of-age comedy chronicling the ups and downs in the life of a 16-year-old girl who gets pregnant unexpectedly and decides to give her baby up for adoption.

But as states nationwide are passing or working to pass highly restrictive abortion bills this week, Cody appears to be rethinking the movie that launched her career.

“I don’t even know if I would have written a movie like ‘Juno’ if I had known that the world was going to spiral into this hellish alternate reality that we now seem to be stuck in,” the 40-year-old said in an interview on the “Keep It” podcast released Wednesday.

That same day, Alabama Gov. Kay Ivey (R) signed off on the nation’s strictest abortion legislation, which does not include exceptions for victims of rape and incest. Last week, Georgia Gov. Brian Kemp (R) signed a “heartbeat bill” into law banning abortions after doctors can detect a “fetal heartbeat in the womb,” which usually occurs at around six weeks. At that point, many women don’t even know whether they are pregnant.

“The Georgia thing is horrifying,” Cody said on the podcast. “It’s honestly something I’ve been kind of thinking about continuously in an endless dark feedback loop. It sucks so . . . bad.”

When she was asked if a modern-day rewrite of “Juno,” which was set in Minnesota, would instead feature the main character grappling with Georgia’s abortion law, Cody hesitated.

“I think I probably would have just told a different story in general,” she said.

Since the film’s 2007 debut, debate has swirled around the message the film sends about abortion because its protagonist, Juno MacGuff, played by Ellen Page, forgoes the procedure in favor of adoption. Antiabortion proponents have reportedly praised the film’s “strong pro-life message,” while others have interpreted Juno’s actions as indicative of her freedom to choose what she thinks is best.

For Cody though, who has been vocal about being an abortion rights advocate, having her breakout movie be associated with antiabortion messaging is a regret that has troubled her for years.

“In a way I feel like I had a responsibility to maybe be more explicitly pro-choice, and I wasn’t,” Cody said during a Planned Parenthood benefit event in 2017 marking the film’s 10th anniversary, Vanity Fair reported. “I think I took the right to choose for granted at the time.”

In the film’s pivotal near-abortion scene, Juno is headed into a clinic when she runs into her classmate Su-Chin protesting outside.

“All babies want to get borned!” Su-Chin plaintively chants. She’s toting a homemade sign that reads, “No babies like murdering,” in block letters.

A determined Juno continues toward the building, but Su-Chin tries to get her to stop by spouting facts about unborn fetuses, all of which go unheeded until she shouts, “It has fingernails.”

Once inside, it doesn’t take Juno long to run out, and the rest of the movie follows her quest to find a worthy couple to adopt her baby. Though not everything goes exactly as planned, by the end, Juno’s son has a loving home and she’s back to life as a normal teenager.

“I don’t feel I was clear enough in terms of why Juno chose to not have an abortion,” Cody told the Guardian last year. “It was simply because she did not want to.”

Still, the ambiguity opened doors for critics to weigh in on the film with their own explanations behind its meaning.

Shortly after the film’s release, in an article for Slate, Ann Hulbert praised its handling of abortion in the face of Cody’s personal views, plot needs and potential concerns about alienating antiabortion supporters.

“It’s a tension the screenplay finesses deftly, undercutting both pro-life and pro-choice purism,” Hulbert wrote.

But, Ross Douthat, then writing for the Atlantic, had a different takeaway. Douthat drew attention to how Juno “certainly seems to be moved by the unremitting grossness of the abortion clinic . . . and more importantly, by the declaration, from a pro-life Asian classmate keeping a lonely vigil outside the clinic, that her child-to-be ‘already has fingernails.’”

“None of this means that movie is a brief for overturning Roe v. Wade; far from it,” Douthat wrote. “But . . . it’s decidedly a brief for not getting an abortion.”

Two years after the film was released, Rep. Jean Schmidt (R-Ohio) announced plans to introduce the “Juno Bill,” which she said would provide a tax credit to women who wanted to give their babies up for adoption, so they wouldn’t “have to worry about the consequences or the costs involved,” CNN reported at the time.

During Wednesday’s interview, Cody said that when she was writing the screenplay she never thought it would actually become a film.

“I didn’t think it was ever going to get made,” she said. “I wasn’t thinking as an activist. I wasn’t thinking politically at all.”

The result? A letter from her Catholic high school thanking her for “writing a pro-life movie,” she said, describing it as the “most horrifying thing.”

“I was like, I . . . hate all of you, and I’m as pro-choice as a person can possibly be,” she said.