def small0
import bend-collections@1.0.0.0/src/crypto/sha512/core.bend as Coreimport Base
import bend-collections@1.0.0.0/src/crypto/sha512/types.bend as T
40# FIPS 180-4 (4.12): ROTR1 ^ ROTR8 ^ SHR7
41def small0(x: T.Lane) -> T.Lane:
42 match x:
43 case T.W{+hi, +lo}:
44 T.W{U32.xor(U32.xor(U32.or(U32.shrn(hi, 1n), U32.shln(lo, 31n)), U32.or(U32.shrn(hi, 8n), U32.shln(lo, 24n))), U32.shrn(hi, 7n)),
45 U32.xor(U32.xor(U32.or(U32.shrn(lo, 1n), U32.shln(hi, 31n)), U32.or(U32.shrn(lo, 8n), U32.shln(hi, 24n))), U32.or(U32.shrn(lo, 7n), U32.shln(hi, 25n)))}