You have not provided the definition for gc() so we have no idea why this code is doing what it is doing.
register is a keyword from C - it's pointless though because the default is for local variables to be in the register. This code was probably written for an older compiler (like, very very old) that couldn't properly decide where to store variables.