package p060t1;

import kotlinx.coroutines.internal.C1351a;

/* renamed from: t1.k0 */
/* loaded from: classes.dex */
public abstract class AbstractC1689k0 extends AbstractC1717u {

    /* renamed from: e */
    public long f3916e;

    /* renamed from: f */
    public boolean f3917f;

    /* renamed from: g */
    public C1351a<AbstractC1674f0<?>> f3918g;

    /* renamed from: s */
    public static /* synthetic */ void m566s(AbstractC1689k0 abstractC1689k0, boolean z, int i, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: incrementUseCount");
        }
        if ((i & 1) != 0) {
            z = false;
        }
        abstractC1689k0.m567r(z);
    }

    /* renamed from: n */
    public final void m570n(boolean z) {
        long m569o = this.f3916e - m569o(z);
        this.f3916e = m569o;
        if (m569o <= 0 && this.f3917f) {
            shutdown();
        }
    }

    /* renamed from: o */
    public final long m569o(boolean z) {
        return z ? 4294967296L : 1L;
    }

    /* renamed from: p */
    public final void m568p(AbstractC1674f0<?> abstractC1674f0) {
        C1351a<AbstractC1674f0<?>> c1351a = this.f3918g;
        if (c1351a == null) {
            c1351a = new C1351a<>();
            this.f3918g = c1351a;
        }
        c1351a.m1575a(abstractC1674f0);
    }

    /* renamed from: q */
    public long mo548q() {
        C1351a<AbstractC1674f0<?>> c1351a = this.f3918g;
        return (c1351a == null || c1351a.m1573c()) ? Long.MAX_VALUE : 0L;
    }

    /* renamed from: r */
    public final void m567r(boolean z) {
        this.f3916e += m569o(z);
        if (z) {
            return;
        }
        this.f3917f = true;
    }

    public void shutdown() {
    }

    /* renamed from: t */
    public final boolean m565t() {
        return this.f3916e >= m569o(true);
    }

    /* renamed from: u */
    public final boolean m564u() {
        C1351a<AbstractC1674f0<?>> c1351a = this.f3918g;
        if (c1351a == null) {
            return true;
        }
        return c1351a.m1573c();
    }

    /* renamed from: v */
    public final boolean m563v() {
        AbstractC1674f0<?> m1572d;
        C1351a<AbstractC1674f0<?>> c1351a = this.f3918g;
        if (c1351a == null || (m1572d = c1351a.m1572d()) == null) {
            return false;
        }
        m1572d.run();
        return true;
    }
}