def reduce
import bend-collections@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbsimport Base
87# Partial reduction of 17 limbs: carry, then 2^130 q = p q + 5 q, so q is
88# folded back as 5 q on limb 0 and carried again. The result has limbs 0..15
89# below 2^8 and a value below 5 * 2^128 < 2p.
90def reduce(+d: List<&2, U32>) -> List<&2, U32>:
91 +t = carry(16n, d, 0)
92 carry(16n, add([U32.mul(quot(16n, t), 5)], split(16n, t)), 0)