eliminate plain int except for a few cases like arena_index
better integer size assertion suggested by usak