#include uint64_t uint64_topbit_mask(uint64_t x) { x >>= 63; return -(1 & x); }