package kotlinx.coroutines;

import tv.danmaku.ijk.media.player.IjkMediaMeta;

/* JADX INFO: loaded from: classes.dex */
public abstract class q0 extends t {

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public kotlin.collections.h f29527e;

    @Override // kotlinx.coroutines.t
    public final t N(int i10) {
        y.e(1);
        return this;
    }

    public final void O(boolean z10) {
        long j10 = this.f29525c - (z10 ? IjkMediaMeta.AV_CH_WIDE_RIGHT : 1L);
        this.f29525c = j10;
        if (j10 <= 0 && this.f29526d) {
            shutdown();
        }
    }

    public abstract Thread P();

    public final void Q(boolean z10) {
        this.f29525c = (z10 ? IjkMediaMeta.AV_CH_WIDE_RIGHT : 1L) + this.f29525c;
        if (z10) {
            return;
        }
        this.f29526d = true;
    }

    public abstract long R();

    public final boolean S() {
        kotlin.collections.h hVar = this.f29527e;
        if (hVar == null) {
            return false;
        }
        f0 f0Var = (f0) (hVar.isEmpty() ? null : hVar.removeFirst());
        if (f0Var == null) {
            return false;
        }
        f0Var.run();
        return true;
    }

    public void T(long j10, n0 n0Var) {
        z.f29593j.X(j10, n0Var);
    }

    public abstract void shutdown();
}
