package F1;

import androidx.core.location.LocationRequestCompat;

/* JADX INFO: renamed from: F1.a0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC0110a0 extends E {

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private long f599g;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    private boolean f600r;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    private kotlinx.coroutines.internal.a f601x;

    private final long A(boolean z2) {
        return z2 ? 4294967296L : 1L;
    }

    public static /* synthetic */ void G(AbstractC0110a0 abstractC0110a0, boolean z2, int i2, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: incrementUseCount");
        }
        if ((i2 & 1) != 0) {
            z2 = false;
        }
        abstractC0110a0.F(z2);
    }

    public static /* synthetic */ void z(AbstractC0110a0 abstractC0110a0, boolean z2, int i2, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: decrementUseCount");
        }
        if ((i2 & 1) != 0) {
            z2 = false;
        }
        abstractC0110a0.w(z2);
    }

    public final void C(U u2) {
        kotlinx.coroutines.internal.a aVar = this.f601x;
        if (aVar == null) {
            aVar = new kotlinx.coroutines.internal.a();
            this.f601x = aVar;
        }
        aVar.a(u2);
    }

    protected long D() {
        kotlinx.coroutines.internal.a aVar = this.f601x;
        if (aVar == null || aVar.c()) {
            return LocationRequestCompat.PASSIVE_INTERVAL;
        }
        return 0L;
    }

    public final void F(boolean z2) {
        this.f599g += A(z2);
        if (z2) {
            return;
        }
        this.f600r = true;
    }

    public final boolean H() {
        return this.f599g >= A(true);
    }

    public final boolean I() {
        kotlinx.coroutines.internal.a aVar = this.f601x;
        if (aVar == null) {
            return true;
        }
        return aVar.c();
    }

    public abstract long K();

    public final boolean L() {
        U u2;
        kotlinx.coroutines.internal.a aVar = this.f601x;
        if (aVar == null || (u2 = (U) aVar.d()) == null) {
            return false;
        }
        u2.run();
        return true;
    }

    public boolean N() {
        return false;
    }

    protected abstract void O();

    public final void w(boolean z2) {
        long jA = this.f599g - A(z2);
        this.f599g = jA;
        if (jA <= 0 && this.f600r) {
            O();
        }
    }
}
