def AmlBits.get_buf
import bend-osdev-acpi@0.1.1.0/aml_field.bend as AmlFieldimport Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
335# bits [off, off + n) of o as a Buffer of ceil(n / 8) bytes (the last byte's
336# high bits are the bits that follow the field; callers mask them)
337def AmlBits.get_buf(+o: B.Octets, +off: Nat, +n: Nat) -> B.Octets:
338 B.Octets.of_list(fld.bitsb.get(Nat.div(Nat.add(n, 7n), 8n), o, off, Nil{}))