package ඓ.㴹.K;

import android.view.animation.Interpolator;
import java.util.ArrayList;
import ඓ.K.K.K.C1293;
import ඓ.㴹.K.AbstractC1362;

/* renamed from: ඓ.㴹.K.㴹  reason: contains not printable characters */
/* compiled from: FloatKeyframeSet */
public class C1360 extends C1351 {

    /* renamed from: ᨨ  reason: contains not printable characters */
    public boolean f5215 = true;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public float f5216;

    /* renamed from: 㴹  reason: contains not printable characters */
    public float f5217;

    /* renamed from: 㿎  reason: contains not printable characters */
    public float f5218;

    public C1360(AbstractC1362.C1363... kArr) {
        super(kArr);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public float m3545(float f) {
        int i = this.f5188;
        if (i == 2) {
            if (this.f5215) {
                this.f5215 = false;
                this.f5217 = ((AbstractC1362.C1363) this.f5189.get(0)).f5222;
                this.f5216 = ((AbstractC1362.C1363) this.f5189.get(1)).f5222;
                this.f5218 = this.f5216 - this.f5217;
            }
            Interpolator interpolator = this.f5185;
            if (interpolator != null) {
                f = interpolator.getInterpolation(f);
            }
            AbstractC1364 r0 = this.f5186;
            if (r0 != null) {
                return ((Number) r0.evaluate(f, Float.valueOf(this.f5217), Float.valueOf(this.f5216))).floatValue();
            }
            return (f * this.f5218) + this.f5217;
        } else if (f <= 0.0f) {
            AbstractC1362.C1363 k = (AbstractC1362.C1363) this.f5189.get(0);
            AbstractC1362.C1363 k2 = (AbstractC1362.C1363) this.f5189.get(1);
            float f2 = k.f5222;
            float f3 = k2.f5222;
            float f4 = k.f5220;
            float f5 = k2.f5220;
            Interpolator interpolator2 = k2.f5219;
            if (interpolator2 != null) {
                f = interpolator2.getInterpolation(f);
            }
            float f6 = (f - f4) / (f5 - f4);
            AbstractC1364 r02 = this.f5186;
            return r02 == null ? C1293.m3403(f3, f2, f6, f2) : ((Number) r02.evaluate(f6, Float.valueOf(f2), Float.valueOf(f3))).floatValue();
        } else if (f >= 1.0f) {
            AbstractC1362.C1363 k3 = (AbstractC1362.C1363) this.f5189.get(i - 2);
            AbstractC1362.C1363 k4 = (AbstractC1362.C1363) this.f5189.get(this.f5188 - 1);
            float f7 = k3.f5222;
            float f8 = k4.f5222;
            float f9 = k3.f5220;
            float f10 = k4.f5220;
            Interpolator interpolator3 = k4.f5219;
            if (interpolator3 != null) {
                f = interpolator3.getInterpolation(f);
            }
            float f11 = (f - f9) / (f10 - f9);
            AbstractC1364 r03 = this.f5186;
            return r03 == null ? C1293.m3403(f8, f7, f11, f7) : ((Number) r03.evaluate(f11, Float.valueOf(f7), Float.valueOf(f8))).floatValue();
        } else {
            AbstractC1362.C1363 k5 = (AbstractC1362.C1363) this.f5189.get(0);
            int i2 = 1;
            while (true) {
                int i3 = this.f5188;
                if (i2 >= i3) {
                    return Float.valueOf(((AbstractC1362.C1363) this.f5189.get(i3 - 1)).f5222).floatValue();
                }
                AbstractC1362.C1363 k6 = (AbstractC1362.C1363) this.f5189.get(i2);
                if (f < k6.f5220) {
                    Interpolator interpolator4 = k6.f5219;
                    if (interpolator4 != null) {
                        f = interpolator4.getInterpolation(f);
                    }
                    float f12 = k5.f5220;
                    float f13 = (f - f12) / (k6.f5220 - f12);
                    float f14 = k5.f5222;
                    float f15 = k6.f5222;
                    AbstractC1364 r2 = this.f5186;
                    return r2 == null ? C1293.m3403(f15, f14, f13, f14) : ((Number) r2.evaluate(f13, Float.valueOf(f14), Float.valueOf(f15))).floatValue();
                }
                i2++;
                k5 = k6;
            }
        }
    }

    @Override // ඓ.㴹.K.C1351
    /* renamed from: K  reason: contains not printable characters */
    public Object m3546(float f) {
        return Float.valueOf(m3545(f));
    }

    @Override // ඓ.㴹.K.C1351
    public C1360 clone() {
        ArrayList<AbstractC1362> arrayList = this.f5189;
        int size = arrayList.size();
        AbstractC1362.C1363[] kArr = new AbstractC1362.C1363[size];
        for (int i = 0; i < size; i++) {
            kArr[i] = (AbstractC1362.C1363) arrayList.get(i).clone();
        }
        return new C1360(kArr);
    }
}
