package nn;

import java.lang.ref.SoftReference;

/* loaded from: classes3.dex */
final class f extends a {

    /* renamed from: a, reason: collision with root package name */
    private volatile g f30176a;

    public f(dn.l compute) {
        kotlin.jvm.internal.t.g(compute, "compute");
        this.f30176a = new g(compute);
    }

    @Override // nn.a
    public Object a(Class key) {
        Object obj;
        Object obj2;
        kotlin.jvm.internal.t.g(key, "key");
        g gVar = this.f30176a;
        obj = gVar.get(key);
        Object obj3 = ((SoftReference) obj).get();
        if (obj3 != null) {
            return obj3;
        }
        gVar.remove(key);
        obj2 = gVar.get(key);
        Object obj4 = ((SoftReference) obj2).get();
        return obj4 != null ? obj4 : gVar.f30183a.invoke(key);
    }
}
