package o; import java.io.IOException; import java.util.ArrayList; /* loaded from: classes.dex */ public final class Tfz extends vhn { private ArrayList b; private int c; public Tfz(C16613piz c16613piz) { super(c16613piz); this.c = 0; this.b = new ArrayList<>(); } @Override // o.vhn, o.sAQ public final boolean e(mEu meu) { return meu.a.equals("hdlr") || meu.a.equals("keys") || meu.a.equals("data"); } @Override // o.vhn, o.sAQ public final boolean a(mEu meu) { return meu.a.equals("ilst") || QpA.d(meu.a.getBytes()) <= this.b.size(); } @Override // o.vhn, o.sAQ public final sAQ a(mEu meu, byte[] bArr, TZV tzv) throws IOException { if (bArr != null) { C0629LEh c0629LEh = new C0629LEh(bArr); if (meu.a.equals("keys")) { d(c0629LEh); } else if (meu.a.equals("data")) { c(bArr, c0629LEh); } } else { int d = QpA.d(meu.a.getBytes()); if (d > 0 && d < this.b.size() + 1) { this.c = d - 1; } } return this; } @Override // o.vhn public final void d(C0629LEh c0629LEh) throws IOException { c0629LEh.b(4L); int a = c0629LEh.a(); for (int i = 0; i < a; i++) { int a2 = c0629LEh.a(); if (a2 < 8) { T t = this.a; BrP.b(new Object[]{t, "Key size too small: ".concat(String.valueOf(a2))}, -1786863991, 1786863992, System.identityHashCode(t)); return; } else { c0629LEh.b(4L); this.b.add(c0629LEh.a(a2 - 8, "UTF-8")); } } } @Override // o.vhn public final void c(byte[] bArr, C0629LEh c0629LEh) throws IOException { if (this.c >= this.b.size()) { return; } int a = c0629LEh.a(); c0629LEh.b(4L); Integer num = qIL.d.get(this.b.get(this.c)); if (num != null) { int length = bArr.length - 8; if (a == 1) { this.a.e(num.intValue(), c0629LEh.a(length, "UTF-8")); return; } if (a != 27) { if (a == 30) { int i = length / 4; int[] iArr = new int[i]; for (int i2 = 0; i2 < i; i2++) { iArr[i2] = c0629LEh.a(); } this.a.b(num.intValue(), iArr); return; } if (a != 13 && a != 14) { if (a == 22) { byte[] bArr2 = new byte[4]; c0629LEh.c(bArr2, 4 - length, length); this.a.d(num.intValue(), new C0629LEh(bArr2).a()); return; } else { if (a == 23) { T t = this.a; int intValue = num.intValue(); BrP.b(new Object[]{t, Integer.valueOf(intValue), Float.valueOf(Float.intBitsToFloat(c0629LEh.a()))}, 2042380448, -2042380448, intValue); return; } return; } } } this.a.c(num.intValue(), c0629LEh.a(length)); } } }