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.os.Build;
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 java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import p049q.C1547d;
import p049q.C1550e;
import p049q.C1553f;
import p049q.C1554g;
import p049q.C1558j;
import p049q.C1559k;
import p052r.C1571b;
import p061u.AbstractC1741f;
import p061u.AbstractC1745j;
import p061u.C1736c;
import p061u.C1743h;
import p061u.C1744i;

/* loaded from: classes.dex */
public class ConstraintLayout extends ViewGroup {

    /* renamed from: A */
    public static C1744i f718A;

    /* renamed from: d */
    public SparseArray<View> f719d;

    /* renamed from: e */
    public ArrayList<AbstractC0191c> f720e;

    /* renamed from: f */
    public C1553f f721f;

    /* renamed from: g */
    public int f722g;

    /* renamed from: h */
    public int f723h;

    /* renamed from: i */
    public int f724i;

    /* renamed from: j */
    public int f725j;

    /* renamed from: k */
    public boolean f726k;

    /* renamed from: l */
    public int f727l;

    /* renamed from: m */
    public C0192d f728m;

    /* renamed from: n */
    public C1736c f729n;

    /* renamed from: o */
    public int f730o;

    /* renamed from: p */
    public HashMap<String, Integer> f731p;

    /* renamed from: q */
    public int f732q;

    /* renamed from: r */
    public int f733r;

    /* renamed from: s */
    public int f734s;

    /* renamed from: t */
    public int f735t;

    /* renamed from: u */
    public int f736u;

    /* renamed from: v */
    public int f737v;

    /* renamed from: w */
    public SparseArray<C1550e> f738w;

    /* renamed from: x */
    public C0186c f739x;

    /* renamed from: y */
    public int f740y;

    /* renamed from: z */
    public int f741z;

