package ῲ.ⁱ.ῲ;

import androidx.constraintlayout.solver.SolverVariable;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import java.util.Arrays;
import java.util.HashMap;

/* renamed from: ῲ.ⁱ.ῲ.㸾  reason: contains not printable characters */
/* compiled from: LinearSystem */
public class C2080 {

    /* renamed from: ݜ  reason: contains not printable characters */
    public static int f7164 = 1000;

    /* renamed from: 㗽  reason: contains not printable characters */
    public static boolean f7165 = false;

    /* renamed from: 䀟  reason: contains not printable characters */
    public static long f7166;

    /* renamed from: ʬ  reason: contains not printable characters */
    public HashMap<String, SolverVariable> f7167 = null;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public final C2071 f7168;

    /* renamed from: ؿ  reason: contains not printable characters */
    public int f7169;

    /* renamed from: ඓ  reason: contains not printable characters */
    public int f7170 = 32;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public AbstractC2081 f7171;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public int f7172;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public boolean f7173;

    /* renamed from: ῲ  reason: contains not printable characters */
    public int f7174 = 0;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public C2073[] f7175;

    /* renamed from: K  reason: contains not printable characters */
    public boolean f7176 = false;

    /* renamed from: 㑃  reason: contains not printable characters */
    public int f7177;

    /* renamed from: 㗗  reason: contains not printable characters */
    public SolverVariable[] f7178;

    /* renamed from: 㳳  reason: contains not printable characters */
    public boolean[] f7179;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f7180;

    /* renamed from: 㸾  reason: contains not printable characters */
    public AbstractC2081 f7181;

    /* renamed from: 㿎  reason: contains not printable characters */
    public boolean f7182;

    /* renamed from: 䁗  reason: contains not printable characters */
    public int f7183;

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

        boolean isEmpty();

        /* renamed from: K  reason: contains not printable characters */
        SolverVariable m5465(C2080 v, boolean[] zArr);

