package androidx.constraintlayout.widget;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.j;
import androidx.credentials.exceptions.publickeycredential.DomExceptionUtils;
import androidx.media3.container.MdtaMetadataEntry;
import androidx.media3.container.NalUnitUtil;
import androidx.media3.extractor.flac.FlacConstants;
import androidx.media3.extractor.ts.TsExtractor;
import com.google.android.gms.fido.u2f.api.common.RegisterRequest;
import defpackage.a24;
import defpackage.cd1;
import defpackage.d24;
import defpackage.dd1;
import defpackage.e95;
import defpackage.fd1;
import defpackage.iga;
import defpackage.o60;
import defpackage.oma;
import defpackage.rq6;
import defpackage.rx6;
import defpackage.sc1;
import defpackage.t80;
import defpackage.vo6;
import defpackage.vpa;
import defpackage.vv5;
import defpackage.xy3;
import defpackage.z84;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import okhttp3.internal.http2.Http2Connection;

/* JADX INFO: loaded from: classes.dex */
public class ConstraintLayout extends ViewGroup {
    private static final boolean DEBUG = false;
    private static final boolean DEBUG_DRAW_CONSTRAINTS = false;
    public static final int DESIGN_INFO_ID = 0;
    private static final boolean MEASURE = false;
    private static final boolean OPTIMIZE_HEIGHT_CHANGE = false;
    private static final String TAG = "ConstraintLayout";
    private static final boolean USE_CONSTRAINTS_HELPER = true;
    public static final String VERSION = "ConstraintLayout-2.1.4";
    private static l sSharedValues;
    SparseArray<View> mChildrenByIds;
    private ArrayList<androidx.constraintlayout.widget.b> mConstraintHelpers;
    protected androidx.constraintlayout.widget.c mConstraintLayoutSpec;
    private e mConstraintSet;
    private int mConstraintSetId;
    private fd1 mConstraintsChangedListener;
    private HashMap<String, Integer> mDesignIds;
    protected boolean mDirtyHierarchy;
    private int mLastMeasureHeight;
    int mLastMeasureHeightMode;
    int mLastMeasureHeightSize;
    private int mLastMeasureWidth;
    int mLastMeasureWidthMode;
    int mLastMeasureWidthSize;
    protected dd1 mLayoutWidget;
    private int mMaxHeight;
    private int mMaxWidth;
    c mMeasurer;
    private vv5 mMetrics;
    private int mMinHeight;
    private int mMinWidth;
    private int mOnMeasureHeightMeasureSpec;
    private int mOnMeasureWidthMeasureSpec;
    private int mOptimizationLevel;
    private SparseArray<cd1> mTempMapIdToWidget;

