register analyzer (sort of, does not work right yet)