def n32_split

bend-osdev-crc@0.1.0.0 · PROOF.bend:19

import bend-osdev-crc@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crc@0.1.0.0/crc.bend as C

19def n32_split(xs: List<&2, U32>, +poly: U32, +shift: Nat, +topbit: U32, +mask: U32, c: U32, ys: List<&2, U32>) -> {C.n32.raw(B.append(xs, ys), poly, shift, topbit, mask, c) == C.n32.raw(ys, poly, shift, topbit, mask, C.n32.raw(xs, poly, shift, topbit, mask, c)) : U32}:
20  match xs:
21    case Nil{}:
22      {==}
23    case Con{h, t}:
24      n32_split(t, poly, shift, topbit, mask, C.n32.bits(8n, poly, topbit, mask, U32.xor(c, U32.shln(U32.and(h, 255), shift))), ys)

Uses (9)

Used by (1)