def shl_lt
import bend-collections@1.0.0.0/src/math/w64.bend as W64import Base
import bend-collections@1.0.0.0/src/math/u64.bend as W
228def shl_lt(+a: W.U64, +k: Nat) -> W.U64:
229 match k:
230 case 0n:
231 a
232 case 1n+ +j:
233 W.U64{U32.mul(lo(a), pow2(1n+j)), U32.add(U32.mul(hi(a), pow2(1n+j)), U32.shrn(lo(a), Nat.sub(32n, 1n+j)))}