private static int GetFramesForward(ulong s0, ulong s1, ulong n0, ulong n1, int loop) { var rand = new Xoroshiro128Plus(s0, s1); for (int i = 0; i < loop; i++) { _ = rand.Next(); if (rand.GetState() == (n0, n1)) { return(i); } } return(-1); }