The second possibility leads to inflation, but it saves the institutions and allows the system to continue to function.
The first possibility would have knock-on effects as one company's bankruptcy immediately impairs assets on everyone else's balance sheet. You could conceivably end up with everyone filing for bankruptcy protection. That would also be a solution: if A owes money to B who owes money to C who owes money to A it can all be netted out to zero but the required disclosures will only take place if A, B, and C are all in bankruptcy court. But it everyone is bankrupt there will be no credit creation and, again, the economy will grind to a halt.
Another way to get the required "circular claims" disclosures to be made is for the government to pull a Roosevelt:
On March 5, 1933, the day after Roosevelt's inauguration, he called a special session of Congress which instituted a mandatory four-day bank holiday. This act provided for the reopening of banks after federal inspectors had declared them to be financially secure.