package ῲ.ⁱ.ῲ.㿎.ᕣ;

import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.solver.widgets.analyzer.DependencyNode;
import androidx.constraintlayout.solver.widgets.analyzer.WidgetRun;
import ඓ.K.K.K.C1293;
import ῲ.ⁱ.ῲ.㿎.AbstractC2105;

/* renamed from: ῲ.ⁱ.ῲ.㿎.ᕣ.㑃  reason: contains not printable characters */
/* compiled from: VerticalWidgetRun */
public class C2093 extends WidgetRun {

    /* renamed from: ᕣ  reason: contains not printable characters */
    public DependencyNode f7237 = new DependencyNode(this);

    /* renamed from: 㑃  reason: contains not printable characters */
    public C2095 f7238 = null;

    public C2093(ConstraintWidget constraintWidget) {
        super(constraintWidget);
        this.f928.f907 = DependencyNode.Type.TOP;
        this.f921.f907 = DependencyNode.Type.BOTTOM;
        this.f7237.f907 = DependencyNode.Type.BASELINE;
        this.f926 = 1;
    }

    public String toString() {
        StringBuilder r0 = C1293.m3416("VerticalRun ");
        r0.append(this.f922.f893);
        return r0.toString();
    }

    @Override // androidx.constraintlayout.solver.widgets.analyzer.WidgetRun
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m5526() {
        this.f919 = null;
        this.f928.m515();
        this.f921.m515();
        this.f7237.m515();
        this.f920.m515();
        this.f923 = false;
    }

    @Override // androidx.constraintlayout.solver.widgets.analyzer.WidgetRun
    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean m5527() {
        if (this.f927 != ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT || this.f922.f827 == 0) {
            return true;
        }
        return false;
    }

    @Override // androidx.constraintlayout.solver.widgets.analyzer.WidgetRun
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m5528() {
        DependencyNode dependencyNode = this.f928;
        if (dependencyNode.f914) {
            this.f922.f892 = dependencyNode.f911;
        }
    }

