package ῲ.ⁱ.ῲ.㿎;

import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.widget.ConstraintLayout;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import ῲ.ⁱ.ῲ.C2080;
import ῲ.ⁱ.ῲ.㿎.ᕣ.C2088;

/* renamed from: ῲ.ⁱ.ῲ.㿎.㸾  reason: contains not printable characters */
/* compiled from: Flow */
public class C2106 extends C2100 {

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

    /* renamed from: Ӱ  reason: contains not printable characters */
    public int f7286 = 0;

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

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

    /* renamed from: ఉ  reason: contains not printable characters */
    public int f7289 = 0;

    /* renamed from: ಭ  reason: contains not printable characters */
    public ConstraintWidget[] f7290 = null;

    /* renamed from: კ  reason: contains not printable characters */
    public float f7291 = 0.5f;

    /* renamed from: ስ  reason: contains not printable characters */
    public int f7292 = 2;

    /* renamed from: ኸ  reason: contains not printable characters */
    public float f7293 = 0.5f;

    /* renamed from: ᖢ  reason: contains not printable characters */
    public ConstraintWidget[] f7294 = null;

    /* renamed from: ᡊ  reason: contains not printable characters */
    public float f7295 = 0.5f;

    /* renamed from: ṱ  reason: contains not printable characters */
    public int[] f7296 = null;

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

    /* renamed from: Ⰾ  reason: contains not printable characters */
    public ArrayList<C2107> f7298 = new ArrayList<>();

    /* renamed from: Ⲫ  reason: contains not printable characters */
    public int f7299 = 0;

    /* renamed from: 〱  reason: contains not printable characters */
    public float f7300 = 0.5f;

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

    /* renamed from: 㩬  reason: contains not printable characters */
    public ConstraintWidget[] f7302;

    /* renamed from: 㫿  reason: contains not printable characters */
    public int f7303 = 0;

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

    /* renamed from: 㲁  reason: contains not printable characters */
    public float f7305 = 0.5f;

    /* renamed from: 㲣  reason: contains not printable characters */
    public float f7306 = 0.5f;

    /* renamed from: 㲰  reason: contains not printable characters */
    public int f7307 = 2;

    /* renamed from: 㵠  reason: contains not printable characters */
    public int f7308 = 0;

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

    /* renamed from: ῲ  reason: contains not printable characters */
    public final int m5573(ConstraintWidget constraintWidget, int i) {
        if (constraintWidget == null) {
            return 0;
        }
        if (constraintWidget.m508() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
            int i2 = constraintWidget.f874;
            if (i2 == 0) {
                return 0;
            }
            if (i2 == 2) {
                int i3 = (int) (constraintWidget.f901 * ((float) i));
                if (i3 != constraintWidget.m478()) {
                    constraintWidget.f900 = true;
                    m5553(constraintWidget, ConstraintWidget.DimensionBehaviour.FIXED, i3, constraintWidget.m512(), constraintWidget.m473());
                }
                return i3;
            } else if (i2 == 1) {
                return constraintWidget.m478();
            } else {
                if (i2 == 3) {
                    return (int) ((((float) constraintWidget.m473()) * constraintWidget.f842) + 0.5f);
                }
            }
        }
        return constraintWidget.m478();
    }

    @Override // ῲ.ⁱ.ῲ.㿎.C2102, androidx.constraintlayout.solver.widgets.ConstraintWidget
    /* renamed from: K  reason: contains not printable characters */
    public void m5576(ConstraintWidget constraintWidget, HashMap<ConstraintWidget, ConstraintWidget> hashMap) {
        super.m5556(constraintWidget, hashMap);
        C2106 r1 = (C2106) constraintWidget;
        this.f7297 = r1.f7297;
        this.f7301 = r1.f7301;
        this.f7309 = r1.f7309;
        this.f7288 = r1.f7288;
        this.f7285 = r1.f7285;
        this.f7304 = r1.f7304;
        this.f7295 = r1.f7295;
        this.f7293 = r1.f7293;
        this.f7305 = r1.f7305;
        this.f7306 = r1.f7306;
        this.f7291 = r1.f7291;
        this.f7300 = r1.f7300;
        this.f7286 = r1.f7286;
        this.f7308 = r1.f7308;
        this.f7292 = r1.f7292;
        this.f7307 = r1.f7307;
        this.f7303 = r1.f7303;
        this.f7287 = r1.f7287;
        this.f7299 = r1.f7299;
    }

    /* renamed from: ῲ.ⁱ.ῲ.㿎.㸾$K  reason: contains not printable characters */
    /* compiled from: Flow */
    public class C2107 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public int f7310 = 0;

        /* renamed from: Ԕ  reason: contains not printable characters */
        public int f7311 = 0;

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

        /* renamed from: ඓ  reason: contains not printable characters */
        public ConstraintAnchor f7313;

        /* renamed from: ᓣ  reason: contains not printable characters */
        public int f7314 = 0;

        /* renamed from: ᕣ  reason: contains not printable characters */
        public int f7315 = 0;

        /* renamed from: ᨨ  reason: contains not printable characters */
        public int f7316 = 0;

        /* renamed from: ῲ  reason: contains not printable characters */
        public ConstraintWidget f7317 = null;

        /* renamed from: ⁱ  reason: contains not printable characters */
        public ConstraintAnchor f7318;

        /* renamed from: K  reason: contains not printable characters */
        public int f7319 = 0;

        /* renamed from: 㑃  reason: contains not printable characters */
        public int f7320 = 0;

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

        /* renamed from: 㳳  reason: contains not printable characters */
        public int f7323 = 0;

        /* renamed from: 㴹  reason: contains not printable characters */
        public ConstraintAnchor f7324;

        /* renamed from: 㸾  reason: contains not printable characters */
        public ConstraintAnchor f7325;

        /* renamed from: 㿎  reason: contains not printable characters */
        public int f7326 = 0;

        /* renamed from: 䁗  reason: contains not printable characters */
        public int f7327 = 0;

