package o; import o.VZJ; /* loaded from: classes.dex */ public final class xEe implements VZJ, PXc { public volatile PXc b; private boolean c; public volatile PXc d; private final VZJ e; private final Object i; private VZJ.RVV a = VZJ.RVV.CLEARED; private VZJ.RVV g = VZJ.RVV.CLEARED; public xEe(Object obj, VZJ vzj) { this.i = obj; this.e = vzj; } /* JADX WARN: Code restructure failed: missing block: B:16:0x001a, code lost: if (r2.a != o.VZJ.RVV.SUCCESS) goto L15; */ @Override // o.VZJ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final boolean a(o.PXc r3) { /* r2 = this; java.lang.Object r0 = r2.i monitor-enter(r0) o.VZJ r1 = r2.e // Catch: java.lang.Throwable -> L22 if (r1 == 0) goto Le boolean r1 = r1.a(r2) // Catch: java.lang.Throwable -> L22 if (r1 != 0) goto Le goto L1d Le: o.PXc r1 = r2.d // Catch: java.lang.Throwable -> L22 boolean r3 = r3.equals(r1) // Catch: java.lang.Throwable -> L22 if (r3 != 0) goto L1f o.VZJ$RVV r3 = r2.a // Catch: java.lang.Throwable -> L22 o.VZJ$RVV r1 = o.VZJ.RVV.SUCCESS // Catch: java.lang.Throwable -> L22 if (r3 == r1) goto L1d goto L1f L1d: r3 = 0 goto L20 L1f: r3 = 1 L20: monitor-exit(r0) return r3 L22: r3 = move-exception monitor-exit(r0) throw r3 */ throw new UnsupportedOperationException("Method not decompiled: o.xEe.a(o.PXc):boolean"); } @Override // o.VZJ public final boolean c(PXc pXc) { boolean z; synchronized (this.i) { VZJ vzj = this.e; if ((vzj == null || vzj.c(this)) && pXc.equals(this.d)) { z = b() ? false : true; } } return z; } @Override // o.VZJ public final boolean e(PXc pXc) { boolean z; synchronized (this.i) { VZJ vzj = this.e; if ((vzj == null || vzj.e(this)) && pXc.equals(this.d)) { z = this.a != VZJ.RVV.PAUSED; } } return z; } @Override // o.VZJ, o.PXc public final boolean b() { boolean z; synchronized (this.i) { if (!this.b.b()) { z = this.d.b(); } } return z; } @Override // o.VZJ public final void h(PXc pXc) { synchronized (this.i) { if (pXc.equals(this.b)) { this.g = VZJ.RVV.SUCCESS; return; } this.a = VZJ.RVV.SUCCESS; VZJ vzj = this.e; if (vzj != null) { vzj.h(this); } if (!this.g.isComplete) { this.b.c(); } } } @Override // o.VZJ public final void d(PXc pXc) { synchronized (this.i) { if (!pXc.equals(this.d)) { this.g = VZJ.RVV.FAILED; return; } this.a = VZJ.RVV.FAILED; VZJ vzj = this.e; if (vzj != null) { vzj.d(this); } } } @Override // o.VZJ public final VZJ e() { VZJ e; synchronized (this.i) { VZJ vzj = this.e; e = vzj != null ? vzj.e() : this; } return e; } @Override // o.PXc public final void a() { synchronized (this.i) { this.c = true; try { if (this.a != VZJ.RVV.SUCCESS && this.g != VZJ.RVV.RUNNING) { this.g = VZJ.RVV.RUNNING; this.b.a(); } if (this.c && this.a != VZJ.RVV.RUNNING) { this.a = VZJ.RVV.RUNNING; this.d.a(); } } finally { this.c = false; } } } @Override // o.PXc public final void c() { synchronized (this.i) { this.c = false; this.a = VZJ.RVV.CLEARED; this.g = VZJ.RVV.CLEARED; this.b.c(); this.d.c(); } } @Override // o.PXc public final void f() { synchronized (this.i) { if (!this.g.isComplete) { this.g = VZJ.RVV.PAUSED; this.b.f(); } if (!this.a.isComplete) { this.a = VZJ.RVV.PAUSED; this.d.f(); } } } @Override // o.PXc public final boolean h() { boolean z; synchronized (this.i) { z = this.a == VZJ.RVV.RUNNING; } return z; } @Override // o.PXc public final boolean j() { boolean z; synchronized (this.i) { z = this.a == VZJ.RVV.SUCCESS; } return z; } @Override // o.PXc public final boolean d() { boolean z; synchronized (this.i) { z = this.a == VZJ.RVV.CLEARED; } return z; } @Override // o.PXc public final boolean b(PXc pXc) { if (!(pXc instanceof xEe)) { return false; } xEe xee = (xEe) pXc; if (this.d == null) { if (xee.d != null) { return false; } } else if (!this.d.b(xee.d)) { return false; } if (this.b == null) { if (xee.b != null) { return false; } } else if (!this.b.b(xee.b)) { return false; } return true; } }