package L0;

import java.io.IOException;
import java.util.Objects;

/* JADX INFO: renamed from: L0.j, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0155j implements I, E0.f {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final Object f3843q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public E0.e f3844r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public E0.e f3845s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final /* synthetic */ AbstractC0157l f3846t;

    public C0155j(AbstractC0157l abstractC0157l, Object obj) {
        this.f3846t = abstractC0157l;
        int i = 0;
        C c3 = null;
        this.f3844r = new E0.e(abstractC0157l.f3758c.f1973c, i, c3);
        this.f3845s = new E0.e(abstractC0157l.f3759d.f1973c, i, c3);
        this.f3843q = obj;
    }

    @Override // L0.I
    public final void C(int i, C c3, C0164t c0164t, C0169y c0169y) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            eVar.getClass();
            eVar.a(new F(eVar, c0164t, c0169yC, 1));
        }
    }

    @Override // L0.I
    public final void a(int i, C c3, C0169y c0169y) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            C c8 = eVar.f1972b;
            c8.getClass();
            eVar.a(new E2.a(eVar, c8, c0169yC, 4));
        }
    }

    public final boolean b(int i, C c3) {
        C cS;
        Object obj = this.f3843q;
        AbstractC0157l abstractC0157l = this.f3846t;
        if (c3 != null) {
            cS = abstractC0157l.s(obj, c3);
            if (cS == null) {
                return false;
            }
        } else {
            cS = null;
        }
        int iU = abstractC0157l.u(i, obj);
        E0.e eVar = this.f3844r;
        if (eVar.f1971a != iU || !Objects.equals(eVar.f1972b, cS)) {
            this.f3844r = new E0.e(abstractC0157l.f3758c.f1973c, iU, cS);
        }
        E0.e eVar2 = this.f3845s;
        if (eVar2.f1971a == iU && Objects.equals(eVar2.f1972b, cS)) {
            return true;
        }
        this.f3845s = new E0.e(abstractC0157l.f3759d.f1973c, iU, cS);
        return true;
    }

    public final C0169y c(C0169y c0169y, C c3) {
        AbstractC0157l abstractC0157l = this.f3846t;
        Object obj = this.f3843q;
        long j8 = c0169y.f3932f;
        long jT = abstractC0157l.t(j8, obj);
        long j9 = c0169y.f3933g;
        long jT2 = abstractC0157l.t(j9, obj);
        if (jT == j8 && jT2 == j9) {
            return c0169y;
        }
        return new C0169y(c0169y.f3927a, c0169y.f3928b, c0169y.f3929c, c0169y.f3930d, c0169y.f3931e, jT, jT2);
    }

    @Override // L0.I
    public final void g(int i, C c3, C0169y c0169y) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            eVar.getClass();
            eVar.a(new C0.b(eVar, 7, c0169yC));
        }
    }

    @Override // L0.I
    public final void h(int i, C c3, C0164t c0164t, C0169y c0169y, int i5) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            eVar.getClass();
            eVar.a(new E(eVar, c0164t, c0169yC, i5));
        }
    }

    @Override // L0.I
    public final void l(int i, C c3, C0164t c0164t, C0169y c0169y) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            eVar.getClass();
            eVar.a(new F(eVar, c0164t, c0169yC, 0));
        }
    }

    @Override // L0.I
    public final void r(int i, C c3, C0164t c0164t, C0169y c0169y, IOException iOException, boolean z8) {
        if (b(i, c3)) {
            E0.e eVar = this.f3844r;
            C0169y c0169yC = c(c0169y, c3);
            eVar.getClass();
            eVar.a(new G(eVar, c0164t, c0169yC, iOException, z8));
        }
    }
}
