def in.fsb.pick
import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterpimport Base
1073def in.fsb.pick(set: Bool, left: Bool, +i: Nat, +acc: Nat) -> Nat:
1074 match set:
1075 case False{}:
1076 acc
1077 case True{}:
1078 match left:
1079 case True{}:
1080 Nat.add(i, 1n)
1081 case False{}:
1082 in.fsb.first(Nat.is_eq(acc, 0n), i, acc)