package V4;

import a5.AbstractC0988a;
import x4.C3249o;

/* JADX INFO: loaded from: classes3.dex */
public abstract class Y extends AbstractC0786y {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final /* synthetic */ int f8275e = 0;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f8276b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f8277c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public C3249o f8278d;

    public final void A(boolean z6) {
        this.f8276b = (z6 ? 4294967296L : 1L) + this.f8276b;
        if (z6) {
            return;
        }
        this.f8277c = true;
    }

    public abstract long B();

    public final boolean C() {
        C3249o c3249o = this.f8278d;
        if (c3249o == null) {
            return false;
        }
        M m6 = (M) (c3249o.isEmpty() ? null : c3249o.removeFirst());
        if (m6 == null) {
            return false;
        }
        m6.run();
        return true;
    }

    public void D(long j4, V v3) {
        F.l.I(j4, v3);
    }

    @Override // V4.AbstractC0786y
    public final AbstractC0786y i(int i6) {
        AbstractC0988a.a(1);
        return this;
    }

    public abstract void shutdown();

    public final void t(boolean z6) {
        long j4 = this.f8276b - (z6 ? 4294967296L : 1L);
        this.f8276b = j4;
        if (j4 <= 0 && this.f8277c) {
            shutdown();
        }
    }

    public final void y(M m6) {
        C3249o c3249o = this.f8278d;
        if (c3249o == null) {
            c3249o = new C3249o();
            this.f8278d = c3249o;
        }
        c3249o.addLast(m6);
    }

    public abstract Thread z();
}
