def ph_half
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
331# the half of word w that element t uses (odd t: the high half), and w with that half replaced by h
332def ph_half(odd: Bool, +w: U32) -> U32:
333 match odd:
334 case True{}:
335 U32.shrn(w, 16n)
336 case False{}:
337 (w .&. 65535 : U32)