package o; import com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException; import java.io.IOException; import java.util.Iterator; import java.util.Map; import o.C15775iXO; import o.LsH; import o.QWH; import o.qAt; /* renamed from: o.qQN, reason: case insensitive filesystem */ /* loaded from: classes2.dex */ final class C16692qQN implements CSi { private final boolean a; private final vAr c; private final YlB d; private final yvZ e; /* JADX INFO: Access modifiers changed from: package-private */ public C16692qQN(YlB ylB, yvZ yvz, vAr var) { this.d = ylB; this.a = yvz.b(var); this.e = yvz; this.c = var; } @Override // o.CSi public final T b() { return (T) this.c.m().f(); } @Override // o.CSi public final boolean e(T t, T t2) { if (!this.d.b(t).equals(this.d.b(t2))) { return false; } if (this.a) { return this.e.c(t).equals(this.e.c(t2)); } return true; } @Override // o.CSi public final int b(T t) { int hashCode = this.d.b(t).hashCode(); return this.a ? (hashCode * 53) + this.e.c(t).hashCode() : hashCode; } @Override // o.CSi public final void c(T t, T t2) { C12871fJo.d(this.d, t, t2); if (this.a) { C12871fJo.b(this.e, t, t2); } } @Override // o.CSi public final void b(T t, MLB mlb) throws IOException { Iterator> c = this.e.c(t).c(); while (c.hasNext()) { Map.Entry next = c.next(); QWH.IeS ieS = (QWH.IeS) next.getKey(); if (ieS.c() != C15775iXO.IeS.MESSAGE || ieS.b() || ieS.d()) { throw new IllegalStateException("Found invalid MessageSet item."); } if (next instanceof LsH.HBt) { mlb.e(ieS.e(), ((LsH.HBt) next).a.getValue().b()); } else { mlb.e(ieS.e(), next.getValue()); } } YlB ylB = this.d; ylB.e(ylB.b(t), mlb); } /* JADX WARN: Code restructure failed: missing block: B:36:0x00b9, code lost: if (r2 == null) goto L48; */ /* JADX WARN: Code restructure failed: missing block: B:37:0x00bb, code lost: r1.c(o.C15775iXO.b(r12, 2), r2); */ /* JADX WARN: Code restructure failed: missing block: B:38:0x00c2, code lost: r12 = r4; */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Removed duplicated region for block: B:32:0x00b3 */ /* JADX WARN: Removed duplicated region for block: B:34:0x00b8 A[SYNTHETIC] */ @Override // o.CSi /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void e(T r10, byte[] r11, int r12, int r13, o.dJF.Sts r14) throws java.io.IOException { /* r9 = this; r0 = r10 o.ndh r0 = (o.AbstractC16345ndh) r0 o.pTc r1 = r0.unknownFields o.pTc r2 = o.pTc.e() if (r1 != r2) goto L11 o.pTc r1 = o.pTc.b() r0.unknownFields = r1 L11: o.ndh$Sts r10 = (o.AbstractC16345ndh.Sts) r10 r10.b() r10 = 0 r0 = r10 L18: if (r12 >= r13) goto Lc5 int r2 = r12 + 1 r12 = r11[r12] if (r12 < 0) goto L24 r14.c = r12 r4 = r2 goto L29 L24: int r12 = o.dJF.b(r12, r11, r2, r14) r4 = r12 L29: int r2 = r14.c int r12 = o.C15775iXO.d r3 = 2 if (r2 == r12) goto L5d int r12 = o.C15775iXO.e(r2) if (r12 != r3) goto L58 o.yvZ r12 = r9.e o.aEp r0 = r14.a o.vAr r3 = r9.c int r5 = o.C15775iXO.d(r2) java.lang.Object r12 = r12.c(r0, r3, r5) r0 = r12 o.ndh$RVV r0 = (o.AbstractC16345ndh.RVV) r0 if (r0 != 0) goto L52 r3 = r11 r5 = r13 r6 = r1 r7 = r14 int r12 = o.dJF.d(r2, r3, r4, r5, r6, r7) goto L18 L52: o.mNa.a() o.vAr r11 = r0.a throw r10 L58: int r12 = o.dJF.b(r2, r11, r4, r13, r14) goto L18 L5d: r12 = 0 r2 = r10 L5f: if (r4 >= r13) goto Lb9 int r5 = r4 + 1 r4 = r11[r4] if (r4 < 0) goto L6a r14.c = r4 goto L6e L6a: int r5 = o.dJF.b(r4, r11, r5, r14) L6e: int r4 = r14.c int r6 = o.C15775iXO.d(r4) int r7 = o.C15775iXO.e(r4) if (r6 == r3) goto L90 r8 = 3 if (r6 != r8) goto Laf if (r0 != 0) goto L8a if (r7 != r3) goto Laf int r4 = o.dJF.c(r11, r5, r14) java.lang.Object r2 = r14.b o.jra r2 = (o.jra) r2 goto L5f L8a: o.mNa.a() o.vAr r11 = r0.a throw r10 L90: if (r7 != 0) goto Laf int r12 = r5 + 1 r0 = r11[r5] if (r0 < 0) goto L9b r14.c = r0 goto L9f L9b: int r12 = o.dJF.b(r0, r11, r12, r14) L9f: r4 = r12 int r12 = r14.c o.yvZ r0 = r9.e o.aEp r5 = r14.a o.vAr r6 = r9.c java.lang.Object r0 = r0.c(r5, r6, r12) o.ndh$RVV r0 = (o.AbstractC16345ndh.RVV) r0 goto L5f Laf: int r6 = o.C15775iXO.b if (r4 == r6) goto Lb8 int r4 = o.dJF.b(r4, r11, r5, r13, r14) goto L5f Lb8: r4 = r5 Lb9: if (r2 == 0) goto Lc2 int r12 = o.C15775iXO.b(r12, r3) r1.c(r12, r2) Lc2: r12 = r4 goto L18 Lc5: if (r12 != r13) goto Lc8 return Lc8: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException r10 = com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException.f() throw r10 */ throw new UnsupportedOperationException("Method not decompiled: o.C16692qQN.e(java.lang.Object, byte[], int, int, o.dJF$Sts):void"); } @Override // o.CSi public final void c(T t) { this.d.c(t); this.e.a(t); } @Override // o.CSi public final boolean d(T t) { return this.e.c(t).e(); } @Override // o.CSi public final int a(T t) { Iterable entrySet; YlB ylB = this.d; int a = ylB.a(ylB.b(t)); if (!this.a) { return a; } QWH c = this.e.c(t); int i = 0; for (int i2 = 0; i2 < c.d.c.size(); i2++) { i += QWH.d(c.d.c.get(i2)); } qAt qat = c.d; if (qat.a.isEmpty()) { entrySet = qAt.HBt.c(); } else { entrySet = qat.a.entrySet(); } Iterator it = entrySet.iterator(); while (it.hasNext()) { i += QWH.d((Map.Entry) it.next()); } return a + i; } @Override // o.CSi public final void c(T t, InterfaceC16982srS interfaceC16982srS, C1458aEp c1458aEp) throws IOException { boolean s; YlB ylB = this.d; yvZ yvz = this.e; Object e = ylB.e(t); yvz.d(t); while (interfaceC16982srS.b() != Integer.MAX_VALUE) { try { int a = interfaceC16982srS.a(); if (a != C15775iXO.d) { if (C15775iXO.e(a) == 2) { Object c = yvz.c(c1458aEp, this.c, C15775iXO.d(a)); if (c != null) { yvz.e(c); } else { s = ylB.b(e, interfaceC16982srS); } } else { s = interfaceC16982srS.s(); } if (!s) { return; } } else { Object obj = null; int i = 0; jra jraVar = null; while (interfaceC16982srS.b() != Integer.MAX_VALUE) { int a2 = interfaceC16982srS.a(); if (a2 == C15775iXO.e) { i = interfaceC16982srS.p(); obj = yvz.c(c1458aEp, this.c, i); } else if (a2 == C15775iXO.c) { if (obj != null) { yvz.e(obj); } else { jraVar = interfaceC16982srS.d(); } } else if (!interfaceC16982srS.s()) { break; } } if (interfaceC16982srS.a() != C15775iXO.b) { throw InvalidProtocolBufferException.e(); } if (jraVar != null) { if (obj != null) { yvz.g(obj); } else { ylB.a((YlB) e, i, jraVar); } } } } finally { ylB.c((Object) t, (T) e); } } } }