package zp;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* loaded from: classes3.dex */
public class t {

    /* renamed from: a, reason: collision with root package name */
    private static final AtomicReferenceFieldUpdater f53589a = AtomicReferenceFieldUpdater.newUpdater(t.class, Object.class, "_cur");
    private volatile Object _cur;

    public t(boolean z10) {
        this._cur = new u(8, z10);
    }

    public final boolean a(Object obj) {
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = f53589a;
        while (true) {
            u uVar = (u) atomicReferenceFieldUpdater.get(this);
            int a10 = uVar.a(obj);
            if (a10 == 0) {
                return true;
            }
            if (a10 == 1) {
                androidx.concurrent.futures.b.a(f53589a, this, uVar, uVar.i());
            } else if (a10 == 2) {
                return false;
            }
        }
    }

    public final void b() {
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = f53589a;
        while (true) {
            u uVar = (u) atomicReferenceFieldUpdater.get(this);
            if (uVar.d()) {
                return;
            } else {
                androidx.concurrent.futures.b.a(f53589a, this, uVar, uVar.i());
            }
        }
    }

    public final int c() {
        return ((u) f53589a.get(this)).f();
    }

    public final Object d() {
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = f53589a;
        while (true) {
            u uVar = (u) atomicReferenceFieldUpdater.get(this);
            Object j10 = uVar.j();
            if (j10 != u.f53593h) {
                return j10;
            }
            androidx.concurrent.futures.b.a(f53589a, this, uVar, uVar.i());
        }
    }
}
