def trunc32(w):
 w = int(((w & 2147483647) | (- (w & 2147483648))))
 assert (type(w) == int)
 return w

def trunc32 ( w ) : w = int ( ( ( w & 2147483647 ) | ( - ( w & 2147483648 ) ) ) ) assert ( type ( w ) == int ) return w
return the bottom 32 bits of w as a python int .