package com.google.android.gms.internal.measurement; import java.util.ArrayList; import java.util.Collections; import java.util.List; /* loaded from: classes.dex */ final class zzko extends zzkq { private static final Class zza = Collections.unmodifiableList(Collections.emptyList()).getClass(); private zzko() { super(null); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // com.google.android.gms.internal.measurement.zzkq public final void zza(Object obj, long j) { Object unmodifiableList; List list = (List) zzml.zzf(obj, j); if (list instanceof zzkm) { unmodifiableList = ((zzkm) list).zze(); } else { if (zza.isAssignableFrom(list.getClass())) { return; } if (!(list instanceof zzlj) || !(list instanceof zzke)) { unmodifiableList = Collections.unmodifiableList(list); } else { zzke zzkeVar = (zzke) list; if (zzkeVar.zzc()) { zzkeVar.zzb(); return; } return; } } zzml.zzs(obj, j, unmodifiableList); } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: Multi-variable type inference failed */ @Override // com.google.android.gms.internal.measurement.zzkq public final void zzb(Object obj, Object obj2, long j) { zzkl zzklVar; List list = (List) zzml.zzf(obj2, j); int size = list.size(); List list2 = (List) zzml.zzf(obj, j); if (list2.isEmpty()) { if (list2 instanceof zzkm) { list2 = new zzkl(size); } else if (!(list2 instanceof zzlj) || !(list2 instanceof zzke)) { list2 = new ArrayList(size); } else { list2 = ((zzke) list2).zzd(size); } zzml.zzs(obj, j, list2); } else { if (zza.isAssignableFrom(list2.getClass())) { ArrayList arrayList = new ArrayList(list2.size() + size); arrayList.addAll(list2); zzml.zzs(obj, j, arrayList); zzklVar = arrayList; } else if (list2 instanceof zzmg) { zzkl zzklVar2 = new zzkl(list2.size() + size); zzklVar2.addAll(zzklVar2.size(), (zzmg) list2); zzml.zzs(obj, j, zzklVar2); zzklVar = zzklVar2; } else if ((list2 instanceof zzlj) && (list2 instanceof zzke)) { zzke zzkeVar = (zzke) list2; if (!zzkeVar.zzc()) { list2 = zzkeVar.zzd(list2.size() + size); zzml.zzs(obj, j, list2); } } list2 = zzklVar; } int size2 = list2.size(); int size3 = list.size(); if (size2 > 0 && size3 > 0) { list2.addAll(list); } if (size2 > 0) { list = list2; } zzml.zzs(obj, j, list); } /* JADX INFO: Access modifiers changed from: package-private */ public /* synthetic */ zzko(zzkn zzknVar) { super(null); } }