package defpackage;

/* renamed from: ᵵʿˉʿ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4705 implements InterfaceC5190, InterfaceC3230 {

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public boolean f17382;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public volatile C2359 f17384;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final InterfaceC5190 f17385;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final Object f17386;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public volatile InterfaceC3230 f17387;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int f17381 = 3;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public int f17383 = 3;

    public C4705(Object obj, InterfaceC5190 interfaceC5190) {
        this.f17386 = obj;
        this.f17385 = interfaceC5190;
    }

    @Override // defpackage.InterfaceC3230
    public final void clear() {
        synchronized (this.f17386) {
            this.f17382 = false;
            this.f17381 = 3;
            this.f17383 = 3;
            this.f17387.clear();
            this.f17384.clear();
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r2v2, types: [ᵻˎˏ] */
    /* JADX WARN: Type inference failed for: r2v4 */
    /* JADX WARN: Type inference failed for: r2v5 */
    @Override // defpackage.InterfaceC5190
    public final InterfaceC5190 getRoot() {
        ?? root;
        synchronized (this.f17386) {
            try {
                InterfaceC5190 interfaceC5190 = this.f17385;
                this = this;
                if (interfaceC5190 != null) {
                    root = interfaceC5190.getRoot();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
        return root;
    }

    @Override // defpackage.InterfaceC3230
    public final boolean isRunning() {
        boolean z;
        synchronized (this.f17386) {
            z = true;
            if (this.f17381 != 1) {
                z = false;
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ˇʼʤˎ */
    public final void mo6112() {
        synchronized (this.f17386) {
            try {
                if (!AbstractC2990.m7326(this.f17383)) {
                    this.f17383 = 2;
                    this.f17387.mo6112();
                }
                if (!AbstractC2990.m7326(this.f17381)) {
                    this.f17381 = 2;
                    this.f17384.mo6112();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˎˏʜʾ */
    public final boolean mo9002(InterfaceC3230 interfaceC3230) {
        boolean z;
        synchronized (this.f17386) {
            try {
                InterfaceC5190 interfaceC5190 = this.f17385;
                z = (interfaceC5190 == null || interfaceC5190.mo9002(this)) && interfaceC3230.equals(this.f17384) && !mo6118();
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˏˋٴ */
    public final boolean mo9003(InterfaceC3230 interfaceC3230) {
        boolean z;
        synchronized (this.f17386) {
            try {
                InterfaceC5190 interfaceC5190 = this.f17385;
                z = (interfaceC5190 == null || interfaceC5190.mo9003(this)) && interfaceC3230.equals(this.f17384) && this.f17381 != 2;
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˏᵙ */
    public final void mo9004(InterfaceC3230 interfaceC3230) {
        synchronized (this.f17386) {
            try {
                if (!interfaceC3230.equals(this.f17384)) {
                    this.f17383 = 5;
                    return;
                }
                this.f17381 = 5;
                InterfaceC5190 interfaceC5190 = this.f17385;
                if (interfaceC5190 != null) {
                    interfaceC5190.mo9004(this);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵝᵵᵺ */
    public final boolean mo6117() {
        boolean z;
        synchronized (this.f17386) {
            z = this.f17381 == 3;
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190, defpackage.InterfaceC3230
    /* renamed from: ᵥᵯˎ */
    public final boolean mo6118() {
        boolean z;
        synchronized (this.f17386) {
            try {
                z = this.f17387.mo6118() || this.f17384.mo6118();
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵴᵳ */
    public final boolean mo6119(InterfaceC3230 interfaceC3230) {
        if (!(interfaceC3230 instanceof C4705)) {
            return false;
        }
        C4705 c4705 = (C4705) interfaceC3230;
        if (this.f17384 == null) {
            if (c4705.f17384 != null) {
                return false;
            }
        } else if (!this.f17384.mo6119(c4705.f17384)) {
            return false;
        }
        return this.f17387 == null ? c4705.f17387 == null : this.f17387.mo6119(c4705.f17387);
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵶᵷᵕ */
    public final void mo6120() {
        synchronized (this.f17386) {
            try {
                this.f17382 = true;
                try {
                    if (this.f17381 != 4 && this.f17383 != 1) {
                        this.f17383 = 1;
                        this.f17387.mo6120();
                    }
                    if (this.f17382 && this.f17381 != 1) {
                        this.f17381 = 1;
                        this.f17384.mo6120();
                    }
                    this.f17382 = false;
                } catch (Throwable th) {
                    this.f17382 = false;
                    throw th;
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵸˑ */
    public final boolean mo6121() {
        boolean z;
        synchronized (this.f17386) {
            z = this.f17381 == 4;
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ᵹᵝᵶ */
    public final boolean mo9005(InterfaceC3230 interfaceC3230) {
        boolean z;
        synchronized (this.f17386) {
            try {
                InterfaceC5190 interfaceC5190 = this.f17385;
                z = (interfaceC5190 == null || interfaceC5190.mo9005(this)) && (interfaceC3230.equals(this.f17384) || this.f17381 != 4);
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo9006(InterfaceC3230 interfaceC3230) {
        synchronized (this.f17386) {
            try {
                if (interfaceC3230.equals(this.f17387)) {
                    this.f17383 = 4;
                    return;
                }
                this.f17381 = 4;
                InterfaceC5190 interfaceC5190 = this.f17385;
                if (interfaceC5190 != null) {
                    interfaceC5190.mo9006(this);
                }
                if (!AbstractC2990.m7326(this.f17383)) {
                    this.f17387.clear();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }
}
