- for (uint16_t i = 1; i < 0xFFFF; i += 8) {
- nttmp1 = prng_successor(nttmp1, 1); if (nttmp1 == nt2) return i;
- nttmp2 = prng_successor(nttmp2, 1); if (nttmp2 == nt1) return -i;
-
- nttmp1 = prng_successor(nttmp1, 2); if (nttmp1 == nt2) return i+1;
- nttmp2 = prng_successor(nttmp2, 2); if (nttmp2 == nt1) return -i-1;
-
- nttmp1 = prng_successor(nttmp1, 3); if (nttmp1 == nt2) return i+2;
- nttmp2 = prng_successor(nttmp2, 3); if (nttmp2 == nt1) return -i-2;
-
- nttmp1 = prng_successor(nttmp1, 4); if (nttmp1 == nt2) return i+3;
- nttmp2 = prng_successor(nttmp2, 4); if (nttmp2 == nt1) return -i-3;
-
- nttmp1 = prng_successor(nttmp1, 5); if (nttmp1 == nt2) return i+4;
- nttmp2 = prng_successor(nttmp2, 5); if (nttmp2 == nt1) return -i-4;
-
- nttmp1 = prng_successor(nttmp1, 6); if (nttmp1 == nt2) return i+5;
- nttmp2 = prng_successor(nttmp2, 6); if (nttmp2 == nt1) return -i-5;
-
- nttmp1 = prng_successor(nttmp1, 7); if (nttmp1 == nt2) return i+6;
- nttmp2 = prng_successor(nttmp2, 7); if (nttmp2 == nt1) return -i-6;
-
- nttmp1 = prng_successor(nttmp1, 8); if (nttmp1 == nt2) return i+7;
- nttmp2 = prng_successor(nttmp2, 8); if (nttmp2 == nt1) return -i-7;
+ for (i = 1; i < 32768; i++) {
+ nttmp1 = prng_successor(nttmp1, 1);
+ if (nttmp1 == nt2) return i;
+ nttmp2 = prng_successor(nttmp2, 1);
+ if (nttmp2 == nt1) return -i;