package o; import java.util.HashMap; import java.util.Map; /* loaded from: classes.dex */ public final class OBC { public final IeS b = new IeS<>(); public int e; /* loaded from: classes.dex */ public static class IeS { final Map> c = new HashMap(); public T b = null; IeS() { } } public final T b(byte[] bArr, int i, int i2) { if (i2 > bArr.length) { throw new IndexOutOfBoundsException(); } IeS ieS = this.b; T t = ieS.b; while (i < i2) { ieS = ieS.c.get(Byte.valueOf(bArr[i])); if (ieS == null) { break; } if (ieS.b != null) { t = ieS.b; } i++; } return t; } public final void d(T t, byte[]... bArr) { IeS ieS = this.b; int i = 0; for (byte[] bArr2 : bArr) { for (byte b : bArr2) { IeS ieS2 = ieS.c.get(Byte.valueOf(b)); if (ieS2 == null) { ieS2 = new IeS<>(); ieS.c.put(Byte.valueOf(b), ieS2); } ieS = ieS2; i++; } } if (i == 0) { throw new IllegalArgumentException("Parts must contain at least one byte."); } if (ieS.b == null) { ieS.b = t; this.e = Math.max(this.e, i); return; } throw new RuntimeException("Value already set for this trie node"); } }