package ῲ.ⁱ.K.K;

import ῲ.ⁱ.K.ῲ.Abstractanimation.InterpolatorC2160;

/* renamed from: ῲ.ⁱ.K.K.ⁱ  reason: contains not printable characters */
/* compiled from: StopLogic */
public class C2189 extends Abstractanimation.InterpolatorC2160 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public float f7608;

    /* renamed from: ඓ  reason: contains not printable characters */
    public float f7609;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public boolean f7610 = false;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public float f7611;

    /* renamed from: ῲ  reason: contains not printable characters */
    public float f7612;

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

    /* renamed from: K  reason: contains not printable characters */
    public float f7614;

    /* renamed from: 㑃  reason: contains not printable characters */
    public float f7615;

    /* renamed from: 㳳  reason: contains not printable characters */
    public int f7616;

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

    /* renamed from: 㸾  reason: contains not printable characters */
    public float f7618;

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

    /* renamed from: 䁗  reason: contains not printable characters */
    public float f7620;

    public float getInterpolation(float f) {
        float f2;
        float f3 = this.f7618;
        if (f <= f3) {
            float f4 = this.f7614;
            f2 = ((((this.f7612 - f4) * f) * f) / (f3 * 2.0f)) + (f4 * f);
        } else {
            int i = this.f7616;
            if (i == 1) {
                f2 = this.f7613;
            } else {
                float f5 = f - f3;
                float f6 = this.f7609;
                if (f5 < f6) {
                    float f7 = this.f7613;
                    float f8 = this.f7612;
                    f2 = ((((this.f7608 - f8) * f5) * f5) / (f6 * 2.0f)) + (f8 * f5) + f7;
                } else if (i == 2) {
                    f2 = this.f7619;
                } else {
                    float f9 = f5 - f6;
                    float f10 = this.f7617;
                    if (f9 < f10) {
                        float f11 = this.f7619;
                        float f12 = this.f7608 * f9;
                        f2 = (f11 + f12) - ((f12 * f9) / (f10 * 2.0f));
                    } else {
                        f2 = this.f7611;
                    }
                }
            }
        }
        this.f7620 = f;
        return this.f7610 ? this.f7615 - f2 : this.f7615 + f2;
    }

    /* renamed from: K  reason: contains not printable characters */
    public float m5750(float f) {
        float f2;
        float f3;
        float f4 = this.f7618;
        if (f <= f4) {
            f2 = this.f7614;
            f3 = this.f7612;
        } else {
            int i = this.f7616;
            if (i == 1) {
                return 0.0f;
            }
            f -= f4;
            f4 = this.f7609;
            if (f < f4) {
                f2 = this.f7612;
                f3 = this.f7608;
            } else if (i == 2) {
                return this.f7619;
            } else {
                float f5 = f - f4;
                float f6 = this.f7617;
                if (f5 >= f6) {
                    return this.f7611;
                }
                float f7 = this.f7608;
                return f7 - ((f5 * f7) / f6);
            }
        }
        return (((f3 - f2) * f) / f4) + f2;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5752(float f, float f2, float f3, float f4, float f5, float f6) {
        this.f7615 = f;
        this.f7610 = f > f2;
        if (this.f7610) {
            m5751(-f3, f - f2, f5, f6, f4);
        } else {
            m5751(f3, f2 - f, f5, f6, f4);
        }
    }

    @Override // ῲ.ⁱ.K.ῲ.Abstractanimation.InterpolatorC2160
    /* renamed from: K  reason: contains not printable characters */
    public float m5749() {
        return this.f7610 ? -m5750(this.f7620) : m5750(this.f7620);
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m5751(float f, float f2, float f3, float f4, float f5) {
        if (f == 0.0f) {
            f = 1.0E-4f;
        }
        this.f7614 = f;
        float f6 = f / f3;
        float f7 = (f6 * f) / 2.0f;
        if (f < 0.0f) {
            float sqrt = (float) Math.sqrt((double) ((f2 - ((((-f) / f3) * f) / 2.0f)) * f3));
            if (sqrt < f4) {
                this.f7616 = 2;
                this.f7614 = f;
                this.f7612 = sqrt;
                this.f7608 = 0.0f;
                this.f7618 = (sqrt - f) / f3;
                this.f7609 = sqrt / f3;
                this.f7613 = ((f + sqrt) * this.f7618) / 2.0f;
                this.f7619 = f2;
                this.f7611 = f2;
                return;
            }
            this.f7616 = 3;
            this.f7614 = f;
            this.f7612 = f4;
            this.f7608 = f4;
            this.f7618 = (f4 - f) / f3;
            this.f7617 = f4 / f3;
            float f8 = ((f + f4) * this.f7618) / 2.0f;
            float f9 = (this.f7617 * f4) / 2.0f;
            this.f7609 = ((f2 - f8) - f9) / f4;
            this.f7613 = f8;
            this.f7619 = f2 - f9;
            this.f7611 = f2;
        } else if (f7 >= f2) {
            this.f7616 = 1;
            this.f7614 = f;
            this.f7612 = 0.0f;
            this.f7613 = f2;
            this.f7618 = (2.0f * f2) / f;
        } else {
            float f10 = f2 - f7;
            float f11 = f10 / f;
            if (f11 + f6 < f5) {
                this.f7616 = 2;
                this.f7614 = f;
                this.f7612 = f;
                this.f7608 = 0.0f;
                this.f7613 = f10;
                this.f7619 = f2;
                this.f7618 = f11;
                this.f7609 = f6;
                return;
            }
            float sqrt2 = (float) Math.sqrt((double) (((f * f) / 2.0f) + (f3 * f2)));
            float f12 = (sqrt2 - f) / f3;
            this.f7618 = f12;
            float f13 = sqrt2 / f3;
            this.f7609 = f13;
            if (sqrt2 < f4) {
                this.f7616 = 2;
                this.f7614 = f;
                this.f7612 = sqrt2;
                this.f7608 = 0.0f;
                this.f7618 = f12;
                this.f7609 = f13;
                this.f7613 = ((f + sqrt2) * this.f7618) / 2.0f;
                this.f7619 = f2;
                return;
            }
            this.f7616 = 3;
            this.f7614 = f;
            this.f7612 = f4;
            this.f7608 = f4;
            this.f7618 = (f4 - f) / f3;
            this.f7617 = f4 / f3;
            float f14 = ((f + f4) * this.f7618) / 2.0f;
            float f15 = (this.f7617 * f4) / 2.0f;
            this.f7609 = ((f2 - f14) - f15) / f4;
            this.f7613 = f14;
            this.f7619 = f2 - f15;
            this.f7611 = f2;
        }
    }
}
