Gandolfini in talks for ‘Wonderstone’

'Sopranos' star would play casino owner in New Line comedy

“The Sopranos” star James Gandolfini is going from mob boss to magician’s boss, as he’s in negotiations to join Steve Carell and Jim Carrey in the New Line comedy “Burt Wonderstone.”

Carell stars as half of a once-successful Las Vegas magic duo that must reunite to square off against a hot-shot street magician (Carrey) whose tricks are often dangerous.

Gandolfini is in talks to play Doug Munny, a classy billionaire who owns the Aztec Casino, where the title character and his partner perform their show.

As for the pic’s female lead, New Line is focusing on just two actresses, Olivia Wilde and Sarah Silverman.

Don Scardino is directing the laffer, which New Line began developing in 2006 when it bought Chad Kultgen’s spec script. The “Horrible Bosses” team of John Francis Daley and Jonathan Goldstein penned a rewrite and Oscar-nominated “Up in the Air” scribe Jason Reitman performed a polish.

Gandolfini, who has several TV projects in development at HBO, last starred opposite Kristen Stewart in Jake Scott’s indie drama “Welcome to the Rileys.” Thesp has no fewer than four films coming out over the next 12 months, including Stephen Daldry’s “Extremely Loud and Incredibly Close,” Geoffrey Fletcher’s “Violet & Daisy,” David Chase’s “Twylight Zones” and Andrew Dominik’s “Cogan’s Trade,” toplined by Gandolfini’s “True Romance” co-star Brad Pitt.

Gandolfini is repped by CAA, Sanders Armstrong Caserta Management and attorney David Weber.