        public C2107(int i, ConstraintAnchor constraintAnchor, ConstraintAnchor constraintAnchor2, ConstraintAnchor constraintAnchor3, ConstraintAnchor constraintAnchor4, int i2) {
            this.f7319 = i;
            this.f7325 = constraintAnchor;
            this.f7313 = constraintAnchor2;
            this.f7324 = constraintAnchor3;
            this.f7318 = constraintAnchor4;
            this.f7326 = C2106.this.f7247;
            this.f7316 = C2106.this.f7254;
            this.f7323 = C2106.this.f7248;
            this.f7315 = C2106.this.f7255;
            this.f7314 = i2;
        }

        /* renamed from: ῲ  reason: contains not printable characters */
        public int m5578() {
            if (this.f7319 == 0) {
                return this.f7320 - C2106.this.f7286;
            }
            return this.f7320;
        }

        /* renamed from: K  reason: contains not printable characters */
        public void m5581(int i, ConstraintAnchor constraintAnchor, ConstraintAnchor constraintAnchor2, ConstraintAnchor constraintAnchor3, ConstraintAnchor constraintAnchor4, int i2, int i3, int i4, int i5, int i6) {
            this.f7319 = i;
            this.f7325 = constraintAnchor;
            this.f7313 = constraintAnchor2;
            this.f7324 = constraintAnchor3;
            this.f7318 = constraintAnchor4;
            this.f7326 = i2;
            this.f7316 = i3;
            this.f7323 = i4;
            this.f7315 = i5;
            this.f7314 = i6;
        }

        /* renamed from: K  reason: contains not printable characters */
        public int m5579() {
            if (this.f7319 == 1) {
                return this.f7327 - C2106.this.f7308;
            }
            return this.f7327;
        }

        /* renamed from: K  reason: contains not printable characters */
        public void m5582(ConstraintWidget constraintWidget) {
            int i = 0;
            if (this.f7319 == 0) {
                int r0 = C2106.this.m5573(constraintWidget, this.f7314);
                if (constraintWidget.m508() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                    this.f7312++;
                    r0 = 0;
                }
                int i2 = C2106.this.f7286;
                if (constraintWidget.f840 != 8) {
                    i = i2;
                }
                this.f7320 = r0 + i + this.f7320;
                int r02 = C2106.this.m5574(constraintWidget, this.f7314);
                if (this.f7317 == null || this.f7310 < r02) {
                    this.f7317 = constraintWidget;
                    this.f7310 = r02;
                    this.f7327 = r02;
                }
            } else {
                int r03 = C2106.this.m5573(constraintWidget, this.f7314);
                int r3 = C2106.this.m5574(constraintWidget, this.f7314);
                if (constraintWidget.m512() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                    this.f7312++;
                    r3 = 0;
                }
                int i3 = C2106.this.f7308;
                if (constraintWidget.f840 != 8) {
                    i = i3;
                }
                this.f7327 = r3 + i + this.f7327;
                if (this.f7317 == null || this.f7310 < r03) {
                    this.f7317 = constraintWidget;
                    this.f7310 = r03;
                    this.f7320 = r03;
                }
            }
            this.f7321++;
        }

