package o;

import java.lang.reflect.InvocationTargetException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Qw, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC0437Qw extends AbstractC2842wn {
    public long m;
    public boolean n;

    /* renamed from: o, reason: collision with root package name */
    public C1172f9 f305o;

    public final void X(boolean z) {
        long j = this.m - (z ? 4294967296L : 1L);
        this.m = j;
        if (j <= 0 && this.n) {
            shutdown();
        }
    }

    public final void Y(AbstractC1618js abstractC1618js) {
        C1172f9 c1172f9 = this.f305o;
        if (c1172f9 == null) {
            c1172f9 = new C1172f9();
            this.f305o = c1172f9;
        }
        c1172f9.addLast(abstractC1618js);
    }

    public abstract Thread Z();

    public final void a0(boolean z) {
        this.m = (z ? 4294967296L : 1L) + this.m;
        if (z) {
            return;
        }
        this.n = true;
    }

    public abstract long b0();

    public final boolean c0() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        C1172f9 c1172f9 = this.f305o;
        if (c1172f9 == null) {
            return false;
        }
        AbstractC1618js abstractC1618js = (AbstractC1618js) (c1172f9.isEmpty() ? null : c1172f9.removeFirst());
        if (abstractC1618js == null) {
            return false;
        }
        abstractC1618js.run();
        return true;
    }

    public void d0(long j, AbstractRunnableC0359Nw abstractRunnableC0359Nw) {
        RunnableC0534Up.s.i0(j, abstractRunnableC0359Nw);
    }

    public abstract void shutdown();
}
