def W64.div.bits
import bend-osdev-word64@0.1.1.0/word64.bend as Word64import Base
262# the m bits of w (least significant first) read onto qr, most significant
263# first
264def W64.div.bits(m: Nat, w: Word(m), +b: W64, qr: W64 & W64) -> W64 & W64:
265 match m w:
266 case 0n WNil{}:
267 qr
268 case 1n+p WCon{x, hi}:
269 W64.div.step(x, b, W64.div.bits(p, hi, b, qr))