        /* JADX WARNING: Removed duplicated region for block: B:55:0x00b6  */
        /* renamed from: K  reason: contains not printable characters */
        public void m5583(boolean z, int i, boolean z2) {
            int i2;
            C2106 r11;
            ConstraintWidget constraintWidget;
            int i3;
            int i4;
            C2106 r3;
            int i5 = this.f7321;
            for (int i6 = 0; i6 < i5; i6++) {
                int i7 = this.f7311 + i6;
                C2106 r5 = C2106.this;
                if (i7 >= r5.f7289) {
                    break;
                }
                ConstraintWidget constraintWidget2 = r5.f7302[i7];
                if (constraintWidget2 != null) {
                    constraintWidget2.m505();
                }
            }
            if (!(i5 == 0 || this.f7317 == null)) {
                boolean z3 = z2 && i == 0;
                int i8 = -1;
                int i9 = -1;
                for (int i10 = 0; i10 < i5; i10++) {
                    int i11 = this.f7311 + (z ? (i5 - 1) - i10 : i10);
                    C2106 r9 = C2106.this;
                    if (i11 >= r9.f7289) {
                        break;
                    }
                    if (r9.f7302[i11].f840 == 0) {
                        if (i8 == -1) {
                            i8 = i10;
                        }
                        i9 = i10;
                    }
                }
                ConstraintWidget constraintWidget3 = null;
                if (this.f7319 == 0) {
                    ConstraintWidget constraintWidget4 = this.f7317;
                    C2106 r10 = C2106.this;
                    constraintWidget4.f834 = r10.f7301;
                    int i12 = this.f7316;
                    if (i > 0) {
                        i12 += r10.f7308;
                    }
                    constraintWidget4.f885.m463(this.f7313, i12);
                    if (z2) {
                        constraintWidget4.f841.m463(this.f7318, this.f7315);
                    }
                    if (i > 0) {
                        this.f7313.f813.f841.m463(constraintWidget4.f885, 0);
                    }
                    if (C2106.this.f7307 == 3 && !constraintWidget4.f852) {
                        int i13 = 0;
                        while (true) {
                            if (i13 >= i5) {
                                break;
                            }
                            int i14 = this.f7311 + (z ? (i5 - 1) - i13 : i13);
                            C2106 r12 = C2106.this;
                            if (i14 >= r12.f7289) {
                                break;
                            }
                            constraintWidget = r12.f7302[i14];
                            if (constraintWidget.f852) {
                                break;
                            }
                            i13++;
                        }
                        ConstraintWidget constraintWidget5 = null;
                        i3 = 0;
                        while (i3 < i5) {
                            int i15 = z ? (i5 - 1) - i3 : i3;
                            int i16 = this.f7311 + i15;
                            C2106 r15 = C2106.this;
                            if (i16 < r15.f7289) {
                                ConstraintWidget constraintWidget6 = r15.f7302[i16];
                                if (i3 == 0) {
                                    constraintWidget6.m492(constraintWidget6.f820, this.f7325, this.f7326);
                                }
                                if (i15 == 0) {
                                    C2106 r32 = C2106.this;
                                    int i17 = r32.f7297;
                                    float f = r32.f7295;
                                    if (this.f7311 == 0 && (i4 = r32.f7309) != -1) {
                                        f = r32.f7305;
                                    } else if (!z2 || (i4 = (r3 = C2106.this).f7285) == -1) {
                                        i4 = i17;
                                    } else {
                                        f = r3.f7291;
                                    }
                                    constraintWidget6.f898 = i4;
                                    constraintWidget6.f878 = f;
                                }
                                if (i3 == i5 - 1) {
                                    constraintWidget6.m492(constraintWidget6.f833, this.f7324, this.f7323);
                                }
                                if (constraintWidget5 != null) {
                                    constraintWidget6.f820.m463(constraintWidget5.f833, C2106.this.f7286);
                                    if (i3 == i8) {
                                        constraintWidget6.f820.m457(this.f7326);
                                    }
                                    constraintWidget5.f833.m463(constraintWidget6.f820, 0);
                                    if (i3 == i9 + 1) {
                                        constraintWidget5.f833.m457(this.f7323);
                                    }
                                }
                                if (constraintWidget6 != constraintWidget4) {
                                    if (C2106.this.f7307 != 3 || !constraintWidget.f852 || constraintWidget6 == constraintWidget || !constraintWidget6.f852) {
                                        int i18 = C2106.this.f7307;
                                        if (i18 == 0) {
                                            constraintWidget6.f885.m463(constraintWidget4.f885, 0);
                                        } else if (i18 == 1) {
                                            constraintWidget6.f841.m463(constraintWidget4.f841, 0);
                                        } else if (z3) {
                                            constraintWidget6.f885.m463(this.f7313, this.f7316);
                                            constraintWidget6.f841.m463(this.f7318, this.f7315);
                                        } else {
                                            constraintWidget6.f885.m463(constraintWidget4.f885, 0);
                                            constraintWidget6.f841.m463(constraintWidget4.f841, 0);
                                        }
                                    } else {
                                        constraintWidget6.f897.m463(constraintWidget.f897, 0);
                                    }
                                }
                                i3++;
                                constraintWidget5 = constraintWidget6;
                            } else {
                                return;
                            }
                        }
                        return;
                    }
                    constraintWidget = constraintWidget4;
                    ConstraintWidget constraintWidget52 = null;
                    i3 = 0;
                    while (i3 < i5) {
                    }
                    return;
                }
                ConstraintWidget constraintWidget7 = this.f7317;
                C2106 r6 = C2106.this;
                constraintWidget7.f898 = r6.f7297;
                int i19 = this.f7326;
                if (i > 0) {
                    i19 += r6.f7286;
                }
                if (z) {
                    constraintWidget7.f833.m463(this.f7324, i19);
                    if (z2) {
                        constraintWidget7.f820.m463(this.f7325, this.f7323);
                    }
                    if (i > 0) {
                        this.f7324.f813.f820.m463(constraintWidget7.f833, 0);
                    }
                } else {
                    constraintWidget7.f820.m463(this.f7325, i19);
                    if (z2) {
                        constraintWidget7.f833.m463(this.f7324, this.f7323);
                    }
                    if (i > 0) {
                        this.f7325.f813.f833.m463(constraintWidget7.f820, 0);
                    }
                }
                int i20 = 0;
                while (i20 < i5) {
                    int i21 = this.f7311 + i20;
                    C2106 r112 = C2106.this;
                    if (i21 < r112.f7289) {
                        ConstraintWidget constraintWidget8 = r112.f7302[i21];
                        if (i20 == 0) {
                            constraintWidget8.m492(constraintWidget8.f885, this.f7313, this.f7316);
                            C2106 r113 = C2106.this;
                            int i22 = r113.f7301;
                            float f2 = r113.f7293;
                            if (this.f7311 == 0 && (i2 = r113.f7288) != -1) {
                                f2 = r113.f7306;
                            } else if (!z2 || (i2 = (r11 = C2106.this).f7304) == -1) {
                                i2 = i22;
                            } else {
                                f2 = r11.f7300;
                            }
                            constraintWidget8.f834 = i2;
                            constraintWidget8.f888 = f2;
                        }
                        if (i20 == i5 - 1) {
                            constraintWidget8.m492(constraintWidget8.f841, this.f7318, this.f7315);
                        }
                        if (constraintWidget3 != null) {
                            constraintWidget8.f885.m463(constraintWidget3.f841, C2106.this.f7308);
                            if (i20 == i8) {
                                constraintWidget8.f885.m457(this.f7316);
                            }
                            constraintWidget3.f841.m463(constraintWidget8.f885, 0);
                            if (i20 == i9 + 1) {
                                constraintWidget3.f841.m457(this.f7315);
                            }
                        }
                        if (constraintWidget8 != constraintWidget7) {
                            if (z) {
                                int i23 = C2106.this.f7292;
                                if (i23 == 0) {
                                    constraintWidget8.f833.m463(constraintWidget7.f833, 0);
                                } else if (i23 == 1) {
                                    constraintWidget8.f820.m463(constraintWidget7.f820, 0);
                                } else if (i23 == 2) {
                                    constraintWidget8.f820.m463(constraintWidget7.f820, 0);
                                    constraintWidget8.f833.m463(constraintWidget7.f833, 0);
                                }
                            } else {
                                int i24 = C2106.this.f7292;
                                if (i24 == 0) {
                                    constraintWidget8.f820.m463(constraintWidget7.f820, 0);
                                } else if (i24 == 1) {
                                    constraintWidget8.f833.m463(constraintWidget7.f833, 0);
                                } else if (i24 == 2) {
                                    if (z3) {
                                        constraintWidget8.f820.m463(this.f7325, this.f7326);
                                        constraintWidget8.f833.m463(this.f7324, this.f7323);
                                    } else {
                                        constraintWidget8.f820.m463(constraintWidget7.f820, 0);
                                        constraintWidget8.f833.m463(constraintWidget7.f833, 0);
                                    }
                                }
                                i20++;
                                constraintWidget3 = constraintWidget8;
                            }
                        }
                        i20++;
                        constraintWidget3 = constraintWidget8;
                    } else {
                        return;
                    }
                }
            }
        }

