Updated from 3:08 p.m. EDT

As

General Motors

(GM) - Get Report

approaches a deadline to restructure or file bankruptcy, what is the destiny of its shares?

On Thursday, shares rose 25% because the United Auto Workers made a deal with the company, removing a major barrier to restructuring outside bankruptcy. On Friday afternoon, GM shares closed down 25.5%, or 49 cents to $1.43, reflecting renewed bankruptcy expectations. The shares moved lower in the after-hours session, down 8 cents to $1.35 before 5:30 p.m. EDT.

For equity holders, bankruptcy court is a not-so-nice place to be, because shares typically go to zero at the end of the case, although they can continue to trade through the court process.

The theory of the bankruptcy code is that investors knew, or should have known, that a company's fortunes were souring, and that they had the opportunity to sell their shares in a liquid market. Why reward them in court, where the goal is to give companies a second chance, and the opportunity to issue new shares can increase the possibility of success?

It is, however, remotely possible that GM can avoid bankruptcy over the next few days, and that is the basis for the trading. As Jim Cramer has said, "The common stock holders are just lottery ticket holders and they know that."

Under the unlikely, non-bankruptcy restructuring plan proposed by GM, the government would get 50% of the company, the United Auto Workers would get 39%, the unsecured bondholders would get 10% and the equity holders would get 1%.

To accomplish this goal, GM would increase the number of shares from approximately 600 million to approximately 60 billion, distribute new shares and conduct a reverse split back to 600 million shares.

For existing shareholders, shares valued today at $1.60 would theoretically be worth 1.6 cents. Standard & Poor's analyst Efraim Levy has long been saying the shares are essentially worthless, in bankruptcy or out. "It's a lose-lose, whether they get a deal or go to bankruptcy," he says.

Of course, shareholders always hope to win the lottery. In 2007, during the Northwest Airlines bankruptcy, which preceded a merger with

Delta

(DAL) - Get Report

, their hopes built as shares went through some strange gyrations.

Owl Creek Asset Management, a New York investment firm, acquired 5% of the shares, pushing the price from $1.35 to the $5 range. The firm threatened to file a suit alleging that Northwest management undervalued the carrier, and helped to form an ad hoc group of shareholders to press for remuneration in court.

Investors may have benefitted from gyrations, as long as they sold at the right moment. In the end, trading was halted, the shares went to zero and Northwest issued new stock.