// Find bad seed pair for Xoroshiron ('<<') inline uint16_t rol16(const uint16_t x, int k) { return (x << k) | (x >> (16 - k)); } // returns seed_correction_1 in high word and seed_correction_0 in low word uint32_t _FindSeedCorr(int a, int b, int c) { uint16_t s0; uint16_t s1; for (uint32_t y = 0; y != 65536; y++) { for (uint32_t x = 0; x != 65536; x++) { s1 = y ^ x; if (rol16(s1, c) == y) { s0 = rol16(x, a) ^ ~s1 ^ (s1 << b); if (s0 == x) { return x | (y << 16); } } } } }