#include <inttypes.h>

int16_t uint8_7bit_nonzero_mask_int16(uint8_t b)
{
  int ret;
  b &= 127;
  b -= 1;
  b >>= 7;
  ret = b;
  return ret-1;
}