package defpackage;

/* renamed from: ᵭˋᵥ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4112 implements InterfaceC5190, InterfaceC3230 {

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

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

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

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

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

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

    public C4112(Object obj, InterfaceC5190 interfaceC5190) {
        this.f15360 = obj;
        this.f15361 = interfaceC5190;
    }

    @Override // defpackage.InterfaceC3230
    public final void clear() {
        synchronized (this.f15360) {
            try {
                this.f15357 = 3;
                this.f15359.clear();
                if (this.f15358 != 3) {
                    this.f15358 = 3;
                    this.f15362.clear();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* 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.f15360) {
            try {
                InterfaceC5190 interfaceC5190 = this.f15361;
                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.f15360) {
            try {
                z = true;
                if (this.f15357 != 1 && this.f15358 != 1) {
                    z = false;
                }
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ˇʼʤˎ */
    public final void mo6112() {
        synchronized (this.f15360) {
            try {
                if (this.f15357 == 1) {
                    this.f15357 = 2;
                    this.f15359.mo6112();
                }
                if (this.f15358 == 1) {
                    this.f15358 = 2;
                    this.f15362.mo6112();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final boolean mo9002(InterfaceC3230 interfaceC3230) {
        boolean z;
        int i;
        synchronized (this.f15360) {
            InterfaceC5190 interfaceC5190 = this.f15361;
            z = false;
            if (interfaceC5190 == null || interfaceC5190.mo9002(this)) {
                if (this.f15357 != 5 ? interfaceC3230.equals(this.f15359) : interfaceC3230.equals(this.f15362) && ((i = this.f15358) == 4 || i == 5)) {
                    z = true;
                }
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final boolean mo9003(InterfaceC3230 interfaceC3230) {
        boolean z;
        synchronized (this.f15360) {
            InterfaceC5190 interfaceC5190 = this.f15361;
            z = (interfaceC5190 == null || interfaceC5190.mo9003(this)) && interfaceC3230.equals(this.f15359);
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void mo9004(InterfaceC3230 interfaceC3230) {
        synchronized (this.f15360) {
            try {
                if (interfaceC3230.equals(this.f15362)) {
                    this.f15358 = 5;
                    InterfaceC5190 interfaceC5190 = this.f15361;
                    if (interfaceC5190 != null) {
                        interfaceC5190.mo9004(this);
                    }
                    return;
                }
                this.f15357 = 5;
                if (this.f15358 != 1) {
                    this.f15358 = 1;
                    this.f15362.mo6120();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵝᵵᵺ */
    public final boolean mo6117() {
        boolean z;
        synchronized (this.f15360) {
            try {
                z = this.f15357 == 3 && this.f15358 == 3;
            } finally {
            }
        }
        return z;
    }

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

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵴᵳ */
    public final boolean mo6119(InterfaceC3230 interfaceC3230) {
        if (interfaceC3230 instanceof C4112) {
            C4112 c4112 = (C4112) interfaceC3230;
            if (this.f15359.mo6119(c4112.f15359) && this.f15362.mo6119(c4112.f15362)) {
                return true;
            }
        }
        return false;
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵶᵷᵕ */
    public final void mo6120() {
        synchronized (this.f15360) {
            try {
                if (this.f15357 != 1) {
                    this.f15357 = 1;
                    this.f15359.mo6120();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // defpackage.InterfaceC3230
    /* renamed from: ᵸˑ */
    public final boolean mo6121() {
        boolean z;
        synchronized (this.f15360) {
            try {
                z = this.f15357 == 4 || this.f15358 == 4;
            } finally {
            }
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final boolean mo9005(InterfaceC3230 interfaceC3230) {
        boolean z;
        synchronized (this.f15360) {
            InterfaceC5190 interfaceC5190 = this.f15361;
            z = interfaceC5190 == null || interfaceC5190.mo9005(this);
        }
        return z;
    }

    @Override // defpackage.InterfaceC5190
    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final void mo9006(InterfaceC3230 interfaceC3230) {
        synchronized (this.f15360) {
            try {
                if (interfaceC3230.equals(this.f15359)) {
                    this.f15357 = 4;
                } else if (interfaceC3230.equals(this.f15362)) {
                    this.f15358 = 4;
                }
                InterfaceC5190 interfaceC5190 = this.f15361;
                if (interfaceC5190 != null) {
                    interfaceC5190.mo9006(this);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }
}
