package com.google.android.gms.internal.firebase_ml; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.util.List; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; /* loaded from: classes2.dex */ final class zzlz { private final ConcurrentHashMap> zzads = new ConcurrentHashMap<>(16, 0.75f, 10); private final ReferenceQueue zzadt = new ReferenceQueue<>(); public final List zza(Throwable th, boolean z) { Reference poll = this.zzadt.poll(); while (poll != null) { this.zzads.remove(poll); poll = this.zzadt.poll(); } List list = this.zzads.get(new zzma(th, null)); if (!z || list != null) { return list; } Vector vector = new Vector(2); List putIfAbsent = this.zzads.putIfAbsent(new zzma(th, this.zzadt), vector); return putIfAbsent == null ? vector : putIfAbsent; } }