def r64_split

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

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

33def r64_split(xs: List<&2, U32>, +poly: W.W64, c: W.W64, ys: List<&2, U32>) -> {C.r64.raw(B.append(xs, ys), poly, c) == C.r64.raw(ys, poly, C.r64.raw(xs, poly, c)) : W.W64}:
34  match xs:
35    case Nil{}:
36      {==}
37    case Con{h, t}:
38      r64_split(t, poly, C.r64.bits(8n, poly, W.W64.xor(c, W.W64.from_u32(U32.and(h, 255)))), ys)

Uses (9)

Used by (1)