def majority
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
60def majority(x: T.Lane, y: T.Lane, z: T.Lane) -> T.Lane:
61 match x y z:
62 case T.W{+xh, +xl} T.W{+yh, +yl} T.W{+zh, +zl}:
63 T.W{U32.xor(U32.xor(U32.and(xh, yh), U32.and(xh, zh)), U32.and(yh, zh)),
64 U32.xor(U32.xor(U32.and(xl, yl), U32.and(xl, zl)), U32.and(yl, zl))}