def n32.raw
import bend-osdev-crc@0.1.0.0/crc.bend as Crcimport Base
88# the register after the bytes xs, from register c; shift is width - 8
89def n32.raw(xs: List<&2, U32>, +poly: U32, +shift: Nat, +topbit: U32, +mask: U32, c: U32) -> U32:
90 match xs:
91 case Nil{}:
92 c
93 case Con{h, t}:
94 n32.raw(t, poly, shift, topbit, mask, n32.bits(8n, poly, topbit, mask, U32.xor(c, U32.shln(U32.and(h, 255), shift))))