def mid_g
import bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64mul.bend as W64mulimport Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as WU
251def mid_g(+ll: U32, +lh: U32, +hl: U32, +hh: U32, +c: U32) -> WU.U64:
252 fin_g(ll, U32.add(lh, hl), hh, U32.is_lt(U32.add(lh, hl), lh), c)