[tz] [PATCH 3/5] Refactor zic to simplify overflow checking