def choose
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/core.bend as Coreimport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/types.bend as T
54def choose(x: T.Lane, y: T.Lane, z: T.Lane) -> T.Lane:
55 match x y z:
56 case T.W{+xh, +xl} T.W{yh, yl} T.W{zh, zl}:
57 T.W{U32.xor(U32.and(xh, yh), U32.and(U32.not(xh), zh)),
58 U32.xor(U32.and(xl, yl), U32.and(U32.not(xl), zl))}