    /* renamed from: androidx.constraintlayout.widget.ConstraintLayout$a */
    /* loaded from: classes.dex */
    public static /* synthetic */ class C0183a {

        /* renamed from: a */
        public static final /* synthetic */ int[] f742a;

        static {
            int[] iArr = new int[C1550e.EnumC1552b.values().length];
            f742a = iArr;
            try {
                iArr[C1550e.EnumC1552b.FIXED.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                f742a[C1550e.EnumC1552b.WRAP_CONTENT.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                f742a[C1550e.EnumC1552b.MATCH_PARENT.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                f742a[C1550e.EnumC1552b.MATCH_CONSTRAINT.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
        }
    }

    /* renamed from: androidx.constraintlayout.widget.ConstraintLayout$b */
    /* loaded from: classes.dex */
    public static class C0184b extends ViewGroup.MarginLayoutParams {

        /* renamed from: A */
        public int f743A;

        /* renamed from: B */
        public int f744B;

        /* renamed from: C */
        public int f745C;

        /* renamed from: D */
        public int f746D;

        /* renamed from: E */
        public boolean f747E;

        /* renamed from: F */
        public boolean f748F;

        /* renamed from: G */
        public float f749G;

        /* renamed from: H */
        public float f750H;

        /* renamed from: I */
        public String f751I;

        /* renamed from: J */
        public float f752J;

        /* renamed from: K */
        public int f753K;

        /* renamed from: L */
        public float f754L;

        /* renamed from: M */
        public float f755M;

        /* renamed from: N */
        public int f756N;

        /* renamed from: O */
        public int f757O;

        /* renamed from: P */
        public int f758P;

        /* renamed from: Q */
        public int f759Q;

        /* renamed from: R */
        public int f760R;

        /* renamed from: S */
        public int f761S;

        /* renamed from: T */
        public int f762T;

        /* renamed from: U */
        public int f763U;

        /* renamed from: V */
        public float f764V;

        /* renamed from: W */
        public float f765W;

        /* renamed from: X */
        public int f766X;

        /* renamed from: Y */
        public int f767Y;

        /* renamed from: Z */
        public int f768Z;

        /* renamed from: a */
        public int f769a;

        /* renamed from: a0 */
        public boolean f770a0;

        /* renamed from: b */
        public int f771b;

        /* renamed from: b0 */
        public boolean f772b0;

        /* renamed from: c */
        public float f773c;

        /* renamed from: c0 */
        public String f774c0;

        /* renamed from: d */
        public boolean f775d;

        /* renamed from: d0 */
        public int f776d0;

        /* renamed from: e */
        public int f777e;

        /* renamed from: e0 */
        public boolean f778e0;

        /* renamed from: f */
        public int f779f;

        /* renamed from: f0 */
        public boolean f780f0;

        /* renamed from: g */
        public int f781g;

        /* renamed from: g0 */
        public boolean f782g0;

        /* renamed from: h */
        public int f783h;

        /* renamed from: h0 */
        public boolean f784h0;

        /* renamed from: i */
        public int f785i;

        /* renamed from: i0 */
        public boolean f786i0;

        /* renamed from: j */
        public int f787j;

        /* renamed from: j0 */
        public boolean f788j0;

        /* renamed from: k */
        public int f789k;

        /* renamed from: k0 */
        public boolean f790k0;

        /* renamed from: l */
        public int f791l;

        /* renamed from: l0 */
        public int f792l0;

        /* renamed from: m */
        public int f793m;

        /* renamed from: m0 */
        public int f794m0;

        /* renamed from: n */
        public int f795n;

        /* renamed from: n0 */
        public int f796n0;

        /* renamed from: o */
        public int f797o;

        /* renamed from: o0 */
        public int f798o0;

        /* renamed from: p */
        public int f799p;

        /* renamed from: p0 */
        public int f800p0;

        /* renamed from: q */
        public int f801q;

        /* renamed from: q0 */
        public int f802q0;

        /* renamed from: r */
        public float f803r;

        /* renamed from: r0 */
        public float f804r0;

        /* renamed from: s */
        public int f805s;

        /* renamed from: s0 */
        public int f806s0;

        /* renamed from: t */
        public int f807t;

        /* renamed from: t0 */
        public int f808t0;

        /* renamed from: u */
        public int f809u;

        /* renamed from: u0 */
        public float f810u0;

        /* renamed from: v */
        public int f811v;

        /* renamed from: v0 */
        public C1550e f812v0;

        /* renamed from: w */
        public int f813w;

        /* renamed from: w0 */
        public boolean f814w0;

        /* renamed from: x */
        public int f815x;

        /* renamed from: y */
        public int f816y;

        /* renamed from: z */
        public int f817z;

        /* renamed from: androidx.constraintlayout.widget.ConstraintLayout$b$a */
        /* loaded from: classes.dex */
        public static class C0185a {

            /* renamed from: a */
            public static final SparseIntArray f818a;

            static {
                SparseIntArray sparseIntArray = new SparseIntArray();
                f818a = sparseIntArray;
                sparseIntArray.append(C1743h.f4349s2, 64);
                sparseIntArray.append(C1743h.f4146V1, 65);
                sparseIntArray.append(C1743h.f4223e2, 8);
                sparseIntArray.append(C1743h.f4232f2, 9);
                sparseIntArray.append(C1743h.f4250h2, 10);
                sparseIntArray.append(C1743h.f4259i2, 11);
                sparseIntArray.append(C1743h.f4313o2, 12);
                sparseIntArray.append(C1743h.f4304n2, 13);
                sparseIntArray.append(C1743h.f4066L1, 14);
                sparseIntArray.append(C1743h.f4058K1, 15);
                sparseIntArray.append(C1743h.f4026G1, 16);
                sparseIntArray.append(C1743h.f4042I1, 52);
                sparseIntArray.append(C1743h.f4034H1, 53);
                sparseIntArray.append(C1743h.f4074M1, 2);
                sparseIntArray.append(C1743h.f4090O1, 3);
                sparseIntArray.append(C1743h.f4082N1, 4);
                sparseIntArray.append(C1743h.f4394x2, 49);
                sparseIntArray.append(C1743h.f4403y2, 50);
                sparseIntArray.append(C1743h.f4122S1, 5);
                sparseIntArray.append(C1743h.f4130T1, 6);
                sparseIntArray.append(C1743h.f4138U1, 7);
                sparseIntArray.append(C1743h.f3984B1, 67);
                sparseIntArray.append(C1743h.f4312o1, 1);
                sparseIntArray.append(C1743h.f4268j2, 17);
                sparseIntArray.append(C1743h.f4277k2, 18);
                sparseIntArray.append(C1743h.f4114R1, 19);
                sparseIntArray.append(C1743h.f4106Q1, 20);
                sparseIntArray.append(C1743h.f3994C2, 21);
                sparseIntArray.append(C1743h.f4019F2, 22);
                sparseIntArray.append(C1743h.f4003D2, 23);
                sparseIntArray.append(C1743h.f3976A2, 24);
                sparseIntArray.append(C1743h.f4011E2, 25);
                sparseIntArray.append(C1743h.f3985B2, 26);
                sparseIntArray.append(C1743h.f4412z2, 55);
                sparseIntArray.append(C1743h.f4027G2, 54);
                sparseIntArray.append(C1743h.f4187a2, 29);
                sparseIntArray.append(C1743h.f4322p2, 30);
                sparseIntArray.append(C1743h.f4098P1, 44);
                sparseIntArray.append(C1743h.f4205c2, 45);
                sparseIntArray.append(C1743h.f4340r2, 46);
                sparseIntArray.append(C1743h.f4196b2, 47);
                sparseIntArray.append(C1743h.f4331q2, 48);
                sparseIntArray.append(C1743h.f4010E1, 27);
                sparseIntArray.append(C1743h.f4002D1, 28);
                sparseIntArray.append(C1743h.f4358t2, 31);
                sparseIntArray.append(C1743h.f4154W1, 32);
                sparseIntArray.append(C1743h.f4376v2, 33);
                sparseIntArray.append(C1743h.f4367u2, 34);
                sparseIntArray.append(C1743h.f4385w2, 35);
                sparseIntArray.append(C1743h.f4170Y1, 36);
                sparseIntArray.append(C1743h.f4162X1, 37);
                sparseIntArray.append(C1743h.f4178Z1, 38);
                sparseIntArray.append(C1743h.f4214d2, 39);
                sparseIntArray.append(C1743h.f4295m2, 40);
                sparseIntArray.append(C1743h.f4241g2, 41);
                sparseIntArray.append(C1743h.f4050J1, 42);
                sparseIntArray.append(C1743h.f4018F1, 43);
                sparseIntArray.append(C1743h.f4286l2, 51);
                sparseIntArray.append(C1743h.f4043I2, 66);
            }
        }

        public C0184b(int i, int i2) {
            super(i, i2);
            this.f769a = -1;
            this.f771b = -1;
            this.f773c = -1.0f;
            this.f775d = true;
            this.f777e = -1;
            this.f779f = -1;
            this.f781g = -1;
            this.f783h = -1;
            this.f785i = -1;
            this.f787j = -1;
            this.f789k = -1;
            this.f791l = -1;
            this.f793m = -1;
            this.f795n = -1;
            this.f797o = -1;
            this.f799p = -1;
            this.f801q = 0;
            this.f803r = 0.0f;
            this.f805s = -1;
            this.f807t = -1;
            this.f809u = -1;
            this.f811v = -1;
            this.f813w = Integer.MIN_VALUE;
            this.f815x = Integer.MIN_VALUE;
            this.f816y = Integer.MIN_VALUE;
            this.f817z = Integer.MIN_VALUE;
            this.f743A = Integer.MIN_VALUE;
            this.f744B = Integer.MIN_VALUE;
            this.f745C = Integer.MIN_VALUE;
            this.f746D = 0;
            this.f747E = true;
            this.f748F = true;
            this.f749G = 0.5f;
            this.f750H = 0.5f;
            this.f751I = null;
            this.f752J = 0.0f;
            this.f753K = 1;
            this.f754L = -1.0f;
            this.f755M = -1.0f;
            this.f756N = 0;
            this.f757O = 0;
            this.f758P = 0;
            this.f759Q = 0;
            this.f760R = 0;
            this.f761S = 0;
            this.f762T = 0;
            this.f763U = 0;
            this.f764V = 1.0f;
            this.f765W = 1.0f;
            this.f766X = -1;
            this.f767Y = -1;
            this.f768Z = -1;
            this.f770a0 = false;
            this.f772b0 = false;
            this.f774c0 = null;
            this.f776d0 = 0;
            this.f778e0 = true;
            this.f780f0 = true;
            this.f782g0 = false;
            this.f784h0 = false;
            this.f786i0 = false;
            this.f788j0 = false;
            this.f790k0 = false;
            this.f792l0 = -1;
            this.f794m0 = -1;
            this.f796n0 = -1;
            this.f798o0 = -1;
            this.f800p0 = Integer.MIN_VALUE;
            this.f802q0 = Integer.MIN_VALUE;
            this.f804r0 = 0.5f;
            this.f812v0 = new C1550e();
            this.f814w0 = false;
        }

        public C0184b(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            String str;
            this.f769a = -1;
            this.f771b = -1;
            this.f773c = -1.0f;
            this.f775d = true;
            this.f777e = -1;
            this.f779f = -1;
            this.f781g = -1;
            this.f783h = -1;
            this.f785i = -1;
            this.f787j = -1;
            this.f789k = -1;
            this.f791l = -1;
            this.f793m = -1;
            this.f795n = -1;
            this.f797o = -1;
            this.f799p = -1;
            this.f801q = 0;
            this.f803r = 0.0f;
            this.f805s = -1;
            this.f807t = -1;
            this.f809u = -1;
            this.f811v = -1;
            this.f813w = Integer.MIN_VALUE;
            this.f815x = Integer.MIN_VALUE;
            this.f816y = Integer.MIN_VALUE;
            this.f817z = Integer.MIN_VALUE;
            this.f743A = Integer.MIN_VALUE;
            this.f744B = Integer.MIN_VALUE;
            this.f745C = Integer.MIN_VALUE;
            this.f746D = 0;
            this.f747E = true;
            this.f748F = true;
            this.f749G = 0.5f;
            this.f750H = 0.5f;
            this.f751I = null;
            this.f752J = 0.0f;
            this.f753K = 1;
            this.f754L = -1.0f;
            this.f755M = -1.0f;
            this.f756N = 0;
            this.f757O = 0;
            this.f758P = 0;
            this.f759Q = 0;
            this.f760R = 0;
            this.f761S = 0;
            this.f762T = 0;
            this.f763U = 0;
            this.f764V = 1.0f;
            this.f765W = 1.0f;
            this.f766X = -1;
            this.f767Y = -1;
            this.f768Z = -1;
            this.f770a0 = false;
            this.f772b0 = false;
            this.f774c0 = null;
            this.f776d0 = 0;
            this.f778e0 = true;
            this.f780f0 = true;
            this.f782g0 = false;
            this.f784h0 = false;
            this.f786i0 = false;
            this.f788j0 = false;
            this.f790k0 = false;
            this.f792l0 = -1;
            this.f794m0 = -1;
            this.f796n0 = -1;
            this.f798o0 = -1;
            this.f800p0 = Integer.MIN_VALUE;
            this.f802q0 = Integer.MIN_VALUE;
            this.f804r0 = 0.5f;
            this.f812v0 = new C1550e();
            this.f814w0 = false;
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C1743h.f4303n1);
            int indexCount = obtainStyledAttributes.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                int index = obtainStyledAttributes.getIndex(i);
                int i2 = C0185a.f818a.get(index);
                switch (i2) {
                    case 1:
                        this.f768Z = obtainStyledAttributes.getInt(index, this.f768Z);
                        continue;
                    case 2:
                        int resourceId = obtainStyledAttributes.getResourceId(index, this.f799p);
                        this.f799p = resourceId;
                        if (resourceId == -1) {
                            this.f799p = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 3:
                        this.f801q = obtainStyledAttributes.getDimensionPixelSize(index, this.f801q);
                        continue;
                    case 4:
                        float f = obtainStyledAttributes.getFloat(index, this.f803r) % 360.0f;
                        this.f803r = f;
                        if (f < 0.0f) {
                            this.f803r = (360.0f - f) % 360.0f;
                        } else {
                            continue;
                        }
                    case 5:
                        this.f769a = obtainStyledAttributes.getDimensionPixelOffset(index, this.f769a);
                        continue;
                    case 6:
                        this.f771b = obtainStyledAttributes.getDimensionPixelOffset(index, this.f771b);
                        continue;
                    case 7:
                        this.f773c = obtainStyledAttributes.getFloat(index, this.f773c);
                        continue;
                    case 8:
                        int resourceId2 = obtainStyledAttributes.getResourceId(index, this.f777e);
                        this.f777e = resourceId2;
                        if (resourceId2 == -1) {
                            this.f777e = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 9:
                        int resourceId3 = obtainStyledAttributes.getResourceId(index, this.f779f);
                        this.f779f = resourceId3;
                        if (resourceId3 == -1) {
                            this.f779f = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 10:
                        int resourceId4 = obtainStyledAttributes.getResourceId(index, this.f781g);
                        this.f781g = resourceId4;
                        if (resourceId4 == -1) {
                            this.f781g = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 11:
                        int resourceId5 = obtainStyledAttributes.getResourceId(index, this.f783h);
                        this.f783h = resourceId5;
                        if (resourceId5 == -1) {
                            this.f783h = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 12:
                        int resourceId6 = obtainStyledAttributes.getResourceId(index, this.f785i);
                        this.f785i = resourceId6;
                        if (resourceId6 == -1) {
                            this.f785i = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 13:
                        int resourceId7 = obtainStyledAttributes.getResourceId(index, this.f787j);
                        this.f787j = resourceId7;
                        if (resourceId7 == -1) {
                            this.f787j = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 14:
                        int resourceId8 = obtainStyledAttributes.getResourceId(index, this.f789k);
                        this.f789k = resourceId8;
                        if (resourceId8 == -1) {
                            this.f789k = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 15:
                        int resourceId9 = obtainStyledAttributes.getResourceId(index, this.f791l);
                        this.f791l = resourceId9;
                        if (resourceId9 == -1) {
                            this.f791l = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 16:
                        int resourceId10 = obtainStyledAttributes.getResourceId(index, this.f793m);
                        this.f793m = resourceId10;
                        if (resourceId10 == -1) {
                            this.f793m = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 17:
                        int resourceId11 = obtainStyledAttributes.getResourceId(index, this.f805s);
                        this.f805s = resourceId11;
                        if (resourceId11 == -1) {
                            this.f805s = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 18:
                        int resourceId12 = obtainStyledAttributes.getResourceId(index, this.f807t);
                        this.f807t = resourceId12;
                        if (resourceId12 == -1) {
                            this.f807t = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 19:
                        int resourceId13 = obtainStyledAttributes.getResourceId(index, this.f809u);
                        this.f809u = resourceId13;
                        if (resourceId13 == -1) {
                            this.f809u = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 20:
                        int resourceId14 = obtainStyledAttributes.getResourceId(index, this.f811v);
                        this.f811v = resourceId14;
                        if (resourceId14 == -1) {
                            this.f811v = obtainStyledAttributes.getInt(index, -1);
                        } else {
                            continue;
                        }
                    case 21:
                        this.f813w = obtainStyledAttributes.getDimensionPixelSize(index, this.f813w);
                        continue;
                    case 22:
                        this.f815x = obtainStyledAttributes.getDimensionPixelSize(index, this.f815x);
                        continue;
                    case 23:
                        this.f816y = obtainStyledAttributes.getDimensionPixelSize(index, this.f816y);
                        continue;
                    case 24:
                        this.f817z = obtainStyledAttributes.getDimensionPixelSize(index, this.f817z);
                        continue;
                    case 25:
                        this.f743A = obtainStyledAttributes.getDimensionPixelSize(index, this.f743A);
                        continue;
                    case 26:
                        this.f744B = obtainStyledAttributes.getDimensionPixelSize(index, this.f744B);
                        continue;
                    case 27:
                        this.f770a0 = obtainStyledAttributes.getBoolean(index, this.f770a0);
                        continue;
                    case 28:
                        this.f772b0 = obtainStyledAttributes.getBoolean(index, this.f772b0);
                        continue;
                    case 29:
                        this.f749G = obtainStyledAttributes.getFloat(index, this.f749G);
                        continue;
                    case 30:
                        this.f750H = obtainStyledAttributes.getFloat(index, this.f750H);
                        continue;
                    case 31:
                        int i3 = obtainStyledAttributes.getInt(index, 0);
                        this.f758P = i3;
                        if (i3 == 1) {
                            str = "layout_constraintWidth_default=\"wrap\" is deprecated.\nUse layout_width=\"WRAP_CONTENT\" and layout_constrainedWidth=\"true\" instead.";
                            break;
                        } else {
                            continue;
                        }
                    case 32:
                        int i4 = obtainStyledAttributes.getInt(index, 0);
                        this.f759Q = i4;
                        if (i4 == 1) {
                            str = "layout_constraintHeight_default=\"wrap\" is deprecated.\nUse layout_height=\"WRAP_CONTENT\" and layout_constrainedHeight=\"true\" instead.";
                            break;
                        } else {
                            continue;
                        }
                    case 33:
                        try {
                            this.f760R = obtainStyledAttributes.getDimensionPixelSize(index, this.f760R);
                            continue;
                        } catch (Exception unused) {
                            if (obtainStyledAttributes.getInt(index, this.f760R) == -2) {
                                this.f760R = -2;
                            }
                        }
                    case 34:
                        try {
                            this.f762T = obtainStyledAttributes.getDimensionPixelSize(index, this.f762T);
                            continue;
                        } catch (Exception unused2) {
                            if (obtainStyledAttributes.getInt(index, this.f762T) == -2) {
                                this.f762T = -2;
                            }
                        }
                    case 35:
                        this.f764V = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.f764V));
                        this.f758P = 2;
                        continue;
                    case C1743h.f3975A1 /* 36 */:
                        try {
                            this.f761S = obtainStyledAttributes.getDimensionPixelSize(index, this.f761S);
                            continue;
                        } catch (Exception unused3) {
                            if (obtainStyledAttributes.getInt(index, this.f761S) == -2) {
                                this.f761S = -2;
                            }
                        }
                    case 37:
                        try {
                            this.f763U = obtainStyledAttributes.getDimensionPixelSize(index, this.f763U);
                            continue;
                        } catch (Exception unused4) {
                            if (obtainStyledAttributes.getInt(index, this.f763U) == -2) {
                                this.f763U = -2;
                            }
                        }
                    case C1743h.f4022F5 /* 38 */:
                        this.f765W = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.f765W));
                        this.f759Q = 2;
                        continue;
                    default:
                        switch (i2) {
                            case C1743h.f4070L5 /* 44 */:
                                C0192d.m4526o(this, obtainStyledAttributes.getString(index));
                                continue;
                            case C1743h.f4078M5 /* 45 */:
                                this.f754L = obtainStyledAttributes.getFloat(index, this.f754L);
                                continue;
                            case C1743h.f4086N5 /* 46 */:
                                this.f755M = obtainStyledAttributes.getFloat(index, this.f755M);
                                continue;
                            case C1743h.f4094O5 /* 47 */:
                                this.f756N = obtainStyledAttributes.getInt(index, 0);
                                continue;
                            case C1743h.f4102P5 /* 48 */:
                                this.f757O = obtainStyledAttributes.getInt(index, 0);
                                continue;
                            case C1743h.f4110Q5 /* 49 */:
                                this.f766X = obtainStyledAttributes.getDimensionPixelOffset(index, this.f766X);
                                continue;
                            case C1743h.f4118R5 /* 50 */:
                                this.f767Y = obtainStyledAttributes.getDimensionPixelOffset(index, this.f767Y);
                                continue;
                            case C1743h.f4126S5 /* 51 */:
                                this.f774c0 = obtainStyledAttributes.getString(index);
                                continue;
                            case C1743h.f4134T5 /* 52 */:
                                int resourceId15 = obtainStyledAttributes.getResourceId(index, this.f795n);
                                this.f795n = resourceId15;
                                if (resourceId15 == -1) {
                                    this.f795n = obtainStyledAttributes.getInt(index, -1);
                                    break;
                                } else {
                                    continue;
                                }
                            case C1743h.f4142U5 /* 53 */:
                                int resourceId16 = obtainStyledAttributes.getResourceId(index, this.f797o);
                                this.f797o = resourceId16;
                                if (resourceId16 == -1) {
                                    this.f797o = obtainStyledAttributes.getInt(index, -1);
                                    break;
                                } else {
                                    continue;
                                }
                            case 54:
                                this.f746D = obtainStyledAttributes.getDimensionPixelSize(index, this.f746D);
                                continue;
                            case 55:
                                this.f745C = obtainStyledAttributes.getDimensionPixelSize(index, this.f745C);
                                continue;
                            default:
                                switch (i2) {
                                    case 64:
                                        C0192d.m4528m(this, obtainStyledAttributes, index, 0);
                                        this.f747E = true;
                                        continue;
                                    case 65:
                                        C0192d.m4528m(this, obtainStyledAttributes, index, 1);
                                        this.f748F = true;
                                        continue;
                                    case 66:
                                        this.f776d0 = obtainStyledAttributes.getInt(index, this.f776d0);
                                        continue;
                                    case 67:
                                        this.f775d = obtainStyledAttributes.getBoolean(index, this.f775d);
                                        continue;
                                        continue;
                                        continue;
                                }
                        }
                        break;
                }
                Log.e("ConstraintLayout", str);
            }
            obtainStyledAttributes.recycle();
            m4565a();
        }

        public C0184b(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.f769a = -1;
            this.f771b = -1;
            this.f773c = -1.0f;
            this.f775d = true;
            this.f777e = -1;
            this.f779f = -1;
            this.f781g = -1;
            this.f783h = -1;
            this.f785i = -1;
            this.f787j = -1;
            this.f789k = -1;
            this.f791l = -1;
            this.f793m = -1;
            this.f795n = -1;
            this.f797o = -1;
            this.f799p = -1;
            this.f801q = 0;
            this.f803r = 0.0f;
            this.f805s = -1;
            this.f807t = -1;
            this.f809u = -1;
            this.f811v = -1;
            this.f813w = Integer.MIN_VALUE;
            this.f815x = Integer.MIN_VALUE;
            this.f816y = Integer.MIN_VALUE;
            this.f817z = Integer.MIN_VALUE;
            this.f743A = Integer.MIN_VALUE;
            this.f744B = Integer.MIN_VALUE;
            this.f745C = Integer.MIN_VALUE;
            this.f746D = 0;
            this.f747E = true;
            this.f748F = true;
            this.f749G = 0.5f;
            this.f750H = 0.5f;
            this.f751I = null;
            this.f752J = 0.0f;
            this.f753K = 1;
            this.f754L = -1.0f;
            this.f755M = -1.0f;
            this.f756N = 0;
            this.f757O = 0;
            this.f758P = 0;
            this.f759Q = 0;
            this.f760R = 0;
            this.f761S = 0;
            this.f762T = 0;
            this.f763U = 0;
            this.f764V = 1.0f;
            this.f765W = 1.0f;
            this.f766X = -1;
            this.f767Y = -1;
            this.f768Z = -1;
            this.f770a0 = false;
            this.f772b0 = false;
            this.f774c0 = null;
            this.f776d0 = 0;
            this.f778e0 = true;
            this.f780f0 = true;
            this.f782g0 = false;
            this.f784h0 = false;
            this.f786i0 = false;
            this.f788j0 = false;
            this.f790k0 = false;
            this.f792l0 = -1;
            this.f794m0 = -1;
            this.f796n0 = -1;
            this.f798o0 = -1;
            this.f800p0 = Integer.MIN_VALUE;
            this.f802q0 = Integer.MIN_VALUE;
            this.f804r0 = 0.5f;
            this.f812v0 = new C1550e();
            this.f814w0 = false;
        }

        /* renamed from: a */
        public void m4565a() {
            this.f784h0 = false;
            this.f778e0 = true;
            this.f780f0 = true;
            int i = ((ViewGroup.MarginLayoutParams) this).width;
            if (i == -2 && this.f770a0) {
                this.f778e0 = false;
                if (this.f758P == 0) {
                    this.f758P = 1;
                }
            }
            int i2 = ((ViewGroup.MarginLayoutParams) this).height;
            if (i2 == -2 && this.f772b0) {
                this.f780f0 = false;
                if (this.f759Q == 0) {
                    this.f759Q = 1;
                }
            }
            if (i == 0 || i == -1) {
                this.f778e0 = false;
                if (i == 0 && this.f758P == 1) {
                    ((ViewGroup.MarginLayoutParams) this).width = -2;
                    this.f770a0 = true;
                }
            }
            if (i2 == 0 || i2 == -1) {
                this.f780f0 = false;
                if (i2 == 0 && this.f759Q == 1) {
                    ((ViewGroup.MarginLayoutParams) this).height = -2;
                    this.f772b0 = true;
                }
            }
            if (this.f773c == -1.0f && this.f769a == -1 && this.f771b == -1) {
                return;
            }
            this.f784h0 = true;
            this.f778e0 = true;
            this.f780f0 = true;
            if (!(this.f812v0 instanceof C1554g)) {
                this.f812v0 = new C1554g();
            }
            ((C1554g) this.f812v0).m901x1(this.f768Z);
        }

        /* JADX WARN: Code restructure failed: missing block: B:76:0x00d6, code lost:
            if (r1 > 0) goto L54;
         */
        /* JADX WARN: Code restructure failed: missing block: B:77:0x00d8, code lost:
            ((android.view.ViewGroup.MarginLayoutParams) r10).rightMargin = r1;
         */
        /* JADX WARN: Code restructure failed: missing block: B:82:0x00e5, code lost:
            if (r1 > 0) goto L54;
         */
        /* JADX WARN: Removed duplicated region for block: B:10:0x003d  */
        /* JADX WARN: Removed duplicated region for block: B:19:0x0050  */
        /* JADX WARN: Removed duplicated region for block: B:22:0x0057  */
        /* JADX WARN: Removed duplicated region for block: B:25:0x005e  */
        /* JADX WARN: Removed duplicated region for block: B:28:0x0064  */
        /* JADX WARN: Removed duplicated region for block: B:31:0x006a  */
        /* JADX WARN: Removed duplicated region for block: B:40:0x0080  */
        /* JADX WARN: Removed duplicated region for block: B:41:0x0088  */
        /* JADX WARN: Removed duplicated region for block: B:46:0x0098  */
        /* JADX WARN: Removed duplicated region for block: B:86:0x00ec  */
        /* JADX WARN: Removed duplicated region for block: B:90:0x00f7  */
        @Override // android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.LayoutParams
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public void resolveLayoutDirection(int i) {
            boolean z;
            int i2;
            int i3;
            int i4;
            int i5;
            int i6;
            int i7 = ((ViewGroup.MarginLayoutParams) this).leftMargin;
            int i8 = ((ViewGroup.MarginLayoutParams) this).rightMargin;
            boolean z2 = false;
            if (Build.VERSION.SDK_INT >= 17) {
                super.resolveLayoutDirection(i);
                if (1 == getLayoutDirection()) {
                    z = true;
                    this.f796n0 = -1;
                    this.f798o0 = -1;
                    this.f792l0 = -1;
                    this.f794m0 = -1;
                    this.f800p0 = this.f813w;
                    this.f802q0 = this.f816y;
                    float f = this.f749G;
                    this.f804r0 = f;
                    int i9 = this.f769a;
                    this.f806s0 = i9;
                    int i10 = this.f771b;
                    this.f808t0 = i10;
                    float f2 = this.f773c;
                    this.f810u0 = f2;
                    if (z) {
                        int i11 = this.f805s;
                        if (i11 != -1) {
                            this.f794m0 = i11;
                        }
                        int i12 = this.f807t;
                        if (i12 != -1) {
                            this.f792l0 = i12;
                        }
                        int i13 = this.f809u;
                        if (i13 != -1) {
                            this.f796n0 = i13;
                        }
                        int i14 = this.f811v;
                        if (i14 != -1) {
                            this.f798o0 = i14;
                        }
                        int i15 = this.f743A;
                        if (i15 != Integer.MIN_VALUE) {
                            this.f800p0 = i15;
                        }
                        int i16 = this.f744B;
                        if (i16 != Integer.MIN_VALUE) {
                            this.f802q0 = i16;
                        }
                    } else {
                        int i17 = this.f805s;
                        if (i17 != -1) {
                            this.f796n0 = i17;
                        } else {
                            int i18 = this.f807t;
                            if (i18 != -1) {
                                this.f798o0 = i18;
                            }
                            i3 = this.f809u;
                            if (i3 != -1) {
                                this.f794m0 = i3;
                                z2 = true;
                            }
                            i4 = this.f811v;
                            if (i4 != -1) {
                                this.f792l0 = i4;
                                z2 = true;
                            }
                            i5 = this.f743A;
                            if (i5 != Integer.MIN_VALUE) {
                                this.f802q0 = i5;
                            }
                            i6 = this.f744B;
                            if (i6 != Integer.MIN_VALUE) {
                                this.f800p0 = i6;
                            }
                            if (z2) {
                                this.f804r0 = 1.0f - f;
                            }
                            if (this.f784h0 && this.f768Z == 1 && this.f775d) {
                                if (f2 == -1.0f) {
                                    this.f810u0 = 1.0f - f2;
                                    this.f806s0 = -1;
                                    this.f808t0 = -1;
                                } else {
                                    if (i9 != -1) {
                                        this.f808t0 = i9;
                                        this.f806s0 = -1;
                                    } else if (i10 != -1) {
                                        this.f806s0 = i10;
                                        this.f808t0 = -1;
                                    }
                                    this.f810u0 = -1.0f;
                                }
                            }
                        }
                        z2 = true;
                        i3 = this.f809u;
                        if (i3 != -1) {
                        }
                        i4 = this.f811v;
                        if (i4 != -1) {
                        }
                        i5 = this.f743A;
                        if (i5 != Integer.MIN_VALUE) {
                        }
                        i6 = this.f744B;
                        if (i6 != Integer.MIN_VALUE) {
                        }
                        if (z2) {
                        }
                        if (this.f784h0) {
                            if (f2 == -1.0f) {
                            }
                        }
                    }
                    if (this.f809u != -1 && this.f811v == -1 && this.f807t == -1 && this.f805s == -1) {
                        int i19 = this.f781g;
                        if (i19 == -1) {
                            int i20 = this.f783h;
                            if (i20 != -1) {
                                this.f798o0 = i20;
                                if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0) {
                                }
                            }
                            i2 = this.f777e;
                            if (i2 == -1) {
                            }
                            ((ViewGroup.MarginLayoutParams) this).leftMargin = i7;
                            return;
                        }
                        this.f796n0 = i19;
                        if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0) {
                        }
                        i2 = this.f777e;
                        if (i2 == -1) {
                            this.f792l0 = i2;
                            if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i7 <= 0) {
                                return;
                            }
                        } else {
                            int i21 = this.f779f;
                            if (i21 == -1) {
                                return;
                            }
                            this.f794m0 = i21;
                            if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i7 <= 0) {
                                return;
                            }
                        }
                        ((ViewGroup.MarginLayoutParams) this).leftMargin = i7;
                        return;
                    }
                    return;
                }
            }
            z = false;
            this.f796n0 = -1;
            this.f798o0 = -1;
            this.f792l0 = -1;
            this.f794m0 = -1;
            this.f800p0 = this.f813w;
            this.f802q0 = this.f816y;
            float f3 = this.f749G;
            this.f804r0 = f3;
            int i92 = this.f769a;
            this.f806s0 = i92;
            int i102 = this.f771b;
            this.f808t0 = i102;
            float f22 = this.f773c;
            this.f810u0 = f22;
            if (z) {
            }
            if (this.f809u != -1) {
            }
        }
    }

    /* renamed from: androidx.constraintlayout.widget.ConstraintLayout$c */
    /* loaded from: classes.dex */
    public class C0186c implements C1571b.InterfaceC1573b {

        /* renamed from: a */
        public ConstraintLayout f819a;

        /* renamed from: b */
        public int f820b;

        /* renamed from: c */
        public int f821c;

        /* renamed from: d */
        public int f822d;

        /* renamed from: e */
        public int f823e;

        /* renamed from: f */
        public int f824f;

        /* renamed from: g */
        public int f825g;

        public C0186c(ConstraintLayout constraintLayout) {
            this.f819a = constraintLayout;
        }

        /* JADX WARN: Removed duplicated region for block: B:111:0x018c  */
        /* JADX WARN: Removed duplicated region for block: B:115:0x01a3  */
        /* JADX WARN: Removed duplicated region for block: B:116:0x01a5  */
        /* JADX WARN: Removed duplicated region for block: B:118:0x01a8  */
        /* JADX WARN: Removed duplicated region for block: B:119:0x01aa  */
        /* JADX WARN: Removed duplicated region for block: B:122:0x01af  */
        /* JADX WARN: Removed duplicated region for block: B:128:0x01b9  */
        /* JADX WARN: Removed duplicated region for block: B:135:0x01c4  */
        /* JADX WARN: Removed duplicated region for block: B:140:0x01cf  */
        /* JADX WARN: Removed duplicated region for block: B:145:0x01da A[RETURN] */
        /* JADX WARN: Removed duplicated region for block: B:146:0x01db  */
        /* JADX WARN: Removed duplicated region for block: B:52:0x00b6  */
        /* JADX WARN: Removed duplicated region for block: B:90:0x0125  */
        @Override // p052r.C1571b.InterfaceC1573b
        /* renamed from: a */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final void mo878a(C1550e c1550e, C1571b.C1572a c1572a) {
            int makeMeasureSpec;
            int i;
            int makeMeasureSpec2;
            C1553f c1553f;
            int baseline;
            int max;
            int i2;
            int i3;
            int i4;
            int i5;
            int i6;
            int i7;
            int i8;
            if (c1550e == null) {
                return;
            }
            if (c1550e.m1017T() == 8 && !c1550e.m986h0()) {
                c1572a.f3645e = 0;
                c1572a.f3646f = 0;
                c1572a.f3647g = 0;
            } else if (c1550e.m1038I() == null) {
            } else {
                C1550e.EnumC1552b enumC1552b = c1572a.f3641a;
                C1550e.EnumC1552b enumC1552b2 = c1572a.f3642b;
                int i9 = c1572a.f3643c;
                int i10 = c1572a.f3644d;
                int i11 = this.f820b + this.f821c;
                int i12 = this.f822d;
                View view = (View) c1550e.m967q();
                int[] iArr = C0183a.f742a;
                int i13 = iArr[enumC1552b.ordinal()];
                if (i13 != 1) {
                    if (i13 == 2) {
                        i7 = this.f824f;
                        i8 = -2;
                    } else if (i13 != 3) {
                        if (i13 != 4) {
                            makeMeasureSpec = 0;
                        } else {
                            makeMeasureSpec = ViewGroup.getChildMeasureSpec(this.f824f, i12, -2);
                            boolean z = c1550e.f3559w == 1;
                            int i14 = c1572a.f3650j;
                            if (i14 == C1571b.C1572a.f3639l || i14 == C1571b.C1572a.f3640m) {
                                if (c1572a.f3650j == C1571b.C1572a.f3640m || !z || (z && (view.getMeasuredHeight() == c1550e.m959v())) || (view instanceof C0202g) || c1550e.mo914l0()) {
                                    i9 = c1550e.m1015U();
                                }
                            }
                        }
                        i = iArr[enumC1552b2.ordinal()];
                        if (i != 1) {
                            if (i == 2) {
                                i5 = this.f825g;
                                i6 = -2;
                            } else if (i != 3) {
                                if (i != 4) {
                                    makeMeasureSpec2 = 0;
                                } else {
                                    makeMeasureSpec2 = ViewGroup.getChildMeasureSpec(this.f825g, i11, -2);
                                    boolean z2 = c1550e.f3561x == 1;
                                    int i15 = c1572a.f3650j;
                                    if (i15 == C1571b.C1572a.f3639l || i15 == C1571b.C1572a.f3640m) {
                                        if (c1572a.f3650j == C1571b.C1572a.f3640m || !z2 || (z2 && (view.getMeasuredWidth() == c1550e.m1015U())) || (view instanceof C0202g) || c1550e.mo912m0()) {
                                            i10 = c1550e.m959v();
                                        }
                                    }
                                }
                                c1553f = (C1553f) c1550e.m1038I();
                                if (c1553f != null && C1558j.m895b(ConstraintLayout.this.f727l, 256) && view.getMeasuredWidth() == c1550e.m1015U() && view.getMeasuredWidth() < c1553f.m1015U() && view.getMeasuredHeight() == c1550e.m959v() && view.getMeasuredHeight() < c1553f.m959v() && view.getBaseline() == c1550e.m973n() && !c1550e.m977k0()) {
                                    if (!m4563d(c1550e.m1054A(), makeMeasureSpec, c1550e.m1015U()) && m4563d(c1550e.m1052B(), makeMeasureSpec2, c1550e.m959v())) {
                                        c1572a.f3645e = c1550e.m1015U();
                                        c1572a.f3646f = c1550e.m959v();
                                        c1572a.f3647g = c1550e.m973n();
                                        return;
                                    }
                                }
                                C1550e.EnumC1552b enumC1552b3 = C1550e.EnumC1552b.MATCH_CONSTRAINT;
                                boolean z3 = enumC1552b == enumC1552b3;
                                boolean z4 = enumC1552b2 == enumC1552b3;
                                C1550e.EnumC1552b enumC1552b4 = C1550e.EnumC1552b.MATCH_PARENT;
                                boolean z5 = enumC1552b2 != enumC1552b4 || enumC1552b2 == C1550e.EnumC1552b.FIXED;
                                boolean z6 = enumC1552b != enumC1552b4 || enumC1552b == C1550e.EnumC1552b.FIXED;
                                boolean z7 = !z3 && c1550e.f3522d0 > 0.0f;
                                boolean z8 = !z4 && c1550e.f3522d0 > 0.0f;
                                if (view == null) {
                                    return;
                                }
                                C0184b c0184b = (C0184b) view.getLayoutParams();
                                int i16 = c1572a.f3650j;
                                if (i16 != C1571b.C1572a.f3639l && i16 != C1571b.C1572a.f3640m && z3 && c1550e.f3559w == 0 && z4 && c1550e.f3561x == 0) {
                                    i4 = -1;
                                    i3 = 0;
                                    baseline = 0;
                                    max = 0;
                                } else {
                                    if ((view instanceof AbstractC1745j) && (c1550e instanceof C1559k)) {
                                        ((AbstractC1745j) view).m479t((C1559k) c1550e, makeMeasureSpec, makeMeasureSpec2);
                                    } else {
                                        view.measure(makeMeasureSpec, makeMeasureSpec2);
                                    }
                                    c1550e.m1018S0(makeMeasureSpec, makeMeasureSpec2);
                                    int measuredWidth = view.getMeasuredWidth();
                                    int measuredHeight = view.getMeasuredHeight();
                                    baseline = view.getBaseline();
                                    int i17 = c1550e.f3565z;
                                    max = i17 > 0 ? Math.max(i17, measuredWidth) : measuredWidth;
                                    int i18 = c1550e.f3479A;
                                    if (i18 > 0) {
                                        max = Math.min(i18, max);
                                    }
                                    int i19 = c1550e.f3483C;
                                    if (i19 > 0) {
                                        i3 = Math.max(i19, measuredHeight);
                                        i2 = makeMeasureSpec;
                                    } else {
                                        i2 = makeMeasureSpec;
                                        i3 = measuredHeight;
                                    }
                                    int i20 = c1550e.f3485D;
                                    if (i20 > 0) {
                                        i3 = Math.min(i20, i3);
                                    }
                                    if (!C1558j.m895b(ConstraintLayout.this.f727l, 1)) {
                                        if (z7 && z5) {
                                            max = (int) ((i3 * c1550e.f3522d0) + 0.5f);
                                        } else if (z8 && z6) {
                                            i3 = (int) ((max / c1550e.f3522d0) + 0.5f);
                                        }
                                    }
                                    if (measuredWidth != max || measuredHeight != i3) {
                                        int makeMeasureSpec3 = measuredWidth != max ? View.MeasureSpec.makeMeasureSpec(max, 1073741824) : i2;
                                        if (measuredHeight != i3) {
                                            makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i3, 1073741824);
                                        }
                                        view.measure(makeMeasureSpec3, makeMeasureSpec2);
                                        c1550e.m1018S0(makeMeasureSpec3, makeMeasureSpec2);
                                        max = view.getMeasuredWidth();
                                        i3 = view.getMeasuredHeight();
                                        baseline = view.getBaseline();
                                    }
                                    i4 = -1;
                                }
                                boolean z9 = baseline != i4;
                                c1572a.f3649i = (max == c1572a.f3643c && i3 == c1572a.f3644d) ? false : true;
                                if (c0184b.f782g0) {
                                    z9 = true;
                                }
                                if (z9 && baseline != -1 && c1550e.m973n() != baseline) {
                                    c1572a.f3649i = true;
                                }
                                c1572a.f3645e = max;
                                c1572a.f3646f = i3;
                                c1572a.f3648h = z9;
                                c1572a.f3647g = baseline;
                                return;
                            } else {
                                i5 = this.f825g;
                                i11 += c1550e.m1019S();
                                i6 = -1;
                            }
                            makeMeasureSpec2 = ViewGroup.getChildMeasureSpec(i5, i11, i6);
                            c1553f = (C1553f) c1550e.m1038I();
                            if (c1553f != null) {
                                if (!m4563d(c1550e.m1054A(), makeMeasureSpec, c1550e.m1015U()) && m4563d(c1550e.m1052B(), makeMeasureSpec2, c1550e.m959v())) {
                                }
                            }
                            C1550e.EnumC1552b enumC1552b32 = C1550e.EnumC1552b.MATCH_CONSTRAINT;
                            if (enumC1552b == enumC1552b32) {
                            }
                            if (enumC1552b2 == enumC1552b32) {
                            }
                            C1550e.EnumC1552b enumC1552b42 = C1550e.EnumC1552b.MATCH_PARENT;
                            if (enumC1552b2 != enumC1552b42) {
                            }
                            if (enumC1552b != enumC1552b42) {
                            }
                            if (z3) {
                            }
                            if (z4) {
                            }
                            if (view == null) {
                            }
                        }
                        makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i10, 1073741824);
                        c1553f = (C1553f) c1550e.m1038I();
                        if (c1553f != null) {
                        }
                        C1550e.EnumC1552b enumC1552b322 = C1550e.EnumC1552b.MATCH_CONSTRAINT;
                        if (enumC1552b == enumC1552b322) {
                        }
                        if (enumC1552b2 == enumC1552b322) {
                        }
                        C1550e.EnumC1552b enumC1552b422 = C1550e.EnumC1552b.MATCH_PARENT;
                        if (enumC1552b2 != enumC1552b422) {
                        }
                        if (enumC1552b != enumC1552b422) {
                        }
                        if (z3) {
                        }
                        if (z4) {
                        }
                        if (view == null) {
                        }
                    } else {
                        i7 = this.f824f;
                        i12 += c1550e.m951z();
                        i8 = -1;
                    }
                    makeMeasureSpec = ViewGroup.getChildMeasureSpec(i7, i12, i8);
                    i = iArr[enumC1552b2.ordinal()];
                    if (i != 1) {
                    }
                    makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i10, 1073741824);
                    c1553f = (C1553f) c1550e.m1038I();
                    if (c1553f != null) {
                    }
                    C1550e.EnumC1552b enumC1552b3222 = C1550e.EnumC1552b.MATCH_CONSTRAINT;
                    if (enumC1552b == enumC1552b3222) {
                    }
                    if (enumC1552b2 == enumC1552b3222) {
                    }
                    C1550e.EnumC1552b enumC1552b4222 = C1550e.EnumC1552b.MATCH_PARENT;
                    if (enumC1552b2 != enumC1552b4222) {
                    }
                    if (enumC1552b != enumC1552b4222) {
                    }
                    if (z3) {
                    }
                    if (z4) {
                    }
                    if (view == null) {
                    }
                }
                makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i9, 1073741824);
                i = iArr[enumC1552b2.ordinal()];
                if (i != 1) {
                }
                makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i10, 1073741824);
                c1553f = (C1553f) c1550e.m1038I();
                if (c1553f != null) {
                }
                C1550e.EnumC1552b enumC1552b32222 = C1550e.EnumC1552b.MATCH_CONSTRAINT;
                if (enumC1552b == enumC1552b32222) {
                }
                if (enumC1552b2 == enumC1552b32222) {
                }
                C1550e.EnumC1552b enumC1552b42222 = C1550e.EnumC1552b.MATCH_PARENT;
                if (enumC1552b2 != enumC1552b42222) {
                }
                if (enumC1552b != enumC1552b42222) {
                }
                if (z3) {
                }
                if (z4) {
                }
                if (view == null) {
                }
            }
        }

        @Override // p052r.C1571b.InterfaceC1573b
        /* renamed from: b */
        public final void mo877b() {
            int childCount = this.f819a.getChildCount();
            for (int i = 0; i < childCount; i++) {
                View childAt = this.f819a.getChildAt(i);
                if (childAt instanceof C0202g) {
                    ((C0202g) childAt).m4501a(this.f819a);
                }
            }
            int size = this.f819a.f720e.size();
            if (size > 0) {
                for (int i2 = 0; i2 < size; i2++) {
                    ((AbstractC0191c) this.f819a.f720e.get(i2)).m4544p(this.f819a);
                }
            }
        }

        /* renamed from: c */
        public void m4564c(int i, int i2, int i3, int i4, int i5, int i6) {
            this.f820b = i3;
            this.f821c = i4;
            this.f822d = i5;
            this.f823e = i6;
            this.f824f = i;
            this.f825g = i2;
        }

        /* renamed from: d */
        public final boolean m4563d(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;
        }
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.f719d = new SparseArray<>();
        this.f720e = new ArrayList<>(4);
        this.f721f = new C1553f();
        this.f722g = 0;
        this.f723h = 0;
        this.f724i = Integer.MAX_VALUE;
        this.f725j = Integer.MAX_VALUE;
        this.f726k = true;
        this.f727l = 257;
        this.f728m = null;
        this.f729n = null;
        this.f730o = -1;
        this.f731p = new HashMap<>();
        this.f732q = -1;
        this.f733r = -1;
        this.f734s = -1;
        this.f735t = -1;
        this.f736u = 0;
        this.f737v = 0;
        this.f738w = new SparseArray<>();
        this.f739x = new C0186c(this);
        this.f740y = 0;
        this.f741z = 0;
        m4575p(attributeSet, 0, 0);
    }

    private int getPaddingWidth() {
        int max = Math.max(0, getPaddingLeft()) + Math.max(0, getPaddingRight());
        int max2 = Build.VERSION.SDK_INT >= 17 ? Math.max(0, getPaddingEnd()) + Math.max(0, getPaddingStart()) : 0;
        return max2 > 0 ? max2 : max;
    }

    public static C1744i getSharedValues() {
        if (f718A == null) {
            f718A = new C1744i();
        }
        return f718A;
    }

    /* JADX WARN: Removed duplicated region for block: B:100:0x01a9  */
    /* JADX WARN: Removed duplicated region for block: B:103:0x01b2  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x00fa  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x010c  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x0126  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x0139  */
    /* JADX WARN: Removed duplicated region for block: B:79:0x0157  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x016b  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x0188  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x0196  */
    /* renamed from: c */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void m4582c(boolean z, View view, C1550e c1550e, C0184b c0184b, SparseArray<C1550e> sparseArray) {
        int i;
        float f;
        int i2;
        int i3;
        C1550e c1550e2;
        C1547d.EnumC1549b enumC1549b;
        C1547d.EnumC1549b enumC1549b2;
        int i4;
        C1550e c1550e3;
        C1550e c1550e4;
        C1547d.EnumC1549b enumC1549b3;
        int i5;
        C1550e c1550e5;
        C1547d.EnumC1549b enumC1549b4;
        int i6;
        C1550e c1550e6;
        C1547d.EnumC1549b enumC1549b5;
        C1547d.EnumC1549b enumC1549b6;
        int i7;
        int i8;
        C1550e c1550e7;
        int i9;
        C1550e c1550e8;
        C1547d.EnumC1549b enumC1549b7;
        int i10;
        int i11;
        C1550e c1550e9;
        C1547d.EnumC1549b enumC1549b8;
        int i12;
        C1547d.EnumC1549b enumC1549b9;
        float f2;
        int i13;
        c0184b.m4565a();
        c0184b.f814w0 = false;
        c1550e.m987g1(view.getVisibility());
        if (c0184b.f788j0) {
            c1550e.m1022Q0(true);
            c1550e.m987g1(8);
        }
        c1550e.m952y0(view);
        if (view instanceof AbstractC0191c) {
            ((AbstractC0191c) view).mo4546n(c1550e, this.f721f.m938L1());
        }
        if (c0184b.f784h0) {
            C1554g c1554g = (C1554g) c1550e;
            int i14 = c0184b.f806s0;
            int i15 = c0184b.f808t0;
            float f3 = c0184b.f810u0;
            if (Build.VERSION.SDK_INT < 17) {
                i14 = c0184b.f769a;
                i15 = c0184b.f771b;
                f3 = c0184b.f773c;
            }
            if (f3 != -1.0f) {
                c1554g.m902w1(f3);
                return;
            } else if (i14 != -1) {
                c1554g.m904u1(i14);
                return;
            } else if (i15 != -1) {
                c1554g.m903v1(i15);
                return;
            } else {
                return;
            }
        }
        int i16 = c0184b.f792l0;
        int i17 = c0184b.f794m0;
        int i18 = c0184b.f796n0;
        int i19 = c0184b.f798o0;
        int i20 = c0184b.f800p0;
        int i21 = c0184b.f802q0;
        float f4 = c0184b.f804r0;
        if (Build.VERSION.SDK_INT < 17) {
            i16 = c0184b.f777e;
            int i22 = c0184b.f779f;
            int i23 = c0184b.f781g;
            int i24 = c0184b.f783h;
            int i25 = c0184b.f813w;
            int i26 = c0184b.f816y;
            float f5 = c0184b.f749G;
            if (i16 == -1 && i22 == -1) {
                int i27 = c0184b.f807t;
                if (i27 != -1) {
                    i16 = i27;
                } else {
                    int i28 = c0184b.f805s;
                    if (i28 != -1) {
                        i22 = i28;
                    }
                }
            }
            if (i23 == -1 && i24 == -1) {
                i2 = c0184b.f809u;
                if (i2 == -1) {
                    int i29 = c0184b.f811v;
                    if (i29 != -1) {
                        i = i26;
                        f = f5;
                        i20 = i25;
                        i3 = i29;
                        i17 = i22;
                        i2 = i23;
                    }
                }
                i = i26;
                f = f5;
                i20 = i25;
                i3 = i24;
                i17 = i22;
            }
            i2 = i23;
            i = i26;
            f = f5;
            i20 = i25;
            i3 = i24;
            i17 = i22;
        } else {
            i = i21;
            f = f4;
            i2 = i18;
            i3 = i19;
        }
        int i30 = c0184b.f799p;
        if (i30 != -1) {
            C1550e c1550e10 = sparseArray.get(i30);
            if (c1550e10 != null) {
                c1550e.m981j(c1550e10, c0184b.f803r, c0184b.f801q);
            }
        } else if (i16 != -1) {
            c1550e2 = sparseArray.get(i16);
            if (c1550e2 != null) {
                enumC1549b2 = C1547d.EnumC1549b.LEFT;
                i4 = ((ViewGroup.MarginLayoutParams) c0184b).leftMargin;
                c1550e3 = c1550e;
                enumC1549b = enumC1549b2;
                c1550e3.m999c0(enumC1549b, c1550e2, enumC1549b2, i4, i20);
            }
            if (i2 == -1) {
                c1550e4 = sparseArray.get(i2);
                if (c1550e4 != null) {
                    enumC1549b4 = C1547d.EnumC1549b.RIGHT;
                    enumC1549b3 = C1547d.EnumC1549b.LEFT;
                    i5 = ((ViewGroup.MarginLayoutParams) c0184b).rightMargin;
                    c1550e5 = c1550e;
                    c1550e5.m999c0(enumC1549b4, c1550e4, enumC1549b3, i5, i);
                }
                i6 = c0184b.f785i;
                if (i6 == -1) {
                    c1550e6 = sparseArray.get(i6);
                    if (c1550e6 != null) {
                        enumC1549b6 = C1547d.EnumC1549b.TOP;
                        i7 = ((ViewGroup.MarginLayoutParams) c0184b).topMargin;
                        i8 = c0184b.f815x;
                        c1550e7 = c1550e;
                        enumC1549b5 = enumC1549b6;
                        c1550e7.m999c0(enumC1549b5, c1550e6, enumC1549b6, i7, i8);
                    }
                    i9 = c0184b.f789k;
                    if (i9 == -1) {
                        c1550e8 = sparseArray.get(i9);
                        if (c1550e8 != null) {
                            enumC1549b8 = C1547d.EnumC1549b.BOTTOM;
                            enumC1549b7 = C1547d.EnumC1549b.TOP;
                            i10 = ((ViewGroup.MarginLayoutParams) c0184b).bottomMargin;
                            i11 = c0184b.f817z;
                            c1550e9 = c1550e;
                            c1550e9.m999c0(enumC1549b8, c1550e8, enumC1549b7, i10, i11);
                        }
                        i12 = c0184b.f793m;
                        if (i12 == -1) {
                            enumC1549b9 = C1547d.EnumC1549b.BASELINE;
                        } else {
                            i12 = c0184b.f795n;
                            if (i12 != -1) {
                                enumC1549b9 = C1547d.EnumC1549b.TOP;
                            } else {
                                i12 = c0184b.f797o;
                                if (i12 != -1) {
                                    enumC1549b9 = C1547d.EnumC1549b.BOTTOM;
                                }
                                if (f >= 0.0f) {
                                    c1550e.m1035J0(f);
                                }
                                f2 = c0184b.f750H;
                                if (f2 >= 0.0f) {
                                    c1550e.m1002a1(f2);
                                }
                            }
                        }
                        m4567y(c1550e, c0184b, sparseArray, i12, enumC1549b9);
                        if (f >= 0.0f) {
                        }
                        f2 = c0184b.f750H;
                        if (f2 >= 0.0f) {
                        }
                    } else {
                        int i31 = c0184b.f791l;
                        if (i31 != -1 && (c1550e8 = sparseArray.get(i31)) != null) {
                            enumC1549b7 = C1547d.EnumC1549b.BOTTOM;
                            i10 = ((ViewGroup.MarginLayoutParams) c0184b).bottomMargin;
                            i11 = c0184b.f817z;
                            c1550e9 = c1550e;
                            enumC1549b8 = enumC1549b7;
                            c1550e9.m999c0(enumC1549b8, c1550e8, enumC1549b7, i10, i11);
                        }
                        i12 = c0184b.f793m;
                        if (i12 == -1) {
                        }
                        m4567y(c1550e, c0184b, sparseArray, i12, enumC1549b9);
                        if (f >= 0.0f) {
                        }
                        f2 = c0184b.f750H;
                        if (f2 >= 0.0f) {
                        }
                    }
                } else {
                    int i32 = c0184b.f787j;
                    if (i32 != -1 && (c1550e6 = sparseArray.get(i32)) != null) {
                        enumC1549b5 = C1547d.EnumC1549b.TOP;
                        enumC1549b6 = C1547d.EnumC1549b.BOTTOM;
                        i7 = ((ViewGroup.MarginLayoutParams) c0184b).topMargin;
                        i8 = c0184b.f815x;
                        c1550e7 = c1550e;
                        c1550e7.m999c0(enumC1549b5, c1550e6, enumC1549b6, i7, i8);
                    }
                    i9 = c0184b.f789k;
                    if (i9 == -1) {
                    }
                }
            } else {
                if (i3 != -1 && (c1550e4 = sparseArray.get(i3)) != null) {
                    enumC1549b3 = C1547d.EnumC1549b.RIGHT;
                    i5 = ((ViewGroup.MarginLayoutParams) c0184b).rightMargin;
                    c1550e5 = c1550e;
                    enumC1549b4 = enumC1549b3;
                    c1550e5.m999c0(enumC1549b4, c1550e4, enumC1549b3, i5, i);
                }
                i6 = c0184b.f785i;
                if (i6 == -1) {
                }
            }
        } else {
            if (i17 != -1 && (c1550e2 = sparseArray.get(i17)) != null) {
                enumC1549b = C1547d.EnumC1549b.LEFT;
                enumC1549b2 = C1547d.EnumC1549b.RIGHT;
                i4 = ((ViewGroup.MarginLayoutParams) c0184b).leftMargin;
                c1550e3 = c1550e;
                c1550e3.m999c0(enumC1549b, c1550e2, enumC1549b2, i4, i20);
            }
            if (i2 == -1) {
            }
        }
        if (z && ((i13 = c0184b.f766X) != -1 || c0184b.f767Y != -1)) {
            c1550e.m1006Y0(i13, c0184b.f767Y);
        }
        if (c0184b.f778e0) {
            c1550e.m1030M0(C1550e.EnumC1552b.FIXED);
            c1550e.m985h1(((ViewGroup.MarginLayoutParams) c0184b).width);
            if (((ViewGroup.MarginLayoutParams) c0184b).width == -2) {
                c1550e.m1030M0(C1550e.EnumC1552b.WRAP_CONTENT);
            }
        } else if (((ViewGroup.MarginLayoutParams) c0184b).width == -1) {
            c1550e.m1030M0(c0184b.f770a0 ? C1550e.EnumC1552b.MATCH_CONSTRAINT : C1550e.EnumC1552b.MATCH_PARENT);
            c1550e.mo913m(C1547d.EnumC1549b.LEFT).f3464g = ((ViewGroup.MarginLayoutParams) c0184b).leftMargin;
            c1550e.mo913m(C1547d.EnumC1549b.RIGHT).f3464g = ((ViewGroup.MarginLayoutParams) c0184b).rightMargin;
        } else {
            c1550e.m1030M0(C1550e.EnumC1552b.MATCH_CONSTRAINT);
            c1550e.m985h1(0);
        }
        if (c0184b.f780f0) {
            c1550e.m995d1(C1550e.EnumC1552b.FIXED);
            c1550e.m1037I0(((ViewGroup.MarginLayoutParams) c0184b).height);
            if (((ViewGroup.MarginLayoutParams) c0184b).height == -2) {
                c1550e.m995d1(C1550e.EnumC1552b.WRAP_CONTENT);
            }
        } else if (((ViewGroup.MarginLayoutParams) c0184b).height == -1) {
            c1550e.m995d1(c0184b.f772b0 ? C1550e.EnumC1552b.MATCH_CONSTRAINT : C1550e.EnumC1552b.MATCH_PARENT);
            c1550e.mo913m(C1547d.EnumC1549b.TOP).f3464g = ((ViewGroup.MarginLayoutParams) c0184b).topMargin;
            c1550e.mo913m(C1547d.EnumC1549b.BOTTOM).f3464g = ((ViewGroup.MarginLayoutParams) c0184b).bottomMargin;
        } else {
            c1550e.m995d1(C1550e.EnumC1552b.MATCH_CONSTRAINT);
            c1550e.m1037I0(0);
        }
        c1550e.m1053A0(c0184b.f751I);
        c1550e.m1026O0(c0184b.f754L);
        c1550e.m989f1(c0184b.f755M);
        c1550e.m1033K0(c0184b.f756N);
        c1550e.m1000b1(c0184b.f757O);
        c1550e.m982i1(c0184b.f776d0);
        c1550e.m1028N0(c0184b.f758P, c0184b.f760R, c0184b.f762T, c0184b.f764V);
        c1550e.m992e1(c0184b.f759Q, c0184b.f761S, c0184b.f763U, c0184b.f765W);
    }

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

    @Override // android.view.ViewGroup, android.view.View
    public void dispatchDraw(Canvas canvas) {
        Object tag;
        int size;
        ArrayList<AbstractC0191c> arrayList = this.f720e;
        if (arrayList != null && (size = arrayList.size()) > 0) {
            for (int i = 0; i < size; i++) {
                this.f720e.get(i).m4543q(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[] split = ((String) tag).split(",");
                    if (split.length == 4) {
                        int parseInt = Integer.parseInt(split[0]);
                        int parseInt2 = Integer.parseInt(split[1]);
                        int parseInt3 = Integer.parseInt(split[2]);
                        int i3 = (int) ((parseInt / 1080.0f) * width);
                        int i4 = (int) ((parseInt2 / 1920.0f) * height);
                        Paint paint = new Paint();
                        paint.setColor(-65536);
                        float f = i3;
                        float f2 = i4;
                        float f3 = i3 + ((int) ((parseInt3 / 1080.0f) * width));
                        canvas.drawLine(f, f2, f3, f2, paint);
                        float parseInt4 = i4 + ((int) ((Integer.parseInt(split[3]) / 1920.0f) * height));
                        canvas.drawLine(f3, f2, f3, parseInt4, paint);
                        canvas.drawLine(f3, parseInt4, f, parseInt4, paint);
                        canvas.drawLine(f, parseInt4, f, f2, paint);
                        paint.setColor(-16711936);
                        canvas.drawLine(f, f2, f3, parseInt4, paint);
                        canvas.drawLine(f, parseInt4, f3, f2, paint);
                    }
                }
            }
        }
    }

    @Override // android.view.ViewGroup
    /* renamed from: e */
    public C0184b generateDefaultLayoutParams() {
        return new C0184b(-2, -2);
    }

    @Override // android.view.ViewGroup
    /* renamed from: f */
    public C0184b generateLayoutParams(AttributeSet attributeSet) {
        return new C0184b(getContext(), attributeSet);
    }

    @Override // android.view.View
    public void forceLayout() {
        m4573r();
        super.forceLayout();
    }

    /* renamed from: g */
    public Object m4579g(int i, Object obj) {
        if (i == 0 && (obj instanceof String)) {
            String str = (String) obj;
            HashMap<String, Integer> hashMap = this.f731p;
            if (hashMap == null || !hashMap.containsKey(str)) {
                return null;
            }
            return this.f731p.get(str);
        }
        return null;
    }

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

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

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

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

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

    public int getOptimizationLevel() {
        return this.f721f.m943G1();
    }

    public String getSceneString() {
        int id;
        StringBuilder sb = new StringBuilder();
        if (this.f721f.f3543o == null) {
            int id2 = getId();
            if (id2 != -1) {
                this.f721f.f3543o = getContext().getResources().getResourceEntryName(id2);
            } else {
                this.f721f.f3543o = "parent";
            }
        }
        if (this.f721f.m965r() == null) {
            C1553f c1553f = this.f721f;
            c1553f.m950z0(c1553f.f3543o);
            Log.v("ConstraintLayout", " setDebugName " + this.f721f.m965r());
        }
        Iterator<C1550e> it = this.f721f.m889o1().iterator();
        while (it.hasNext()) {
            C1550e next = it.next();
            View view = (View) next.m967q();
            if (view != null) {
                if (next.f3543o == null && (id = view.getId()) != -1) {
                    next.f3543o = getContext().getResources().getResourceEntryName(id);
                }
                if (next.m965r() == null) {
                    next.m950z0(next.f3543o);
                    Log.v("ConstraintLayout", " setDebugName " + next.m965r());
                }
            }
        }
        this.f721f.mo937M(sb);
        return sb.toString();
    }

    /* renamed from: h */
    public final C1550e m4578h(int i) {
        if (i == 0) {
            return this.f721f;
        }
        View view = this.f719d.get(i);
        if (view == null && (view = findViewById(i)) != null && view != this && view.getParent() == this) {
            onViewAdded(view);
        }
        if (view == this) {
            return this.f721f;
        }
        if (view == null) {
            return null;
        }
        return ((C0184b) view.getLayoutParams()).f812v0;
    }

    /* renamed from: k */
    public View m4577k(int i) {
        return this.f719d.get(i);
    }

    /* renamed from: l */
    public final C1550e m4576l(View view) {
        if (view == this) {
            return this.f721f;
        }
        if (view != null) {
            if (!(view.getLayoutParams() instanceof C0184b)) {
                view.setLayoutParams(generateLayoutParams(view.getLayoutParams()));
                if (!(view.getLayoutParams() instanceof C0184b)) {
                    return null;
                }
            }
            return ((C0184b) view.getLayoutParams()).f812v0;
        }
        return 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 isInEditMode = isInEditMode();
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt = getChildAt(i5);
            C0184b c0184b = (C0184b) childAt.getLayoutParams();
            C1550e c1550e = c0184b.f812v0;
            if ((childAt.getVisibility() != 8 || c0184b.f784h0 || c0184b.f786i0 || c0184b.f790k0 || isInEditMode) && !c0184b.f788j0) {
                int m1013V = c1550e.m1013V();
                int m1011W = c1550e.m1011W();
                int m1015U = c1550e.m1015U() + m1013V;
                int m959v = c1550e.m959v() + m1011W;
                childAt.layout(m1013V, m1011W, m1015U, m959v);
                if ((childAt instanceof C0202g) && (content = ((C0202g) childAt).getContent()) != null) {
                    content.setVisibility(0);
                    content.layout(m1013V, m1011W, m1015U, m959v);
                }
            }
        }
        int size = this.f720e.size();
        if (size > 0) {
            for (int i6 = 0; i6 < size; i6++) {
                this.f720e.get(i6).m4545o(this);
            }
        }
    }

    @Override // android.view.View
    public void onMeasure(int i, int i2) {
        if (this.f740y == i) {
            int i3 = this.f741z;
        }
        if (!this.f726k) {
            int childCount = getChildCount();
            int i4 = 0;
            while (true) {
                if (i4 >= childCount) {
                    break;
                } else if (getChildAt(i4).isLayoutRequested()) {
                    this.f726k = true;
                    break;
                } else {
                    i4++;
                }
            }
        }
        boolean z = this.f726k;
        this.f740y = i;
        this.f741z = i2;
        this.f721f.m928U1(m4574q());
        if (this.f726k) {
            this.f726k = false;
            if (m4566z()) {
                this.f721f.m926W1();
            }
        }
        m4571u(this.f721f, this.f727l, i, i2);
        m4572t(i, i2, this.f721f.m1015U(), this.f721f.m959v(), this.f721f.m936M1(), this.f721f.m939K1());
    }

    @Override // android.view.ViewGroup
    public void onViewAdded(View view) {
        super.onViewAdded(view);
        C1550e m4576l = m4576l(view);
        if ((view instanceof C0201f) && !(m4576l instanceof C1554g)) {
            C0184b c0184b = (C0184b) view.getLayoutParams();
            C1554g c1554g = new C1554g();
            c0184b.f812v0 = c1554g;
            c0184b.f784h0 = true;
            c1554g.m901x1(c0184b.f768Z);
        }
        if (view instanceof AbstractC0191c) {
            AbstractC0191c abstractC0191c = (AbstractC0191c) view;
            abstractC0191c.m4541s();
            ((C0184b) view.getLayoutParams()).f786i0 = true;
            if (!this.f720e.contains(abstractC0191c)) {
                this.f720e.add(abstractC0191c);
            }
        }
        this.f719d.put(view.getId(), view);
        this.f726k = true;
    }

    @Override // android.view.ViewGroup
    public void onViewRemoved(View view) {
        super.onViewRemoved(view);
        this.f719d.remove(view.getId());
        this.f721f.m887q1(m4576l(view));
        this.f720e.remove(view);
        this.f726k = true;
    }

    /* renamed from: p */
    public final void m4575p(AttributeSet attributeSet, int i, int i2) {
        this.f721f.m952y0(this);
        this.f721f.m931R1(this.f739x);
        this.f719d.put(getId(), this);
        this.f728m = null;
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, C1743h.f4303n1, i, i2);
            int indexCount = obtainStyledAttributes.getIndexCount();
            for (int i3 = 0; i3 < indexCount; i3++) {
                int index = obtainStyledAttributes.getIndex(i3);
                if (index == C1743h.f4348s1) {
                    this.f722g = obtainStyledAttributes.getDimensionPixelOffset(index, this.f722g);
                } else if (index == C1743h.f4357t1) {
                    this.f723h = obtainStyledAttributes.getDimensionPixelOffset(index, this.f723h);
                } else if (index == C1743h.f4330q1) {
                    this.f724i = obtainStyledAttributes.getDimensionPixelOffset(index, this.f724i);
                } else if (index == C1743h.f4339r1) {
                    this.f725j = obtainStyledAttributes.getDimensionPixelOffset(index, this.f725j);
                } else if (index == C1743h.f4035H2) {
                    this.f727l = obtainStyledAttributes.getInt(index, this.f727l);
                } else if (index == C1743h.f3993C1) {
                    int resourceId = obtainStyledAttributes.getResourceId(index, 0);
                    if (resourceId != 0) {
                        try {
                            mo723s(resourceId);
                        } catch (Resources.NotFoundException unused) {
                            this.f729n = null;
                        }
                    }
                } else if (index == C1743h.f4402y1) {
                    int resourceId2 = obtainStyledAttributes.getResourceId(index, 0);
                    try {
                        C0192d c0192d = new C0192d();
                        this.f728m = c0192d;
                        c0192d.m4531j(getContext(), resourceId2);
                    } catch (Resources.NotFoundException unused2) {
                        this.f728m = null;
                    }
                    this.f730o = resourceId2;
                }
            }
            obtainStyledAttributes.recycle();
        }
        this.f721f.m930S1(this.f727l);
    }

