def CapSetW.lo_list
import bend-osdev-caps@0.1.0.0/caps.bend as Capsimport Base
353# the capabilities among the low n bits of w, numbered from k, then rest
354def CapSetW.lo_list(n: Nat, +w: U32, +k: U32, rest: List<&2, U32>) -> List<&2, U32>:
355 match n:
356 case 0n:
357 rest
358 case 1n+p:
359 CapSetW.push(U32.is_eq(U32.and(w, 1), 1), k, CapSetW.lo_list(p, U32.shr(w), U32.add(k, 1), rest))