#include int64_t int64_topbit_mask(int64_t x) { x >>= 63; return -(1 & x); }