    /* renamed from: q */
    public boolean m4574q() {
        if (Build.VERSION.SDK_INT >= 17) {
            return ((getContext().getApplicationInfo().flags & 4194304) != 0) && 1 == getLayoutDirection();
        }
        return false;
    }

    /* renamed from: r */
    public final void m4573r() {
        this.f726k = true;
        this.f732q = -1;
        this.f733r = -1;
        this.f734s = -1;
        this.f735t = -1;
        this.f736u = 0;
        this.f737v = 0;
    }

    @Override // android.view.View, android.view.ViewParent
    public void requestLayout() {
        m4573r();
        super.requestLayout();
    }

    /* renamed from: s */
    public void mo723s(int i) {
        this.f729n = new C1736c(getContext(), this, i);
    }

    public void setConstraintSet(C0192d c0192d) {
        this.f728m = c0192d;
    }

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

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

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

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

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

    public void setOnConstraintsChanged(AbstractC1741f abstractC1741f) {
        C1736c c1736c = this.f729n;
        if (c1736c != null) {
            c1736c.m488c(abstractC1741f);
        }
    }

    public void setOptimizationLevel(int i) {
        this.f727l = i;
        this.f721f.m930S1(i);
    }

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

    /* renamed from: t */
    public void m4572t(int i, int i2, int i3, int i4, boolean z, boolean z2) {
        C0186c c0186c = this.f739x;
        int i5 = c0186c.f823e;
        int resolveSizeAndState = View.resolveSizeAndState(i3 + c0186c.f822d, i, 0);
        int min = Math.min(this.f724i, resolveSizeAndState & 16777215);
        int min2 = Math.min(this.f725j, View.resolveSizeAndState(i4 + i5, i2, 0) & 16777215);
        if (z) {
            min |= 16777216;
        }
        if (z2) {
            min2 |= 16777216;
        }
        setMeasuredDimension(min, min2);
        this.f732q = min;
        this.f733r = min2;
    }

