package i1;

import h1.i;
import n.AbstractC2593u;
import n.e0;
import o.AbstractC2628a;

/* JADX INFO: loaded from: classes.dex */
public abstract class b {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final float[] f18830a = {8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f};

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static volatile e0 f18831b = new e0(0);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final Object[] f18832c;

    static {
        Object[] objArr = new Object[0];
        f18832c = objArr;
        synchronized (objArr) {
            f18831b.d((int) 115.0f, new c(new float[]{8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f}, new float[]{9.2f, 11.5f, 13.8f, 16.4f, 19.8f, 21.8f, 25.2f, 30.0f, 100.0f}));
            f18831b.d((int) 130.0f, new c(new float[]{8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f}, new float[]{10.4f, 13.0f, 15.6f, 18.8f, 21.6f, 23.6f, 26.4f, 30.0f, 100.0f}));
            f18831b.d((int) 150.0f, new c(new float[]{8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f}, new float[]{12.0f, 15.0f, 18.0f, 22.0f, 24.0f, 26.0f, 28.0f, 30.0f, 100.0f}));
            f18831b.d((int) 180.0f, new c(new float[]{8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f}, new float[]{14.4f, 18.0f, 21.6f, 24.4f, 27.6f, 30.8f, 32.8f, 34.8f, 100.0f}));
            f18831b.d((int) 200.0f, new c(new float[]{8.0f, 10.0f, 12.0f, 14.0f, 18.0f, 20.0f, 24.0f, 30.0f, 100.0f}, new float[]{16.0f, 20.0f, 24.0f, 26.0f, 30.0f, 34.0f, 36.0f, 38.0f, 100.0f}));
        }
        if ((f18831b.c(0) / 100.0f) - 0.01f > 1.03f) {
            return;
        }
        i.b("You should only apply non-linear scaling to font scales > 1");
    }

    public static a a(float f6) {
        float fC;
        a cVar;
        if (f6 < 1.03f) {
            return null;
        }
        int i6 = (int) (f6 * 100.0f);
        a aVar = (a) f18831b.b(i6);
        if (aVar != null) {
            return aVar;
        }
        e0 e0Var = f18831b;
        if (e0Var.f21420a) {
            AbstractC2593u.a(e0Var);
        }
        int iA = AbstractC2628a.a(e0Var.f21423d, i6, e0Var.f21421b);
        if (iA >= 0) {
            return (a) f18831b.f(iA);
        }
        int i7 = -(iA + 1);
        int i8 = i7 - 1;
        if (i7 >= f18831b.e()) {
            c cVar2 = new c(new float[]{1.0f}, new float[]{f6});
            b(f6, cVar2);
            return cVar2;
        }
        float[] fArr = f18830a;
        if (i8 < 0) {
            cVar = new c(fArr, fArr);
            fC = 1.0f;
        } else {
            fC = f18831b.c(i8) / 100.0f;
            cVar = (a) f18831b.f(i8);
        }
        float fC2 = f18831b.c(i7) / 100.0f;
        float fMax = (Math.max(0.0f, Math.min(1.0f, fC == fC2 ? 0.0f : (f6 - fC) / (fC2 - fC))) * 1.0f) + 0.0f;
        a aVar2 = (a) f18831b.f(i7);
        float[] fArr2 = new float[9];
        for (int i9 = 0; i9 < 9; i9++) {
            float f7 = fArr[i9];
            float fB = cVar.b(f7);
            fArr2[i9] = ((aVar2.b(f7) - fB) * fMax) + fB;
        }
        c cVar3 = new c(fArr, fArr2);
        b(f6, cVar3);
        return cVar3;
    }

    public static void b(float f6, c cVar) {
        synchronized (f18832c) {
            e0 e0VarA = f18831b.clone();
            e0VarA.d((int) (f6 * 100.0f), cVar);
            f18831b = e0VarA;
        }
    }
}
