     m 1 - iota [
         n m - 1 + + >fixnum :> i
         i array nth-unsafe
-        m-n i + array nth-unsafe
+        m n - i + array nth-unsafe
         mask state r1>> state r2>> formula :> r
 
         r i array set-nth-unsafe

        swap >>m
        swap >>n
        swap >>seed
        dup [ m>> ] [ n>> ] bi - >>m-n
        0 >>ix ;

: <sfmt> ( seed n m mask -- sfmt )

    sfmt new
        swap >>state
        dup <sfmt-array> [ >>uint-array ] [ >>uint-4-array ] bi*
        [ generate ] keep ; inline

: refill-sfmt? ( sfmt -- ? )
    state>> [ ix>> ] [ n>> 4 * ] bi >= ;
