It was a high-stakes gamble, sending three of Hollywood’s biggest, most uncompromising talents—Warren Beatty, Elaine May, and Dustin Hoffman—to make a movie in the middle of the Sahara.