cleaned up the generate-c pass code somewhat