The first working SSA version. Credit goes mostly to Marc Osherson, with just a few small final fixes from me.