The crew assault Arasaka headquarters, who are forced to call out their final boogeyman, Adam Smasher.
David knows this is the end before he goes in. He's down to his final shot of stabilizers and there's no coming back.
David kills Faraday. Adam kills Rebecca.
In his last moments of lucidity, David tells Lucy that he wasn't able to fulfill his mother's dream, nor Maine's dream, but she can fulfill her dream.
Falco and Lucy escape, and David faces down Adam, and loses.
Cyberpunks always die or go psycho, so this is the good end.