package f3;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

/* JADX INFO: loaded from: classes.dex */
public final class a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final sd.a f25935a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final AtomicInteger f25936b = new AtomicInteger(0);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final AtomicBoolean f25937c = new AtomicBoolean(false);

    public a(sd.a aVar) {
        this.f25935a = aVar;
    }

    public final boolean a() {
        synchronized (this) {
            if (this.f25937c.get()) {
                return false;
            }
            this.f25936b.incrementAndGet();
            return true;
        }
    }

    public final void b() {
        synchronized (this) {
            this.f25936b.decrementAndGet();
            if (this.f25936b.get() < 0) {
                throw new IllegalStateException("Unbalanced call to unblock() detected.".toString());
            }
        }
    }
}