    @Override // ῲ.ⁱ.ῲ.㿎.ᕣ.AbstractC2096, androidx.constraintlayout.solver.widgets.analyzer.WidgetRun
    /* renamed from: K  reason: contains not printable characters */
    public void m5530(AbstractC2096 r8) {
        int i;
        float f;
        float f2;
        float f3;
        int ordinal = this.f925.ordinal();
        if (ordinal == 1 || ordinal == 2 || ordinal != 3) {
            C2095 r82 = this.f920;
            if (r82.f906 && !r82.f914 && this.f927 == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                ConstraintWidget constraintWidget = this.f922;
                int i2 = constraintWidget.f827;
                if (i2 == 2) {
                    ConstraintWidget constraintWidget2 = constraintWidget.f867;
                    if (constraintWidget2 != null) {
                        C2095 r0 = constraintWidget2.f835.f920;
                        if (r0.f914) {
                            r82.m5539((int) ((((float) r0.f911) * constraintWidget.f846) + 0.5f));
                        }
                    }
                } else if (i2 == 3) {
                    C2095 r83 = constraintWidget.f896.f920;
                    if (r83.f914) {
                        int i3 = constraintWidget.f855;
                        if (i3 == -1) {
                            f2 = (float) r83.f911;
                            f3 = constraintWidget.f842;
                        } else if (i3 == 0) {
                            f = ((float) r83.f911) * constraintWidget.f842;
                            i = (int) (f + 0.5f);
                            this.f920.m5539(i);
                        } else if (i3 != 1) {
                            i = 0;
                            this.f920.m5539(i);
                        } else {
                            f2 = (float) r83.f911;
                            f3 = constraintWidget.f842;
                        }
                        f = f2 / f3;
                        i = (int) (f + 0.5f);
                        this.f920.m5539(i);
                    }
                }
            }
            DependencyNode dependencyNode = this.f928;
            if (dependencyNode.f906) {
                DependencyNode dependencyNode2 = this.f921;
                if (dependencyNode2.f906) {
                    if (!dependencyNode.f914 || !dependencyNode2.f914 || !this.f920.f914) {
                        if (!this.f920.f914 && this.f927 == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                            ConstraintWidget constraintWidget3 = this.f922;
                            if (constraintWidget3.f874 == 0 && !constraintWidget3.m514()) {
                                int i4 = this.f928.f913.get(0).f911;
                                DependencyNode dependencyNode3 = this.f928;
                                int i5 = i4 + dependencyNode3.f915;
                                int i6 = this.f921.f913.get(0).f911 + this.f921.f915;
                                dependencyNode3.m516(i5);
                                this.f921.m516(i6);
                                this.f920.m5539(i6 - i5);
                                return;
                            }
                        }
                        if (!this.f920.f914 && this.f927 == ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT && this.f924 == 1 && this.f928.f913.size() > 0 && this.f921.f913.size() > 0) {
                            int i7 = (this.f921.f913.get(0).f911 + this.f921.f915) - (this.f928.f913.get(0).f911 + this.f928.f915);
                            C2095 r84 = this.f920;
                            int i8 = r84.f7240;
                            if (i7 < i8) {
                                r84.m5539(i7);
                            } else {
                                r84.m5539(i8);
                            }
                        }
                        if (this.f920.f914 && this.f928.f913.size() > 0 && this.f921.f913.size() > 0) {
                            DependencyNode dependencyNode4 = this.f928.f913.get(0);
                            DependencyNode dependencyNode5 = this.f921.f913.get(0);
                            int i9 = dependencyNode4.f911;
                            int i10 = this.f928.f915 + i9;
                            int i11 = dependencyNode5.f911;
                            int i12 = this.f921.f915 + i11;
                            float f4 = this.f922.f888;
                            if (dependencyNode4 == dependencyNode5) {
                                f4 = 0.5f;
                            } else {
                                i9 = i10;
                                i11 = i12;
                            }
                            this.f928.m516((int) ((((float) ((i11 - i9) - this.f920.f911)) * f4) + ((float) i9) + 0.5f));
                            this.f921.m516(this.f928.f911 + this.f920.f911);
                            return;
                        }
                        return;
                    }
                    return;
                }
                return;
            }
            return;
        }
        ConstraintWidget constraintWidget4 = this.f922;
        m525(constraintWidget4.f885, constraintWidget4.f841, 1);
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public void m5531() {
        this.f923 = false;
        this.f928.m515();
        this.f928.f914 = false;
        this.f921.m515();
        this.f921.f914 = false;
        this.f7237.m515();
        this.f7237.f914 = false;
        this.f920.f914 = false;
    }

    @Override // androidx.constraintlayout.solver.widgets.analyzer.WidgetRun
    /* renamed from: K  reason: contains not printable characters */
    public void m5529() {
        ConstraintWidget constraintWidget;
        ConstraintWidget constraintWidget2;
        ConstraintWidget constraintWidget3;
        ConstraintWidget constraintWidget4 = this.f922;
        if (constraintWidget4.f861) {
            this.f920.m5539(constraintWidget4.m473());
        }
        if (!this.f920.f914) {
            this.f927 = this.f922.m512();
            if (this.f922.f852) {
                this.f7238 = new C2092(this);
            }
            ConstraintWidget.DimensionBehaviour dimensionBehaviour = this.f927;
            if (dimensionBehaviour != ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
                if (dimensionBehaviour == ConstraintWidget.DimensionBehaviour.MATCH_PARENT && (constraintWidget3 = this.f922.f867) != null && constraintWidget3.m512() == ConstraintWidget.DimensionBehaviour.FIXED) {
                    int r1 = (constraintWidget3.m473() - this.f922.f885.m456()) - this.f922.f841.m456();
                    m526(this.f928, constraintWidget3.f835.f928, this.f922.f885.m456());
                    m526(this.f921, constraintWidget3.f835.f921, -this.f922.f841.m456());
                    this.f920.m5539(r1);
                    return;
                } else if (this.f927 == ConstraintWidget.DimensionBehaviour.FIXED) {
                    this.f920.m5539(this.f922.m473());
                }
            }
        } else if (this.f927 == ConstraintWidget.DimensionBehaviour.MATCH_PARENT && (constraintWidget2 = this.f922.f867) != null && constraintWidget2.m512() == ConstraintWidget.DimensionBehaviour.FIXED) {
            m526(this.f928, constraintWidget2.f835.f928, this.f922.f885.m456());
            m526(this.f921, constraintWidget2.f835.f921, -this.f922.f841.m456());
            return;
        }
        if (this.f920.f914) {
            ConstraintWidget constraintWidget5 = this.f922;
            if (constraintWidget5.f861) {
                ConstraintAnchor[] constraintAnchorArr = constraintWidget5.f856;
                if (constraintAnchorArr[2].f812 == null || constraintAnchorArr[3].f812 == null) {
                    ConstraintWidget constraintWidget6 = this.f922;
                    ConstraintAnchor[] constraintAnchorArr2 = constraintWidget6.f856;
                    if (constraintAnchorArr2[2].f812 != null) {
                        DependencyNode r0 = m522(constraintAnchorArr2[2]);
                        if (r0 != null) {
                            DependencyNode dependencyNode = this.f928;
                            int r2 = this.f922.f856[2].m456();
                            dependencyNode.f913.add(r0);
                            dependencyNode.f915 = r2;
                            r0.f908.add(dependencyNode);
                            m526(this.f921, this.f928, this.f920.f911);
                            ConstraintWidget constraintWidget7 = this.f922;
                            if (constraintWidget7.f852) {
                                m526(this.f7237, this.f928, constraintWidget7.f865);
                                return;
                            }
                            return;
                        }
                        return;
                    } else if (constraintAnchorArr2[3].f812 != null) {
                        DependencyNode r02 = m522(constraintAnchorArr2[3]);
                        if (r02 != null) {
                            DependencyNode dependencyNode2 = this.f921;
                            dependencyNode2.f913.add(r02);
                            dependencyNode2.f915 = -this.f922.f856[3].m456();
                            r02.f908.add(dependencyNode2);
                            m526(this.f928, this.f921, -this.f920.f911);
                        }
                        ConstraintWidget constraintWidget8 = this.f922;
                        if (constraintWidget8.f852) {
                            m526(this.f7237, this.f928, constraintWidget8.f865);
                            return;
                        }
                        return;
                    } else if (constraintAnchorArr2[4].f812 != null) {
                        DependencyNode r03 = m522(constraintAnchorArr2[4]);
                        if (r03 != null) {
                            DependencyNode dependencyNode3 = this.f7237;
                            dependencyNode3.f913.add(r03);
                            dependencyNode3.f915 = 0;
                            r03.f908.add(dependencyNode3);
                            m526(this.f928, this.f7237, -this.f922.f865);
                            m526(this.f921, this.f928, this.f920.f911);
                            return;
                        }
                        return;
                    } else if (!(constraintWidget6 instanceof AbstractC2105) && constraintWidget6.f867 != null && constraintWidget6.m488(ConstraintAnchor.Type.CENTER).f812 == null) {
                        ConstraintWidget constraintWidget9 = this.f922;
                        m526(this.f928, constraintWidget9.f867.f835.f928, constraintWidget9.m476());
                        m526(this.f921, this.f928, this.f920.f911);
                        ConstraintWidget constraintWidget10 = this.f922;
                        if (constraintWidget10.f852) {
                            m526(this.f7237, this.f928, constraintWidget10.f865);
                            return;
                        }
                        return;
                    } else {
                        return;
                    }
                } else {
                    if (constraintWidget5.m514()) {
                        this.f928.f915 = this.f922.f856[2].m456();
                        this.f921.f915 = -this.f922.f856[3].m456();
                    } else {
                        DependencyNode r04 = m522(this.f922.f856[2]);
                        if (r04 != null) {
                            DependencyNode dependencyNode4 = this.f928;
                            int r22 = this.f922.f856[2].m456();
                            dependencyNode4.f913.add(r04);
                            dependencyNode4.f915 = r22;
                            r04.f908.add(dependencyNode4);
                        }
                        DependencyNode r05 = m522(this.f922.f856[3]);
                        if (r05 != null) {
                            DependencyNode dependencyNode5 = this.f921;
                            dependencyNode5.f913.add(r05);
                            dependencyNode5.f915 = -this.f922.f856[3].m456();
                            r05.f908.add(dependencyNode5);
                        }
                        this.f928.f910 = true;
                        this.f921.f910 = true;
                    }
                    ConstraintWidget constraintWidget11 = this.f922;
                    if (constraintWidget11.f852) {
                        m526(this.f7237, this.f928, constraintWidget11.f865);
                        return;
                    }
                    return;
                }
            }
        }
        C2095 r06 = this.f920;
        if (r06.f914 || this.f927 != ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT) {
            C2095 r07 = this.f920;
            r07.f908.add(this);
            if (r07.f914) {
                m5530(this);
            }
        } else {
            ConstraintWidget constraintWidget12 = this.f922;
            int i = constraintWidget12.f827;
            if (i == 2) {
                ConstraintWidget constraintWidget13 = constraintWidget12.f867;
                if (constraintWidget13 != null) {
                    C2095 r6 = constraintWidget13.f835.f920;
                    r06.f913.add(r6);
                    r6.f908.add(this.f920);
                    C2095 r08 = this.f920;
                    r08.f910 = true;
                    r08.f908.add(this.f928);
                    this.f920.f908.add(this.f921);
                }
            } else if (i == 3 && !constraintWidget12.m514()) {
                ConstraintWidget constraintWidget14 = this.f922;
                if (constraintWidget14.f874 != 3) {
                    C2095 r09 = constraintWidget14.f896.f920;
                    this.f920.f913.add(r09);
                    r09.f908.add(this.f920);
                    C2095 r010 = this.f920;
                    r010.f910 = true;
                    r010.f908.add(this.f928);
                    this.f920.f908.add(this.f921);
                }
            }
        }
        ConstraintWidget constraintWidget15 = this.f922;
        ConstraintAnchor[] constraintAnchorArr3 = constraintWidget15.f856;
        if (constraintAnchorArr3[2].f812 == null || constraintAnchorArr3[3].f812 == null) {
            ConstraintWidget constraintWidget16 = this.f922;
            ConstraintAnchor[] constraintAnchorArr4 = constraintWidget16.f856;
            if (constraintAnchorArr4[2].f812 != null) {
                DependencyNode r011 = m522(constraintAnchorArr4[2]);
                if (r011 != null) {
                    DependencyNode dependencyNode6 = this.f928;
                    int r23 = this.f922.f856[2].m456();
                    dependencyNode6.f913.add(r011);
                    dependencyNode6.f915 = r23;
                    r011.f908.add(dependencyNode6);
                    m527(this.f921, this.f928, 1, this.f920);
                    if (this.f922.f852) {
                        m527(this.f7237, this.f928, 1, this.f7238);
                    }
                    ConstraintWidget.DimensionBehaviour dimensionBehaviour2 = this.f927;
                    ConstraintWidget.DimensionBehaviour dimensionBehaviour3 = ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT;
                    if (dimensionBehaviour2 == dimensionBehaviour3) {
                        ConstraintWidget constraintWidget17 = this.f922;
                        if (constraintWidget17.f842 > 0.0f) {
                            C2094 r012 = constraintWidget17.f896;
                            if (r012.f927 == dimensionBehaviour3) {
                                r012.f920.f908.add(this.f920);
                                this.f920.f913.add(this.f922.f896.f920);
                                this.f920.f912 = this;
                            }
                        }
                    }
                }
            } else if (constraintAnchorArr4[3].f812 != null) {
                DependencyNode r013 = m522(constraintAnchorArr4[3]);
                if (r013 != null) {
                    DependencyNode dependencyNode7 = this.f921;
                    dependencyNode7.f913.add(r013);
                    dependencyNode7.f915 = -this.f922.f856[3].m456();
                    r013.f908.add(dependencyNode7);
                    m527(this.f928, this.f921, -1, this.f920);
                    if (this.f922.f852) {
                        m527(this.f7237, this.f928, 1, this.f7238);
                    }
                }
            } else if (constraintAnchorArr4[4].f812 != null) {
                DependencyNode r014 = m522(constraintAnchorArr4[4]);
                if (r014 != null) {
                    DependencyNode dependencyNode8 = this.f7237;
                    dependencyNode8.f913.add(r014);
                    dependencyNode8.f915 = 0;
                    r014.f908.add(dependencyNode8);
                    m527(this.f928, this.f7237, -1, this.f7238);
                    m527(this.f921, this.f928, 1, this.f920);
                }
            } else if (!(constraintWidget16 instanceof AbstractC2105) && (constraintWidget = constraintWidget16.f867) != null) {
                m526(this.f928, constraintWidget.f835.f928, constraintWidget16.m476());
                m527(this.f921, this.f928, 1, this.f920);
                if (this.f922.f852) {
                    m527(this.f7237, this.f928, 1, this.f7238);
                }
                ConstraintWidget.DimensionBehaviour dimensionBehaviour4 = this.f927;
                ConstraintWidget.DimensionBehaviour dimensionBehaviour5 = ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT;
                if (dimensionBehaviour4 == dimensionBehaviour5) {
                    ConstraintWidget constraintWidget18 = this.f922;
                    if (constraintWidget18.f842 > 0.0f) {
                        C2094 r015 = constraintWidget18.f896;
                        if (r015.f927 == dimensionBehaviour5) {
                            r015.f920.f908.add(this.f920);
                            this.f920.f913.add(this.f922.f896.f920);
                            this.f920.f912 = this;
                        }
                    }
                }
            }
        } else {
            if (constraintWidget15.m514()) {
                this.f928.f915 = this.f922.f856[2].m456();
                this.f921.f915 = -this.f922.f856[3].m456();
            } else {
                DependencyNode r016 = m522(this.f922.f856[2]);
                DependencyNode r12 = m522(this.f922.f856[3]);
                r016.f908.add(this);
                if (r016.f914) {
                    m5530(this);
                }
                r12.f908.add(this);
                if (r12.f914) {
                    m5530(this);
                }
                this.f925 = WidgetRun.RunType.CENTER;
            }
            if (this.f922.f852) {
                m527(this.f7237, this.f928, 1, this.f7238);
            }
        }
        if (this.f920.f913.size() == 0) {
            this.f920.f906 = true;
        }
    }
}
