#include uint8_t uint8_topbit_mask(uint8_t x) { x >>= 7; return -(1 & x); }