def Crc32Spec.update.go
import bend-osdev-crc@0.1.0.0/crc.bend as Crcimport Base
178# the register after the bytes xs, from register c, without the final XOR:
179# what a caller that computes a CRC in pieces passes from one piece to the next
180def Crc32Spec.update.go(reflected: Bool, +width: Nat, poly: U32, c: U32, xs: List<&2, U32>) -> U32:
181 match reflected:
182 case True{}:
183 r32.raw(xs, reflect32(poly, width), c)
184 case False{}:
185 Crc32Spec.update.msb(Nat.is_lt(width, 8n), width, poly, c, xs)