def Int.udivmod.fin
import bend-kit-int@0.2.0.0/int.bend as Intimport Base
102def Int.udivmod.fin(-p: Nat, q: Word(p), +n: Nat, s: Word(n), b: Word(n),
103 g: Bool) -> Word(1n+p) & Word(n):
104 match g:
105 case True{}:
106 (WCon{True{}, q}, Word.sub(n, s, b))
107 case False{}:
108 (WCon{False{}, q}, s)