I worked through a bankruptcy. It started with a retail company of 800 employees, a large warehouse, a mail order operation mailing out catalogs, and stores in multiple states. In the end the stores were closed, the mail order stopped, and it was just the 30-person business-to-business team, making larger sales to corporate customers.
A larger company bought just that sales department out of the bankruptcy. It was buying a group of sales people and their rolodexes. Everything else was evaporated. The stock holders lost, the companies with unpaid invoices lost, the other employees lost.
But it worked out well for our little group. It was essentially keeping the same job, with the backing of a much larger and better-run company.