        /* renamed from: K  reason: contains not printable characters */
        public void m5580(int i) {
            int i2 = this.f7312;
            if (i2 != 0) {
                int i3 = this.f7321;
                int i4 = i / i2;
                for (int i5 = 0; i5 < i3; i5++) {
                    int i6 = this.f7311;
                    int i7 = i6 + i5;
                    C2106 r4 = C2106.this;
                    if (i7 >= r4.f7289) {
                        break;
                    }
                    ConstraintWidget constraintWidget = r4.f7302[i6 + i5];
                    if (this.f7319 == 0) {
                        if (constraintWidget != null && constraintWidget.m508() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget.f874 == 0) {
                            C2106.this.m5553(constraintWidget, ConstraintWidget.DimensionBehaviour.FIXED, i4, constraintWidget.m512(), constraintWidget.m473());
                        }
                    } else if (constraintWidget != null && constraintWidget.m512() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && constraintWidget.f827 == 0) {
                        C2106.this.m5553(constraintWidget, constraintWidget.m508(), constraintWidget.m478(), ConstraintWidget.DimensionBehaviour.FIXED, i4);
                    }
                }
                this.f7320 = 0;
                this.f7327 = 0;
                this.f7317 = null;
                this.f7310 = 0;
                int i8 = this.f7321;
                for (int i9 = 0; i9 < i8; i9++) {
                    int i10 = this.f7311 + i9;
                    C2106 r3 = C2106.this;
                    if (i10 < r3.f7289) {
                        ConstraintWidget constraintWidget2 = r3.f7302[i10];
                        if (this.f7319 == 0) {
                            int r32 = constraintWidget2.m478();
                            int i11 = C2106.this.f7286;
                            if (constraintWidget2.f840 == 8) {
                                i11 = 0;
                            }
                            this.f7320 = r32 + i11 + this.f7320;
                            int r33 = C2106.this.m5574(constraintWidget2, this.f7314);
                            if (this.f7317 == null || this.f7310 < r33) {
                                this.f7317 = constraintWidget2;
                                this.f7310 = r33;
                                this.f7327 = r33;
                            }
                        } else {
                            int r34 = r3.m5573(constraintWidget2, this.f7314);
                            int r42 = C2106.this.m5574(constraintWidget2, this.f7314);
                            int i12 = C2106.this.f7308;
                            if (constraintWidget2.f840 == 8) {
                                i12 = 0;
                            }
                            this.f7327 = r42 + i12 + this.f7327;
                            if (this.f7317 == null || this.f7310 < r34) {
                                this.f7317 = constraintWidget2;
                                this.f7310 = r34;
                                this.f7320 = r34;
                            }
                        }
                    } else {
                        return;
                    }
                }
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public final int m5574(ConstraintWidget constraintWidget, int i) {
        if (constraintWidget == null) {
            return 0;
        }
        if (constraintWidget.m512() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
            int i2 = constraintWidget.f827;
            if (i2 == 0) {
                return 0;
            }
            if (i2 == 2) {
                int i3 = (int) (constraintWidget.f846 * ((float) i));
                if (i3 != constraintWidget.m473()) {
                    constraintWidget.f900 = true;
                    m5553(constraintWidget, constraintWidget.m508(), constraintWidget.m478(), ConstraintWidget.DimensionBehaviour.FIXED, i3);
                }
                return i3;
            } else if (i2 == 1) {
                return constraintWidget.m473();
            } else {
                if (i2 == 3) {
                    return (int) ((((float) constraintWidget.m478()) * constraintWidget.f842) + 0.5f);
                }
            }
        }
        return constraintWidget.m473();
    }

    /* JADX WARNING: Removed duplicated region for block: B:114:0x018f  */
    /* JADX WARNING: Removed duplicated region for block: B:181:0x029b  */
    /* JADX WARNING: Removed duplicated region for block: B:294:0x05d6  */
    /* JADX WARNING: Removed duplicated region for block: B:300:0x05e5  */
    /* JADX WARNING: Removed duplicated region for block: B:307:0x0600  */
    @Override // ῲ.ⁱ.ῲ.㿎.C2100
    /* renamed from: K  reason: contains not printable characters */
    public void m5575(int i, int i2, int i3, int i4) {
        int i5;
        int i6;
        C2106 r5;
        int i7;
        int i8;
        char c;
        boolean z;
        int i9;
        C2106 r20;
        int i10;
        int i11;
        int i12;
        int[] iArr;
        int i13;
        int i14;
        int i15;
        int i16;
        C2107 k;
        int i17;
        int i18;
        int i19;
        int i20;
        ConstraintAnchor constraintAnchor;
        ConstraintWidget[] constraintWidgetArr;
        int i21;
        int i22;
        int i23;
        int i24;
        ConstraintWidget constraintWidget;
        C2107 k2;
        int i25;
        int i26;
        int i27;
        ConstraintWidget[] constraintWidgetArr2;
        C2106 r202;
        int i28;
        int[] iArr2;
        int i29;
        int i30;
        int i31;
        C2106 r1;
        boolean z2;
        int i32;
        C2106 r10;
        ConstraintWidget[] constraintWidgetArr3;
        int i33;
        int i34;
        int i35;
        int i36;
        boolean z3;
        int i37;
        C2106 r0;
        ConstraintWidget[] constraintWidgetArr4;
        ConstraintWidget constraintWidget2;
        boolean z4;
        if (this.f7278 > 0) {
            ConstraintWidget constraintWidget3 = this.f867;
            C2088.AbstractC2089 r02 = constraintWidget3 != null ? ((C2082) constraintWidget3).f7198 : null;
            if (r02 == null) {
                z4 = false;
            } else {
                for (int i38 = 0; i38 < this.f7278; i38++) {
                    ConstraintWidget constraintWidget4 = this.f7279[i38];
                    if (constraintWidget4 != null && !(constraintWidget4 instanceof C2083)) {
                        ConstraintWidget.DimensionBehaviour r4 = constraintWidget4.m480(0);
                        ConstraintWidget.DimensionBehaviour r52 = constraintWidget4.m480(1);
                        ConstraintWidget.DimensionBehaviour dimensionBehaviour = ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT;
                        if (!(r4 == dimensionBehaviour && constraintWidget4.f874 != 1 && r52 == dimensionBehaviour && constraintWidget4.f827 != 1)) {
                            if (r4 == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                                r4 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
                            }
                            if (r52 == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                                r52 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
                            }
                            C2088.C2090 k3 = this.f7256;
                            k3.f7231 = r4;
                            k3.f7229 = r52;
                            k3.f7226 = constraintWidget4.m478();
                            this.f7256.f7234 = constraintWidget4.m473();
                            ((ConstraintLayout.C0139) r02).m564(constraintWidget4, this.f7256);
                            constraintWidget4.m502(this.f7256.f7227);
                            constraintWidget4.m479(this.f7256.f7233);
                            constraintWidget4.m513(this.f7256.f7230);
                        }
                    }
                }
                z4 = true;
            }
            if (!z4) {
                this.f7251 = 0;
                this.f7249 = 0;
                this.f7257 = false;
                return;
            }
        }
        int i39 = this.f7247;
        int i40 = this.f7248;
        int i41 = this.f7254;
        int i42 = this.f7255;
        int[] iArr3 = new int[2];
        int i43 = (i2 - i39) - i40;
        if (this.f7299 == 1) {
            i43 = (i4 - i41) - i42;
        }
        if (this.f7299 == 0) {
            if (this.f7297 == -1) {
                this.f7297 = 0;
            }
            if (this.f7301 == -1) {
                this.f7301 = 0;
            }
        } else {
            if (this.f7297 == -1) {
                this.f7297 = 0;
            }
            if (this.f7301 == -1) {
                this.f7301 = 0;
            }
        }
        ConstraintWidget[] constraintWidgetArr5 = this.f7279;
        int i44 = 0;
        int i45 = 0;
        while (true) {
            i5 = this.f7278;
            if (i44 >= i5) {
                break;
            }
            if (this.f7279[i44].f840 == 8) {
                i45++;
            }
            i44++;
        }
        if (i45 > 0) {
            constraintWidgetArr5 = new ConstraintWidget[(i5 - i45)];
            i5 = 0;
            for (int i46 = 0; i46 < this.f7278; i46++) {
                ConstraintWidget constraintWidget5 = this.f7279[i46];
                if (constraintWidget5.f840 != 8) {
                    constraintWidgetArr5[i5] = constraintWidget5;
                    i5++;
                }
            }
        }
        ConstraintWidget[] constraintWidgetArr6 = constraintWidgetArr5;
        this.f7302 = constraintWidgetArr6;
        this.f7289 = i5;
        int i47 = this.f7303;
        if (i47 == 0) {
            i16 = i39;
            i15 = i40;
            i14 = i41;
            i13 = i42;
            iArr = iArr3;
            int i48 = this.f7299;
            if (i5 != 0) {
                if (this.f7298.size() == 0) {
                    C2107 k4 = new C2107(i48, this.f820, this.f885, this.f833, this.f841, i43);
                    this.f7298.add(k4);
                    k = k4;
                } else {
                    k = this.f7298.get(0);
                    k.f7310 = 0;
                    k.f7317 = null;
                    k.f7320 = 0;
                    k.f7327 = 0;
                    k.f7311 = 0;
                    k.f7321 = 0;
                    k.f7312 = 0;
                    k.m5581(i48, this.f820, this.f885, this.f833, this.f841, this.f7247, this.f7254, this.f7248, this.f7255, i43);
                }
                for (int i49 = 0; i49 < i5; i49++) {
                    k.m5582(constraintWidgetArr6[i49]);
                }
                c = 0;
                iArr[0] = k.m5578();
                z = true;
                iArr[1] = k.m5579();
                i9 = i;
                i8 = i2;
                i7 = i3;
                i6 = i4;
                r5 = this;
                i39 = i16;
                i40 = i15;
                i41 = i14;
                i42 = i13;
                iArr3 = iArr;
                int i50 = iArr3[c] + i39 + i40;
                char c2 = z ? 1 : 0;
                char c3 = z ? 1 : 0;
                char c4 = z ? 1 : 0;
                char c5 = z ? 1 : 0;
                int i51 = iArr3[c2] + i41 + i42;
                if (i9 != 1073741824) {
                }
                if (i7 != 1073741824) {
                }
                r5.f7251 = i8;
                r5.f7249 = i6;
                r5.m502(i8);
                r5.m479(i6);
                if (r5.f7278 <= 0) {
                }
                r5.f7257 = z;
            }
        } else if (i47 == 1) {
            int i52 = this.f7299;
            if (i5 == 0) {
                i9 = i;
                i12 = i2;
                i11 = i3;
                i10 = i4;
                r20 = this;
                i8 = i12;
                i7 = i11;
                i6 = i10;
                r5 = r20;
                z = true;
                c = 0;
                int i502 = iArr3[c] + i39 + i40;
                char c22 = z ? 1 : 0;
                char c32 = z ? 1 : 0;
                char c42 = z ? 1 : 0;
                char c52 = z ? 1 : 0;
                int i512 = iArr3[c22] + i41 + i42;
                if (i9 != 1073741824) {
                }
                if (i7 != 1073741824) {
                }
                r5.f7251 = i8;
                r5.f7249 = i6;
                r5.m502(i8);
                r5.m479(i6);
                if (r5.f7278 <= 0) {
                }
                r5.f7257 = z;
            }
            this.f7298.clear();
            i16 = i39;
            i15 = i40;
            int i53 = i43;
            C2107 k5 = new C2107(i52, this.f820, this.f885, this.f833, this.f841, i43);
            this.f7298.add(k5);
            if (i52 == 0) {
                C2107 k6 = k5;
                i18 = 0;
                int i54 = 0;
                int i55 = 0;
                while (i55 < i5) {
                    ConstraintWidget constraintWidget6 = constraintWidgetArr6[i55];
                    int r16 = m5573(constraintWidget6, i53);
                    if (constraintWidget6.m508() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                        i18++;
                    }
                    boolean z5 = (i54 == i53 || (this.f7286 + i54) + r16 > i53) && k6.f7317 != null;
                    if (!z5 && i55 > 0 && (i25 = this.f7287) > 0 && i55 % i25 == 0) {
                        z5 = true;
                    }
                    if (z5) {
                        i24 = i41;
                        k2 = r5;
                        i23 = i53;
                        i22 = i42;
                        constraintWidget = constraintWidget6;
                        C2107 k7 = new C2107(i52, this.f820, this.f885, this.f833, this.f841, i23);
                        k2.f7311 = i55;
                        this.f7298.add(k2);
                    } else {
                        i23 = i53;
                        i24 = i41;
                        i22 = i42;
                        constraintWidget = constraintWidget6;
                        if (i55 > 0) {
                            i54 = this.f7286 + r16 + i54;
                            k6.m5582(constraintWidget);
                            i55++;
                            i18 = i18;
                            i41 = i24;
                            i53 = i23;
                            i42 = i22;
                        } else {
                            k2 = k6;
                        }
                    }
                    k6 = k2;
                    i54 = r16;
                    k6.m5582(constraintWidget);
                    i55++;
                    i18 = i18;
                    i41 = i24;
                    i53 = i23;
                    i42 = i22;
                }
                i13 = i42;
                i17 = i53;
                i14 = i41;
            } else {
                i13 = i42;
                i17 = i53;
                i14 = i41;
                C2107 k8 = k5;
                i18 = 0;
                int i56 = 0;
                int i57 = 0;
                while (i57 < i5) {
                    ConstraintWidget constraintWidget7 = constraintWidgetArr6[i57];
                    int r162 = m5574(constraintWidget7, i17);
                    if (constraintWidget7.m512() == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                        i18++;
                    }
                    boolean z6 = (i56 == i17 || (this.f7308 + i56) + r162 > i17) && k8.f7317 != null;
                    if (!z6 && i57 > 0 && (i21 = this.f7287) > 0 && i57 % i21 == 0) {
                        z6 = true;
                    }
                    if (z6) {
                        constraintWidgetArr = constraintWidgetArr6;
                        C2107 k9 = new C2107(i52, this.f820, this.f885, this.f833, this.f841, i17);
                        k9.f7311 = i57;
                        this.f7298.add(k9);
                        k8 = k9;
                    } else {
                        constraintWidgetArr = constraintWidgetArr6;
                        if (i57 > 0) {
                            i56 = this.f7308 + r162 + i56;
                            k8.m5582(constraintWidget7);
                            i57++;
                            i18 = i18;
                            constraintWidgetArr6 = constraintWidgetArr;
                            i17 = i17;
                        }
                    }
                    i56 = r162;
                    k8.m5582(constraintWidget7);
                    i57++;
                    i18 = i18;
                    constraintWidgetArr6 = constraintWidgetArr;
                    i17 = i17;
                }
            }
            int size = this.f7298.size();
            ConstraintAnchor constraintAnchor2 = this.f820;
            ConstraintAnchor constraintAnchor3 = this.f885;
            ConstraintAnchor constraintAnchor4 = this.f833;
            ConstraintAnchor constraintAnchor5 = this.f841;
            int i58 = this.f7247;
            int i59 = this.f7254;
            int i60 = this.f7248;
            int i61 = this.f7255;
            boolean z7 = m508() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT || m512() == ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
            if (i18 > 0 && z7) {
                for (int i62 = 0; i62 < size; i62++) {
                    C2107 k10 = this.f7298.get(i62);
                    if (i52 == 0) {
                        k10.m5580(i17 - k10.m5578());
                    } else {
                        k10.m5580(i17 - k10.m5579());
                    }
                }
            }
            ConstraintAnchor constraintAnchor6 = constraintAnchor4;
            int i63 = i60;
            int i64 = 0;
            ConstraintAnchor constraintAnchor7 = constraintAnchor2;
            int i65 = i59;
            int i66 = 0;
            int i67 = i58;
            ConstraintAnchor constraintAnchor8 = constraintAnchor5;
            ConstraintAnchor constraintAnchor9 = constraintAnchor3;
            int i68 = 0;
            while (i64 < size) {
                C2107 k11 = this.f7298.get(i64);
                if (i52 == 0) {
                    if (i64 < size - 1) {
                        constraintAnchor8 = this.f7298.get(i64 + 1).f7317.f885;
                        i19 = size;
                        i61 = 0;
                    } else {
                        constraintAnchor8 = this.f841;
                        i61 = this.f7255;
                        i19 = size;
                    }
                    ConstraintAnchor constraintAnchor10 = k11.f7317.f841;
                    k11.m5581(i52, constraintAnchor7, constraintAnchor9, constraintAnchor6, constraintAnchor8, i67, i65, i63, i61, i17);
                    i66 = Math.max(i66, k11.m5578());
                    int r53 = k11.m5579() + i68;
                    if (i64 > 0) {
                        r53 += this.f7308;
                    }
                    i68 = r53;
                    i65 = 0;
                    constraintAnchor9 = constraintAnchor10;
                } else {
                    i19 = size;
                    if (i64 < i19 - 1) {
                        constraintAnchor = this.f7298.get(i64 + 1).f7317.f820;
                        i20 = 0;
                    } else {
                        constraintAnchor = this.f833;
                        i20 = this.f7248;
                    }
                    ConstraintAnchor constraintAnchor11 = k11.f7317.f833;
                    k11.m5581(i52, constraintAnchor7, constraintAnchor9, constraintAnchor, constraintAnchor8, i67, i65, i20, i61, i17);
                    int r42 = k11.m5578() + i66;
                    int max = Math.max(i68, k11.m5579());
                    if (i64 > 0) {
                        r42 += this.f7286;
                    }
                    i68 = max;
                    i66 = r42;
                    constraintAnchor7 = constraintAnchor11;
                    i67 = 0;
                    i63 = i20;
                    constraintAnchor6 = constraintAnchor;
                }
                i64++;
                size = i19;
                iArr3 = iArr3;
            }
            iArr = iArr3;
            iArr[0] = i66;
            iArr[1] = i68;
        } else if (i47 != 2) {
            i16 = i39;
            i15 = i40;
            i14 = i41;
            i13 = i42;
            iArr = iArr3;
        } else {
            int i69 = this.f7299;
            if (i69 == 0) {
                i26 = this.f7287;
                if (i26 <= 0) {
                    int i70 = 0;
                    int i71 = 0;
                    for (int i72 = 0; i72 < i5; i72++) {
                        if (i72 > 0) {
                            i70 += this.f7286;
                        }
                        ConstraintWidget constraintWidget8 = constraintWidgetArr6[i72];
                        if (constraintWidget8 != null) {
                            int r12 = m5573(constraintWidget8, i43) + i70;
                            if (r12 > i43) {
                                break;
                            }
                            i71++;
                            i70 = r12;
                        }
                    }
                    i26 = i71;
                }
                i27 = 0;
            } else {
                i27 = this.f7287;
                if (i27 <= 0) {
                    int i73 = 0;
                    int i74 = 0;
                    for (int i75 = 0; i75 < i5; i75++) {
                        if (i75 > 0) {
                            i73 += this.f7308;
                        }
                        ConstraintWidget constraintWidget9 = constraintWidgetArr6[i75];
                        if (constraintWidget9 != null) {
                            int r54 = m5574(constraintWidget9, i43) + i73;
                            if (r54 > i43) {
                                break;
                            }
                            i74++;
                            i73 = r54;
                        }
                    }
                    i27 = i74;
                }
                i26 = 0;
            }
            if (this.f7296 == null) {
                this.f7296 = new int[2];
            }
            if ((i27 == 0 && i69 == 1) || (i26 == 0 && i69 == 0)) {
                i36 = i;
                i35 = i2;
                i29 = i69;
                i28 = i5;
                r202 = this;
                constraintWidgetArr2 = constraintWidgetArr6;
                iArr2 = iArr3;
                z2 = true;
                i34 = i3;
                i31 = i27;
                i33 = i43;
                r1 = r202;
                i10 = i4;
                i = i36;
                i2 = i35;
                i3 = i34;
                i30 = i33;
                i32 = i28;
                r10 = r202;
                constraintWidgetArr3 = constraintWidgetArr2;
            } else {
                i29 = i69;
                i32 = i5;
                i30 = i43;
                constraintWidgetArr3 = constraintWidgetArr6;
                iArr2 = iArr3;
                z2 = false;
                i10 = i4;
                i31 = i27;
                r1 = this;
                r10 = r1;
            }
            if (z2) {
                r20 = r10;
                int[] iArr4 = r1.f7296;
                iArr4[0] = i26;
                iArr4[1] = i31;
                i9 = i;
                i12 = i2;
                i11 = i3;
            } else {
                if (i29 == 0) {
                    z3 = z2;
                    r0 = r10;
                    i37 = i39;
                    i31 = (int) Math.ceil((double) (((float) i32) / ((float) i26)));
                } else {
                    z3 = z2;
                    r0 = r10;
                    i37 = i39;
                    i26 = (int) Math.ceil((double) (((float) i32) / ((float) i31)));
                }
                ConstraintWidget[] constraintWidgetArr7 = r1.f7294;
                if (constraintWidgetArr7 == null || constraintWidgetArr7.length < i26) {
                    r1.f7294 = new ConstraintWidget[i26];
                } else {
                    Arrays.fill(constraintWidgetArr7, (Object) null);
                }
                ConstraintWidget[] constraintWidgetArr8 = r1.f7290;
                if (constraintWidgetArr8 == null || constraintWidgetArr8.length < i31) {
                    r1.f7290 = new ConstraintWidget[i31];
                } else {
                    Arrays.fill(constraintWidgetArr8, (Object) null);
                }
                for (int i76 = 0; i76 < i26; i76++) {
                    int i77 = 0;
                    while (i77 < i31) {
                        int i78 = (i77 * i26) + i76;
                        if (i29 == 1) {
                            i78 = (i76 * i31) + i77;
                        }
                        if (i78 < constraintWidgetArr3.length && (constraintWidget2 = constraintWidgetArr3[i78]) != null) {
                            int r43 = r1.m5573(constraintWidget2, i30);
                            constraintWidgetArr4 = constraintWidgetArr3;
                            ConstraintWidget[] constraintWidgetArr9 = r1.f7294;
                            if (constraintWidgetArr9[i76] == null || constraintWidgetArr9[i76].m478() < r43) {
                                r1.f7294[i76] = constraintWidget2;
                            }
                            int r44 = r1.m5574(constraintWidget2, i30);
                            ConstraintWidget[] constraintWidgetArr10 = r1.f7290;
                            if (constraintWidgetArr10[i77] == null || constraintWidgetArr10[i77].m473() < r44) {
                                r1.f7290[i77] = constraintWidget2;
                            }
                        } else {
                            constraintWidgetArr4 = constraintWidgetArr3;
                        }
                        i77++;
                        i32 = i32;
                        r0 = r0;
                        constraintWidgetArr3 = constraintWidgetArr4;
                    }
                }
                r202 = r0;
                i28 = i32;
                constraintWidgetArr2 = constraintWidgetArr3;
                int i79 = 0;
                for (int i80 = 0; i80 < i26; i80++) {
                    ConstraintWidget constraintWidget10 = r1.f7294[i80];
                    if (constraintWidget10 != null) {
                        if (i80 > 0) {
                            i79 += r1.f7286;
                        }
                        i79 = r1.m5573(constraintWidget10, i30) + i79;
                    }
                }
                int i81 = 0;
                for (int i82 = 0; i82 < i31; i82++) {
                    ConstraintWidget constraintWidget11 = r1.f7290[i82];
                    if (constraintWidget11 != null) {
                        if (i82 > 0) {
                            i81 += r1.f7308;
                        }
                        i81 = r1.m5574(constraintWidget11, i30) + i81;
                    }
                }
                iArr2[0] = i79;
                z2 = true;
                iArr2[1] = i81;
                if (i29 != 0) {
                    if (i81 > i30 && i31 > 1) {
                        i31--;
                    }
                    i36 = i;
                    i35 = i2;
                    i33 = i30;
                    i39 = i37;
                    i34 = i3;
                    i = i36;
                    i2 = i35;
                    i3 = i34;
                    i30 = i33;
                    i32 = i28;
                    r10 = r202;
                    constraintWidgetArr3 = constraintWidgetArr2;
                    if (z2) {
                    }
                } else {
                    if (i79 > i30 && i26 > 1) {
                        i26--;
                    }
                    i36 = i;
                    i35 = i2;
                    i33 = i30;
                    i39 = i37;
                    i34 = i3;
                    i = i36;
                    i2 = i35;
                    i3 = i34;
                    i30 = i33;
                    i32 = i28;
                    r10 = r202;
                    constraintWidgetArr3 = constraintWidgetArr2;
                    if (z2) {
                    }
                }
                z2 = z3;
                i39 = i37;
                i32 = i28;
                r10 = r202;
                constraintWidgetArr3 = constraintWidgetArr2;
                if (z2) {
                }
            }
            r20 = r10;
            int[] iArr42 = r1.f7296;
            iArr42[0] = i26;
            iArr42[1] = i31;
            i9 = i;
            i12 = i2;
            i11 = i3;
            i8 = i12;
            i7 = i11;
            i6 = i10;
            r5 = r20;
            z = true;
            c = 0;
            int i5022 = iArr3[c] + i39 + i40;
            char c222 = z ? 1 : 0;
            char c322 = z ? 1 : 0;
            char c422 = z ? 1 : 0;
            char c522 = z ? 1 : 0;
            int i5122 = iArr3[c222] + i41 + i42;
            if (i9 != 1073741824) {
                if (i9 == Integer.MIN_VALUE) {
                    i5022 = Math.min(i5022, i8);
                } else if (i9 != 0) {
                    i8 = 0;
                }
                i8 = i5022;
            }
            if (i7 != 1073741824) {
                i6 = i7 == Integer.MIN_VALUE ? Math.min(i5122, i6) : i7 == 0 ? i5122 : 0;
            }
            r5.f7251 = i8;
            r5.f7249 = i6;
            r5.m502(i8);
            r5.m479(i6);
            if (r5.f7278 <= 0) {
                z = false;
            }
            r5.f7257 = z;
        }
        i9 = i;
        i12 = i2;
        i11 = i3;
        i10 = i4;
        r20 = this;
        i39 = i16;
        i40 = i15;
        i41 = i14;
        i42 = i13;
        iArr3 = iArr;
        i8 = i12;
        i7 = i11;
        i6 = i10;
        r5 = r20;
        z = true;
        c = 0;
        int i50222 = iArr3[c] + i39 + i40;
        char c2222 = z ? 1 : 0;
        char c3222 = z ? 1 : 0;
        char c4222 = z ? 1 : 0;
        char c5222 = z ? 1 : 0;
        int i51222 = iArr3[c2222] + i41 + i42;
        if (i9 != 1073741824) {
        }
        if (i7 != 1073741824) {
        }
        r5.f7251 = i8;
        r5.f7249 = i6;
        r5.m502(i8);
        r5.m479(i6);
        if (r5.f7278 <= 0) {
        }
        r5.f7257 = z;
    }

    @Override // androidx.constraintlayout.solver.widgets.ConstraintWidget
    /* renamed from: K  reason: contains not printable characters */
    public void m5577(C2080 r11, boolean z) {
        ConstraintWidget constraintWidget;
        super.m497(r11, z);
        ConstraintWidget constraintWidget2 = this.f867;
        boolean z2 = constraintWidget2 != null ? ((C2082) constraintWidget2).f7189 : false;
        int i = this.f7303;
        if (i != 0) {
            if (i == 1) {
                int size = this.f7298.size();
                int i2 = 0;
                while (i2 < size) {
                    this.f7298.get(i2).m5583(z2, i2, i2 == size + -1);
                    i2++;
                }
            } else if (!(i != 2 || this.f7296 == null || this.f7294 == null || this.f7290 == null)) {
                for (int i3 = 0; i3 < this.f7289; i3++) {
                    this.f7302[i3].m505();
                }
                int[] iArr = this.f7296;
                int i4 = iArr[0];
                int i5 = iArr[1];
                ConstraintWidget constraintWidget3 = null;
                for (int i6 = 0; i6 < i4; i6++) {
                    ConstraintWidget constraintWidget4 = this.f7294[z2 ? (i4 - i6) - 1 : i6];
                    if (!(constraintWidget4 == null || constraintWidget4.f840 == 8)) {
                        if (i6 == 0) {
                            constraintWidget4.m492(constraintWidget4.f820, this.f820, this.f7247);
                            constraintWidget4.f898 = this.f7297;
                            constraintWidget4.f878 = this.f7295;
                        }
                        if (i6 == i4 - 1) {
                            constraintWidget4.m492(constraintWidget4.f833, this.f833, this.f7248);
                        }
                        if (i6 > 0) {
                            constraintWidget4.m492(constraintWidget4.f820, constraintWidget3.f833, this.f7286);
                            constraintWidget3.m492(constraintWidget3.f833, constraintWidget4.f820, 0);
                        }
                        constraintWidget3 = constraintWidget4;
                    }
                }
                for (int i7 = 0; i7 < i5; i7++) {
                    ConstraintWidget constraintWidget5 = this.f7290[i7];
                    if (!(constraintWidget5 == null || constraintWidget5.f840 == 8)) {
                        if (i7 == 0) {
                            constraintWidget5.m492(constraintWidget5.f885, this.f885, this.f7254);
                            constraintWidget5.f834 = this.f7301;
                            constraintWidget5.f888 = this.f7293;
                        }
                        if (i7 == i5 - 1) {
                            constraintWidget5.m492(constraintWidget5.f841, this.f841, this.f7255);
                        }
                        if (i7 > 0) {
                            constraintWidget5.m492(constraintWidget5.f885, constraintWidget3.f841, this.f7308);
                            constraintWidget3.m492(constraintWidget3.f841, constraintWidget5.f885, 0);
                        }
                        constraintWidget3 = constraintWidget5;
                    }
                }
                for (int i8 = 0; i8 < i4; i8++) {
                    for (int i9 = 0; i9 < i5; i9++) {
                        int i10 = (i9 * i4) + i8;
                        if (this.f7299 == 1) {
                            i10 = (i8 * i5) + i9;
                        }
                        ConstraintWidget[] constraintWidgetArr = this.f7302;
                        if (!(i10 >= constraintWidgetArr.length || (constraintWidget = constraintWidgetArr[i10]) == null || constraintWidget.f840 == 8)) {
                            ConstraintWidget constraintWidget6 = this.f7294[i8];
                            ConstraintWidget constraintWidget7 = this.f7290[i9];
                            if (constraintWidget != constraintWidget6) {
                                constraintWidget.m492(constraintWidget.f820, constraintWidget6.f820, 0);
                                constraintWidget.m492(constraintWidget.f833, constraintWidget6.f833, 0);
                            }
                            if (constraintWidget != constraintWidget7) {
                                constraintWidget.m492(constraintWidget.f885, constraintWidget7.f885, 0);
                                constraintWidget.m492(constraintWidget.f841, constraintWidget7.f841, 0);
                            }
                        }
                    }
                }
            }
        } else if (this.f7298.size() > 0) {
            this.f7298.get(0).m5583(z2, 0, true);
        }
        this.f7257 = false;
    }
}
