package com.google.android.gms.internal.measurement; import java.io.IOException; /* loaded from: classes.dex */ public final class zzfn extends zzyc { public Integer c = null; public String d = null; public Boolean e = null; public String[] f = zzyl.c; public zzfn() { this.b = null; this.a = -1; } private final zzfn b(zzxz zzxzVar) throws IOException { while (true) { int c = zzxzVar.c(); if (c == 0) { return this; } if (c == 8) { int a = zzxzVar.a(); try { int e = zzxzVar.e(); if (e < 0 || e > 6) { StringBuilder sb = new StringBuilder(41); sb.append(e); sb.append(" is not a valid enum MatchType"); throw new IllegalArgumentException(sb.toString()); } this.c = Integer.valueOf(e); } catch (IllegalArgumentException unused) { zzxzVar.e(a); a(zzxzVar, c); } } else if (c == 18) { this.d = zzxzVar.b(); } else if (c == 24) { this.e = Boolean.valueOf(zzxzVar.d()); } else if (c == 34) { int a2 = zzyl.a(zzxzVar, 34); String[] strArr = this.f; int length = strArr == null ? 0 : strArr.length; String[] strArr2 = new String[a2 + length]; if (length != 0) { System.arraycopy(this.f, 0, strArr2, 0, length); } while (length < strArr2.length - 1) { strArr2[length] = zzxzVar.b(); zzxzVar.c(); length++; } strArr2[length] = zzxzVar.b(); this.f = strArr2; } else if (!super.a(zzxzVar, c)) { return this; } } } @Override // com.google.android.gms.internal.measurement.zzyc, com.google.android.gms.internal.measurement.zzyi public final void a(zzya zzyaVar) throws IOException { Integer num = this.c; if (num != null) { zzyaVar.b(1, num.intValue()); } String str = this.d; if (str != null) { zzyaVar.a(2, str); } Boolean bool = this.e; if (bool != null) { zzyaVar.a(3, bool.booleanValue()); } String[] strArr = this.f; if (strArr != null && strArr.length > 0) { int i = 0; while (true) { String[] strArr2 = this.f; if (i >= strArr2.length) { break; } String str2 = strArr2[i]; if (str2 != null) { zzyaVar.a(4, str2); } i++; } } super.a(zzyaVar); } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof zzfn)) { return false; } zzfn zzfnVar = (zzfn) obj; Integer num = this.c; if (num == null) { if (zzfnVar.c != null) { return false; } } else if (!num.equals(zzfnVar.c)) { return false; } String str = this.d; if (str == null) { if (zzfnVar.d != null) { return false; } } else if (!str.equals(zzfnVar.d)) { return false; } Boolean bool = this.e; if (bool == null) { if (zzfnVar.e != null) { return false; } } else if (!bool.equals(zzfnVar.e)) { return false; } if (!zzyg.a(this.f, zzfnVar.f)) { return false; } zzye zzyeVar = this.b; if (zzyeVar != null && !zzyeVar.a()) { return this.b.equals(zzfnVar.b); } zzye zzyeVar2 = zzfnVar.b; return zzyeVar2 == null || zzyeVar2.a(); } public final int hashCode() { int hashCode = (zzfn.class.getName().hashCode() + 527) * 31; Integer num = this.c; int i = 0; int intValue = (hashCode + (num == null ? 0 : num.intValue())) * 31; String str = this.d; int hashCode2 = (intValue + (str == null ? 0 : str.hashCode())) * 31; Boolean bool = this.e; int hashCode3 = (((hashCode2 + (bool == null ? 0 : bool.hashCode())) * 31) + zzyg.a(this.f)) * 31; zzye zzyeVar = this.b; if (zzyeVar != null && !zzyeVar.a()) { i = this.b.hashCode(); } return hashCode3 + i; } @Override // com.google.android.gms.internal.measurement.zzyc, com.google.android.gms.internal.measurement.zzyi protected final int a() { int a = super.a(); Integer num = this.c; if (num != null) { a += zzya.c(1, num.intValue()); } String str = this.d; if (str != null) { a += zzya.b(2, str); } Boolean bool = this.e; if (bool != null) { bool.booleanValue(); a += zzya.b(3) + 1; } String[] strArr = this.f; if (strArr == null || strArr.length <= 0) { return a; } int i = 0; int i2 = 0; int i3 = 0; while (true) { String[] strArr2 = this.f; if (i >= strArr2.length) { return a + i2 + (i3 * 1); } String str2 = strArr2[i]; if (str2 != null) { i3++; i2 += zzya.a(str2); } i++; } } @Override // com.google.android.gms.internal.measurement.zzyi public final /* synthetic */ zzyi a(zzxz zzxzVar) throws IOException { b(zzxzVar); return this; } }