Removing auto register code