package l0;

/* loaded from: classes.dex */
public abstract class p1 {

    /* renamed from: a, reason: collision with root package name */
    private static final w2.h0 f27167a = new o1(w2.h0.f40760a.a(), 0, 0);

    public static final w2.z0 c(w2.b1 b1Var, q2.d dVar) {
        w2.z0 a10 = b1Var.a(dVar);
        f(a10, dVar.length(), 0, 2, null);
        return new w2.z0(a10.b(), new o1(a10.a(), dVar.length(), a10.b().length()));
    }

    public static final w2.h0 d() {
        return f27167a;
    }

    public static final void e(w2.z0 z0Var, int i10, int i11) {
        int length = z0Var.b().length();
        int min = Math.min(i10, i11);
        for (int i12 = 0; i12 < min; i12++) {
            g(z0Var.a().b(i12), length, i12);
        }
        g(z0Var.a().b(i10), length, i10);
        int min2 = Math.min(length, i11);
        for (int i13 = 0; i13 < min2; i13++) {
            h(z0Var.a().a(i13), i10, i13);
        }
        h(z0Var.a().a(length), i10, length);
    }

    public static /* synthetic */ void f(w2.z0 z0Var, int i10, int i11, int i12, Object obj) {
        if ((i12 & 2) != 0) {
            i11 = 100;
        }
        e(z0Var, i10, i11);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void g(int i10, int i11, int i12) {
        boolean z10 = false;
        if (i10 >= 0 && i10 <= i11) {
            z10 = true;
        }
        if (z10) {
            return;
        }
        throw new IllegalStateException(("OffsetMapping.originalToTransformed returned invalid mapping: " + i12 + " -> " + i10 + " is not in range of transformed text [0, " + i11 + ']').toString());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void h(int i10, int i11, int i12) {
        boolean z10 = false;
        if (i10 >= 0 && i10 <= i11) {
            z10 = true;
        }
        if (z10) {
            return;
        }
        throw new IllegalStateException(("OffsetMapping.transformedToOriginal returned invalid mapping: " + i12 + " -> " + i10 + " is not in range of original text [0, " + i11 + ']').toString());
    }
}
