package o;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.wM, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C2802wM {
    public static final /* synthetic */ AtomicReferenceFieldUpdater a = AtomicReferenceFieldUpdater.newUpdater(C2802wM.class, Object.class, "_cur$volatile");
    private volatile /* synthetic */ Object _cur$volatile = new C2992yM(8, false);

    public final boolean a(Runnable runnable) {
        while (true) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = a;
            C2992yM c2992yM = (C2992yM) atomicReferenceFieldUpdater.get(this);
            int iA = c2992yM.a(runnable);
            if (iA == 0) {
                return true;
            }
            if (iA == 1) {
                C2992yM c2992yMC = c2992yM.c();
                while (!atomicReferenceFieldUpdater.compareAndSet(this, c2992yM, c2992yMC) && atomicReferenceFieldUpdater.get(this) == c2992yM) {
                }
            } else if (iA == 2) {
                return false;
            }
        }
    }

    public final void b() {
        while (true) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = a;
            C2992yM c2992yM = (C2992yM) atomicReferenceFieldUpdater.get(this);
            if (c2992yM.b()) {
                return;
            }
            C2992yM c2992yMC = c2992yM.c();
            while (!atomicReferenceFieldUpdater.compareAndSet(this, c2992yM, c2992yMC) && atomicReferenceFieldUpdater.get(this) == c2992yM) {
            }
        }
    }

    public final int c() {
        C2992yM c2992yM = (C2992yM) a.get(this);
        c2992yM.getClass();
        long j = C2992yM.f.get(c2992yM);
        return (((int) ((j & 1152921503533105152L) >> 30)) - ((int) (1073741823 & j))) & 1073741823;
    }

    public final Object d() {
        while (true) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = a;
            C2992yM c2992yM = (C2992yM) atomicReferenceFieldUpdater.get(this);
            Object objD = c2992yM.d();
            if (objD != C2992yM.g) {
                return objD;
            }
            C2992yM c2992yMC = c2992yM.c();
            while (!atomicReferenceFieldUpdater.compareAndSet(this, c2992yM, c2992yMC) && atomicReferenceFieldUpdater.get(this) == c2992yM) {
            }
        }
    }
}