    public static /* synthetic */ class a {
        public static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[cd1.b.values().length];
            a = iArr;
            try {
                iArr[0] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[1] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                a[3] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                a[2] = 4;
            } catch (NoSuchFieldError unused4) {
            }
        }
    }

    public class c implements t80.b {
        public final ConstraintLayout a;
        public int b;
        public int c;
        public int d;
        public int e;
        public int f;
        public int g;

        public c(ConstraintLayout constraintLayout) {
            this.a = constraintLayout;
        }

        public static boolean c(int i, int i2, int i3) {
            if (i == i2) {
                return true;
            }
            int mode = View.MeasureSpec.getMode(i);
            View.MeasureSpec.getSize(i);
            int mode2 = View.MeasureSpec.getMode(i2);
            int size = View.MeasureSpec.getSize(i2);
            if (mode2 == 1073741824) {
                return (mode == Integer.MIN_VALUE || mode == 0) && i3 == size;
            }
            return false;
        }

        @Override // t80.b
        public final void a() {
            ConstraintLayout constraintLayout = this.a;
            int childCount = constraintLayout.getChildCount();
            for (int i = 0; i < childCount; i++) {
                View childAt = constraintLayout.getChildAt(i);
                if (childAt instanceof i) {
                    i iVar = (i) childAt;
                    if (iVar.b != null) {
                        b bVar = (b) iVar.getLayoutParams();
                        b bVar2 = (b) iVar.b.getLayoutParams();
                        cd1 cd1Var = bVar2.bq;
                        cd1Var.bi = 0;
                        cd1 cd1Var2 = bVar.bq;
                        cd1.b bVar3 = cd1Var2.au[0];
                        cd1.b bVar4 = cd1.b.a;
                        if (bVar3 != bVar4) {
                            cd1Var2.ap(cd1Var.r());
                        }
                        cd1 cd1Var3 = bVar.bq;
                        if (cd1Var3.au[1] != bVar4) {
                            cd1Var3.am(bVar2.bq.l());
                        }
                        bVar2.bq.bi = 8;
                    }
                }
            }
            int size = constraintLayout.mConstraintHelpers.size();
            if (size > 0) {
                for (int i2 = 0; i2 < size; i2++) {
                    ((androidx.constraintlayout.widget.b) constraintLayout.mConstraintHelpers.get(i2)).getClass();
                }
            }
        }

        @Override // t80.b
        public final void b(cd1 cd1Var, t80.a aVar) {
            int iMakeMeasureSpec;
            int iMakeMeasureSpec2;
            int iMax;
            boolean z;
            int measuredWidth;
            int baseline;
            int i;
            if (cd1Var == null) {
                return;
            }
            sc1 sc1Var = cd1Var.al;
            sc1 sc1Var2 = cd1Var.aj;
            if (cd1Var.bi == 8 && !cd1Var.af) {
                aVar.e = 0;
                aVar.f = 0;
                aVar.g = 0;
                return;
            }
            if (cd1Var.av == null) {
                return;
            }
            cd1.b bVar = aVar.a;
            cd1.b bVar2 = aVar.b;
            int i2 = aVar.c;
            int i3 = aVar.d;
            int i4 = this.b + this.c;
            int i5 = this.d;
            View view = cd1Var.bh;
            int iOrdinal = bVar.ordinal();
            if (iOrdinal == 0) {
                iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i2, 1073741824);
            } else if (iOrdinal == 1) {
                iMakeMeasureSpec = ViewGroup.getChildMeasureSpec(this.f, i5, -2);
            } else if (iOrdinal == 2) {
                iMakeMeasureSpec = ViewGroup.getChildMeasureSpec(this.f, i5, -2);
                boolean z2 = cd1Var.r == 1;
                int i6 = aVar.j;
                if (i6 == 1 || i6 == 2) {
                    boolean z3 = view.getMeasuredHeight() == cd1Var.l();
                    if (aVar.j == 2 || !z2 || ((z2 && z3) || (view instanceof i) || cd1Var.ab())) {
                        iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(cd1Var.r(), 1073741824);
                    }
                }
            } else if (iOrdinal != 3) {
                iMakeMeasureSpec = 0;
            } else {
                int i7 = this.f;
                int i8 = sc1Var2 != null ? sc1Var2.g : 0;
                if (sc1Var != null) {
                    i8 += sc1Var.g;
                }
                iMakeMeasureSpec = ViewGroup.getChildMeasureSpec(i7, i5 + i8, -1);
            }
            int iOrdinal2 = bVar2.ordinal();
            if (iOrdinal2 == 0) {
                iMakeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i3, 1073741824);
            } else if (iOrdinal2 == 1) {
                iMakeMeasureSpec2 = ViewGroup.getChildMeasureSpec(this.g, i4, -2);
            } else if (iOrdinal2 == 2) {
                iMakeMeasureSpec2 = ViewGroup.getChildMeasureSpec(this.g, i4, -2);
                boolean z4 = cd1Var.s == 1;
                int i9 = aVar.j;
                if (i9 == 1 || i9 == 2) {
                    boolean z5 = view.getMeasuredWidth() == cd1Var.r();
                    if (aVar.j == 2 || !z4 || ((z4 && z5) || (view instanceof i) || cd1Var.ac())) {
                        iMakeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(cd1Var.l(), 1073741824);
                    }
                }
            } else if (iOrdinal2 != 3) {
                iMakeMeasureSpec2 = 0;
            } else {
                int i10 = this.g;
                int i11 = sc1Var2 != null ? cd1Var.ak.g : 0;
                if (sc1Var != null) {
                    i11 += cd1Var.am.g;
                }
                iMakeMeasureSpec2 = ViewGroup.getChildMeasureSpec(i10, i4 + i11, -1);
            }
            dd1 dd1Var = (dd1) cd1Var.av;
            ConstraintLayout constraintLayout = ConstraintLayout.this;
            if (dd1Var != null && rx6.b(constraintLayout.mOptimizationLevel, 256) && view.getMeasuredWidth() == cd1Var.r() && view.getMeasuredWidth() < dd1Var.r() && view.getMeasuredHeight() == cd1Var.l() && view.getMeasuredHeight() < dd1Var.l() && view.getBaseline() == cd1Var.bc && !cd1Var.aa() && c(cd1Var.ah, iMakeMeasureSpec, cd1Var.r()) && c(cd1Var.ai, iMakeMeasureSpec2, cd1Var.l())) {
                aVar.e = cd1Var.r();
                aVar.f = cd1Var.l();
                aVar.g = cd1Var.bc;
                return;
            }
            cd1.b bVar3 = cd1.b.c;
            boolean z6 = bVar == bVar3;
            boolean z7 = bVar2 == bVar3;
            cd1.b bVar4 = cd1.b.a;
            cd1.b bVar5 = cd1.b.d;
            boolean z8 = bVar2 == bVar5 || bVar2 == bVar4;
            boolean z9 = bVar == bVar5 || bVar == bVar4;
            boolean z10 = z6 && cd1Var.ay > 0.0f;
            boolean z11 = z7 && cd1Var.ay > 0.0f;
            if (view == null) {
                return;
            }
            b bVar6 = (b) view.getLayoutParams();
            int i12 = aVar.j;
            if (i12 != 1 && i12 != 2 && z6 && cd1Var.r == 0 && z7 && cd1Var.s == 0) {
                z = false;
                measuredWidth = 0;
                baseline = 0;
                i = -1;
                iMax = 0;
            } else {
                if ((view instanceof n) && (cd1Var instanceof oma)) {
                    ((n) view).o((oma) cd1Var, iMakeMeasureSpec, iMakeMeasureSpec2);
                } else {
                    view.measure(iMakeMeasureSpec, iMakeMeasureSpec2);
                }
                cd1Var.ah = iMakeMeasureSpec;
                cd1Var.ai = iMakeMeasureSpec2;
                cd1Var.g = false;
                int measuredWidth2 = view.getMeasuredWidth();
                int measuredHeight = view.getMeasuredHeight();
                int baseline2 = view.getBaseline();
                int i13 = cd1Var.u;
                int iMax2 = i13 > 0 ? Math.max(i13, measuredWidth2) : measuredWidth2;
                int i14 = cd1Var.v;
                if (i14 > 0) {
                    iMax2 = Math.min(i14, iMax2);
                }
                int i15 = cd1Var.x;
                iMax = i15 > 0 ? Math.max(i15, measuredHeight) : measuredHeight;
                int i16 = iMakeMeasureSpec2;
                int i17 = cd1Var.y;
                if (i17 > 0) {
                    iMax = Math.min(i17, iMax);
                }
                if (!rx6.b(constraintLayout.mOptimizationLevel, 1)) {
                    if (z10 && z8) {
                        iMax2 = (int) ((iMax * cd1Var.ay) + 0.5f);
                    } else if (z11 && z9) {
                        iMax = (int) ((iMax2 / cd1Var.ay) + 0.5f);
                    }
                }
                if (measuredWidth2 == iMax2 && measuredHeight == iMax) {
                    baseline = baseline2;
                    measuredWidth = iMax2;
                    z = false;
                } else {
                    if (measuredWidth2 != iMax2) {
                        iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(iMax2, 1073741824);
                    }
                    int iMakeMeasureSpec3 = measuredHeight != iMax ? View.MeasureSpec.makeMeasureSpec(iMax, 1073741824) : i16;
                    view.measure(iMakeMeasureSpec, iMakeMeasureSpec3);
                    cd1Var.ah = iMakeMeasureSpec;
                    cd1Var.ai = iMakeMeasureSpec3;
                    z = false;
                    cd1Var.g = false;
                    measuredWidth = view.getMeasuredWidth();
                    int measuredHeight2 = view.getMeasuredHeight();
                    baseline = view.getBaseline();
                    iMax = measuredHeight2;
                }
                i = -1;
            }
            boolean z12 = baseline != i ? true : z;
            aVar.i = (measuredWidth == aVar.c && iMax == aVar.d) ? z : true;
            boolean z13 = bVar6.bc ? true : z12;
            if (z13 && baseline != -1 && cd1Var.bc != baseline) {
                aVar.i = true;
            }
            aVar.e = measuredWidth;
            aVar.f = iMax;
            aVar.h = z13;
            aVar.g = baseline;
        }
    }

    public ConstraintLayout(@vo6 Context context, @rq6 AttributeSet attributeSet) {
        super(context, attributeSet);
        this.mChildrenByIds = new SparseArray<>();
        this.mConstraintHelpers = new ArrayList<>(4);
        this.mLayoutWidget = new dd1();
        this.mMinWidth = 0;
        this.mMinHeight = 0;
        this.mMaxWidth = Integer.MAX_VALUE;
        this.mMaxHeight = Integer.MAX_VALUE;
        this.mDirtyHierarchy = true;
        this.mOptimizationLevel = TsExtractor.TS_STREAM_TYPE_AIT;
        this.mConstraintSet = null;
        this.mConstraintLayoutSpec = null;
        this.mConstraintSetId = -1;
        this.mDesignIds = new HashMap<>();
        this.mLastMeasureWidth = -1;
        this.mLastMeasureHeight = -1;
        this.mLastMeasureWidthSize = -1;
        this.mLastMeasureHeightSize = -1;
        this.mLastMeasureWidthMode = 0;
        this.mLastMeasureHeightMode = 0;
        this.mTempMapIdToWidget = new SparseArray<>();
        this.mMeasurer = new c(this);
        this.mOnMeasureWidthMeasureSpec = 0;
        this.mOnMeasureHeightMeasureSpec = 0;
        a(attributeSet, 0);
    }

    private int getPaddingWidth() {
        int iMax = Math.max(0, getPaddingRight()) + Math.max(0, getPaddingLeft());
        int iMax2 = Math.max(0, getPaddingEnd()) + Math.max(0, getPaddingStart());
        return iMax2 > 0 ? iMax2 : iMax;
    }

    public static l getSharedValues() {
        if (sSharedValues == null) {
            l lVar = new l();
            new SparseIntArray();
            lVar.a = new HashMap();
            sSharedValues = lVar;
        }
        return sSharedValues;
    }

    public final void a(AttributeSet attributeSet, int i) {
        dd1 dd1Var = this.mLayoutWidget;
        dd1Var.bh = this;
        c cVar = this.mMeasurer;
        dd1Var.bv = cVar;
        dd1Var.bt.f = cVar;
        this.mChildrenByIds.put(getId(), this);
        this.mConstraintSet = null;
        if (attributeSet != null) {
            TypedArray typedArrayObtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, j.m.b, i, 0);
            int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
            for (int i2 = 0; i2 < indexCount; i2++) {
                int index = typedArrayObtainStyledAttributes.getIndex(i2);
                if (index == 16) {
                    this.mMinWidth = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.mMinWidth);
                } else if (index == 17) {
                    this.mMinHeight = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.mMinHeight);
                } else if (index == 14) {
                    this.mMaxWidth = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxWidth);
                } else if (index == 15) {
                    this.mMaxHeight = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxHeight);
                } else if (index == 113) {
                    this.mOptimizationLevel = typedArrayObtainStyledAttributes.getInt(index, this.mOptimizationLevel);
                } else if (index == 56) {
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    if (resourceId != 0) {
                        try {
                            parseLayoutDescription(resourceId);
                        } catch (Resources.NotFoundException unused) {
                            this.mConstraintLayoutSpec = null;
                        }
                    }
                } else if (index == 34) {
                    int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    try {
                        e eVar = new e();
                        this.mConstraintSet = eVar;
                        eVar.j(getContext(), resourceId2);
                    } catch (Resources.NotFoundException unused2) {
                        this.mConstraintSet = null;
                    }
                    this.mConstraintSetId = resourceId2;
                }
            }
            typedArrayObtainStyledAttributes.recycle();
        }
        dd1 dd1Var2 = this.mLayoutWidget;
        dd1Var2.cf = this.mOptimizationLevel;
        e95.p = dd1Var2.aw(512);
    }

    /* JADX WARN: Removed duplicated region for block: B:164:0x02de  */
    /* JADX WARN: Removed duplicated region for block: B:167:0x02e3  */
    /* JADX WARN: Removed duplicated region for block: B:44:0x00eb  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x00ff  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x0119  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x0136  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x0159  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x016e  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x018b  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x0199  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x01bd  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x01c5  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:164:0x02de -> B:165:0x02df). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void applyConstraintsFromLayoutParams(boolean z, View view, cd1 cd1Var, b bVar, SparseArray<cd1> sparseArray) {
        ConstraintLayout constraintLayout;
        int i;
        sc1.b bVar2;
        float f;
        cd1 cd1Var2;
        sc1.b bVar3;
        sc1.b bVar4;
        sc1.b bVar5;
        cd1 cd1Var3;
        sc1.b bVar6;
        int i2;
        sc1.b bVar7;
        cd1 cd1Var4;
        sc1.b bVar8;
        sc1.b bVar9;
        int i3;
        sc1.b bVar10;
        cd1 cd1Var5;
        int i4;
        b bVar11;
        cd1 cd1Var6;
        sc1.b bVar12;
        float f2;
        int i5;
        float fAbs;
        int i6;
        float f3;
        cd1 cd1Var7 = cd1Var;
        bVar.a();
        cd1Var7.bi = view.getVisibility();
        if (bVar.bf) {
            cd1Var7.af = true;
            cd1Var7.bi = 8;
        }
        cd1Var7.bh = view;
        if (view instanceof androidx.constraintlayout.widget.b) {
            constraintLayout = this;
            ((androidx.constraintlayout.widget.b) view).k(cd1Var7, constraintLayout.mLayoutWidget.bw);
        } else {
            constraintLayout = this;
        }
        int i7 = -1;
        if (bVar.bd) {
            xy3 xy3Var = (xy3) cd1Var7;
            int i8 = bVar.bn;
            int i9 = bVar.bo;
            float f4 = bVar.bp;
            if (f4 != -1.0f) {
                if (f4 > -1.0f) {
                    xy3Var.br = f4;
                    xy3Var.bs = -1;
                    xy3Var.bt = -1;
                    return;
                }
                return;
            }
            if (i8 != -1) {
                if (i8 > -1) {
                    xy3Var.br = -1.0f;
                    xy3Var.bs = i8;
                    xy3Var.bt = -1;
                    return;
                }
                return;
            }
            if (i9 == -1 || i9 <= -1) {
                return;
            }
            xy3Var.br = -1.0f;
            xy3Var.bs = -1;
            xy3Var.bt = i9;
            return;
        }
        int i10 = bVar.bg;
        int i11 = bVar.bh;
        int i12 = bVar.bi;
        int i13 = bVar.bj;
        int i14 = bVar.bk;
        int i15 = bVar.bl;
        float f5 = bVar.bm;
        int i16 = bVar.p;
        sc1.b bVar13 = sc1.b.c;
        sc1.b bVar14 = sc1.b.a;
        sc1.b bVar15 = sc1.b.d;
        sc1.b bVar16 = sc1.b.b;
        if (i16 != -1) {
            cd1 cd1Var8 = sparseArray.get(i16);
            if (cd1Var8 != null) {
                float f6 = bVar.r;
                int i17 = bVar.q;
                sc1.b bVar17 = sc1.b.f;
                f3 = 0.0f;
                cd1Var.w(bVar17, cd1Var8, bVar17, i17, 0);
                cd1Var7 = cd1Var;
                cd1Var7.ad = f6;
            } else {
                f3 = 0.0f;
            }
            cd1Var6 = cd1Var7;
            bVar11 = bVar;
            i = 1;
            f = f3;
            bVar6 = bVar13;
            bVar5 = bVar14;
            bVar12 = bVar15;
            bVar10 = bVar16;
        } else {
            if (i10 != -1) {
                cd1 cd1Var9 = sparseArray.get(i10);
                if (cd1Var9 != null) {
                    i = 1;
                    f = 0.0f;
                    bVar2 = bVar14;
                    cd1Var7.w(bVar2, cd1Var9, bVar14, ((ViewGroup.MarginLayoutParams) bVar).leftMargin, i14);
                } else {
                    i = 1;
                    bVar2 = bVar14;
                    f = 0.0f;
                }
            } else {
                i = 1;
                bVar2 = bVar14;
                f = 0.0f;
                if (i11 != -1 && (cd1Var2 = sparseArray.get(i11)) != null) {
                    cd1Var.w(bVar2, cd1Var2, bVar13, ((ViewGroup.MarginLayoutParams) bVar).leftMargin, i14);
                    bVar3 = bVar2;
                    bVar4 = bVar13;
                }
                if (i12 == -1) {
                    cd1 cd1Var10 = sparseArray.get(i12);
                    if (cd1Var10 != null) {
                        cd1Var.w(bVar4, cd1Var10, bVar3, ((ViewGroup.MarginLayoutParams) bVar).rightMargin, i15);
                    }
                    bVar5 = bVar3;
                } else {
                    bVar5 = bVar3;
                    if (i13 != -1 && (cd1Var3 = sparseArray.get(i13)) != null) {
                        cd1Var.w(bVar4, cd1Var3, bVar4, ((ViewGroup.MarginLayoutParams) bVar).rightMargin, i15);
                    }
                }
                bVar6 = bVar4;
                i2 = bVar.i;
                if (i2 == -1) {
                    cd1 cd1Var11 = sparseArray.get(i2);
                    if (cd1Var11 != null) {
                        bVar7 = bVar16;
                        cd1Var.w(bVar7, cd1Var11, bVar16, ((ViewGroup.MarginLayoutParams) bVar).topMargin, bVar.x);
                    } else {
                        bVar7 = bVar16;
                    }
                } else {
                    bVar7 = bVar16;
                    int i18 = bVar.j;
                    if (i18 != -1 && (cd1Var4 = sparseArray.get(i18)) != null) {
                        cd1Var.w(bVar7, cd1Var4, bVar15, ((ViewGroup.MarginLayoutParams) bVar).topMargin, bVar.x);
                        bVar8 = bVar7;
                        bVar9 = bVar15;
                    }
                    i3 = bVar.k;
                    if (i3 != -1) {
                        cd1 cd1Var12 = sparseArray.get(i3);
                        if (cd1Var12 != null) {
                            cd1Var.w(bVar9, cd1Var12, bVar8, ((ViewGroup.MarginLayoutParams) bVar).bottomMargin, bVar.z);
                        }
                        bVar10 = bVar8;
                    } else {
                        bVar10 = bVar8;
                        int i19 = bVar.l;
                        if (i19 != -1 && (cd1Var5 = sparseArray.get(i19)) != null) {
                            cd1Var.w(bVar9, cd1Var5, bVar9, ((ViewGroup.MarginLayoutParams) bVar).bottomMargin, bVar.z);
                        }
                    }
                    sc1.b bVar18 = bVar9;
                    i4 = bVar.m;
                    if (i4 != -1) {
                        bVar11 = bVar;
                        constraintLayout.b(cd1Var, bVar11, sparseArray, i4, sc1.b.e);
                    } else {
                        bVar11 = bVar;
                        int i20 = bVar11.n;
                        if (i20 != -1) {
                            b(cd1Var, bVar11, sparseArray, i20, bVar10);
                        } else {
                            int i21 = bVar11.o;
                            if (i21 != -1) {
                                b(cd1Var, bVar11, sparseArray, i21, bVar18);
                                cd1Var6 = cd1Var;
                                bVar12 = bVar18;
                            }
                            if (f5 >= f) {
                                cd1Var6.bf = f5;
                            }
                            f2 = bVar11.af;
                            if (f2 >= f) {
                                cd1Var6.bg = f2;
                            }
                        }
                    }
                    cd1Var6 = cd1Var;
                    bVar12 = bVar18;
                    if (f5 >= f) {
                    }
                    f2 = bVar11.af;
                    if (f2 >= f) {
                    }
                }
                bVar8 = bVar7;
                bVar9 = bVar15;
                i3 = bVar.k;
                if (i3 != -1) {
                }
                sc1.b bVar182 = bVar9;
                i4 = bVar.m;
                if (i4 != -1) {
                }
                cd1Var6 = cd1Var;
                bVar12 = bVar182;
                if (f5 >= f) {
                }
                f2 = bVar11.af;
                if (f2 >= f) {
                }
            }
            bVar3 = bVar2;
            bVar4 = bVar13;
            if (i12 == -1) {
            }
            bVar6 = bVar4;
            i2 = bVar.i;
            if (i2 == -1) {
            }
            bVar8 = bVar7;
            bVar9 = bVar15;
            i3 = bVar.k;
            if (i3 != -1) {
            }
            sc1.b bVar1822 = bVar9;
            i4 = bVar.m;
            if (i4 != -1) {
            }
            cd1Var6 = cd1Var;
            bVar12 = bVar1822;
            if (f5 >= f) {
            }
            f2 = bVar11.af;
            if (f2 >= f) {
            }
        }
        if (z && ((i6 = bVar11.at) != -1 || bVar11.au != -1)) {
            int i22 = bVar11.au;
            cd1Var6.ba = i6;
            cd1Var6.bb = i22;
        }
        boolean z2 = bVar11.ba;
        cd1.b bVar19 = cd1.b.b;
        cd1.b bVar20 = cd1.b.a;
        cd1.b bVar21 = cd1.b.d;
        cd1.b bVar22 = cd1.b.c;
        if (z2) {
            cd1Var6.an(bVar20);
            cd1Var6.ap(((ViewGroup.MarginLayoutParams) bVar11).width);
            if (((ViewGroup.MarginLayoutParams) bVar11).width == -2) {
                cd1Var6.an(bVar19);
            }
        } else if (((ViewGroup.MarginLayoutParams) bVar11).width == -1) {
            if (bVar11.aw) {
                cd1Var6.an(bVar22);
            } else {
                cd1Var6.an(bVar21);
            }
            cd1Var6.j(bVar5).g = ((ViewGroup.MarginLayoutParams) bVar11).leftMargin;
            cd1Var6.j(bVar6).g = ((ViewGroup.MarginLayoutParams) bVar11).rightMargin;
        } else {
            cd1Var6.an(bVar22);
            cd1Var6.ap(0);
        }
        if (bVar11.bb) {
            cd1Var6.ao(bVar20);
            cd1Var6.am(((ViewGroup.MarginLayoutParams) bVar11).height);
            if (((ViewGroup.MarginLayoutParams) bVar11).height == -2) {
                cd1Var6.ao(bVar19);
            }
        } else if (((ViewGroup.MarginLayoutParams) bVar11).height == -1) {
            if (bVar11.ax) {
                cd1Var6.ao(bVar22);
            } else {
                cd1Var6.ao(bVar21);
            }
            cd1Var6.j(bVar10).g = ((ViewGroup.MarginLayoutParams) bVar11).topMargin;
            cd1Var6.j(bVar12).g = ((ViewGroup.MarginLayoutParams) bVar11).bottomMargin;
        } else {
            cd1Var6.ao(bVar22);
            cd1Var6.am(0);
        }
        String str = bVar11.ag;
        if (str == null || str.length() == 0) {
            cd1Var6.ay = f;
        } else {
            int length = str.length();
            int iIndexOf = str.indexOf(44);
            if (iIndexOf <= 0 || iIndexOf >= length - 1) {
                i5 = 0;
            } else {
                String strSubstring = str.substring(0, iIndexOf);
                if (strSubstring.equalsIgnoreCase("W")) {
                    i7 = 0;
                } else if (strSubstring.equalsIgnoreCase("H")) {
                    i7 = i;
                }
                i5 = iIndexOf + 1;
            }
            int iIndexOf2 = str.indexOf(58);
            if (iIndexOf2 < 0 || iIndexOf2 >= length - 1) {
                String strSubstring2 = str.substring(i5);
                fAbs = strSubstring2.length() > 0 ? Float.parseFloat(strSubstring2) : f;
                if (fAbs > f) {
                    cd1Var6.ay = fAbs;
                    cd1Var6.az = i7;
                }
            } else {
                String strSubstring3 = str.substring(i5, iIndexOf2);
                String strSubstring4 = str.substring(iIndexOf2 + 1);
                if (strSubstring3.length() > 0 && strSubstring4.length() > 0) {
                    float f7 = Float.parseFloat(strSubstring3);
                    float f8 = Float.parseFloat(strSubstring4);
                    if (f7 > f && f8 > f) {
                        fAbs = i7 == i ? Math.abs(f8 / f7) : Math.abs(f7 / f8);
                    }
                    if (fAbs > f) {
                    }
                }
            }
        }
        float f9 = bVar11.ah;
        float[] fArr = cd1Var6.bm;
        fArr[0] = f9;
        fArr[1] = bVar11.ai;
        cd1Var6.bk = bVar11.aj;
        cd1Var6.bl = bVar11.ak;
        int i23 = bVar11.az;
        if (i23 >= 0 && i23 <= 3) {
            cd1Var6.q = i23;
        }
        int i24 = bVar11.al;
        int i25 = bVar11.an;
        int i26 = bVar11.ap;
        float f10 = bVar11.ar;
        cd1Var6.r = i24;
        cd1Var6.u = i25;
        if (i26 == Integer.MAX_VALUE) {
            i26 = 0;
        }
        cd1Var6.v = i26;
        cd1Var6.w = f10;
        if (f10 > f && f10 < 1.0f && i24 == 0) {
            cd1Var6.r = 2;
        }
        int i27 = bVar11.am;
        int i28 = bVar11.ao;
        int i29 = bVar11.aq;
        float f11 = bVar11.as;
        cd1Var6.s = i27;
        cd1Var6.x = i28;
        cd1Var6.y = i29 != Integer.MAX_VALUE ? i29 : 0;
        cd1Var6.z = f11;
        if (f11 <= f || f11 >= 1.0f || i27 != 0) {
            return;
        }
        cd1Var6.s = 2;
    }

    public final void b(cd1 cd1Var, b bVar, SparseArray sparseArray, int i, sc1.b bVar2) {
        View view = this.mChildrenByIds.get(i);
        cd1 cd1Var2 = (cd1) sparseArray.get(i);
        if (cd1Var2 == null || view == null || !(view.getLayoutParams() instanceof b)) {
            return;
        }
        bVar.bc = true;
        sc1.b bVar3 = sc1.b.e;
        if (bVar2 == bVar3) {
            b bVar4 = (b) view.getLayoutParams();
            bVar4.bc = true;
            bVar4.bq.ae = true;
        }
        cd1Var.j(bVar3).b(cd1Var2.j(bVar2), bVar.ad, bVar.ac, true);
        cd1Var.ae = true;
        cd1Var.j(sc1.b.b).j();
        cd1Var.j(sc1.b.d).j();
    }

    @Override // android.view.ViewGroup
    public boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return layoutParams instanceof b;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void dispatchDraw(Canvas canvas) {
        Object tag;
        int size;
        ArrayList<androidx.constraintlayout.widget.b> arrayList = this.mConstraintHelpers;
        if (arrayList != null && (size = arrayList.size()) > 0) {
            for (int i = 0; i < size; i++) {
                this.mConstraintHelpers.get(i).m(this);
            }
        }
        super.dispatchDraw(canvas);
        if (isInEditMode()) {
            float width = getWidth();
            float height = getHeight();
            int childCount = getChildCount();
            for (int i2 = 0; i2 < childCount; i2++) {
                View childAt = getChildAt(i2);
                if (childAt.getVisibility() != 8 && (tag = childAt.getTag()) != null && (tag instanceof String)) {
                    String[] strArrSplit = ((String) tag).split(",");
                    if (strArrSplit.length == 4) {
                        int i3 = Integer.parseInt(strArrSplit[0]);
                        int i4 = Integer.parseInt(strArrSplit[1]);
                        int i5 = Integer.parseInt(strArrSplit[2]);
                        int i6 = (int) ((i3 / 1080.0f) * width);
                        int i7 = (int) ((i4 / 1920.0f) * height);
                        Paint paint = new Paint();
                        paint.setColor(-65536);
                        float f = i6;
                        float f2 = i7;
                        float f3 = i6 + ((int) ((i5 / 1080.0f) * width));
                        canvas.drawLine(f, f2, f3, f2, paint);
                        float f4 = i7 + ((int) ((Integer.parseInt(strArrSplit[3]) / 1920.0f) * height));
                        canvas.drawLine(f3, f2, f3, f4, paint);
                        canvas.drawLine(f3, f4, f, f4, paint);
                        canvas.drawLine(f, f4, f, f2, paint);
                        paint.setColor(-16711936);
                        canvas.drawLine(f, f2, f3, f4, paint);
                        canvas.drawLine(f, f4, f3, f2, paint);
                    }
                }
            }
        }
    }

    public void fillMetrics(vv5 vv5Var) {
        this.mMetrics = vv5Var;
        dd1 dd1Var = this.mLayoutWidget;
        dd1Var.getClass();
        dd1Var.bx.getClass();
        e95.r = vv5Var;
    }

    @Override // android.view.View
    public void forceLayout() {
        this.mDirtyHierarchy = true;
        this.mLastMeasureWidth = -1;
        this.mLastMeasureHeight = -1;
        this.mLastMeasureWidthSize = -1;
        this.mLastMeasureHeightSize = -1;
        this.mLastMeasureWidthMode = 0;
        this.mLastMeasureHeightMode = 0;
        super.forceLayout();
    }

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

    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 int getOptimizationLevel() {
        return this.mLayoutWidget.cf;
    }

    public String getSceneString() {
        int id;
        StringBuilder sb = new StringBuilder();
        if (this.mLayoutWidget.j == null) {
            int id2 = getId();
            if (id2 != -1) {
                this.mLayoutWidget.j = getContext().getResources().getResourceEntryName(id2);
            } else {
                this.mLayoutWidget.j = "parent";
            }
        }
        dd1 dd1Var = this.mLayoutWidget;
        if (dd1Var.bj == null) {
            dd1Var.bj = dd1Var.j;
        }
        for (cd1 cd1Var : dd1Var.br) {
            View view = cd1Var.bh;
            if (view != null) {
                if (cd1Var.j == null && (id = view.getId()) != -1) {
                    cd1Var.j = getContext().getResources().getResourceEntryName(id);
                }
                if (cd1Var.bj == null) {
                    cd1Var.bj = cd1Var.j;
                }
            }
        }
        this.mLayoutWidget.o(sb);
        return sb.toString();
    }

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

    public final cd1 getViewWidget(View view) {
        if (view == this) {
            return this.mLayoutWidget;
        }
        if (view == null) {
            return null;
        }
        if (view.getLayoutParams() instanceof b) {
            return ((b) view.getLayoutParams()).bq;
        }
        view.setLayoutParams(generateLayoutParams(view.getLayoutParams()));
        if (view.getLayoutParams() instanceof b) {
            return ((b) view.getLayoutParams()).bq;
        }
        return null;
    }

    public boolean isRtl() {
        return (getContext().getApplicationInfo().flags & 4194304) != 0 && 1 == getLayoutDirection();
    }

    public void loadLayoutDescription(int i) {
        if (i == 0) {
            this.mConstraintLayoutSpec = null;
            return;
        }
        try {
            this.mConstraintLayoutSpec = new androidx.constraintlayout.widget.c(getContext(), this, i);
        } catch (Resources.NotFoundException unused) {
            this.mConstraintLayoutSpec = null;
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        View content;
        int childCount = getChildCount();
        boolean zIsInEditMode = isInEditMode();
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt = getChildAt(i5);
            b bVar = (b) childAt.getLayoutParams();
            cd1 cd1Var = bVar.bq;
            if ((childAt.getVisibility() != 8 || bVar.bd || bVar.be || zIsInEditMode) && !bVar.bf) {
                int iS = cd1Var.s();
                int iT = cd1Var.t();
                int iR = cd1Var.r() + iS;
                int iL = cd1Var.l() + iT;
                childAt.layout(iS, iT, iR, iL);
                if ((childAt instanceof i) && (content = ((i) childAt).getContent()) != null) {
                    content.setVisibility(0);
                    content.layout(iS, iT, iR, iL);
                }
            }
        }
        int size = this.mConstraintHelpers.size();
        if (size > 0) {
            for (int i6 = 0; i6 < size; i6++) {
                this.mConstraintHelpers.get(i6).l();
            }
        }
    }

    @Override // android.view.View
    public void onMeasure(int i, int i2) {
        boolean z;
        String str;
        int iH;
        cd1 cd1Var;
        if (this.mOnMeasureWidthMeasureSpec == i) {
            int i3 = this.mOnMeasureHeightMeasureSpec;
        }
        int i4 = 0;
        if (!this.mDirtyHierarchy) {
            int childCount = getChildCount();
            int i5 = 0;
            while (true) {
                if (i5 >= childCount) {
                    break;
                }
                if (getChildAt(i5).isLayoutRequested()) {
                    this.mDirtyHierarchy = true;
                    break;
                }
                i5++;
            }
        }
        this.mOnMeasureWidthMeasureSpec = i;
        this.mOnMeasureHeightMeasureSpec = i2;
        this.mLayoutWidget.bw = isRtl();
        if (this.mDirtyHierarchy) {
            this.mDirtyHierarchy = false;
            int childCount2 = getChildCount();
            int i6 = 0;
            while (true) {
                if (i6 >= childCount2) {
                    z = false;
                    break;
                } else {
                    if (getChildAt(i6).isLayoutRequested()) {
                        z = true;
                        break;
                    }
                    i6++;
                }
            }
            if (z) {
                boolean zIsInEditMode = isInEditMode();
                int childCount3 = getChildCount();
                for (int i7 = 0; i7 < childCount3; i7++) {
                    cd1 viewWidget = getViewWidget(getChildAt(i7));
                    if (viewWidget != null) {
                        viewWidget.ad();
                    }
                }
                Object obj = null;
                if (zIsInEditMode) {
                    for (int i8 = 0; i8 < childCount3; i8++) {
                        View childAt = getChildAt(i8);
                        try {
                            String resourceName = getResources().getResourceName(childAt.getId());
                            setDesignInformation(0, resourceName, Integer.valueOf(childAt.getId()));
                            int iIndexOf = resourceName.indexOf(47);
                            if (iIndexOf != -1) {
                                resourceName = resourceName.substring(iIndexOf + 1);
                            }
                            int id = childAt.getId();
                            if (id == 0) {
                                cd1Var = this.mLayoutWidget;
                            } else {
                                View viewFindViewById = this.mChildrenByIds.get(id);
                                if (viewFindViewById == null && (viewFindViewById = findViewById(id)) != null && viewFindViewById != this && viewFindViewById.getParent() == this) {
                                    onViewAdded(viewFindViewById);
                                }
                                cd1Var = viewFindViewById == this ? this.mLayoutWidget : viewFindViewById == null ? null : ((b) viewFindViewById.getLayoutParams()).bq;
                            }
                            cd1Var.bj = resourceName;
                        } catch (Resources.NotFoundException unused) {
                        }
                    }
                }
                if (this.mConstraintSetId != -1) {
                    for (int i9 = 0; i9 < childCount3; i9++) {
                        View childAt2 = getChildAt(i9);
                        if (childAt2.getId() == this.mConstraintSetId && (childAt2 instanceof f)) {
                            this.mConstraintSet = ((f) childAt2).getConstraintSet();
                        }
                    }
                }
                e eVar = this.mConstraintSet;
                if (eVar != null) {
                    eVar.d(this);
                }
                this.mLayoutWidget.br.clear();
                int size = this.mConstraintHelpers.size();
                if (size > 0) {
                    int i10 = 0;
                    while (i10 < size) {
                        androidx.constraintlayout.widget.b bVar = this.mConstraintHelpers.get(i10);
                        HashMap map = bVar.j;
                        if (bVar.isInEditMode()) {
                            bVar.setIds(bVar.e);
                        }
                        d24 d24Var = bVar.d;
                        if (d24Var != null) {
                            d24Var.bs = i4;
                            Arrays.fill(d24Var.br, obj);
                            for (int i11 = i4; i11 < bVar.b; i11++) {
                                int i12 = bVar.a[i11];
                                View viewById = getViewById(i12);
                                if (viewById == null && (iH = bVar.h(this, (str = (String) map.get(Integer.valueOf(i12))))) != 0) {
                                    bVar.a[i11] = iH;
                                    map.put(Integer.valueOf(iH), str);
                                    viewById = getViewById(iH);
                                }
                                View view = viewById;
                                if (view != null) {
                                    d24 d24Var2 = bVar.d;
                                    cd1 viewWidget2 = getViewWidget(view);
                                    d24Var2.getClass();
                                    if (viewWidget2 != d24Var2 && viewWidget2 != null) {
                                        int i13 = d24Var2.bs + 1;
                                        cd1[] cd1VarArr = d24Var2.br;
                                        if (i13 > cd1VarArr.length) {
                                            d24Var2.br = (cd1[]) Arrays.copyOf(cd1VarArr, cd1VarArr.length * 2);
                                        }
                                        cd1[] cd1VarArr2 = d24Var2.br;
                                        int i14 = d24Var2.bs;
                                        cd1VarArr2[i14] = viewWidget2;
                                        d24Var2.bs = i14 + 1;
                                    }
                                }
                            }
                            bVar.d.a();
                        }
                        i10++;
                        i4 = 0;
                        obj = null;
                    }
                }
                for (int i15 = 0; i15 < childCount3; i15++) {
                    View childAt3 = getChildAt(i15);
                    if (childAt3 instanceof i) {
                        i iVar = (i) childAt3;
                        if (iVar.a == -1 && !iVar.isInEditMode()) {
                            iVar.setVisibility(iVar.c);
                        }
                        View viewFindViewById2 = findViewById(iVar.a);
                        iVar.b = viewFindViewById2;
                        if (viewFindViewById2 != null) {
                            ((b) viewFindViewById2.getLayoutParams()).bf = true;
                            iVar.b.setVisibility(0);
                            iVar.setVisibility(0);
                        }
                    }
                }
                this.mTempMapIdToWidget.clear();
                this.mTempMapIdToWidget.put(0, this.mLayoutWidget);
                this.mTempMapIdToWidget.put(getId(), this.mLayoutWidget);
                for (int i16 = 0; i16 < childCount3; i16++) {
                    View childAt4 = getChildAt(i16);
                    this.mTempMapIdToWidget.put(childAt4.getId(), getViewWidget(childAt4));
                }
                for (int i17 = 0; i17 < childCount3; i17++) {
                    View childAt5 = getChildAt(i17);
                    cd1 viewWidget3 = getViewWidget(childAt5);
                    if (viewWidget3 != null) {
                        b bVar2 = (b) childAt5.getLayoutParams();
                        dd1 dd1Var = this.mLayoutWidget;
                        dd1Var.br.add(viewWidget3);
                        cd1 cd1Var2 = viewWidget3.av;
                        if (cd1Var2 != null) {
                            ((vpa) cd1Var2).br.remove(viewWidget3);
                            viewWidget3.ad();
                        }
                        viewWidget3.av = dd1Var;
                        applyConstraintsFromLayoutParams(zIsInEditMode, childAt5, viewWidget3, bVar2, this.mTempMapIdToWidget);
                    }
                }
            }
            if (z) {
                dd1 dd1Var2 = this.mLayoutWidget;
                dd1Var2.bs.c(dd1Var2);
            }
        }
        resolveSystem(this.mLayoutWidget, this.mOptimizationLevel, i, i2);
        int iR = this.mLayoutWidget.r();
        int iL = this.mLayoutWidget.l();
        dd1 dd1Var3 = this.mLayoutWidget;
        resolveMeasuredDimension(i, i2, iR, iL, dd1Var3.cg, dd1Var3.ch);
    }

    @Override // android.view.ViewGroup
    public void onViewAdded(View view) {
        super.onViewAdded(view);
        cd1 viewWidget = getViewWidget(view);
        if ((view instanceof h) && !(viewWidget instanceof xy3)) {
            b bVar = (b) view.getLayoutParams();
            xy3 xy3Var = new xy3();
            bVar.bq = xy3Var;
            bVar.bd = true;
            xy3Var.at(bVar.av);
        }
        if (view instanceof androidx.constraintlayout.widget.b) {
            androidx.constraintlayout.widget.b bVar2 = (androidx.constraintlayout.widget.b) view;
            bVar2.n();
            ((b) view.getLayoutParams()).be = true;
            if (!this.mConstraintHelpers.contains(bVar2)) {
                this.mConstraintHelpers.add(bVar2);
            }
        }
        this.mChildrenByIds.put(view.getId(), view);
        this.mDirtyHierarchy = true;
    }

    @Override // android.view.ViewGroup
    public void onViewRemoved(View view) {
        super.onViewRemoved(view);
        this.mChildrenByIds.remove(view.getId());
        cd1 viewWidget = getViewWidget(view);
        this.mLayoutWidget.br.remove(viewWidget);
        viewWidget.ad();
        this.mConstraintHelpers.remove(view);
        this.mDirtyHierarchy = true;
    }

    public void parseLayoutDescription(int i) {
        this.mConstraintLayoutSpec = new androidx.constraintlayout.widget.c(getContext(), this, i);
    }

    @Override // android.view.View, android.view.ViewParent
    public void requestLayout() {
        this.mDirtyHierarchy = true;
        this.mLastMeasureWidth = -1;
        this.mLastMeasureHeight = -1;
        this.mLastMeasureWidthSize = -1;
        this.mLastMeasureHeightSize = -1;
        this.mLastMeasureWidthMode = 0;
        this.mLastMeasureHeightMode = 0;
        super.requestLayout();
    }

    public void resolveMeasuredDimension(int i, int i2, int i3, int i4, boolean z, boolean z2) {
        c cVar = this.mMeasurer;
        int i5 = cVar.e;
        int iResolveSizeAndState = View.resolveSizeAndState(i3 + cVar.d, i, 0);
        int iResolveSizeAndState2 = View.resolveSizeAndState(i4 + i5, i2, 0) & 16777215;
        int iMin = Math.min(this.mMaxWidth, iResolveSizeAndState & 16777215);
        int iMin2 = Math.min(this.mMaxHeight, iResolveSizeAndState2);
        if (z) {
            iMin |= Http2Connection.OKHTTP_CLIENT_WINDOW_SIZE;
        }
        if (z2) {
            iMin2 |= Http2Connection.OKHTTP_CLIENT_WINDOW_SIZE;
        }
        setMeasuredDimension(iMin, iMin2);
        this.mLastMeasureWidth = iMin;
        this.mLastMeasureHeight = iMin2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:104:0x0210  */
    /* JADX WARN: Removed duplicated region for block: B:106:0x0214  */
    /* JADX WARN: Removed duplicated region for block: B:112:0x021d  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x00a0  */
    /* JADX WARN: Removed duplicated region for block: B:172:0x02c2  */
    /* JADX WARN: Removed duplicated region for block: B:175:0x02cc  */
    /* JADX WARN: Removed duplicated region for block: B:177:0x02d1  */
    /* JADX WARN: Removed duplicated region for block: B:19:0x00aa  */
    /* JADX WARN: Removed duplicated region for block: B:53:0x010a  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x0110  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x0121  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x0129 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:63:0x012b A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:68:0x0135  */
    /* JADX WARN: Type inference failed for: r0v2, types: [c52] */
    /* JADX WARN: Type inference failed for: r11v25 */
    /* JADX WARN: Type inference failed for: r11v26, types: [int] */
    /* JADX WARN: Type inference failed for: r11v32 */
    /* JADX WARN: Type inference failed for: r3v31, types: [d52] */
    /* JADX WARN: Type inference failed for: r5v23, types: [d52] */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void resolveSystem(dd1 dd1Var, int i, int i2, int i3) {
        boolean z;
        int i4;
        boolean z2;
        ArrayList arrayList;
        t80.b bVar;
        boolean z3;
        boolean zF;
        int i5;
        int i6;
        int size;
        sc1.b bVar2;
        sc1.b bVar3;
        int i7;
        int i8;
        t80.b bVar4;
        boolean z4;
        t80.b bVar5;
        int i9;
        int i10;
        int i11;
        int i12;
        z84 z84Var;
        iga igaVar;
        boolean z5;
        ?? r11;
        int i13;
        boolean zF2;
        vv5 vv5Var;
        int mode = View.MeasureSpec.getMode(i2);
        int size2 = View.MeasureSpec.getSize(i2);
        int mode2 = View.MeasureSpec.getMode(i3);
        int size3 = View.MeasureSpec.getSize(i3);
        int iMax = Math.max(0, getPaddingTop());
        int iMax2 = Math.max(0, getPaddingBottom());
        int i14 = iMax + iMax2;
        int paddingWidth = getPaddingWidth();
        c cVar = this.mMeasurer;
        cVar.b = iMax;
        cVar.c = iMax2;
        cVar.d = paddingWidth;
        cVar.e = i14;
        cVar.f = i2;
        cVar.g = i3;
        int iMax3 = Math.max(0, getPaddingStart());
        int iMax4 = Math.max(0, getPaddingEnd());
        if (iMax3 > 0 || iMax4 > 0) {
            if (!isRtl()) {
            }
            int i15 = size2 - paddingWidth;
            int i16 = size3 - i14;
            setSelfDimensionBehaviour(dd1Var, mode, i15, mode2, i16);
            dd1Var.bz = iMax4;
            ?? r0 = dd1Var.bt;
            dd1Var.ca = iMax;
            t80 t80Var = dd1Var.bs;
            dd1 dd1Var2 = t80Var.c;
            ArrayList arrayList2 = t80Var.a;
            t80.b bVar6 = dd1Var.bv;
            int size4 = dd1Var.br.size();
            int iR = dd1Var.r();
            int iL = dd1Var.l();
            boolean zB = rx6.b(i, 128);
            boolean z6 = false;
            z = !zB || rx6.b(i, 64);
            cd1.b bVar7 = cd1.b.c;
            boolean z7 = z;
            if (!z) {
                int i17 = 0;
                while (true) {
                    i4 = size4;
                    if (i17 >= size4) {
                        break;
                    }
                    cd1 cd1Var = (cd1) dd1Var.br.get(i17);
                    int i18 = i17;
                    cd1.b[] bVarArr = cd1Var.au;
                    boolean z8 = (bVarArr[0] == bVar7) && (bVarArr[1] == bVar7) && cd1Var.ay > 0.0f;
                    if ((cd1Var.y() && z8) || ((cd1Var.z() && z8) || (cd1Var instanceof oma) || cd1Var.y() || cd1Var.z())) {
                        break;
                    }
                    i17 = i18 + 1;
                    size4 = i4;
                }
                z2 = false;
                if (!z2 || (vv5Var = e95.r) == null) {
                    arrayList = arrayList2;
                    bVar = bVar6;
                } else {
                    arrayList = arrayList2;
                    bVar = bVar6;
                    vv5Var.a++;
                }
                z3 = z2 & ((mode == 1073741824 && mode2 == 1073741824) || zB);
                if (z3) {
                    int iMin = Math.min(dd1Var.ac[0], i15);
                    int iMin2 = Math.min(dd1Var.ac[1], i16);
                    if (mode != 1073741824 || dd1Var.r() == iMin) {
                        z5 = true;
                    } else {
                        dd1Var.ap(iMin);
                        z5 = true;
                        r0.b = true;
                    }
                    if (mode2 == 1073741824 && dd1Var.l() != iMin2) {
                        dd1Var.am(iMin2);
                        r0.b = z5;
                    }
                    if (mode == 1073741824 && mode2 == 1073741824) {
                        zF = r0.e(zB);
                        i13 = 1073741824;
                        i5 = 2;
                    } else {
                        dd1 dd1Var3 = r0.a;
                        if (r0.b) {
                            Iterator it = dd1Var3.br.iterator();
                            while (it.hasNext()) {
                                cd1 cd1Var2 = (cd1) it.next();
                                cd1Var2.i();
                                boolean z9 = z6;
                                cd1Var2.a = z9;
                                z84 z84Var2 = cd1Var2.d;
                                Iterator it2 = it;
                                z84Var2.e.j = z9;
                                z84Var2.g = z9;
                                z84Var2.n();
                                iga igaVar2 = cd1Var2.e;
                                igaVar2.e.j = z9;
                                igaVar2.g = z9;
                                igaVar2.m();
                                it = it2;
                                z6 = z9;
                            }
                            boolean z10 = z6;
                            dd1Var3.i();
                            dd1Var3.a = z10;
                            z84 z84Var3 = dd1Var3.d;
                            z84Var3.e.j = z10;
                            z84Var3.g = z10;
                            z84Var3.n();
                            iga igaVar3 = dd1Var3.e;
                            igaVar3.e.j = z10;
                            igaVar3.g = z10;
                            igaVar3.m();
                            r0.c();
                            r11 = z10;
                        } else {
                            r11 = 0;
                        }
                        r0.b(r0.d);
                        dd1Var3.ba = r11;
                        dd1Var3.bb = r11;
                        dd1Var3.d.h.d(r11);
                        dd1Var3.e.h.d(r11);
                        i13 = 1073741824;
                        if (mode == 1073741824) {
                            zF2 = r0.f(r11, zB);
                            i5 = 1;
                        } else {
                            zF2 = true;
                            i5 = 0;
                        }
                        if (mode2 == 1073741824) {
                            zF = r0.f(1, zB) & zF2;
                            i5++;
                        } else {
                            zF = zF2;
                        }
                    }
                    if (zF) {
                        dd1Var.aq(mode == i13, mode2 == i13);
                    }
                } else {
                    zF = false;
                    i5 = 0;
                }
                if (zF || i5 != 2) {
                    int i19 = dd1Var.cf;
                    if (i4 > 0) {
                        boolean zAw = dd1Var.aw(64);
                        t80.b bVar8 = dd1Var.bv;
                        int i20 = 0;
                        for (int size5 = dd1Var.br.size(); i20 < size5; size5 = i12) {
                            cd1 cd1Var3 = (cd1) dd1Var.br.get(i20);
                            if ((cd1Var3 instanceof xy3) || (cd1Var3 instanceof o60) || cd1Var3.ag || (zAw && (z84Var = cd1Var3.d) != null && (igaVar = cd1Var3.e) != null && z84Var.e.j && igaVar.e.j)) {
                                i12 = size5;
                            } else {
                                cd1.b bVarK = cd1Var3.k(0);
                                cd1.b bVarK2 = cd1Var3.k(1);
                                i12 = size5;
                                boolean z11 = bVarK == bVar7 && cd1Var3.r != 1 && bVarK2 == bVar7 && cd1Var3.s != 1;
                                if (!z11 && dd1Var.aw(1) && !(cd1Var3 instanceof oma)) {
                                    if (bVarK == bVar7 && cd1Var3.r == 0 && bVarK2 != bVar7 && !cd1Var3.y()) {
                                        z11 = true;
                                    }
                                    if (bVarK2 == bVar7 && cd1Var3.s == 0 && bVarK != bVar7 && !cd1Var3.y()) {
                                        z11 = true;
                                    }
                                    if ((bVarK == bVar7 || bVarK2 == bVar7) && cd1Var3.ay > 0.0f) {
                                        z11 = true;
                                    }
                                }
                                if (!z11) {
                                    t80Var.a(0, bVar8, cd1Var3);
                                }
                                i20++;
                            }
                            i20++;
                        }
                        i6 = 0;
                        bVar8.a();
                    } else {
                        i6 = 0;
                    }
                    t80Var.c(dd1Var);
                    size = arrayList.size();
                    if (i4 > 0) {
                        t80Var.b(dd1Var, i6, iR, iL);
                    }
                    if (size > 0) {
                        cd1.b[] bVarArr2 = dd1Var.au;
                        cd1.b bVar9 = bVarArr2[i6];
                        cd1.b bVar10 = cd1.b.b;
                        int i21 = bVar9 == bVar10 ? 1 : i6;
                        int i22 = bVarArr2[1] == bVar10 ? 1 : i6;
                        int iMax5 = Math.max(dd1Var.r(), dd1Var2.bd);
                        int iMax6 = Math.max(dd1Var.l(), dd1Var2.be);
                        int i23 = i6;
                        int i24 = i23;
                        boolean z12 = z3;
                        while (true) {
                            bVar2 = sc1.b.d;
                            bVar3 = sc1.b.c;
                            if (i24 >= size) {
                                break;
                            }
                            ArrayList arrayList3 = arrayList;
                            int i25 = i22;
                            cd1 cd1Var4 = (cd1) arrayList3.get(i24);
                            int i26 = i21;
                            if (cd1Var4 instanceof oma) {
                                int iR2 = cd1Var4.r();
                                z4 = z12;
                                int iL2 = cd1Var4.l();
                                int i27 = i23;
                                bVar5 = bVar;
                                i9 = i24;
                                int i28 = i27 | (t80Var.a(1, bVar5, cd1Var4) ? 1 : 0);
                                int iR3 = cd1Var4.r();
                                i10 = i19;
                                int iL3 = cd1Var4.l();
                                if (iR3 != iR2) {
                                    cd1Var4.ap(iR3);
                                    if (i26 != 0 && cd1Var4.s() + cd1Var4.aw > iMax5) {
                                        iMax5 = Math.max(iMax5, cd1Var4.j(bVar3).e() + cd1Var4.s() + cd1Var4.aw);
                                    }
                                    i28 = 1;
                                }
                                if (iL3 != iL2) {
                                    cd1Var4.am(iL3);
                                    if (i25 != 0 && cd1Var4.t() + cd1Var4.ax > iMax6) {
                                        iMax6 = Math.max(iMax6, cd1Var4.j(bVar2).e() + cd1Var4.t() + cd1Var4.ax);
                                    }
                                    i28 = 1;
                                }
                                i11 = i28 | (((oma) cd1Var4).ca ? 1 : 0);
                            } else {
                                i10 = i19;
                                z4 = z12;
                                i11 = i23;
                                bVar5 = bVar;
                                i9 = i24;
                            }
                            i24 = i9 + 1;
                            i22 = i25;
                            bVar = bVar5;
                            arrayList = arrayList3;
                            i21 = i26;
                            z12 = z4;
                            i23 = i11;
                            i19 = i10;
                        }
                        int i29 = i19;
                        int i30 = i22;
                        int i31 = i21;
                        boolean z13 = z12;
                        ArrayList arrayList4 = arrayList;
                        int i32 = i23;
                        t80.b bVar11 = bVar;
                        int i33 = 0;
                        while (i33 < 2) {
                            int i34 = i32;
                            int i35 = 0;
                            while (i35 < size) {
                                cd1 cd1Var5 = (cd1) arrayList4.get(i35);
                                if ((!(cd1Var5 instanceof a24) || (cd1Var5 instanceof oma)) && !(cd1Var5 instanceof xy3)) {
                                    i7 = size;
                                    if (cd1Var5.bi != 8 && ((!z13 || !cd1Var5.d.e.j || !cd1Var5.e.e.j) && !(cd1Var5 instanceof oma))) {
                                        int iR4 = cd1Var5.r();
                                        int iL4 = cd1Var5.l();
                                        int i36 = i34;
                                        int i37 = cd1Var5.bc;
                                        i8 = i35;
                                        int i38 = i36 | (t80Var.a(i33 == 1 ? 2 : 1, bVar11, cd1Var5) ? 1 : 0);
                                        int iR5 = cd1Var5.r();
                                        bVar4 = bVar11;
                                        int iL5 = cd1Var5.l();
                                        if (iR5 != iR4) {
                                            cd1Var5.ap(iR5);
                                            if (i31 != 0 && cd1Var5.s() + cd1Var5.aw > iMax5) {
                                                iMax5 = Math.max(iMax5, cd1Var5.j(bVar3).e() + cd1Var5.s() + cd1Var5.aw);
                                            }
                                            i38 = 1;
                                        }
                                        if (iL5 != iL4) {
                                            cd1Var5.am(iL5);
                                            if (i30 != 0 && cd1Var5.t() + cd1Var5.ax > iMax6) {
                                                iMax6 = Math.max(iMax6, cd1Var5.j(bVar2).e() + cd1Var5.t() + cd1Var5.ax);
                                            }
                                            i38 = 1;
                                        }
                                        i34 = (!cd1Var5.ae || i37 == cd1Var5.bc) ? i38 : 1;
                                    }
                                    i35 = i8 + 1;
                                    size = i7;
                                    bVar11 = bVar4;
                                } else {
                                    i7 = size;
                                }
                                i8 = i35;
                                bVar4 = bVar11;
                                i35 = i8 + 1;
                                size = i7;
                                bVar11 = bVar4;
                            }
                            int i39 = size;
                            t80.b bVar12 = bVar11;
                            if (i34 == 0) {
                                break;
                            }
                            i33++;
                            t80Var.b(dd1Var, i33, iR, iL);
                            size = i39;
                            bVar11 = bVar12;
                            i32 = 0;
                        }
                        i19 = i29;
                    }
                    dd1Var.cf = i19;
                    e95.p = dd1Var.aw(512);
                }
                return;
            }
            i4 = size4;
            z2 = z7;
            if (z2) {
                arrayList = arrayList2;
                bVar = bVar6;
            }
            z3 = z2 & ((mode == 1073741824 && mode2 == 1073741824) || zB);
            if (z3) {
            }
            if (zF) {
            }
            int i192 = dd1Var.cf;
            if (i4 > 0) {
            }
            t80Var.c(dd1Var);
            size = arrayList.size();
            if (i4 > 0) {
            }
            if (size > 0) {
            }
            dd1Var.cf = i192;
            e95.p = dd1Var.aw(512);
        }
        iMax3 = Math.max(0, getPaddingLeft());
        iMax4 = iMax3;
        int i152 = size2 - paddingWidth;
        int i162 = size3 - i14;
        setSelfDimensionBehaviour(dd1Var, mode, i152, mode2, i162);
        dd1Var.bz = iMax4;
        ?? r02 = dd1Var.bt;
        dd1Var.ca = iMax;
        t80 t80Var2 = dd1Var.bs;
        dd1 dd1Var22 = t80Var2.c;
        ArrayList arrayList22 = t80Var2.a;
        t80.b bVar62 = dd1Var.bv;
        int size42 = dd1Var.br.size();
        int iR6 = dd1Var.r();
        int iL6 = dd1Var.l();
        boolean zB2 = rx6.b(i, 128);
        boolean z62 = false;
        if (zB2) {
        }
        cd1.b bVar72 = cd1.b.c;
        boolean z72 = z;
        if (!z) {
        }
        z2 = z72;
        if (z2) {
        }
        z3 = z2 & ((mode == 1073741824 && mode2 == 1073741824) || zB2);
        if (z3) {
        }
        if (zF) {
        }
        int i1922 = dd1Var.cf;
        if (i4 > 0) {
        }
        t80Var2.c(dd1Var);
        size = arrayList.size();
        if (i4 > 0) {
        }
        if (size > 0) {
        }
        dd1Var.cf = i1922;
        e95.p = dd1Var.aw(512);
    }

    public void setConstraintSet(e eVar) {
        this.mConstraintSet = eVar;
    }

    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 strSubstring = (String) obj;
            int iIndexOf = strSubstring.indexOf(DomExceptionUtils.SEPARATOR);
            if (iIndexOf != -1) {
                strSubstring = strSubstring.substring(iIndexOf + 1);
            }
            this.mDesignIds.put(strSubstring, (Integer) obj2);
        }
    }

    @Override // android.view.View
    public void setId(int i) {
        this.mChildrenByIds.remove(getId());
        super.setId(i);
        this.mChildrenByIds.put(getId(), this);
    }

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

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

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

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

    public void setOnConstraintsChanged(fd1 fd1Var) {
        this.mConstraintsChangedListener = fd1Var;
    }

    public void setOptimizationLevel(int i) {
        this.mOptimizationLevel = i;
        dd1 dd1Var = this.mLayoutWidget;
        dd1Var.cf = i;
        e95.p = dd1Var.aw(512);
    }

    /* JADX WARN: Removed duplicated region for block: B:16:0x003c  */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0055  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0064  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x006a  */
    /* JADX WARN: Removed duplicated region for block: B:32:0x0093  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x0096  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x009d  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x00a0  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void setSelfDimensionBehaviour(dd1 dd1Var, int i, int i2, int i3, int i4) {
        cd1.b bVar;
        int i5;
        int i6;
        c cVar = this.mMeasurer;
        int i7 = cVar.e;
        int i8 = cVar.d;
        int childCount = getChildCount();
        cd1.b bVar2 = cd1.b.b;
        cd1.b bVar3 = cd1.b.a;
        if (i != Integer.MIN_VALUE) {
            if (i != 0) {
                if (i == 1073741824) {
                    i2 = Math.min(this.mMaxWidth - i8, i2);
                    bVar = bVar3;
                    if (i3 != Integer.MIN_VALUE) {
                        if (i3 == 0) {
                            i4 = childCount == 0 ? Math.max(0, this.mMinHeight) : 0;
                        } else if (i3 != 1073741824) {
                            bVar2 = bVar3;
                        } else {
                            i4 = Math.min(this.mMaxHeight - i7, i4);
                            bVar2 = bVar3;
                        }
                    } else if (childCount == 0) {
                        i4 = Math.max(0, this.mMinHeight);
                    }
                    if (i2 != dd1Var.r() || i4 != dd1Var.l()) {
                        dd1Var.bt.c = true;
                    }
                    dd1Var.ba = 0;
                    dd1Var.bb = 0;
                    int i9 = this.mMaxWidth - i8;
                    int[] iArr = dd1Var.ac;
                    iArr[0] = i9;
                    iArr[1] = this.mMaxHeight - i7;
                    dd1Var.bd = 0;
                    dd1Var.be = 0;
                    dd1Var.an(bVar);
                    dd1Var.ap(i2);
                    dd1Var.ao(bVar2);
                    dd1Var.am(i4);
                    i5 = this.mMinWidth - i8;
                    if (i5 < 0) {
                        dd1Var.bd = 0;
                    } else {
                        dd1Var.bd = i5;
                    }
                    i6 = this.mMinHeight - i7;
                    if (i6 < 0) {
                        dd1Var.be = 0;
                        return;
                    } else {
                        dd1Var.be = i6;
                        return;
                    }
                }
                bVar = bVar3;
            } else if (childCount == 0) {
                i2 = Math.max(0, this.mMinWidth);
            } else {
                bVar = bVar2;
            }
            i2 = 0;
            if (i3 != Integer.MIN_VALUE) {
            }
            if (i2 != dd1Var.r()) {
                dd1Var.bt.c = true;
            }
            dd1Var.ba = 0;
            dd1Var.bb = 0;
            int i92 = this.mMaxWidth - i8;
            int[] iArr2 = dd1Var.ac;
            iArr2[0] = i92;
            iArr2[1] = this.mMaxHeight - i7;
            dd1Var.bd = 0;
            dd1Var.be = 0;
            dd1Var.an(bVar);
            dd1Var.ap(i2);
            dd1Var.ao(bVar2);
            dd1Var.am(i4);
            i5 = this.mMinWidth - i8;
            if (i5 < 0) {
            }
            i6 = this.mMinHeight - i7;
            if (i6 < 0) {
            }
        } else if (childCount == 0) {
            i2 = Math.max(0, this.mMinWidth);
        }
        bVar = bVar2;
        if (i3 != Integer.MIN_VALUE) {
        }
        if (i2 != dd1Var.r()) {
        }
        dd1Var.ba = 0;
        dd1Var.bb = 0;
        int i922 = this.mMaxWidth - i8;
        int[] iArr22 = dd1Var.ac;
        iArr22[0] = i922;
        iArr22[1] = this.mMaxHeight - i7;
        dd1Var.bd = 0;
        dd1Var.be = 0;
        dd1Var.an(bVar);
        dd1Var.ap(i2);
        dd1Var.ao(bVar2);
        dd1Var.am(i4);
        i5 = this.mMinWidth - i8;
        if (i5 < 0) {
        }
        i6 = this.mMinHeight - i7;
        if (i6 < 0) {
        }
    }

    public void setState(int i, int i2, int i3) {
        androidx.constraintlayout.widget.c cVar = this.mConstraintLayoutSpec;
        if (cVar != null) {
            cVar.b(i2, i3, i);
        }
    }

    @Override // android.view.ViewGroup
    public boolean shouldDelayChildPressedState() {
        return false;
    }

    @Override // android.view.ViewGroup
    public b generateDefaultLayoutParams() {
        return new b();
    }

    @Override // android.view.ViewGroup
    public b generateLayoutParams(AttributeSet attributeSet) {
        return new b(getContext(), attributeSet);
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return new b(layoutParams);
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.mChildrenByIds = new SparseArray<>();
        this.mConstraintHelpers = new ArrayList<>(4);
        this.mLayoutWidget = new dd1();
        this.mMinWidth = 0;
        this.mMinHeight = 0;
        this.mMaxWidth = Integer.MAX_VALUE;
        this.mMaxHeight = Integer.MAX_VALUE;
        this.mDirtyHierarchy = true;
        this.mOptimizationLevel = TsExtractor.TS_STREAM_TYPE_AIT;
        this.mConstraintSet = null;
        this.mConstraintLayoutSpec = null;
        this.mConstraintSetId = -1;
        this.mDesignIds = new HashMap<>();
        this.mLastMeasureWidth = -1;
        this.mLastMeasureHeight = -1;
        this.mLastMeasureWidthSize = -1;
        this.mLastMeasureHeightSize = -1;
        this.mLastMeasureWidthMode = 0;
        this.mLastMeasureHeightMode = 0;
        this.mTempMapIdToWidget = new SparseArray<>();
        this.mMeasurer = new c(this);
        this.mOnMeasureWidthMeasureSpec = 0;
        this.mOnMeasureHeightMeasureSpec = 0;
        a(attributeSet, i);
    }

    public static class b extends ViewGroup.MarginLayoutParams {
        public int a;
        public int aa;
        public int ab;
        public final int ac;
        public final int ad;
        public float ae;
        public float af;
        public String ag;
        public float ah;
        public float ai;
        public int aj;
        public int ak;
        public int al;
        public int am;
        public int an;
        public int ao;
        public int ap;
        public int aq;
        public float ar;
        public float as;
        public int at;
        public int au;
        public int av;
        public boolean aw;
        public boolean ax;
        public String ay;
        public int az;
        public int b;
        public boolean ba;
        public boolean bb;
        public boolean bc;
        public boolean bd;
        public boolean be;
        public boolean bf;
        public int bg;
        public int bh;
        public int bi;
        public int bj;
        public int bk;
        public int bl;
        public float bm;
        public int bn;
        public int bo;
        public float bp;
        public cd1 bq;
        public float c;
        public final boolean d;
        public int e;
        public int f;
        public int g;
        public int h;
        public int i;
        public int j;
        public int k;
        public int l;
        public int m;
        public int n;
        public int o;
        public int p;
        public int q;
        public float r;
        public int s;
        public int t;
        public int u;
        public int v;
        public final int w;
        public int x;
        public final int y;
        public int z;

        public static class a {
            public static final SparseIntArray a;

            static {
                SparseIntArray sparseIntArray = new SparseIntArray();
                a = sparseIntArray;
                sparseIntArray.append(98, 64);
                sparseIntArray.append(75, 65);
                sparseIntArray.append(84, 8);
                sparseIntArray.append(85, 9);
                sparseIntArray.append(87, 10);
                sparseIntArray.append(88, 11);
                sparseIntArray.append(94, 12);
                sparseIntArray.append(93, 13);
                sparseIntArray.append(65, 14);
                sparseIntArray.append(64, 15);
                sparseIntArray.append(60, 16);
                sparseIntArray.append(62, 52);
                sparseIntArray.append(61, 53);
                sparseIntArray.append(66, 2);
                sparseIntArray.append(68, 3);
                sparseIntArray.append(67, 4);
                sparseIntArray.append(103, 49);
                sparseIntArray.append(104, 50);
                sparseIntArray.append(72, 5);
                sparseIntArray.append(73, 6);
                sparseIntArray.append(74, 7);
                sparseIntArray.append(55, 67);
                sparseIntArray.append(0, 1);
                sparseIntArray.append(89, 17);
                sparseIntArray.append(90, 18);
                sparseIntArray.append(71, 19);
                sparseIntArray.append(70, 20);
                sparseIntArray.append(108, 21);
                sparseIntArray.append(111, 22);
                sparseIntArray.append(109, 23);
                sparseIntArray.append(106, 24);
                sparseIntArray.append(110, 25);
                sparseIntArray.append(107, 26);
                sparseIntArray.append(105, 55);
                sparseIntArray.append(112, 54);
                sparseIntArray.append(80, 29);
                sparseIntArray.append(95, 30);
                sparseIntArray.append(69, 44);
                sparseIntArray.append(82, 45);
                sparseIntArray.append(97, 46);
                sparseIntArray.append(81, 47);
                sparseIntArray.append(96, 48);
                sparseIntArray.append(58, 27);
                sparseIntArray.append(57, 28);
                sparseIntArray.append(99, 31);
                sparseIntArray.append(76, 32);
                sparseIntArray.append(101, 33);
                sparseIntArray.append(100, 34);
                sparseIntArray.append(102, 35);
                sparseIntArray.append(78, 36);
                sparseIntArray.append(77, 37);
                sparseIntArray.append(79, 38);
                sparseIntArray.append(83, 39);
                sparseIntArray.append(92, 40);
                sparseIntArray.append(86, 41);
                sparseIntArray.append(63, 42);
                sparseIntArray.append(59, 43);
                sparseIntArray.append(91, 51);
                sparseIntArray.append(114, 66);
            }
        }

        public b(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            this.a = -1;
            this.b = -1;
            this.c = -1.0f;
            this.d = true;
            this.e = -1;
            this.f = -1;
            this.g = -1;
            this.h = -1;
            this.i = -1;
            this.j = -1;
            this.k = -1;
            this.l = -1;
            this.m = -1;
            this.n = -1;
            this.o = -1;
            this.p = -1;
            this.q = 0;
            this.r = 0.0f;
            this.s = -1;
            this.t = -1;
            this.u = -1;
            this.v = -1;
            this.w = Integer.MIN_VALUE;
            this.x = Integer.MIN_VALUE;
            this.y = Integer.MIN_VALUE;
            this.z = Integer.MIN_VALUE;
            this.aa = Integer.MIN_VALUE;
            this.ab = Integer.MIN_VALUE;
            this.ac = Integer.MIN_VALUE;
            this.ad = 0;
            this.ae = 0.5f;
            this.af = 0.5f;
            this.ag = null;
            this.ah = -1.0f;
            this.ai = -1.0f;
            this.aj = 0;
            this.ak = 0;
            this.al = 0;
            this.am = 0;
            this.an = 0;
            this.ao = 0;
            this.ap = 0;
            this.aq = 0;
            this.ar = 1.0f;
            this.as = 1.0f;
            this.at = -1;
            this.au = -1;
            this.av = -1;
            this.aw = false;
            this.ax = false;
            this.ay = null;
            this.az = 0;
            this.ba = true;
            this.bb = true;
            this.bc = false;
            this.bd = false;
            this.be = false;
            this.bf = false;
            this.bg = -1;
            this.bh = -1;
            this.bi = -1;
            this.bj = -1;
            this.bk = Integer.MIN_VALUE;
            this.bl = Integer.MIN_VALUE;
            this.bm = 0.5f;
            this.bq = new cd1();
            TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, j.m.b);
            int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                int index = typedArrayObtainStyledAttributes.getIndex(i);
                int i2 = a.a.get(index);
                switch (i2) {
                    case 1:
                        this.av = typedArrayObtainStyledAttributes.getInt(index, this.av);
                        break;
                    case 2:
                        int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, this.p);
                        this.p = resourceId;
                        if (resourceId == -1) {
                            this.p = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 3:
                        this.q = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.q);
                        break;
                    case 4:
                        float f = typedArrayObtainStyledAttributes.getFloat(index, this.r) % 360.0f;
                        this.r = f;
                        if (f < 0.0f) {
                            this.r = (360.0f - f) % 360.0f;
                        }
                        break;
                    case 5:
                        this.a = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.a);
                        break;
                    case 6:
                        this.b = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.b);
                        break;
                    case 7:
                        this.c = typedArrayObtainStyledAttributes.getFloat(index, this.c);
                        break;
                    case 8:
                        int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, this.e);
                        this.e = resourceId2;
                        if (resourceId2 == -1) {
                            this.e = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 9:
                        int resourceId3 = typedArrayObtainStyledAttributes.getResourceId(index, this.f);
                        this.f = resourceId3;
                        if (resourceId3 == -1) {
                            this.f = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 10:
                        int resourceId4 = typedArrayObtainStyledAttributes.getResourceId(index, this.g);
                        this.g = resourceId4;
                        if (resourceId4 == -1) {
                            this.g = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 11:
                        int resourceId5 = typedArrayObtainStyledAttributes.getResourceId(index, this.h);
                        this.h = resourceId5;
                        if (resourceId5 == -1) {
                            this.h = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 12:
                        int resourceId6 = typedArrayObtainStyledAttributes.getResourceId(index, this.i);
                        this.i = resourceId6;
                        if (resourceId6 == -1) {
                            this.i = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 13:
                        int resourceId7 = typedArrayObtainStyledAttributes.getResourceId(index, this.j);
                        this.j = resourceId7;
                        if (resourceId7 == -1) {
                            this.j = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 14:
                        int resourceId8 = typedArrayObtainStyledAttributes.getResourceId(index, this.k);
                        this.k = resourceId8;
                        if (resourceId8 == -1) {
                            this.k = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 15:
                        int resourceId9 = typedArrayObtainStyledAttributes.getResourceId(index, this.l);
                        this.l = resourceId9;
                        if (resourceId9 == -1) {
                            this.l = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 16:
                        int resourceId10 = typedArrayObtainStyledAttributes.getResourceId(index, this.m);
                        this.m = resourceId10;
                        if (resourceId10 == -1) {
                            this.m = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 17:
                        int resourceId11 = typedArrayObtainStyledAttributes.getResourceId(index, this.s);
                        this.s = resourceId11;
                        if (resourceId11 == -1) {
                            this.s = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 18:
                        int resourceId12 = typedArrayObtainStyledAttributes.getResourceId(index, this.t);
                        this.t = resourceId12;
                        if (resourceId12 == -1) {
                            this.t = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 19:
                        int resourceId13 = typedArrayObtainStyledAttributes.getResourceId(index, this.u);
                        this.u = resourceId13;
                        if (resourceId13 == -1) {
                            this.u = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 20:
                        int resourceId14 = typedArrayObtainStyledAttributes.getResourceId(index, this.v);
                        this.v = resourceId14;
                        if (resourceId14 == -1) {
                            this.v = typedArrayObtainStyledAttributes.getInt(index, -1);
                        }
                        break;
                    case 21:
                        this.w = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.w);
                        break;
                    case 22:
                        this.x = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.x);
                        break;
                    case 23:
                        this.y = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.y);
                        break;
                    case 24:
                        this.z = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.z);
                        break;
                    case 25:
                        this.aa = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.aa);
                        break;
                    case 26:
                        this.ab = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.ab);
                        break;
                    case 27:
                        this.aw = typedArrayObtainStyledAttributes.getBoolean(index, this.aw);
                        break;
                    case 28:
                        this.ax = typedArrayObtainStyledAttributes.getBoolean(index, this.ax);
                        break;
                    case 29:
                        this.ae = typedArrayObtainStyledAttributes.getFloat(index, this.ae);
                        break;
                    case 30:
                        this.af = typedArrayObtainStyledAttributes.getFloat(index, this.af);
                        break;
                    case 31:
                        int i3 = typedArrayObtainStyledAttributes.getInt(index, 0);
                        this.al = i3;
                        if (i3 == 1) {
                            Log.e(ConstraintLayout.TAG, "layout_constraintWidth_default=\"wrap\" is deprecated.\nUse layout_width=\"WRAP_CONTENT\" and layout_constrainedWidth=\"true\" instead.");
                        }
                        break;
                    case 32:
                        int i4 = typedArrayObtainStyledAttributes.getInt(index, 0);
                        this.am = i4;
                        if (i4 == 1) {
                            Log.e(ConstraintLayout.TAG, "layout_constraintHeight_default=\"wrap\" is deprecated.\nUse layout_height=\"WRAP_CONTENT\" and layout_constrainedHeight=\"true\" instead.");
                        }
                        break;
                    case 33:
                        try {
                            this.an = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.an);
                        } catch (Exception unused) {
                            if (typedArrayObtainStyledAttributes.getInt(index, this.an) == -2) {
                                this.an = -2;
                            }
                        }
                        break;
                    case 34:
                        try {
                            this.ap = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.ap);
                        } catch (Exception unused2) {
                            if (typedArrayObtainStyledAttributes.getInt(index, this.ap) == -2) {
                                this.ap = -2;
                            }
                        }
                        break;
                    case 35:
                        this.ar = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, this.ar));
                        this.al = 2;
                        break;
                    case TsExtractor.TS_STREAM_TYPE_H265 /* 36 */:
                        try {
                            this.ao = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.ao);
                        } catch (Exception unused3) {
                            if (typedArrayObtainStyledAttributes.getInt(index, this.ao) == -2) {
                                this.ao = -2;
                            }
                        }
                        break;
                    case 37:
                        try {
                            this.aq = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.aq);
                        } catch (Exception unused4) {
                            if (typedArrayObtainStyledAttributes.getInt(index, this.aq) == -2) {
                                this.aq = -2;
                            }
                        }
                        break;
                    case FlacConstants.STREAM_INFO_BLOCK_SIZE /* 38 */:
                        this.as = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, this.as));
                        this.am = 2;
                        break;
                    default:
                        switch (i2) {
                            case 44:
                                e.n(this, typedArrayObtainStyledAttributes.getString(index));
                                break;
                            case TsExtractor.TS_STREAM_TYPE_MHAS /* 45 */:
                                this.ah = typedArrayObtainStyledAttributes.getFloat(index, this.ah);
                                break;
                            case 46:
                                this.ai = typedArrayObtainStyledAttributes.getFloat(index, this.ai);
                                break;
                            case 47:
                                this.aj = typedArrayObtainStyledAttributes.getInt(index, 0);
                                break;
                            case NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED /* 48 */:
                                this.ak = typedArrayObtainStyledAttributes.getInt(index, 0);
                                break;
                            case 49:
                                this.at = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.at);
                                break;
                            case 50:
                                this.au = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.au);
                                break;
                            case 51:
                                this.ay = typedArrayObtainStyledAttributes.getString(index);
                                break;
                            case 52:
                                int resourceId15 = typedArrayObtainStyledAttributes.getResourceId(index, this.n);
                                this.n = resourceId15;
                                if (resourceId15 == -1) {
                                    this.n = typedArrayObtainStyledAttributes.getInt(index, -1);
                                }
                                break;
                            case 53:
                                int resourceId16 = typedArrayObtainStyledAttributes.getResourceId(index, this.o);
                                this.o = resourceId16;
                                if (resourceId16 == -1) {
                                    this.o = typedArrayObtainStyledAttributes.getInt(index, -1);
                                }
                                break;
                            case 54:
                                this.ad = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.ad);
                                break;
                            case 55:
                                this.ac = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, this.ac);
                                break;
                            default:
                                switch (i2) {
                                    case 64:
                                        e.m(this, typedArrayObtainStyledAttributes, index, 0);
                                        break;
                                    case RegisterRequest.U2F_V1_CHALLENGE_BYTE_LENGTH /* 65 */:
                                        e.m(this, typedArrayObtainStyledAttributes, index, 1);
                                        break;
                                    case 66:
                                        this.az = typedArrayObtainStyledAttributes.getInt(index, this.az);
                                        break;
                                    case MdtaMetadataEntry.TYPE_INDICATOR_INT32 /* 67 */:
                                        this.d = typedArrayObtainStyledAttributes.getBoolean(index, this.d);
                                        break;
                                }
                                break;
                        }
                        break;
                }
            }
            typedArrayObtainStyledAttributes.recycle();
            a();
        }

        public final void a() {
            this.bd = false;
            this.ba = true;
            this.bb = true;
            int i = ((ViewGroup.MarginLayoutParams) this).width;
            if (i == -2 && this.aw) {
                this.ba = false;
                if (this.al == 0) {
                    this.al = 1;
                }
            }
            int i2 = ((ViewGroup.MarginLayoutParams) this).height;
            if (i2 == -2 && this.ax) {
                this.bb = false;
                if (this.am == 0) {
                    this.am = 1;
                }
            }
            if (i == 0 || i == -1) {
                this.ba = false;
                if (i == 0 && this.al == 1) {
                    ((ViewGroup.MarginLayoutParams) this).width = -2;
                    this.aw = true;
                }
            }
            if (i2 == 0 || i2 == -1) {
                this.bb = false;
                if (i2 == 0 && this.am == 1) {
                    ((ViewGroup.MarginLayoutParams) this).height = -2;
                    this.ax = true;
                }
            }
            if (this.c == -1.0f && this.a == -1 && this.b == -1) {
                return;
            }
            this.bd = true;
            this.ba = true;
            this.bb = true;
            if (!(this.bq instanceof xy3)) {
                this.bq = new xy3();
            }
            ((xy3) this.bq).at(this.av);
        }

        /* JADX WARN: Removed duplicated region for block: B:17:0x004a  */
        /* JADX WARN: Removed duplicated region for block: B:20:0x0051  */
        /* JADX WARN: Removed duplicated region for block: B:23:0x0058  */
        /* JADX WARN: Removed duplicated region for block: B:26:0x005e  */
        /* JADX WARN: Removed duplicated region for block: B:29:0x0064  */
        /* JADX WARN: Removed duplicated region for block: B:38:0x007a  */
        /* JADX WARN: Removed duplicated region for block: B:39:0x0082  */
        @Override // android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.LayoutParams
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final void resolveLayoutDirection(int i) {
            int i2;
            int i3;
            int i4;
            int i5;
            int i6 = ((ViewGroup.MarginLayoutParams) this).leftMargin;
            int i7 = ((ViewGroup.MarginLayoutParams) this).rightMargin;
            super.resolveLayoutDirection(i);
            boolean z = false;
            boolean z2 = 1 == getLayoutDirection();
            this.bi = -1;
            this.bj = -1;
            this.bg = -1;
            this.bh = -1;
            this.bk = this.w;
            this.bl = this.y;
            float f = this.ae;
            this.bm = f;
            int i8 = this.a;
            this.bn = i8;
            int i9 = this.b;
            this.bo = i9;
            float f2 = this.c;
            this.bp = f2;
            if (z2) {
                int i10 = this.s;
                if (i10 != -1) {
                    this.bi = i10;
                } else {
                    int i11 = this.t;
                    if (i11 != -1) {
                        this.bj = i11;
                    }
                    i2 = this.u;
                    if (i2 != -1) {
                        this.bh = i2;
                        z = true;
                    }
                    i3 = this.v;
                    if (i3 != -1) {
                        this.bg = i3;
                        z = true;
                    }
                    i4 = this.aa;
                    if (i4 != Integer.MIN_VALUE) {
                        this.bl = i4;
                    }
                    i5 = this.ab;
                    if (i5 != Integer.MIN_VALUE) {
                        this.bk = i5;
                    }
                    if (z) {
                        this.bm = 1.0f - f;
                    }
                    if (this.bd && this.av == 1 && this.d) {
                        if (f2 == -1.0f) {
                            this.bp = 1.0f - f2;
                            this.bn = -1;
                            this.bo = -1;
                        } else if (i8 != -1) {
                            this.bo = i8;
                            this.bn = -1;
                            this.bp = -1.0f;
                        } else if (i9 != -1) {
                            this.bn = i9;
                            this.bo = -1;
                            this.bp = -1.0f;
                        }
                    }
                }
                z = true;
                i2 = this.u;
                if (i2 != -1) {
                }
                i3 = this.v;
                if (i3 != -1) {
                }
                i4 = this.aa;
                if (i4 != Integer.MIN_VALUE) {
                }
                i5 = this.ab;
                if (i5 != Integer.MIN_VALUE) {
                }
                if (z) {
                }
                if (this.bd) {
                    if (f2 == -1.0f) {
                    }
                }
            } else {
                int i12 = this.s;
                if (i12 != -1) {
                    this.bh = i12;
                }
                int i13 = this.t;
                if (i13 != -1) {
                    this.bg = i13;
                }
                int i14 = this.u;
                if (i14 != -1) {
                    this.bi = i14;
                }
                int i15 = this.v;
                if (i15 != -1) {
                    this.bj = i15;
                }
                int i16 = this.aa;
                if (i16 != Integer.MIN_VALUE) {
                    this.bk = i16;
                }
                int i17 = this.ab;
                if (i17 != Integer.MIN_VALUE) {
                    this.bl = i17;
                }
            }
            if (this.u == -1 && this.v == -1 && this.t == -1 && this.s == -1) {
                int i18 = this.g;
                if (i18 != -1) {
                    this.bi = i18;
                    if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0 && i7 > 0) {
                        ((ViewGroup.MarginLayoutParams) this).rightMargin = i7;
                    }
                } else {
                    int i19 = this.h;
                    if (i19 != -1) {
                        this.bj = i19;
                        if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0 && i7 > 0) {
                            ((ViewGroup.MarginLayoutParams) this).rightMargin = i7;
                        }
                    }
                }
                int i20 = this.e;
                if (i20 != -1) {
                    this.bg = i20;
                    if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i6 <= 0) {
                        return;
                    }
                    ((ViewGroup.MarginLayoutParams) this).leftMargin = i6;
                    return;
                }
                int i21 = this.f;
                if (i21 != -1) {
                    this.bh = i21;
                    if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i6 <= 0) {
                        return;
                    }
                    ((ViewGroup.MarginLayoutParams) this).leftMargin = i6;
                }
            }
        }

        public b() {
            super(-2, -2);
            this.a = -1;
            this.b = -1;
            this.c = -1.0f;
            this.d = true;
            this.e = -1;
            this.f = -1;
            this.g = -1;
            this.h = -1;
            this.i = -1;
            this.j = -1;
            this.k = -1;
            this.l = -1;
            this.m = -1;
            this.n = -1;
            this.o = -1;
            this.p = -1;
            this.q = 0;
            this.r = 0.0f;
            this.s = -1;
            this.t = -1;
            this.u = -1;
            this.v = -1;
            this.w = Integer.MIN_VALUE;
            this.x = Integer.MIN_VALUE;
            this.y = Integer.MIN_VALUE;
            this.z = Integer.MIN_VALUE;
            this.aa = Integer.MIN_VALUE;
            this.ab = Integer.MIN_VALUE;
            this.ac = Integer.MIN_VALUE;
            this.ad = 0;
            this.ae = 0.5f;
            this.af = 0.5f;
            this.ag = null;
            this.ah = -1.0f;
            this.ai = -1.0f;
            this.aj = 0;
            this.ak = 0;
            this.al = 0;
            this.am = 0;
            this.an = 0;
            this.ao = 0;
            this.ap = 0;
            this.aq = 0;
            this.ar = 1.0f;
            this.as = 1.0f;
            this.at = -1;
            this.au = -1;
            this.av = -1;
            this.aw = false;
            this.ax = false;
            this.ay = null;
            this.az = 0;
            this.ba = true;
            this.bb = true;
            this.bc = false;
            this.bd = false;
            this.be = false;
            this.bf = false;
            this.bg = -1;
            this.bh = -1;
            this.bi = -1;
            this.bj = -1;
            this.bk = Integer.MIN_VALUE;
            this.bl = Integer.MIN_VALUE;
            this.bm = 0.5f;
            this.bq = new cd1();
        }

        public b(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.a = -1;
            this.b = -1;
            this.c = -1.0f;
            this.d = true;
            this.e = -1;
            this.f = -1;
            this.g = -1;
            this.h = -1;
            this.i = -1;
            this.j = -1;
            this.k = -1;
            this.l = -1;
            this.m = -1;
            this.n = -1;
            this.o = -1;
            this.p = -1;
            this.q = 0;
            this.r = 0.0f;
            this.s = -1;
            this.t = -1;
            this.u = -1;
            this.v = -1;
            this.w = Integer.MIN_VALUE;
            this.x = Integer.MIN_VALUE;
            this.y = Integer.MIN_VALUE;
            this.z = Integer.MIN_VALUE;
            this.aa = Integer.MIN_VALUE;
            this.ab = Integer.MIN_VALUE;
            this.ac = Integer.MIN_VALUE;
            this.ad = 0;
            this.ae = 0.5f;
            this.af = 0.5f;
            this.ag = null;
            this.ah = -1.0f;
            this.ai = -1.0f;
            this.aj = 0;
            this.ak = 0;
            this.al = 0;
            this.am = 0;
            this.an = 0;
            this.ao = 0;
            this.ap = 0;
            this.aq = 0;
            this.ar = 1.0f;
            this.as = 1.0f;
            this.at = -1;
            this.au = -1;
            this.av = -1;
            this.aw = false;
            this.ax = false;
            this.ay = null;
            this.az = 0;
            this.ba = true;
            this.bb = true;
            this.bc = false;
            this.bd = false;
            this.be = false;
            this.bf = false;
            this.bg = -1;
            this.bh = -1;
            this.bi = -1;
            this.bj = -1;
            this.bk = Integer.MIN_VALUE;
            this.bl = Integer.MIN_VALUE;
            this.bm = 0.5f;
            this.bq = new cd1();
        }
    }
}
