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.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import defpackage.AbstractC0268;
import defpackage.AbstractC1725;
import defpackage.AbstractC3589;
import defpackage.AbstractC3653;
import defpackage.AbstractC4329;
import defpackage.AbstractC4444;
import defpackage.AbstractC4476;
import defpackage.AbstractC4575;
import defpackage.C0133;
import defpackage.C0148;
import defpackage.C0295;
import defpackage.C0746;
import defpackage.C0767;
import defpackage.C0953;
import defpackage.C1366;
import defpackage.C1443;
import defpackage.C1873;
import defpackage.C2103;
import defpackage.C2622;
import defpackage.C2972;
import defpackage.C2975;
import defpackage.C3059;
import defpackage.C3100;
import defpackage.C3501;
import defpackage.C3556;
import defpackage.C3673;
import defpackage.C3678;
import defpackage.C3701;
import defpackage.C4193;
import defpackage.C4399;
import defpackage.C4503;
import defpackage.C4935;
import defpackage.C5224;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import org.xmlpull.v1.XmlPullParserException;

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

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public static C2972 f264;

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public C0767 f265;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public final C0133 f266;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public final SparseArray f267;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public int f268;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public HashMap f269;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final SparseArray f270;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public boolean f271;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public C3501 f272;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final C3100 f273;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final ArrayList f274;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public int f275;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public int f276;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public int f277;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public int f278;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public int f279;

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

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

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

    public ConstraintLayout(Context context, AttributeSet attributeSet, int i, int i2) {
        super(context, attributeSet, i, i2);
        this.f270 = new SparseArray();
        this.f274 = new ArrayList(4);
        this.f273 = new C3100();
        this.f276 = 0;
        this.f277 = 0;
        this.f278 = Integer.MAX_VALUE;
        this.f268 = Integer.MAX_VALUE;
        this.f271 = true;
        this.f279 = 257;
        this.f272 = null;
        this.f265 = null;
        this.f275 = -1;
        this.f269 = new HashMap();
        this.f267 = new SparseArray();
        this.f266 = new C0133(this, this);
        m71(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 C2972 getSharedValues() {
        if (f264 == null) {
            C2972 c2972 = new C2972();
            new SparseIntArray();
            new HashMap();
            f264 = c2972;
        }
        return f264;
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public static C2975 m66() {
        C2975 c2975 = new C2975(-2, -2);
        c2975.f11490 = -1;
        c2975.f11433 = -1;
        c2975.f11462 = -1.0f;
        c2975.f11496 = true;
        c2975.f11480 = -1;
        c2975.f11500 = -1;
        c2975.f11493 = -1;
        c2975.f11452 = -1;
        c2975.f11499 = -1;
        c2975.f11489 = -1;
        c2975.f11495 = -1;
        c2975.f11486 = -1;
        c2975.f11473 = -1;
        c2975.f11455 = -1;
        c2975.f11482 = -1;
        c2975.f11475 = -1;
        c2975.f11488 = 0;
        c2975.f11449 = 0.0f;
        c2975.f11446 = -1;
        c2975.f11460 = -1;
        c2975.f11451 = -1;
        c2975.f11457 = -1;
        c2975.f11472 = Integer.MIN_VALUE;
        c2975.f11466 = Integer.MIN_VALUE;
        c2975.f11481 = Integer.MIN_VALUE;
        c2975.f11487 = Integer.MIN_VALUE;
        c2975.f11494 = Integer.MIN_VALUE;
        c2975.f11443 = Integer.MIN_VALUE;
        c2975.f11458 = Integer.MIN_VALUE;
        c2975.f11497 = 0;
        c2975.f11465 = 0.5f;
        c2975.f11435 = 0.5f;
        c2975.f11476 = null;
        c2975.f11447 = -1.0f;
        c2975.f11440 = -1.0f;
        c2975.f11438 = 0;
        c2975.f11453 = 0;
        c2975.f11450 = 0;
        c2975.f11470 = 0;
        c2975.f11491 = 0;
        c2975.f11464 = 0;
        c2975.f11434 = 0;
        c2975.f11444 = 0;
        c2975.f11479 = 1.0f;
        c2975.f11474 = 1.0f;
        c2975.f11448 = -1;
        c2975.f11439 = -1;
        c2975.f11437 = -1;
        c2975.f11461 = false;
        c2975.f11469 = false;
        c2975.f11436 = null;
        c2975.f11477 = 0;
        c2975.f11478 = true;
        c2975.f11454 = true;
        c2975.f11445 = false;
        c2975.f11441 = false;
        c2975.f11456 = false;
        c2975.f11471 = -1;
        c2975.f11463 = -1;
        c2975.f11467 = -1;
        c2975.f11483 = -1;
        c2975.f11492 = Integer.MIN_VALUE;
        c2975.f11484 = Integer.MIN_VALUE;
        c2975.f11459 = 0.5f;
        c2975.f11485 = new C2622();
        return c2975;
    }

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

    @Override // android.view.ViewGroup, android.view.View
    public final void dispatchDraw(Canvas canvas) {
        Object tag;
        int size;
        ArrayList arrayList = this.f274;
        if (arrayList != null && (size = arrayList.size()) > 0) {
            for (int i = 0; i < size; i++) {
                ((AbstractC4444) 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.f271 = 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) {
        Context context = getContext();
        C2975 c2975 = new C2975(context, attributeSet);
        c2975.f11490 = -1;
        c2975.f11433 = -1;
        c2975.f11462 = -1.0f;
        c2975.f11496 = true;
        c2975.f11480 = -1;
        c2975.f11500 = -1;
        c2975.f11493 = -1;
        c2975.f11452 = -1;
        c2975.f11499 = -1;
        c2975.f11489 = -1;
        c2975.f11495 = -1;
        c2975.f11486 = -1;
        c2975.f11473 = -1;
        c2975.f11455 = -1;
        c2975.f11482 = -1;
        c2975.f11475 = -1;
        c2975.f11488 = 0;
        c2975.f11449 = 0.0f;
        c2975.f11446 = -1;
        c2975.f11460 = -1;
        c2975.f11451 = -1;
        c2975.f11457 = -1;
        c2975.f11472 = Integer.MIN_VALUE;
        c2975.f11466 = Integer.MIN_VALUE;
        c2975.f11481 = Integer.MIN_VALUE;
        c2975.f11487 = Integer.MIN_VALUE;
        c2975.f11494 = Integer.MIN_VALUE;
        c2975.f11443 = Integer.MIN_VALUE;
        c2975.f11458 = Integer.MIN_VALUE;
        c2975.f11497 = 0;
        c2975.f11465 = 0.5f;
        c2975.f11435 = 0.5f;
        c2975.f11476 = null;
        c2975.f11447 = -1.0f;
        c2975.f11440 = -1.0f;
        c2975.f11438 = 0;
        c2975.f11453 = 0;
        c2975.f11450 = 0;
        c2975.f11470 = 0;
        c2975.f11491 = 0;
        c2975.f11464 = 0;
        c2975.f11434 = 0;
        c2975.f11444 = 0;
        c2975.f11479 = 1.0f;
        c2975.f11474 = 1.0f;
        c2975.f11448 = -1;
        c2975.f11439 = -1;
        c2975.f11437 = -1;
        c2975.f11461 = false;
        c2975.f11469 = false;
        c2975.f11436 = null;
        c2975.f11477 = 0;
        c2975.f11478 = true;
        c2975.f11454 = true;
        c2975.f11445 = false;
        c2975.f11441 = false;
        c2975.f11456 = false;
        c2975.f11471 = -1;
        c2975.f11463 = -1;
        c2975.f11467 = -1;
        c2975.f11483 = -1;
        c2975.f11492 = Integer.MIN_VALUE;
        c2975.f11484 = Integer.MIN_VALUE;
        c2975.f11459 = 0.5f;
        c2975.f11485 = new C2622();
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC4329.f16476);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i = 0; i < indexCount; i++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i);
            int i2 = AbstractC1725.f6919.get(index);
            switch (i2) {
                case 1:
                    c2975.f11437 = typedArrayObtainStyledAttributes.getInt(index, c2975.f11437);
                    break;
                case 2:
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11475);
                    c2975.f11475 = resourceId;
                    if (resourceId == -1) {
                        c2975.f11475 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 3:
                    c2975.f11488 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11488);
                    break;
                case 4:
                    float f = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11449) % 360.0f;
                    c2975.f11449 = f;
                    if (f < 0.0f) {
                        c2975.f11449 = (360.0f - f) % 360.0f;
                    }
                    break;
                case 5:
                    c2975.f11490 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c2975.f11490);
                    break;
                case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                    c2975.f11433 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c2975.f11433);
                    break;
                case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                    c2975.f11462 = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11462);
                    break;
                case C5224.BYTES_FIELD_NUMBER /* 8 */:
                    int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11480);
                    c2975.f11480 = resourceId2;
                    if (resourceId2 == -1) {
                        c2975.f11480 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 9:
                    int resourceId3 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11500);
                    c2975.f11500 = resourceId3;
                    if (resourceId3 == -1) {
                        c2975.f11500 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 10:
                    int resourceId4 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11493);
                    c2975.f11493 = resourceId4;
                    if (resourceId4 == -1) {
                        c2975.f11493 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 11:
                    int resourceId5 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11452);
                    c2975.f11452 = resourceId5;
                    if (resourceId5 == -1) {
                        c2975.f11452 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 12:
                    int resourceId6 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11499);
                    c2975.f11499 = resourceId6;
                    if (resourceId6 == -1) {
                        c2975.f11499 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 13:
                    int resourceId7 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11489);
                    c2975.f11489 = resourceId7;
                    if (resourceId7 == -1) {
                        c2975.f11489 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 14:
                    int resourceId8 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11495);
                    c2975.f11495 = resourceId8;
                    if (resourceId8 == -1) {
                        c2975.f11495 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 15:
                    int resourceId9 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11486);
                    c2975.f11486 = resourceId9;
                    if (resourceId9 == -1) {
                        c2975.f11486 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 16:
                    int resourceId10 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11473);
                    c2975.f11473 = resourceId10;
                    if (resourceId10 == -1) {
                        c2975.f11473 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 17:
                    int resourceId11 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11446);
                    c2975.f11446 = resourceId11;
                    if (resourceId11 == -1) {
                        c2975.f11446 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 18:
                    int resourceId12 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11460);
                    c2975.f11460 = resourceId12;
                    if (resourceId12 == -1) {
                        c2975.f11460 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 19:
                    int resourceId13 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11451);
                    c2975.f11451 = resourceId13;
                    if (resourceId13 == -1) {
                        c2975.f11451 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 20:
                    int resourceId14 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11457);
                    c2975.f11457 = resourceId14;
                    if (resourceId14 == -1) {
                        c2975.f11457 = typedArrayObtainStyledAttributes.getInt(index, -1);
                    }
                    break;
                case 21:
                    c2975.f11472 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11472);
                    break;
                case 22:
                    c2975.f11466 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11466);
                    break;
                case 23:
                    c2975.f11481 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11481);
                    break;
                case 24:
                    c2975.f11487 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11487);
                    break;
                case 25:
                    c2975.f11494 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11494);
                    break;
                case 26:
                    c2975.f11443 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11443);
                    break;
                case 27:
                    c2975.f11461 = typedArrayObtainStyledAttributes.getBoolean(index, c2975.f11461);
                    break;
                case 28:
                    c2975.f11469 = typedArrayObtainStyledAttributes.getBoolean(index, c2975.f11469);
                    break;
                case 29:
                    c2975.f11465 = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11465);
                    break;
                case 30:
                    c2975.f11435 = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11435);
                    break;
                case 31:
                    c2975.f11450 = typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 32:
                    c2975.f11470 = typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 33:
                    try {
                        c2975.f11491 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11491);
                    } catch (Exception unused) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c2975.f11491) == -2) {
                            c2975.f11491 = -2;
                        }
                    }
                    break;
                case 34:
                    try {
                        c2975.f11434 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11434);
                    } catch (Exception unused2) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c2975.f11434) == -2) {
                            c2975.f11434 = -2;
                        }
                    }
                    break;
                case 35:
                    c2975.f11479 = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, c2975.f11479));
                    c2975.f11450 = 2;
                    break;
                case 36:
                    try {
                        c2975.f11464 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11464);
                    } catch (Exception unused3) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c2975.f11464) == -2) {
                            c2975.f11464 = -2;
                        }
                    }
                    break;
                case 37:
                    try {
                        c2975.f11444 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11444);
                    } catch (Exception unused4) {
                        if (typedArrayObtainStyledAttributes.getInt(index, c2975.f11444) == -2) {
                            c2975.f11444 = -2;
                        }
                    }
                    break;
                case 38:
                    c2975.f11474 = Math.max(0.0f, typedArrayObtainStyledAttributes.getFloat(index, c2975.f11474));
                    c2975.f11470 = 2;
                    break;
                default:
                    switch (i2) {
                        case 44:
                            C3501.m7998(c2975, typedArrayObtainStyledAttributes.getString(index));
                            break;
                        case 45:
                            c2975.f11447 = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11447);
                            break;
                        case 46:
                            c2975.f11440 = typedArrayObtainStyledAttributes.getFloat(index, c2975.f11440);
                            break;
                        case 47:
                            c2975.f11438 = typedArrayObtainStyledAttributes.getInt(index, 0);
                            break;
                        case 48:
                            c2975.f11453 = typedArrayObtainStyledAttributes.getInt(index, 0);
                            break;
                        case 49:
                            c2975.f11448 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c2975.f11448);
                            break;
                        case 50:
                            c2975.f11439 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, c2975.f11439);
                            break;
                        case 51:
                            c2975.f11436 = typedArrayObtainStyledAttributes.getString(index);
                            break;
                        case 52:
                            int resourceId15 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11455);
                            c2975.f11455 = resourceId15;
                            if (resourceId15 == -1) {
                                c2975.f11455 = typedArrayObtainStyledAttributes.getInt(index, -1);
                            }
                            break;
                        case 53:
                            int resourceId16 = typedArrayObtainStyledAttributes.getResourceId(index, c2975.f11482);
                            c2975.f11482 = resourceId16;
                            if (resourceId16 == -1) {
                                c2975.f11482 = typedArrayObtainStyledAttributes.getInt(index, -1);
                            }
                            break;
                        case 54:
                            c2975.f11497 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11497);
                            break;
                        case 55:
                            c2975.f11458 = typedArrayObtainStyledAttributes.getDimensionPixelSize(index, c2975.f11458);
                            break;
                        default:
                            switch (i2) {
                                case 64:
                                    C3501.m7999(c2975, typedArrayObtainStyledAttributes, index, 0);
                                    break;
                                case 65:
                                    C3501.m7999(c2975, typedArrayObtainStyledAttributes, index, 1);
                                    break;
                                case 66:
                                    c2975.f11477 = typedArrayObtainStyledAttributes.getInt(index, c2975.f11477);
                                    break;
                                case 67:
                                    c2975.f11496 = typedArrayObtainStyledAttributes.getBoolean(index, c2975.f11496);
                                    break;
                            }
                            break;
                    }
                    break;
            }
        }
        typedArrayObtainStyledAttributes.recycle();
        c2975.m7057();
        return c2975;
    }

    @Override // android.view.ViewGroup
    public final ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        C2975 c2975 = new C2975(layoutParams);
        c2975.f11490 = -1;
        c2975.f11433 = -1;
        c2975.f11462 = -1.0f;
        c2975.f11496 = true;
        c2975.f11480 = -1;
        c2975.f11500 = -1;
        c2975.f11493 = -1;
        c2975.f11452 = -1;
        c2975.f11499 = -1;
        c2975.f11489 = -1;
        c2975.f11495 = -1;
        c2975.f11486 = -1;
        c2975.f11473 = -1;
        c2975.f11455 = -1;
        c2975.f11482 = -1;
        c2975.f11475 = -1;
        c2975.f11488 = 0;
        c2975.f11449 = 0.0f;
        c2975.f11446 = -1;
        c2975.f11460 = -1;
        c2975.f11451 = -1;
        c2975.f11457 = -1;
        c2975.f11472 = Integer.MIN_VALUE;
        c2975.f11466 = Integer.MIN_VALUE;
        c2975.f11481 = Integer.MIN_VALUE;
        c2975.f11487 = Integer.MIN_VALUE;
        c2975.f11494 = Integer.MIN_VALUE;
        c2975.f11443 = Integer.MIN_VALUE;
        c2975.f11458 = Integer.MIN_VALUE;
        c2975.f11497 = 0;
        c2975.f11465 = 0.5f;
        c2975.f11435 = 0.5f;
        c2975.f11476 = null;
        c2975.f11447 = -1.0f;
        c2975.f11440 = -1.0f;
        c2975.f11438 = 0;
        c2975.f11453 = 0;
        c2975.f11450 = 0;
        c2975.f11470 = 0;
        c2975.f11491 = 0;
        c2975.f11464 = 0;
        c2975.f11434 = 0;
        c2975.f11444 = 0;
        c2975.f11479 = 1.0f;
        c2975.f11474 = 1.0f;
        c2975.f11448 = -1;
        c2975.f11439 = -1;
        c2975.f11437 = -1;
        c2975.f11461 = false;
        c2975.f11469 = false;
        c2975.f11436 = null;
        c2975.f11477 = 0;
        c2975.f11478 = true;
        c2975.f11454 = true;
        c2975.f11445 = false;
        c2975.f11441 = false;
        c2975.f11456 = false;
        c2975.f11471 = -1;
        c2975.f11463 = -1;
        c2975.f11467 = -1;
        c2975.f11483 = -1;
        c2975.f11492 = Integer.MIN_VALUE;
        c2975.f11484 = Integer.MIN_VALUE;
        c2975.f11459 = 0.5f;
        c2975.f11485 = new C2622();
        if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
            ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
            ((ViewGroup.MarginLayoutParams) c2975).leftMargin = marginLayoutParams.leftMargin;
            ((ViewGroup.MarginLayoutParams) c2975).rightMargin = marginLayoutParams.rightMargin;
            ((ViewGroup.MarginLayoutParams) c2975).topMargin = marginLayoutParams.topMargin;
            ((ViewGroup.MarginLayoutParams) c2975).bottomMargin = marginLayoutParams.bottomMargin;
            c2975.setMarginStart(marginLayoutParams.getMarginStart());
            c2975.setMarginEnd(marginLayoutParams.getMarginEnd());
        }
        if (!(layoutParams instanceof C2975)) {
            return c2975;
        }
        C2975 c29752 = (C2975) layoutParams;
        c2975.f11490 = c29752.f11490;
        c2975.f11433 = c29752.f11433;
        c2975.f11462 = c29752.f11462;
        c2975.f11496 = c29752.f11496;
        c2975.f11480 = c29752.f11480;
        c2975.f11500 = c29752.f11500;
        c2975.f11493 = c29752.f11493;
        c2975.f11452 = c29752.f11452;
        c2975.f11499 = c29752.f11499;
        c2975.f11489 = c29752.f11489;
        c2975.f11495 = c29752.f11495;
        c2975.f11486 = c29752.f11486;
        c2975.f11473 = c29752.f11473;
        c2975.f11455 = c29752.f11455;
        c2975.f11482 = c29752.f11482;
        c2975.f11475 = c29752.f11475;
        c2975.f11488 = c29752.f11488;
        c2975.f11449 = c29752.f11449;
        c2975.f11446 = c29752.f11446;
        c2975.f11460 = c29752.f11460;
        c2975.f11451 = c29752.f11451;
        c2975.f11457 = c29752.f11457;
        c2975.f11472 = c29752.f11472;
        c2975.f11466 = c29752.f11466;
        c2975.f11481 = c29752.f11481;
        c2975.f11487 = c29752.f11487;
        c2975.f11494 = c29752.f11494;
        c2975.f11443 = c29752.f11443;
        c2975.f11458 = c29752.f11458;
        c2975.f11497 = c29752.f11497;
        c2975.f11465 = c29752.f11465;
        c2975.f11435 = c29752.f11435;
        c2975.f11476 = c29752.f11476;
        c2975.f11447 = c29752.f11447;
        c2975.f11440 = c29752.f11440;
        c2975.f11438 = c29752.f11438;
        c2975.f11453 = c29752.f11453;
        c2975.f11461 = c29752.f11461;
        c2975.f11469 = c29752.f11469;
        c2975.f11450 = c29752.f11450;
        c2975.f11470 = c29752.f11470;
        c2975.f11491 = c29752.f11491;
        c2975.f11434 = c29752.f11434;
        c2975.f11464 = c29752.f11464;
        c2975.f11444 = c29752.f11444;
        c2975.f11479 = c29752.f11479;
        c2975.f11474 = c29752.f11474;
        c2975.f11448 = c29752.f11448;
        c2975.f11439 = c29752.f11439;
        c2975.f11437 = c29752.f11437;
        c2975.f11478 = c29752.f11478;
        c2975.f11454 = c29752.f11454;
        c2975.f11445 = c29752.f11445;
        c2975.f11441 = c29752.f11441;
        c2975.f11471 = c29752.f11471;
        c2975.f11463 = c29752.f11463;
        c2975.f11467 = c29752.f11467;
        c2975.f11483 = c29752.f11483;
        c2975.f11492 = c29752.f11492;
        c2975.f11484 = c29752.f11484;
        c2975.f11459 = c29752.f11459;
        c2975.f11436 = c29752.f11436;
        c2975.f11477 = c29752.f11477;
        c2975.f11485 = c29752.f11485;
        return c2975;
    }

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

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

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

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

    public int getOptimizationLevel() {
        return this.f273.f11842;
    }

    public String getSceneString() {
        int id;
        StringBuilder sb = new StringBuilder();
        C3100 c3100 = this.f273;
        if (c3100.f10200 == null) {
            int id2 = getId();
            if (id2 != -1) {
                c3100.f10200 = getContext().getResources().getResourceEntryName(id2);
            } else {
                c3100.f10200 = "parent";
            }
        }
        if (c3100.f10178 == null) {
            c3100.f10178 = c3100.f10200;
        }
        ArrayList arrayList = c3100.f11848;
        int size = arrayList.size();
        int i = 0;
        while (i < size) {
            Object obj = arrayList.get(i);
            i++;
            C2622 c2622 = (C2622) obj;
            View view = c2622.f10182;
            if (view != null) {
                if (c2622.f10200 == null && (id = view.getId()) != -1) {
                    c2622.f10200 = getContext().getResources().getResourceEntryName(id);
                }
                if (c2622.f10178 == null) {
                    c2622.f10178 = c2622.f10200;
                }
            }
        }
        c3100.mo6360(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);
            C2975 c2975 = (C2975) childAt.getLayoutParams();
            C2622 c2622 = c2975.f11485;
            if (childAt.getVisibility() != 8 || c2975.f11441 || c2975.f11456 || zIsInEditMode) {
                int iM6355 = c2622.m6355();
                int iM6354 = c2622.m6354();
                childAt.layout(iM6355, iM6354, c2622.m6374() + iM6355, c2622.m6379() + iM6354);
            }
        }
        ArrayList arrayList = this.f274;
        int size = arrayList.size();
        if (size > 0) {
            for (int i6 = 0; i6 < size; i6++) {
                ((AbstractC4444) arrayList.get(i6)).mo72();
            }
        }
    }

    /* 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.
    */
    public void onMeasure(int i, int i2) {
        boolean z;
        boolean z2;
        boolean z3;
        C2622 c2622;
        int i3;
        C2622 c26222;
        int i4;
        int i5;
        int i6;
        C2622 c26223;
        int i7;
        int i8;
        int i9;
        int i10;
        C2622 c26224;
        int i11;
        int i12;
        int i13;
        C2622 c26225;
        C2975 c2975;
        int i14;
        C2622 c26226;
        float f;
        int i15;
        int i16;
        int i17;
        int i18;
        int i19;
        float fAbs;
        int i20;
        byte b;
        String str;
        int iM9457;
        C3501 c3501;
        HashSet hashSet;
        int i21;
        boolean z4;
        boolean z5;
        int i22;
        int i23;
        C2622 c26227;
        ConstraintLayout constraintLayout = this;
        boolean z6 = constraintLayout.f271;
        constraintLayout.f271 = z6;
        int i24 = 0;
        if (!z6) {
            int childCount = constraintLayout.getChildCount();
            int i25 = 0;
            while (true) {
                if (i25 >= childCount) {
                    break;
                }
                if (constraintLayout.getChildAt(i25).isLayoutRequested()) {
                    constraintLayout.f271 = true;
                    break;
                }
                i25++;
            }
        }
        boolean z7 = (constraintLayout.getContext().getApplicationInfo().flags & 4194304) != 0 && 1 == constraintLayout.getLayoutDirection();
        C3100 c3100 = constraintLayout.f273;
        c3100.f11860 = z7;
        if (constraintLayout.f271) {
            constraintLayout.f271 = false;
            int childCount2 = constraintLayout.getChildCount();
            int i26 = 0;
            while (true) {
                if (i26 >= childCount2) {
                    z = false;
                    break;
                } else {
                    if (constraintLayout.getChildAt(i26).isLayoutRequested()) {
                        z = true;
                        break;
                    }
                    i26++;
                }
            }
            if (z) {
                boolean zIsInEditMode = constraintLayout.isInEditMode();
                int childCount3 = constraintLayout.getChildCount();
                for (int i27 = 0; i27 < childCount3; i27++) {
                    C2622 c2622M67 = constraintLayout.m67(constraintLayout.getChildAt(i27));
                    if (c2622M67 != null) {
                        c2622M67.mo6362();
                    }
                }
                SparseArray sparseArray = constraintLayout.f270;
                if (zIsInEditMode) {
                    int i28 = 0;
                    while (i28 < childCount3) {
                        View childAt = constraintLayout.getChildAt(i28);
                        try {
                            String resourceName = constraintLayout.getResources().getResourceName(childAt.getId());
                            Integer numValueOf = Integer.valueOf(childAt.getId());
                            if ((resourceName != null ? 1 : i24) != 0) {
                                if (constraintLayout.f269 == null) {
                                    constraintLayout.f269 = new HashMap();
                                }
                                int iIndexOf = resourceName.indexOf("/");
                                i23 = i24;
                                try {
                                    constraintLayout.f269.put(iIndexOf != -1 ? resourceName.substring(iIndexOf + 1) : resourceName, numValueOf);
                                } catch (Resources.NotFoundException unused) {
                                }
                            } else {
                                i23 = i24;
                            }
                            int iIndexOf2 = resourceName.indexOf(47);
                            if (iIndexOf2 != -1) {
                                resourceName = resourceName.substring(iIndexOf2 + 1);
                            }
                            int id = childAt.getId();
                            if (id != 0) {
                                View viewFindViewById = (View) sparseArray.get(id);
                                if (viewFindViewById == null && (viewFindViewById = constraintLayout.findViewById(id)) != null && viewFindViewById != constraintLayout && viewFindViewById.getParent() == constraintLayout) {
                                    constraintLayout.onViewAdded(viewFindViewById);
                                }
                                if (viewFindViewById == constraintLayout) {
                                    c26227 = c3100;
                                    c26227.f10178 = resourceName;
                                } else {
                                    c26227 = viewFindViewById == null ? null : ((C2975) viewFindViewById.getLayoutParams()).f11485;
                                    c26227.f10178 = resourceName;
                                }
                            } else {
                                c26227 = c3100;
                                c26227.f10178 = resourceName;
                            }
                        } catch (Resources.NotFoundException unused2) {
                            i23 = i24;
                        }
                        i28++;
                        i24 = i23;
                    }
                }
                int i29 = i24;
                if (constraintLayout.f275 != -1) {
                    for (int i30 = i29; i30 < childCount3; i30++) {
                        constraintLayout.getChildAt(i30).getId();
                    }
                }
                C3501 c35012 = constraintLayout.f272;
                if (c35012 != null) {
                    int childCount4 = constraintLayout.getChildCount();
                    HashMap map = c35012.f13455;
                    HashSet<Integer> hashSet2 = new HashSet(map.keySet());
                    int i31 = i29;
                    while (i31 < childCount4) {
                        View childAt2 = constraintLayout.getChildAt(i31);
                        int id2 = childAt2.getId();
                        if (map.containsKey(Integer.valueOf(id2))) {
                            if (c35012.f13454) {
                                i22 = -1;
                                if (id2 == -1) {
                                    C4935.m10237("All children of ConstraintLayout must have ids to use ConstraintSet");
                                    return;
                                }
                            } else {
                                i22 = -1;
                            }
                            if (id2 != i22 && map.containsKey(Integer.valueOf(id2))) {
                                hashSet2.remove(Integer.valueOf(id2));
                                C4399 c4399 = (C4399) map.get(Integer.valueOf(id2));
                                if (c4399 != null) {
                                    c3501 = c35012;
                                    C3701 c3701 = c4399.f16698;
                                    hashSet = hashSet2;
                                    C0953 c0953 = c4399.f16702;
                                    i21 = i31;
                                    C1366 c1366 = c4399.f16700;
                                    z4 = z;
                                    if (childAt2 instanceof Barrier) {
                                        c0953.f4180 = 1;
                                        Barrier barrier = (Barrier) childAt2;
                                        barrier.setId(id2);
                                        barrier.setType(c0953.f4184);
                                        barrier.setMargin(c0953.f4176);
                                        barrier.setAllowsGoneWidget(c0953.f4155);
                                        int[] iArr = c0953.f4196;
                                        if (iArr != null) {
                                            barrier.setReferencedIds(iArr);
                                        } else {
                                            String str2 = c0953.f4204;
                                            if (str2 != null) {
                                                int[] iArrM7995 = C3501.m7995(barrier, str2);
                                                c0953.f4196 = iArrM7995;
                                                barrier.setReferencedIds(iArrM7995);
                                            }
                                        }
                                    }
                                    C2975 c29752 = (C2975) childAt2.getLayoutParams();
                                    c29752.m7057();
                                    c4399.m9411(c29752);
                                    HashMap map2 = c4399.f16703;
                                    Class<?> cls = childAt2.getClass();
                                    Iterator it = map2.keySet().iterator();
                                    while (it.hasNext()) {
                                        boolean z8 = zIsInEditMode;
                                        String strM8102 = (String) it.next();
                                        HashMap map3 = map2;
                                        C0746 c0746 = (C0746) map2.get(strM8102);
                                        Iterator it2 = it;
                                        if (!c0746.f3382) {
                                            strM8102 = AbstractC3589.m8102("set", strM8102);
                                        }
                                        try {
                                            int iM8218 = AbstractC3653.m8218(c0746.f3379);
                                            Class<?> cls2 = Float.TYPE;
                                            Class<?> cls3 = Integer.TYPE;
                                            switch (iM8218) {
                                                case 0:
                                                    Class<?>[] clsArr = new Class[1];
                                                    clsArr[i29] = cls3;
                                                    Method method = cls.getMethod(strM8102, clsArr);
                                                    Object[] objArr = new Object[1];
                                                    objArr[i29] = Integer.valueOf(c0746.f3380);
                                                    method.invoke(childAt2, objArr);
                                                    break;
                                                case 1:
                                                    Class<?>[] clsArr2 = new Class[1];
                                                    clsArr2[i29] = cls2;
                                                    Method method2 = cls.getMethod(strM8102, clsArr2);
                                                    Object[] objArr2 = new Object[1];
                                                    objArr2[i29] = Float.valueOf(c0746.f3384);
                                                    method2.invoke(childAt2, objArr2);
                                                    break;
                                                case 2:
                                                    Class<?>[] clsArr3 = new Class[1];
                                                    clsArr3[i29] = cls3;
                                                    Method method3 = cls.getMethod(strM8102, clsArr3);
                                                    Object[] objArr3 = new Object[1];
                                                    objArr3[i29] = Integer.valueOf(c0746.f3383);
                                                    method3.invoke(childAt2, objArr3);
                                                    break;
                                                case 3:
                                                    Class<?>[] clsArr4 = new Class[1];
                                                    clsArr4[i29] = Drawable.class;
                                                    Method method4 = cls.getMethod(strM8102, clsArr4);
                                                    ColorDrawable colorDrawable = new ColorDrawable();
                                                    colorDrawable.setColor(c0746.f3383);
                                                    Object[] objArr4 = new Object[1];
                                                    objArr4[i29] = colorDrawable;
                                                    method4.invoke(childAt2, objArr4);
                                                    break;
                                                case 4:
                                                    Class<?>[] clsArr5 = new Class[1];
                                                    clsArr5[i29] = CharSequence.class;
                                                    Method method5 = cls.getMethod(strM8102, clsArr5);
                                                    Object[] objArr5 = new Object[1];
                                                    objArr5[i29] = c0746.f3381;
                                                    method5.invoke(childAt2, objArr5);
                                                    break;
                                                case 5:
                                                    Class<?>[] clsArr6 = new Class[1];
                                                    clsArr6[i29] = Boolean.TYPE;
                                                    Method method6 = cls.getMethod(strM8102, clsArr6);
                                                    Object[] objArr6 = new Object[1];
                                                    objArr6[i29] = Boolean.valueOf(c0746.f3385);
                                                    method6.invoke(childAt2, objArr6);
                                                    break;
                                                case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                                                    Class<?>[] clsArr7 = new Class[1];
                                                    clsArr7[i29] = cls2;
                                                    Method method7 = cls.getMethod(strM8102, clsArr7);
                                                    Object[] objArr7 = new Object[1];
                                                    objArr7[i29] = Float.valueOf(c0746.f3384);
                                                    method7.invoke(childAt2, objArr7);
                                                    break;
                                                case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                                                    Class<?>[] clsArr8 = new Class[1];
                                                    clsArr8[i29] = cls3;
                                                    Method method8 = cls.getMethod(strM8102, clsArr8);
                                                    Object[] objArr8 = new Object[1];
                                                    objArr8[i29] = Integer.valueOf(c0746.f3380);
                                                    method8.invoke(childAt2, objArr8);
                                                    break;
                                            }
                                        } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException unused3) {
                                        }
                                        it = it2;
                                        zIsInEditMode = z8;
                                        map2 = map3;
                                    }
                                    z5 = zIsInEditMode;
                                    childAt2.setLayoutParams(c29752);
                                    if (c3701.f14111 == 0) {
                                        childAt2.setVisibility(c3701.f14113);
                                    }
                                    childAt2.setAlpha(c3701.f14112);
                                    childAt2.setRotation(c1366.f5652);
                                    childAt2.setRotationX(c1366.f5645);
                                    childAt2.setRotationY(c1366.f5647);
                                    childAt2.setScaleX(c1366.f5655);
                                    childAt2.setScaleY(c1366.f5649);
                                    if (c1366.f5646 != -1) {
                                        if (((View) childAt2.getParent()).findViewById(c1366.f5646) != null) {
                                            float bottom = (r2.getBottom() + r2.getTop()) / 2.0f;
                                            float right = (r2.getRight() + r2.getLeft()) / 2.0f;
                                            if (childAt2.getRight() - childAt2.getLeft() > 0 && childAt2.getBottom() - childAt2.getTop() > 0) {
                                                childAt2.setPivotX(right - childAt2.getLeft());
                                                childAt2.setPivotY(bottom - childAt2.getTop());
                                            }
                                        }
                                    } else {
                                        if (!Float.isNaN(c1366.f5657)) {
                                            childAt2.setPivotX(c1366.f5657);
                                        }
                                        if (!Float.isNaN(c1366.f5653)) {
                                            childAt2.setPivotY(c1366.f5653);
                                        }
                                    }
                                    childAt2.setTranslationX(c1366.f5656);
                                    childAt2.setTranslationY(c1366.f5651);
                                    childAt2.setTranslationZ(c1366.f5654);
                                    if (c1366.f5650) {
                                        childAt2.setElevation(c1366.f5648);
                                    }
                                }
                            }
                            i31 = i21 + 1;
                            c35012 = c3501;
                            hashSet2 = hashSet;
                            z = z4;
                            zIsInEditMode = z5;
                        } else {
                            try {
                                childAt2.getContext().getResources().getResourceEntryName(childAt2.getId());
                            } catch (Exception unused4) {
                            }
                        }
                        c3501 = c35012;
                        hashSet = hashSet2;
                        i21 = i31;
                        z4 = z;
                        z5 = zIsInEditMode;
                        i31 = i21 + 1;
                        c35012 = c3501;
                        hashSet2 = hashSet;
                        z = z4;
                        zIsInEditMode = z5;
                    }
                    z2 = z;
                    z3 = zIsInEditMode;
                    for (Integer num : hashSet2) {
                        C4399 c43992 = (C4399) map.get(num);
                        if (c43992 != null) {
                            C0953 c09532 = c43992.f16702;
                            if (c09532.f4180 == 1) {
                                Barrier barrier2 = new Barrier(constraintLayout.getContext());
                                barrier2.setId(num.intValue());
                                int[] iArr2 = c09532.f4196;
                                if (iArr2 != null) {
                                    barrier2.setReferencedIds(iArr2);
                                } else {
                                    String str3 = c09532.f4204;
                                    if (str3 != null) {
                                        int[] iArrM79952 = C3501.m7995(barrier2, str3);
                                        c09532.f4196 = iArrM79952;
                                        barrier2.setReferencedIds(iArrM79952);
                                    }
                                }
                                barrier2.setType(c09532.f4184);
                                barrier2.setMargin(c09532.f4176);
                                C2975 c2975M66 = m66();
                                barrier2.m9458();
                                c43992.m9411(c2975M66);
                                constraintLayout.addView(barrier2, c2975M66);
                            }
                            if (c09532.f4202) {
                                Guideline guideline = new Guideline(constraintLayout.getContext());
                                guideline.setId(num.intValue());
                                C2975 c2975M662 = m66();
                                c43992.m9411(c2975M662);
                                constraintLayout.addView(guideline, c2975M662);
                            }
                        }
                    }
                    for (int i32 = i29; i32 < childCount4; i32++) {
                        View childAt3 = constraintLayout.getChildAt(i32);
                        if (childAt3 instanceof AbstractC4444) {
                            ((AbstractC4444) childAt3).mo73(constraintLayout);
                        }
                    }
                } else {
                    z2 = z;
                    z3 = zIsInEditMode;
                }
                c3100.f11848.clear();
                ArrayList arrayList = constraintLayout.f274;
                int size = arrayList.size();
                if (size > 0) {
                    int i33 = i29;
                    while (i33 < size) {
                        AbstractC4444 abstractC4444 = (AbstractC4444) arrayList.get(i33);
                        HashMap map4 = abstractC4444.f16945;
                        if (abstractC4444.isInEditMode()) {
                            abstractC4444.setIds(abstractC4444.f16950);
                        }
                        AbstractC0268 abstractC0268 = abstractC4444.f16949;
                        if (abstractC0268 != null) {
                            abstractC0268.f1884 = i29;
                            Arrays.fill(abstractC0268.f1883, (Object) null);
                            for (int i34 = 0; i34 < abstractC4444.f16948; i34++) {
                                int i35 = abstractC4444.f16946[i34];
                                View view = (View) sparseArray.get(i35);
                                if (view == null && (iM9457 = abstractC4444.m9457(constraintLayout, (str = (String) map4.get(Integer.valueOf(i35))))) != 0) {
                                    abstractC4444.f16946[i34] = iM9457;
                                    map4.put(Integer.valueOf(iM9457), str);
                                    view = (View) sparseArray.get(iM9457);
                                }
                                if (view != null) {
                                    AbstractC0268 abstractC02682 = abstractC4444.f16949;
                                    C2622 c2622M672 = constraintLayout.m67(view);
                                    abstractC02682.getClass();
                                    if (c2622M672 != abstractC02682 && c2622M672 != null) {
                                        int i36 = abstractC02682.f1884 + 1;
                                        C2622[] c2622Arr = abstractC02682.f1883;
                                        if (i36 > c2622Arr.length) {
                                            abstractC02682.f1883 = (C2622[]) Arrays.copyOf(c2622Arr, c2622Arr.length * 2);
                                        }
                                        C2622[] c2622Arr2 = abstractC02682.f1883;
                                        int i37 = abstractC02682.f1884;
                                        c2622Arr2[i37] = c2622M672;
                                        abstractC02682.f1884 = i37 + 1;
                                    }
                                }
                            }
                            abstractC4444.f16949.mo1494();
                        }
                        i33++;
                        i29 = 0;
                    }
                }
                int i38 = 2;
                for (int i39 = 0; i39 < childCount3; i39++) {
                    constraintLayout.getChildAt(i39);
                }
                SparseArray sparseArray2 = constraintLayout.f267;
                sparseArray2.clear();
                sparseArray2.put(0, c3100);
                sparseArray2.put(constraintLayout.getId(), c3100);
                for (int i40 = 0; i40 < childCount3; i40++) {
                    View childAt4 = constraintLayout.getChildAt(i40);
                    sparseArray2.put(childAt4.getId(), constraintLayout.m67(childAt4));
                }
                int i41 = 0;
                while (i41 < childCount3) {
                    View childAt5 = constraintLayout.getChildAt(i41);
                    C2622 c2622M673 = constraintLayout.m67(childAt5);
                    if (c2622M673 == null) {
                        i17 = i38;
                    } else {
                        C2975 c29753 = (C2975) childAt5.getLayoutParams();
                        c3100.f11848.add(c2622M673);
                        C2622 c26228 = c2622M673.f10159;
                        if (c26228 != null) {
                            ((C3100) c26228).f11848.remove(c2622M673);
                            c2622M673.mo6362();
                        }
                        c2622M673.f10159 = c3100;
                        c29753.m7057();
                        c2622M673.f10174 = childAt5.getVisibility();
                        c2622M673.f10182 = childAt5;
                        if (childAt5 instanceof AbstractC4444) {
                            ((AbstractC4444) childAt5).mo65(c2622M673, c3100.f11860);
                        }
                        if (c29753.f11441) {
                            C0148 c0148 = (C0148) c2622M673;
                            int i42 = c29753.f11468;
                            int i43 = c29753.f11442;
                            float f2 = c29753.f11498;
                            if (f2 != -1.0f) {
                                if (f2 > -1.0f) {
                                    c0148.f1526 = f2;
                                    b = -1;
                                    c0148.f1529 = -1;
                                    c0148.f1528 = -1;
                                    i17 = i38;
                                }
                                i17 = i38;
                            } else {
                                b = -1;
                                if (i42 != -1) {
                                    if (i42 > -1) {
                                        c0148.f1526 = -1.0f;
                                        c0148.f1529 = i42;
                                        c0148.f1528 = -1;
                                    }
                                } else if (i43 != -1 && i43 > -1) {
                                    c0148.f1526 = -1.0f;
                                    c0148.f1529 = -1;
                                    c0148.f1528 = i43;
                                    i17 = i38;
                                }
                                i17 = i38;
                            }
                        } else {
                            int i44 = c29753.f11471;
                            int i45 = c29753.f11463;
                            int i46 = c29753.f11467;
                            int i47 = c29753.f11483;
                            int i48 = c29753.f11492;
                            int i49 = c29753.f11484;
                            float f3 = c29753.f11459;
                            int i50 = c29753.f11475;
                            if (i50 != -1) {
                                C2622 c26229 = (C2622) sparseArray2.get(i50);
                                if (c26229 != null) {
                                    float f4 = c29753.f11449;
                                    c2622M673.m6361(7, 7, c29753.f11488, 0, c26229);
                                    c2622M673.f10208 = f4;
                                }
                                c26226 = c2622M673;
                                c2975 = c29753;
                                i7 = 4;
                                i6 = 2;
                                i13 = 3;
                            } else {
                                if (i44 != -1) {
                                    C2622 c262210 = (C2622) sparseArray2.get(i44);
                                    if (c262210 != null) {
                                        c2622 = c2622M673;
                                        i3 = 2;
                                        c2622.m6361(2, 2, ((ViewGroup.MarginLayoutParams) c29753).leftMargin, i48, c262210);
                                    } else {
                                        c2622 = c2622M673;
                                        i3 = 2;
                                    }
                                } else {
                                    c2622 = c2622M673;
                                    i3 = 2;
                                    if (i45 != -1 && (c26222 = (C2622) sparseArray2.get(i45)) != null) {
                                        c2622.m6361(2, 4, ((ViewGroup.MarginLayoutParams) c29753).leftMargin, i48, c26222);
                                        i4 = 2;
                                        i5 = 4;
                                    }
                                    if (i46 == -1) {
                                        C2622 c262211 = (C2622) sparseArray2.get(i46);
                                        if (c262211 != null) {
                                            c2622.m6361(i5, i4, ((ViewGroup.MarginLayoutParams) c29753).rightMargin, i49, c262211);
                                        }
                                        i6 = i4;
                                    } else {
                                        i6 = i4;
                                        if (i47 != -1 && (c26223 = (C2622) sparseArray2.get(i47)) != null) {
                                            c2622.m6361(i5, i5, ((ViewGroup.MarginLayoutParams) c29753).rightMargin, i49, c26223);
                                        }
                                    }
                                    i7 = i5;
                                    i8 = c29753.f11499;
                                    if (i8 == -1) {
                                        C2622 c262212 = (C2622) sparseArray2.get(i8);
                                        if (c262212 != null) {
                                            i15 = 3;
                                            c2622.m6361(3, 3, ((ViewGroup.MarginLayoutParams) c29753).topMargin, c29753.f11466, c262212);
                                        } else {
                                            i15 = 3;
                                        }
                                        i10 = i15;
                                        i9 = -1;
                                    } else {
                                        int i51 = c29753.f11489;
                                        i9 = -1;
                                        if (i51 == -1 || (c26224 = (C2622) sparseArray2.get(i51)) == null) {
                                            i10 = 3;
                                        } else {
                                            c2622.m6361(3, 5, ((ViewGroup.MarginLayoutParams) c29753).topMargin, c29753.f11466, c26224);
                                            i10 = 3;
                                            i11 = 5;
                                            i12 = c29753.f11495;
                                            if (i12 != i9) {
                                                C2622 c262213 = (C2622) sparseArray2.get(i12);
                                                if (c262213 != null) {
                                                    int i52 = i10;
                                                    c2622.m6361(i11, i52, ((ViewGroup.MarginLayoutParams) c29753).bottomMargin, c29753.f11487, c262213);
                                                    i13 = i52;
                                                } else {
                                                    i13 = i10;
                                                }
                                            } else {
                                                i13 = i10;
                                                int i53 = c29753.f11486;
                                                if (i53 != i9 && (c26225 = (C2622) sparseArray2.get(i53)) != null) {
                                                    c2622.m6361(i11, i11, ((ViewGroup.MarginLayoutParams) c29753).bottomMargin, c29753.f11487, c26225);
                                                }
                                            }
                                            c2975 = c29753;
                                            i14 = c2975.f11473;
                                            if (i14 != -1) {
                                                c26226 = c2622;
                                                constraintLayout.m68(c26226, c2975, sparseArray2, i14, 6);
                                                constraintLayout = this;
                                            } else {
                                                int i54 = c2975.f11455;
                                                if (i54 != -1) {
                                                    constraintLayout = this;
                                                    c26226 = c2622;
                                                    constraintLayout.m68(c26226, c2975, sparseArray2, i54, i13);
                                                } else {
                                                    int i55 = c2975.f11482;
                                                    constraintLayout = this;
                                                    c26226 = c2622;
                                                    int i56 = i11;
                                                    if (i55 != -1) {
                                                        constraintLayout.m68(c26226, c2975, sparseArray2, i55, i56);
                                                    }
                                                    if (f3 >= 0.0f) {
                                                        c26226.f10152 = f3;
                                                    }
                                                    f = c2975.f11435;
                                                    if (f >= 0.0f) {
                                                        c26226.f10167 = f;
                                                    }
                                                }
                                            }
                                            if (f3 >= 0.0f) {
                                            }
                                            f = c2975.f11435;
                                            if (f >= 0.0f) {
                                            }
                                        }
                                    }
                                    i11 = 5;
                                    i12 = c29753.f11495;
                                    if (i12 != i9) {
                                    }
                                    c2975 = c29753;
                                    i14 = c2975.f11473;
                                    if (i14 != -1) {
                                    }
                                    if (f3 >= 0.0f) {
                                    }
                                    f = c2975.f11435;
                                    if (f >= 0.0f) {
                                    }
                                }
                                i4 = i3;
                                i5 = 4;
                                if (i46 == -1) {
                                }
                                i7 = i5;
                                i8 = c29753.f11499;
                                if (i8 == -1) {
                                }
                                i11 = 5;
                                i12 = c29753.f11495;
                                if (i12 != i9) {
                                }
                                c2975 = c29753;
                                i14 = c2975.f11473;
                                if (i14 != -1) {
                                }
                                if (f3 >= 0.0f) {
                                }
                                f = c2975.f11435;
                                if (f >= 0.0f) {
                                }
                            }
                            if (z3 && ((i20 = c2975.f11448) != -1 || c2975.f11439 != -1)) {
                                int i57 = c2975.f11439;
                                c26226.f10147 = i20;
                                c26226.f10188 = i57;
                            }
                            if (c2975.f11478) {
                                c26226.m6367(1);
                                c26226.m6364(((ViewGroup.MarginLayoutParams) c2975).width);
                                if (((ViewGroup.MarginLayoutParams) c2975).width == -2) {
                                    c26226.m6367(i38);
                                }
                            } else if (((ViewGroup.MarginLayoutParams) c2975).width == -1) {
                                if (c2975.f11461) {
                                    c26226.m6367(3);
                                } else {
                                    c26226.m6367(4);
                                }
                                c26226.mo1278(i6).f16033 = ((ViewGroup.MarginLayoutParams) c2975).leftMargin;
                                c26226.mo1278(i7).f16033 = ((ViewGroup.MarginLayoutParams) c2975).rightMargin;
                            } else {
                                c26226.m6367(3);
                                c26226.m6364(0);
                            }
                            if (c2975.f11454) {
                                i16 = -1;
                                c26226.m6377(1);
                                c26226.m6356(((ViewGroup.MarginLayoutParams) c2975).height);
                                if (((ViewGroup.MarginLayoutParams) c2975).height == -2) {
                                    c26226.m6377(2);
                                }
                            } else {
                                i16 = -1;
                                if (((ViewGroup.MarginLayoutParams) c2975).height == -1) {
                                    if (c2975.f11469) {
                                        c26226.m6377(3);
                                    } else {
                                        c26226.m6377(4);
                                    }
                                    c26226.mo1278(i13).f16033 = ((ViewGroup.MarginLayoutParams) c2975).topMargin;
                                    c26226.mo1278(5).f16033 = ((ViewGroup.MarginLayoutParams) c2975).bottomMargin;
                                } else {
                                    c26226.m6377(3);
                                    c26226.m6356(0);
                                }
                            }
                            String str4 = c2975.f11476;
                            if (str4 == null || str4.length() == 0) {
                                c26226.f10172 = 0.0f;
                            } else {
                                int length = str4.length();
                                int iIndexOf3 = str4.indexOf(44);
                                if (iIndexOf3 <= 0 || iIndexOf3 >= length - 1) {
                                    i18 = i16;
                                    i19 = 0;
                                } else {
                                    String strSubstring = str4.substring(0, iIndexOf3);
                                    i19 = iIndexOf3 + 1;
                                    i18 = strSubstring.equalsIgnoreCase("W") ? 0 : strSubstring.equalsIgnoreCase("H") ? 1 : i16;
                                }
                                int iIndexOf4 = str4.indexOf(58);
                                if (iIndexOf4 < 0 || iIndexOf4 >= length - 1) {
                                    String strSubstring2 = str4.substring(i19);
                                    fAbs = strSubstring2.length() > 0 ? Float.parseFloat(strSubstring2) : 0.0f;
                                    if (fAbs > 0.0f) {
                                        c26226.f10172 = fAbs;
                                        c26226.f10180 = i18;
                                    }
                                } else {
                                    String strSubstring3 = str4.substring(i19, iIndexOf4);
                                    String strSubstring4 = str4.substring(iIndexOf4 + 1);
                                    if (strSubstring3.length() > 0 && strSubstring4.length() > 0) {
                                        try {
                                            float f5 = Float.parseFloat(strSubstring3);
                                            float f6 = Float.parseFloat(strSubstring4);
                                            if (f5 > 0.0f && f6 > 0.0f) {
                                                fAbs = i18 == 1 ? Math.abs(f6 / f5) : Math.abs(f5 / f6);
                                            }
                                        } catch (NumberFormatException unused5) {
                                        }
                                        if (fAbs > 0.0f) {
                                        }
                                    }
                                }
                            }
                            float f7 = c2975.f11447;
                            float[] fArr = c26226.f10195;
                            fArr[0] = f7;
                            fArr[1] = c2975.f11440;
                            c26226.f10194 = c2975.f11438;
                            c26226.f10203 = c2975.f11453;
                            int i58 = c2975.f11477;
                            if (i58 >= 0 && i58 <= 3) {
                                c26226.f10199 = i58;
                            }
                            int i59 = c2975.f11450;
                            int i60 = c2975.f11491;
                            int i61 = c2975.f11434;
                            float f8 = c2975.f11479;
                            c26226.f10160 = i59;
                            c26226.f10162 = i60;
                            if (i61 == Integer.MAX_VALUE) {
                                i61 = 0;
                            }
                            c26226.f10168 = i61;
                            c26226.f10183 = f8;
                            if (f8 > 0.0f && f8 < 1.0f && i59 == 0) {
                                c26226.f10160 = 2;
                            }
                            int i62 = c2975.f11470;
                            int i63 = c2975.f11464;
                            int i64 = c2975.f11444;
                            float f9 = c2975.f11474;
                            c26226.f10157 = i62;
                            c26226.f10177 = i63;
                            if (i64 == Integer.MAX_VALUE) {
                                i64 = 0;
                            }
                            c26226.f10192 = i64;
                            c26226.f10198 = f9;
                            if (f9 <= 0.0f || f9 >= 1.0f || i62 != 0) {
                                i17 = 2;
                            } else {
                                i17 = 2;
                                c26226.f10157 = 2;
                            }
                        }
                    }
                    i41++;
                    i38 = i17;
                }
            } else {
                z2 = z;
            }
            if (z2) {
                c3100.f11858.ᵨˈʼﹶ(c3100);
            }
        }
        c3100.f11840.getClass();
        constraintLayout.m70(c3100, constraintLayout.f279, i, i2);
        int iM6374 = c3100.m6374();
        int iM6379 = c3100.m6379();
        boolean z9 = c3100.f11855;
        boolean z10 = c3100.f11845;
        C0133 c0133 = constraintLayout.f266;
        int i65 = c0133.f1469;
        int iResolveSizeAndState = View.resolveSizeAndState(iM6374 + c0133.f1465, i, 0);
        int iResolveSizeAndState2 = View.resolveSizeAndState(iM6379 + i65, i2, 0) & 16777215;
        int iMin = Math.min(constraintLayout.f278, iResolveSizeAndState & 16777215);
        int iMin2 = Math.min(constraintLayout.f268, iResolveSizeAndState2);
        if (z9) {
            iMin |= 16777216;
        }
        if (z10) {
            iMin2 |= 16777216;
        }
        constraintLayout.setMeasuredDimension(iMin, iMin2);
    }

    @Override // android.view.ViewGroup
    public final void onViewAdded(View view) {
        super.onViewAdded(view);
        C2622 c2622M67 = m67(view);
        if ((view instanceof Guideline) && !(c2622M67 instanceof C0148)) {
            C2975 c2975 = (C2975) view.getLayoutParams();
            C0148 c0148 = new C0148();
            c2975.f11485 = c0148;
            c2975.f11441 = true;
            c0148.m1275(c2975.f11437);
        }
        if (view instanceof AbstractC4444) {
            AbstractC4444 abstractC4444 = (AbstractC4444) view;
            abstractC4444.m9458();
            ((C2975) view.getLayoutParams()).f11456 = true;
            ArrayList arrayList = this.f274;
            if (!arrayList.contains(abstractC4444)) {
                arrayList.add(abstractC4444);
            }
        }
        this.f270.put(view.getId(), view);
        this.f271 = true;
    }

    @Override // android.view.ViewGroup
    public final void onViewRemoved(View view) {
        super.onViewRemoved(view);
        this.f270.remove(view.getId());
        C2622 c2622M67 = m67(view);
        this.f273.f11848.remove(c2622M67);
        c2622M67.mo6362();
        this.f274.remove(view);
        this.f271 = true;
    }

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

    public void setConstraintSet(C3501 c3501) {
        this.f272 = c3501;
    }

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

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

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

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

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

    public void setOnConstraintsChanged(AbstractC4575 abstractC4575) {
        C0767 c0767 = this.f265;
        if (c0767 != null) {
            c0767.getClass();
        }
    }

    public void setOptimizationLevel(int i) {
        this.f279 = i;
        C3100 c3100 = this.f273;
        c3100.f11842 = i;
        C1873.f7414 = c3100.m7196(512);
    }

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

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final C2622 m67(View view) {
        if (view == this) {
            return this.f273;
        }
        if (view == null) {
            return null;
        }
        if (view.getLayoutParams() instanceof C2975) {
            return ((C2975) view.getLayoutParams()).f11485;
        }
        view.setLayoutParams(generateLayoutParams(view.getLayoutParams()));
        if (view.getLayoutParams() instanceof C2975) {
            return ((C2975) view.getLayoutParams()).f11485;
        }
        return null;
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final void m68(C2622 c2622, C2975 c2975, SparseArray sparseArray, int i, int i2) {
        View view = (View) this.f270.get(i);
        C2622 c26222 = (C2622) sparseArray.get(i);
        if (c26222 == null || view == null || !(view.getLayoutParams() instanceof C2975)) {
            return;
        }
        c2975.f11445 = true;
        if (i2 == 6) {
            C2975 c29752 = (C2975) view.getLayoutParams();
            c29752.f11445 = true;
            c29752.f11485.f10176 = true;
        }
        c2622.mo1278(6).m9146(c26222.mo1278(i2), c2975.f11497, c2975.f11458, true);
        c2622.f10176 = true;
        c2622.mo1278(3).m9151();
        c2622.mo1278(5).m9151();
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void m69(int i) {
        String str;
        Context context = getContext();
        C0767 c0767 = new C0767(13, false);
        c0767.f3433 = new SparseArray();
        c0767.f3432 = new SparseArray();
        XmlResourceParser xml = context.getResources().getXml(i);
        try {
            C3673 c3673 = 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")) {
                                c0767.m2760(context, xml);
                            }
                            break;
                        case 80204913:
                            if (name.equals("State")) {
                                C3673 c36732 = new C3673(context, xml);
                                ((SparseArray) c0767.f3433).put(c36732.f13945, c36732);
                                c3673 = c36732;
                            }
                            break;
                        case 1382829617:
                            str = "StateSet";
                            name.equals(str);
                            break;
                        case 1657696882:
                            str = "layoutDescription";
                            name.equals(str);
                            break;
                        case 1901439077:
                            if (name.equals("Variant")) {
                                C3059 c3059 = new C3059(context, xml);
                                if (c3673 != null) {
                                    ((ArrayList) c3673.f13946).add(c3059);
                                }
                            }
                            break;
                    }
                }
            }
        } catch (IOException | XmlPullParserException unused) {
        }
        this.f265 = c0767;
    }

    /* 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  */
    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m70(C3100 c3100, int i, int i2, int i3) {
        int iMin;
        int iMax;
        int iMin2;
        int iMax2;
        int i4;
        char c;
        boolean z;
        int i5;
        int i6;
        boolean z2;
        ArrayList arrayList;
        C0133 c0133;
        int i7;
        boolean zM7195;
        int i8;
        int i9;
        boolean z3;
        C0133 c01332;
        boolean z4;
        boolean z5;
        C0133 c01333;
        boolean z6;
        C4503 c4503;
        C0295 c0295;
        int i10;
        int i11;
        int i12;
        int i13;
        int i14;
        int i15;
        int i16;
        boolean z7;
        int size;
        int i17;
        int size2;
        int i18;
        int mode = View.MeasureSpec.getMode(i2);
        int size3 = View.MeasureSpec.getSize(i2);
        int mode2 = View.MeasureSpec.getMode(i3);
        int size4 = View.MeasureSpec.getSize(i3);
        int iMax3 = Math.max(0, getPaddingTop());
        int iMax4 = Math.max(0, getPaddingBottom());
        int i19 = iMax3 + iMax4;
        int paddingWidth = getPaddingWidth();
        C0133 c01334 = this.f266;
        c01334.f1467 = iMax3;
        c01334.f1463 = iMax4;
        c01334.f1465 = paddingWidth;
        c01334.f1469 = i19;
        c01334.f1466 = i2;
        c01334.f1470 = i3;
        int iMax5 = Math.max(0, getPaddingStart());
        int iMax6 = Math.max(0, getPaddingEnd());
        int i20 = 1;
        if (iMax5 <= 0 && iMax6 <= 0) {
            iMax5 = Math.max(0, getPaddingLeft());
        } else if ((getContext().getApplicationInfo().flags & 4194304) != 0 && 1 == getLayoutDirection()) {
            iMax5 = iMax6;
        }
        int i21 = size3 - paddingWidth;
        int i22 = size4 - i19;
        int i23 = c01334.f1469;
        int i24 = c01334.f1465;
        int childCount = getChildCount();
        if (mode != Integer.MIN_VALUE) {
            if (mode != 0) {
                if (mode != 1073741824) {
                    iMin = 0;
                } else {
                    iMin = Math.min(this.f278 - i24, i21);
                    i20 = 1;
                }
            } else if (childCount == 0) {
                iMax = Math.max(0, this.f276);
                iMin = iMax;
                i20 = 2;
            } else {
                iMin = 0;
                i20 = 2;
            }
        } else if (childCount == 0) {
            iMax = Math.max(0, this.f276);
            iMin = iMax;
            i20 = 2;
        } else {
            iMin = i21;
            i20 = 2;
        }
        if (mode2 != Integer.MIN_VALUE) {
            if (mode2 != 0) {
                iMin2 = mode2 != 1073741824 ? 0 : Math.min(this.f268 - i23, i22);
                i4 = 1;
            } else if (childCount == 0) {
                iMax2 = Math.max(0, this.f277);
                iMin2 = iMax2;
                i4 = 2;
            } else {
                iMin2 = 0;
                i4 = 2;
            }
        } else if (childCount == 0) {
            iMax2 = Math.max(0, this.f277);
            iMin2 = iMax2;
            i4 = 2;
        } else {
            iMin2 = i22;
            i4 = 2;
        }
        int iM6374 = c3100.m6374();
        C2103 c2103 = c3100.f11857;
        int[] iArr = c3100.f10169;
        int i25 = iMin;
        if (i25 == iM6374 && iMin2 == c3100.m6379()) {
            c = 1;
        } else {
            c2103.f8357 = true;
            c = 1;
        }
        c3100.f10147 = 0;
        c3100.f10188 = 0;
        iArr[0] = this.f278 - i24;
        iArr[c] = this.f268 - i23;
        c3100.f10165 = 0;
        c3100.f10156 = 0;
        c3100.m6367(i20);
        c3100.m6364(i25);
        c3100.m6377(i4);
        c3100.m6356(iMin2);
        int i26 = this.f276 - i24;
        if (i26 < 0) {
            c3100.f10165 = 0;
        } else {
            c3100.f10165 = i26;
        }
        int i27 = this.f277 - i23;
        if (i27 < 0) {
            c3100.f10156 = 0;
        } else {
            c3100.f10156 = i27;
        }
        c3100.f11849 = iMax5;
        c3100.f11852 = iMax3;
        ᵣˊˈᵪ r0 = c3100.f11858;
        C3100 c31002 = (C3100) r0.ᵨᵼⁱ;
        ArrayList arrayList2 = (ArrayList) r0.ᵜᵪʾ;
        C0133 c01335 = c3100.f11851;
        int size5 = c3100.f11848.size();
        int iM63742 = c3100.m6374();
        int iM6379 = c3100.m6379();
        boolean z8 = ᵬʕˎʽ.ᵵᵽ(i, 128);
        boolean z9 = z8 || ᵬʕˎʽ.ᵵᵽ(i, 64);
        if (z9) {
            int i28 = 0;
            while (i28 < size5) {
                boolean z10 = z9;
                C2622 c2622 = (C2622) c3100.f11848.get(i28);
                i5 = size5;
                int[] iArr2 = c2622.f10196;
                int i29 = i28;
                boolean z11 = (iArr2[0] == 3) && (iArr2[1] == 3) && c2622.f10172 > 0.0f;
                if ((c2622.m6366() && z11) || ((c2622.m6371() && z11) || (c2622 instanceof C3678) || c2622.m6366() || c2622.m6371())) {
                    i6 = 1073741824;
                    z = false;
                    break;
                } else {
                    i28 = i29 + 1;
                    z9 = z10;
                    size5 = i5;
                }
            }
            z = z9;
            i5 = size5;
            i6 = 1073741824;
        } else {
            z = z9;
            i5 = size5;
            i6 = 1073741824;
        }
        boolean z12 = z & ((mode == i6 && mode2 == i6) || z8);
        if (z12) {
            int iMin3 = Math.min(iArr[0], i21);
            int iMin4 = Math.min(iArr[1], i22);
            int i30 = 1073741824;
            if (mode == 1073741824) {
                if (c3100.m6374() != iMin3) {
                    c3100.m6364(iMin3);
                    c2103.f8355 = true;
                }
                i30 = 1073741824;
            }
            if (mode2 == i30 && c3100.m6379() != iMin4) {
                c3100.m6356(iMin4);
                c2103.f8355 = true;
            }
            if (mode == i30 && mode2 == i30) {
                ArrayList arrayList3 = c2103.f8358;
                C3100 c31003 = c2103.f8359;
                if (c2103.f8355 || c2103.f8357) {
                    ArrayList arrayList4 = c31003.f11848;
                    int size6 = arrayList4.size();
                    z2 = z12;
                    int i31 = 0;
                    while (i31 < size6) {
                        Object obj = arrayList4.get(i31);
                        int i32 = i31 + 1;
                        C2622 c26222 = (C2622) obj;
                        c26222.m6358();
                        c26222.f10201 = false;
                        c26222.f10207.m9550();
                        c26222.f10191.m1545();
                        arrayList4 = arrayList4;
                        i31 = i32;
                    }
                    c31003.m6358();
                    i12 = 0;
                    c31003.f10201 = false;
                    c31003.f10207.m9550();
                    c31003.f10191.m1545();
                    c2103.f8357 = false;
                } else {
                    z2 = z12;
                    i12 = 0;
                }
                c2103.m5608(c2103.f8361);
                c31003.f10147 = i12;
                int[] iArr3 = c31003.f10196;
                c31003.f10188 = i12;
                int iM6375 = c31003.m6375(i12);
                int iM63752 = c31003.m6375(1);
                if (c2103.f8355) {
                    c2103.m5609();
                }
                int iM6355 = c31003.m6355();
                c0133 = c01335;
                int iM6354 = c31003.m6354();
                arrayList = arrayList2;
                c31003.f10207.f17079.mo4024(iM6355);
                c31003.f10191.f17079.mo4024(iM6354);
                c2103.m5612();
                if (iM6375 == 2 || iM63752 == 2) {
                    if (z8) {
                        int size7 = arrayList3.size();
                        i13 = iM6354;
                        int i33 = 0;
                        while (true) {
                            if (i33 >= size7) {
                                break;
                            }
                            Object obj2 = arrayList3.get(i33);
                            i33++;
                            if (!((AbstractC4476) obj2).mo1548()) {
                                z8 = false;
                                break;
                            }
                        }
                    } else {
                        i13 = iM6354;
                    }
                    if (z8 && iM6375 == 2) {
                        c31003.m6367(1);
                        c31003.m6364(c2103.m5613(c31003, 0));
                        c31003.f10207.f17081.mo4024(c31003.m6374());
                    }
                    if (z8 && iM63752 == 2) {
                        i14 = 1;
                        c31003.m6377(1);
                        c31003.m6356(c2103.m5613(c31003, 1));
                        c31003.f10191.f17081.mo4024(c31003.m6379());
                    }
                    i15 = iArr3[0];
                    if (i15 != i14 || i15 == 4) {
                        int iM63743 = c31003.m6374() + iM6355;
                        c31003.f10207.f17086.mo4024(iM63743);
                        c31003.f10207.f17081.mo4024(iM63743 - iM6355);
                        c2103.m5612();
                        i16 = iArr3[1];
                        if (i16 != 1 || i16 == 4) {
                            int iM63792 = c31003.m6379() + i13;
                            c31003.f10191.f17086.mo4024(iM63792);
                            c31003.f10191.f17081.mo4024(iM63792 - i13);
                        }
                        c2103.m5612();
                        z7 = true;
                    } else {
                        z7 = false;
                    }
                    size = arrayList3.size();
                    i17 = 0;
                    while (i17 < size) {
                        Object obj3 = arrayList3.get(i17);
                        i17++;
                        AbstractC4476 abstractC4476 = (AbstractC4476) obj3;
                        if (abstractC4476.f17078 != c31003 || abstractC4476.f17084) {
                            abstractC4476.mo1546();
                        }
                    }
                    size2 = arrayList3.size();
                    i18 = 0;
                    while (i18 < size2) {
                        Object obj4 = arrayList3.get(i18);
                        i18++;
                        AbstractC4476 abstractC44762 = (AbstractC4476) obj4;
                        if (z7 || abstractC44762.f17078 != c31003) {
                            if (!abstractC44762.f17079.f6561 || ((!abstractC44762.f17086.f6561 && !(abstractC44762 instanceof C1443)) || (!abstractC44762.f17081.f6561 && !(abstractC44762 instanceof C4193) && !(abstractC44762 instanceof C1443)))) {
                                zM7195 = false;
                                break;
                            }
                        }
                    }
                    zM7195 = true;
                    c31003.m6367(iM6375);
                    c31003.m6377(iM63752);
                    i7 = 2;
                    i11 = 1073741824;
                } else {
                    i13 = iM6354;
                }
                i14 = 1;
                i15 = iArr3[0];
                if (i15 != i14) {
                    int iM637432 = c31003.m6374() + iM6355;
                    c31003.f10207.f17086.mo4024(iM637432);
                    c31003.f10207.f17081.mo4024(iM637432 - iM6355);
                    c2103.m5612();
                    i16 = iArr3[1];
                    if (i16 != 1) {
                        int iM637922 = c31003.m6379() + i13;
                        c31003.f10191.f17086.mo4024(iM637922);
                        c31003.f10191.f17081.mo4024(iM637922 - i13);
                        c2103.m5612();
                        z7 = true;
                        size = arrayList3.size();
                        i17 = 0;
                        while (i17 < size) {
                        }
                        size2 = arrayList3.size();
                        i18 = 0;
                        while (i18 < size2) {
                        }
                        zM7195 = true;
                        c31003.m6367(iM6375);
                        c31003.m6377(iM63752);
                        i7 = 2;
                        i11 = 1073741824;
                    }
                }
            } else {
                z2 = z12;
                arrayList = arrayList2;
                c0133 = c01335;
                C3100 c31004 = c2103.f8359;
                if (c2103.f8355) {
                    ArrayList arrayList5 = c31004.f11848;
                    int size8 = arrayList5.size();
                    int i34 = 0;
                    while (i34 < size8) {
                        Object obj5 = arrayList5.get(i34);
                        i34++;
                        C2622 c26223 = (C2622) obj5;
                        c26223.m6358();
                        c26223.f10201 = false;
                        C4503 c45032 = c26223.f10207;
                        ArrayList arrayList6 = arrayList5;
                        c45032.f17081.f6561 = false;
                        c45032.f17084 = false;
                        c45032.m9550();
                        C0295 c02952 = c26223.f10191;
                        c02952.f17081.f6561 = false;
                        c02952.f17084 = false;
                        c02952.m1545();
                        arrayList5 = arrayList6;
                    }
                    i10 = 0;
                    c31004.m6358();
                    c31004.f10201 = false;
                    C4503 c45033 = c31004.f10207;
                    c45033.f17081.f6561 = false;
                    c45033.f17084 = false;
                    c45033.m9550();
                    C0295 c02953 = c31004.f10191;
                    c02953.f17081.f6561 = false;
                    c02953.f17084 = false;
                    c02953.m1545();
                    c2103.m5609();
                } else {
                    i10 = 0;
                }
                c2103.m5608(c2103.f8361);
                c31004.f10147 = i10;
                c31004.f10188 = i10;
                c31004.f10207.f17079.mo4024(i10);
                c31004.f10191.f17079.mo4024(i10);
                i11 = 1073741824;
                if (mode == 1073741824) {
                    zM7195 = c3100.m7195(i10, z8);
                    i7 = 1;
                } else {
                    i7 = 0;
                    zM7195 = true;
                }
                if (mode2 == 1073741824) {
                    zM7195 &= c3100.m7195(1, z8);
                    i7++;
                }
            }
            if (zM7195) {
                c3100.mo6350(mode == i11, mode2 == i11);
            }
        } else {
            z2 = z12;
            arrayList = arrayList2;
            c0133 = c01335;
            i7 = 0;
            zM7195 = false;
        }
        if (zM7195 && i7 == 2) {
            return;
        }
        int i35 = c3100.f11842;
        if (i5 > 0) {
            int size9 = c3100.f11848.size();
            boolean zM7196 = c3100.m7196(64);
            C0133 c01336 = c3100.f11851;
            for (int i36 = 0; i36 < size9; i36++) {
                C2622 c26224 = (C2622) c3100.f11848.get(i36);
                if (!(c26224 instanceof C0148) && !(c26224 instanceof C3556) && !c26224.f10146 && (!zM7196 || (c4503 = c26224.f10207) == null || (c0295 = c26224.f10191) == null || !c4503.f17081.f6561 || !c0295.f17081.f6561)) {
                    int iM63753 = c26224.m6375(0);
                    int iM63754 = c26224.m6375(1);
                    boolean z13 = iM63753 == 3 && c26224.f10160 != 1 && iM63754 == 3 && c26224.f10157 != 1;
                    if (!z13 && c3100.m7196(1) && !(c26224 instanceof C3678)) {
                        if (iM63753 == 3 && c26224.f10160 == 0 && iM63754 != 3 && !c26224.m6366()) {
                            z13 = true;
                        }
                        if (iM63754 == 3 && c26224.f10157 == 0 && iM63753 != 3 && !c26224.m6366()) {
                            z13 = true;
                        }
                        if ((iM63753 == 3 || iM63754 == 3) && c26224.f10172 > 0.0f) {
                            z13 = true;
                        }
                    }
                    if (!z13) {
                        r0.ˁˌᵩ(0, c26224, c01336);
                    }
                }
            }
            ConstraintLayout constraintLayout = (ConstraintLayout) c01336.f1468;
            int childCount2 = constraintLayout.getChildCount();
            ArrayList arrayList7 = constraintLayout.f274;
            for (int i37 = 0; i37 < childCount2; i37++) {
                constraintLayout.getChildAt(i37);
            }
            int size10 = arrayList7.size();
            if (size10 > 0) {
                for (int i38 = 0; i38 < size10; i38++) {
                    ((AbstractC4444) arrayList7.get(i38)).getClass();
                }
            }
        }
        r0.ᵨˈʼﹶ(c3100);
        int size11 = arrayList.size();
        if (i5 > 0) {
            r0.ᵛˑﹳ(c3100, 0, iM63742, iM6379);
        }
        if (size11 > 0) {
            int[] iArr4 = c3100.f10196;
            boolean z14 = iArr4[0] == 2;
            boolean z15 = iArr4[1] == 2;
            int iMax7 = Math.max(c3100.m6374(), c31002.f10165);
            int iMax8 = Math.max(c3100.m6379(), c31002.f10156);
            int i39 = 0;
            boolean z16 = false;
            while (i39 < size11) {
                ArrayList arrayList8 = arrayList;
                C2622 c26225 = (C2622) arrayList8.get(i39);
                if (c26225 instanceof C3678) {
                    int iM63744 = c26225.m6374();
                    int iM63793 = c26225.m6379();
                    z4 = z15;
                    z5 = z14;
                    c01333 = c0133;
                    boolean z17 = z16 | r0.ˁˌᵩ(1, c26225, c01333);
                    int iM63745 = c26225.m6374();
                    int iM63794 = c26225.m6379();
                    if (iM63745 != iM63744) {
                        c26225.m6364(iM63745);
                        if (z5 && c26225.m6355() + c26225.f10150 > iMax7) {
                            iMax7 = Math.max(iMax7, c26225.mo1278(4).m9149() + c26225.m6355() + c26225.f10150);
                        }
                        z6 = true;
                    } else {
                        z6 = z17;
                    }
                    if (iM63794 != iM63793) {
                        c26225.m6356(iM63794);
                        if (z4 && c26225.m6354() + c26225.f10148 > iMax8) {
                            iMax8 = Math.max(iMax8, c26225.mo1278(5).m9149() + c26225.m6354() + c26225.f10148);
                        }
                        z6 = true;
                    }
                    z16 = ((C3678) c26225).f14011 | z6;
                } else {
                    z4 = z15;
                    z5 = z14;
                    c01333 = c0133;
                }
                i39++;
                c0133 = c01333;
                arrayList = arrayList8;
                z14 = z5;
                z15 = z4;
            }
            boolean z18 = z15;
            boolean z19 = z14;
            ArrayList arrayList9 = arrayList;
            int i40 = 0;
            while (true) {
                C0133 c01337 = c0133;
                if (i40 >= 2) {
                    break;
                }
                int i41 = 0;
                while (i41 < size11) {
                    C2622 c26226 = (C2622) arrayList9.get(i41);
                    if (((c26226 instanceof AbstractC0268) && !(c26226 instanceof C3678)) || (c26226 instanceof C0148) || c26226.f10174 == 8 || ((z2 && c26226.f10207.f17081.f6561 && c26226.f10191.f17081.f6561) || (c26226 instanceof C3678))) {
                        i8 = size11;
                        c01332 = c01337;
                        i9 = i41;
                        z3 = z16;
                    } else {
                        int iM63746 = c26226.m6374();
                        int iM63795 = c26226.m6379();
                        i8 = size11;
                        int i42 = c26226.f10189;
                        i9 = i41;
                        z3 = r0.ˁˌᵩ(i40 == 1 ? 2 : 1, c26226, c01337) | z16;
                        int iM63747 = c26226.m6374();
                        c01332 = c01337;
                        int iM63796 = c26226.m6379();
                        if (iM63747 != iM63746) {
                            c26226.m6364(iM63747);
                            if (z19 && c26226.m6355() + c26226.f10150 > iMax7) {
                                iMax7 = Math.max(iMax7, c26226.mo1278(4).m9149() + c26226.m6355() + c26226.f10150);
                            }
                            z3 = true;
                        }
                        if (iM63796 != iM63795) {
                            c26226.m6356(iM63796);
                            if (z18 && c26226.m6354() + c26226.f10148 > iMax8) {
                                iMax8 = Math.max(iMax8, c26226.mo1278(5).m9149() + c26226.m6354() + c26226.f10148);
                            }
                            z3 = true;
                        }
                        if (c26226.f10176 && i42 != c26226.f10189) {
                            z3 = true;
                        }
                    }
                    z16 = z3;
                    c01337 = c01332;
                    i41 = i9 + 1;
                    size11 = i8;
                }
                int i43 = size11;
                c0133 = c01337;
                if (!z16) {
                    break;
                }
                i40++;
                r0.ᵛˑﹳ(c3100, i40, iM63742, iM6379);
                size11 = i43;
                z16 = false;
            }
        }
        c3100.f11842 = i35;
        C1873.f7414 = c3100.m7196(512);
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final void m71(AttributeSet attributeSet, int i, int i2) {
        C3100 c3100 = this.f273;
        c3100.f10182 = this;
        C0133 c0133 = this.f266;
        c3100.f11851 = c0133;
        c3100.f11857.f8362 = c0133;
        this.f270.put(getId(), this);
        this.f272 = null;
        if (attributeSet != null) {
            TypedArray typedArrayObtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, AbstractC4329.f16476, i, i2);
            int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
            for (int i3 = 0; i3 < indexCount; i3++) {
                int index = typedArrayObtainStyledAttributes.getIndex(i3);
                if (index == 16) {
                    this.f276 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f276);
                } else if (index == 17) {
                    this.f277 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f277);
                } else if (index == 14) {
                    this.f278 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f278);
                } else if (index == 15) {
                    this.f268 = typedArrayObtainStyledAttributes.getDimensionPixelOffset(index, this.f268);
                } else if (index == 113) {
                    this.f279 = typedArrayObtainStyledAttributes.getInt(index, this.f279);
                } else if (index == 56) {
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    if (resourceId != 0) {
                        try {
                            m69(resourceId);
                        } catch (Resources.NotFoundException unused) {
                            this.f265 = null;
                        }
                    }
                } else if (index == 34) {
                    int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(index, 0);
                    try {
                        C3501 c3501 = new C3501();
                        this.f272 = c3501;
                        c3501.m8001(getContext(), resourceId2);
                    } catch (Resources.NotFoundException unused2) {
                        this.f272 = null;
                    }
                    this.f275 = resourceId2;
                }
            }
            typedArrayObtainStyledAttributes.recycle();
        }
        c3100.f11842 = this.f279;
        C1873.f7414 = c3100.m7196(512);
    }
}
