def hs.stb.get.go
bend-osdev-hashes@0.1.0.0 · streebog.bend:88
import bend-osdev-hashes@0.1.0.0/streebog.bend as Streebog
import Base
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs
88def hs.stb.get.go(d: Nat, t: HsStbTab, +i: U32) -> Hs.HsW2:
89 match d:
90 case 0n:
91 match t:
92 case HsStbLeaf{v}:
93 v
94 case HsStbNode{l, r}:
95 Hs.HsW2{0, 0}
96 case 1n+(+p):
97 match t:
98 case HsStbLeaf{v}:
99 v
100 case HsStbNode{l, r}:
101 hs.stb.get.go(p, hs.stb.pick(U32.is_eq(U32.and(1, U32.shrn(i, p)), 1), l, r), i)