def find2
import lawful-bytes@0.1.1.0/fast.bend as Fastimport Base
import lawful-bytes@0.1.1.0/defs.bend as D
102# The first index j with from <= j < to where byte j is c1 or c2; to if none.
103def find2(b: D.Bytes, +from: U32, +to: U32, +c1: U32, +c2: U32) -> D.Bytes & U32:
104 D.Bytes{+len, buf} = b
105 find.k(len, find.fin(to, find2.start(words(from, to), Array.get(U32, buf, (from >> 2n : U32)), from, rep(c1), rep(c2))))