def ad.tab.get

bend-osdev-aead@0.1.0.0 · aesround.bend:127

import bend-osdev-aead@0.1.0.0/aesround.bend as Aesround
import Base

127def ad.tab.get(d: Nat, t: AdTab, +i: U32) -> U32:
128  match d:
129    case 0n:
130      match t:
131        case AdLeaf{v}:
132          v
133        case AdNode{l, r}:
134          0
135    case 1n+(+p):
136      match t:
137        case AdLeaf{v}:
138          v
139        case AdNode{l, r}:
140          ad.tab.get(p, ad.tab.pick(U32.is_eq(U32.and(1, U32.shrn(i, p)), 1), l, r), i)

Uses (7)

Used by (1)