 SPOILER: A different ending was shot, with Neff being caught by the  police and executed while Keyes looks on in despair.  Billy Wilder (qv) decided it would be poignant and fitting for  both characters if instead Neff were to die in his office with Keyes  by his side as he expressed his regret.