def spin.state
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
1819def spin.state(r: Array<U32> & U32, tab: Array<Tr>, +i: U32, +id: U32, +cap: U32) -> SpinStep:
1820 (a, +c) = r
1821 spin.state.tr(spin.tr(U32.is_lt(c, 128) && U32.is_lt(id, cap), tab, id, c), a, i)