    /* renamed from: u */
    public void m4571u(C1553f c1553f, int i, int i2, int i3) {
        int max;
        int mode = View.MeasureSpec.getMode(i2);
        int size = View.MeasureSpec.getSize(i2);
        int mode2 = View.MeasureSpec.getMode(i3);
        int size2 = View.MeasureSpec.getSize(i3);
        int max2 = Math.max(0, getPaddingTop());
        int max3 = Math.max(0, getPaddingBottom());
        int i4 = max2 + max3;
        int paddingWidth = getPaddingWidth();
        this.f739x.m4564c(i2, i3, max2, max3, paddingWidth, i4);
        if (Build.VERSION.SDK_INT >= 17) {
            int max4 = Math.max(0, getPaddingStart());
            int max5 = Math.max(0, getPaddingEnd());
            if (max4 <= 0 && max5 <= 0) {
                max4 = Math.max(0, getPaddingLeft());
            } else if (m4574q()) {
                max4 = max5;
            }
            max = max4;
        } else {
            max = Math.max(0, getPaddingLeft());
        }
        int i5 = size - paddingWidth;
        int i6 = size2 - i4;
        m4568x(c1553f, mode, i5, mode2, i6);
        c1553f.m935N1(i, mode, i5, mode2, i6, this.f732q, this.f733r, max, max2);
    }

