package androidx.constraintlayout.widget;

import X.AnonymousClass05K;
import X.AnonymousClass05L;
import X.AnonymousClass05O;
import X.AnonymousClass05P;
import X.AnonymousClass0HH;
import X.C013205a;
import X.C013305b;
import X.C013905h;
import X.C014005i;
import X.C014105j;
import X.C014205k;
import X.C014305l;
import X.C014405m;
import X.C014505n;
import X.C278519b;
import X.C278919f;
import X.C39111gr;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.Xml;
import android.view.View;
import android.view.ViewGroup;
import com.apiguard3.APIGuard;
import com.bef.effectsdk.BuildConfig;
import com.bytedance.covode.number.Covode;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import org.xmlpull.v1.XmlPullParserException;

public class ConstraintLayout extends ViewGroup {
    public SparseArray<View> mChildrenByIds = new SparseArray<>();
    public ArrayList<C014205k> mConstraintHelpers = new ArrayList<>(4);
    public C014405m mConstraintSet = null;
    public int mConstraintSetId = -1;
    public HashMap<String, Integer> mDesignIds = new HashMap<>();
    public boolean mDirtyHierarchy = true;
    public int mLastMeasureHeight = -1;
    public int mLastMeasureHeightMode = 0;
    public int mLastMeasureHeightSize = -1;
    public int mLastMeasureWidth = -1;
    public int mLastMeasureWidthMode = 0;
    public int mLastMeasureWidthSize = -1;
    public C39111gr mLayoutWidget = new C39111gr();
    public int mMaxHeight = Integer.MAX_VALUE;
    public int mMaxWidth = Integer.MAX_VALUE;
    public C013305b mMetrics;
    public int mMinHeight = 0;
    public int mMinWidth = 0;
    public int mOptimizationLevel = 7;
    public final ArrayList<AnonymousClass05P> mVariableDimensionsWidgets = new ArrayList<>(100);

    static {
        Covode.recordClassIndex(639);
    }

    public boolean shouldDelayChildPressedState() {
        return false;
    }

    public int getMaxHeight() {
        return this.mMaxHeight;
    }

    public int getMaxWidth() {
        return this.mMaxWidth;
    }

    public int getMinHeight() {
        return this.mMinHeight;
    }

    public int getMinWidth() {
        return this.mMinWidth;
    }

    public C013905h generateDefaultLayoutParams() {
        return new C013905h(-2, -2);
    }

    public int getOptimizationLevel() {
        return this.mLayoutWidget.LJIILLIIL;
    }

