def inv_step
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as W64import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
579# x (2 - m x): doubles the correct low bits of an inverse of m mod 2^64
580def inv_step(+m: W.U64, +x: W.U64) -> W.U64:
581 mul(x, sub(W.U64{2, 0}, mul(m, x)))