package ῲ.ⁱ.ῲ;

import androidx.constraintlayout.solver.SolverVariable;
import com.facebook.appevents.AppEventsConstants;
import com.facebook.appevents.UserDataStore;
import java.util.ArrayList;
import ඓ.K.K.K.C1293;
import ῲ.ⁱ.ῲ.C2080;

/* renamed from: ῲ.ⁱ.ῲ.ῲ  reason: contains not printable characters */
/* compiled from: ArrayRow */
public class C2073 implements C2080.AbstractC2081 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean f7137;

    /* renamed from: ඓ  reason: contains not printable characters */
    public AbstractC2074 f7138;

    /* renamed from: ῲ  reason: contains not printable characters */
    public float f7139 = 0.0f;

    /* renamed from: K  reason: contains not printable characters */
    public SolverVariable f7140 = null;

    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean f7141 = false;

    /* renamed from: 㸾  reason: contains not printable characters */
    public ArrayList<SolverVariable> f7142 = new ArrayList<>();

    /* renamed from: ῲ.ⁱ.ῲ.ῲ$K  reason: contains not printable characters */
    /* compiled from: ArrayRow */
    public interface AbstractC2074 {
        void clear();

        /* renamed from: ῲ  reason: contains not printable characters */
        int m5411();

        /* renamed from: ῲ  reason: contains not printable characters */
        SolverVariable m5412(int i);

        /* renamed from: ῲ  reason: contains not printable characters */
        boolean m5413(SolverVariable solverVariable);

        /* renamed from: K  reason: contains not printable characters */
        float m5414(int i);

        /* renamed from: K  reason: contains not printable characters */
        float m5415(SolverVariable solverVariable);

        /* renamed from: K  reason: contains not printable characters */
        float m5416(SolverVariable solverVariable, boolean z);

        /* renamed from: K  reason: contains not printable characters */
        float m5417(C2073 v, boolean z);

        /* renamed from: K  reason: contains not printable characters */
        void m5418();

        /* renamed from: K  reason: contains not printable characters */
        void m5419(float f);

        /* renamed from: K  reason: contains not printable characters */
        void m5420(SolverVariable solverVariable, float f);

        /* renamed from: K  reason: contains not printable characters */
        void m5421(SolverVariable solverVariable, float f, boolean z);
    }

    public C2073() {
    }

    @Override // ῲ.ⁱ.ῲ.C2080.AbstractC2081
    public void clear() {
        this.f7138.clear();
        this.f7140 = null;
        this.f7139 = 0.0f;
    }

    @Override // ῲ.ⁱ.ῲ.C2080.AbstractC2081
    public boolean isEmpty() {
        return this.f7140 == null && this.f7139 == 0.0f && this.f7138.m5411() == 0;
    }

    /* JADX WARNING: Removed duplicated region for block: B:25:0x007e  */
    /* JADX WARNING: Removed duplicated region for block: B:26:0x0083  */
    public String toString() {
        String str;
        boolean z;
        float r6;
        int i;
        if (this.f7140 == null) {
            str = C1293.m3412("", AppEventsConstants.EVENT_PARAM_VALUE_NO);
        } else {
            StringBuilder r0 = C1293.m3416("");
            r0.append(this.f7140);
            str = r0.toString();
        }
        String r02 = C1293.m3412(str, " = ");
        if (this.f7139 != 0.0f) {
            StringBuilder r03 = C1293.m3416(r02);
            r03.append(this.f7139);
            r02 = r03.toString();
            z = true;
        } else {
            z = false;
        }
        int r4 = this.f7138.m5411();
        for (int i2 = 0; i2 < r4; i2++) {
            SolverVariable r5 = this.f7138.m5412(i2);
            if (!(r5 == null || (r6 = this.f7138.m5414(i2)) == 0.0f)) {
                String solverVariable = r5.toString();
                if (!z) {
                    if (r6 < 0.0f) {
                        r02 = C1293.m3412(r02, "- ");
                    }
                    r02 = r6 == 1.0f ? C1293.m3412(r02, solverVariable) : r02 + r6 + " " + solverVariable;
                    z = true;
                } else if (i > 0) {
                    r02 = C1293.m3412(r02, " + ");
                    if (r6 == 1.0f) {
                    }
                    z = true;
                } else {
                    r02 = C1293.m3412(r02, " - ");
                }
                r6 *= -1.0f;
                if (r6 == 1.0f) {
                }
                z = true;
            }
        }
        return !z ? C1293.m3412(r02, "0.0") : r02;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public void m5398(SolverVariable solverVariable) {
        SolverVariable solverVariable2 = this.f7140;
        if (solverVariable2 != null) {
            this.f7138.m5420(solverVariable2, -1.0f);
            this.f7140.f802 = -1;
            this.f7140 = null;
        }
        float r0 = this.f7138.m5416(solverVariable, true) * -1.0f;
        this.f7140 = solverVariable;
        if (r0 != 1.0f) {
            this.f7139 /= r0;
            this.f7138.m5419(r0);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public C2073 m5399(SolverVariable solverVariable, SolverVariable solverVariable2, SolverVariable solverVariable3, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f7139 = (float) i;
        }
        if (!z) {
            this.f7138.m5420(solverVariable, -1.0f);
            this.f7138.m5420(solverVariable2, 1.0f);
            this.f7138.m5420(solverVariable3, -1.0f);
        } else {
            this.f7138.m5420(solverVariable, 1.0f);
            this.f7138.m5420(solverVariable2, -1.0f);
            this.f7138.m5420(solverVariable3, 1.0f);
        }
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2073 m5404(SolverVariable solverVariable, SolverVariable solverVariable2, SolverVariable solverVariable3, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f7139 = (float) i;
        }
        if (!z) {
            this.f7138.m5420(solverVariable, -1.0f);
            this.f7138.m5420(solverVariable2, 1.0f);
            this.f7138.m5420(solverVariable3, 1.0f);
        } else {
            this.f7138.m5420(solverVariable, 1.0f);
            this.f7138.m5420(solverVariable2, -1.0f);
            this.f7138.m5420(solverVariable3, -1.0f);
        }
        return this;
    }

    public C2073(C2071 r2) {
        this.f7138 = new C2078(this, r2);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public C2073 m5400(SolverVariable solverVariable, SolverVariable solverVariable2, SolverVariable solverVariable3, SolverVariable solverVariable4, float f) {
        this.f7138.m5420(solverVariable3, 0.5f);
        this.f7138.m5420(solverVariable4, 0.5f);
        this.f7138.m5420(solverVariable, -0.5f);
        this.f7138.m5420(solverVariable2, -0.5f);
        this.f7139 = -f;
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2073 m5406(C2080 r4, int i) {
        this.f7138.m5420(r4.m5452(i, "ep"), 1.0f);
        this.f7138.m5420(r4.m5452(i, UserDataStore.EMAIL), -1.0f);
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2073 m5405(SolverVariable solverVariable, SolverVariable solverVariable2, SolverVariable solverVariable3, SolverVariable solverVariable4, float f) {
        this.f7138.m5420(solverVariable, -1.0f);
        this.f7138.m5420(solverVariable2, 1.0f);
        this.f7138.m5420(solverVariable3, f);
        this.f7138.m5420(solverVariable4, -f);
        return this;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public final boolean m5401(SolverVariable solverVariable) {
        return solverVariable.f804 <= 1;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5410(C2080 r4, C2073 r5, boolean z) {
        float r0 = this.f7138.m5417(r5, z);
        this.f7139 = (r5.f7139 * r0) + this.f7139;
        if (z) {
            r5.f7140.m449(this);
        }
        if (this.f7140 != null && this.f7138.m5411() == 0) {
            this.f7141 = true;
            r4.f7176 = true;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5409(C2080 r4, SolverVariable solverVariable, boolean z) {
        if (solverVariable.f796) {
            float r0 = this.f7138.m5415(solverVariable);
            this.f7139 = (solverVariable.f801 * r0) + this.f7139;
            this.f7138.m5416(solverVariable, z);
            if (z) {
                solverVariable.m449(this);
            }
            if (this.f7138.m5411() == 0) {
                this.f7141 = true;
                r4.f7176 = true;
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final SolverVariable m5403(boolean[] zArr, SolverVariable solverVariable) {
        SolverVariable.Type type;
        int r0 = this.f7138.m5411();
        SolverVariable solverVariable2 = null;
        float f = 0.0f;
        for (int i = 0; i < r0; i++) {
            float r5 = this.f7138.m5414(i);
            if (r5 < 0.0f) {
                SolverVariable r6 = this.f7138.m5412(i);
                if ((zArr == null || !zArr[r6.f789]) && r6 != solverVariable && (((type = r6.f800) == SolverVariable.Type.SLACK || type == SolverVariable.Type.ERROR) && r5 < f)) {
                    f = r5;
                    solverVariable2 = r6;
                }
            }
        }
        return solverVariable2;
    }

    @Override // ῲ.ⁱ.ῲ.C2080.AbstractC2081
    /* renamed from: K  reason: contains not printable characters */
    public SolverVariable m5402(C2080 r1, boolean[] zArr) {
        return m5403(zArr, (SolverVariable) null);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5408(C2080.AbstractC2081 k) {
        if (k instanceof C2073) {
            C2073 r6 = (C2073) k;
            this.f7140 = null;
            this.f7138.clear();
            for (int i = 0; i < r6.f7138.m5411(); i++) {
                this.f7138.m5421(r6.f7138.m5412(i), r6.f7138.m5414(i), true);
            }
        }
    }

    @Override // ῲ.ⁱ.ῲ.C2080.AbstractC2081
    /* renamed from: K  reason: contains not printable characters */
    public void m5407(SolverVariable solverVariable) {
        int i = solverVariable.f792;
        float f = 1.0f;
        if (i != 1) {
            if (i == 2) {
                f = 1000.0f;
            } else if (i == 3) {
                f = 1000000.0f;
            } else if (i == 4) {
                f = 1.0E9f;
            } else if (i == 5) {
                f = 1.0E12f;
            }
        }
        this.f7138.m5420(solverVariable, f);
    }
}
