def tf.q.raw
import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofishimport Base
52# q(x) from its tables
53def tf.q.raw(+ts: List<&2, U32>, +x: U32) -> U32:
54 +a0 = U32.shrn(x, 4n)
55 +b0 = U32.and(15, x)
56 tf.q.go(ts, tf.t(ts, 0n, U32.xor(a0, b0)), tf.t(ts, 1n, tf.q.half(a0, b0)))