#include int32_t int32_topbit_mask(int32_t x) { x >>= 31; return -(1 & x); }