package com.applovin.impl; import android.os.Handler; import android.os.Looper; import android.util.Pair; import android.view.SurfaceView; import android.view.TextureView; import com.applovin.impl.be; import com.applovin.impl.e8; import com.applovin.impl.fe; import com.applovin.impl.fo; import com.applovin.impl.hc; import com.applovin.impl.qh; import com.applovin.impl.rh; import com.applovin.impl.wj; import com.ironsource.v8; import com.mbridge.msdk.playercommon.exoplayer2.C; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArraySet; /* loaded from: classes.dex */ final class c8 extends d2 { private jj A; private wj B; private boolean C; private qh.b D; private vd E; private vd F; private oh G; private int H; private int I; private long J; final wo b; final qh.b c; private final qi[] d; private final vo e; private final ja f; private final e8.f g; private final e8 h; private final hc i; private final CopyOnWriteArraySet j; private final fo.b k; private final List l; private final boolean m; private final de n; private final r0 o; private final Looper p; private final y1 q; private final long r; private final long s; private final l3 t; private int u; private boolean v; private int w; private int x; private boolean y; private int z; private fo R() { return new sh(this.l, this.B); } @Override // com.applovin.impl.qh public to A() { return new to(this.G.i.c); } @Override // com.applovin.impl.qh public vd C() { return this.E; } @Override // com.applovin.impl.qh public long F() { return this.r; } @Override // com.applovin.impl.qh /* renamed from: T, reason: merged with bridge method [inline-methods] */ public eb x() { return eb.h(); } @Override // com.applovin.impl.qh public void a(SurfaceView surfaceView) { } @Override // com.applovin.impl.qh public void a(TextureView textureView) { } @Override // com.applovin.impl.qh public void b(SurfaceView surfaceView) { } @Override // com.applovin.impl.qh public void b(TextureView textureView) { } @Override // com.applovin.impl.qh public long e() { return this.s; } @Override // com.applovin.impl.qh public qh.b i() { return this.D; } @Override // com.applovin.impl.qh public int m() { return this.u; } @Override // com.applovin.impl.qh public Looper p() { return this.p; } @Override // com.applovin.impl.qh public long q() { return 3000L; } @Override // com.applovin.impl.qh public boolean r() { return this.v; } @Override // com.applovin.impl.qh public xq z() { return xq.f; } public c8(qi[] qiVarArr, vo voVar, de deVar, lc lcVar, y1 y1Var, r0 r0Var, boolean z, jj jjVar, long j, long j2, kc kcVar, long j3, boolean z2, l3 l3Var, Looper looper, qh qhVar, qh.b bVar) { pc.c("ExoPlayerImpl", "Init " + Integer.toHexString(System.identityHashCode(this)) + " [ExoPlayerLib/2.15.1] [" + xp.e + v8.i.e); b1.b(qiVarArr.length > 0); this.d = (qi[]) b1.a(qiVarArr); this.e = (vo) b1.a(voVar); this.n = deVar; this.q = y1Var; this.o = r0Var; this.m = z; this.A = jjVar; this.r = j; this.s = j2; this.C = z2; this.p = looper; this.t = l3Var; this.u = 0; final qh qhVar2 = qhVar != null ? qhVar : this; this.i = new hc(looper, l3Var, new hc.b() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda0 @Override // com.applovin.impl.hc.b public final void a(Object obj, b9 b9Var) { c8.a(qh.this, (qh.c) obj, b9Var); } }); this.j = new CopyOnWriteArraySet(); this.l = new ArrayList(); this.B = new wj.a(0); wo woVar = new wo(new si[qiVarArr.length], new h8[qiVarArr.length], null); this.b = woVar; this.k = new fo.b(); qh.b a2 = new qh.b.a().a(1, 2, 12, 13, 14, 15, 16, 17, 18, 19).a(28, voVar.b()).a(bVar).a(); this.c = a2; this.D = new qh.b.a().a(a2).a(3).a(9).a(); vd vdVar = vd.H; this.E = vdVar; this.F = vdVar; this.H = -1; this.f = l3Var.a(looper, null); e8.f fVar = new e8.f() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda1 @Override // com.applovin.impl.e8.f public final void a(e8.e eVar) { c8.this.c(eVar); } }; this.g = fVar; this.G = oh.a(woVar); if (r0Var != null) { r0Var.a(qhVar2, looper); b((qh.e) r0Var); y1Var.a(new Handler(looper), r0Var); } this.h = new e8(qiVarArr, voVar, woVar, lcVar, y1Var, this.u, this.v, r0Var, jjVar, kcVar, j3, z2, looper, l3Var, fVar); } public void c(long j) { this.h.a(j); } public boolean S() { return this.G.p; } @Override // com.applovin.impl.qh public void b(qh.e eVar) { a((qh.c) eVar); } public void a(b8 b8Var) { this.j.add(b8Var); } @Override // com.applovin.impl.qh public int o() { return this.G.e; } @Override // com.applovin.impl.qh public int j() { return this.G.m; } @Override // com.applovin.impl.qh /* renamed from: V, reason: merged with bridge method [inline-methods] */ public a8 c() { return this.G.f; } @Override // com.applovin.impl.qh public boolean l() { return this.G.l; } public void a(qh.c cVar) { this.i.a(cVar); } public void W() { pc.c("ExoPlayerImpl", "Release " + Integer.toHexString(System.identityHashCode(this)) + " [ExoPlayerLib/2.15.1] [" + xp.e + "] [" + f8.a() + v8.i.e); if (!this.h.x()) { this.i.b(10, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda5 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.c((qh.c) obj); } }); } this.i.b(); this.f.a((Object) null); r0 r0Var = this.o; if (r0Var != null) { this.q.a(r0Var); } oh a2 = this.G.a(1); this.G = a2; oh a3 = a2.a(a2.b); this.G = a3; a3.q = a3.s; this.G.r = 0L; } @Override // com.applovin.impl.qh public int v() { if (this.G.a.c()) { return this.I; } oh ohVar = this.G; return ohVar.a.a(ohVar.b.a); } @Override // com.applovin.impl.qh public int t() { int U = U(); if (U == -1) { return 0; } return U; } @Override // com.applovin.impl.qh public long getDuration() { if (d()) { oh ohVar = this.G; be.a aVar = ohVar.b; ohVar.a.a(aVar.a, this.k); return t2.b(this.k.a(aVar.b, aVar.c)); } return G(); } @Override // com.applovin.impl.qh public long getCurrentPosition() { return t2.b(a(this.G)); } @Override // com.applovin.impl.qh public long h() { return t2.b(this.G.r); } @Override // com.applovin.impl.qh public int E() { if (d()) { return this.G.b.b; } return -1; } @Override // com.applovin.impl.qh public int f() { if (d()) { return this.G.b.c; } return -1; } @Override // com.applovin.impl.qh public long g() { if (d()) { oh ohVar = this.G; ohVar.a.a(ohVar.b.a, this.k); oh ohVar2 = this.G; if (ohVar2.c == C.TIME_UNSET) { return ohVar2.a.a(t(), this.a).b(); } return this.k.d() + t2.b(this.G.c); } return getCurrentPosition(); } @Override // com.applovin.impl.qh public long s() { if (this.G.a.c()) { return this.J; } oh ohVar = this.G; if (ohVar.k.d != ohVar.b.d) { return ohVar.a.a(t(), this.a).d(); } long j = ohVar.q; if (this.G.k.a()) { oh ohVar2 = this.G; fo.b a2 = ohVar2.a.a(ohVar2.k.a, this.k); long b = a2.b(this.G.k.b); j = b == Long.MIN_VALUE ? a2.d : b; } oh ohVar3 = this.G; return t2.b(a(ohVar3.a, ohVar3.k, j)); } @Override // com.applovin.impl.qh public po k() { return this.G.h; } @Override // com.applovin.impl.qh public fo n() { return this.G.a; } private int U() { if (this.G.a.c()) { return this.H; } oh ohVar = this.G; return ohVar.a.a(ohVar.b.a, this.k).c; } private qh.f d(long j) { td tdVar; Object obj; int i; Object obj2; int t = t(); if (this.G.a.c()) { tdVar = null; obj = null; i = -1; obj2 = null; } else { oh ohVar = this.G; Object obj3 = ohVar.b.a; ohVar.a.a(obj3, this.k); i = this.G.a.a(obj3); obj = obj3; obj2 = this.G.a.a(t, this.a).a; tdVar = this.a.c; } long b = t2.b(j); long b2 = this.G.b.a() ? t2.b(b(this.G)) : b; be.a aVar = this.G.b; return new qh.f(obj2, t, tdVar, obj, i, b, b2, aVar.b, aVar.c); } private void X() { qh.b bVar = this.D; qh.b a2 = a(this.c); this.D = a2; if (a2.equals(bVar)) { return; } this.i.a(13, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda2 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.this.d((qh.c) obj); } }); } private static long b(oh ohVar) { fo.d dVar = new fo.d(); fo.b bVar = new fo.b(); ohVar.a.a(ohVar.b.a, bVar); if (ohVar.c == C.TIME_UNSET) { return ohVar.a.a(bVar.c, dVar).c(); } return bVar.e() + ohVar.c; } public static final class a implements ee { private final Object a; private fo b; @Override // com.applovin.impl.ee public Object a() { return this.a; } @Override // com.applovin.impl.ee public fo b() { return this.b; } public a(Object obj, fo foVar) { this.a = obj; this.b = foVar; } } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void e(oh ohVar, qh.c cVar) { cVar.b(ohVar.e); } private Pair a(oh ohVar, oh ohVar2, boolean z, int i, boolean z2) { fo foVar = ohVar2.a; fo foVar2 = ohVar.a; if (foVar2.c() && foVar.c()) { return new Pair(Boolean.FALSE, -1); } int i2 = 3; if (foVar2.c() != foVar.c()) { return new Pair(Boolean.TRUE, 3); } if (foVar.a(foVar.a(ohVar2.b.a, this.k).c, this.a).a.equals(foVar2.a(foVar2.a(ohVar.b.a, this.k).c, this.a).a)) { if (z && i == 0 && ohVar2.b.d < ohVar.b.d) { return new Pair(Boolean.TRUE, 0); } return new Pair(Boolean.FALSE, -1); } if (z && i == 0) { i2 = 1; } else if (z && i == 1) { i2 = 2; } else if (!z2) { throw new IllegalStateException(); } return new Pair(Boolean.TRUE, Integer.valueOf(i2)); } private static boolean c(oh ohVar) { return ohVar.e == 3 && ohVar.l && ohVar.m == 0; } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void h(oh ohVar, qh.c cVar) { cVar.a(ohVar.n); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void f(oh ohVar, qh.c cVar) { cVar.a(ohVar.m); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void g(oh ohVar, qh.c cVar) { cVar.d(c(ohVar)); } public void e(qh.c cVar) { this.i.b(cVar); } @Override // com.applovin.impl.qh public boolean d() { return this.G.b.a(); } /* JADX INFO: Access modifiers changed from: private */ public /* synthetic */ void c(final e8.e eVar) { this.f.a(new Runnable() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda22 @Override // java.lang.Runnable public final void run() { c8.this.b(eVar); } }); } /* JADX INFO: Access modifiers changed from: private */ public /* synthetic */ void b(qh.c cVar) { cVar.a(this.E); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void c(qh.c cVar) { cVar.a(a8.a(new g8(1), 1003)); } private long a(oh ohVar) { if (ohVar.a.c()) { return t2.a(this.J); } if (ohVar.b.a()) { return ohVar.s; } return a(ohVar.a, ohVar.b, ohVar.s); } /* JADX INFO: Access modifiers changed from: private */ public /* synthetic */ void d(qh.c cVar) { cVar.a(this.D); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void b(oh ohVar, qh.c cVar) { cVar.a(ohVar.f); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void c(oh ohVar, qh.c cVar) { cVar.e(ohVar.g); cVar.c(ohVar.g); } private Pair a(fo foVar, fo foVar2) { long g = g(); if (!foVar.c() && !foVar2.c()) { Pair a2 = foVar.a(this.a, this.k, t(), t2.a(g)); Object obj = ((Pair) xp.a(a2)).first; if (foVar2.a(obj) != -1) { return a2; } Object a3 = e8.a(this.a, this.k, this.u, this.v, obj, foVar, foVar2); if (a3 != null) { foVar2.a(a3, this.k); int i = this.k.c; return a(foVar2, i, foVar2.a(i, this.a).b()); } return a(foVar2, -1, C.TIME_UNSET); } boolean z = !foVar.c() && foVar2.c(); int U = z ? -1 : U(); if (z) { g = -9223372036854775807L; } return a(foVar2, U, g); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void d(oh ohVar, qh.c cVar) { cVar.b(ohVar.l, ohVar.e); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void b(oh ohVar, int i, qh.c cVar) { cVar.a(ohVar.a, i); } @Override // com.applovin.impl.qh public void b() { oh ohVar = this.G; if (ohVar.e != 1) { return; } oh a2 = ohVar.a((a8) null); oh a3 = a2.a(a2.a.c() ? 4 : 2); this.w++; this.h.v(); a(a3, 1, 1, false, false, 5, C.TIME_UNSET, -1); } private Pair a(fo foVar, int i, long j) { if (foVar.c()) { this.H = i; if (j == C.TIME_UNSET) { j = 0; } this.J = j; this.I = 0; return null; } if (i == -1 || i >= foVar.b()) { i = foVar.a(this.v); j = foVar.a(i, this.a).b(); } return foVar.a(this.a, this.k, i, t2.a(j)); } private void b(int i, int i2) { for (int i3 = i2 - 1; i3 >= i; i3--) { this.l.remove(i3); } this.B = this.B.a(i, i2); } @Override // com.applovin.impl.qh public ph a() { return this.G.n; } @Override // com.applovin.impl.qh public void b(final boolean z) { if (this.v != z) { this.v = z; this.h.f(z); this.i.a(9, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda3 @Override // com.applovin.impl.hc.a public final void a(Object obj) { ((qh.c) obj).b(z); } }); X(); this.i.a(); } } private qh.f a(int i, oh ohVar, int i2) { int i3; Object obj; td tdVar; Object obj2; int i4; long j; long j2; long b; long j3; fo.b bVar = new fo.b(); if (ohVar.a.c()) { i3 = i2; obj = null; tdVar = null; obj2 = null; i4 = -1; } else { Object obj3 = ohVar.b.a; ohVar.a.a(obj3, bVar); int i5 = bVar.c; int a2 = ohVar.a.a(obj3); Object obj4 = ohVar.a.a(i5, this.a).a; tdVar = this.a.c; obj2 = obj3; i4 = a2; obj = obj4; i3 = i5; } if (i == 0) { j = bVar.f + bVar.d; if (ohVar.b.a()) { be.a aVar = ohVar.b; j2 = bVar.a(aVar.b, aVar.c); b = b(ohVar); long j4 = b; j3 = j2; j = j4; } else { if (ohVar.b.e != -1 && this.G.b.a()) { j = b(this.G); } j3 = j; } } else if (ohVar.b.a()) { j2 = ohVar.s; b = b(ohVar); long j42 = b; j3 = j2; j = j42; } else { j = bVar.f + ohVar.s; j3 = j; } long b2 = t2.b(j3); long b3 = t2.b(j); be.a aVar2 = ohVar.b; return new qh.f(obj, i3, tdVar, obj2, i4, b2, b3, aVar2.b, aVar2.c); } /* JADX INFO: Access modifiers changed from: private */ /* renamed from: a, reason: merged with bridge method [inline-methods] */ public void b(e8.e eVar) { long j; boolean z; long j2; int i = this.w - eVar.c; this.w = i; boolean z2 = true; if (eVar.d) { this.x = eVar.e; this.y = true; } if (eVar.f) { this.z = eVar.g; } if (i == 0) { fo foVar = eVar.b.a; if (!this.G.a.c() && foVar.c()) { this.H = -1; this.J = 0L; this.I = 0; } if (!foVar.c()) { List d = ((sh) foVar).d(); b1.b(d.size() == this.l.size()); for (int i2 = 0; i2 < d.size(); i2++) { ((a) this.l.get(i2)).b = (fo) d.get(i2); } } if (this.y) { if (eVar.b.b.equals(this.G.b) && eVar.b.d == this.G.s) { z2 = false; } if (z2) { if (!foVar.c() && !eVar.b.b.a()) { oh ohVar = eVar.b; j2 = a(foVar, ohVar.b, ohVar.d); } else { j2 = eVar.b.d; } j = j2; } else { j = -9223372036854775807L; } z = z2; } else { j = -9223372036854775807L; z = false; } this.y = false; a(eVar.b, 1, this.z, false, z, this.x, j, -1); } } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void a(qh qhVar, qh.c cVar, b9 b9Var) { cVar.a(qhVar, new qh.d(b9Var)); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void a(int i, qh.f fVar, qh.f fVar2, qh.c cVar) { cVar.e(i); cVar.a(fVar, fVar2, i); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void a(oh ohVar, qh.c cVar) { cVar.b(ohVar.f); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void a(oh ohVar, to toVar, qh.c cVar) { cVar.a(ohVar.h, toVar); } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ void a(oh ohVar, int i, qh.c cVar) { cVar.a(ohVar.l, i); } private oh a(oh ohVar, fo foVar, Pair pair) { be.a aVar; wo woVar; oh a2; long j; b1.a(foVar.c() || pair != null); fo foVar2 = ohVar.a; oh a3 = ohVar.a(foVar); if (foVar.c()) { be.a a4 = oh.a(); long a5 = t2.a(this.J); oh a6 = a3.a(a4, a5, a5, a5, 0L, po.d, this.b, eb.h()).a(a4); a6.q = a6.s; return a6; } Object obj = a3.b.a; boolean z = !obj.equals(((Pair) xp.a(pair)).first); be.a aVar2 = z ? new be.a(pair.first) : a3.b; long longValue = ((Long) pair.second).longValue(); long a7 = t2.a(g()); if (!foVar2.c()) { a7 -= foVar2.a(obj, this.k).e(); } if (z || longValue < a7) { b1.b(!aVar2.a()); po poVar = z ? po.d : a3.h; if (z) { aVar = aVar2; woVar = this.b; } else { aVar = aVar2; woVar = a3.i; } oh a8 = a3.a(aVar, longValue, longValue, longValue, 0L, poVar, woVar, z ? eb.h() : a3.j).a(aVar); a8.q = longValue; return a8; } if (longValue == a7) { int a9 = foVar.a(a3.k.a); if (a9 != -1 && foVar.a(a9, this.k).c == foVar.a(aVar2.a, this.k).c) { return a3; } foVar.a(aVar2.a, this.k); if (aVar2.a()) { j = this.k.a(aVar2.b, aVar2.c); } else { j = this.k.d; } a2 = a3.a(aVar2, a3.s, a3.s, a3.d, j - a3.s, a3.h, a3.i, a3.j).a(aVar2); a2.q = j; } else { b1.b(!aVar2.a()); long max = Math.max(0L, a3.r - (longValue - a7)); long j2 = a3.q; if (a3.k.equals(a3.b)) { j2 = longValue + max; } a2 = a3.a(aVar2, longValue, longValue, longValue, max, a3.h, a3.i, a3.j); a2.q = j2; } return a2; } public void a(bf bfVar) { vd a2 = this.E.a().a(bfVar).a(); if (a2.equals(this.E)) { return; } this.E = a2; this.i.b(14, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda4 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.this.b((qh.c) obj); } }); } private long a(fo foVar, be.a aVar, long j) { foVar.a(aVar.a, this.k); return j + this.k.e(); } @Override // com.applovin.impl.qh public void a(qh.e eVar) { e(eVar); } private oh a(int i, int i2) { b1.a(i >= 0 && i2 >= i && i2 <= this.l.size()); int t = t(); fo n = n(); int size = this.l.size(); this.w++; b(i, i2); fo R = R(); oh a2 = a(this.G, R, a(n, R)); int i3 = a2.e; if (i3 != 1 && i3 != 4 && i < i2 && i2 == size && t >= a2.a.b()) { a2 = a2.a(4); } this.h.b(i, i2, this.B); return a2; } @Override // com.applovin.impl.qh public void a(int i, long j) { fo foVar = this.G.a; if (i >= 0 && (foVar.c() || i < foVar.b())) { this.w++; if (d()) { pc.d("ExoPlayerImpl", "seekTo ignored because an ad is playing"); e8.e eVar = new e8.e(this.G); eVar.a(1); this.g.a(eVar); return; } int i2 = o() != 1 ? 2 : 1; int t = t(); oh a2 = a(this.G.a(i2), foVar, a(foVar, i, j)); this.h.a(foVar, i, t2.a(j)); a(a2, 0, 1, true, true, 1, a(a2), t); return; } throw new bb(foVar, i, j); } public void a(be beVar) { a(Collections.singletonList(beVar)); } public void a(List list) { a(list, true); } public void a(List list, boolean z) { a(list, -1, C.TIME_UNSET, z); } private void a(List list, int i, long j, boolean z) { int i2; long j2; int U = U(); long currentPosition = getCurrentPosition(); this.w++; if (!this.l.isEmpty()) { b(0, this.l.size()); } List a2 = a(0, list); fo R = R(); if (!R.c() && i >= R.b()) { throw new bb(R, i, j); } if (z) { int a3 = R.a(this.v); j2 = C.TIME_UNSET; i2 = a3; } else if (i == -1) { i2 = U; j2 = currentPosition; } else { i2 = i; j2 = j; } oh a4 = a(this.G, R, a(R, i2, j2)); int i3 = a4.e; if (i2 != -1 && i3 != 1) { i3 = (R.c() || i2 >= R.b()) ? 4 : 2; } oh a5 = a4.a(i3); this.h.a(a2, i2, t2.a(j2), this.B); a(a5, 0, 1, false, (this.G.b.a.equals(a5.b.a) || this.G.a.c()) ? false : true, 4, a(a5), -1); } @Override // com.applovin.impl.qh public void a(boolean z) { a(z, 0, 1); } public void a(boolean z, int i, int i2) { oh ohVar = this.G; if (ohVar.l == z && ohVar.m == i) { return; } this.w++; oh a2 = ohVar.a(z, i); this.h.a(z, i); a(a2, 0, i2, false, false, 5, C.TIME_UNSET, -1); } @Override // com.applovin.impl.qh public void a(final int i) { if (this.u != i) { this.u = i; this.h.a(i); this.i.a(8, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda21 @Override // com.applovin.impl.hc.a public final void a(Object obj) { ((qh.c) obj).c(i); } }); X(); this.i.a(); } } public void a(boolean z, a8 a8Var) { oh a2; if (z) { a2 = a(0, this.l.size()).a((a8) null); } else { oh ohVar = this.G; a2 = ohVar.a(ohVar.b); a2.q = a2.s; a2.r = 0L; } oh a3 = a2.a(1); if (a8Var != null) { a3 = a3.a(a8Var); } oh ohVar2 = a3; this.w++; this.h.G(); a(ohVar2, 0, 1, false, ohVar2.a.c() && !this.G.a.c(), 4, a(ohVar2), -1); } private void a(final oh ohVar, final int i, final int i2, boolean z, boolean z2, final int i3, long j, int i4) { oh ohVar2 = this.G; this.G = ohVar; Pair a2 = a(ohVar, ohVar2, z2, i3, !ohVar2.a.equals(ohVar.a)); boolean booleanValue = ((Boolean) a2.first).booleanValue(); final int intValue = ((Integer) a2.second).intValue(); vd vdVar = this.E; if (booleanValue) { r3 = ohVar.a.c() ? null : ohVar.a.a(ohVar.a.a(ohVar.b.a, this.k).c, this.a).c; vdVar = r3 != null ? r3.d : vd.H; } if (!ohVar2.j.equals(ohVar.j)) { vdVar = vdVar.a().a(ohVar.j).a(); } boolean z3 = !vdVar.equals(this.E); this.E = vdVar; if (!ohVar2.a.equals(ohVar.a)) { this.i.a(0, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda6 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.b(oh.this, i, (qh.c) obj); } }); } if (z2) { final qh.f a3 = a(i3, ohVar2, i4); final qh.f d = d(j); this.i.a(11, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda12 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.a(i3, a3, d, (qh.c) obj); } }); } if (booleanValue) { this.i.a(1, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda13 @Override // com.applovin.impl.hc.a public final void a(Object obj) { ((qh.c) obj).a(td.this, intValue); } }); } if (ohVar2.f != ohVar.f) { this.i.a(10, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda14 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.a(oh.this, (qh.c) obj); } }); if (ohVar.f != null) { this.i.a(10, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda15 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.b(oh.this, (qh.c) obj); } }); } } wo woVar = ohVar2.i; wo woVar2 = ohVar.i; if (woVar != woVar2) { this.e.a(woVar2.d); final to toVar = new to(ohVar.i.c); this.i.a(2, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda16 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.a(oh.this, toVar, (qh.c) obj); } }); } if (z3) { final vd vdVar2 = this.E; this.i.a(14, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda17 @Override // com.applovin.impl.hc.a public final void a(Object obj) { ((qh.c) obj).a(vd.this); } }); } if (ohVar2.g != ohVar.g) { this.i.a(3, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda18 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.c(oh.this, (qh.c) obj); } }); } if (ohVar2.e != ohVar.e || ohVar2.l != ohVar.l) { this.i.a(-1, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda19 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.d(oh.this, (qh.c) obj); } }); } if (ohVar2.e != ohVar.e) { this.i.a(4, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda20 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.e(oh.this, (qh.c) obj); } }); } if (ohVar2.l != ohVar.l) { this.i.a(5, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda7 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.a(oh.this, i2, (qh.c) obj); } }); } if (ohVar2.m != ohVar.m) { this.i.a(6, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda8 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.f(oh.this, (qh.c) obj); } }); } if (c(ohVar2) != c(ohVar)) { this.i.a(7, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda9 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.g(oh.this, (qh.c) obj); } }); } if (!ohVar2.n.equals(ohVar.n)) { this.i.a(12, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda10 @Override // com.applovin.impl.hc.a public final void a(Object obj) { c8.h(oh.this, (qh.c) obj); } }); } if (z) { this.i.a(-1, new hc.a() { // from class: com.applovin.impl.c8$$ExternalSyntheticLambda11 @Override // com.applovin.impl.hc.a public final void a(Object obj) { ((qh.c) obj).b(); } }); } X(); this.i.a(); if (ohVar2.o != ohVar.o) { Iterator it = this.j.iterator(); while (it.hasNext()) { ((b8) it.next()).f(ohVar.o); } } if (ohVar2.p != ohVar.p) { Iterator it2 = this.j.iterator(); while (it2.hasNext()) { ((b8) it2.next()).g(ohVar.p); } } } public rh a(rh.b bVar) { return new rh(this.h, bVar, this.G.a, t(), this.t, this.h.g()); } private List a(int i, List list) { ArrayList arrayList = new ArrayList(); for (int i2 = 0; i2 < list.size(); i2++) { fe.c cVar = new fe.c((be) list.get(i2), this.m); arrayList.add(cVar); this.l.add(i2 + i, new a(cVar.b, cVar.a.i())); } this.B = this.B.b(i, arrayList.size()); return arrayList; } }