    private void updateHierarchy() {
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            if (getChildAt(i).isLayoutRequested()) {
                this.mVariableDimensionsWidgets.clear();
                setChildrenConstraints();
                return;
            }
        }
    }

    public void requestLayout() {
        super.requestLayout();
        this.mDirtyHierarchy = true;
        this.mLastMeasureWidth = -1;
        this.mLastMeasureHeight = -1;
        this.mLastMeasureWidthSize = -1;
        this.mLastMeasureHeightSize = -1;
        this.mLastMeasureWidthMode = 0;
        this.mLastMeasureHeightMode = 0;
    }

    private void updatePostMeasures() {
        int childCount = getChildCount();
        int i = 0;
        for (int i2 = 0; i2 < childCount; i2++) {
            View childAt = getChildAt(i2);
            if (childAt instanceof C014105j) {
                C014105j r1 = (C014105j) childAt;
                if (r1.LIZIZ != null) {
                    C013905h r4 = (C013905h) r1.getLayoutParams();
                    C013905h r2 = (C013905h) r1.LIZIZ.getLayoutParams();
                    r2.widget.mVisibility = 0;
                    r4.widget.setWidth(r2.widget.getWidth());
                    r4.widget.setHeight(r2.widget.getHeight());
                    r2.widget.mVisibility = 8;
                }
            }
        }
        int size = this.mConstraintHelpers.size();
        if (size > 0) {
            do {
                this.mConstraintHelpers.get(i).updatePostMeasure(this);
                i++;
            } while (i < size);
        }
    }

    private void setChildrenConstraints() {
        AnonymousClass05P targetWidget;
        AnonymousClass05P targetWidget2;
        AnonymousClass05P targetWidget3;
        AnonymousClass05P targetWidget4;
        boolean isInEditMode = isInEditMode();
        int childCount = getChildCount();
        boolean z = false;
        if (isInEditMode) {
            for (int i = 0; i < childCount; i++) {
                View childAt = getChildAt(i);
                try {
                    String resourceName = getResources().getResourceName(childAt.getId());
                    setDesignInformation(0, resourceName, Integer.valueOf(childAt.getId()));
                    int indexOf = resourceName.indexOf(47);
                    if (indexOf != -1) {
                        resourceName = resourceName.substring(indexOf + 1);
                    }
                    getTargetWidget(childAt.getId()).mDebugName = resourceName;
                } catch (Resources.NotFoundException unused) {
                }
            }
        }
        for (int i2 = 0; i2 < childCount; i2++) {
            AnonymousClass05P viewWidget = getViewWidget(getChildAt(i2));
            if (viewWidget != null) {
                viewWidget.reset();
            }
        }
        if (this.mConstraintSetId != -1) {
            for (int i3 = 0; i3 < childCount; i3++) {
                View childAt2 = getChildAt(i3);
                if (childAt2.getId() == this.mConstraintSetId && (childAt2 instanceof C014505n)) {
                    this.mConstraintSet = ((C014505n) childAt2).getConstraintSet();
                }
            }
        }
        C014405m r0 = this.mConstraintSet;
        if (r0 != null) {
            r0.LIZJ(this);
        }
        this.mLayoutWidget.LJIJJLI.clear();
        int size = this.mConstraintHelpers.size();
        if (size > 0) {
            int i4 = 0;
            do {
                this.mConstraintHelpers.get(i4).updatePreLayout(this);
                i4++;
            } while (i4 < size);
        }
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt3 = getChildAt(i5);
            if (childAt3 instanceof C014105j) {
                C014105j r1 = (C014105j) childAt3;
                if (r1.LIZ == -1 && !r1.isInEditMode()) {
                    r1.setVisibility(r1.LIZJ);
                }
                r1.LIZIZ = findViewById(r1.LIZ);
                if (r1.LIZIZ != null) {
                    ((C013905h) r1.LIZIZ.getLayoutParams()).isInPlaceholder = true;
                    r1.LIZIZ.setVisibility(0);
                    r1.setVisibility(0);
                }
            }
        }
        for (int i6 = 0; i6 < childCount; i6++) {
            View childAt4 = getChildAt(i6);
            AnonymousClass05P viewWidget2 = getViewWidget(childAt4);
            if (viewWidget2 != null) {
                C013905h r02 = (C013905h) childAt4.getLayoutParams();
                r02.validate();
                if (r02.helped) {
                    r02.helped = z;
                } else if (isInEditMode) {
                    try {
                        String resourceName2 = getResources().getResourceName(childAt4.getId());
                        setDesignInformation(z ? 1 : 0, resourceName2, Integer.valueOf(childAt4.getId()));
                        getTargetWidget(childAt4.getId()).mDebugName = resourceName2.substring(resourceName2.indexOf("id/") + 3);
                    } catch (Resources.NotFoundException unused2) {
                    }
                }
                viewWidget2.mVisibility = childAt4.getVisibility();
                if (r02.isInPlaceholder) {
                    viewWidget2.mVisibility = 8;
                }
                viewWidget2.mCompanionWidget = childAt4;
                C39111gr r7 = this.mLayoutWidget;
                r7.LJIJJLI.add(viewWidget2);
                if (viewWidget2.mParent != null) {
                    ((C278919f) viewWidget2.mParent).LIZ(viewWidget2);
                }
                viewWidget2.mParent = r7;
                if (!r02.verticalDimensionFixed || !r02.horizontalDimensionFixed) {
                    this.mVariableDimensionsWidgets.add(viewWidget2);
                }
                if (r02.isGuideline) {
                    C278519b r12 = (C278519b) viewWidget2;
                    int i7 = r02.resolvedGuideBegin;
                    int i8 = r02.resolvedGuideEnd;
                    float f = r02.resolvedGuidePercent;
                    if (f != -1.0f) {
                        r12.LIZ(f);
                    } else if (i7 != -1) {
                        r12.LIZIZ(i7);
                    } else if (i8 != -1) {
                        r12.LIZJ(i8);
                    }
                } else if (r02.leftToLeft != -1 || r02.leftToRight != -1 || r02.rightToLeft != -1 || r02.rightToRight != -1 || r02.startToStart != -1 || r02.startToEnd != -1 || r02.endToStart != -1 || r02.endToEnd != -1 || r02.topToTop != -1 || r02.topToBottom != -1 || r02.bottomToTop != -1 || r02.bottomToBottom != -1 || r02.baselineToBaseline != -1 || r02.editorAbsoluteX != -1 || r02.editorAbsoluteY != -1 || r02.circleConstraint != -1 || r02.width == -1 || r02.height == -1) {
                    int i9 = r02.resolvedLeftToLeft;
                    int i10 = r02.resolvedLeftToRight;
                    int i11 = r02.resolvedRightToLeft;
                    int i12 = r02.resolvedRightToRight;
                    int i13 = r02.resolveGoneLeftMargin;
                    int i14 = r02.resolveGoneRightMargin;
                    float f2 = r02.resolvedHorizontalBias;
                    if (r02.circleConstraint != -1) {
                        AnonymousClass05P targetWidget5 = getTargetWidget(r02.circleConstraint);
                        if (targetWidget5 != null) {
                            viewWidget2.connectCircularConstraint(targetWidget5, r02.circleAngle, r02.circleRadius);
                        }
                    } else {
                        if (i9 != -1) {
                            AnonymousClass05P targetWidget6 = getTargetWidget(i9);
                            if (targetWidget6 != null) {
                                viewWidget2.immediateConnect(AnonymousClass05L.LEFT, targetWidget6, AnonymousClass05L.LEFT, r02.leftMargin, i13);
                            }
                        } else if (!(i10 == -1 || (targetWidget = getTargetWidget(i10)) == null)) {
                            viewWidget2.immediateConnect(AnonymousClass05L.LEFT, targetWidget, AnonymousClass05L.RIGHT, r02.leftMargin, i13);
                        }
                        if (i11 != -1) {
                            AnonymousClass05P targetWidget7 = getTargetWidget(i11);
                            if (targetWidget7 != null) {
                                viewWidget2.immediateConnect(AnonymousClass05L.RIGHT, targetWidget7, AnonymousClass05L.LEFT, r02.rightMargin, i14);
                            }
                        } else if (!(i12 == -1 || (targetWidget2 = getTargetWidget(i12)) == null)) {
                            viewWidget2.immediateConnect(AnonymousClass05L.RIGHT, targetWidget2, AnonymousClass05L.RIGHT, r02.rightMargin, i14);
                        }
                        if (r02.topToTop != -1) {
                            AnonymousClass05P targetWidget8 = getTargetWidget(r02.topToTop);
                            if (targetWidget8 != null) {
                                viewWidget2.immediateConnect(AnonymousClass05L.TOP, targetWidget8, AnonymousClass05L.TOP, r02.topMargin, r02.goneTopMargin);
                            }
                        } else if (!(r02.topToBottom == -1 || (targetWidget3 = getTargetWidget(r02.topToBottom)) == null)) {
                            viewWidget2.immediateConnect(AnonymousClass05L.TOP, targetWidget3, AnonymousClass05L.BOTTOM, r02.topMargin, r02.goneTopMargin);
                        }
                        if (r02.bottomToTop != -1) {
                            AnonymousClass05P targetWidget9 = getTargetWidget(r02.bottomToTop);
                            if (targetWidget9 != null) {
                                viewWidget2.immediateConnect(AnonymousClass05L.BOTTOM, targetWidget9, AnonymousClass05L.TOP, r02.bottomMargin, r02.goneBottomMargin);
                            }
                        } else if (!(r02.bottomToBottom == -1 || (targetWidget4 = getTargetWidget(r02.bottomToBottom)) == null)) {
                            viewWidget2.immediateConnect(AnonymousClass05L.BOTTOM, targetWidget4, AnonymousClass05L.BOTTOM, r02.bottomMargin, r02.goneBottomMargin);
                        }
                        if (r02.baselineToBaseline != -1) {
                            View view = this.mChildrenByIds.get(r02.baselineToBaseline);
                            AnonymousClass05P targetWidget10 = getTargetWidget(r02.baselineToBaseline);
                            if (!(targetWidget10 == null || view == null || !(view.getLayoutParams() instanceof C013905h))) {
                                r02.needsBaseline = true;
                                ((C013905h) view.getLayoutParams()).needsBaseline = true;
                                viewWidget2.getAnchor(AnonymousClass05L.BASELINE).LIZ(targetWidget10.getAnchor(AnonymousClass05L.BASELINE), 0, -1, AnonymousClass05K.STRONG, 0, true);
                                viewWidget2.getAnchor(AnonymousClass05L.TOP).LIZJ();
                                viewWidget2.getAnchor(AnonymousClass05L.BOTTOM).LIZJ();
                            }
                        }
                        if (f2 >= 0.0f && f2 != 0.5f) {
                            viewWidget2.mHorizontalBiasPercent = f2;
                        }
                        if (r02.verticalBias >= 0.0f && r02.verticalBias != 0.5f) {
                            viewWidget2.mVerticalBiasPercent = r02.verticalBias;
                        }
                    }
                    if (isInEditMode && !(r02.editorAbsoluteX == -1 && r02.editorAbsoluteY == -1)) {
                        viewWidget2.setOrigin(r02.editorAbsoluteX, r02.editorAbsoluteY);
                    }
                    if (r02.horizontalDimensionFixed) {
                        viewWidget2.setHorizontalDimensionBehaviour(AnonymousClass05O.FIXED);
                        viewWidget2.setWidth(r02.width);
                    } else if (r02.width == -1) {
                        viewWidget2.setHorizontalDimensionBehaviour(AnonymousClass05O.MATCH_PARENT);
                        viewWidget2.getAnchor(AnonymousClass05L.LEFT).LJ = r02.leftMargin;
                        viewWidget2.getAnchor(AnonymousClass05L.RIGHT).LJ = r02.rightMargin;
                    } else {
                        viewWidget2.setHorizontalDimensionBehaviour(AnonymousClass05O.MATCH_CONSTRAINT);
                        viewWidget2.setWidth(0);
                    }
                    if (r02.verticalDimensionFixed) {
                        z = false;
                        viewWidget2.setVerticalDimensionBehaviour(AnonymousClass05O.FIXED);
                        viewWidget2.setHeight(r02.height);
                    } else if (r02.height == -1) {
                        viewWidget2.setVerticalDimensionBehaviour(AnonymousClass05O.MATCH_PARENT);
                        viewWidget2.getAnchor(AnonymousClass05L.TOP).LJ = r02.topMargin;
                        viewWidget2.getAnchor(AnonymousClass05L.BOTTOM).LJ = r02.bottomMargin;
                        z = false;
                    } else {
                        viewWidget2.setVerticalDimensionBehaviour(AnonymousClass05O.MATCH_CONSTRAINT);
                        z = false;
                        viewWidget2.setHeight(0);
                    }
                    if (r02.dimensionRatio != null) {
                        viewWidget2.setDimensionRatio(r02.dimensionRatio);
                    }
                    viewWidget2.setHorizontalWeight(r02.horizontalWeight);
                    viewWidget2.setVerticalWeight(r02.verticalWeight);
                    viewWidget2.mHorizontalChainStyle = r02.horizontalChainStyle;
                    viewWidget2.mVerticalChainStyle = r02.verticalChainStyle;
                    viewWidget2.setHorizontalMatchStyle(r02.matchConstraintDefaultWidth, r02.matchConstraintMinWidth, r02.matchConstraintMaxWidth, r02.matchConstraintPercentWidth);
                    viewWidget2.setVerticalMatchStyle(r02.matchConstraintDefaultHeight, r02.matchConstraintMinHeight, r02.matchConstraintMaxHeight, r02.matchConstraintPercentHeight);
                }
            }
        }
    }

    public boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return layoutParams instanceof C013905h;
    }

    public void removeView(View view) {
        super.removeView(view);
    }

    public void setConstraintSet(C014405m r1) {
        this.mConstraintSet = r1;
    }

    public void fillMetrics(C013305b r1) {
        this.mMetrics = r1;
        C013205a.LJII = r1;
    }

    public void setOptimizationLevel(int i) {
        this.mLayoutWidget.LJIILLIIL = i;
    }

    public C013905h generateLayoutParams(AttributeSet attributeSet) {
        return new C013905h(getContext(), attributeSet);
    }

    public View getViewById(int i) {
        return this.mChildrenByIds.get(i);
    }

    public void setMaxHeight(int i) {
        if (i != this.mMaxHeight) {
            this.mMaxHeight = i;
            requestLayout();
        }
    }

    public void setMaxWidth(int i) {
        if (i != this.mMaxWidth) {
            this.mMaxWidth = i;
            requestLayout();
        }
    }

    public void setMinHeight(int i) {
        if (i != this.mMinHeight) {
            this.mMinHeight = i;
            requestLayout();
        }
    }

    public void setMinWidth(int i) {
        if (i != this.mMinWidth) {
            this.mMinWidth = i;
            requestLayout();
        }
    }

    public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return new C013905h(layoutParams);
    }

    public final AnonymousClass05P getViewWidget(View view) {
        if (view == this) {
            return this.mLayoutWidget;
        }
        if (view == null) {
            return null;
        }
        return ((C013905h) view.getLayoutParams()).widget;
    }

    public void setId(int i) {
        this.mChildrenByIds.remove(getId());
        super.setId(i);
        this.mChildrenByIds.put(getId(), this);
    }

    public void solveLinearSystem(String str) {
        this.mLayoutWidget.LIZ();
        C013305b r4 = this.mMetrics;
        if (r4 != null) {
            r4.LIZJ++;
        }
    }

    private final AnonymousClass05P getTargetWidget(int i) {
        if (i == 0) {
            return this.mLayoutWidget;
        }
        View view = this.mChildrenByIds.get(i);
        if (view == null) {
            view = findViewById(i);
            if (view == null) {
                return null;
            }
            if (view != this && view.getParent() == this) {
                onViewAdded(view);
            }
        }
        if (view == this) {
            return this.mLayoutWidget;
        }
        if (view == null) {
            return null;
        }
        return ((C013905h) view.getLayoutParams()).widget;
    }

    public void onViewRemoved(View view) {
        super.onViewRemoved(view);
        this.mChildrenByIds.remove(view.getId());
        AnonymousClass05P viewWidget = getViewWidget(view);
        this.mLayoutWidget.LIZ(viewWidget);
        this.mConstraintHelpers.remove(view);
        this.mVariableDimensionsWidgets.remove(viewWidget);
        this.mDirtyHierarchy = true;
    }

    public ConstraintLayout(Context context) {
        super(context);
        init((AttributeSet) null);
    }

    public void onViewAdded(View view) {
        super.onViewAdded(view);
        AnonymousClass05P viewWidget = getViewWidget(view);
        if ((view instanceof C014005i) && !(viewWidget instanceof C278519b)) {
            C013905h r2 = (C013905h) view.getLayoutParams();
            r2.widget = new C278519b();
            r2.isGuideline = true;
            ((C278519b) r2.widget).LIZ(r2.orientation);
        }
        if (view instanceof C014205k) {
            C014205k r1 = (C014205k) view;
            r1.validateParams();
            ((C013905h) view.getLayoutParams()).isHelper = true;
            if (!this.mConstraintHelpers.contains(r1)) {
                this.mConstraintHelpers.add(r1);
            }
        }
        this.mChildrenByIds.put(view.getId(), view);
        this.mDirtyHierarchy = true;
    }

    public void dispatchDraw(Canvas canvas) {
        Object tag;
        Canvas canvas2 = canvas;
        super.dispatchDraw(canvas2);
        if (isInEditMode()) {
            int childCount = getChildCount();
            float width = (float) getWidth();
            float height = (float) getHeight();
            for (int i = 0; i < childCount; i++) {
                View childAt = getChildAt(i);
                if (!(childAt.getVisibility() == 8 || (tag = childAt.getTag()) == null || !(tag instanceof String))) {
                    String[] split = ((String) tag).split(",");
                    if (split.length == 4) {
                        int parseInt = Integer.parseInt(split[0]);
                        int parseInt2 = Integer.parseInt(split[1]);
                        int parseInt3 = Integer.parseInt(split[2]);
                        int parseInt4 = Integer.parseInt(split[3]);
                        int i2 = (int) ((((float) parseInt) / 1080.0f) * width);
                        int i3 = (int) ((((float) parseInt2) / 1920.0f) * height);
                        Paint paint = new Paint();
                        paint.setColor(-65536);
                        float f = (float) i2;
                        float f2 = (float) i3;
                        float f3 = (float) (i2 + ((int) ((((float) parseInt3) / 1080.0f) * width)));
                        float f4 = f2;
                        float f5 = f;
                        canvas2.drawLine(f, f2, f3, f4, paint);
                        float f6 = (float) (i3 + ((int) ((((float) parseInt4) / 1920.0f) * height)));
                        float f7 = f3;
                        float f8 = f4;
                        canvas2.drawLine(f7, f8, f3, f6, paint);
                        float f9 = f6;
                        canvas2.drawLine(f7, f9, f5, f6, paint);
                        float f10 = f5;
                        canvas2.drawLine(f10, f9, f5, f8, paint);
                        paint.setColor(-16711936);
                        float f11 = f10;
                        canvas2.drawLine(f11, f8, f3, f6, paint);
                        canvas2 = canvas2;
                        canvas2.drawLine(f11, f6, f3, f8, paint);
                    }
                }
            }
        }
    }

    private void init(AttributeSet attributeSet) {
        this.mLayoutWidget.mCompanionWidget = this;
        this.mChildrenByIds.put(getId(), this);
        C014405m r1 = null;
        this.mConstraintSet = null;
        AttributeSet attributeSet2 = attributeSet;
        if (attributeSet2 != null) {
            TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet2, new int[]{16842948, 16843039, 16843040, 16843071, 16843072, 2130969060, 2130969061, 2130969178, 2130969328, 2130969329, 2130969740, 2130969741, 2130969742, 2130969743, 2130969744, 2130969745, 2130969746, 2130969747, 2130969748, 2130969749, 2130969750, 2130969751, 2130969752, 2130969753, 2130969754, 2130969755, 2130969756, 2130969757, 2130969758, 2130969759, 2130969760, 2130969761, 2130969762, 2130969763, 2130969764, 2130969765, 2130969766, 2130969767, 2130969768, 2130969769, 2130969770, 2130969771, 2130969772, 2130969773, 2130969774, 2130969775, 2130969776, 2130969777, 2130969778, 2130969779, 2130969780, 2130969782, 2130969783, 2130969787, 2130969788, 2130969789, 2130969790, 2130969791, 2130969792, 2130969803});
            int indexCount = obtainStyledAttributes.getIndexCount();
            byte b = 0;
            int i = 0;
            while (i < indexCount) {
                int index = obtainStyledAttributes.getIndex(i);
                if (index == 3) {
                    this.mMinWidth = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMinWidth);
                } else if (index == 4) {
                    this.mMinHeight = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMinHeight);
                } else {
                    int i2 = 1;
                    if (index == 1) {
                        this.mMaxWidth = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxWidth);
                    } else {
                        int i3 = 2;
                        if (index == 2) {
                            this.mMaxHeight = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxHeight);
                        } else if (index == 59) {
                            this.mOptimizationLevel = obtainStyledAttributes.getInt(index, this.mOptimizationLevel);
                        } else if (index == 8) {
                            int resourceId = obtainStyledAttributes.getResourceId(index, b);
                            try {
                                C014405m r7 = new C014405m();
                                this.mConstraintSet = r7;
                                try {
                                    Context context = getContext();
                                    XmlResourceParser xml = context.getResources().getXml(resourceId);
                                    try {
                                        int eventType = xml.getEventType();
                                        while (eventType != i2) {
                                            if (eventType == 0) {
                                                xml.getName();
                                            } else if (eventType == i3) {
                                                String name = xml.getName();
                                                AttributeSet asAttributeSet = Xml.asAttributeSet(xml);
                                                C014305l r9 = new C014305l(b);
                                                int[] iArr = new int[80];
                                                iArr[b] = 16842948;
                                                iArr[i2] = 16842960;
                                                iArr[i3] = 16842972;
                                                iArr[3] = 16842996;
                                                iArr[4] = 16842997;
                                                iArr[5] = 16842999;
                                                iArr[6] = 16843000;
                                                iArr[7] = 16843001;
                                                iArr[8] = 16843002;
                                                iArr[9] = 16843039;
                                                iArr[10] = 16843040;
                                                iArr[11] = 16843071;
                                                iArr[12] = 16843072;
                                                iArr[13] = 16843551;
                                                iArr[14] = 16843552;
                                                iArr[15] = 16843553;
                                                iArr[16] = 16843554;
                                                iArr[17] = 16843555;
                                                iArr[18] = 16843556;
                                                iArr[19] = 16843557;
                                                iArr[20] = 16843558;
                                                iArr[21] = 16843559;
                                                iArr[22] = 16843560;
                                                iArr[23] = 16843701;
                                                iArr[24] = 16843702;
                                                iArr[25] = 16843770;
                                                iArr[26] = 16843840;
                                                iArr[27] = 2130969060;
                                                iArr[28] = 2130969061;
                                                iArr[29] = 2130969178;
                                                iArr[30] = 2130969329;
                                                iArr[31] = 2130969740;
                                                iArr[32] = 2130969741;
                                                iArr[33] = 2130969742;
                                                iArr[34] = 2130969743;
                                                iArr[35] = 2130969744;
                                                iArr[36] = 2130969745;
                                                iArr[37] = 2130969746;
                                                iArr[38] = 2130969747;
                                                iArr[39] = 2130969748;
                                                iArr[40] = 2130969749;
                                                iArr[41] = 2130969750;
                                                iArr[42] = 2130969751;
                                                iArr[43] = 2130969752;
                                                iArr[44] = 2130969753;
                                                iArr[45] = 2130969754;
                                                iArr[46] = 2130969755;
                                                iArr[47] = 2130969756;
                                                iArr[48] = 2130969757;
                                                iArr[49] = 2130969758;
                                                iArr[50] = 2130969759;
                                                iArr[51] = 2130969760;
                                                iArr[52] = 2130969761;
                                                iArr[53] = 2130969762;
                                                iArr[54] = 2130969763;
                                                iArr[55] = 2130969764;
                                                iArr[56] = 2130969765;
                                                iArr[57] = 2130969766;
                                                iArr[58] = 2130969767;
                                                iArr[59] = 2130969768;
                                                try {
                                                    iArr[60] = 2130969769;
                                                    iArr[61] = 2130969770;
                                                    iArr[62] = 2130969771;
                                                    iArr[63] = 2130969772;
                                                    iArr[64] = 2130969773;
                                                    iArr[65] = 2130969774;
                                                    iArr[66] = 2130969775;
                                                    iArr[67] = 2130969776;
                                                    iArr[68] = 2130969777;
                                                    iArr[69] = 2130969778;
                                                    iArr[70] = 2130969779;
                                                    iArr[71] = 2130969780;
                                                    iArr[72] = 2130969782;
                                                    iArr[73] = 2130969783;
                                                    iArr[74] = 2130969787;
                                                    iArr[75] = 2130969788;
                                                    iArr[76] = 2130969789;
                                                    iArr[77] = 2130969790;
                                                    iArr[78] = 2130969791;
                                                    iArr[79] = 2130969792;
                                                    TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(asAttributeSet, iArr);
                                                    int indexCount2 = obtainStyledAttributes2.getIndexCount();
                                                    for (int i4 = 0; i4 < indexCount2; i4++) {
                                                        int index2 = obtainStyledAttributes2.getIndex(i4);
                                                        int i5 = C014405m.LIZJ.get(index2);
                                                        if (i5 == 69) {
                                                            r9.LJJLIIJ = obtainStyledAttributes2.getFloat(index2, 1.0f);
                                                        } else if (i5 != 70) {
                                                            switch (i5) {
                                                                case BuildConfig.VERSION_CODE /*1*/:
                                                                    r9.LJIILL = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIILL);
                                                                    break;
                                                                case APIGuard.INIT_PROCEED /*2*/:
                                                                    r9.LJJIJ = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIJ);
                                                                    break;
                                                                case 3:
                                                                    r9.LJIILJJIL = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIILJJIL);
                                                                    break;
                                                                case 4:
                                                                    r9.LJIILIIL = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIILIIL);
                                                                    break;
                                                                case 5:
                                                                    r9.LJIL = obtainStyledAttributes2.getString(index2);
                                                                    break;
                                                                case 6:
                                                                    r9.LJJII = obtainStyledAttributes2.getDimensionPixelOffset(index2, r9.LJJII);
                                                                    break;
                                                                case 7:
                                                                    r9.LJJIII = obtainStyledAttributes2.getDimensionPixelOffset(index2, r9.LJJIII);
                                                                    break;
                                                                case 8:
                                                                    r9.LJJIJIIJI = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIJIIJI);
                                                                    break;
                                                                case 9:
                                                                    r9.LJIJI = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIJI);
                                                                    break;
                                                                case 10:
                                                                    r9.LJIJ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIJ);
                                                                    break;
                                                                case 11:
                                                                    r9.LJJIZ = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIZ);
                                                                    break;
                                                                case 12:
                                                                    r9.LJJJ = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJJ);
                                                                    break;
                                                                case 13:
                                                                    r9.LJJIJL = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIJL);
                                                                    break;
                                                                case 14:
                                                                    r9.LJJIL = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIL);
                                                                    break;
                                                                case 15:
                                                                    r9.LJJJI = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJJI);
                                                                    break;
                                                                case 16:
                                                                    r9.LJJIJLIJ = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIJLIJ);
                                                                    break;
                                                                case 17:
                                                                    r9.LJ = obtainStyledAttributes2.getDimensionPixelOffset(index2, r9.LJ);
                                                                    break;
                                                                case 18:
                                                                    r9.LJFF = obtainStyledAttributes2.getDimensionPixelOffset(index2, r9.LJFF);
                                                                    break;
                                                                case 19:
                                                                    r9.LJI = obtainStyledAttributes2.getFloat(index2, r9.LJI);
                                                                    break;
                                                                case 20:
                                                                    r9.LJIJJ = obtainStyledAttributes2.getFloat(index2, r9.LJIJJ);
                                                                    break;
                                                                case 21:
                                                                    r9.LIZJ = obtainStyledAttributes2.getLayoutDimension(index2, r9.LIZJ);
                                                                    break;
                                                                case 22:
                                                                    r9.LJJIJIL = obtainStyledAttributes2.getInt(index2, r9.LJJIJIL);
                                                                    r9.LJJIJIL = C014405m.LIZ[r9.LJJIJIL];
                                                                    break;
                                                                case 23:
                                                                    r9.LIZIZ = obtainStyledAttributes2.getLayoutDimension(index2, r9.LIZIZ);
                                                                    break;
                                                                case 24:
                                                                    r9.LJJIIJZLJL = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIIJZLJL);
                                                                    break;
                                                                case 25:
                                                                    r9.LJII = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJII);
                                                                    break;
                                                                case 26:
                                                                    r9.LJIIIIZZ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIIIZZ);
                                                                    break;
                                                                case 27:
                                                                    r9.LJJIIJ = obtainStyledAttributes2.getInt(index2, r9.LJJIIJ);
                                                                    break;
                                                                case 28:
                                                                    r9.LJJIIZ = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIIZ);
                                                                    break;
                                                                case 29:
                                                                    r9.LJIIIZ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIIZ);
                                                                    break;
                                                                case 30:
                                                                    r9.LJIIJ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIJ);
                                                                    break;
                                                                case 31:
                                                                    r9.LJJIJIIJIL = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIJIIJIL);
                                                                    break;
                                                                case 32:
                                                                    r9.LJIILLIIL = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIILLIIL);
                                                                    break;
                                                                case 33:
                                                                    r9.LJIIZILJ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIZILJ);
                                                                    break;
                                                                case 34:
                                                                    r9.LJJIIZI = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJIIZI);
                                                                    break;
                                                                case 35:
                                                                    r9.LJIIL = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIL);
                                                                    break;
                                                                case 36:
                                                                    r9.LJIIJJI = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJIIJJI);
                                                                    break;
                                                                case 37:
                                                                    r9.LJIJJLI = obtainStyledAttributes2.getFloat(index2, r9.LJIJJLI);
                                                                    break;
                                                                case 38:
                                                                    r9.LIZLLL = obtainStyledAttributes2.getResourceId(index2, r9.LIZLLL);
                                                                    break;
                                                                case 39:
                                                                    r9.LJJJJ = obtainStyledAttributes2.getFloat(index2, r9.LJJJJ);
                                                                    break;
                                                                case 40:
                                                                    r9.LJJJIL = obtainStyledAttributes2.getFloat(index2, r9.LJJJIL);
                                                                    break;
                                                                case 41:
                                                                    r9.LJJJJI = obtainStyledAttributes2.getInt(index2, r9.LJJJJI);
                                                                    break;
                                                                case 42:
                                                                    r9.LJJJJIZL = obtainStyledAttributes2.getInt(index2, r9.LJJJJIZL);
                                                                    break;
                                                                case 43:
                                                                    r9.LJJJJJ = obtainStyledAttributes2.getFloat(index2, r9.LJJJJJ);
                                                                    break;
                                                                case 44:
                                                                    r9.LJJJJJL = true;
                                                                    r9.LJJJJL = obtainStyledAttributes2.getDimension(index2, r9.LJJJJL);
                                                                    break;
                                                                case 45:
                                                                    r9.LJJJJLL = obtainStyledAttributes2.getFloat(index2, r9.LJJJJLL);
                                                                    break;
                                                                case 46:
                                                                    r9.LJJJJZ = obtainStyledAttributes2.getFloat(index2, r9.LJJJJZ);
                                                                    break;
                                                                case 47:
                                                                    r9.LJJJJZI = obtainStyledAttributes2.getFloat(index2, r9.LJJJJZI);
                                                                    break;
                                                                case 48:
                                                                    r9.LJJJLIIL = obtainStyledAttributes2.getFloat(index2, r9.LJJJLIIL);
                                                                    break;
                                                                case 49:
                                                                    r9.LJJJLL = obtainStyledAttributes2.getFloat(index2, r9.LJJJLL);
                                                                    break;
                                                                case 50:
                                                                    r9.LJJJLZIJ = obtainStyledAttributes2.getFloat(index2, r9.LJJJLZIJ);
                                                                    break;
                                                                case 51:
                                                                    r9.LJJJZ = obtainStyledAttributes2.getDimension(index2, r9.LJJJZ);
                                                                    break;
                                                                case 52:
                                                                    r9.LJJL = obtainStyledAttributes2.getDimension(index2, r9.LJJL);
                                                                    break;
                                                                case 53:
                                                                    r9.LJJLI = obtainStyledAttributes2.getDimension(index2, r9.LJJLI);
                                                                    break;
                                                                default:
                                                                    switch (i5) {
                                                                        case 60:
                                                                            r9.LJJJJLI = obtainStyledAttributes2.getFloat(index2, r9.LJJJJLI);
                                                                            break;
                                                                        case 61:
                                                                            r9.LJJ = C014405m.LIZ(obtainStyledAttributes2, index2, r9.LJJ);
                                                                            break;
                                                                        case 62:
                                                                            r9.LJJI = obtainStyledAttributes2.getDimensionPixelSize(index2, r9.LJJI);
                                                                            break;
                                                                        case 63:
                                                                            r9.LJJIFFI = obtainStyledAttributes2.getFloat(index2, r9.LJJIFFI);
                                                                            break;
                                                                        default:
                                                                            switch (i5) {
                                                                                case 72:
                                                                                    r9.LJJLJLI = obtainStyledAttributes2.getInt(index2, r9.LJJLJLI);
                                                                                    break;
                                                                                case 73:
                                                                                    r9.LJJZZI = obtainStyledAttributes2.getString(index2);
                                                                                    break;
                                                                                case 74:
                                                                                    r9.LJJLJ = obtainStyledAttributes2.getBoolean(index2, r9.LJJLJ);
                                                                                    break;
                                                                            }
                                                                    }
                                                            }
                                                        } else {
                                                            r9.LJJLIL = obtainStyledAttributes2.getFloat(index2, 1.0f);
                                                        }
                                                    }
                                                    obtainStyledAttributes2.recycle();
                                                    if (name.equalsIgnoreCase("Guideline")) {
                                                        r9.LIZ = true;
                                                    }
                                                    r7.LIZIZ.put(Integer.valueOf(r9.LIZLLL), r9);
                                                } catch (XmlPullParserException e) {
                                                    e = e;
                                                    AnonymousClass0HH.LIZ(e);
                                                    r1 = null;
                                                    this.mConstraintSetId = resourceId;
                                                    i++;
                                                    b = 0;
                                                } catch (IOException e2) {
                                                    e = e2;
                                                    try {
                                                        AnonymousClass0HH.LIZ(e);
                                                        r1 = null;
                                                    } catch (Resources.NotFoundException unused) {
                                                    }
                                                    this.mConstraintSetId = resourceId;
                                                    i++;
                                                    b = 0;
                                                }
                                            }
                                            eventType = xml.next();
                                            b = 0;
                                            i2 = 1;
                                            i3 = 2;
                                        }
                                    } catch (XmlPullParserException e3) {
                                        e = e3;
                                        AnonymousClass0HH.LIZ(e);
                                        r1 = null;
                                        this.mConstraintSetId = resourceId;
                                        i++;
                                        b = 0;
                                    } catch (IOException e4) {
                                        e = e4;
                                        AnonymousClass0HH.LIZ(e);
                                        r1 = null;
                                        this.mConstraintSetId = resourceId;
                                        i++;
                                        b = 0;
                                    }
                                    r1 = null;
                                } catch (Resources.NotFoundException unused2) {
                                    r1 = null;
                                    this.mConstraintSet = r1;
                                    this.mConstraintSetId = resourceId;
                                    i++;
                                    b = 0;
                                }
                            } catch (Resources.NotFoundException unused3) {
                                this.mConstraintSet = r1;
                                this.mConstraintSetId = resourceId;
                                i++;
                                b = 0;
                            }
                            this.mConstraintSetId = resourceId;
                        }
                    }
                }
                i++;
                b = 0;
            }
            obtainStyledAttributes.recycle();
        }
        this.mLayoutWidget.LJIILLIIL = this.mOptimizationLevel;
    }

    public Object getDesignInformation(int i, Object obj) {
        HashMap<String, Integer> hashMap;
        if (i != 0 || !(obj instanceof String) || (hashMap = this.mDesignIds) == null || !hashMap.containsKey(obj)) {
            return null;
        }
        return this.mDesignIds.get(obj);
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        init(attributeSet);
    }

    private void internalMeasureChildren(int i, int i2) {
        boolean z;
        boolean z2;
        int baseline;
        int childMeasureSpec;
        int childMeasureSpec2;
        boolean z3;
        boolean z4;
        int paddingTop = getPaddingTop() + getPaddingBottom();
        int paddingLeft = getPaddingLeft() + getPaddingRight();
        int childCount = getChildCount();
        for (int i3 = 0; i3 < childCount; i3++) {
            View childAt = getChildAt(i3);
            if (childAt.getVisibility() != 8) {
                C013905h r13 = (C013905h) childAt.getLayoutParams();
                AnonymousClass05P r5 = r13.widget;
                if (!r13.isGuideline && !r13.isHelper) {
                    r5.mVisibility = childAt.getVisibility();
                    int i4 = r13.width;
                    int i5 = r13.height;
                    if (r13.horizontalDimensionFixed || r13.verticalDimensionFixed || ((!r13.horizontalDimensionFixed && r13.matchConstraintDefaultWidth == 1) || r13.width == -1 || (!r13.verticalDimensionFixed && (r13.matchConstraintDefaultHeight == 1 || r13.height == -1)))) {
                        int i6 = i;
                        if (i4 == 0) {
                            childMeasureSpec = getChildMeasureSpec(i6, paddingLeft, -2);
                            z = true;
                        } else if (i4 == -1) {
                            childMeasureSpec = getChildMeasureSpec(i6, paddingLeft, -1);
                            z = false;
                        } else {
                            if (i4 == -2) {
                                z = true;
                            } else {
                                z = false;
                            }
                            childMeasureSpec = getChildMeasureSpec(i6, paddingLeft, i4);
                        }
                        int i7 = i2;
                        if (i5 == 0) {
                            childMeasureSpec2 = getChildMeasureSpec(i7, paddingTop, -2);
                            z2 = true;
                        } else if (i5 == -1) {
                            childMeasureSpec2 = getChildMeasureSpec(i7, paddingTop, -1);
                            z2 = false;
                        } else {
                            if (i5 == -2) {
                                z2 = true;
                            } else {
                                z2 = false;
                            }
                            childMeasureSpec2 = getChildMeasureSpec(i7, paddingTop, i5);
                        }
                        childAt.measure(childMeasureSpec, childMeasureSpec2);
                        C013305b r4 = this.mMetrics;
                        if (r4 != null) {
                            r4.LIZ++;
                        }
                        if (i4 == -2) {
                            z3 = true;
                        } else {
                            z3 = false;
                        }
                        r5.mIsWidthWrapContent = z3;
                        if (i5 == -2) {
                            z4 = true;
                        } else {
                            z4 = false;
                        }
                        r5.mIsHeightWrapContent = z4;
                        i4 = childAt.getMeasuredWidth();
                        i5 = childAt.getMeasuredHeight();
                    } else {
                        z = false;
                        z2 = false;
                    }
                    r5.setWidth(i4);
                    r5.setHeight(i5);
                    if (z) {
                        r5.mWrapWidth = i4;
                    }
                    if (z2) {
                        r5.mWrapHeight = i5;
                    }
                    if (r13.needsBaseline && (baseline = childAt.getBaseline()) != -1) {
                        r5.mBaselineDistance = baseline;
                    }
                }
            }
        }
    }

    private void setSelfDimensionBehaviour(int i, int i2) {
        int mode = View.MeasureSpec.getMode(i);
        int size = View.MeasureSpec.getSize(i);
        int mode2 = View.MeasureSpec.getMode(i2);
        int size2 = View.MeasureSpec.getSize(i2);
        int paddingTop = getPaddingTop() + getPaddingBottom();
        int paddingLeft = getPaddingLeft() + getPaddingRight();
        AnonymousClass05O r7 = AnonymousClass05O.FIXED;
        AnonymousClass05O r6 = AnonymousClass05O.FIXED;
        getLayoutParams();
        if (mode != Integer.MIN_VALUE) {
            if (mode == 0) {
                r7 = AnonymousClass05O.WRAP_CONTENT;
            } else if (mode == 1073741824) {
                size = Math.min(this.mMaxWidth, size) - paddingLeft;
            }
            size = 0;
        } else {
            r7 = AnonymousClass05O.WRAP_CONTENT;
        }
        if (mode2 != Integer.MIN_VALUE) {
            if (mode2 == 0) {
                r6 = AnonymousClass05O.WRAP_CONTENT;
            } else if (mode2 == 1073741824) {
                size2 = Math.min(this.mMaxHeight, size2) - paddingTop;
            }
            size2 = 0;
        } else {
            r6 = AnonymousClass05O.WRAP_CONTENT;
        }
        this.mLayoutWidget.setMinWidth(0);
        this.mLayoutWidget.setMinHeight(0);
        this.mLayoutWidget.setHorizontalDimensionBehaviour(r7);
        this.mLayoutWidget.setWidth(size);
        this.mLayoutWidget.setVerticalDimensionBehaviour(r6);
        this.mLayoutWidget.setHeight(size2);
        this.mLayoutWidget.setMinWidth((this.mMinWidth - getPaddingLeft()) - getPaddingRight());
        this.mLayoutWidget.setMinHeight((this.mMinHeight - getPaddingTop()) - getPaddingBottom());
    }

    /* JADX WARNING: Removed duplicated region for block: B:107:0x01d8  */
    /* JADX WARNING: Removed duplicated region for block: B:110:0x01e2  */
    /* JADX WARNING: Removed duplicated region for block: B:113:0x01e7  */
    /* JADX WARNING: Removed duplicated region for block: B:116:0x01fa  */
    /* JADX WARNING: Removed duplicated region for block: B:118:0x01fe  */
    /* JADX WARNING: Removed duplicated region for block: B:121:0x0203  */
    /* JADX WARNING: Removed duplicated region for block: B:123:0x020c  */
    /* JADX WARNING: Removed duplicated region for block: B:130:0x0228  */
    /* JADX WARNING: Removed duplicated region for block: B:131:0x022f  */
    /* JADX WARNING: Removed duplicated region for block: B:132:0x0236  */
    /* JADX WARNING: Removed duplicated region for block: B:133:0x0238  */
    /* JADX WARNING: Removed duplicated region for block: B:135:0x0244  */
    /* JADX WARNING: Removed duplicated region for block: B:95:0x01a4  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private void internalMeasureDimensions(int r23, int r24) {
        /*
            r22 = this;
            r8 = r22
            int r5 = r22.getPaddingTop()
            int r0 = r22.getPaddingBottom()
            int r5 = r5 + r0
            int r4 = r22.getPaddingLeft()
            int r0 = r22.getPaddingRight()
            int r4 = r4 + r0
            int r3 = r22.getChildCount()
            r2 = 0
        L_0x0019:
            r16 = 1
            r1 = 8
            r14 = -2
            r7 = r23
            r6 = r24
            if (r2 >= r3) goto L_0x00c5
            android.view.View r11 = r8.getChildAt(r2)
            int r0 = r11.getVisibility()
            if (r0 == r1) goto L_0x005a
            android.view.ViewGroup$LayoutParams r10 = r11.getLayoutParams()
            X.05h r10 = (X.C013905h) r10
            X.05P r9 = r10.widget
            boolean r0 = r10.isGuideline
            if (r0 != 0) goto L_0x005a
            boolean r0 = r10.isHelper
            if (r0 != 0) goto L_0x005a
            int r0 = r11.getVisibility()
            r9.mVisibility = r0
            int r13 = r10.width
            int r12 = r10.height
            if (r13 == 0) goto L_0x004c
            if (r12 != 0) goto L_0x005d
        L_0x004c:
            X.19e r0 = r9.getResolutionWidth()
            r0.LIZJ()
            X.19e r0 = r9.getResolutionHeight()
            r0.LIZJ()
        L_0x005a:
            int r2 = r2 + 1
            goto L_0x0019
        L_0x005d:
            if (r13 != r14) goto L_0x00c3
            r15 = 1
        L_0x0060:
            int r1 = getChildMeasureSpec(r7, r4, r13)
            if (r12 != r14) goto L_0x00c1
            r14 = 1
        L_0x0067:
            int r0 = getChildMeasureSpec(r6, r5, r12)
            r11.measure(r1, r0)
            X.05b r6 = r8.mMetrics
            if (r6 == 0) goto L_0x0078
            long r0 = r6.LIZ
            long r0 = r0 + r16
            r6.LIZ = r0
        L_0x0078:
            r1 = -2
            if (r13 != r1) goto L_0x00bf
            r0 = 1
        L_0x007c:
            r9.mIsWidthWrapContent = r0
            if (r12 != r1) goto L_0x00bd
            r0 = 1
        L_0x0081:
            r9.mIsHeightWrapContent = r0
            int r7 = r11.getMeasuredWidth()
            int r6 = r11.getMeasuredHeight()
            r9.setWidth(r7)
            r9.setHeight(r6)
            if (r15 == 0) goto L_0x0095
            r9.mWrapWidth = r7
        L_0x0095:
            if (r14 == 0) goto L_0x0099
            r9.mWrapHeight = r6
        L_0x0099:
            boolean r0 = r10.needsBaseline
            if (r0 == 0) goto L_0x00a6
            int r1 = r11.getBaseline()
            r0 = -1
            if (r1 == r0) goto L_0x00a6
            r9.mBaselineDistance = r1
        L_0x00a6:
            boolean r0 = r10.horizontalDimensionFixed
            if (r0 == 0) goto L_0x005a
            boolean r0 = r10.verticalDimensionFixed
            if (r0 == 0) goto L_0x005a
            X.19e r0 = r9.getResolutionWidth()
            r0.LIZ(r7)
            X.19e r0 = r9.getResolutionHeight()
            r0.LIZ(r6)
            goto L_0x005a
        L_0x00bd:
            r0 = 0
            goto L_0x0081
        L_0x00bf:
            r0 = 0
            goto L_0x007c
        L_0x00c1:
            r14 = 0
            goto L_0x0067
        L_0x00c3:
            r15 = 0
            goto L_0x0060
        L_0x00c5:
            X.1gr r0 = r8.mLayoutWidget
            r0.LIZIZ()
            r2 = 0
        L_0x00cb:
            if (r2 >= r3) goto L_0x0291
            android.view.View r20 = r8.getChildAt(r2)
            int r0 = r20.getVisibility()
            if (r0 == r1) goto L_0x028c
            android.view.ViewGroup$LayoutParams r11 = r20.getLayoutParams()
            X.05h r11 = (X.C013905h) r11
            X.05P r10 = r11.widget
            boolean r0 = r11.isGuideline
            if (r0 != 0) goto L_0x028c
            boolean r0 = r11.isHelper
            if (r0 != 0) goto L_0x028c
            int r0 = r20.getVisibility()
            r10.mVisibility = r0
            int r12 = r11.width
            int r9 = r11.height
            if (r12 == 0) goto L_0x00f5
            if (r9 != 0) goto L_0x028c
        L_0x00f5:
            X.05L r0 = X.AnonymousClass05L.LEFT
            X.05M r0 = r10.getAnchor(r0)
            X.19d r0 = r0.LIZ
            r21 = r0
            X.05L r0 = X.AnonymousClass05L.RIGHT
            X.05M r0 = r10.getAnchor(r0)
            X.19d r1 = r0.LIZ
            X.05L r0 = X.AnonymousClass05L.LEFT
            X.05M r0 = r10.getAnchor(r0)
            X.05M r0 = r0.LIZLLL
            if (r0 == 0) goto L_0x0288
            X.05L r0 = X.AnonymousClass05L.RIGHT
            X.05M r0 = r10.getAnchor(r0)
            X.05M r0 = r0.LIZLLL
            if (r0 == 0) goto L_0x0288
            r17 = 1
        L_0x011d:
            X.05L r0 = X.AnonymousClass05L.TOP
            X.05M r0 = r10.getAnchor(r0)
            X.19d r14 = r0.LIZ
            X.05L r0 = X.AnonymousClass05L.BOTTOM
            X.05M r0 = r10.getAnchor(r0)
            X.19d r13 = r0.LIZ
            X.05L r0 = X.AnonymousClass05L.TOP
            X.05M r0 = r10.getAnchor(r0)
            X.05M r0 = r0.LIZLLL
            if (r0 == 0) goto L_0x0284
            X.05L r0 = X.AnonymousClass05L.BOTTOM
            X.05M r0 = r10.getAnchor(r0)
            X.05M r0 = r0.LIZLLL
            if (r0 == 0) goto L_0x0284
            r16 = 1
        L_0x0143:
            if (r12 != 0) goto L_0x014b
            if (r9 != 0) goto L_0x014b
            if (r17 == 0) goto L_0x014b
            if (r16 != 0) goto L_0x027f
        L_0x014b:
            X.1gr r0 = r8.mLayoutWidget
            X.05O r15 = r0.getHorizontalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r15 == r0) goto L_0x027b
            r19 = 1
        L_0x0157:
            X.1gr r0 = r8.mLayoutWidget
            X.05O r8 = r0.getVerticalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r8 == r0) goto L_0x0277
            r18 = 1
        L_0x0163:
            if (r19 != 0) goto L_0x016c
            X.19e r0 = r10.getResolutionWidth()
            r0.LIZJ()
        L_0x016c:
            if (r18 != 0) goto L_0x0175
            X.19e r0 = r10.getResolutionHeight()
            r0.LIZJ()
        L_0x0175:
            if (r12 != 0) goto L_0x0265
            if (r19 == 0) goto L_0x025a
            boolean r0 = r10.isSpreadWidth()
            if (r0 == 0) goto L_0x025a
            if (r17 == 0) goto L_0x025a
            boolean r0 = r21.LJ()
            if (r0 == 0) goto L_0x025a
            boolean r0 = r1.LJ()
            if (r0 == 0) goto L_0x025a
            float r1 = r1.LJFF
            r0 = r21
            float r0 = r0.LJFF
            float r1 = r1 - r0
            int r12 = (int) r1
            X.19e r0 = r10.getResolutionWidth()
            r0.LIZ(r12)
        L_0x019c:
            r17 = 0
        L_0x019e:
            int r8 = getChildMeasureSpec(r7, r4, r12)
        L_0x01a2:
            if (r9 != 0) goto L_0x0244
            if (r18 == 0) goto L_0x023a
            boolean r0 = r10.isSpreadHeight()
            if (r0 == 0) goto L_0x023a
            if (r16 == 0) goto L_0x023a
            boolean r0 = r14.LJ()
            if (r0 == 0) goto L_0x023a
            boolean r0 = r13.LJ()
            if (r0 == 0) goto L_0x023a
            float r1 = r13.LJFF
            float r0 = r14.LJFF
            float r1 = r1 - r0
            int r9 = (int) r1
            X.19e r0 = r10.getResolutionHeight()
            r0.LIZ(r9)
            r16 = 0
        L_0x01c9:
            int r1 = getChildMeasureSpec(r6, r5, r9)
        L_0x01cd:
            r0 = r20
            r0.measure(r8, r1)
            r8 = r22
            X.05b r15 = r8.mMetrics
            if (r15 == 0) goto L_0x01df
            long r0 = r15.LIZ
            r13 = 1
            long r0 = r0 + r13
            r15.LIZ = r0
        L_0x01df:
            r1 = -2
            if (r12 != r1) goto L_0x0238
            r0 = 1
        L_0x01e3:
            r10.mIsWidthWrapContent = r0
            if (r9 != r1) goto L_0x0236
            r0 = 1
        L_0x01e8:
            r10.mIsHeightWrapContent = r0
            int r12 = r20.getMeasuredWidth()
            int r9 = r20.getMeasuredHeight()
            r10.setWidth(r12)
            r10.setHeight(r9)
            if (r17 == 0) goto L_0x01fc
            r10.mWrapWidth = r12
        L_0x01fc:
            if (r16 == 0) goto L_0x0200
            r10.mWrapHeight = r9
        L_0x0200:
            r1 = 2
            if (r19 == 0) goto L_0x022f
            X.19e r0 = r10.getResolutionWidth()
            r0.LIZ(r12)
        L_0x020a:
            if (r18 == 0) goto L_0x0228
            X.19e r0 = r10.getResolutionHeight()
            r0.LIZ(r9)
        L_0x0213:
            boolean r0 = r11.needsBaseline
            if (r0 == 0) goto L_0x0220
            int r1 = r20.getBaseline()
            r0 = -1
            if (r1 == r0) goto L_0x0220
            r10.mBaselineDistance = r1
        L_0x0220:
            int r2 = r2 + 1
            r0 = 1
            r1 = 8
            goto L_0x00cb
        L_0x0228:
            X.19e r0 = r10.getResolutionHeight()
            r0.LJIIIIZZ = r1
            goto L_0x0213
        L_0x022f:
            X.19e r0 = r10.getResolutionWidth()
            r0.LJIIIIZZ = r1
            goto L_0x020a
        L_0x0236:
            r0 = 0
            goto L_0x01e8
        L_0x0238:
            r0 = 0
            goto L_0x01e3
        L_0x023a:
            r0 = -2
            int r1 = getChildMeasureSpec(r6, r5, r0)
            r18 = 0
            r16 = 1
            goto L_0x01cd
        L_0x0244:
            r1 = -2
            r0 = -1
            if (r9 != r0) goto L_0x0250
            int r1 = getChildMeasureSpec(r6, r5, r0)
            r16 = 0
            goto L_0x01cd
        L_0x0250:
            if (r9 != r1) goto L_0x0256
            r16 = 1
            goto L_0x01c9
        L_0x0256:
            r16 = 0
            goto L_0x01c9
        L_0x025a:
            r0 = -2
            int r8 = getChildMeasureSpec(r7, r4, r0)
            r19 = 0
            r17 = 1
            goto L_0x01a2
        L_0x0265:
            r1 = -2
            r0 = -1
            if (r12 != r0) goto L_0x0271
            int r8 = getChildMeasureSpec(r7, r4, r0)
            r17 = 0
            goto L_0x01a2
        L_0x0271:
            if (r12 != r1) goto L_0x019c
            r17 = 1
            goto L_0x019e
        L_0x0277:
            r18 = 0
            goto L_0x0163
        L_0x027b:
            r19 = 0
            goto L_0x0157
        L_0x027f:
            r0 = -2
            r0 = -1
            r0 = 1
            goto L_0x0220
        L_0x0284:
            r16 = 0
            goto L_0x0143
        L_0x0288:
            r17 = 0
            goto L_0x011d
        L_0x028c:
            r0 = 1
            r0 = -2
            r0 = -1
            goto L_0x0220
        L_0x0291:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.internalMeasureDimensions(int, int):void");
    }

    /* JADX WARNING: Code restructure failed: missing block: B:186:0x03fc, code lost:
        if (r1 != false) goto L_0x03a9;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onMeasure(int r25, int r26) {
        /*
            r24 = this;
            r11 = r24
            r11 = r11
            java.lang.System.currentTimeMillis()
            r13 = r25
            int r15 = android.view.View.MeasureSpec.getMode(r13)
            int r14 = android.view.View.MeasureSpec.getSize(r13)
            r12 = r26
            int r10 = android.view.View.MeasureSpec.getMode(r12)
            int r9 = android.view.View.MeasureSpec.getSize(r12)
            int r8 = r11.getPaddingLeft()
            int r7 = r11.getPaddingTop()
            X.1gr r0 = r11.mLayoutWidget
            r0.mX = r8
            X.1gr r0 = r11.mLayoutWidget
            r0.mY = r7
            X.1gr r1 = r11.mLayoutWidget
            int r0 = r11.mMaxWidth
            r1.setMaxWidth(r0)
            X.1gr r1 = r11.mLayoutWidget
            int r0 = r11.mMaxHeight
            r1.setMaxHeight(r0)
            X.1gr r3 = r11.mLayoutWidget
            int r0 = r11.getLayoutDirection()
            r2 = 1
            r1 = 0
            if (r0 != r2) goto L_0x036e
            r0 = 1
        L_0x0043:
            r3.LIZ = r0
            r11.setSelfDimensionBehaviour(r13, r12)
            X.1gr r0 = r11.mLayoutWidget
            int r23 = r0.getWidth()
            X.1gr r0 = r11.mLayoutWidget
            int r22 = r0.getHeight()
            boolean r0 = r11.mDirtyHierarchy
            if (r0 == 0) goto L_0x036b
            r11.mDirtyHierarchy = r1
            r11.updateHierarchy()
            r4 = 1
        L_0x005e:
            int r1 = r11.mOptimizationLevel
            r0 = 8
            r1 = r1 & r0
            if (r1 != r0) goto L_0x0364
            r21 = 1
            X.1gr r1 = r11.mLayoutWidget
            r1.LIZJ()
            int r0 = r1.LJIILLIIL
            r1.analyze(r0)
            X.1gr r3 = r11.mLayoutWidget
            r1 = r23
            r0 = r22
            r3.LIZ((int) r1, (int) r0)
            r11.internalMeasureDimensions(r13, r12)
        L_0x007d:
            r11.updatePostMeasures()
            int r0 = r11.getChildCount()
            r1 = 32
            if (r0 <= 0) goto L_0x0094
            if (r4 == 0) goto L_0x0094
            X.1gr r6 = r11.mLayoutWidget
            int r0 = r6.LJIILLIIL
            r0 = r0 & r1
            if (r0 == r1) goto L_0x0290
            X.AnonymousClass05F.LIZ((X.C39111gr) r6)
        L_0x0094:
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIIJJI
            if (r0 == 0) goto L_0x00d4
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIIL
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            if (r0 == 0) goto L_0x00b8
            if (r15 != r2) goto L_0x00b8
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.LJIILJJIL
            if (r0 >= r14) goto L_0x00b1
            X.1gr r1 = r11.mLayoutWidget
            int r0 = r1.LJIILJJIL
            r1.setWidth(r0)
        L_0x00b1:
            X.1gr r1 = r11.mLayoutWidget
            X.05O r0 = X.AnonymousClass05O.FIXED
            r1.setHorizontalDimensionBehaviour(r0)
        L_0x00b8:
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIILIIL
            if (r0 == 0) goto L_0x00d4
            if (r10 != r2) goto L_0x00d4
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.LJIILL
            if (r0 >= r9) goto L_0x00cd
            X.1gr r1 = r11.mLayoutWidget
            int r0 = r1.LJIILL
            r1.setHeight(r0)
        L_0x00cd:
            X.1gr r1 = r11.mLayoutWidget
            X.05O r0 = X.AnonymousClass05O.FIXED
            r1.setVerticalDimensionBehaviour(r0)
        L_0x00d4:
            int r1 = r11.mOptimizationLevel
            r0 = 32
            r1 = r1 & r0
            r3 = 1073741824(0x40000000, float:2.0)
            if (r1 != r0) goto L_0x012d
            X.1gr r0 = r11.mLayoutWidget
            int r4 = r0.getWidth()
            X.1gr r0 = r11.mLayoutWidget
            int r2 = r0.getHeight()
            int r0 = r11.mLastMeasureWidth
            if (r0 == r4) goto L_0x00f7
            if (r15 != r3) goto L_0x00f7
            X.1gr r0 = r11.mLayoutWidget
            java.util.List<X.05Q> r1 = r0.LJIIJ
            r0 = 0
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r1, (int) r0, (int) r4)
        L_0x00f7:
            int r0 = r11.mLastMeasureHeight
            if (r0 == r2) goto L_0x0105
            if (r10 != r3) goto L_0x0105
            X.1gr r0 = r11.mLayoutWidget
            java.util.List<X.05Q> r1 = r0.LJIIJ
            r0 = 1
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r1, (int) r0, (int) r2)
        L_0x0105:
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIIL
            if (r0 == 0) goto L_0x0119
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.LJIILJJIL
            if (r0 <= r14) goto L_0x0119
            X.1gr r0 = r11.mLayoutWidget
            java.util.List<X.05Q> r1 = r0.LJIIJ
            r0 = 0
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r1, (int) r0, (int) r14)
        L_0x0119:
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIILIIL
            if (r0 == 0) goto L_0x012d
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.LJIILL
            if (r0 <= r9) goto L_0x012d
            X.1gr r0 = r11.mLayoutWidget
            java.util.List<X.05Q> r1 = r0.LJIIJ
            r0 = 1
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r1, (int) r0, (int) r9)
        L_0x012d:
            int r0 = r11.getChildCount()
            if (r0 <= 0) goto L_0x0138
            java.lang.String r0 = "First pass"
            r11.solveLinearSystem(r0)
        L_0x0138:
            java.util.ArrayList<X.05P> r0 = r11.mVariableDimensionsWidgets
            int r2 = r0.size()
            int r0 = r11.getPaddingBottom()
            int r7 = r7 + r0
            int r0 = r11.getPaddingRight()
            int r8 = r8 + r0
            if (r2 <= 0) goto L_0x0401
            X.1gr r0 = r11.mLayoutWidget
            X.05O r1 = r0.getHorizontalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r1 != r0) goto L_0x028c
            r20 = 1
        L_0x0156:
            X.1gr r0 = r11.mLayoutWidget
            X.05O r1 = r0.getVerticalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r1 != r0) goto L_0x0288
            r19 = 1
        L_0x0162:
            X.1gr r0 = r11.mLayoutWidget
            int r1 = r0.getWidth()
            int r0 = r11.mMinWidth
            int r5 = java.lang.Math.max(r1, r0)
            X.1gr r0 = r11.mLayoutWidget
            int r1 = r0.getHeight()
            int r0 = r11.mMinHeight
            int r4 = java.lang.Math.max(r1, r0)
            r14 = 0
            r18 = 0
            r3 = 0
        L_0x017e:
            java.util.ArrayList<X.05P> r0 = r11.mVariableDimensionsWidgets
            java.lang.Object r10 = r0.get(r14)
            X.05P r10 = (X.AnonymousClass05P) r10
            java.lang.Object r9 = r10.mCompanionWidget
            android.view.View r9 = (android.view.View) r9
            if (r9 == 0) goto L_0x0266
            android.view.ViewGroup$LayoutParams r6 = r9.getLayoutParams()
            X.05h r6 = (X.C013905h) r6
            boolean r0 = r6.isHelper
            if (r0 != 0) goto L_0x0266
            boolean r0 = r6.isGuideline
            if (r0 != 0) goto L_0x0266
            int r1 = r9.getVisibility()
            r0 = 8
            if (r1 == r0) goto L_0x0266
            if (r21 == 0) goto L_0x01b8
            X.19e r0 = r10.getResolutionWidth()
            boolean r0 = r0.LJ()
            if (r0 == 0) goto L_0x01b8
            X.19e r0 = r10.getResolutionHeight()
            boolean r0 = r0.LJ()
            if (r0 != 0) goto L_0x0266
        L_0x01b8:
            int r1 = r6.width
            r0 = -2
            if (r1 != r0) goto L_0x027c
            boolean r0 = r6.horizontalDimensionFixed
            if (r0 == 0) goto L_0x027c
            int r0 = r6.width
            int r15 = getChildMeasureSpec(r13, r8, r0)
        L_0x01c7:
            int r1 = r6.height
            r0 = -2
            if (r1 != r0) goto L_0x0270
            boolean r0 = r6.verticalDimensionFixed
            if (r0 == 0) goto L_0x0270
            int r0 = r6.height
            int r0 = getChildMeasureSpec(r12, r7, r0)
        L_0x01d6:
            r9.measure(r15, r0)
            X.05b r15 = r11.mMetrics
            if (r15 == 0) goto L_0x01e5
            long r0 = r15.LIZIZ
            r16 = 1
            long r0 = r0 + r16
            r15.LIZIZ = r0
        L_0x01e5:
            int r15 = r9.getMeasuredWidth()
            int r1 = r9.getMeasuredHeight()
            int r0 = r10.getWidth()
            if (r15 == r0) goto L_0x021c
            r10.setWidth(r15)
            if (r21 == 0) goto L_0x01ff
            X.19e r0 = r10.getResolutionWidth()
            r0.LIZ(r15)
        L_0x01ff:
            if (r20 == 0) goto L_0x021a
            int r0 = r10.getRight()
            if (r0 <= r5) goto L_0x021a
            int r15 = r10.getRight()
            X.05L r0 = X.AnonymousClass05L.RIGHT
            X.05M r0 = r10.getAnchor(r0)
            int r0 = r0.LIZIZ()
            int r15 = r15 + r0
            int r5 = java.lang.Math.max(r5, r15)
        L_0x021a:
            r18 = 1
        L_0x021c:
            int r0 = r10.getHeight()
            if (r1 == r0) goto L_0x024b
            r10.setHeight(r1)
            if (r21 == 0) goto L_0x022e
            X.19e r0 = r10.getResolutionHeight()
            r0.LIZ(r1)
        L_0x022e:
            if (r19 == 0) goto L_0x0249
            int r0 = r10.getBottom()
            if (r0 <= r4) goto L_0x0249
            int r1 = r10.getBottom()
            X.05L r0 = X.AnonymousClass05L.BOTTOM
            X.05M r0 = r10.getAnchor(r0)
            int r0 = r0.LIZIZ()
            int r1 = r1 + r0
            int r4 = java.lang.Math.max(r4, r1)
        L_0x0249:
            r18 = 1
        L_0x024b:
            boolean r0 = r6.needsBaseline
            if (r0 == 0) goto L_0x025e
            int r1 = r9.getBaseline()
            r0 = -1
            if (r1 == r0) goto L_0x025e
            int r0 = r10.mBaselineDistance
            if (r1 == r0) goto L_0x025e
            r10.mBaselineDistance = r1
            r18 = 1
        L_0x025e:
            int r0 = r9.getMeasuredState()
            int r3 = combineMeasuredStates(r3, r0)
        L_0x0266:
            int r14 = r14 + 1
            r0 = 1
            r0 = 1073741824(0x40000000, float:2.0)
            r0 = 0
            if (r14 >= r2) goto L_0x0371
            goto L_0x017e
        L_0x0270:
            int r1 = r10.getHeight()
            r0 = 1073741824(0x40000000, float:2.0)
            int r0 = android.view.View.MeasureSpec.makeMeasureSpec(r1, r0)
            goto L_0x01d6
        L_0x027c:
            int r1 = r10.getWidth()
            r0 = 1073741824(0x40000000, float:2.0)
            int r15 = android.view.View.MeasureSpec.makeMeasureSpec(r1, r0)
            goto L_0x01c7
        L_0x0288:
            r19 = 0
            goto L_0x0162
        L_0x028c:
            r20 = 0
            goto L_0x0156
        L_0x0290:
            r6.LJIIZILJ = r2
            r0 = 0
            r6.LJIIJJI = r0
            r6.LJIIL = r0
            r6.LJIILIIL = r0
            java.util.ArrayList<X.05P> r2 = r6.LJIJJLI
            java.util.List<X.05Q> r5 = r6.LJIIJ
            X.05O r1 = r6.getHorizontalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r1 != r0) goto L_0x02d8
            r18 = 1
        L_0x02a7:
            X.05O r1 = r6.getVerticalDimensionBehaviour()
            X.05O r0 = X.AnonymousClass05O.WRAP_CONTENT
            if (r1 != r0) goto L_0x02d5
            r17 = 1
        L_0x02b1:
            if (r18 != 0) goto L_0x02b5
            if (r17 == 0) goto L_0x02d3
        L_0x02b5:
            r4 = 1
        L_0x02b6:
            r5.clear()
            java.util.Iterator r3 = r2.iterator()
        L_0x02bd:
            boolean r0 = r3.hasNext()
            if (r0 == 0) goto L_0x02db
            java.lang.Object r1 = r3.next()
            X.05P r1 = (X.AnonymousClass05P) r1
            r0 = 0
            r1.mBelongingGroup = r0
            r0 = 0
            r1.mGroupsToSolver = r0
            r1.resetResolutionNodes()
            goto L_0x02bd
        L_0x02d3:
            r4 = 0
            goto L_0x02b6
        L_0x02d5:
            r17 = 0
            goto L_0x02b1
        L_0x02d8:
            r18 = 0
            goto L_0x02a7
        L_0x02db:
            java.util.Iterator r16 = r2.iterator()
        L_0x02df:
            boolean r0 = r16.hasNext()
            if (r0 == 0) goto L_0x030c
            java.lang.Object r3 = r16.next()
            X.05P r3 = (X.AnonymousClass05P) r3
            X.05Q r0 = r3.mBelongingGroup
            if (r0 != 0) goto L_0x030a
            X.05Q r2 = new X.05Q
            java.util.ArrayList r1 = new java.util.ArrayList
            r1.<init>()
            r0 = 0
            r2.<init>(r1, r0)
            r5.add(r2)
            boolean r1 = X.AnonymousClass05F.LIZ((X.AnonymousClass05P) r3, (X.AnonymousClass05Q) r2, (java.util.List<X.AnonymousClass05Q>) r5, (boolean) r4)
            if (r1 != 0) goto L_0x02df
            X.AnonymousClass05F.LIZ((X.C39111gr) r6)
            r6.LJIIZILJ = r0
            goto L_0x0094
        L_0x030a:
            r0 = 0
            goto L_0x02df
        L_0x030c:
            r0 = 0
            java.util.Iterator r4 = r5.iterator()
            r3 = 0
            r1 = 0
        L_0x0313:
            boolean r2 = r4.hasNext()
            if (r2 == 0) goto L_0x0332
            java.lang.Object r2 = r4.next()
            X.05Q r2 = (X.AnonymousClass05Q) r2
            int r0 = X.AnonymousClass05F.LIZ((X.AnonymousClass05Q) r2, (int) r0)
            int r3 = java.lang.Math.max(r3, r0)
            r0 = 1
            int r0 = X.AnonymousClass05F.LIZ((X.AnonymousClass05Q) r2, (int) r0)
            int r1 = java.lang.Math.max(r1, r0)
            r0 = 0
            goto L_0x0313
        L_0x0332:
            r2 = 1
            if (r18 == 0) goto L_0x0343
            X.05O r0 = X.AnonymousClass05O.FIXED
            r6.setHorizontalDimensionBehaviour(r0)
            r6.setWidth(r3)
            r6.LJIIJJI = r2
            r6.LJIIL = r2
            r6.LJIILJJIL = r3
        L_0x0343:
            if (r17 == 0) goto L_0x0353
            X.05O r0 = X.AnonymousClass05O.FIXED
            r6.setVerticalDimensionBehaviour(r0)
            r6.setHeight(r1)
            r6.LJIIJJI = r2
            r6.LJIILIIL = r2
            r6.LJIILL = r1
        L_0x0353:
            int r1 = r6.getWidth()
            r0 = 0
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r5, (int) r0, (int) r1)
            int r0 = r6.getHeight()
            X.AnonymousClass05F.LIZ((java.util.List<X.AnonymousClass05Q>) r5, (int) r2, (int) r0)
            goto L_0x0094
        L_0x0364:
            r21 = 0
            r11.internalMeasureChildren(r13, r12)
            goto L_0x007d
        L_0x036b:
            r4 = 0
            goto L_0x005e
        L_0x036e:
            r0 = 0
            goto L_0x0043
        L_0x0371:
            if (r18 == 0) goto L_0x03ae
            X.1gr r1 = r11.mLayoutWidget
            r0 = r23
            r1.setWidth(r0)
            X.1gr r1 = r11.mLayoutWidget
            r0 = r22
            r1.setHeight(r0)
            if (r21 == 0) goto L_0x0388
            X.1gr r0 = r11.mLayoutWidget
            r0.LIZIZ()
        L_0x0388:
            java.lang.String r0 = "2nd pass"
            r11.solveLinearSystem(r0)
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.getWidth()
            if (r0 >= r5) goto L_0x03ff
            X.1gr r0 = r11.mLayoutWidget
            r0.setWidth(r5)
            r1 = 1
        L_0x039b:
            X.1gr r0 = r11.mLayoutWidget
            int r0 = r0.getHeight()
            if (r0 >= r4) goto L_0x03fc
            X.1gr r0 = r11.mLayoutWidget
            r0.setHeight(r4)
            r0 = 1
        L_0x03a9:
            java.lang.String r0 = "3rd pass"
            r11.solveLinearSystem(r0)
        L_0x03ae:
            r9 = 0
        L_0x03af:
            java.util.ArrayList<X.05P> r0 = r11.mVariableDimensionsWidgets
            java.lang.Object r6 = r0.get(r9)
            X.05P r6 = (X.AnonymousClass05P) r6
            java.lang.Object r5 = r6.mCompanionWidget
            android.view.View r5 = (android.view.View) r5
            if (r5 == 0) goto L_0x03f7
            int r1 = r5.getMeasuredWidth()
            int r0 = r6.getWidth()
            if (r1 != r0) goto L_0x03d1
            int r1 = r5.getMeasuredHeight()
            int r0 = r6.getHeight()
            if (r1 == r0) goto L_0x03f7
        L_0x03d1:
            int r1 = r6.mVisibility
            r0 = 8
            if (r1 == r0) goto L_0x03f7
            int r0 = r6.getWidth()
            r4 = 1073741824(0x40000000, float:2.0)
            int r1 = android.view.View.MeasureSpec.makeMeasureSpec(r0, r4)
            int r0 = r6.getHeight()
            int r0 = android.view.View.MeasureSpec.makeMeasureSpec(r0, r4)
            r5.measure(r1, r0)
            X.05b r6 = r11.mMetrics
            if (r6 == 0) goto L_0x03f7
            long r0 = r6.LIZIZ
            r4 = 1
            long r0 = r0 + r4
            r6.LIZIZ = r0
        L_0x03f7:
            int r9 = r9 + 1
            if (r9 >= r2) goto L_0x0402
            goto L_0x03af
        L_0x03fc:
            if (r1 == 0) goto L_0x03ae
            goto L_0x03a9
        L_0x03ff:
            r1 = 0
            goto L_0x039b
        L_0x0401:
            r3 = 0
        L_0x0402:
            X.1gr r0 = r11.mLayoutWidget
            int r2 = r0.getWidth()
            int r2 = r2 + r8
            X.1gr r0 = r11.mLayoutWidget
            int r1 = r0.getHeight()
            int r1 = r1 + r7
            int r2 = resolveSizeAndState(r2, r13, r3)
            int r0 = r3 << 16
            int r1 = resolveSizeAndState(r1, r12, r0)
            r0 = 16777215(0xffffff, float:2.3509886E-38)
            r2 = r2 & r0
            r1 = r1 & r0
            int r0 = r11.mMaxWidth
            int r3 = java.lang.Math.min(r0, r2)
            int r0 = r11.mMaxHeight
            int r2 = java.lang.Math.min(r0, r1)
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIJ
            r1 = 16777216(0x1000000, float:2.3509887E-38)
            if (r0 == 0) goto L_0x0434
            r3 = r3 | r1
        L_0x0434:
            X.1gr r0 = r11.mLayoutWidget
            boolean r0 = r0.LJIJI
            if (r0 == 0) goto L_0x043b
            r2 = r2 | r1
        L_0x043b:
            r11.setMeasuredDimension(r3, r2)
            r11.mLastMeasureWidth = r3
            r11.mLastMeasureHeight = r2
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.onMeasure(int, int):void");
    }

    public void addView(View view, int i, ViewGroup.LayoutParams layoutParams) {
        super.addView(view, i, layoutParams);
    }

    public void setDesignInformation(int i, Object obj, Object obj2) {
        if (i == 0 && (obj instanceof String) && (obj2 instanceof Integer)) {
            if (this.mDesignIds == null) {
                this.mDesignIds = new HashMap<>();
            }
            String str = (String) obj;
            int indexOf = str.indexOf("/");
            if (indexOf != -1) {
                str = str.substring(indexOf + 1);
            }
            this.mDesignIds.put(str, Integer.valueOf(((Integer) obj2).intValue()));
        }
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        init(attributeSet);
    }

    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        View content;
        int childCount = getChildCount();
        boolean isInEditMode = isInEditMode();
        int i5 = 0;
        for (int i6 = 0; i6 < childCount; i6++) {
            View childAt = getChildAt(i6);
            C013905h r2 = (C013905h) childAt.getLayoutParams();
            AnonymousClass05P r6 = r2.widget;
            if ((childAt.getVisibility() != 8 || r2.isGuideline || r2.isHelper || isInEditMode) && !r2.isInPlaceholder) {
                int drawX = r6.getDrawX();
                int drawY = r6.getDrawY();
                int width = r6.getWidth() + drawX;
                int height = r6.getHeight() + drawY;
                childAt.layout(drawX, drawY, width, height);
                if ((childAt instanceof C014105j) && (content = ((C014105j) childAt).getContent()) != null) {
                    content.setVisibility(0);
                    content.layout(drawX, drawY, width, height);
                }
            }
        }
        int size = this.mConstraintHelpers.size();
        if (size > 0) {
            do {
                this.mConstraintHelpers.get(i5).updatePostLayout(this);
                i5++;
            } while (i5 < size);
        }
    }
}