        /* renamed from: K  reason: contains not printable characters */
        void m5466(SolverVariable solverVariable);
    }

    public C2080() {
        int i = this.f7170;
        this.f7180 = i;
        this.f7175 = null;
        this.f7182 = false;
        this.f7173 = false;
        this.f7179 = new boolean[i];
        this.f7172 = 1;
        this.f7177 = 0;
        this.f7183 = i;
        this.f7178 = new SolverVariable[f7164];
        this.f7169 = 0;
        this.f7175 = new C2073[i];
        m5463();
        this.f7168 = new C2071();
        this.f7181 = new C2075(this.f7168);
        this.f7171 = new C2073(this.f7168);
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public SolverVariable m5443() {
        if (this.f7172 + 1 >= this.f7180) {
            m5464();
        }
        SolverVariable r0 = m5453(SolverVariable.Type.SLACK, (String) null);
        this.f7174++;
        this.f7172++;
        int i = this.f7174;
        r0.f789 = i;
        this.f7168.f7136[i] = r0;
        return r0;
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public void m5445() throws Exception {
        if (this.f7181.isEmpty()) {
            m5456();
        } else if (this.f7182 || this.f7173) {
            boolean z = false;
            int i = 0;
            while (true) {
                if (i >= this.f7177) {
                    z = true;
                    break;
                } else if (!this.f7175[i].f7141) {
                    break;
                } else {
                    i++;
                }
            }
            if (!z) {
                m5462(this.f7181);
            } else {
                m5456();
            }
        } else {
            m5462(this.f7181);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public C2073 m5448() {
        C2073 r0 = this.f7168.f7134.m5440();
        if (r0 == null) {
            r0 = new C2073(this.f7168);
            f7166++;
        } else {
            r0.f7140 = null;
            r0.f7138.clear();
            r0.f7139 = 0.0f;
            r0.f7141 = false;
        }
        SolverVariable.f788++;
        return r0;
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public void m5451() {
        C2071 r2;
        int i = 0;
        while (true) {
            r2 = this.f7168;
            SolverVariable[] solverVariableArr = r2.f7136;
            if (i >= solverVariableArr.length) {
                break;
            }
            SolverVariable solverVariable = solverVariableArr[i];
            if (solverVariable != null) {
                solverVariable.m450();
            }
            i++;
        }
        r2.f7133.m5441(this.f7178, this.f7169);
        this.f7169 = 0;
        Arrays.fill(this.f7168.f7136, (Object) null);
        HashMap<String, SolverVariable> hashMap = this.f7167;
        if (hashMap != null) {
            hashMap.clear();
        }
        this.f7174 = 0;
        this.f7181.clear();
        this.f7172 = 1;
        for (int i2 = 0; i2 < this.f7177; i2++) {
            C2073[] r22 = this.f7175;
            if (r22[i2] != null) {
                r22[i2].f7137 = false;
            }
        }
        m5463();
        this.f7177 = 0;
        this.f7171 = new C2073(this.f7168);
    }

    /* renamed from: K  reason: contains not printable characters */
    public SolverVariable m5454(Object obj) {
        SolverVariable solverVariable = null;
        if (obj == null) {
            return null;
        }
        if (this.f7172 + 1 >= this.f7180) {
            m5464();
        }
        if (obj instanceof ConstraintAnchor) {
            ConstraintAnchor constraintAnchor = (ConstraintAnchor) obj;
            solverVariable = constraintAnchor.f808;
            if (solverVariable == null) {
                constraintAnchor.m467();
                solverVariable = constraintAnchor.f808;
            }
            int i = solverVariable.f789;
            if (i == -1 || i > this.f7174 || this.f7168.f7136[i] == null) {
                if (solverVariable.f789 != -1) {
                    solverVariable.m450();
                }
                this.f7174++;
                this.f7172++;
                int i2 = this.f7174;
                solverVariable.f789 = i2;
                solverVariable.f800 = SolverVariable.Type.UNRESTRICTED;
                this.f7168.f7136[i2] = solverVariable;
            }
        }
        return solverVariable;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5460(C2072 r1) {
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public final void m5463() {
        for (int i = 0; i < this.f7177; i++) {
            C2073 r1 = this.f7175[i];
            if (r1 != null) {
                this.f7168.f7134.m5442(r1);
            }
            this.f7175[i] = null;
        }
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public final void m5464() {
        this.f7170 *= 2;
        this.f7175 = (C2073[]) Arrays.copyOf(this.f7175, this.f7170);
        C2071 r0 = this.f7168;
        r0.f7136 = (SolverVariable[]) Arrays.copyOf(r0.f7136, this.f7170);
        int i = this.f7170;
        this.f7179 = new boolean[i];
        this.f7180 = i;
        this.f7183 = i;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public void m5444(SolverVariable solverVariable, SolverVariable solverVariable2, int i, int i2) {
        C2073 r0 = m5448();
        SolverVariable r1 = m5443();
        r1.f792 = 0;
        r0.m5399(solverVariable, solverVariable2, r1, i);
        if (i2 != 8) {
            r0.f7138.m5420(m5452(i2, (String) null), (float) ((int) (r0.f7138.m5415(r1) * -1.0f)));
        }
        m5461(r0);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public int m5446(Object obj) {
        SolverVariable solverVariable = ((ConstraintAnchor) obj).f808;
        if (solverVariable != null) {
            return (int) (solverVariable.f801 + 0.5f);
        }
        return 0;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public final void m5450(C2073 r8) {
        int i;
        if (r8.f7141) {
            r8.f7140.m452(this, r8.f7139);
        } else {
            C2073[] r0 = this.f7175;
            int i2 = this.f7177;
            r0[i2] = r8;
            SolverVariable solverVariable = r8.f7140;
            solverVariable.f802 = i2;
            this.f7177 = i2 + 1;
            solverVariable.m453(this, r8);
        }
        if (this.f7176) {
            int i3 = 0;
            while (i3 < this.f7177) {
                if (this.f7175[i3] == null) {
                    System.out.println("WTF");
                }
                C2073[] r1 = this.f7175;
                if (r1[i3] != null && r1[i3].f7141) {
                    C2073 r12 = r1[i3];
                    r12.f7140.m452(this, r12.f7139);
                    this.f7168.f7134.m5442(r12);
                    this.f7175[i3] = null;
                    int i4 = i3 + 1;
                    int i5 = i4;
                    while (true) {
                        i = this.f7177;
                        if (i4 >= i) {
                            break;
                        }
                        C2073[] r3 = this.f7175;
                        int i6 = i4 - 1;
                        r3[i6] = r3[i4];
                        if (r3[i6].f7140.f802 == i4) {
                            r3[i6].f7140.f802 = i6;
                        }
                        i5 = i4;
                        i4++;
                    }
                    if (i5 < i) {
                        this.f7175[i5] = null;
                    }
                    this.f7177--;
                    i3--;
                }
                i3++;
            }
            this.f7176 = false;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public SolverVariable m5452(int i, String str) {
        if (this.f7172 + 1 >= this.f7180) {
            m5464();
        }
        SolverVariable r4 = m5453(SolverVariable.Type.ERROR, str);
        this.f7174++;
        this.f7172++;
        int i2 = this.f7174;
        r4.f789 = i2;
        r4.f792 = i;
        this.f7168.f7136[i2] = r4;
        this.f7181.m5466(r4);
        return r4;
    }

    /* renamed from: K  reason: contains not printable characters */
    public final SolverVariable m5453(SolverVariable.Type type, String str) {
        SolverVariable r4 = this.f7168.f7133.m5440();
        if (r4 == null) {
            r4 = new SolverVariable(type);
            r4.f800 = type;
        } else {
            r4.m450();
            r4.f800 = type;
        }
        int i = this.f7169;
        int i2 = f7164;
        if (i >= i2) {
            f7164 = i2 * 2;
            this.f7178 = (SolverVariable[]) Arrays.copyOf(this.f7178, f7164);
        }
        SolverVariable[] solverVariableArr = this.f7178;
        int i3 = this.f7169;
        this.f7169 = i3 + 1;
        solverVariableArr[i3] = r4;
        return r4;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public final int m5447(AbstractC2081 k) {
        for (int i = 0; i < this.f7172; i++) {
            this.f7179[i] = false;
        }
        boolean z = false;
        int i2 = 0;
        while (!z) {
            i2++;
            if (i2 >= this.f7172 * 2) {
                return i2;
            }
            C2073 r4 = (C2073) k;
            SolverVariable solverVariable = r4.f7140;
            if (solverVariable != null) {
                this.f7179[solverVariable.f789] = true;
            }
            SolverVariable r42 = r4.m5465(this, this.f7179);
            if (r42 != null) {
                boolean[] zArr = this.f7179;
                int i3 = r42.f789;
                if (zArr[i3]) {
                    return i2;
                }
                zArr[i3] = true;
            }
            if (r42 != null) {
                int i4 = -1;
                float f = Float.MAX_VALUE;
                for (int i5 = 0; i5 < this.f7177; i5++) {
                    C2073 r9 = this.f7175[i5];
                    if (r9.f7140.f800 != SolverVariable.Type.UNRESTRICTED && !r9.f7141 && r9.f7138.m5413(r42)) {
                        float r10 = r9.f7138.m5415(r42);
                        if (r10 < 0.0f) {
                            float f2 = (-r9.f7139) / r10;
                            if (f2 < f) {
                                i4 = i5;
                                f = f2;
                            }
                        }
                    }
                }
                if (i4 > -1) {
                    C2073 r5 = this.f7175[i4];
                    r5.f7140.f802 = -1;
                    r5.m5398(r42);
                    SolverVariable solverVariable2 = r5.f7140;
                    solverVariable2.f802 = i4;
                    solverVariable2.m453(this, r5);
                }
            } else {
                z = true;
            }
        }
        return i2;
    }

    /* JADX WARNING: Removed duplicated region for block: B:116:0x01dc A[RETURN] */
    /* JADX WARNING: Removed duplicated region for block: B:117:0x01dd  */
    /* renamed from: K  reason: contains not printable characters */
    public void m5461(C2073 r18) {
        boolean z;
        boolean z2;
        boolean z3;
        SolverVariable solverVariable;
        SolverVariable r2;
        boolean z4;
        boolean z5;
        if (r18 != null) {
            if (this.f7177 + 1 >= this.f7183 || this.f7172 + 1 >= this.f7180) {
                m5464();
            }
            if (!r18.f7141) {
                if (this.f7175.length != 0) {
                    boolean z6 = false;
                    while (!z6) {
                        int r6 = r18.f7138.m5411();
                        for (int i = 0; i < r6; i++) {
                            SolverVariable r8 = r18.f7138.m5412(i);
                            if (r8.f802 != -1 || r8.f796 || r8.f790) {
                                r18.f7142.add(r8);
                            }
                        }
                        int size = r18.f7142.size();
                        if (size > 0) {
                            for (int i2 = 0; i2 < size; i2++) {
                                SolverVariable solverVariable2 = r18.f7142.get(i2);
                                if (solverVariable2.f796) {
                                    r18.m5409(this, solverVariable2, true);
                                } else {
                                    boolean z7 = solverVariable2.f790;
                                    if (!z7) {
                                        r18.m5410(this, this.f7175[solverVariable2.f802], true);
                                    } else if (z7) {
                                        float r9 = r18.f7138.m5415(solverVariable2);
                                        r18.f7139 = (solverVariable2.f791 * r9) + r18.f7139;
                                        r18.f7138.m5416(solverVariable2, true);
                                        solverVariable2.m449(r18);
                                        r18.f7138.m5421(this.f7168.f7136[solverVariable2.f799], r9, true);
                                        if (r18.f7138.m5411() == 0) {
                                            r18.f7141 = true;
                                            this.f7176 = true;
                                        }
                                    }
                                }
                            }
                            r18.f7142.clear();
                        } else {
                            z6 = true;
                        }
                    }
                    if (r18.f7140 != null && r18.f7138.m5411() == 0) {
                        r18.f7141 = true;
                        this.f7176 = true;
                    }
                }
                if (!r18.isEmpty()) {
                    float f = r18.f7139;
                    if (f < 0.0f) {
                        r18.f7139 = f * -1.0f;
                        r18.f7138.m5418();
                    }
                    int r22 = r18.f7138.m5411();
                    SolverVariable solverVariable3 = null;
                    SolverVariable solverVariable4 = null;
                    float f2 = 0.0f;
                    boolean z8 = false;
                    float f3 = 0.0f;
                    boolean z9 = false;
                    for (int i3 = 0; i3 < r22; i3++) {
                        float r15 = r18.f7138.m5414(i3);
                        SolverVariable r4 = r18.f7138.m5412(i3);
                        if (r4.f800 == SolverVariable.Type.UNRESTRICTED) {
                            if (solverVariable3 == null) {
                                z5 = r18.m5401(r4);
                            } else if (f2 > r15) {
                                z5 = r18.m5401(r4);
                            } else if (!z8 && r18.m5401(r4)) {
                                solverVariable3 = r4;
                                f2 = r15;
                                z8 = true;
                            }
                            solverVariable3 = r4;
                            z8 = z5;
                            f2 = r15;
                        } else if (solverVariable3 == null && r15 < 0.0f) {
                            if (solverVariable4 == null) {
                                z4 = r18.m5401(r4);
                            } else if (f3 > r15) {
                                z4 = r18.m5401(r4);
                            } else if (!z9 && r18.m5401(r4)) {
                                solverVariable4 = r4;
                                f3 = r15;
                                z9 = true;
                            }
                            solverVariable4 = r4;
                            z9 = z4;
                            f3 = r15;
                        }
                    }
                    if (solverVariable3 == null) {
                        solverVariable3 = solverVariable4;
                    }
                    if (solverVariable3 == null) {
                        z2 = true;
                    } else {
                        r18.m5398(solverVariable3);
                        z2 = false;
                    }
                    if (r18.f7138.m5411() == 0) {
                        r18.f7141 = true;
                    }
                    if (z2) {
                        if (this.f7172 + 1 >= this.f7180) {
                            m5464();
                        }
                        SolverVariable r23 = m5453(SolverVariable.Type.SLACK, (String) null);
                        this.f7174++;
                        this.f7172++;
                        int i4 = this.f7174;
                        r23.f789 = i4;
                        this.f7168.f7136[i4] = r23;
                        r18.f7140 = r23;
                        int i5 = this.f7177;
                        m5450(r18);
                        if (this.f7177 == i5 + 1) {
                            ((C2073) this.f7171).m5408(r18);
                            m5447(this.f7171);
                            if (r23.f802 == -1) {
                                if (r18.f7140 == r23 && (r2 = r18.m5403((boolean[]) null, r23)) != null) {
                                    r18.m5398(r2);
                                }
                                if (!r18.f7141) {
                                    r18.f7140.m453(this, r18);
                                }
                                this.f7168.f7134.m5442(r18);
                                this.f7177--;
                            }
                            z3 = true;
                            solverVariable = r18.f7140;
                            if (!(solverVariable == null && (solverVariable.f800 == SolverVariable.Type.UNRESTRICTED || r18.f7139 >= 0.0f))) {
                                z = z3;
                            } else {
                                return;
                            }
                        }
                    }
                    z3 = false;
                    solverVariable = r18.f7140;
                    if (!(solverVariable == null && (solverVariable.f800 == SolverVariable.Type.UNRESTRICTED || r18.f7139 >= 0.0f))) {
                    }
                } else {
                    return;
                }
            } else {
                z = false;
            }
            if (!z) {
                m5450(r18);
            }
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m5449(SolverVariable solverVariable, SolverVariable solverVariable2, int i, int i2) {
        C2073 r0 = m5448();
        SolverVariable r1 = m5443();
        r1.f792 = 0;
        r0.m5404(solverVariable, solverVariable2, r1, i);
        if (i2 != 8) {
            r0.f7138.m5420(m5452(i2, (String) null), (float) ((int) (r0.f7138.m5415(r1) * -1.0f)));
        }
        m5461(r0);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5462(AbstractC2081 k) throws Exception {
        float f;
        int i;
        boolean z;
        int i2 = 0;
        while (true) {
            f = 0.0f;
            i = 1;
            if (i2 >= this.f7177) {
                z = false;
                break;
            }
            C2073[] r3 = this.f7175;
            if (r3[i2].f7140.f800 != SolverVariable.Type.UNRESTRICTED && r3[i2].f7139 < 0.0f) {
                z = true;
                break;
            }
            i2++;
        }
        if (z) {
            boolean z2 = false;
            int i3 = 0;
            while (!z2) {
                i3 += i;
                int i4 = 0;
                int i5 = -1;
                int i6 = -1;
                int i7 = 0;
                float f2 = Float.MAX_VALUE;
                while (i4 < this.f7177) {
                    C2073 r12 = this.f7175[i4];
                    if (r12.f7140.f800 != SolverVariable.Type.UNRESTRICTED && !r12.f7141 && r12.f7139 < f) {
                        int r13 = r12.f7138.m5411();
                        int i8 = i7;
                        int i9 = i6;
                        int i10 = i5;
                        int i11 = 0;
                        while (i11 < r13) {
                            SolverVariable r15 = r12.f7138.m5412(i11);
                            float r1 = r12.f7138.m5415(r15);
                            if (r1 > f) {
                                int i12 = i8;
                                float f3 = f2;
                                int i13 = i9;
                                int i14 = i10;
                                for (int i15 = 0; i15 < 9; i15++) {
                                    float f4 = r15.f803[i15] / r1;
                                    if ((f4 < f3 && i15 == i12) || i15 > i12) {
                                        i13 = r15.f789;
                                        f3 = f4;
                                        i14 = i4;
                                        i12 = i15;
                                    }
                                }
                                i10 = i14;
                                i9 = i13;
                                f2 = f3;
                                i8 = i12;
                            }
                            i11++;
                            f = 0.0f;
                        }
                        i5 = i10;
                        i6 = i9;
                        i7 = i8;
                    }
                    i4++;
                    f = 0.0f;
                }
                if (i5 != -1) {
                    C2073 r14 = this.f7175[i5];
                    r14.f7140.f802 = -1;
                    r14.m5398(this.f7168.f7136[i6]);
                    SolverVariable solverVariable = r14.f7140;
                    solverVariable.f802 = i5;
                    solverVariable.m453(this, r14);
                } else {
                    z2 = true;
                }
                if (i3 > this.f7172 / 2) {
                    z2 = true;
                }
                f = 0.0f;
                i = 1;
            }
        }
        m5447(k);
        m5456();
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m5456() {
        for (int i = 0; i < this.f7177; i++) {
            C2073 r1 = this.f7175[i];
            r1.f7140.f801 = r1.f7139;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5458(SolverVariable solverVariable, SolverVariable solverVariable2, int i, float f, SolverVariable solverVariable3, SolverVariable solverVariable4, int i2, int i3) {
        C2073 r0 = m5448();
        if (solverVariable2 == solverVariable3) {
            r0.f7138.m5420(solverVariable, 1.0f);
            r0.f7138.m5420(solverVariable4, 1.0f);
            r0.f7138.m5420(solverVariable2, -2.0f);
        } else if (f == 0.5f) {
            r0.f7138.m5420(solverVariable, 1.0f);
            r0.f7138.m5420(solverVariable2, -1.0f);
            r0.f7138.m5420(solverVariable3, -1.0f);
            r0.f7138.m5420(solverVariable4, 1.0f);
            if (i > 0 || i2 > 0) {
                r0.f7139 = (float) ((-i) + i2);
            }
        } else if (f <= 0.0f) {
            r0.f7138.m5420(solverVariable, -1.0f);
            r0.f7138.m5420(solverVariable2, 1.0f);
            r0.f7139 = (float) i;
        } else if (f >= 1.0f) {
            r0.f7138.m5420(solverVariable4, -1.0f);
            r0.f7138.m5420(solverVariable3, 1.0f);
            r0.f7139 = (float) (-i2);
        } else {
            float f2 = 1.0f - f;
            r0.f7138.m5420(solverVariable, f2 * 1.0f);
            r0.f7138.m5420(solverVariable2, f2 * -1.0f);
            r0.f7138.m5420(solverVariable3, -1.0f * f);
            r0.f7138.m5420(solverVariable4, 1.0f * f);
            if (i > 0 || i2 > 0) {
                r0.f7139 = (((float) i2) * f) + (((float) (-i)) * f2);
            }
        }
        if (i3 != 8) {
            r0.m5406(this, i3);
        }
        m5461(r0);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5459(SolverVariable solverVariable, SolverVariable solverVariable2, SolverVariable solverVariable3, SolverVariable solverVariable4, float f, int i) {
        C2073 r6 = m5448();
        r6.m5405(solverVariable, solverVariable2, solverVariable3, solverVariable4, f);
        if (i != 8) {
            r6.m5406(this, i);
        }
        m5461(r6);
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2073 m5455(SolverVariable solverVariable, SolverVariable solverVariable2, int i, int i2) {
        if (i2 == 8 && solverVariable2.f796 && solverVariable.f802 == -1) {
            solverVariable.m452(this, solverVariable2.f801 + ((float) i));
            return null;
        }
        C2073 r1 = m5448();
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            r1.f7139 = (float) i;
        }
        if (!z) {
            r1.f7138.m5420(solverVariable, -1.0f);
            r1.f7138.m5420(solverVariable2, 1.0f);
        } else {
            r1.f7138.m5420(solverVariable, 1.0f);
            r1.f7138.m5420(solverVariable2, -1.0f);
        }
        if (i2 != 8) {
            r1.m5406(this, i2);
        }
        m5461(r1);
        return r1;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m5457(SolverVariable solverVariable, int i) {
        int i2 = solverVariable.f802;
        if (i2 == -1) {
            float f = (float) i;
            solverVariable.m452(this, f);
            for (int i3 = 0; i3 < this.f7174 + 1; i3++) {
                SolverVariable solverVariable2 = this.f7168.f7136[i3];
                if (solverVariable2 != null && solverVariable2.f790 && solverVariable2.f799 == solverVariable.f789) {
                    solverVariable2.m452(this, solverVariable2.f791 + f);
                }
            }
        } else if (i2 != -1) {
            C2073 r0 = this.f7175[i2];
            if (r0.f7141) {
                r0.f7139 = (float) i;
            } else if (r0.f7138.m5411() == 0) {
                r0.f7141 = true;
                r0.f7139 = (float) i;
            } else {
                C2073 r02 = m5448();
                if (i < 0) {
                    r02.f7139 = (float) (i * -1);
                    r02.f7138.m5420(solverVariable, 1.0f);
                } else {
                    r02.f7139 = (float) i;
                    r02.f7138.m5420(solverVariable, -1.0f);
                }
                m5461(r02);
            }
        } else {
            C2073 r03 = m5448();
            r03.f7140 = solverVariable;
            float f2 = (float) i;
            solverVariable.f801 = f2;
            r03.f7139 = f2;
            r03.f7141 = true;
            m5461(r03);
        }
    }
}
