public static uint bits_masktolowest(uint x) { if (Bmi1.IsBmi1Supported) { return(Bmi1.blsmsk_u32(x)); } else { return(x ^ (x - 1)); } }