package o; import com.bumptech.glide.Registry; import java.io.File; import java.util.List; import o.InterfaceC12232euN; import o.SCe; import o.XGP; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public final class vGO implements XGP, InterfaceC12232euN.IeS { private File a; private final LTe b; private Ajc c; private final XGP.IeS d; private volatile SCe.IeS e; private int f = -1; private InterfaceC2545agd g; private int h; private List> i; private int j; /* JADX INFO: Access modifiers changed from: package-private */ public vGO(LTe lTe, XGP.IeS ieS) { this.b = lTe; this.d = ieS; } @Override // o.XGP public final boolean c() { List d = this.b.d(); boolean z = false; if (d.isEmpty()) { return false; } LTe lTe = this.b; List> d2 = lTe.a.j.c().d(lTe.i.getClass(), lTe.g, lTe.m); if (d2.isEmpty()) { if (File.class.equals(this.b.m)) { return false; } StringBuilder sb = new StringBuilder("Failed to find any load path from "); sb.append(this.b.i.getClass()); sb.append(" to "); sb.append(this.b.m); throw new IllegalStateException(sb.toString()); } while (true) { List> list = this.i; if (list != null && this.j < list.size()) { this.e = null; while (!z && this.j < this.i.size()) { List> list2 = this.i; int i = this.j; this.j = i + 1; this.e = list2.get(i).e(this.a, this.b.l, this.b.d, this.b.h); if (this.e != null) { LTe lTe2 = this.b; if (lTe2.a.j.c().b(this.e.d.c(), lTe2.g, lTe2.m) != null) { this.e.d.c(this.b.j, this); z = true; } } } return z; } int i2 = this.f + 1; this.f = i2; if (i2 >= d2.size()) { int i3 = this.h + 1; this.h = i3; if (i3 >= d.size()) { return false; } this.f = 0; } InterfaceC2545agd interfaceC2545agd = d.get(this.h); Class cls = d2.get(this.f); this.c = new Ajc(this.b.a.d, interfaceC2545agd, this.b.n, this.b.l, this.b.d, this.b.b(cls), cls, this.b.h); File a = this.b.e.e().a(this.c); this.a = a; if (a != null) { this.g = interfaceC2545agd; this.i = this.b.a.j.c().b((Registry) a); this.j = 0; } } } @Override // o.XGP public final void e() { SCe.IeS ieS = this.e; if (ieS != null) { ieS.d.a(); } } @Override // o.InterfaceC12232euN.IeS public final void a(Object obj) { this.d.e(this.g, obj, this.e.d, pNW.RESOURCE_DISK_CACHE, this.c); } @Override // o.InterfaceC12232euN.IeS public final void a(Exception exc) { this.d.b(this.c, exc, this.e.d, pNW.RESOURCE_DISK_CACHE); } }