package androidx.constraintlayout.solver.widgets;

import androidx.constraintlayout.solver.SolverVariable;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.analyzer.DependencyNode;
import androidx.constraintlayout.solver.widgets.analyzer.WidgetRun;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import ඓ.K.K.K.C1293;
import ῲ.ⁱ.ῲ.C2071;
import ῲ.ⁱ.ῲ.C2073;
import ῲ.ⁱ.ῲ.C2080;
import ῲ.ⁱ.ῲ.㿎.C2082;
import ῲ.ⁱ.ῲ.㿎.C2083;
import ῲ.ⁱ.ῲ.㿎.C2100;
import ῲ.ⁱ.ῲ.㿎.C2103;
import ῲ.ⁱ.ῲ.㿎.C2108;
import ῲ.ⁱ.ῲ.㿎.ᕣ.C2084;
import ῲ.ⁱ.ῲ.㿎.ᕣ.C2093;
import ῲ.ⁱ.ῲ.㿎.ᕣ.C2094;

public class ConstraintWidget {

    /* renamed from: ਥ  reason: contains not printable characters */
    public static float f816 = 0.5f;

    /* renamed from: ʬ  reason: contains not printable characters */
    public C2084 f817;

    /* renamed from: ά  reason: contains not printable characters */
    public int f818;

    /* renamed from: Ϸ  reason: contains not printable characters */
    public int f819;

    /* renamed from: В  reason: contains not printable characters */
    public ConstraintAnchor f820 = new ConstraintAnchor(this, ConstraintAnchor.Type.LEFT);

