The deal saves 800 jobs and 30 sites, but 40 restaurants and more than 1,000 jobs will be lost.