package com.google.android.gms.measurement.internal; import androidx.annotation.NonNull; import androidx.collection.ArrayMap; import com.google.android.gms.internal.measurement.zzfn; import com.google.android.gms.internal.measurement.zznz; import java.util.ArrayList; import java.util.BitSet; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; /* loaded from: classes3.dex */ final class zzu { private String zza; private boolean zzb; private zzfn.zzl zzc; private BitSet zzd; private BitSet zze; private Map zzf; private Map> zzg; private final /* synthetic */ zzs zzh; /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r0v0, types: [com.google.android.gms.internal.measurement.zzfn$zzc$zza, com.google.android.gms.internal.measurement.zzjk$zza] */ /* JADX WARN: Type inference failed for: r1v10, types: [java.util.List] */ /* JADX WARN: Type inference failed for: r1v8, types: [java.util.ArrayList] */ /* JADX WARN: Type inference failed for: r1v9, types: [java.lang.Iterable] */ /* JADX WARN: Type inference failed for: r7v5, types: [com.google.android.gms.internal.measurement.zzfn$zzl$zza] */ @NonNull public final zzfn.zzc zza(int i) { ArrayList arrayList; ?? arrayList2; ?? zzb = zzfn.zzc.zzb(); zzb.zza(i); zzb.zza(this.zzb); zzfn.zzl zzlVar = this.zzc; if (zzlVar != null) { zzb.zza(zzlVar); } ?? zzd = zzfn.zzl.zze().zzb(zznp.zza(this.zzd)).zzd(zznp.zza(this.zze)); if (this.zzf == null) { arrayList = null; } else { arrayList = new ArrayList(this.zzf.size()); Iterator it = this.zzf.keySet().iterator(); while (it.hasNext()) { int intValue = it.next().intValue(); Long l = this.zzf.get(Integer.valueOf(intValue)); if (l != null) { arrayList.add((zzfn.zzd) ((com.google.android.gms.internal.measurement.zzjk) zzfn.zzd.zzc().zza(intValue).zza(l.longValue()).zzag())); } } } if (arrayList != null) { zzd.zza(arrayList); } if (this.zzg == null) { arrayList2 = Collections.emptyList(); } else { arrayList2 = new ArrayList(this.zzg.size()); for (Integer num : this.zzg.keySet()) { zzfn.zzm.zza zza = zzfn.zzm.zzc().zza(num.intValue()); List list = this.zzg.get(num); if (list != null) { Collections.sort(list); zza.zza(list); } arrayList2.add((zzfn.zzm) ((com.google.android.gms.internal.measurement.zzjk) zza.zzag())); } } zzd.zzc(arrayList2); zzb.zza(zzd); return (zzfn.zzc) ((com.google.android.gms.internal.measurement.zzjk) zzb.zzag()); } private zzu(zzs zzsVar, String str) { this.zzh = zzsVar; this.zza = str; this.zzb = true; this.zzd = new BitSet(); this.zze = new BitSet(); this.zzf = new ArrayMap(); this.zzg = new ArrayMap(); } private zzu(zzs zzsVar, String str, zzfn.zzl zzlVar, BitSet bitSet, BitSet bitSet2, Map map, Map map2) { this.zzh = zzsVar; this.zza = str; this.zzd = bitSet; this.zze = bitSet2; this.zzf = map; this.zzg = new ArrayMap(); if (map2 != null) { for (Integer num : map2.keySet()) { ArrayList arrayList = new ArrayList(); arrayList.add(map2.get(num)); this.zzg.put(num, arrayList); } } this.zzb = false; this.zzc = zzlVar; } public final void zza(@NonNull zzab zzabVar) { int zza = zzabVar.zza(); Boolean bool = zzabVar.zzc; if (bool != null) { this.zze.set(zza, bool.booleanValue()); } Boolean bool2 = zzabVar.zzd; if (bool2 != null) { this.zzd.set(zza, bool2.booleanValue()); } if (zzabVar.zze != null) { Long l = this.zzf.get(Integer.valueOf(zza)); long longValue = zzabVar.zze.longValue() / 1000; if (l == null || longValue > l.longValue()) { this.zzf.put(Integer.valueOf(zza), Long.valueOf(longValue)); } } if (zzabVar.zzf != null) { List list = this.zzg.get(Integer.valueOf(zza)); if (list == null) { list = new ArrayList<>(); this.zzg.put(Integer.valueOf(zza), list); } if (zzabVar.zzc()) { list.clear(); } if (zznz.zza() && this.zzh.zze().zzf(this.zza, zzbh.zzbj) && zzabVar.zzb()) { list.clear(); } if (zznz.zza() && this.zzh.zze().zzf(this.zza, zzbh.zzbj)) { long longValue2 = zzabVar.zzf.longValue() / 1000; if (list.contains(Long.valueOf(longValue2))) { return; } list.add(Long.valueOf(longValue2)); return; } list.add(Long.valueOf(zzabVar.zzf.longValue() / 1000)); } } }