rnd512Q :: V.Vector Word64 -> Word64 -> V.Vector Word64
rnd512Q !x !rndNr = 
    let !x0 = V.unsafeIndex x 0 `xor` 0xffffffffffffffff `xor` rndNr
        !x1 = V.unsafeIndex x 1 `xor` 0xffffffffffffffef `xor` rndNr
        !x2 = V.unsafeIndex x 2 `xor` 0xffffffffffffffdf `xor` rndNr
        !x3 = V.unsafeIndex x 3 `xor` 0xffffffffffffffcf `xor` rndNr
        !x4 = V.unsafeIndex x 4 `xor` 0xffffffffffffffbf `xor` rndNr
        !x5 = V.unsafeIndex x 5 `xor` 0xffffffffffffffaf `xor` rndNr
        !x6 = V.unsafeIndex x 6 `xor` 0xffffffffffffff9f `xor` rndNr
        !x7 = V.unsafeIndex x 7 `xor` 0xffffffffffffff8f `xor` rndNr
        !y  = V.fromList [x0, x1, x2, x3, x4, x5, x6, x7]
      
        !w0 = column y 1 3 5 7 0 2 4 6
        !w1 = column y 2 4 6 0 1 3 5 7
        !w2 = column y 3 5 7 1 2 4 6 0
        !w3 = column y 4 6 0 2 3 5 7 1
        !w4 = column y 5 7 1 3 4 6 0 2
        !w5 = column y 6 0 2 4 5 7 1 3
        !w6 = column y 7 1 3 5 6 0 2 4
        !w7 = column y 0 2 4 6 7 1 3 5
    in V.fromList [w0, w1, w2, w3, w4, w5, w6, w7]
rnd512Q :: V.Vector Word64 -> Word64 -> V.Vector Word64
rnd512Q !x !rndNr = 
    let !x0 = V.unsafeIndex x 0 `xor` 0xffffffffffffffff `xor` rndNr
        !x1 = V.unsafeIndex x 1 `xor` 0xffffffffffffffef `xor` rndNr
        !x2 = V.unsafeIndex x 2 `xor` 0xffffffffffffffdf `xor` rndNr
        !x3 = V.unsafeIndex x 3 `xor` 0xffffffffffffffcf `xor` rndNr
        !x4 = V.unsafeIndex x 4 `xor` 0xffffffffffffffbf `xor` rndNr
        !x5 = V.unsafeIndex x 5 `xor` 0xffffffffffffffaf `xor` rndNr
        !x6 = V.unsafeIndex x 6 `xor` 0xffffffffffffff9f `xor` rndNr
        !x7 = V.unsafeIndex x 7 `xor` 0xffffffffffffff8f `xor` rndNr
        !y  = V.fromList [x0, x1, x2, x3, x4, x5, x6, x7]
      
        !w0 = column y 1 3 5 7 0 2 4 6
        !w1 = column y 2 4 6 0 1 3 5 7
        !w2 = column y 3 5 7 1 2 4 6 0
        !w3 = column y 4 6 0 2 3 5 7 1
        !w4 = column y 5 7 1 3 4 6 0 2
        !w5 = column y 6 0 2 4 5 7 1 3
        !w6 = column y 7 1 3 5 6 0 2 4
        !w7 = column y 0 2 4 6 7 1 3 5
    in V.fromList [w0, w1, w2, w3, w4, w5, w6, w7]
rnd512Q !x !rndNr = 
    let !x0 = V.unsafeIndex x 0 `xor` 0xffffffffffffffff `xor` rndNr
        !x1 = V.unsafeIndex x 1 `xor` 0xffffffffffffffef `xor` rndNr
        !x2 = V.unsafeIndex x 2 `xor` 0xffffffffffffffdf `xor` rndNr
        !x3 = V.unsafeIndex x 3 `xor` 0xffffffffffffffcf `xor` rndNr
        !x4 = V.unsafeIndex x 4 `xor` 0xffffffffffffffbf `xor` rndNr
        !x5 = V.unsafeIndex x 5 `xor` 0xffffffffffffffaf `xor` rndNr
        !x6 = V.unsafeIndex x 6 `xor` 0xffffffffffffff9f `xor` rndNr
        !x7 = V.unsafeIndex x 7 `xor` 0xffffffffffffff8f `xor` rndNr
        !y  = V.fromList [x0, x1, x2, x3, x4, x5, x6, x7]
      
        !w0 = column y 1 3 5 7 0 2 4 6
        !w1 = column y 2 4 6 0 1 3 5 7
        !w2 = column y 3 5 7 1 2 4 6 0
        !w3 = column y 4 6 0 2 3 5 7 1
        !w4 = column y 5 7 1 3 4 6 0 2
        !w5 = column y 6 0 2 4 5 7 1 3
        !w6 = column y 7 1 3 5 6 0 2 4
        !w7 = column y 0 2 4 6 7 1 3 5
    in V.fromList [w0, w1, w2, w3, w4, w5, w6, w7]