    /* renamed from: v */
    public final void m4570v() {
        boolean isInEditMode = isInEditMode();
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            C1550e m4576l = m4576l(getChildAt(i));
            if (m4576l != null) {
                m4576l.mo886r0();
            }
        }
        if (isInEditMode) {
            for (int i2 = 0; i2 < childCount; i2++) {
                View childAt = getChildAt(i2);
                try {
                    String resourceName = getResources().getResourceName(childAt.getId());
                    m4569w(0, resourceName, Integer.valueOf(childAt.getId()));
                    int indexOf = resourceName.indexOf(47);
                    if (indexOf != -1) {
                        resourceName = resourceName.substring(indexOf + 1);
                    }
                    m4578h(childAt.getId()).m950z0(resourceName);
                } catch (Resources.NotFoundException unused) {
                }
            }
        }
        if (this.f730o != -1) {
            for (int i3 = 0; i3 < childCount; i3++) {
                View childAt2 = getChildAt(i3);
                if (childAt2.getId() == this.f730o && (childAt2 instanceof C0199e)) {
                    this.f728m = ((C0199e) childAt2).getConstraintSet();
                }
            }
        }
        C0192d c0192d = this.f728m;
        if (c0192d != null) {
            c0192d.m4537d(this, true);
        }
        this.f721f.m885r1();
        int size = this.f720e.size();
        if (size > 0) {
            for (int i4 = 0; i4 < size; i4++) {
                this.f720e.get(i4).m4542r(this);
            }
        }
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt3 = getChildAt(i5);
            if (childAt3 instanceof C0202g) {
                ((C0202g) childAt3).m4500b(this);
            }
        }
        this.f738w.clear();
        this.f738w.put(0, this.f721f);
        this.f738w.put(getId(), this.f721f);
        for (int i6 = 0; i6 < childCount; i6++) {
            View childAt4 = getChildAt(i6);
            this.f738w.put(childAt4.getId(), m4576l(childAt4));
        }
        for (int i7 = 0; i7 < childCount; i7++) {
            View childAt5 = getChildAt(i7);
            C1550e m4576l2 = m4576l(childAt5);
            if (m4576l2 != null) {
                C0184b c0184b = (C0184b) childAt5.getLayoutParams();
                this.f721f.m890a(m4576l2);
                m4582c(isInEditMode, childAt5, m4576l2, c0184b, this.f738w);
            }
        }
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:10:0x0025, code lost:
        if (r3 == 0) goto L28;
     */
    /* JADX WARN: Code restructure failed: missing block: B:13:0x002a, code lost:
        if (r3 == 0) goto L28;
     */
    /* JADX WARN: Code restructure failed: missing block: B:14:0x002c, code lost:
        r10 = java.lang.Math.max(0, r7.f722g);
     */
    /* JADX WARN: Code restructure failed: missing block: B:21:0x0044, code lost:
        if (r3 == 0) goto L22;
     */
    /* JADX WARN: Code restructure failed: missing block: B:24:0x0049, code lost:
        if (r3 == 0) goto L22;
     */
    /* JADX WARN: Code restructure failed: missing block: B:25:0x004b, code lost:
        r12 = java.lang.Math.max(0, r7.f723h);
     */
    /* renamed from: x */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void m4568x(C1553f c1553f, int i, int i2, int i3, int i4) {
        C1550e.EnumC1552b enumC1552b;
        C0186c c0186c = this.f739x;
        int i5 = c0186c.f823e;
        int i6 = c0186c.f822d;
        C1550e.EnumC1552b enumC1552b2 = C1550e.EnumC1552b.FIXED;
        int childCount = getChildCount();
        if (i != Integer.MIN_VALUE) {
            if (i == 0) {
                enumC1552b = C1550e.EnumC1552b.WRAP_CONTENT;
            } else if (i != 1073741824) {
                enumC1552b = enumC1552b2;
            } else {
                i2 = Math.min(this.f724i - i6, i2);
                enumC1552b = enumC1552b2;
            }
            i2 = 0;
        } else {
            enumC1552b = C1550e.EnumC1552b.WRAP_CONTENT;
        }
        if (i3 != Integer.MIN_VALUE) {
            if (i3 == 0) {
                enumC1552b2 = C1550e.EnumC1552b.WRAP_CONTENT;
            } else if (i3 == 1073741824) {
                i4 = Math.min(this.f725j - i5, i4);
            }
            i4 = 0;
        } else {
            enumC1552b2 = C1550e.EnumC1552b.WRAP_CONTENT;
        }
        if (i2 != c1553f.m1015U() || i4 != c1553f.m959v()) {
            c1553f.m940J1();
        }
        c1553f.m979j1(0);
        c1553f.m976k1(0);
        c1553f.m1014U0(this.f724i - i6);
        c1553f.m1016T0(this.f725j - i5);
        c1553f.m1008X0(0);
        c1553f.m1010W0(0);
        c1553f.m1030M0(enumC1552b);
        c1553f.m985h1(i2);
        c1553f.m995d1(enumC1552b2);
        c1553f.m1037I0(i4);
        c1553f.m1008X0(this.f722g - i6);
        c1553f.m1010W0(this.f723h - i5);
    }

    /* renamed from: y */
    public final void m4567y(C1550e c1550e, C0184b c0184b, SparseArray<C1550e> sparseArray, int i, C1547d.EnumC1549b enumC1549b) {
        View view = this.f719d.get(i);
        C1550e c1550e2 = sparseArray.get(i);
        if (c1550e2 == null || view == null || !(view.getLayoutParams() instanceof C0184b)) {
            return;
        }
        c0184b.f782g0 = true;
        C1547d.EnumC1549b enumC1549b2 = C1547d.EnumC1549b.BASELINE;
        if (enumC1549b == enumC1549b2) {
            C0184b c0184b2 = (C0184b) view.getLayoutParams();
            c0184b2.f782g0 = true;
            c0184b2.f812v0.m1039H0(true);
        }
        c1550e.mo913m(enumC1549b2).m1073a(c1550e2.mo913m(enumC1549b), c0184b.f746D, c0184b.f745C, true);
        c1550e.m1039H0(true);
        c1550e.mo913m(C1547d.EnumC1549b.TOP).m1058p();
        c1550e.mo913m(C1547d.EnumC1549b.BOTTOM).m1058p();
    }

    /* renamed from: z */
    public final boolean m4566z() {
        int childCount = getChildCount();
        boolean z = false;
        int i = 0;
        while (true) {
            if (i >= childCount) {
                break;
            } else if (getChildAt(i).isLayoutRequested()) {
                z = true;
                break;
            } else {
                i++;
            }
        }
        if (z) {
            m4570v();
        }
        return z;
    }
}