package defpackage;

import java.util.ArrayList;

/* JADX INFO: renamed from: ᵻˁⁱ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public class C5184 {

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final C4749 f19516;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public C4996 f19515 = null;

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public float f19512 = 0.0f;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final ArrayList f19513 = new ArrayList();

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public boolean f19514 = false;

    public C5184(ᵣˊˈᵪ r2) {
        this.f19516 = new C4749(this, r2);
    }

    /* JADX WARN: Removed duplicated region for block: B:29:0x0078  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x007d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public String toString() {
        boolean z;
        String strConcat = (this.f19515 == null ? "0" : "" + this.f19515).concat(" = ");
        if (this.f19512 != 0.0f) {
            StringBuilder sbM8219 = AbstractC3653.m8219(strConcat);
            sbM8219.append(this.f19512);
            strConcat = sbM8219.toString();
            z = true;
        } else {
            z = false;
        }
        C4749 c4749 = this.f19516;
        int iM9929 = c4749.m9929();
        for (int i = 0; i < iM9929; i++) {
            C4996 c4996M9926 = c4749.m9926(i);
            if (c4996M9926 != null) {
                float fM9930 = c4749.m9930(i);
                if (fM9930 != 0.0f) {
                    String string = c4996M9926.toString();
                    if (!z) {
                        if (fM9930 < 0.0f) {
                            strConcat = strConcat.concat("- ");
                            fM9930 *= -1.0f;
                        }
                        strConcat = fM9930 == 1.0f ? strConcat.concat(string) : strConcat + fM9930 + " " + string;
                        z = true;
                    } else if (fM9930 > 0.0f) {
                        strConcat = strConcat.concat(" + ");
                        if (fM9930 == 1.0f) {
                        }
                        z = true;
                    } else {
                        strConcat = strConcat.concat(" - ");
                        fM9930 *= -1.0f;
                        if (fM9930 == 1.0f) {
                        }
                        z = true;
                    }
                }
            }
        }
        return !z ? strConcat.concat("0.0") : strConcat;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m10728(C4996 c4996, C4996 c49962, C4996 c49963, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f19512 = i;
        }
        C4749 c4749 = this.f19516;
        if (z) {
            c4749.m9928(c4996, 1.0f);
            c4749.m9928(c49962, -1.0f);
            c4749.m9928(c49963, -1.0f);
        } else {
            c4749.m9928(c4996, -1.0f);
            c4749.m9928(c49962, 1.0f);
            c4749.m9928(c49963, 1.0f);
        }
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final void m10729(C1873 c1873, C4996 c4996, boolean z) {
        if (c4996.f18941) {
            C4749 c4749 = this.f19516;
            float fM9925 = c4749.m9925(c4996);
            this.f19512 = (c4996.f18940 * fM9925) + this.f19512;
            c4749.m9924(c4996, z);
            if (z) {
                c4996.m10326(this);
            }
            if (c4749.m9929() == 0) {
                this.f19514 = true;
                c1873.f7415 = true;
            }
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void m10730(C4996 c4996, C4996 c49962, C4996 c49963, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f19512 = i;
        }
        C4749 c4749 = this.f19516;
        if (z) {
            c4749.m9928(c4996, 1.0f);
            c4749.m9928(c49962, -1.0f);
            c4749.m9928(c49963, 1.0f);
        } else {
            c4749.m9928(c4996, -1.0f);
            c4749.m9928(c49962, 1.0f);
            c4749.m9928(c49963, -1.0f);
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ */
    public boolean mo9786() {
        return this.f19515 == null && this.f19512 == 0.0f && this.f19516.m9929() == 0;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m10731(C1873 c1873, int i) {
        C4996 c4996M5100 = c1873.m5100(i);
        C4749 c4749 = this.f19516;
        c4749.m9928(c4996M5100, 1.0f);
        c4749.m9928(c1873.m5100(i), -1.0f);
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final void m10732(C4996 c4996) {
        C4996 c49962 = this.f19515;
        C4749 c4749 = this.f19516;
        if (c49962 != null) {
            c4749.m9928(c49962, -1.0f);
            this.f19515.f18936 = -1;
            this.f19515 = null;
        }
        float fM9924 = c4749.m9924(c4996, true) * (-1.0f);
        this.f19515 = c4996;
        if (fM9924 == 1.0f) {
            return;
        }
        this.f19512 /= fM9924;
        int i = c4749.f18056;
        for (int i2 = 0; i != -1 && i2 < c4749.f18060; i2++) {
            float[] fArr = c4749.f18061;
            fArr[i] = fArr[i] / fM9924;
            i = c4749.f18064[i];
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public C4996 mo9789(boolean[] zArr) {
        return m10733(zArr, null);
    }

    /* JADX INFO: renamed from: ᵻʽᵯ */
    public void mo9790(C1873 c1873, C5184 c5184, boolean z) {
        C4749 c4749 = this.f19516;
        c4749.getClass();
        float fM9925 = c4749.m9925(c5184.f19515);
        c4749.m9924(c5184.f19515, z);
        C4749 c47492 = c5184.f19516;
        int iM9929 = c47492.m9929();
        for (int i = 0; i < iM9929; i++) {
            C4996 c4996M9926 = c47492.m9926(i);
            c4749.m9927(c4996M9926, c47492.m9925(c4996M9926) * fM9925, z);
        }
        this.f19512 = (c5184.f19512 * fM9925) + this.f19512;
        if (z) {
            c5184.f19515.m10326(this);
        }
        if (this.f19515 == null || c4749.m9929() != 0) {
            return;
        }
        this.f19514 = true;
        c1873.f7415 = true;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final C4996 m10733(boolean[] zArr, C4996 c4996) {
        int i;
        C4749 c4749 = this.f19516;
        int iM9929 = c4749.m9929();
        C4996 c49962 = null;
        float f = 0.0f;
        for (int i2 = 0; i2 < iM9929; i2++) {
            float fM9930 = c4749.m9930(i2);
            if (fM9930 < 0.0f) {
                C4996 c4996M9926 = c4749.m9926(i2);
                if ((zArr == null || !zArr[c4996M9926.f18937]) && c4996M9926 != c4996 && (((i = c4996M9926.f18938) == 3 || i == 4) && fM9930 < f)) {
                    f = fM9930;
                    c49962 = c4996M9926;
                }
            }
        }
        return c49962;
    }
}