    /* renamed from: ѷ  reason: contains not printable characters */
    public ConstraintAnchor f821 = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER);

    /* renamed from: ӯ  reason: contains not printable characters */
    public int f822;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public int f823 = -1;

    /* renamed from: Ԛ  reason: contains not printable characters */
    public int f824 = 0;

    /* renamed from: Ա  reason: contains not printable characters */
    public boolean f825;

    /* renamed from: Ն  reason: contains not printable characters */
    public Object f826;

    /* renamed from: ؿ  reason: contains not printable characters */
    public int f827 = 0;

    /* renamed from: ڎ  reason: contains not printable characters */
    public int f828;

    /* renamed from: ݜ  reason: contains not printable characters */
    public int f829 = 0;

    /* renamed from: ݰ  reason: contains not printable characters */
    public int f830;

    /* renamed from: ࠋ  reason: contains not printable characters */
    public ArrayList<ConstraintAnchor> f831 = new ArrayList<>();

    /* renamed from: ࡔ  reason: contains not printable characters */
    public int f832;

    /* renamed from: ಯ  reason: contains not printable characters */
    public ConstraintAnchor f833 = new ConstraintAnchor(this, ConstraintAnchor.Type.RIGHT);

    /* renamed from: ച  reason: contains not printable characters */
    public int f834;

    /* renamed from: ඓ  reason: contains not printable characters */
    public C2093 f835 = null;

    /* renamed from: ค  reason: contains not printable characters */
    public int f836;

    /* renamed from: ผ  reason: contains not printable characters */
    public boolean[] f837 = new boolean[2];

    /* renamed from: ᆯ  reason: contains not printable characters */
    public boolean f838;

    /* renamed from: ሽ  reason: contains not printable characters */
    public int f839 = 0;

    /* renamed from: ኩ  reason: contains not printable characters */
    public int f840;

    /* renamed from: ጒ  reason: contains not printable characters */
    public ConstraintAnchor f841 = new ConstraintAnchor(this, ConstraintAnchor.Type.BOTTOM);

    /* renamed from: Ꮝ  reason: contains not printable characters */
    public float f842;

    /* renamed from: Ꮟ  reason: contains not printable characters */
    public boolean f843;

    /* renamed from: ᑓ  reason: contains not printable characters */
    public boolean f844;

    /* renamed from: ᑾ  reason: contains not printable characters */
    public int f845 = 0;

    /* renamed from: ᓆ  reason: contains not printable characters */
    public float f846 = 1.0f;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public int[] f847 = new int[2];

    /* renamed from: ᔝ  reason: contains not printable characters */
    public int f848;

    /* renamed from: ᔨ  reason: contains not printable characters */
    public boolean f849;

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

    /* renamed from: ᖳ  reason: contains not printable characters */
    public boolean f851;

    /* renamed from: ᝁ  reason: contains not printable characters */
    public boolean f852 = false;

    /* renamed from: ᢱ  reason: contains not printable characters */
    public int f853;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public boolean f854 = false;

    /* renamed from: ᴊ  reason: contains not printable characters */
    public int f855;

    /* renamed from: ᶲ  reason: contains not printable characters */
    public ConstraintAnchor[] f856 = {this.f820, this.f833, this.f885, this.f841, this.f897, this.f821};

    /* renamed from: ὒ  reason: contains not printable characters */
    public boolean f857;

    /* renamed from: ῲ  reason: contains not printable characters */
    public C2084 f858;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public int[] f859 = {0, 0, 0, 0};

    /* renamed from: ₱  reason: contains not printable characters */
    public int f860;

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

    /* renamed from: Ⳳ  reason: contains not printable characters */
    public ConstraintWidget[] f862;

    /* renamed from: ⶍ  reason: contains not printable characters */
    public boolean f863 = false;

    /* renamed from: ゎ  reason: contains not printable characters */
    public int f864 = -1;

    /* renamed from: を  reason: contains not printable characters */
    public int f865;

    /* renamed from: ト  reason: contains not printable characters */
    public float f866 = 1.0f;

    /* renamed from: ピ  reason: contains not printable characters */
    public ConstraintWidget f867;

    /* renamed from: ヿ  reason: contains not printable characters */
    public ConstraintWidget[] f868;

    /* renamed from: ㅶ  reason: contains not printable characters */
    public boolean f869;

    /* renamed from: 㐐  reason: contains not printable characters */
    public String f870;

    /* renamed from: 㑃  reason: contains not printable characters */
    public boolean f871 = false;

    /* renamed from: 㒁  reason: contains not printable characters */
    public ConstraintAnchor f872 = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_X);

    /* renamed from: 㓚  reason: contains not printable characters */
    public int f873;

    /* renamed from: 㗗  reason: contains not printable characters */
    public int f874 = 0;

    /* renamed from: 㗞  reason: contains not printable characters */
    public boolean f875;

    /* renamed from: 㗼  reason: contains not printable characters */
    public int f876;

    /* renamed from: 㗽  reason: contains not printable characters */
    public int f877 = 0;

    /* renamed from: 㗾  reason: contains not printable characters */
    public float f878;

    /* renamed from: 㝚  reason: contains not printable characters */
    public ConstraintWidget f879;

    /* renamed from: 㣙  reason: contains not printable characters */
    public int f880;

    /* renamed from: 㦍  reason: contains not printable characters */
    public ConstraintWidget f881;

    /* renamed from: 㨑  reason: contains not printable characters */
    public int f882;

    /* renamed from: 㫸  reason: contains not printable characters */
    public float[] f883;

    /* renamed from: 㮔  reason: contains not printable characters */
    public int[] f884 = {Integer.MAX_VALUE, Integer.MAX_VALUE};

    /* renamed from: 㮝  reason: contains not printable characters */
    public ConstraintAnchor f885 = new ConstraintAnchor(this, ConstraintAnchor.Type.TOP);

    /* renamed from: 㱶  reason: contains not printable characters */
    public DimensionBehaviour[] f886;

    /* renamed from: 㲌  reason: contains not printable characters */
    public int f887;

    /* renamed from: 㳨  reason: contains not printable characters */
    public float f888;

    /* renamed from: 㳳  reason: contains not printable characters */
    public boolean f889 = true;

    /* renamed from: 㴪  reason: contains not printable characters */
    public boolean f890;

    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean[] f891 = {true, true};

    /* renamed from: 㵟  reason: contains not printable characters */
    public int f892;

    /* renamed from: 㵳  reason: contains not printable characters */
    public String f893;

    /* renamed from: 㶋  reason: contains not printable characters */
    public int f894 = 0;

    /* renamed from: 㷛  reason: contains not printable characters */
    public ConstraintAnchor f895 = new ConstraintAnchor(this, ConstraintAnchor.Type.CENTER_Y);

    /* renamed from: 㸾  reason: contains not printable characters */
    public C2094 f896 = null;

    /* renamed from: 㹎  reason: contains not printable characters */
    public ConstraintAnchor f897 = new ConstraintAnchor(this, ConstraintAnchor.Type.BASELINE);

    /* renamed from: 㹳  reason: contains not printable characters */
    public int f898;

    /* renamed from: 㺬  reason: contains not printable characters */
    public boolean f899;

    /* renamed from: 㿎  reason: contains not printable characters */
    public boolean f900 = true;

    /* renamed from: 䀟  reason: contains not printable characters */
    public float f901 = 1.0f;

    /* renamed from: 䁗  reason: contains not printable characters */
    public int f902 = -1;

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

    /* renamed from: 䄴  reason: contains not printable characters */
    public int f904;

    public enum DimensionBehaviour {
        FIXED,
        WRAP_CONTENT,
        MATCH_CONSTRAINT,
        MATCH_PARENT
    }

    public ConstraintWidget() {
        DimensionBehaviour dimensionBehaviour = DimensionBehaviour.FIXED;
        this.f886 = new DimensionBehaviour[]{dimensionBehaviour, dimensionBehaviour};
        this.f867 = null;
        this.f873 = 0;
        this.f819 = 0;
        this.f842 = 0.0f;
        this.f855 = -1;
        this.f822 = 0;
        this.f892 = 0;
        this.f848 = 0;
        this.f876 = 0;
        this.f860 = 0;
        this.f830 = 0;
        this.f865 = 0;
        float f = f816;
        this.f878 = f;
        this.f888 = f;
        this.f828 = 0;
        this.f840 = 0;
        this.f893 = null;
        this.f870 = null;
        this.f898 = 0;
        this.f834 = 0;
        this.f883 = new float[]{-1.0f, -1.0f};
        this.f862 = new ConstraintWidget[]{null, null};
        this.f868 = new ConstraintWidget[]{null, null};
        this.f881 = null;
        this.f879 = null;
        this.f887 = -1;
        this.f818 = -1;
        this.f831.add(this.f820);
        this.f831.add(this.f885);
        this.f831.add(this.f833);
        this.f831.add(this.f841);
        this.f831.add(this.f872);
        this.f831.add(this.f895);
        this.f831.add(this.f821);
        this.f831.add(this.f897);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        String str = "";
        sb.append(this.f870 != null ? C1293.m3414(C1293.m3416("type: "), this.f870, " ") : str);
        if (this.f893 != null) {
            str = C1293.m3414(C1293.m3416("id: "), this.f893, " ");
        }
        sb.append(str);
        sb.append("(");
        sb.append(this.f822);
        sb.append(", ");
        sb.append(this.f892);
        sb.append(") - (");
        sb.append(this.f873);
        sb.append(" x ");
        sb.append(this.f819);
        sb.append(")");
        return sb.toString();
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public void m469() {
        if (this.f896 == null) {
            this.f896 = new C2094(this);
        }
        if (this.f835 == null) {
            this.f835 = new C2093(this);
        }
    }

    /* renamed from: Ԕ  reason: contains not printable characters */
    public boolean m470() {
        return this.f900 && this.f840 != 8;
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public boolean m471() {
        return this.f871 || (this.f885.f806 && this.f841.f806);
    }

    /* renamed from: ݜ  reason: contains not printable characters */
    public void m472() {
        this.f850 = false;
        this.f871 = false;
        int size = this.f831.size();
        for (int i = 0; i < size; i++) {
            ConstraintAnchor constraintAnchor = this.f831.get(i);
            constraintAnchor.f806 = false;
            constraintAnchor.f809 = 0;
        }
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public WidgetRun m474(int i) {
        if (i == 0) {
            return this.f896;
        }
        if (i == 1) {
            return this.f835;
        }
        return null;
    }

    /* renamed from: ᓣ  reason: contains not printable characters */
    public void m475() {
        this.f820.m458();
        this.f885.m458();
        this.f833.m458();
        this.f841.m458();
        this.f897.m458();
        this.f872.m458();
        this.f895.m458();
        this.f821.m458();
        this.f867 = null;
        this.f903 = 0.0f;
        this.f873 = 0;
        this.f819 = 0;
        this.f842 = 0.0f;
        this.f855 = -1;
        this.f822 = 0;
        this.f892 = 0;
        this.f860 = 0;
        this.f830 = 0;
        this.f865 = 0;
        this.f880 = 0;
        this.f832 = 0;
        float f = f816;
        this.f878 = f;
        this.f888 = f;
        DimensionBehaviour[] dimensionBehaviourArr = this.f886;
        DimensionBehaviour dimensionBehaviour = DimensionBehaviour.FIXED;
        dimensionBehaviourArr[0] = dimensionBehaviour;
        dimensionBehaviourArr[1] = dimensionBehaviour;
        this.f826 = null;
        this.f828 = 0;
        this.f840 = 0;
        this.f870 = null;
        this.f869 = false;
        this.f851 = false;
        this.f898 = 0;
        this.f834 = 0;
        this.f825 = false;
        this.f857 = false;
        float[] fArr = this.f883;
        fArr[0] = -1.0f;
        fArr[1] = -1.0f;
        this.f902 = -1;
        this.f823 = -1;
        int[] iArr = this.f884;
        iArr[0] = Integer.MAX_VALUE;
        iArr[1] = Integer.MAX_VALUE;
        this.f874 = 0;
        this.f827 = 0;
        this.f901 = 1.0f;
        this.f846 = 1.0f;
        this.f829 = Integer.MAX_VALUE;
        this.f894 = Integer.MAX_VALUE;
        this.f877 = 0;
        this.f824 = 0;
        this.f864 = -1;
        this.f866 = 1.0f;
        boolean[] zArr = this.f891;
        zArr[0] = true;
        zArr[1] = true;
        this.f863 = false;
        boolean[] zArr2 = this.f837;
        zArr2[0] = false;
        zArr2[1] = false;
        this.f900 = true;
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public int m476() {
        ConstraintWidget constraintWidget = this.f867;
        if (constraintWidget == null || !(constraintWidget instanceof C2082)) {
            return this.f892;
        }
        return ((C2082) constraintWidget).f7187 + this.f892;
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public int m478() {
        if (this.f840 == 8) {
            return 0;
        }
        return this.f873;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m481(int i, int i2) {
        ConstraintAnchor constraintAnchor = this.f885;
        constraintAnchor.f809 = i;
        constraintAnchor.f806 = true;
        ConstraintAnchor constraintAnchor2 = this.f841;
        constraintAnchor2.f809 = i2;
        constraintAnchor2.f806 = true;
        this.f892 = i;
        this.f819 = i2 - i;
        if (this.f852) {
            this.f897.m460(i + this.f865);
        }
        this.f871 = true;
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public int m485() {
        return m506() + this.f873;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m489(int i, int i2) {
        ConstraintAnchor constraintAnchor = this.f820;
        constraintAnchor.f809 = i;
        constraintAnchor.f806 = true;
        ConstraintAnchor constraintAnchor2 = this.f833;
        constraintAnchor2.f809 = i2;
        constraintAnchor2.f806 = true;
        this.f822 = i;
        this.f873 = i2 - i;
        this.f850 = true;
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public void m502(int i) {
        this.f873 = i;
        int i2 = this.f873;
        int i3 = this.f880;
        if (i2 < i3) {
            this.f873 = i3;
        }
    }

    /* renamed from: 㗗  reason: contains not printable characters */
    public boolean m504() {
        return this.f850 || (this.f820.f806 && this.f833.f806);
    }

    /* renamed from: 㗽  reason: contains not printable characters */
    public void m505() {
        ConstraintWidget constraintWidget = this.f867;
        if (constraintWidget != null && (constraintWidget instanceof C2082)) {
            ((C2082) constraintWidget).m5470();
        }
        int size = this.f831.size();
        for (int i = 0; i < size; i++) {
            this.f831.get(i).m458();
        }
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public int m506() {
        ConstraintWidget constraintWidget = this.f867;
        if (constraintWidget == null || !(constraintWidget instanceof C2082)) {
            return this.f822;
        }
        return ((C2082) constraintWidget).f7184 + this.f822;
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public boolean m509(int i) {
        if (i == 0) {
            return (this.f820.f812 != null ? 1 : 0) + (this.f833.f812 != null ? 1 : 0) < 2;
        }
        if ((this.f885.f812 != null ? 1 : 0) + (this.f841.f812 != null ? 1 : 0) + (this.f897.f812 != null ? 1 : 0) < 2) {
            return true;
        }
        return false;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public int m510() {
        return m476() + this.f819;
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public void m513(int i) {
        this.f865 = i;
        this.f852 = i > 0;
    }

    /* renamed from: 䁗  reason: contains not printable characters */
    public boolean m514() {
        ConstraintAnchor constraintAnchor = this.f885;
        ConstraintAnchor constraintAnchor2 = constraintAnchor.f812;
        if (constraintAnchor2 != null && constraintAnchor2.f812 == constraintAnchor) {
            return true;
        }
        ConstraintAnchor constraintAnchor3 = this.f841;
        ConstraintAnchor constraintAnchor4 = constraintAnchor3.f812;
        return constraintAnchor4 != null && constraintAnchor4.f812 == constraintAnchor3;
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final boolean m486(int i) {
        int i2 = i * 2;
        ConstraintAnchor[] constraintAnchorArr = this.f856;
        if (!(constraintAnchorArr[i2].f812 == null || constraintAnchorArr[i2].f812.f812 == constraintAnchorArr[i2])) {
            int i3 = i2 + 1;
            return constraintAnchorArr[i3].f812 != null && constraintAnchorArr[i3].f812.f812 == constraintAnchorArr[i3];
        }
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public ConstraintWidget m511(int i) {
        ConstraintAnchor constraintAnchor;
        ConstraintAnchor constraintAnchor2;
        if (i == 0) {
            ConstraintAnchor constraintAnchor3 = this.f820;
            ConstraintAnchor constraintAnchor4 = constraintAnchor3.f812;
            if (constraintAnchor4 == null || constraintAnchor4.f812 != constraintAnchor3) {
                return null;
            }
            return constraintAnchor4.f813;
        } else if (i == 1 && (constraintAnchor2 = (constraintAnchor = this.f885).f812) != null && constraintAnchor2.f812 == constraintAnchor) {
            return constraintAnchor2.f813;
        } else {
            return null;
        }
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public int m473() {
        if (this.f840 == 8) {
            return 0;
        }
        return this.f819;
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public void m479(int i) {
        this.f819 = i;
        int i2 = this.f819;
        int i3 = this.f832;
        if (i2 < i3) {
            this.f819 = i3;
        }
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public DimensionBehaviour m508() {
        return this.f886[0];
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public DimensionBehaviour m512() {
        return this.f886[1];
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public void m477(int i) {
        if (i < 0) {
            this.f880 = 0;
        } else {
            this.f880 = i;
        }
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public boolean m503() {
        ConstraintAnchor constraintAnchor = this.f820;
        ConstraintAnchor constraintAnchor2 = constraintAnchor.f812;
        if (constraintAnchor2 != null && constraintAnchor2.f812 == constraintAnchor) {
            return true;
        }
        ConstraintAnchor constraintAnchor3 = this.f833;
        ConstraintAnchor constraintAnchor4 = constraintAnchor3.f812;
        return constraintAnchor4 != null && constraintAnchor4.f812 == constraintAnchor3;
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public void m507(int i) {
        if (i < 0) {
            this.f832 = 0;
        } else {
            this.f832 = i;
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public ConstraintWidget m468(int i) {
        ConstraintAnchor constraintAnchor;
        ConstraintAnchor constraintAnchor2;
        if (i == 0) {
            ConstraintAnchor constraintAnchor3 = this.f833;
            ConstraintAnchor constraintAnchor4 = constraintAnchor3.f812;
            if (constraintAnchor4 == null || constraintAnchor4.f812 != constraintAnchor3) {
                return null;
            }
            return constraintAnchor4.f813;
        } else if (i == 1 && (constraintAnchor2 = (constraintAnchor = this.f841).f812) != null && constraintAnchor2.f812 == constraintAnchor) {
            return constraintAnchor2.f813;
        } else {
            return null;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m492(ConstraintAnchor constraintAnchor, ConstraintAnchor constraintAnchor2, int i) {
        if (constraintAnchor.f813 == this) {
            m490(constraintAnchor.f807, constraintAnchor2.f813, constraintAnchor2.f807, i);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public boolean m484() {
        return this.f840 != 8;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public DimensionBehaviour m480(int i) {
        if (i == 0) {
            return m508();
        }
        if (i == 1) {
            return m512();
        }
        return null;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m482(DimensionBehaviour dimensionBehaviour) {
        this.f886[1] = dimensionBehaviour;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m495(C2071 r1) {
        this.f820.m467();
        this.f885.m467();
        this.f833.m467();
        this.f841.m467();
        this.f897.m467();
        this.f821.m467();
        this.f872.m467();
        this.f895.m467();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public void m483(C2080 r7, boolean z) {
        int i;
        int i2;
        C2093 r8;
        C2094 r3;
        int r0 = r7.m5446(this.f820);
        int r1 = r7.m5446(this.f885);
        int r2 = r7.m5446(this.f833);
        int r72 = r7.m5446(this.f841);
        if (z && (r3 = this.f896) != null) {
            DependencyNode dependencyNode = r3.f928;
            if (dependencyNode.f914) {
                DependencyNode dependencyNode2 = r3.f921;
                if (dependencyNode2.f914) {
                    r0 = dependencyNode.f911;
                    r2 = dependencyNode2.f911;
                }
            }
        }
        if (z && (r8 = this.f835) != null) {
            DependencyNode dependencyNode3 = r8.f928;
            if (dependencyNode3.f914) {
                DependencyNode dependencyNode4 = r8.f921;
                if (dependencyNode4.f914) {
                    r1 = dependencyNode3.f911;
                    r72 = dependencyNode4.f911;
                }
            }
        }
        int i3 = r72 - r1;
        if (r2 - r0 < 0 || i3 < 0 || r0 == Integer.MIN_VALUE || r0 == Integer.MAX_VALUE || r1 == Integer.MIN_VALUE || r1 == Integer.MAX_VALUE || r2 == Integer.MIN_VALUE || r2 == Integer.MAX_VALUE || r72 == Integer.MIN_VALUE || r72 == Integer.MAX_VALUE) {
            r72 = 0;
            r0 = 0;
            r1 = 0;
            r2 = 0;
        }
        int i4 = r2 - r0;
        int i5 = r72 - r1;
        this.f822 = r0;
        this.f892 = r1;
        if (this.f840 == 8) {
            this.f873 = 0;
            this.f819 = 0;
            return;
        }
        if (this.f886[0] != DimensionBehaviour.FIXED || i4 >= (i = this.f873)) {
            i = i4;
        }
        if (this.f886[1] == DimensionBehaviour.FIXED && i5 < (i2 = this.f819)) {
            i5 = i2;
        }
        this.f873 = i;
        this.f819 = i5;
        int i6 = this.f819;
        int i7 = this.f832;
        if (i6 < i7) {
            this.f819 = i7;
        }
        int i8 = this.f873;
        int i9 = this.f880;
        if (i8 < i9) {
            this.f873 = i9;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m496(C2080 r2) {
        r2.m5454(this.f820);
        r2.m5454(this.f885);
        r2.m5454(this.f833);
        r2.m5454(this.f841);
        if (this.f865 > 0) {
            r2.m5454(this.f897);
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public float m487(int i) {
        if (i == 0) {
            return this.f878;
        }
        if (i == 1) {
            return this.f888;
        }
        return -1.0f;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m491(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2, int i, int i2) {
        m488(type).m464(constraintWidget.m488(type2), i, i2, true);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m490(ConstraintAnchor.Type type, ConstraintWidget constraintWidget, ConstraintAnchor.Type type2, int i) {
        boolean z;
        ConstraintAnchor.Type type3 = ConstraintAnchor.Type.CENTER;
        if (type == type3) {
            if (type2 == type3) {
                ConstraintAnchor r4 = m488(ConstraintAnchor.Type.LEFT);
                ConstraintAnchor r6 = m488(ConstraintAnchor.Type.RIGHT);
                ConstraintAnchor r7 = m488(ConstraintAnchor.Type.TOP);
                ConstraintAnchor r0 = m488(ConstraintAnchor.Type.BOTTOM);
                boolean z2 = true;
                if ((r4 == null || !r4.m465()) && (r6 == null || !r6.m465())) {
                    ConstraintAnchor.Type type4 = ConstraintAnchor.Type.LEFT;
                    m490(type4, constraintWidget, type4, 0);
                    ConstraintAnchor.Type type5 = ConstraintAnchor.Type.RIGHT;
                    m490(type5, constraintWidget, type5, 0);
                    z = true;
                } else {
                    z = false;
                }
                if ((r7 == null || !r7.m465()) && (r0 == null || !r0.m465())) {
                    ConstraintAnchor.Type type6 = ConstraintAnchor.Type.TOP;
                    m490(type6, constraintWidget, type6, 0);
                    ConstraintAnchor.Type type7 = ConstraintAnchor.Type.BOTTOM;
                    m490(type7, constraintWidget, type7, 0);
                } else {
                    z2 = false;
                }
                if (z && z2) {
                    m488(ConstraintAnchor.Type.CENTER).m463(constraintWidget.m488(ConstraintAnchor.Type.CENTER), 0);
                } else if (z) {
                    m488(ConstraintAnchor.Type.CENTER_X).m463(constraintWidget.m488(ConstraintAnchor.Type.CENTER_X), 0);
                } else if (z2) {
                    m488(ConstraintAnchor.Type.CENTER_Y).m463(constraintWidget.m488(ConstraintAnchor.Type.CENTER_Y), 0);
                }
            } else if (type2 == ConstraintAnchor.Type.LEFT || type2 == ConstraintAnchor.Type.RIGHT) {
                m490(ConstraintAnchor.Type.LEFT, constraintWidget, type2, 0);
                m490(ConstraintAnchor.Type.RIGHT, constraintWidget, type2, 0);
                m488(ConstraintAnchor.Type.CENTER).m463(constraintWidget.m488(type2), 0);
            } else if (type2 == ConstraintAnchor.Type.TOP || type2 == ConstraintAnchor.Type.BOTTOM) {
                m490(ConstraintAnchor.Type.TOP, constraintWidget, type2, 0);
                m490(ConstraintAnchor.Type.BOTTOM, constraintWidget, type2, 0);
                m488(ConstraintAnchor.Type.CENTER).m463(constraintWidget.m488(type2), 0);
            }
        } else if (type == ConstraintAnchor.Type.CENTER_X && (type2 == ConstraintAnchor.Type.LEFT || type2 == ConstraintAnchor.Type.RIGHT)) {
            ConstraintAnchor r42 = m488(ConstraintAnchor.Type.LEFT);
            ConstraintAnchor r5 = constraintWidget.m488(type2);
            ConstraintAnchor r62 = m488(ConstraintAnchor.Type.RIGHT);
            r42.m463(r5, 0);
            r62.m463(r5, 0);
            m488(ConstraintAnchor.Type.CENTER_X).m463(r5, 0);
        } else if (type == ConstraintAnchor.Type.CENTER_Y && (type2 == ConstraintAnchor.Type.TOP || type2 == ConstraintAnchor.Type.BOTTOM)) {
            ConstraintAnchor r43 = constraintWidget.m488(type2);
            m488(ConstraintAnchor.Type.TOP).m463(r43, 0);
            m488(ConstraintAnchor.Type.BOTTOM).m463(r43, 0);
            m488(ConstraintAnchor.Type.CENTER_Y).m463(r43, 0);
        } else {
            ConstraintAnchor.Type type8 = ConstraintAnchor.Type.CENTER_X;
            if (type == type8 && type2 == type8) {
                m488(ConstraintAnchor.Type.LEFT).m463(constraintWidget.m488(ConstraintAnchor.Type.LEFT), 0);
                m488(ConstraintAnchor.Type.RIGHT).m463(constraintWidget.m488(ConstraintAnchor.Type.RIGHT), 0);
                m488(ConstraintAnchor.Type.CENTER_X).m463(constraintWidget.m488(type2), 0);
                return;
            }
            ConstraintAnchor.Type type9 = ConstraintAnchor.Type.CENTER_Y;
            if (type == type9 && type2 == type9) {
                m488(ConstraintAnchor.Type.TOP).m463(constraintWidget.m488(ConstraintAnchor.Type.TOP), 0);
                m488(ConstraintAnchor.Type.BOTTOM).m463(constraintWidget.m488(ConstraintAnchor.Type.BOTTOM), 0);
                m488(ConstraintAnchor.Type.CENTER_Y).m463(constraintWidget.m488(type2), 0);
                return;
            }
            ConstraintAnchor r02 = m488(type);
            ConstraintAnchor r52 = constraintWidget.m488(type2);
            if (r02.m462(r52)) {
                if (type == ConstraintAnchor.Type.BASELINE) {
                    ConstraintAnchor r44 = m488(ConstraintAnchor.Type.TOP);
                    ConstraintAnchor r63 = m488(ConstraintAnchor.Type.BOTTOM);
                    if (r44 != null) {
                        r44.m458();
                    }
                    if (r63 != null) {
                        r63.m458();
                    }
                    i = 0;
                } else if (type == ConstraintAnchor.Type.TOP || type == ConstraintAnchor.Type.BOTTOM) {
                    ConstraintAnchor r64 = m488(ConstraintAnchor.Type.BASELINE);
                    if (r64 != null) {
                        r64.m458();
                    }
                    ConstraintAnchor r65 = m488(ConstraintAnchor.Type.CENTER);
                    if (r65.f812 != r52) {
                        r65.m458();
                    }
                    ConstraintAnchor r45 = m488(type).m454();
                    ConstraintAnchor r66 = m488(ConstraintAnchor.Type.CENTER_Y);
                    if (r66.m465()) {
                        r45.m458();
                        r66.m458();
                    }
                } else if (type == ConstraintAnchor.Type.LEFT || type == ConstraintAnchor.Type.RIGHT) {
                    ConstraintAnchor r67 = m488(ConstraintAnchor.Type.CENTER);
                    if (r67.f812 != r52) {
                        r67.m458();
                    }
                    ConstraintAnchor r46 = m488(type).m454();
                    ConstraintAnchor r68 = m488(ConstraintAnchor.Type.CENTER_X);
                    if (r68.m465()) {
                        r46.m458();
                        r68.m458();
                    }
                }
                r02.m463(r52, i);
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public ConstraintAnchor m488(ConstraintAnchor.Type type) {
        switch (type.ordinal()) {
            case 0:
                return null;
            case 1:
                return this.f820;
            case 2:
                return this.f885;
            case 3:
                return this.f833;
            case 4:
                return this.f841;
            case 5:
                return this.f897;
            case 6:
                return this.f821;
            case 7:
                return this.f872;
            case 8:
                return this.f895;
            default:
                throw new AssertionError(type.name());
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m493(DimensionBehaviour dimensionBehaviour) {
        this.f886[0] = dimensionBehaviour;
    }

    /* JADX WARNING: Removed duplicated region for block: B:234:0x039b  */
    /* JADX WARNING: Removed duplicated region for block: B:238:0x03a5  */
    /* JADX WARNING: Removed duplicated region for block: B:241:0x03aa  */
    /* JADX WARNING: Removed duplicated region for block: B:248:0x03bf  */
    /* JADX WARNING: Removed duplicated region for block: B:253:0x03ca  */
    /* JADX WARNING: Removed duplicated region for block: B:254:0x03cd  */
    /* JADX WARNING: Removed duplicated region for block: B:267:0x03ff  */
    /* JADX WARNING: Removed duplicated region for block: B:290:0x04cf  */
    /* JADX WARNING: Removed duplicated region for block: B:307:0x0533  */
    /* JADX WARNING: Removed duplicated region for block: B:311:0x0547  */
    /* JADX WARNING: Removed duplicated region for block: B:313:0x054a  */
    /* JADX WARNING: Removed duplicated region for block: B:348:0x05d7  */
    /* JADX WARNING: Removed duplicated region for block: B:349:0x05da  */
    /* JADX WARNING: Removed duplicated region for block: B:353:0x0620  */
    /* JADX WARNING: Removed duplicated region for block: B:357:0x064b  */
    /* JADX WARNING: Removed duplicated region for block: B:360:0x0655  */
    /* renamed from: K  reason: contains not printable characters */
    public void m497(C2080 r52, boolean z) {
        boolean z2;
        boolean z3;
        boolean z4;
        boolean z5;
        int i;
        boolean z6;
        int i2;
        int i3;
        boolean z7;
        int i4;
        SolverVariable solverVariable;
        SolverVariable solverVariable2;
        SolverVariable solverVariable3;
        SolverVariable solverVariable4;
        SolverVariable solverVariable5;
        ConstraintWidget constraintWidget;
        C2080 r14;
        SolverVariable solverVariable6;
        SolverVariable solverVariable7;
        char c;
        int i5;
        boolean z8;
        int i6;
        SolverVariable solverVariable8;
        SolverVariable solverVariable9;
        SolverVariable solverVariable10;
        ConstraintWidget constraintWidget2;
        boolean z9;
        C2094 r0;
        int i7;
        boolean z10;
        boolean z11;
        C2094 r02;
        C2093 r1;
        ConstraintWidget constraintWidget3;
        ConstraintWidget constraintWidget4;
        boolean z12;
        SolverVariable r13 = r52.m5454(this.f820);
        SolverVariable r12 = r52.m5454(this.f833);
        SolverVariable r11 = r52.m5454(this.f885);
        SolverVariable r10 = r52.m5454(this.f841);
        SolverVariable r9 = r52.m5454(this.f897);
        ConstraintWidget constraintWidget5 = this.f867;
        if (constraintWidget5 != null) {
            boolean z13 = constraintWidget5 != null && constraintWidget5.f886[0] == DimensionBehaviour.WRAP_CONTENT;
            ConstraintWidget constraintWidget6 = this.f867;
            z3 = z13;
            z2 = constraintWidget6 != null && constraintWidget6.f886[1] == DimensionBehaviour.WRAP_CONTENT;
        } else {
            z3 = false;
            z2 = false;
        }
        if (this.f840 == 8) {
            int size = this.f831.size();
            int i8 = 0;
            while (true) {
                if (i8 >= size) {
                    z12 = false;
                    break;
                } else if (this.f831.get(i8).m455()) {
                    z12 = true;
                    break;
                } else {
                    i8++;
                }
            }
            if (!z12) {
                boolean[] zArr = this.f837;
                if (!zArr[0] && !zArr[1]) {
                    return;
                }
            }
        }
        if (this.f850 || this.f871) {
            if (this.f850) {
                r52.m5457(r13, this.f822);
                r52.m5457(r12, this.f822 + this.f873);
                if (z3 && (constraintWidget4 = this.f867) != null) {
                    if (this.f889) {
                        C2082 r03 = (C2082) constraintWidget4;
                        r03.m5468(this.f820);
                        r03.m5475(this.f833);
                    } else {
                        r52.m5449(r52.m5454(constraintWidget4.f833), r12, 0, 5);
                    }
                }
            }
            if (this.f871) {
                r52.m5457(r11, this.f892);
                r52.m5457(r10, this.f892 + this.f819);
                if (this.f897.m455()) {
                    r52.m5457(r9, this.f892 + this.f865);
                }
                if (z2 && (constraintWidget3 = this.f867) != null) {
                    if (this.f889) {
                        C2082 r04 = (C2082) constraintWidget3;
                        r04.m5468(this.f885);
                        r04.m5473(this.f841);
                    } else {
                        r52.m5449(r52.m5454(constraintWidget3.f841), r10, 0, 5);
                    }
                }
            }
            if (this.f850 && this.f871) {
                this.f850 = false;
                this.f871 = false;
                return;
            }
        }
        if (!(!z || (r02 = this.f896) == null || (r1 = this.f835) == null)) {
            DependencyNode dependencyNode = r02.f928;
            if (dependencyNode.f914 && r02.f921.f914 && r1.f928.f914 && r1.f921.f914) {
                r52.m5457(r13, dependencyNode.f911);
                r52.m5457(r12, this.f896.f921.f911);
                r52.m5457(r11, this.f835.f928.f911);
                r52.m5457(r10, this.f835.f921.f911);
                r52.m5457(r9, this.f835.f7237.f911);
                if (this.f867 != null) {
                    if (z3 && this.f891[0] && !m503()) {
                        r52.m5449(r52.m5454(this.f867.f833), r12, 0, 8);
                    }
                    if (z2 && this.f891[1] && !m514()) {
                        r52.m5449(r52.m5454(this.f867.f841), r10, 0, 8);
                    }
                }
                this.f850 = false;
                this.f871 = false;
                return;
            }
        }
        if (this.f867 != null) {
            if (m486(0)) {
                ((C2082) this.f867).m5476(this, 0);
                z10 = true;
            } else {
                z10 = m503();
            }
            if (m486(1)) {
                ((C2082) this.f867).m5476(this, 1);
                z11 = true;
            } else {
                z11 = m514();
            }
            if (!z10 && z3 && this.f840 != 8 && this.f820.f812 == null && this.f833.f812 == null) {
                r52.m5449(r52.m5454(this.f867.f833), r12, 0, 1);
            }
            if (!z11 && z2 && this.f840 != 8 && this.f885.f812 == null && this.f841.f812 == null && this.f897 == null) {
                r52.m5449(r52.m5454(this.f867.f841), r10, 0, 1);
            }
            z5 = z10;
            z4 = z11;
        } else {
            z5 = false;
            z4 = false;
        }
        int i9 = this.f873;
        int i10 = this.f880;
        if (i9 < i10) {
            i9 = i10;
        }
        int i11 = this.f819;
        int i12 = this.f832;
        if (i11 < i12) {
            i11 = i12;
        }
        boolean z14 = this.f886[0] != DimensionBehaviour.MATCH_CONSTRAINT;
        boolean z15 = this.f886[1] != DimensionBehaviour.MATCH_CONSTRAINT;
        this.f864 = this.f855;
        float f = this.f842;
        this.f866 = f;
        int i13 = this.f874;
        int i14 = this.f827;
        if (f <= 0.0f || this.f840 == 8) {
            i = i11;
            i3 = i13;
            i2 = i14;
        } else {
            if (this.f886[0] == DimensionBehaviour.MATCH_CONSTRAINT && i13 == 0) {
                i13 = 3;
            }
            if (this.f886[1] == DimensionBehaviour.MATCH_CONSTRAINT && i14 == 0) {
                i14 = 3;
            }
            DimensionBehaviour[] dimensionBehaviourArr = this.f886;
            DimensionBehaviour dimensionBehaviour = dimensionBehaviourArr[0];
            DimensionBehaviour dimensionBehaviour2 = DimensionBehaviour.MATCH_CONSTRAINT;
            if (dimensionBehaviour == dimensionBehaviour2 && dimensionBehaviourArr[1] == dimensionBehaviour2 && i13 == 3 && i14 == 3) {
                if (this.f864 == -1) {
                    if (z14 && !z15) {
                        this.f864 = 0;
                    } else if (!z14 && z15) {
                        this.f864 = 1;
                        if (this.f855 == -1) {
                            this.f866 = 1.0f / this.f866;
                        }
                    }
                }
                if (this.f864 == 0 && (!this.f885.m465() || !this.f841.m465())) {
                    this.f864 = 1;
                } else if (this.f864 == 1 && (!this.f820.m465() || !this.f833.m465())) {
                    this.f864 = 0;
                }
                if (this.f864 == -1 && (!this.f885.m465() || !this.f841.m465() || !this.f820.m465() || !this.f833.m465())) {
                    if (this.f885.m465() && this.f841.m465()) {
                        this.f864 = 0;
                    } else if (this.f820.m465() && this.f833.m465()) {
                        this.f866 = 1.0f / this.f866;
                        this.f864 = 1;
                    }
                }
                if (this.f864 == -1) {
                    if (this.f877 > 0 && this.f824 == 0) {
                        this.f864 = 0;
                    } else if (this.f877 == 0 && this.f824 > 0) {
                        this.f866 = 1.0f / this.f866;
                        this.f864 = 1;
                    }
                }
            } else {
                DimensionBehaviour[] dimensionBehaviourArr2 = this.f886;
                DimensionBehaviour dimensionBehaviour3 = dimensionBehaviourArr2[0];
                DimensionBehaviour dimensionBehaviour4 = DimensionBehaviour.MATCH_CONSTRAINT;
                if (dimensionBehaviour3 == dimensionBehaviour4 && i13 == 3) {
                    this.f864 = 0;
                    i9 = (int) (this.f866 * ((float) this.f819));
                    if (dimensionBehaviourArr2[1] != dimensionBehaviour4) {
                        i = i11;
                        i2 = i14;
                        i3 = 4;
                    }
                } else if (this.f886[1] == DimensionBehaviour.MATCH_CONSTRAINT && i14 == 3) {
                    this.f864 = 1;
                    if (this.f855 == -1) {
                        this.f866 = 1.0f / this.f866;
                    }
                    i11 = (int) (this.f866 * ((float) this.f873));
                    if (this.f886[0] != DimensionBehaviour.MATCH_CONSTRAINT) {
                        i = i11;
                        i3 = i13;
                        i2 = 4;
                    }
                }
            }
            i = i11;
            i3 = i13;
            i2 = i14;
            z6 = true;
            int[] iArr = this.f847;
            iArr[0] = i3;
            iArr[1] = i2;
            if (!z6) {
                int i15 = this.f864;
                i4 = -1;
                if (i15 == 0 || i15 == -1) {
                    z7 = true;
                    boolean z16 = !z6 && ((i7 = this.f864) == 1 || i7 == i4);
                    boolean z17 = this.f886[0] != DimensionBehaviour.WRAP_CONTENT && (this instanceof C2082);
                    int i16 = z17 ? 0 : i9;
                    boolean z18 = !this.f821.m465();
                    boolean[] zArr2 = this.f837;
                    boolean z19 = zArr2[0];
                    boolean z20 = zArr2[1];
                    if (this.f902 != 2 && !this.f850) {
                        if (z && (r0 = this.f896) != null) {
                            DependencyNode dependencyNode2 = r0.f928;
                            if (dependencyNode2.f914 && r0.f921.f914) {
                                if (z) {
                                    r52.m5457(r13, dependencyNode2.f911);
                                    r52.m5457(r12, this.f896.f921.f911);
                                    if (this.f867 != null && z3 && this.f891[0] && !m503()) {
                                        r52.m5449(r52.m5454(this.f867.f833), r12, 0, 8);
                                    }
                                }
                            }
                        }
                        ConstraintWidget constraintWidget7 = this.f867;
                        SolverVariable r7 = constraintWidget7 != null ? r52.m5454(constraintWidget7.f833) : null;
                        ConstraintWidget constraintWidget8 = this.f867;
                        SolverVariable r18 = constraintWidget8 != null ? r52.m5454(constraintWidget8.f820) : null;
                        boolean z21 = this.f891[0];
                        DimensionBehaviour[] dimensionBehaviourArr3 = this.f886;
                        solverVariable3 = r9;
                        solverVariable2 = r10;
                        solverVariable = r11;
                        solverVariable5 = r12;
                        solverVariable4 = r13;
                        m498(r52, true, z3, z2, z21, r18, r7, dimensionBehaviourArr3[0], z17, this.f820, this.f833, this.f822, i16, this.f880, this.f884[0], this.f878, z7, dimensionBehaviourArr3[1] == DimensionBehaviour.MATCH_CONSTRAINT, z5, z4, z19, i3, i2, this.f877, this.f829, this.f901, z18);
                        if (!z) {
                            constraintWidget = this;
                            C2093 r05 = constraintWidget.f835;
                            if (r05 != null) {
                                DependencyNode dependencyNode3 = r05.f928;
                                if (dependencyNode3.f914 && r05.f921.f914) {
                                    r14 = r52;
                                    solverVariable6 = solverVariable;
                                    r14.m5457(solverVariable6, dependencyNode3.f911);
                                    solverVariable7 = solverVariable2;
                                    r14.m5457(solverVariable7, constraintWidget.f835.f921.f911);
                                    solverVariable8 = solverVariable3;
                                    r14.m5457(solverVariable8, constraintWidget.f835.f7237.f911);
                                    ConstraintWidget constraintWidget9 = constraintWidget.f867;
                                    if (constraintWidget9 == null || z4 || !z2) {
                                        i6 = 8;
                                        i5 = 0;
                                        c = 1;
                                    } else {
                                        c = 1;
                                        if (constraintWidget.f891[1]) {
                                            i6 = 8;
                                            i5 = 0;
                                            r14.m5449(r14.m5454(constraintWidget9.f841), solverVariable7, 0, 8);
                                        } else {
                                            i6 = 8;
                                            i5 = 0;
                                        }
                                    }
                                    z8 = false;
                                    if (constraintWidget.f823 == 2) {
                                        z8 = false;
                                    }
                                    if (z8 || constraintWidget.f871) {
                                        solverVariable10 = solverVariable7;
                                        solverVariable9 = solverVariable6;
                                    } else {
                                        boolean z22 = constraintWidget.f886[c] == DimensionBehaviour.WRAP_CONTENT && (constraintWidget instanceof C2082);
                                        if (z22) {
                                            i = 0;
                                        }
                                        ConstraintWidget constraintWidget10 = constraintWidget.f867;
                                        SolverVariable r72 = constraintWidget10 != null ? r14.m5454(constraintWidget10.f841) : null;
                                        ConstraintWidget constraintWidget11 = constraintWidget.f867;
                                        SolverVariable r6 = constraintWidget11 != null ? r14.m5454(constraintWidget11.f885) : null;
                                        if (constraintWidget.f865 > 0 || constraintWidget.f840 == i6) {
                                            if (constraintWidget.f897.f812 != null) {
                                                r14.m5455(solverVariable8, solverVariable6, constraintWidget.f865, i6);
                                                r14.m5455(solverVariable8, r14.m5454(constraintWidget.f897.f812), i5, i6);
                                                if (z2) {
                                                    r14.m5449(r72, r14.m5454(constraintWidget.f841), i5, 5);
                                                }
                                                z9 = false;
                                                boolean z23 = constraintWidget.f891[c];
                                                DimensionBehaviour[] dimensionBehaviourArr4 = constraintWidget.f886;
                                                solverVariable10 = solverVariable7;
                                                solverVariable9 = solverVariable6;
                                                m498(r52, false, z2, z3, z23, r6, r72, dimensionBehaviourArr4[c], z22, constraintWidget.f885, constraintWidget.f841, constraintWidget.f892, i, constraintWidget.f832, constraintWidget.f884[c], constraintWidget.f888, z16, dimensionBehaviourArr4[0] != DimensionBehaviour.MATCH_CONSTRAINT, z4, z5, z20, i2, i3, constraintWidget.f824, constraintWidget.f894, constraintWidget.f846, z9);
                                            } else if (constraintWidget.f840 == i6) {
                                                r14.m5455(solverVariable8, solverVariable6, i5, i6);
                                            } else {
                                                r14.m5455(solverVariable8, solverVariable6, constraintWidget.f865, i6);
                                            }
                                        }
                                        z9 = z18;
                                        boolean z232 = constraintWidget.f891[c];
                                        DimensionBehaviour[] dimensionBehaviourArr42 = constraintWidget.f886;
                                        solverVariable10 = solverVariable7;
                                        solverVariable9 = solverVariable6;
                                        m498(r52, false, z2, z3, z232, r6, r72, dimensionBehaviourArr42[c], z22, constraintWidget.f885, constraintWidget.f841, constraintWidget.f892, i, constraintWidget.f832, constraintWidget.f884[c], constraintWidget.f888, z16, dimensionBehaviourArr42[0] != DimensionBehaviour.MATCH_CONSTRAINT, z4, z5, z20, i2, i3, constraintWidget.f824, constraintWidget.f894, constraintWidget.f846, z9);
                                    }
                                    if (z6) {
                                        constraintWidget2 = this;
                                        if (constraintWidget2.f864 == 1) {
                                            r52.m5459(solverVariable10, solverVariable9, solverVariable5, solverVariable4, constraintWidget2.f866, 8);
                                        } else {
                                            r52.m5459(solverVariable5, solverVariable4, solverVariable10, solverVariable9, constraintWidget2.f866, 8);
                                        }
                                    } else {
                                        constraintWidget2 = this;
                                    }
                                    if (constraintWidget2.f821.m465()) {
                                        ConstraintWidget constraintWidget12 = constraintWidget2.f821.f812.f813;
                                        int r2 = constraintWidget2.f821.m456();
                                        SolverVariable r92 = r52.m5454(constraintWidget2.m488(ConstraintAnchor.Type.LEFT));
                                        SolverVariable r112 = r52.m5454(constraintWidget2.m488(ConstraintAnchor.Type.TOP));
                                        SolverVariable r3 = r52.m5454(constraintWidget2.m488(ConstraintAnchor.Type.RIGHT));
                                        SolverVariable r122 = r52.m5454(constraintWidget2.m488(ConstraintAnchor.Type.BOTTOM));
                                        SolverVariable r5 = r52.m5454(constraintWidget12.m488(ConstraintAnchor.Type.LEFT));
                                        SolverVariable r132 = r52.m5454(constraintWidget12.m488(ConstraintAnchor.Type.TOP));
                                        SolverVariable r62 = r52.m5454(constraintWidget12.m488(ConstraintAnchor.Type.RIGHT));
                                        SolverVariable r142 = r52.m5454(constraintWidget12.m488(ConstraintAnchor.Type.BOTTOM));
                                        C2073 r06 = r52.m5448();
                                        double radians = (double) ((float) Math.toRadians((double) (constraintWidget2.f903 + 90.0f)));
                                        double d = (double) r2;
                                        r06.m5400(r112, r122, r132, r142, (float) (Math.sin(radians) * d));
                                        r52.m5461(r06);
                                        C2073 r07 = r52.m5448();
                                        r07.m5400(r92, r3, r5, r62, (float) (Math.cos(radians) * d));
                                        r52.m5461(r07);
                                    }
                                    this.f850 = false;
                                    this.f871 = false;
                                }
                            }
                            r14 = r52;
                            solverVariable8 = solverVariable3;
                            solverVariable7 = solverVariable2;
                            solverVariable6 = solverVariable;
                            i6 = 8;
                            i5 = 0;
                            c = 1;
                        } else {
                            i6 = 8;
                            i5 = 0;
                            c = 1;
                            constraintWidget = this;
                            r14 = r52;
                            solverVariable8 = solverVariable3;
                            solverVariable7 = solverVariable2;
                            solverVariable6 = solverVariable;
                        }
                        z8 = true;
                        if (constraintWidget.f823 == 2) {
                        }
                        if (z8) {
                        }
                        solverVariable10 = solverVariable7;
                        solverVariable9 = solverVariable6;
                        if (z6) {
                        }
                        if (constraintWidget2.f821.m465()) {
                        }
                        this.f850 = false;
                        this.f871 = false;
                    }
                    solverVariable3 = r9;
                    solverVariable2 = r10;
                    solverVariable = r11;
                    solverVariable5 = r12;
                    solverVariable4 = r13;
                    if (!z) {
                    }
                    z8 = true;
                    if (constraintWidget.f823 == 2) {
                    }
                    if (z8) {
                    }
                    solverVariable10 = solverVariable7;
                    solverVariable9 = solverVariable6;
                    if (z6) {
                    }
                    if (constraintWidget2.f821.m465()) {
                    }
                    this.f850 = false;
                    this.f871 = false;
                }
            } else {
                i4 = -1;
            }
            z7 = false;
            if (!z6) {
            }
            if (this.f886[0] != DimensionBehaviour.WRAP_CONTENT) {
            }
            if (z17) {
            }
            boolean z182 = !this.f821.m465();
            boolean[] zArr22 = this.f837;
            boolean z192 = zArr22[0];
            boolean z202 = zArr22[1];
            DependencyNode dependencyNode22 = r0.f928;
            if (z) {
            }
            solverVariable3 = r9;
            solverVariable2 = r10;
            solverVariable = r11;
            solverVariable5 = r12;
            solverVariable4 = r13;
            if (!z) {
            }
            z8 = true;
            if (constraintWidget.f823 == 2) {
            }
            if (z8) {
            }
            solverVariable10 = solverVariable7;
            solverVariable9 = solverVariable6;
            if (z6) {
            }
            if (constraintWidget2.f821.m465()) {
            }
            this.f850 = false;
            this.f871 = false;
        }
        z6 = false;
        int[] iArr2 = this.f847;
        iArr2[0] = i3;
        iArr2[1] = i2;
        if (!z6) {
        }
        z7 = false;
        if (!z6) {
        }
        if (this.f886[0] != DimensionBehaviour.WRAP_CONTENT) {
        }
        if (z17) {
        }
        boolean z1822 = !this.f821.m465();
        boolean[] zArr222 = this.f837;
        boolean z1922 = zArr222[0];
        boolean z2022 = zArr222[1];
        DependencyNode dependencyNode222 = r0.f928;
        if (z) {
        }
        solverVariable3 = r9;
        solverVariable2 = r10;
        solverVariable = r11;
        solverVariable5 = r12;
        solverVariable4 = r13;
        if (!z) {
        }
        z8 = true;
        if (constraintWidget.f823 == 2) {
        }
        if (z8) {
        }
        solverVariable10 = solverVariable7;
        solverVariable9 = solverVariable6;
        if (z6) {
        }
        if (constraintWidget2.f821.m465()) {
        }
        this.f850 = false;
        this.f871 = false;
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m501() {
        return (this instanceof C2100) || (this instanceof C2083);
    }

    /* JADX WARNING: Removed duplicated region for block: B:171:0x02b0  */
    /* JADX WARNING: Removed duplicated region for block: B:206:0x0356 A[ADDED_TO_REGION] */
    /* JADX WARNING: Removed duplicated region for block: B:211:0x0365  */
    /* JADX WARNING: Removed duplicated region for block: B:219:0x03a6  */
    /* JADX WARNING: Removed duplicated region for block: B:21:0x0067  */
    /* JADX WARNING: Removed duplicated region for block: B:222:0x03bd  */
    /* JADX WARNING: Removed duplicated region for block: B:226:0x03c6  */
    /* JADX WARNING: Removed duplicated region for block: B:22:0x006a  */
    /* JADX WARNING: Removed duplicated region for block: B:237:0x03f0  */
    /* JADX WARNING: Removed duplicated region for block: B:239:0x03f6 A[ADDED_TO_REGION] */
    /* JADX WARNING: Removed duplicated region for block: B:247:0x040b  */
    /* JADX WARNING: Removed duplicated region for block: B:24:0x006f  */
    /* JADX WARNING: Removed duplicated region for block: B:278:0x045b  */
    /* JADX WARNING: Removed duplicated region for block: B:285:0x046d A[ADDED_TO_REGION] */
    /* JADX WARNING: Removed duplicated region for block: B:296:0x048b A[ADDED_TO_REGION] */
    /* JADX WARNING: Removed duplicated region for block: B:315:0x04c9 A[ADDED_TO_REGION] */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x008d  */
    /* JADX WARNING: Removed duplicated region for block: B:343:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
    /* JADX WARNING: Removed duplicated region for block: B:347:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
    /* JADX WARNING: Removed duplicated region for block: B:43:0x00b4  */
    /* JADX WARNING: Removed duplicated region for block: B:97:0x01ad A[ADDED_TO_REGION] */
    /* renamed from: K  reason: contains not printable characters */
    public final void m498(C2080 r35, boolean z, boolean z2, boolean z3, boolean z4, SolverVariable solverVariable, SolverVariable solverVariable2, DimensionBehaviour dimensionBehaviour, boolean z5, ConstraintAnchor constraintAnchor, ConstraintAnchor constraintAnchor2, int i, int i2, int i3, int i4, float f, boolean z6, boolean z7, boolean z8, boolean z9, boolean z10, int i5, int i6, int i7, int i8, float f2, boolean z11) {
        int i9;
        SolverVariable solverVariable3;
        int i10;
        boolean z12;
        int i11;
        boolean z13;
        int i12;
        int i13;
        boolean z14;
        boolean z15;
        SolverVariable solverVariable4;
        SolverVariable solverVariable5;
        SolverVariable solverVariable6;
        int i14;
        ConstraintAnchor constraintAnchor3;
        DimensionBehaviour[] dimensionBehaviourArr;
        DimensionBehaviour dimensionBehaviour2;
        boolean z16;
        SolverVariable solverVariable7;
        int i15;
        ConstraintWidget constraintWidget;
        boolean z17;
        int i16;
        boolean z18;
        int i17;
        int i18;
        boolean z19;
        SolverVariable solverVariable8;
        boolean z20;
        boolean z21;
        int i19;
        SolverVariable solverVariable9;
        ConstraintWidget constraintWidget2;
        boolean z22;
        ConstraintWidget constraintWidget3;
        int i20;
        ConstraintWidget constraintWidget4;
        SolverVariable solverVariable10;
        ConstraintWidget constraintWidget5;
        int i21;
        int i22;
        ConstraintWidget constraintWidget6;
        int i23;
        boolean z23;
        int i24;
        boolean z24;
        boolean z25;
        SolverVariable solverVariable11;
        int i25;
        boolean z26;
        int i26;
        int i27;
        int i28;
        int i29;
        boolean z27;
        int i30;
        boolean z28;
        int i31;
        ConstraintWidget constraintWidget7;
        int i32;
        int i33;
        int i34;
        boolean z29;
        SolverVariable solverVariable12;
        SolverVariable solverVariable13;
        int i35 = i8;
        SolverVariable r9 = r35.m5454(constraintAnchor);
        SolverVariable r8 = r35.m5454(constraintAnchor2);
        SolverVariable r7 = r35.m5454(constraintAnchor.f812);
        SolverVariable r6 = r35.m5454(constraintAnchor2.f812);
        boolean r16 = constraintAnchor.m465();
        boolean r17 = constraintAnchor2.m465();
        boolean r18 = this.f821.m465();
        if (r17) {
            i9 = (r16 ? 1 : 0) + 1;
        } else {
            i9 = r16 ? 1 : 0;
        }
        if (r18) {
            i9++;
        }
        if (z6) {
            solverVariable3 = r6;
            i10 = 3;
        } else {
            i10 = i5;
            solverVariable3 = r6;
        }
        int ordinal = dimensionBehaviour.ordinal();
        if (ordinal != 0 && ordinal != 1 && ordinal == 2) {
            if (i10 != 4) {
                z12 = true;
                if (this.f840 != 8) {
                    z13 = false;
                    i11 = 0;
                } else {
                    z13 = z12;
                    i11 = i2;
                }
                if (z11) {
                    if (!r16 && !r17 && !r18) {
                        r35.m5457(r9, i);
                    } else if (r16 && !r17) {
                        i12 = 8;
                        r35.m5455(r9, r7, constraintAnchor.m456(), 8);
                        if (!z13) {
                            if (z5) {
                                r35.m5455(r8, r9, 0, 3);
                                if (i3 > 0) {
                                    r35.m5449(r8, r9, i3, 8);
                                }
                                if (i4 < Integer.MAX_VALUE) {
                                    r35.m5444(r8, r9, i4, 8);
                                }
                            } else {
                                r35.m5455(r8, r9, i11, i12);
                            }
                            z14 = z13;
                            i13 = i7;
                            i14 = i9;
                            solverVariable4 = r7;
                            solverVariable5 = r8;
                            solverVariable6 = solverVariable3;
                        } else if (i9 == 2 || z6 || !(i10 == 1 || i10 == 0)) {
                            int i36 = i7 == -2 ? i11 : i7;
                            int i37 = i35 == -2 ? i11 : i35;
                            if (i11 > 0 && i10 != 1) {
                                i11 = 0;
                            }
                            if (i36 > 0) {
                                r35.m5449(r8, r9, i36, 8);
                                i11 = Math.max(i11, i36);
                            }
                            if (i37 > 0) {
                                if (!z2 || i10 != 1) {
                                    i32 = 8;
                                    r35.m5444(r8, r9, i37, 8);
                                } else {
                                    i32 = 8;
                                }
                                i11 = Math.min(i11, i37);
                            } else {
                                i32 = 8;
                            }
                            if (i10 == 1) {
                                if (z2) {
                                    r35.m5455(r8, r9, i11, i32);
                                } else if (z8) {
                                    r35.m5455(r8, r9, i11, 5);
                                    r35.m5444(r8, r9, i11, i32);
                                } else {
                                    r35.m5455(r8, r9, i11, 5);
                                    r35.m5444(r8, r9, i11, i32);
                                }
                                z29 = z4;
                                i34 = i37;
                                i14 = i9;
                                solverVariable4 = r7;
                                solverVariable5 = r8;
                                i33 = i36;
                                solverVariable6 = solverVariable3;
                            } else if (i10 == 2) {
                                ConstraintAnchor.Type type = constraintAnchor.f807;
                                if (type == ConstraintAnchor.Type.TOP || type == ConstraintAnchor.Type.BOTTOM) {
                                    solverVariable13 = r35.m5454(this.f867.m488(ConstraintAnchor.Type.TOP));
                                    solverVariable12 = r35.m5454(this.f867.m488(ConstraintAnchor.Type.BOTTOM));
                                } else {
                                    solverVariable13 = r35.m5454(this.f867.m488(ConstraintAnchor.Type.LEFT));
                                    solverVariable12 = r35.m5454(this.f867.m488(ConstraintAnchor.Type.RIGHT));
                                }
                                C2073 r4 = r35.m5448();
                                i14 = i9;
                                solverVariable6 = solverVariable3;
                                solverVariable4 = r7;
                                r4.m5405(r8, r9, solverVariable12, solverVariable13, f2);
                                r35.m5461(r4);
                                z15 = z4;
                                i35 = i37;
                                i13 = i36;
                                solverVariable5 = r8;
                                z14 = false;
                                if (z11 || z8) {
                                    boolean z30 = true;
                                    if (i14 >= 2 && z2 && z15) {
                                        r35.m5449(r9, solverVariable, 0, 8);
                                        boolean z31 = z || this.f897.f812 == null;
                                        if (z || (constraintAnchor3 = this.f897.f812) == null) {
                                            z30 = z31;
                                        } else {
                                            ConstraintWidget constraintWidget8 = constraintAnchor3.f813;
                                            if (!(constraintWidget8.f842 != 0.0f && (dimensionBehaviourArr = constraintWidget8.f886)[0] == (dimensionBehaviour2 = DimensionBehaviour.MATCH_CONSTRAINT) && dimensionBehaviourArr[1] == dimensionBehaviour2)) {
                                                z30 = false;
                                            }
                                        }
                                        if (z30) {
                                            r35.m5449(solverVariable2, solverVariable5, 0, 8);
                                            return;
                                        }
                                        return;
                                    }
                                    return;
                                }
                                if ((r16 || r17 || r18) && (!r16 || r17)) {
                                    if (r16 || !r17) {
                                        if (r16 && r17) {
                                            ConstraintWidget constraintWidget9 = constraintAnchor.f812.f813;
                                            ConstraintWidget constraintWidget10 = constraintAnchor2.f812.f813;
                                            ConstraintWidget constraintWidget11 = this.f867;
                                            int i38 = 6;
                                            if (z14) {
                                                if (i10 == 0) {
                                                    if (i35 != 0 || i13 != 0) {
                                                        i31 = 5;
                                                        z19 = true;
                                                        z28 = false;
                                                        z18 = true;
                                                        i30 = 5;
                                                    } else if (!solverVariable4.f796 || !solverVariable6.f796) {
                                                        i31 = 8;
                                                        z19 = false;
                                                        z28 = true;
                                                        z18 = false;
                                                        i30 = 8;
                                                    } else {
                                                        r35.m5455(r9, solverVariable4, constraintAnchor.m456(), 8);
                                                        r35.m5455(solverVariable5, solverVariable6, -constraintAnchor2.m456(), 8);
                                                        return;
                                                    }
                                                    if ((constraintWidget9 instanceof C2103) || (constraintWidget10 instanceof C2103)) {
                                                        i30 = 4;
                                                    }
                                                    z17 = z28;
                                                    i16 = i30;
                                                    i17 = 6;
                                                    i18 = i31;
                                                } else {
                                                    if (i10 == 1) {
                                                        i27 = 6;
                                                        i26 = 4;
                                                        z26 = false;
                                                    } else if (i10 != 3) {
                                                        solverVariable8 = solverVariable2;
                                                        z19 = false;
                                                        z24 = false;
                                                    } else if (this.f864 == -1) {
                                                        i27 = z9 ? z2 ? 5 : 4 : 8;
                                                        i26 = 5;
                                                        z26 = true;
                                                    } else {
                                                        if (z6) {
                                                            if (i6 != 2) {
                                                                if (i6 != 1) {
                                                                    z27 = false;
                                                                    if (!z27) {
                                                                        i29 = 8;
                                                                        i28 = 5;
                                                                        i18 = i29;
                                                                        i16 = i28;
                                                                        z19 = true;
                                                                        i17 = 6;
                                                                        z18 = true;
                                                                        z17 = true;
                                                                    }
                                                                }
                                                            }
                                                            z27 = true;
                                                            if (!z27) {
                                                            }
                                                        } else {
                                                            if (i35 > 0) {
                                                                solverVariable8 = solverVariable2;
                                                                z19 = true;
                                                                z24 = true;
                                                                i24 = 5;
                                                            } else if (i35 != 0 || i13 != 0) {
                                                                solverVariable8 = solverVariable2;
                                                                z19 = true;
                                                                z24 = true;
                                                                z25 = true;
                                                                z23 = z25;
                                                                i24 = 4;
                                                                i16 = i24;
                                                                z17 = z23;
                                                                i17 = 6;
                                                                z18 = z24;
                                                                i18 = 5;
                                                                if (z18 || solverVariable4 != solverVariable6 || constraintWidget9 == constraintWidget11) {
                                                                    z20 = z18;
                                                                    z21 = true;
                                                                } else {
                                                                    z21 = false;
                                                                    z20 = false;
                                                                }
                                                                if (!z19) {
                                                                    if (z14 || z7 || z9 || solverVariable4 != solverVariable || solverVariable6 != solverVariable8) {
                                                                        z16 = z2;
                                                                    } else {
                                                                        z16 = false;
                                                                        i18 = 8;
                                                                        i17 = 8;
                                                                        z21 = false;
                                                                    }
                                                                    z22 = true;
                                                                    i19 = i10;
                                                                    constraintWidget4 = constraintWidget10;
                                                                    constraintWidget3 = constraintWidget11;
                                                                    i20 = 8;
                                                                    constraintWidget2 = constraintWidget9;
                                                                    solverVariable9 = r9;
                                                                    r35.m5458(r9, solverVariable4, constraintAnchor.m456(), f, solverVariable6, solverVariable5, constraintAnchor2.m456(), i17);
                                                                } else {
                                                                    constraintWidget3 = constraintWidget11;
                                                                    constraintWidget2 = constraintWidget9;
                                                                    solverVariable9 = r9;
                                                                    i19 = i10;
                                                                    i20 = 8;
                                                                    z22 = true;
                                                                    constraintWidget4 = constraintWidget10;
                                                                    z16 = z2;
                                                                }
                                                                if (this.f840 == i20 || constraintAnchor2.m455()) {
                                                                    if (!z20) {
                                                                        if (!z16 || solverVariable4 == solverVariable6 || z14) {
                                                                            constraintWidget5 = constraintWidget2;
                                                                        } else {
                                                                            constraintWidget5 = constraintWidget2;
                                                                            if ((constraintWidget5 instanceof C2103) || (constraintWidget4 instanceof C2103)) {
                                                                                i23 = 6;
                                                                                solverVariable10 = solverVariable9;
                                                                                r35.m5449(solverVariable10, solverVariable4, constraintAnchor.m456(), i23);
                                                                                r35.m5444(solverVariable5, solverVariable6, -constraintAnchor2.m456(), i23);
                                                                                i18 = i23;
                                                                            }
                                                                        }
                                                                        i23 = i18;
                                                                        solverVariable10 = solverVariable9;
                                                                        r35.m5449(solverVariable10, solverVariable4, constraintAnchor.m456(), i23);
                                                                        r35.m5444(solverVariable5, solverVariable6, -constraintAnchor2.m456(), i23);
                                                                        i18 = i23;
                                                                    } else {
                                                                        constraintWidget5 = constraintWidget2;
                                                                        solverVariable10 = solverVariable9;
                                                                    }
                                                                    if (z16 || !z10 || (constraintWidget5 instanceof C2103) || (constraintWidget4 instanceof C2103)) {
                                                                        z22 = z21;
                                                                        i21 = i18;
                                                                        i22 = i16;
                                                                    } else {
                                                                        i22 = 6;
                                                                        i21 = 6;
                                                                    }
                                                                    if (z22) {
                                                                        if (!z17 || (z9 && !z3)) {
                                                                            constraintWidget6 = constraintWidget3;
                                                                        } else {
                                                                            constraintWidget6 = constraintWidget3;
                                                                            if (!(constraintWidget5 == constraintWidget6 || constraintWidget4 == constraintWidget6)) {
                                                                                i38 = i22;
                                                                            }
                                                                            if ((constraintWidget5 instanceof C2083) || (constraintWidget4 instanceof C2083)) {
                                                                                i38 = 5;
                                                                            }
                                                                            if ((constraintWidget5 instanceof C2103) || (constraintWidget4 instanceof C2103)) {
                                                                                i38 = 5;
                                                                            }
                                                                            i22 = Math.max(z9 ? 5 : i38, i22);
                                                                        }
                                                                        if (z16) {
                                                                            i22 = Math.min(i21, i22);
                                                                            if (z6 && !z9 && (constraintWidget5 == constraintWidget6 || constraintWidget4 == constraintWidget6)) {
                                                                                i22 = 4;
                                                                            }
                                                                        }
                                                                        r35.m5455(solverVariable10, solverVariable4, constraintAnchor.m456(), i22);
                                                                        r35.m5455(solverVariable5, solverVariable6, -constraintAnchor2.m456(), i22);
                                                                    }
                                                                    if (z16) {
                                                                        int r1 = solverVariable == solverVariable4 ? constraintAnchor.m456() : 0;
                                                                        if (solverVariable4 != solverVariable) {
                                                                            r35.m5449(solverVariable10, solverVariable, r1, 5);
                                                                        }
                                                                    }
                                                                    if (!z16 && z14 && i3 == 0 && i13 == 0) {
                                                                        if (!z14 || i19 != 3) {
                                                                            r35.m5449(solverVariable5, solverVariable10, 0, 5);
                                                                        } else {
                                                                            r35.m5449(solverVariable5, solverVariable10, 0, i20);
                                                                        }
                                                                        if (z16) {
                                                                            return;
                                                                        }
                                                                        return;
                                                                    } else if (z16 && z15) {
                                                                        if (constraintAnchor2.f812 != null) {
                                                                            i15 = constraintAnchor2.m456();
                                                                            solverVariable7 = solverVariable2;
                                                                        } else {
                                                                            solverVariable7 = solverVariable2;
                                                                            i15 = 0;
                                                                        }
                                                                        if (solverVariable6 == solverVariable7) {
                                                                            return;
                                                                        }
                                                                        if (!this.f854 || !solverVariable5.f796 || (constraintWidget = this.f867) == null) {
                                                                            r35.m5449(solverVariable7, solverVariable5, i15, 5);
                                                                            return;
                                                                        }
                                                                        C2082 r3 = (C2082) constraintWidget;
                                                                        if (z) {
                                                                            r3.m5475(constraintAnchor2);
                                                                            return;
                                                                        } else {
                                                                            r3.m5473(constraintAnchor2);
                                                                            return;
                                                                        }
                                                                    } else {
                                                                        return;
                                                                    }
                                                                } else {
                                                                    return;
                                                                }
                                                            } else if (!z9) {
                                                                solverVariable8 = solverVariable2;
                                                                z19 = true;
                                                                z24 = true;
                                                                i24 = 8;
                                                            } else if (!(constraintWidget9 == constraintWidget11 || constraintWidget10 == constraintWidget11)) {
                                                                i29 = 4;
                                                                i28 = 4;
                                                                i18 = i29;
                                                                i16 = i28;
                                                                z19 = true;
                                                                i17 = 6;
                                                                z18 = true;
                                                                z17 = true;
                                                            }
                                                            z23 = true;
                                                            i16 = i24;
                                                            z17 = z23;
                                                            i17 = 6;
                                                            z18 = z24;
                                                            i18 = 5;
                                                            if (z18) {
                                                            }
                                                            z20 = z18;
                                                            z21 = true;
                                                            if (!z19) {
                                                            }
                                                            if (this.f840 == i20) {
                                                            }
                                                            if (!z20) {
                                                            }
                                                            if (z16) {
                                                            }
                                                            z22 = z21;
                                                            i21 = i18;
                                                            i22 = i16;
                                                            if (z22) {
                                                            }
                                                            if (z16) {
                                                            }
                                                            if (!z16) {
                                                            }
                                                            if (z16) {
                                                            }
                                                        }
                                                        i29 = 5;
                                                        i28 = 4;
                                                        i18 = i29;
                                                        i16 = i28;
                                                        z19 = true;
                                                        i17 = 6;
                                                        z18 = true;
                                                        z17 = true;
                                                    }
                                                    i17 = i27;
                                                    i16 = i26;
                                                    z17 = z26;
                                                    z19 = true;
                                                    i18 = 8;
                                                    z18 = true;
                                                }
                                                solverVariable8 = solverVariable2;
                                                if (z18) {
                                                }
                                                z20 = z18;
                                                z21 = true;
                                                if (!z19) {
                                                }
                                                if (this.f840 == i20) {
                                                }
                                                if (!z20) {
                                                }
                                                if (z16) {
                                                }
                                                z22 = z21;
                                                i21 = i18;
                                                i22 = i16;
                                                if (z22) {
                                                }
                                                if (z16) {
                                                }
                                                if (!z16) {
                                                }
                                                if (z16) {
                                                }
                                            } else if (!solverVariable4.f796 || !solverVariable6.f796) {
                                                solverVariable8 = solverVariable2;
                                                z19 = true;
                                                z24 = true;
                                            } else {
                                                r35.m5458(r9, solverVariable4, constraintAnchor.m456(), f, solverVariable6, solverVariable5, constraintAnchor2.m456(), 8);
                                                if (z2 && z15) {
                                                    if (constraintAnchor2.f812 != null) {
                                                        i25 = constraintAnchor2.m456();
                                                        solverVariable11 = solverVariable2;
                                                    } else {
                                                        solverVariable11 = solverVariable2;
                                                        i25 = 0;
                                                    }
                                                    if (solverVariable6 != solverVariable11) {
                                                        r35.m5449(solverVariable11, solverVariable5, i25, 5);
                                                        return;
                                                    }
                                                    return;
                                                }
                                                return;
                                            }
                                            z25 = false;
                                            z23 = z25;
                                            i24 = 4;
                                            i16 = i24;
                                            z17 = z23;
                                            i17 = 6;
                                            z18 = z24;
                                            i18 = 5;
                                            if (z18) {
                                            }
                                            z20 = z18;
                                            z21 = true;
                                            if (!z19) {
                                            }
                                            if (this.f840 == i20) {
                                            }
                                            if (!z20) {
                                            }
                                            if (z16) {
                                            }
                                            z22 = z21;
                                            i21 = i18;
                                            i22 = i16;
                                            if (z22) {
                                            }
                                            if (z16) {
                                            }
                                            if (!z16) {
                                            }
                                            if (z16) {
                                            }
                                        }
                                        z16 = z2;
                                        if (z16) {
                                        }
                                    } else {
                                        r35.m5455(solverVariable5, solverVariable6, -constraintAnchor2.m456(), 8);
                                        if (z2) {
                                            if (!this.f854 || !r9.f796 || (constraintWidget7 = this.f867) == null) {
                                                r35.m5449(r9, solverVariable, 0, 5);
                                                z16 = z2;
                                                if (z16) {
                                                }
                                            } else {
                                                C2082 r12 = (C2082) constraintWidget7;
                                                if (z) {
                                                    WeakReference<ConstraintAnchor> weakReference = r12.f7186;
                                                    if (weakReference == null || weakReference.get() == null || constraintAnchor.m459() > r12.f7186.get().m459()) {
                                                        r12.f7186 = new WeakReference<>(constraintAnchor);
                                                    }
                                                } else {
                                                    r12.m5468(constraintAnchor);
                                                }
                                            }
                                        }
                                    }
                                }
                                z16 = z2;
                                if (z16) {
                                }
                            } else {
                                i34 = i37;
                                i14 = i9;
                                solverVariable4 = r7;
                                solverVariable5 = r8;
                                i33 = i36;
                                solverVariable6 = solverVariable3;
                                z29 = true;
                            }
                            i35 = i34;
                            i13 = i33;
                            z14 = z13;
                            z15 = z29;
                            if (z11) {
                            }
                            boolean z302 = true;
                            if (i14 >= 2) {
                                return;
                            }
                            return;
                        } else {
                            int max = Math.max(i7, i11);
                            if (i35 > 0) {
                                max = Math.min(i35, max);
                            }
                            r35.m5455(r8, r9, max, 8);
                            i13 = i7;
                            i14 = i9;
                            solverVariable4 = r7;
                            solverVariable5 = r8;
                            solverVariable6 = solverVariable3;
                            z14 = false;
                        }
                        z15 = z4;
                        if (z11) {
                        }
                        boolean z3022 = true;
                        if (i14 >= 2) {
                        }
                    }
                }
                i12 = 8;
                if (!z13) {
                }
                z15 = z4;
                if (z11) {
                }
                boolean z30222 = true;
                if (i14 >= 2) {
                }
            }
        }
        z12 = false;
        if (this.f840 != 8) {
        }
        if (z11) {
        }
        i12 = 8;
        if (!z13) {
        }
        z15 = z4;
        if (z11) {
        }
        boolean z302222 = true;
        if (i14 >= 2) {
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m494(ConstraintWidget constraintWidget, HashMap<ConstraintWidget, ConstraintWidget> hashMap) {
        this.f902 = constraintWidget.f902;
        this.f823 = constraintWidget.f823;
        this.f874 = constraintWidget.f874;
        this.f827 = constraintWidget.f827;
        int[] iArr = this.f847;
        int[] iArr2 = constraintWidget.f847;
        iArr[0] = iArr2[0];
        iArr[1] = iArr2[1];
        this.f877 = constraintWidget.f877;
        this.f829 = constraintWidget.f829;
        this.f824 = constraintWidget.f824;
        this.f894 = constraintWidget.f894;
        this.f846 = constraintWidget.f846;
        this.f890 = constraintWidget.f890;
        this.f844 = constraintWidget.f844;
        this.f864 = constraintWidget.f864;
        this.f866 = constraintWidget.f866;
        int[] iArr3 = constraintWidget.f884;
        this.f884 = Arrays.copyOf(iArr3, iArr3.length);
        this.f903 = constraintWidget.f903;
        this.f852 = constraintWidget.f852;
        this.f838 = constraintWidget.f838;
        this.f820.m458();
        this.f885.m458();
        this.f833.m458();
        this.f841.m458();
        this.f897.m458();
        this.f872.m458();
        this.f895.m458();
        this.f821.m458();
        this.f886 = (DimensionBehaviour[]) Arrays.copyOf(this.f886, 2);
        ConstraintWidget constraintWidget2 = null;
        this.f867 = this.f867 == null ? null : hashMap.get(constraintWidget.f867);
        this.f873 = constraintWidget.f873;
        this.f819 = constraintWidget.f819;
        this.f842 = constraintWidget.f842;
        this.f855 = constraintWidget.f855;
        this.f822 = constraintWidget.f822;
        this.f892 = constraintWidget.f892;
        this.f848 = constraintWidget.f848;
        this.f876 = constraintWidget.f876;
        this.f860 = constraintWidget.f860;
        this.f830 = constraintWidget.f830;
        this.f865 = constraintWidget.f865;
        this.f880 = constraintWidget.f880;
        this.f832 = constraintWidget.f832;
        this.f878 = constraintWidget.f878;
        this.f888 = constraintWidget.f888;
        this.f826 = constraintWidget.f826;
        this.f828 = constraintWidget.f828;
        this.f840 = constraintWidget.f840;
        this.f893 = constraintWidget.f893;
        this.f870 = constraintWidget.f870;
        this.f882 = constraintWidget.f882;
        this.f853 = constraintWidget.f853;
        this.f904 = constraintWidget.f904;
        this.f836 = constraintWidget.f836;
        this.f849 = constraintWidget.f849;
        this.f899 = constraintWidget.f899;
        this.f875 = constraintWidget.f875;
        this.f843 = constraintWidget.f843;
        this.f869 = constraintWidget.f869;
        this.f851 = constraintWidget.f851;
        this.f898 = constraintWidget.f898;
        this.f834 = constraintWidget.f834;
        this.f825 = constraintWidget.f825;
        this.f857 = constraintWidget.f857;
        float[] fArr = this.f883;
        float[] fArr2 = constraintWidget.f883;
        fArr[0] = fArr2[0];
        fArr[1] = fArr2[1];
        ConstraintWidget[] constraintWidgetArr = this.f862;
        ConstraintWidget[] constraintWidgetArr2 = constraintWidget.f862;
        constraintWidgetArr[0] = constraintWidgetArr2[0];
        constraintWidgetArr[1] = constraintWidgetArr2[1];
        ConstraintWidget[] constraintWidgetArr3 = this.f868;
        ConstraintWidget[] constraintWidgetArr4 = constraintWidget.f868;
        constraintWidgetArr3[0] = constraintWidgetArr4[0];
        constraintWidgetArr3[1] = constraintWidgetArr4[1];
        ConstraintWidget constraintWidget3 = constraintWidget.f881;
        this.f881 = constraintWidget3 == null ? null : hashMap.get(constraintWidget3);
        ConstraintWidget constraintWidget4 = constraintWidget.f879;
        if (constraintWidget4 != null) {
            constraintWidget2 = hashMap.get(constraintWidget4);
        }
        this.f879 = constraintWidget2;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m500(boolean z, boolean z2) {
        int i;
        int i2;
        C2094 r0 = this.f896;
        boolean z3 = z & r0.f923;
        C2093 r1 = this.f835;
        boolean z4 = z2 & r1.f923;
        int i3 = r0.f928.f911;
        int i4 = r1.f928.f911;
        int i5 = r0.f921.f911;
        int i6 = r1.f921.f911;
        int i7 = i6 - i4;
        if (i5 - i3 < 0 || i7 < 0 || i3 == Integer.MIN_VALUE || i3 == Integer.MAX_VALUE || i4 == Integer.MIN_VALUE || i4 == Integer.MAX_VALUE || i5 == Integer.MIN_VALUE || i5 == Integer.MAX_VALUE || i6 == Integer.MIN_VALUE || i6 == Integer.MAX_VALUE) {
            i5 = 0;
            i6 = 0;
            i3 = 0;
            i4 = 0;
        }
        int i8 = i5 - i3;
        int i9 = i6 - i4;
        if (z3) {
            this.f822 = i3;
        }
        if (z4) {
            this.f892 = i4;
        }
        if (this.f840 == 8) {
            this.f873 = 0;
            this.f819 = 0;
            return;
        }
        if (z3) {
            if (this.f886[0] != DimensionBehaviour.FIXED || i8 >= (i2 = this.f873)) {
                i2 = i8;
            }
            this.f873 = i2;
            int i10 = this.f873;
            int i11 = this.f880;
            if (i10 < i11) {
                this.f873 = i11;
            }
        }
        if (z4) {
            if (this.f886[1] != DimensionBehaviour.FIXED || i9 >= (i = this.f819)) {
                i = i9;
            }
            this.f819 = i;
            int i12 = this.f819;
            int i13 = this.f832;
            if (i12 < i13) {
                this.f819 = i13;
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m499(C2082 r8, C2080 r9, HashSet<ConstraintWidget> hashSet, int i, boolean z) {
        if (z) {
            if (hashSet.contains(this)) {
                C2108.m5584(r8, r9, this);
                hashSet.remove(this);
                m497(r9, r8.m5482(64));
            } else {
                return;
            }
        }
        if (i == 0) {
            HashSet<ConstraintAnchor> hashSet2 = this.f820.f811;
            if (hashSet2 != null) {
                Iterator<ConstraintAnchor> it2 = hashSet2.iterator();
                while (it2.hasNext()) {
                    it2.next().f813.m499(r8, r9, hashSet, i, true);
                }
            }
            HashSet<ConstraintAnchor> hashSet3 = this.f833.f811;
            if (hashSet3 != null) {
                Iterator<ConstraintAnchor> it3 = hashSet3.iterator();
                while (it3.hasNext()) {
                    it3.next().f813.m499(r8, r9, hashSet, i, true);
                }
                return;
            }
            return;
        }
        HashSet<ConstraintAnchor> hashSet4 = this.f885.f811;
        if (hashSet4 != null) {
            Iterator<ConstraintAnchor> it4 = hashSet4.iterator();
            while (it4.hasNext()) {
                it4.next().f813.m499(r8, r9, hashSet, i, true);
            }
        }
        HashSet<ConstraintAnchor> hashSet5 = this.f841.f811;
        if (hashSet5 != null) {
            Iterator<ConstraintAnchor> it5 = hashSet5.iterator();
            while (it5.hasNext()) {
                it5.next().f813.m499(r8, r9, hashSet, i, true);
            }
        }
        HashSet<ConstraintAnchor> hashSet6 = this.f897.f811;
        if (hashSet6 != null) {
            Iterator<ConstraintAnchor> it6 = hashSet6.iterator();
            while (it6.hasNext()) {
                it6.next().f813.m499(r8, r9, hashSet, i, true);
            }
        }
    }
}
