package kotlinx.coroutines.internal;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import p060t1.C1679h;

/* renamed from: kotlinx.coroutines.internal.m */
/* loaded from: classes.dex */
public class C1372m<E> {

    /* renamed from: a */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f3048a = AtomicReferenceFieldUpdater.newUpdater(C1372m.class, Object.class, "_cur");
    private volatile /* synthetic */ Object _cur;

    public C1372m(boolean z) {
        this._cur = new C1373n(8, z);
    }

    /* renamed from: a */
    public final boolean m1514a(E e) {
        while (true) {
            C1373n c1373n = (C1373n) this._cur;
            int m1510a = c1373n.m1510a(e);
            if (m1510a == 0) {
                return true;
            }
            if (m1510a == 1) {
                C1679h.m602a(f3048a, this, c1373n, c1373n.m1502i());
            } else if (m1510a == 2) {
                return false;
            }
        }
    }

    /* renamed from: b */
    public final void m1513b() {
        while (true) {
            C1373n c1373n = (C1373n) this._cur;
            if (c1373n.m1507d()) {
                return;
            }
            C1679h.m602a(f3048a, this, c1373n, c1373n.m1502i());
        }
    }

    /* renamed from: c */
    public final int m1512c() {
        return ((C1373n) this._cur).m1505f();
    }

    /* renamed from: d */
    public final E m1511d() {
        while (true) {
            C1373n c1373n = (C1373n) this._cur;
            E e = (E) c1373n.m1501j();
            if (e != C1373n.f3052h) {
                return e;
            }
            C1679h.m602a(f3048a, this, c1373n, c1373n.m1502i());
        }
    }
}