def gfm.x
import bend-osdev-gf@0.1.1.0/gfm.bend as Gfmimport Base
51# a * x for a below 2^m: shift, and reduce if x^m appeared
52def gfm.x(+m: Nat, +poly: U32, a: U32) -> U32:
53 +s = U32.shl(a)
54 U32.xor(s, U32.and(poly, gfm.mask(U32.shrn(s, m))))