package androidx.lifecycle;

import d3.V0;

/* JADX INFO: renamed from: androidx.lifecycle.z, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0520z {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final V0 f8858a;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f8860c = -1;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ A f8861d;

    public C0520z(A a3, V0 v02) {
        this.f8861d = a3;
        this.f8858a = v02;
    }

    public final void a(boolean z8) {
        if (z8 == this.f8859b) {
            return;
        }
        this.f8859b = z8;
        int i = z8 ? 1 : -1;
        A a3 = this.f8861d;
        int i5 = a3.f8749c;
        a3.f8749c = i + i5;
        if (!a3.f8750d) {
            a3.f8750d = true;
            while (true) {
                try {
                    int i8 = a3.f8749c;
                    if (i5 == i8) {
                        break;
                    } else {
                        i5 = i8;
                    }
                } finally {
                    a3.f8750d = false;
                }
            }
        }
        if (this.f8859b) {
            a3.c(this);
        }
    }
}
