def ent.next.go
import bend-osdev-acpi@0.1.1.0/entries.bend as Entriesimport Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-acpi@0.1.1.0/fields.bend as F
39def ent.next.go(empty: Bool, +o: B.Octets, +n: Nat) -> AcpiEntNext:
40 match empty:
41 case True{}:
42 AcpiEntEnd{}
43 case False{}:
44 +l = U32.to_nat(F.AcpiF.u8(o, 1n))
45 ent.next.pick(Bool.and(Nat.is_le(2n, l), Nat.is_le(l, n)), F.AcpiF.u8(o, 0n), l)