package androidx.constraintlayout.widget;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import defpackage.AbstractC2992;
import defpackage.AbstractC3075;
import defpackage.AbstractC3181;
import defpackage.AbstractC3962;
import defpackage.C0425;
import defpackage.C0483;
import defpackage.C1047;
import defpackage.C1339;
import defpackage.C1347;
import defpackage.C1692;
import defpackage.C1968;
import defpackage.C3513;
import defpackage.C3660;
import defpackage.C4318;
import defpackage.C4454;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import org.xmlpull.v1.XmlPullParserException;

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

    /* renamed from: ˁˑᵰ, reason: contains not printable characters */
    public static C0483 f264;

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public int f265;

    /* renamed from: ˎˑː, reason: contains not printable characters */
    public C1047 f266;

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public int f267;

    /* renamed from: ᐧﾞ, reason: contains not printable characters */
    public final SparseArray f268;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public boolean f269;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public int f270;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final ArrayList f271;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public int f272;

    /* renamed from: ᵧـˌᵎ, reason: contains not printable characters */
    public int f273;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final SparseArray f274;

    /* renamed from: ᵮᵠـˌ, reason: contains not printable characters */
    public ᵪᵨ f275;

    /* renamed from: ᵶʔᵢˊ, reason: contains not printable characters */
    public final C1347 f276;

    /* renamed from: ᵺʙ, reason: contains not printable characters */
    public HashMap f277;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public int f278;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final C1968 f279;

    public ConstraintLayout(Context context) throws XmlPullParserException, IOException {
        super(context);
        this.f274 = new SparseArray();
        this.f271 = new ArrayList(4);
        this.f279 = new C1968();
        this.f278 = 0;
        this.f272 = 0;
        this.f270 = Integer.MAX_VALUE;
        this.f265 = Integer.MAX_VALUE;
        this.f269 = true;
        this.f267 = 257;
        this.f266 = null;
        this.f275 = null;
        this.f273 = -1;
        this.f277 = new HashMap();
        this.f268 = new SparseArray();
        this.f276 = new C1347(this, this);
        m68(null, 0, 0);
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet) throws XmlPullParserException, IOException {
        super(context, attributeSet);
        this.f274 = new SparseArray();
        this.f271 = new ArrayList(4);
        this.f279 = new C1968();
        this.f278 = 0;
        this.f272 = 0;
        this.f270 = Integer.MAX_VALUE;
        this.f265 = Integer.MAX_VALUE;
        this.f269 = true;
        this.f267 = 257;
        this.f266 = null;
        this.f275 = null;
        this.f273 = -1;
        this.f277 = new HashMap();
        this.f268 = new SparseArray();
        this.f276 = new C1347(this, this);
        m68(attributeSet, 0, 0);
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet, int i) throws XmlPullParserException, IOException {
        super(context, attributeSet, i);
        this.f274 = new SparseArray();
        this.f271 = new ArrayList(4);
        this.f279 = new C1968();
        this.f278 = 0;
        this.f272 = 0;
        this.f270 = Integer.MAX_VALUE;
        this.f265 = Integer.MAX_VALUE;
        this.f269 = true;
        this.f267 = 257;
        this.f266 = null;
        this.f275 = null;
        this.f273 = -1;
        this.f277 = new HashMap();
        this.f268 = new SparseArray();
        this.f276 = new C1347(this, this);
        m68(attributeSet, i, 0);
    }

    public ConstraintLayout(Context context, AttributeSet attributeSet, int i, int i2) throws XmlPullParserException, IOException {
        super(context, attributeSet, i, i2);
        this.f274 = new SparseArray();
        this.f271 = new ArrayList(4);
        this.f279 = new C1968();
        this.f278 = 0;
        this.f272 = 0;
        this.f270 = Integer.MAX_VALUE;
        this.f265 = Integer.MAX_VALUE;
        this.f269 = true;
        this.f267 = 257;
        this.f266 = null;
        this.f275 = null;
        this.f273 = -1;
        this.f277 = new HashMap();
        this.f268 = new SparseArray();
        this.f276 = new C1347(this, this);
        m68(attributeSet, i, i2);
    }

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

    public static C0483 getSharedValues() {
        if (f264 == null) {
            C0483 c0483 = new C0483();
            new SparseIntArray();
            new HashMap();
            f264 = c0483;
        }
        return f264;
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public static C3660 m66() {
        C3660 c3660 = new C3660(-2, -2);
        c3660.f13622 = -1;
        c3660.f13634 = -1;
        c3660.f13601 = -1.0f;
        c3660.f13643 = true;
        c3660.f13589 = -1;
        c3660.f13600 = -1;
        c3660.f13597 = -1;
        c3660.f13640 = -1;
        c3660.f13608 = -1;
        c3660.f13636 = -1;
        c3660.f13639 = -1;
        c3660.f13594 = -1;
        c3660.f13630 = -1;
        c3660.f13627 = -1;
        c3660.f13632 = -1;
        c3660.f13593 = -1;
        c3660.f13612 = 0;
        c3660.f13638 = 0.0f;
        c3660.f13609 = -1;
        c3660.f13626 = -1;
        c3660.f13604 = -1;
        c3660.f13624 = -1;
        c3660.f13617 = Integer.MIN_VALUE;
        c3660.f13646 = Integer.MIN_VALUE;
        c3660.f13645 = Integer.MIN_VALUE;
        c3660.f13619 = Integer.MIN_VALUE;
        c3660.f13616 = Integer.MIN_VALUE;
        c3660.f13584 = Integer.MIN_VALUE;
        c3660.f13613 = Integer.MIN_VALUE;
        c3660.f13603 = 0;
        c3660.f13598 = 0.5f;
        c3660.f13629 = 0.5f;
        c3660.f13623 = null;
        c3660.f13641 = -1.0f;
        c3660.f13605 = -1.0f;
        c3660.f13635 = 0;
        c3660.f13586 = 0;
        c3660.f13648 = 0;
        c3660.f13606 = 0;
        c3660.f13614 = 0;
        c3660.f13602 = 0;
        c3660.f13592 = 0;
        c3660.f13585 = 0;
        c3660.f13588 = 1.0f;
        c3660.f13607 = 1.0f;
        c3660.f13595 = -1;
        c3660.f13633 = -1;
        c3660.f13615 = -1;
        c3660.f13590 = false;
        c3660.f13599 = false;
        c3660.f13628 = null;
        c3660.f13644 = 0;
        c3660.f13583 = true;
        c3660.f13591 = true;
        c3660.f13637 = false;
        c3660.f13596 = false;
        c3660.f13611 = false;
        c3660.f13582 = -1;
        c3660.f13642 = -1;
        c3660.f13620 = -1;
        c3660.f13587 = -1;
        c3660.f13647 = Integer.MIN_VALUE;
        c3660.f13618 = Integer.MIN_VALUE;
        c3660.f13621 = 0.5f;
        c3660.f13610 = new C0425();
        return c3660;
    }

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

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

    @Override // android.view.View
    public final void forceLayout() {
        this.f269 = true;
        super.forceLayout();
    }

    @Override // android.view.ViewGroup
    public final /* bridge */ /* synthetic */ ViewGroup.LayoutParams generateDefaultLayoutParams() {
        return m66();
    }

    @Override // android.view.ViewGroup
    public final ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) throws NumberFormatException {
        Context context = getContext();
        C3660 c3660 = new C3660(context, attributeSet);
        c3660.f13622 = -1;
        c3660.f13634 = -1;
        c3660.f13601 = -1.0f;
        c3660.f13643 = true;
        c3660.f13589 = -1;
        c3660.f13600 = -1;
        c3660.f13597 = -1;
        c3660.f13640 = -1;
        c3660.f13608 = -1;
        c3660.f13636 = -1;
        c3660.f13639 = -1;
        c3660.f13594 = -1;
        c3660.f13630 = -1;
        c3660.f13627 = -1;
        c3660.f13632 = -1;
        c3660.f13593 = -1;
        c3660.f13612 = 0;
        c3660.f13638 = 0.0f;
        c3660.f13609 = -1;
        c3660.f13626 = -1;
        c3660.f13604 = -1;
        c3660.f13624 = -1;
        c3660.f13617 = Integer.MIN_VALUE;
        c3660.f13646 = Integer.MIN_VALUE;
        c3660.f13645 = Integer.MIN_VALUE;
        c3660.f13619 = Integer.MIN_VALUE;
        c3660.f13616 = Integer.MIN_VALUE;
        c3660.f13584 = Integer.MIN_VALUE;
        c3660.f13613 = Integer.MIN_VALUE;
        c3660.f13603 = 0;
        c3660.f13598 = 0.5f;
        c3660.f13629 = 0.5f;
        c3660.f13623 = null;
        c3660.f13641 = -1.0f;
        c3660.f13605 = -1.0f;
        c3660.f13635 = 0;
        c3660.f13586 = 0;
        c3660.f13648 = 0;
        c3660.f13606 = 0;
        c3660.f13614 = 0;
        c3660.f13602 = 0;
        c3660.f13592 = 0;
        c3660.f13585 = 0;
        c3660.f13588 = 1.0f;
        c3660.f13607 = 1.0f;
        c3660.f13595 = -1;
        c3660.f13633 = -1;
        c3660.f13615 = -1;
        c3660.f13590 = false;
        c3660.f13599 = false;
        c3660.f13628 = null;
        c3660.f13644 = 0;
        c3660.f13583 = true;
        c3660.f13591 = true;
        c3660.f13637 = false;
        c3660.f13596 = false;
        c3660.f13611 = false;
        c3660.f13582 = -1;
        c3660.f13642 = -1;
        c3660.f13620 = -1;
        c3660.f13587 = -1;
        c3660.f13647 = Integer.MIN_VALUE;
        c3660.f13618 = Integer.MIN_VALUE;
        c3660.f13621 = 0.5f;
        c3660.f13610 = new C0425();
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC3962.f14949);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i = 0; i < indexCount; i++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i);
            int i2 = AbstractC3181.f12059.get(index);
            switch (i2) {
                case 1:
                    c3660.f13615 = typedArrayObtainStyledAttributes.getInt(index, c3660.f13615);
                    break;
                case 2:
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13593);
                    c3660.f13593 = resourceId;
                    if (resourceId == -1) {
                        c3660.f13593 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 3:
                    c3660.f13612 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13612);
                    break;
                case 4:
                    float f = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13638) % 360.0f;
                    c3660.f13638 = f;
                    if (f < 0.0f) {
                        c3660.f13638 = (360.0f - f) % 360.0f;
                        break;
                    } else {
                        break;
                    }
                case 5:
                    c3660.f13622 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c3660.f13622);
                    break;
                case C1339.STRING_SET_FIELD_NUMBER /* 6 */:
                    c3660.f13634 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c3660.f13634);
                    break;
                case C1339.DOUBLE_FIELD_NUMBER /* 7 */:
                    c3660.f13601 = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13601);
                    break;
                case C1339.BYTES_FIELD_NUMBER /* 8 */:
                    int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13589);
                    c3660.f13589 = resourceId2;
                    if (resourceId2 == -1) {
                        c3660.f13589 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 9:
                    int resourceId3 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13600);
                    c3660.f13600 = resourceId3;
                    if (resourceId3 == -1) {
                        c3660.f13600 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 10:
                    int resourceId4 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13597);
                    c3660.f13597 = resourceId4;
                    if (resourceId4 == -1) {
                        c3660.f13597 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 11:
                    int resourceId5 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13640);
                    c3660.f13640 = resourceId5;
                    if (resourceId5 == -1) {
                        c3660.f13640 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 12:
                    int resourceId6 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13608);
                    c3660.f13608 = resourceId6;
                    if (resourceId6 == -1) {
                        c3660.f13608 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 13:
                    int resourceId7 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13636);
                    c3660.f13636 = resourceId7;
                    if (resourceId7 == -1) {
                        c3660.f13636 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 14:
                    int resourceId8 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13639);
                    c3660.f13639 = resourceId8;
                    if (resourceId8 == -1) {
                        c3660.f13639 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 15:
                    int resourceId9 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13594);
                    c3660.f13594 = resourceId9;
                    if (resourceId9 == -1) {
                        c3660.f13594 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 16:
                    int resourceId10 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13630);
                    c3660.f13630 = resourceId10;
                    if (resourceId10 == -1) {
                        c3660.f13630 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 17:
                    int resourceId11 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13609);
                    c3660.f13609 = resourceId11;
                    if (resourceId11 == -1) {
                        c3660.f13609 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 18:
                    int resourceId12 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13626);
                    c3660.f13626 = resourceId12;
                    if (resourceId12 == -1) {
                        c3660.f13626 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 19:
                    int resourceId13 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13604);
                    c3660.f13604 = resourceId13;
                    if (resourceId13 == -1) {
                        c3660.f13604 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 20:
                    int resourceId14 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13624);
                    c3660.f13624 = resourceId14;
                    if (resourceId14 == -1) {
                        c3660.f13624 = typedArrayObtainStyledAttributes.getInt(index, -1);
                        break;
                    } else {
                        break;
                    }
                case 21:
                    c3660.f13617 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13617);
                    break;
                case 22:
                    c3660.f13646 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13646);
                    break;
                case 23:
                    c3660.f13645 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13645);
                    break;
                case 24:
                    c3660.f13619 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13619);
                    break;
                case 25:
                    c3660.f13616 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13616);
                    break;
                case 26:
                    c3660.f13584 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13584);
                    break;
                case 27:
                    c3660.f13590 = typedArrayObtainStyledAttributes.getBoolean(index, c3660.f13590);
                    break;
                case 28:
                    c3660.f13599 = typedArrayObtainStyledAttributes.getBoolean(index, c3660.f13599);
                    break;
                case 29:
                    c3660.f13598 = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13598);
                    break;
                case 30:
                    c3660.f13629 = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13629);
                    break;
                case 31:
                    c3660.f13648 = typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 32:
                    c3660.f13606 = typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 33:
                    try {
                        c3660.f13614 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13614);
                        break;
                    } catch (Exception unused) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c3660.f13614) == -2) {
                            c3660.f13614 = -2;
                            break;
                        } else {
                            break;
                        }
                    }
                case 34:
                    try {
                        c3660.f13592 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13592);
                        break;
                    } catch (Exception unused2) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c3660.f13592) == -2) {
                            c3660.f13592 = -2;
                            break;
                        } else {
                            break;
                        }
                    }
                case 35:
                    c3660.f13588 = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, c3660.f13588));
                    c3660.f13648 = 2;
                    break;
                case 36:
                    try {
                        c3660.f13602 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13602);
                        break;
                    } catch (Exception unused3) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c3660.f13602) == -2) {
                            c3660.f13602 = -2;
                            break;
                        } else {
                            break;
                        }
                    }
                case 37:
                    try {
                        c3660.f13585 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13585);
                        break;
                    } catch (Exception unused4) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c3660.f13585) == -2) {
                            c3660.f13585 = -2;
                            break;
                        } else {
                            break;
                        }
                    }
                case 38:
                    c3660.f13607 = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, c3660.f13607));
                    c3660.f13606 = 2;
                    break;
                default:
                    switch (i2) {
                        case 44:
                            C1047.m3416(c3660, typedArrayObtainStyledAttributes.getString(index));
                            break;
                        case 45:
                            c3660.f13641 = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13641);
                            break;
                        case 46:
                            c3660.f13605 = typedArrayObtainStyledAttributes.getFloat(index, c3660.f13605);
                            break;
                        case 47:
                            c3660.f13635 = typedArrayObtainStyledAttributes.getInt(index, 0);
                            break;
                        case 48:
                            c3660.f13586 = typedArrayObtainStyledAttributes.getInt(index, 0);
                            break;
                        case 49:
                            c3660.f13595 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c3660.f13595);
                            break;
                        case 50:
                            c3660.f13633 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c3660.f13633);
                            break;
                        case 51:
                            c3660.f13628 = typedArrayObtainStyledAttributes.getString(index);
                            break;
                        case 52:
                            int resourceId15 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13627);
                            c3660.f13627 = resourceId15;
                            if (resourceId15 == -1) {
                                c3660.f13627 = typedArrayObtainStyledAttributes.getInt(index, -1);
                                break;
                            } else {
                                break;
                            }
                        case 53:
                            int resourceId16 = typedArrayObtainStyledAttributes.getResourceId(index, c3660.f13632);
                            c3660.f13632 = resourceId16;
                            if (resourceId16 == -1) {
                                c3660.f13632 = typedArrayObtainStyledAttributes.getInt(index, -1);
                                break;
                            } else {
                                break;
                            }
                        case 54:
                            c3660.f13603 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13603);
                            break;
                        case 55:
                            c3660.f13613 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c3660.f13613);
                            break;
                        default:
                            switch (i2) {
                                case 64:
                                    C1047.m3417(c3660, typedArrayObtainStyledAttributes, index, 0);
                                    break;
                                case 65:
                                    C1047.m3417(c3660, typedArrayObtainStyledAttributes, index, 1);
                                    break;
                                case 66:
                                    c3660.f13644 = typedArrayObtainStyledAttributes.getInt(index, c3660.f13644);
                                    break;
                                case 67:
                                    c3660.f13643 = typedArrayObtainStyledAttributes.getBoolean(index, c3660.f13643);
                                    break;
                            }
                    }
            }
        }
        typedArrayObtainStyledAttributes.recycle();
        c3660.m8255();
        return c3660;
    }

    @Override // android.view.ViewGroup
    public final ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        C3660 c3660 = new C3660(layoutParams);
        c3660.f13622 = -1;
        c3660.f13634 = -1;
        c3660.f13601 = -1.0f;
        c3660.f13643 = true;
        c3660.f13589 = -1;
        c3660.f13600 = -1;
        c3660.f13597 = -1;
        c3660.f13640 = -1;
        c3660.f13608 = -1;
        c3660.f13636 = -1;
        c3660.f13639 = -1;
        c3660.f13594 = -1;
        c3660.f13630 = -1;
        c3660.f13627 = -1;
        c3660.f13632 = -1;
        c3660.f13593 = -1;
        c3660.f13612 = 0;
        c3660.f13638 = 0.0f;
        c3660.f13609 = -1;
        c3660.f13626 = -1;
        c3660.f13604 = -1;
        c3660.f13624 = -1;
        c3660.f13617 = Integer.MIN_VALUE;
        c3660.f13646 = Integer.MIN_VALUE;
        c3660.f13645 = Integer.MIN_VALUE;
        c3660.f13619 = Integer.MIN_VALUE;
        c3660.f13616 = Integer.MIN_VALUE;
        c3660.f13584 = Integer.MIN_VALUE;
        c3660.f13613 = Integer.MIN_VALUE;
        c3660.f13603 = 0;
        c3660.f13598 = 0.5f;
        c3660.f13629 = 0.5f;
        c3660.f13623 = null;
        c3660.f13641 = -1.0f;
        c3660.f13605 = -1.0f;
        c3660.f13635 = 0;
        c3660.f13586 = 0;
        c3660.f13648 = 0;
        c3660.f13606 = 0;
        c3660.f13614 = 0;
        c3660.f13602 = 0;
        c3660.f13592 = 0;
        c3660.f13585 = 0;
        c3660.f13588 = 1.0f;
        c3660.f13607 = 1.0f;
        c3660.f13595 = -1;
        c3660.f13633 = -1;
        c3660.f13615 = -1;
        c3660.f13590 = false;
        c3660.f13599 = false;
        c3660.f13628 = null;
        c3660.f13644 = 0;
        c3660.f13583 = true;
        c3660.f13591 = true;
        c3660.f13637 = false;
        c3660.f13596 = false;
        c3660.f13611 = false;
        c3660.f13582 = -1;
        c3660.f13642 = -1;
        c3660.f13620 = -1;
        c3660.f13587 = -1;
        c3660.f13647 = Integer.MIN_VALUE;
        c3660.f13618 = Integer.MIN_VALUE;
        c3660.f13621 = 0.5f;
        c3660.f13610 = new C0425();
        if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
            ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
            ((ViewGroup.MarginLayoutParams) c3660).leftMargin = marginLayoutParams.leftMargin;
            ((ViewGroup.MarginLayoutParams) c3660).rightMargin = marginLayoutParams.rightMargin;
            ((ViewGroup.MarginLayoutParams) c3660).topMargin = marginLayoutParams.topMargin;
            ((ViewGroup.MarginLayoutParams) c3660).bottomMargin = marginLayoutParams.bottomMargin;
            c3660.setMarginStart(marginLayoutParams.getMarginStart());
            c3660.setMarginEnd(marginLayoutParams.getMarginEnd());
        }
        if (!(layoutParams instanceof C3660)) {
            return c3660;
        }
        C3660 c36602 = (C3660) layoutParams;
        c3660.f13622 = c36602.f13622;
        c3660.f13634 = c36602.f13634;
        c3660.f13601 = c36602.f13601;
        c3660.f13643 = c36602.f13643;
        c3660.f13589 = c36602.f13589;
        c3660.f13600 = c36602.f13600;
        c3660.f13597 = c36602.f13597;
        c3660.f13640 = c36602.f13640;
        c3660.f13608 = c36602.f13608;
        c3660.f13636 = c36602.f13636;
        c3660.f13639 = c36602.f13639;
        c3660.f13594 = c36602.f13594;
        c3660.f13630 = c36602.f13630;
        c3660.f13627 = c36602.f13627;
        c3660.f13632 = c36602.f13632;
        c3660.f13593 = c36602.f13593;
        c3660.f13612 = c36602.f13612;
        c3660.f13638 = c36602.f13638;
        c3660.f13609 = c36602.f13609;
        c3660.f13626 = c36602.f13626;
        c3660.f13604 = c36602.f13604;
        c3660.f13624 = c36602.f13624;
        c3660.f13617 = c36602.f13617;
        c3660.f13646 = c36602.f13646;
        c3660.f13645 = c36602.f13645;
        c3660.f13619 = c36602.f13619;
        c3660.f13616 = c36602.f13616;
        c3660.f13584 = c36602.f13584;
        c3660.f13613 = c36602.f13613;
        c3660.f13603 = c36602.f13603;
        c3660.f13598 = c36602.f13598;
        c3660.f13629 = c36602.f13629;
        c3660.f13623 = c36602.f13623;
        c3660.f13641 = c36602.f13641;
        c3660.f13605 = c36602.f13605;
        c3660.f13635 = c36602.f13635;
        c3660.f13586 = c36602.f13586;
        c3660.f13590 = c36602.f13590;
        c3660.f13599 = c36602.f13599;
        c3660.f13648 = c36602.f13648;
        c3660.f13606 = c36602.f13606;
        c3660.f13614 = c36602.f13614;
        c3660.f13592 = c36602.f13592;
        c3660.f13602 = c36602.f13602;
        c3660.f13585 = c36602.f13585;
        c3660.f13588 = c36602.f13588;
        c3660.f13607 = c36602.f13607;
        c3660.f13595 = c36602.f13595;
        c3660.f13633 = c36602.f13633;
        c3660.f13615 = c36602.f13615;
        c3660.f13583 = c36602.f13583;
        c3660.f13591 = c36602.f13591;
        c3660.f13637 = c36602.f13637;
        c3660.f13596 = c36602.f13596;
        c3660.f13582 = c36602.f13582;
        c3660.f13642 = c36602.f13642;
        c3660.f13620 = c36602.f13620;
        c3660.f13587 = c36602.f13587;
        c3660.f13647 = c36602.f13647;
        c3660.f13618 = c36602.f13618;
        c3660.f13621 = c36602.f13621;
        c3660.f13628 = c36602.f13628;
        c3660.f13644 = c36602.f13644;
        c3660.f13610 = c36602.f13610;
        return c3660;
    }

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

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

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

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

    public int getOptimizationLevel() {
        return this.f279.f7922;
    }

    public String getSceneString() {
        int id;
        StringBuilder sb = new StringBuilder();
        C1968 c1968 = this.f279;
        if (c1968.f2408 == null) {
            int id2 = getId();
            if (id2 != -1) {
                c1968.f2408 = getContext().getResources().getResourceEntryName(id2);
            } else {
                c1968.f2408 = "parent";
            }
        }
        if (c1968.f2392 == null) {
            c1968.f2392 = c1968.f2408;
        }
        ArrayList arrayList = c1968.f7910;
        int size = arrayList.size();
        int i = 0;
        while (i < size) {
            Object obj = arrayList.get(i);
            i++;
            C0425 c0425 = (C0425) obj;
            View view = c0425.f2354;
            if (view != null) {
                if (c0425.f2408 == null && (id = view.getId()) != -1) {
                    c0425.f2408 = getContext().getResources().getResourceEntryName(id);
                }
                if (c0425.f2392 == null) {
                    c0425.f2392 = c0425.f2408;
                }
            }
        }
        c1968.mo2003(sb);
        return sb.toString();
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        int childCount = getChildCount();
        boolean zIsInEditMode = isInEditMode();
        for (int i5 = 0; i5 < childCount; i5++) {
            View childAt = getChildAt(i5);
            C3660 c3660 = (C3660) childAt.getLayoutParams();
            C0425 c0425 = c3660.f13610;
            if (childAt.getVisibility() != 8 || c3660.f13596 || c3660.f13611 || zIsInEditMode) {
                int iM2009 = c0425.m2009();
                int iM1993 = c0425.m1993();
                childAt.layout(iM2009, iM1993, c0425.m1994() + iM2009, c0425.m2010() + iM1993);
            }
        }
        ArrayList arrayList = this.f271;
        int size = arrayList.size();
        if (size > 0) {
            for (int i6 = 0; i6 < size; i6++) {
                ((AbstractC3075) arrayList.get(i6)).mo73();
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:205:0x04e9  */
    /* JADX WARN: Removed duplicated region for block: B:259:0x0633  */
    /* JADX WARN: Removed duplicated region for block: B:264:0x064b  */
    /* JADX WARN: Removed duplicated region for block: B:271:0x0669  */
    /* JADX WARN: Removed duplicated region for block: B:277:0x068b  */
    /* JADX WARN: Removed duplicated region for block: B:285:0x06b5  */
    /* JADX WARN: Removed duplicated region for block: B:290:0x06d2  */
    /* JADX WARN: Removed duplicated region for block: B:297:0x06f4  */
    /* JADX WARN: Removed duplicated region for block: B:299:0x06ff  */
    /* JADX WARN: Removed duplicated region for block: B:307:0x071d  */
    /* JADX WARN: Removed duplicated region for block: B:310:0x0725  */
    /* JADX WARN: Removed duplicated region for block: B:382:0x0848  */
    /* JADX WARN: Removed duplicated region for block: B:385:0x084e  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void onMeasure(int r34, int r35) throws java.lang.IllegalAccessException, android.content.res.Resources.NotFoundException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException {
        /*
            Method dump skipped, instructions count: 2344
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.onMeasure(int, int):void");
    }

    @Override // android.view.ViewGroup
    public final void onViewAdded(View view) {
        super.onViewAdded(view);
        C0425 c0425M71 = m71(view);
        if ((view instanceof Guideline) && !(c0425M71 instanceof C4454)) {
            C3660 c3660 = (C3660) view.getLayoutParams();
            C4454 c4454 = new C4454();
            c3660.f13610 = c4454;
            c3660.f13596 = true;
            c4454.m9476(c3660.f13615);
        }
        if (view instanceof AbstractC3075) {
            AbstractC3075 abstractC3075 = (AbstractC3075) view;
            abstractC3075.m7406();
            ((C3660) view.getLayoutParams()).f13611 = true;
            ArrayList arrayList = this.f271;
            if (!arrayList.contains(abstractC3075)) {
                arrayList.add(abstractC3075);
            }
        }
        this.f274.put(view.getId(), view);
        this.f269 = true;
    }

    @Override // android.view.ViewGroup
    public final void onViewRemoved(View view) {
        super.onViewRemoved(view);
        this.f274.remove(view.getId());
        C0425 c0425M71 = m71(view);
        this.f279.f7910.remove(c0425M71);
        c0425M71.mo1995();
        this.f271.remove(view);
        this.f269 = true;
    }

    @Override // android.view.View, android.view.ViewParent
    public final void requestLayout() {
        this.f269 = true;
        super.requestLayout();
    }

    public void setConstraintSet(C1047 c1047) {
        this.f266 = c1047;
    }

    @Override // android.view.View
    public void setId(int i) {
        int id = getId();
        SparseArray sparseArray = this.f274;
        sparseArray.remove(id);
        super.setId(i);
        sparseArray.put(getId(), this);
    }

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

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

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

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

    public void setOnConstraintsChanged(AbstractC2992 abstractC2992) {
        ᵪᵨ r0 = this.f275;
        if (r0 != null) {
            r0.getClass();
        }
    }

    public void setOptimizationLevel(int i) {
        this.f267 = i;
        C1968 c1968 = this.f279;
        c1968.f7922 = i;
        C1692.f6738 = c1968.m5474(512);
    }

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

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final void m67(C0425 c0425, C3660 c3660, SparseArray sparseArray, int i, int i2) {
        View view = (View) this.f274.get(i);
        C0425 c04252 = (C0425) sparseArray.get(i);
        if (c04252 == null || view == null || !(view.getLayoutParams() instanceof C3660)) {
            return;
        }
        c3660.f13637 = true;
        if (i2 == 6) {
            C3660 c36602 = (C3660) view.getLayoutParams();
            c36602.f13637 = true;
            c36602.f13610.f2370 = true;
        }
        c0425.mo1992(6).m3355(c04252.mo1992(i2), c3660.f13603, c3660.f13613, true);
        c0425.f2370 = true;
        c0425.mo1992(3).m3356();
        c0425.mo1992(5).m3356();
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final void m68(AttributeSet attributeSet, int i, int i2) throws XmlPullParserException, IOException {
        C1968 c1968 = this.f279;
        c1968.f2354 = this;
        C1347 c1347 = this.f276;
        c1968.f7916 = c1347;
        c1968.f7909.f6829 = c1347;
        this.f274.put(getId(), this);
        this.f266 = null;
        if (attributeSet != null) {
            TypedArray typedArrayObtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, AbstractC3962.f14949, i, i2);
            int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
            for (int i3 = 0; i3 < indexCount; i3++) {
                int index = typedArrayObtainStyledAttributes.getIndex(i3);
                if (index == 16) {
                    this.f278 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f278);
                } else if (index == 17) {
                    this.f272 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f272);
                } else if (index == 14) {
                    this.f270 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f270);
                } else if (index == 15) {
                    this.f265 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f265);
                } else if (index == 113) {
                    this.f267 = typedArrayObtainStyledAttributes.getInt(index, this.f267);
                } else if (index == 56) {
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    if (resourceId != 0) {
                        try {
                            m69(resourceId);
                        } catch (Resources.NotFoundException unused) {
                            this.f275 = null;
                        }
                    }
                } else if (index == 34) {
                    int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    try {
                        C1047 c1047 = new C1047();
                        this.f266 = c1047;
                        c1047.m3421(getContext(), resourceId2);
                    } catch (Resources.NotFoundException unused2) {
                        this.f266 = null;
                    }
                    this.f273 = resourceId2;
                }
            }
            typedArrayObtainStyledAttributes.recycle();
        }
        c1968.f7922 = this.f267;
        C1692.f6738 = c1968.m5474(512);
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final void m69(int i) throws XmlPullParserException, Resources.NotFoundException, IOException {
        String str;
        Context context = getContext();
        ᵪᵨ r0 = new ᵪᵨ(13, false);
        r0.ᵢˇᵭ = new SparseArray();
        r0.ᵿʗᵝʽ = new SparseArray();
        XmlResourceParser xml = context.getResources().getXml(i);
        try {
            C3513 c3513 = null;
            for (int eventType = xml.getEventType(); eventType != 1; eventType = xml.next()) {
                if (eventType == 2) {
                    String name = xml.getName();
                    switch (name.hashCode()) {
                        case -1349929691:
                            if (name.equals("ConstraintSet")) {
                                r0.ᵤᵙᵷ(context, xml);
                                break;
                            } else {
                                break;
                            }
                        case 80204913:
                            if (name.equals("State")) {
                                C3513 c35132 = new C3513(context, xml);
                                ((SparseArray) r0.ᵢˇᵭ).put(c35132.f13183, c35132);
                                c3513 = c35132;
                                break;
                            } else {
                                break;
                            }
                        case 1382829617:
                            str = "StateSet";
                            name.equals(str);
                            break;
                        case 1657696882:
                            str = "layoutDescription";
                            name.equals(str);
                            break;
                        case 1901439077:
                            if (name.equals("Variant")) {
                                C4318 c4318 = new C4318(context, xml);
                                if (c3513 != null) {
                                    ((ArrayList) c3513.f13184).add(c4318);
                                    break;
                                } else {
                                    break;
                                }
                            } else {
                                break;
                            }
                    }
                }
            }
        } catch (IOException | XmlPullParserException unused) {
        }
        this.f275 = r0;
    }

    /* JADX WARN: Removed duplicated region for block: B:160:0x030c  */
    /* JADX WARN: Removed duplicated region for block: B:164:0x032b  */
    /* JADX WARN: Removed duplicated region for block: B:168:0x034c  */
    /* JADX WARN: Removed duplicated region for block: B:176:0x0368  */
    /* renamed from: ᵸˑ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void m70(defpackage.C1968 r28, int r29, int r30, int r31) {
        /*
            Method dump skipped, instructions count: 1756
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.m70(ːᵙ, int, int, int):void");
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final C0425 m71(View view) {
        if (view == this) {
            return this.f279;
        }
        if (view == null) {
            return null;
        }
        if (view.getLayoutParams() instanceof C3660) {
            return ((C3660) view.getLayoutParams()).f13610;
        }
        view.setLayoutParams(generateLayoutParams(view.getLayoutParams()));
        if (view.getLayoutParams() instanceof C3660) {
            return ((C3660) view.getLayoutParams()).f13610;
        }
        return null;
    }
}
