cleansed sim_util.c