package rm;

import java.io.Serializable;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* loaded from: classes3.dex */
final class z implements o, Serializable {

    /* renamed from: s, reason: collision with root package name */
    public static final a f34912s = new a(null);

    /* renamed from: t, reason: collision with root package name */
    private static final AtomicReferenceFieldUpdater f34913t = AtomicReferenceFieldUpdater.newUpdater(z.class, Object.class, "q");

    /* renamed from: p, reason: collision with root package name */
    private volatile dn.a f34914p;

    /* renamed from: q, reason: collision with root package name */
    private volatile Object f34915q;

    /* renamed from: r, reason: collision with root package name */
    private final Object f34916r;

    /* loaded from: classes3.dex */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }
    }

    public z(dn.a initializer) {
        kotlin.jvm.internal.t.g(initializer, "initializer");
        this.f34914p = initializer;
        j0 j0Var = j0.f34891a;
        this.f34915q = j0Var;
        this.f34916r = j0Var;
    }

    @Override // rm.o
    public Object getValue() {
        Object obj = this.f34915q;
        j0 j0Var = j0.f34891a;
        if (obj != j0Var) {
            return obj;
        }
        dn.a aVar = this.f34914p;
        if (aVar != null) {
            Object invoke = aVar.invoke();
            if (androidx.concurrent.futures.b.a(f34913t, this, j0Var, invoke)) {
                this.f34914p = null;
                return invoke;
            }
        }
        return this.f34915q;
    }

    @Override // rm.o
    public boolean isInitialized() {
        return this.f34915q != j0.f34891a;
    }

    public String toString() {
        return isInitialized() ? String.valueOf(getValue()) : "Lazy value not initialized yet.";
    }
}
