[Diffbase] Split code generation from register allocation

#234