package p037.p041.p051;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import p037.p041.C1477;
import p037.p041.p043.p044.C1527;
import p037.p065.p078.C1920;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: މ.ؠ.ގ.ޟ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C1658 extends ViewGroup {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public boolean f5378;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public int f5379;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public int f5380;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int f5381;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public int f5382;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public int f5383;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public float f5384;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public boolean f5385;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public int[] f5386;

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public int[] f5387;

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public Drawable f5388;

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public int f5389;

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public int f5390;

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public int f5391;

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public int f5392;

    /* JADX INFO: renamed from: މ.ؠ.ގ.ޟ$֏, reason: contains not printable characters */
    public static class C1659 extends ViewGroup.MarginLayoutParams {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public float f5393;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int f5394;

        public C1659(int i, int i2) {
            super(i, i2);
            this.f5394 = -1;
            this.f5393 = 0.0f;
        }

        public C1659(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            this.f5394 = -1;
            TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C1477.LinearLayoutCompat_Layout);
            this.f5393 = typedArrayObtainStyledAttributes.getFloat(C1477.LinearLayoutCompat_Layout_android_layout_weight, 0.0f);
            this.f5394 = typedArrayObtainStyledAttributes.getInt(C1477.LinearLayoutCompat_Layout_android_layout_gravity, -1);
            typedArrayObtainStyledAttributes.recycle();
        }

        public C1659(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.f5394 = -1;
        }
    }

    public C1658(Context context) {
        this(context, null);
    }

    public C1658(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public C1658(Context context, AttributeSet attributeSet, int i) {
        int resourceId;
        super(context, attributeSet, i);
        this.f5378 = true;
        this.f5379 = -1;
        this.f5380 = 0;
        this.f5382 = 8388659;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C1477.LinearLayoutCompat, i, 0);
        C1920.m3742(this, context, C1477.LinearLayoutCompat, attributeSet, typedArrayObtainStyledAttributes, i, 0);
        int i2 = typedArrayObtainStyledAttributes.getInt(C1477.LinearLayoutCompat_android_orientation, -1);
        if (i2 >= 0) {
            setOrientation(i2);
        }
        int i3 = typedArrayObtainStyledAttributes.getInt(C1477.LinearLayoutCompat_android_gravity, -1);
        if (i3 >= 0) {
            setGravity(i3);
        }
        boolean z = typedArrayObtainStyledAttributes.getBoolean(C1477.LinearLayoutCompat_android_baselineAligned, true);
        if (!z) {
            setBaselineAligned(z);
        }
        this.f5384 = typedArrayObtainStyledAttributes.getFloat(C1477.LinearLayoutCompat_android_weightSum, -1.0f);
        this.f5379 = typedArrayObtainStyledAttributes.getInt(C1477.LinearLayoutCompat_android_baselineAlignedChildIndex, -1);
        this.f5385 = typedArrayObtainStyledAttributes.getBoolean(C1477.LinearLayoutCompat_measureWithLargestChild, false);
        int i4 = C1477.LinearLayoutCompat_divider;
        setDividerDrawable((!typedArrayObtainStyledAttributes.hasValue(i4) || (resourceId = typedArrayObtainStyledAttributes.getResourceId(i4, 0)) == 0) ? typedArrayObtainStyledAttributes.getDrawable(i4) : C1527.m3025(context, resourceId));
        this.f5391 = typedArrayObtainStyledAttributes.getInt(C1477.LinearLayoutCompat_showDividers, 0);
        this.f5392 = typedArrayObtainStyledAttributes.getDimensionPixelSize(C1477.LinearLayoutCompat_dividerPadding, 0);
        typedArrayObtainStyledAttributes.recycle();
    }

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

    @Override // android.view.ViewGroup
    public C1659 generateDefaultLayoutParams() {
        int i = this.f5381;
        if (i == 0) {
            return new C1659(-2, -2);
        }
        if (i == 1) {
            return new C1659(-1, -2);
        }
        return null;
    }

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

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

    @Override // android.view.View
    public int getBaseline() {
        int i;
        if (this.f5379 < 0) {
            return super.getBaseline();
        }
        int childCount = getChildCount();
        int i2 = this.f5379;
        if (childCount <= i2) {
            throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout set to an index that is out of bounds.");
        }
        View childAt = getChildAt(i2);
        int baseline = childAt.getBaseline();
        if (baseline == -1) {
            if (this.f5379 == 0) {
                return -1;
            }
            throw new RuntimeException("mBaselineAlignedChildIndex of LinearLayout points to a View that doesn't know how to get its baseline.");
        }
        int bottom = this.f5380;
        if (this.f5381 == 1 && (i = this.f5382 & 112) != 48) {
            if (i == 16) {
                bottom += ((((getBottom() - getTop()) - getPaddingTop()) - getPaddingBottom()) - this.f5383) / 2;
            } else if (i == 80) {
                bottom = ((getBottom() - getTop()) - getPaddingBottom()) - this.f5383;
            }
        }
        return bottom + ((ViewGroup.MarginLayoutParams) ((C1659) childAt.getLayoutParams())).topMargin + baseline;
    }

    public int getBaselineAlignedChildIndex() {
        return this.f5379;
    }

    public Drawable getDividerDrawable() {
        return this.f5388;
    }

    public int getDividerPadding() {
        return this.f5392;
    }

    public int getDividerWidth() {
        return this.f5389;
    }

    public int getGravity() {
        return this.f5382;
    }

    public int getOrientation() {
        return this.f5381;
    }

    public int getShowDividers() {
        return this.f5391;
    }

    public int getVirtualChildCount() {
        return getChildCount();
    }

    public float getWeightSum() {
        return this.f5384;
    }

    @Override // android.view.View
    public void onDraw(Canvas canvas) {
        int right;
        int left;
        int i;
        if (this.f5388 == null) {
            return;
        }
        int i2 = 0;
        if (this.f5381 == 1) {
            int virtualChildCount = getVirtualChildCount();
            while (i2 < virtualChildCount) {
                View childAt = getChildAt(i2);
                if (childAt != null && childAt.getVisibility() != 8 && m3249(i2)) {
                    m3248(canvas, (childAt.getTop() - ((ViewGroup.MarginLayoutParams) ((C1659) childAt.getLayoutParams())).topMargin) - this.f5390);
                }
                i2++;
            }
            if (m3249(virtualChildCount)) {
                View childAt2 = getChildAt(virtualChildCount - 1);
                m3248(canvas, childAt2 == null ? (getHeight() - getPaddingBottom()) - this.f5390 : childAt2.getBottom() + ((ViewGroup.MarginLayoutParams) ((C1659) childAt2.getLayoutParams())).bottomMargin);
                return;
            }
            return;
        }
        int virtualChildCount2 = getVirtualChildCount();
        boolean zM3318 = C1698.m3318(this);
        while (i2 < virtualChildCount2) {
            View childAt3 = getChildAt(i2);
            if (childAt3 != null && childAt3.getVisibility() != 8 && m3249(i2)) {
                C1659 c1659 = (C1659) childAt3.getLayoutParams();
                m3250(canvas, zM3318 ? childAt3.getRight() + ((ViewGroup.MarginLayoutParams) c1659).rightMargin : (childAt3.getLeft() - ((ViewGroup.MarginLayoutParams) c1659).leftMargin) - this.f5389);
            }
            i2++;
        }
        if (m3249(virtualChildCount2)) {
            View childAt4 = getChildAt(virtualChildCount2 - 1);
            if (childAt4 != null) {
                C1659 c16592 = (C1659) childAt4.getLayoutParams();
                if (zM3318) {
                    left = childAt4.getLeft() - ((ViewGroup.MarginLayoutParams) c16592).leftMargin;
                    i = this.f5389;
                    right = left - i;
                } else {
                    right = childAt4.getRight() + ((ViewGroup.MarginLayoutParams) c16592).rightMargin;
                }
            } else if (zM3318) {
                right = getPaddingLeft();
            } else {
                left = getWidth() - getPaddingRight();
                i = this.f5389;
                right = left - i;
            }
            m3250(canvas, right);
        }
    }

    @Override // android.view.View
    public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
        super.onInitializeAccessibilityEvent(accessibilityEvent);
        accessibilityEvent.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
    }

    @Override // android.view.View
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
        super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
        accessibilityNodeInfo.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
    }

    /* JADX WARN: Removed duplicated region for block: B:29:0x009a  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x0154  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x015e  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x0189  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x019b  */
    @Override // android.view.ViewGroup, android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        int i5;
        int i6;
        int i7;
        int i8;
        int i9;
        int i10;
        int i11;
        int i12;
        boolean z2;
        int measuredHeight;
        int i13;
        int i14;
        int i15;
        int i16 = 8;
        int i17 = 5;
        if (this.f5381 == 1) {
            int paddingLeft = getPaddingLeft();
            int i18 = i3 - i;
            int paddingRight = i18 - getPaddingRight();
            int paddingRight2 = (i18 - paddingLeft) - getPaddingRight();
            int virtualChildCount = getVirtualChildCount();
            int i19 = this.f5382;
            int i20 = i19 & 112;
            int i21 = 8388615 & i19;
            int paddingTop = i20 != 16 ? i20 != 80 ? getPaddingTop() : ((getPaddingTop() + i4) - i2) - this.f5383 : getPaddingTop() + (((i4 - i2) - this.f5383) / 2);
            int i22 = 0;
            while (i22 < virtualChildCount) {
                View childAt = getChildAt(i22);
                if (childAt == null) {
                    paddingTop += 0;
                } else if (childAt.getVisibility() != i16) {
                    int measuredWidth = childAt.getMeasuredWidth();
                    int measuredHeight2 = childAt.getMeasuredHeight();
                    C1659 c1659 = (C1659) childAt.getLayoutParams();
                    int i23 = c1659.f5394;
                    if (i23 < 0) {
                        i23 = i21;
                    }
                    int absoluteGravity = Gravity.getAbsoluteGravity(i23, C1920.m3760(this)) & 7;
                    if (absoluteGravity == 1) {
                        i13 = ((paddingRight2 - measuredWidth) / 2) + paddingLeft + ((ViewGroup.MarginLayoutParams) c1659).leftMargin;
                        i14 = ((ViewGroup.MarginLayoutParams) c1659).rightMargin;
                    } else if (absoluteGravity != i17) {
                        i15 = ((ViewGroup.MarginLayoutParams) c1659).leftMargin + paddingLeft;
                        if (m3249(i22)) {
                            paddingTop += this.f5390;
                        }
                        int i24 = paddingTop + ((ViewGroup.MarginLayoutParams) c1659).topMargin;
                        int i25 = i24 + 0;
                        childAt.layout(i15, i25, measuredWidth + i15, measuredHeight2 + i25);
                        paddingTop = C2803.m4861(measuredHeight2, ((ViewGroup.MarginLayoutParams) c1659).bottomMargin, 0, i24);
                        i22 += 0;
                    } else {
                        i13 = paddingRight - measuredWidth;
                        i14 = ((ViewGroup.MarginLayoutParams) c1659).rightMargin;
                    }
                    i15 = i13 - i14;
                    if (m3249(i22)) {
                    }
                    int i242 = paddingTop + ((ViewGroup.MarginLayoutParams) c1659).topMargin;
                    int i252 = i242 + 0;
                    childAt.layout(i15, i252, measuredWidth + i15, measuredHeight2 + i252);
                    paddingTop = C2803.m4861(measuredHeight2, ((ViewGroup.MarginLayoutParams) c1659).bottomMargin, 0, i242);
                    i22 += 0;
                }
                i22++;
                i16 = 8;
                i17 = 5;
            }
            return;
        }
        boolean zM3318 = C1698.m3318(this);
        int paddingTop2 = getPaddingTop();
        int i26 = i4 - i2;
        int paddingBottom = i26 - getPaddingBottom();
        int paddingBottom2 = (i26 - paddingTop2) - getPaddingBottom();
        int virtualChildCount2 = getVirtualChildCount();
        int i27 = this.f5382;
        int i28 = 8388615 & i27;
        int i29 = i27 & 112;
        boolean z3 = this.f5378;
        int[] iArr = this.f5386;
        int[] iArr2 = this.f5387;
        int absoluteGravity2 = Gravity.getAbsoluteGravity(i28, getLayoutDirection());
        int paddingLeft2 = absoluteGravity2 != 1 ? absoluteGravity2 != 5 ? getPaddingLeft() : ((getPaddingLeft() + i3) - i) - this.f5383 : getPaddingLeft() + (((i3 - i) - this.f5383) / 2);
        if (zM3318) {
            i5 = virtualChildCount2 - 1;
            i6 = -1;
        } else {
            i5 = 0;
            i6 = 1;
        }
        int i30 = 0;
        while (i30 < virtualChildCount2) {
            int i31 = (i6 * i30) + i5;
            View childAt2 = getChildAt(i31);
            if (childAt2 == null) {
                paddingLeft2 += 0;
                i7 = i5;
            } else {
                i7 = i5;
                if (childAt2.getVisibility() != 8) {
                    int measuredWidth2 = childAt2.getMeasuredWidth();
                    int measuredHeight3 = childAt2.getMeasuredHeight();
                    i8 = virtualChildCount2;
                    C1659 c16592 = (C1659) childAt2.getLayoutParams();
                    if (z3) {
                        i9 = i6;
                        i10 = i29;
                        int baseline = ((ViewGroup.MarginLayoutParams) c16592).height != -1 ? childAt2.getBaseline() : -1;
                        i11 = c16592.f5394;
                        if (i11 < 0) {
                            i11 = i10;
                        }
                        i12 = i11 & 112;
                        z2 = z3;
                        if (i12 != 16) {
                            measuredHeight = ((((paddingBottom2 - measuredHeight3) / 2) + paddingTop2) + ((ViewGroup.MarginLayoutParams) c16592).topMargin) - ((ViewGroup.MarginLayoutParams) c16592).bottomMargin;
                        } else if (i12 == 48) {
                            int i32 = ((ViewGroup.MarginLayoutParams) c16592).topMargin + paddingTop2;
                            measuredHeight = baseline != -1 ? (iArr[1] - baseline) + i32 : i32;
                        } else if (i12 != 80) {
                            measuredHeight = paddingTop2;
                        } else {
                            measuredHeight = (paddingBottom - measuredHeight3) - ((ViewGroup.MarginLayoutParams) c16592).bottomMargin;
                            if (baseline != -1) {
                                measuredHeight -= iArr2[2] - (childAt2.getMeasuredHeight() - baseline);
                            }
                        }
                        if (m3249(i31)) {
                            paddingLeft2 += this.f5389;
                        }
                        int i33 = paddingLeft2 + ((ViewGroup.MarginLayoutParams) c16592).leftMargin;
                        int i34 = i33 + 0;
                        childAt2.layout(i34, measuredHeight, measuredWidth2 + i34, measuredHeight3 + measuredHeight);
                        i30 += 0;
                        paddingLeft2 = C2803.m4861(measuredWidth2, ((ViewGroup.MarginLayoutParams) c16592).rightMargin, 0, i33);
                    } else {
                        i9 = i6;
                        i10 = i29;
                    }
                    i11 = c16592.f5394;
                    if (i11 < 0) {
                    }
                    i12 = i11 & 112;
                    z2 = z3;
                    if (i12 != 16) {
                    }
                    if (m3249(i31)) {
                    }
                    int i332 = paddingLeft2 + ((ViewGroup.MarginLayoutParams) c16592).leftMargin;
                    int i342 = i332 + 0;
                    childAt2.layout(i342, measuredHeight, measuredWidth2 + i342, measuredHeight3 + measuredHeight);
                    i30 += 0;
                    paddingLeft2 = C2803.m4861(measuredWidth2, ((ViewGroup.MarginLayoutParams) c16592).rightMargin, 0, i332);
                }
                i30++;
                i5 = i7;
                i6 = i9;
                virtualChildCount2 = i8;
                i29 = i10;
                z3 = z2;
            }
            i8 = virtualChildCount2;
            i9 = i6;
            i10 = i29;
            z2 = z3;
            i30++;
            i5 = i7;
            i6 = i9;
            virtualChildCount2 = i8;
            i29 = i10;
            z3 = z2;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:153:0x02ef  */
    /* JADX WARN: Removed duplicated region for block: B:159:0x02fc  */
    /* JADX WARN: Removed duplicated region for block: B:220:0x04a1  */
    /* JADX WARN: Removed duplicated region for block: B:221:0x04a6  */
    /* JADX WARN: Removed duplicated region for block: B:224:0x04cf  */
    /* JADX WARN: Removed duplicated region for block: B:225:0x04d4  */
    /* JADX WARN: Removed duplicated region for block: B:228:0x04dc  */
    /* JADX WARN: Removed duplicated region for block: B:229:0x04eb  */
    /* JADX WARN: Removed duplicated region for block: B:231:0x04ff  */
    /* JADX WARN: Removed duplicated region for block: B:235:0x0509  */
    /* JADX WARN: Removed duplicated region for block: B:238:0x0512  */
    /* JADX WARN: Removed duplicated region for block: B:247:0x0551  */
    /* JADX WARN: Removed duplicated region for block: B:253:0x0560  */
    /* JADX WARN: Removed duplicated region for block: B:256:0x0568  */
    /* JADX WARN: Removed duplicated region for block: B:260:0x0573  */
    /* JADX WARN: Removed duplicated region for block: B:284:0x05fc  */
    /* JADX WARN: Removed duplicated region for block: B:301:0x0656  */
    /* JADX WARN: Removed duplicated region for block: B:324:0x06cd  */
    /* JADX WARN: Removed duplicated region for block: B:326:0x06d4  */
    /* JADX WARN: Removed duplicated region for block: B:329:0x06f3  */
    /* JADX WARN: Removed duplicated region for block: B:378:0x07f0  */
    /* JADX WARN: Removed duplicated region for block: B:395:0x0856  */
    /* JADX WARN: Removed duplicated region for block: B:398:0x0889  */
    /* JADX WARN: Removed duplicated region for block: B:401:0x088e  */
    /* JADX WARN: Removed duplicated region for block: B:404:0x08b1  */
    /* JADX WARN: Removed duplicated region for block: B:451:? A[RETURN, SYNTHETIC] */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void onMeasure(int i, int i2) {
        char c;
        int i3;
        int i4;
        int iResolveSizeAndState;
        float f;
        int i5;
        int iCombineMeasuredStates;
        int i6;
        int i7;
        int i8;
        char c2;
        int iMax;
        int i9;
        int i10;
        int i11;
        int i12;
        int i13;
        int i14;
        float f2;
        int i15;
        int baseline;
        int i16;
        int i17;
        int i18;
        int i19;
        int i20;
        int i21;
        float f3;
        int i22;
        int i23;
        int i24;
        int i25;
        int i26;
        int i27;
        int i28;
        View view;
        C1659 c1659;
        int iMax2;
        int i29;
        boolean z;
        int i30;
        int baseline2;
        int i31;
        int i32;
        int i33;
        int i34;
        int i35;
        boolean z2;
        int i36;
        int i37;
        int i38;
        C1659 c16592;
        int i39;
        boolean z3;
        int iMax3;
        int i40 = -2;
        int i41 = 8;
        float f4 = 0.0f;
        int i42 = 1073741824;
        if (this.f5381 == 1) {
            this.f5383 = 0;
            int virtualChildCount = getVirtualChildCount();
            int mode = View.MeasureSpec.getMode(i);
            int mode2 = View.MeasureSpec.getMode(i2);
            int i43 = this.f5379;
            boolean z4 = this.f5385;
            int i44 = 0;
            float f5 = 0.0f;
            boolean z5 = false;
            boolean z6 = true;
            boolean z7 = false;
            int i45 = 0;
            int iMax4 = 0;
            int iCombineMeasuredStates2 = 0;
            int iMax5 = 0;
            int i46 = 0;
            int i47 = Integer.MIN_VALUE;
            int iMax6 = 0;
            while (i46 < virtualChildCount) {
                View childAt = getChildAt(i46);
                if (childAt == null) {
                    this.f5383 += i45;
                } else if (childAt.getVisibility() == i41) {
                    i46 += 0;
                } else {
                    if (m3249(i46)) {
                        this.f5383 += this.f5390;
                    }
                    C1659 c16593 = (C1659) childAt.getLayoutParams();
                    float f6 = c16593.f5393;
                    f5 += f6;
                    if (mode2 == i42 && ((ViewGroup.MarginLayoutParams) c16593).height == 0 && f6 > f4) {
                        int i48 = this.f5383;
                        this.f5383 = Math.max(i48, ((ViewGroup.MarginLayoutParams) c16593).topMargin + i48 + ((ViewGroup.MarginLayoutParams) c16593).bottomMargin);
                        z5 = true;
                        i39 = virtualChildCount;
                        i38 = mode2;
                        c16592 = c16593;
                    } else {
                        if (((ViewGroup.MarginLayoutParams) c16593).height != 0 || c16593.f5393 <= f4) {
                            i37 = Integer.MIN_VALUE;
                        } else {
                            ((ViewGroup.MarginLayoutParams) c16593).height = i40;
                            i37 = 0;
                        }
                        int i49 = f5 == f4 ? this.f5383 : 0;
                        int i50 = iMax4;
                        i38 = mode2;
                        c16592 = c16593;
                        i39 = virtualChildCount;
                        int i51 = i37;
                        measureChildWithMargins(childAt, i, 0, i2, i49);
                        if (i51 != i47) {
                            ((ViewGroup.MarginLayoutParams) c16592).height = i51;
                        }
                        int measuredHeight = childAt.getMeasuredHeight();
                        int i52 = this.f5383;
                        this.f5383 = Math.max(i52, i52 + measuredHeight + ((ViewGroup.MarginLayoutParams) c16592).topMargin + ((ViewGroup.MarginLayoutParams) c16592).bottomMargin + 0);
                        iMax4 = z4 ? Math.max(measuredHeight, i50) : i50;
                    }
                    if (i43 >= 0 && i43 == i46 + 1) {
                        this.f5380 = this.f5383;
                    }
                    if (i46 < i43 && c16592.f5393 > 0.0f) {
                        throw new RuntimeException("A child of LinearLayout with index less than mBaselineAlignedChildIndex has weight > 0, which won't work.  Either remove the weight, or don't set mBaselineAlignedChildIndex.");
                    }
                    if (mode == 1073741824 || ((ViewGroup.MarginLayoutParams) c16592).width != -1) {
                        z3 = false;
                    } else {
                        z3 = true;
                        z7 = true;
                    }
                    int i53 = ((ViewGroup.MarginLayoutParams) c16592).leftMargin + ((ViewGroup.MarginLayoutParams) c16592).rightMargin;
                    int measuredWidth = childAt.getMeasuredWidth() + i53;
                    int iMax7 = Math.max(iMax5, measuredWidth);
                    int iCombineMeasuredStates3 = View.combineMeasuredStates(iCombineMeasuredStates2, childAt.getMeasuredState());
                    boolean z8 = z6 && ((ViewGroup.MarginLayoutParams) c16592).width == -1;
                    if (c16592.f5393 > 0.0f) {
                        if (!z3) {
                            i53 = measuredWidth;
                        }
                        iMax3 = Math.max(i44, i53);
                    } else {
                        int i54 = i44;
                        if (!z3) {
                            i53 = measuredWidth;
                        }
                        iMax6 = Math.max(iMax6, i53);
                        iMax3 = i54;
                    }
                    i46 += 0;
                    i44 = iMax3;
                    iMax5 = iMax7;
                    z6 = z8;
                    iCombineMeasuredStates2 = iCombineMeasuredStates3;
                    i46++;
                    i45 = 0;
                    i40 = -2;
                    i47 = Integer.MIN_VALUE;
                    i41 = 8;
                    f4 = 0.0f;
                    i42 = 1073741824;
                    virtualChildCount = i39;
                    mode2 = i38;
                }
                i39 = virtualChildCount;
                i38 = mode2;
                i46++;
                i45 = 0;
                i40 = -2;
                i47 = Integer.MIN_VALUE;
                i41 = 8;
                f4 = 0.0f;
                i42 = 1073741824;
                virtualChildCount = i39;
                mode2 = i38;
            }
            int i55 = iMax4;
            int i56 = virtualChildCount;
            int i57 = mode2;
            int i58 = i44;
            int iMax8 = iMax6;
            if (this.f5383 > 0 && m3249(i56)) {
                this.f5383 += this.f5390;
            }
            if (z4) {
                i32 = i57;
                if (i32 == Integer.MIN_VALUE || i32 == 0) {
                    int i59 = 0;
                    this.f5383 = 0;
                    int i60 = 0;
                    while (i60 < i56) {
                        View childAt2 = getChildAt(i60);
                        if (childAt2 == null) {
                            this.f5383 += i59;
                        } else if (childAt2.getVisibility() == 8) {
                            i60 += 0;
                        } else {
                            C1659 c16594 = (C1659) childAt2.getLayoutParams();
                            int i61 = this.f5383;
                            this.f5383 = Math.max(i61, i61 + i55 + ((ViewGroup.MarginLayoutParams) c16594).topMargin + ((ViewGroup.MarginLayoutParams) c16594).bottomMargin + 0);
                        }
                        i60++;
                        i59 = 0;
                    }
                }
            } else {
                i32 = i57;
            }
            int paddingBottom = getPaddingBottom() + getPaddingTop() + this.f5383;
            this.f5383 = paddingBottom;
            int iResolveSizeAndState2 = View.resolveSizeAndState(Math.max(paddingBottom, getSuggestedMinimumHeight()), i2, 0);
            int i62 = (16777215 & iResolveSizeAndState2) - this.f5383;
            if (z5 || (i62 != 0 && f5 > 0.0f)) {
                float f7 = this.f5384;
                if (f7 > 0.0f) {
                    f5 = f7;
                }
                int i63 = 0;
                this.f5383 = 0;
                while (i63 < i56) {
                    View childAt3 = getChildAt(i63);
                    if (childAt3.getVisibility() == 8) {
                        i34 = i32;
                    } else {
                        C1659 c16595 = (C1659) childAt3.getLayoutParams();
                        float f8 = c16595.f5393;
                        if (f8 > 0.0f) {
                            int i64 = (int) ((i62 * f8) / f5);
                            f5 -= f8;
                            i62 -= i64;
                            int childMeasureSpec = ViewGroup.getChildMeasureSpec(i, getPaddingRight() + getPaddingLeft() + ((ViewGroup.MarginLayoutParams) c16595).leftMargin + ((ViewGroup.MarginLayoutParams) c16595).rightMargin, ((ViewGroup.MarginLayoutParams) c16595).width);
                            if (((ViewGroup.MarginLayoutParams) c16595).height == 0) {
                                i36 = 1073741824;
                                if (i32 == 1073741824) {
                                    if (i64 <= 0) {
                                        i64 = 0;
                                    }
                                    childAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(i64, 1073741824));
                                }
                                iCombineMeasuredStates2 = View.combineMeasuredStates(iCombineMeasuredStates2, childAt3.getMeasuredState() & (-256));
                            } else {
                                i36 = 1073741824;
                            }
                            int measuredHeight2 = childAt3.getMeasuredHeight() + i64;
                            childAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(measuredHeight2 < 0 ? 0 : measuredHeight2, i36));
                            iCombineMeasuredStates2 = View.combineMeasuredStates(iCombineMeasuredStates2, childAt3.getMeasuredState() & (-256));
                        }
                        int i65 = ((ViewGroup.MarginLayoutParams) c16595).leftMargin + ((ViewGroup.MarginLayoutParams) c16595).rightMargin;
                        int measuredWidth2 = childAt3.getMeasuredWidth() + i65;
                        iMax5 = Math.max(iMax5, measuredWidth2);
                        if (mode != 1073741824) {
                            i34 = i32;
                            i35 = -1;
                            z2 = ((ViewGroup.MarginLayoutParams) c16595).width == -1;
                            if (!z2) {
                                i65 = measuredWidth2;
                            }
                            iMax8 = Math.max(iMax8, i65);
                            boolean z9 = !z6 && ((ViewGroup.MarginLayoutParams) c16595).width == i35;
                            int i66 = this.f5383;
                            this.f5383 = Math.max(i66, childAt3.getMeasuredHeight() + i66 + ((ViewGroup.MarginLayoutParams) c16595).topMargin + ((ViewGroup.MarginLayoutParams) c16595).bottomMargin + 0);
                            z6 = z9;
                        } else {
                            i34 = i32;
                            i35 = -1;
                        }
                        if (!z2) {
                        }
                        iMax8 = Math.max(iMax8, i65);
                        if (z6) {
                            int i662 = this.f5383;
                            this.f5383 = Math.max(i662, childAt3.getMeasuredHeight() + i662 + ((ViewGroup.MarginLayoutParams) c16595).topMargin + ((ViewGroup.MarginLayoutParams) c16595).bottomMargin + 0);
                            z6 = z9;
                        }
                    }
                    i63++;
                    i32 = i34;
                }
                i33 = i;
                this.f5383 = getPaddingBottom() + getPaddingTop() + this.f5383;
            } else {
                iMax8 = Math.max(iMax8, i58);
                if (z4 && i32 != 1073741824) {
                    for (int i67 = 0; i67 < i56; i67++) {
                        View childAt4 = getChildAt(i67);
                        if (childAt4 != null && childAt4.getVisibility() != 8 && ((C1659) childAt4.getLayoutParams()).f5393 > 0.0f) {
                            childAt4.measure(View.MeasureSpec.makeMeasureSpec(childAt4.getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(i55, 1073741824));
                        }
                    }
                }
                i33 = i;
            }
            if (z6 || mode == 1073741824) {
                iMax8 = iMax5;
            }
            setMeasuredDimension(View.resolveSizeAndState(Math.max(getPaddingRight() + getPaddingLeft() + iMax8, getSuggestedMinimumWidth()), i33, iCombineMeasuredStates2), iResolveSizeAndState2);
            if (z7) {
                int iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
                for (int i68 = 0; i68 < i56; i68++) {
                    View childAt5 = getChildAt(i68);
                    if (childAt5.getVisibility() != 8) {
                        C1659 c16596 = (C1659) childAt5.getLayoutParams();
                        if (((ViewGroup.MarginLayoutParams) c16596).width == -1) {
                            int i69 = ((ViewGroup.MarginLayoutParams) c16596).height;
                            ((ViewGroup.MarginLayoutParams) c16596).height = childAt5.getMeasuredHeight();
                            measureChildWithMargins(childAt5, iMakeMeasureSpec, 0, i2, 0);
                            ((ViewGroup.MarginLayoutParams) c16596).height = i69;
                        }
                    }
                }
                return;
            }
            return;
        }
        this.f5383 = 0;
        int virtualChildCount2 = getVirtualChildCount();
        int mode3 = View.MeasureSpec.getMode(i);
        int mode4 = View.MeasureSpec.getMode(i2);
        if (this.f5386 == null || this.f5387 == null) {
            this.f5386 = new int[4];
            this.f5387 = new int[4];
        }
        int[] iArr = this.f5386;
        int[] iArr2 = this.f5387;
        iArr[3] = -1;
        iArr[2] = -1;
        iArr[1] = -1;
        iArr[0] = -1;
        iArr2[3] = -1;
        iArr2[2] = -1;
        iArr2[1] = -1;
        iArr2[0] = -1;
        boolean z10 = this.f5378;
        boolean z11 = this.f5385;
        boolean z12 = mode3 == 1073741824;
        float f9 = 0.0f;
        boolean z13 = false;
        boolean z14 = true;
        boolean z15 = false;
        int i70 = 0;
        int i71 = 0;
        int iMax9 = 0;
        int iMax10 = 0;
        int iMax11 = 0;
        int i72 = 0;
        while (i71 < virtualChildCount2) {
            boolean z16 = z11;
            View childAt6 = getChildAt(i71);
            if (childAt6 == null) {
                this.f5383 += 0;
                i20 = i70;
                i21 = iMax9;
            } else {
                i20 = i70;
                i21 = iMax9;
                if (childAt6.getVisibility() == 8) {
                    i71 += 0;
                } else {
                    if (m3249(i71)) {
                        this.f5383 += this.f5389;
                    }
                    C1659 c16597 = (C1659) childAt6.getLayoutParams();
                    float f10 = c16597.f5393;
                    float f11 = f9 + f10;
                    if (mode3 == 1073741824 && ((ViewGroup.MarginLayoutParams) c16597).width == 0 && f10 > 0.0f) {
                        if (z12) {
                            i31 = i71;
                            this.f5383 = ((ViewGroup.MarginLayoutParams) c16597).leftMargin + ((ViewGroup.MarginLayoutParams) c16597).rightMargin + this.f5383;
                        } else {
                            i31 = i71;
                            int i73 = this.f5383;
                            this.f5383 = Math.max(i73, ((ViewGroup.MarginLayoutParams) c16597).leftMargin + i73 + ((ViewGroup.MarginLayoutParams) c16597).rightMargin);
                        }
                        if (z10) {
                            int iMakeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(0, 0);
                            childAt6.measure(iMakeMeasureSpec2, iMakeMeasureSpec2);
                            c1659 = c16597;
                            i23 = i20;
                            i26 = i21;
                            i25 = i31;
                            view = childAt6;
                            i27 = mode3;
                            i28 = iMax10;
                        } else {
                            z13 = true;
                            c1659 = c16597;
                            iMax2 = i20;
                            i26 = i21;
                            i25 = i31;
                            i29 = 1073741824;
                            view = childAt6;
                            i27 = mode3;
                            i28 = iMax10;
                            if (mode4 == i29) {
                            }
                            i71++;
                            z11 = z16;
                            mode3 = i27;
                        }
                    } else {
                        int i74 = i71;
                        if (((ViewGroup.MarginLayoutParams) c16597).width == 0) {
                            f3 = 0.0f;
                            if (c16597.f5393 > 0.0f) {
                                ((ViewGroup.MarginLayoutParams) c16597).width = -2;
                                i22 = 0;
                            }
                            i23 = i20;
                            i24 = i22;
                            i25 = i74;
                            i26 = i21;
                            i27 = mode3;
                            i28 = iMax10;
                            view = childAt6;
                            measureChildWithMargins(childAt6, i, f11 != f3 ? this.f5383 : 0, i2, 0);
                            if (i24 == Integer.MIN_VALUE) {
                                c1659 = c16597;
                                ((ViewGroup.MarginLayoutParams) c1659).width = i24;
                            } else {
                                c1659 = c16597;
                            }
                            int measuredWidth3 = view.getMeasuredWidth();
                            if (z12) {
                                int i75 = this.f5383;
                                this.f5383 = Math.max(i75, i75 + measuredWidth3 + ((ViewGroup.MarginLayoutParams) c1659).leftMargin + ((ViewGroup.MarginLayoutParams) c1659).rightMargin + 0);
                            } else {
                                this.f5383 = C2803.m4861(((ViewGroup.MarginLayoutParams) c1659).leftMargin + measuredWidth3, ((ViewGroup.MarginLayoutParams) c1659).rightMargin, 0, this.f5383);
                            }
                            if (!z16) {
                                iMax2 = Math.max(measuredWidth3, i23);
                            }
                            i29 = 1073741824;
                            if (mode4 == i29 && ((ViewGroup.MarginLayoutParams) c1659).height == -1) {
                                z = true;
                                z15 = true;
                            } else {
                                z = false;
                            }
                            int i76 = ((ViewGroup.MarginLayoutParams) c1659).topMargin + ((ViewGroup.MarginLayoutParams) c1659).bottomMargin;
                            int measuredHeight3 = view.getMeasuredHeight() + i76;
                            int iCombineMeasuredStates4 = View.combineMeasuredStates(i72, view.getMeasuredState());
                            if (z10 || (baseline2 = view.getBaseline()) == -1) {
                                i30 = iMax2;
                            } else {
                                int i77 = c1659.f5394;
                                if (i77 < 0) {
                                    i77 = this.f5382;
                                }
                                int i78 = (((i77 & 112) >> 4) & (-2)) >> 1;
                                i30 = iMax2;
                                iArr[i78] = Math.max(iArr[i78], baseline2);
                                iArr2[i78] = Math.max(iArr2[i78], measuredHeight3 - baseline2);
                            }
                            int iMax12 = Math.max(iMax11, measuredHeight3);
                            boolean z17 = !z14 && ((ViewGroup.MarginLayoutParams) c1659).height == -1;
                            if (c1659.f5393 <= 0.0f) {
                                if (!z) {
                                    i76 = measuredHeight3;
                                }
                                iMax10 = Math.max(i28, i76);
                                iMax9 = i26;
                            } else {
                                if (!z) {
                                    i76 = measuredHeight3;
                                }
                                iMax9 = Math.max(i26, i76);
                                iMax10 = i28;
                            }
                            i71 = i25 + 0;
                            i72 = iCombineMeasuredStates4;
                            z14 = z17;
                            i70 = i30;
                            iMax11 = iMax12;
                            f9 = f11;
                            i71++;
                            z11 = z16;
                            mode3 = i27;
                        } else {
                            f3 = 0.0f;
                        }
                        i22 = Integer.MIN_VALUE;
                        i23 = i20;
                        i24 = i22;
                        i25 = i74;
                        i26 = i21;
                        i27 = mode3;
                        i28 = iMax10;
                        view = childAt6;
                        measureChildWithMargins(childAt6, i, f11 != f3 ? this.f5383 : 0, i2, 0);
                        if (i24 == Integer.MIN_VALUE) {
                        }
                        int measuredWidth32 = view.getMeasuredWidth();
                        if (z12) {
                        }
                        if (!z16) {
                        }
                        i29 = 1073741824;
                        if (mode4 == i29) {
                            z = false;
                            int i762 = ((ViewGroup.MarginLayoutParams) c1659).topMargin + ((ViewGroup.MarginLayoutParams) c1659).bottomMargin;
                            int measuredHeight32 = view.getMeasuredHeight() + i762;
                            int iCombineMeasuredStates42 = View.combineMeasuredStates(i72, view.getMeasuredState());
                            if (z10) {
                                i30 = iMax2;
                                int iMax122 = Math.max(iMax11, measuredHeight32);
                                if (z14) {
                                    if (c1659.f5393 <= 0.0f) {
                                    }
                                    i71 = i25 + 0;
                                    i72 = iCombineMeasuredStates42;
                                    z14 = z17;
                                    i70 = i30;
                                    iMax11 = iMax122;
                                    f9 = f11;
                                }
                            }
                        }
                        i71++;
                        z11 = z16;
                        mode3 = i27;
                    }
                    iMax2 = i23;
                    i29 = 1073741824;
                    if (mode4 == i29) {
                    }
                    i71++;
                    z11 = z16;
                    mode3 = i27;
                }
            }
            i70 = i20;
            iMax9 = i21;
            i27 = mode3;
            i71++;
            z11 = z16;
            mode3 = i27;
        }
        int i79 = i70;
        int i80 = iMax9;
        boolean z18 = z11;
        int i81 = mode3;
        int i82 = iMax10;
        if (this.f5383 > 0 && m3249(virtualChildCount2)) {
            this.f5383 += this.f5389;
        }
        if (iArr[1] == -1 && iArr[0] == -1 && iArr[2] == -1) {
            c = 3;
            if (iArr[3] == -1) {
                i3 = i72;
            }
            if (z18) {
                i4 = i81;
            } else {
                i4 = i81;
                if (i4 == Integer.MIN_VALUE || i4 == 0) {
                    int i83 = 0;
                    this.f5383 = 0;
                    int i84 = 0;
                    while (i84 < virtualChildCount2) {
                        View childAt7 = getChildAt(i84);
                        if (childAt7 == null) {
                            this.f5383 += i83;
                            i18 = i84;
                        } else if (childAt7.getVisibility() == 8) {
                            i19 = i84 + 0;
                            i84 = i19 + 1;
                            i83 = 0;
                        } else {
                            C1659 c16598 = (C1659) childAt7.getLayoutParams();
                            if (z12) {
                                i18 = i84;
                                this.f5383 = C2803.m4861(((ViewGroup.MarginLayoutParams) c16598).leftMargin + i79, ((ViewGroup.MarginLayoutParams) c16598).rightMargin, 0, this.f5383);
                            } else {
                                i18 = i84;
                                int i85 = this.f5383;
                                this.f5383 = Math.max(i85, i85 + i79 + ((ViewGroup.MarginLayoutParams) c16598).leftMargin + ((ViewGroup.MarginLayoutParams) c16598).rightMargin + 0);
                            }
                        }
                        i19 = i18;
                        i84 = i19 + 1;
                        i83 = 0;
                    }
                }
            }
            int paddingRight = getPaddingRight() + getPaddingLeft() + this.f5383;
            this.f5383 = paddingRight;
            iResolveSizeAndState = View.resolveSizeAndState(Math.max(paddingRight, getSuggestedMinimumWidth()), i, 0);
            int i86 = (16777215 & iResolveSizeAndState) - this.f5383;
            if (!z13 || (i86 != 0 && f9 > 0.0f)) {
                f = this.f5384;
                if (f > 0.0f) {
                    f9 = f;
                }
                iArr[3] = -1;
                iArr[2] = -1;
                iArr[1] = -1;
                iArr[0] = -1;
                iArr2[3] = -1;
                iArr2[2] = -1;
                iArr2[1] = -1;
                iArr2[0] = -1;
                this.f5383 = 0;
                iMax11 = -1;
                i5 = 0;
                iCombineMeasuredStates = i3;
                while (i5 < virtualChildCount2) {
                    View childAt8 = getChildAt(i5);
                    if (childAt8 != null) {
                        i12 = virtualChildCount2;
                        if (childAt8.getVisibility() == 8) {
                            i9 = iResolveSizeAndState;
                            i10 = i4;
                            i11 = i86;
                        } else {
                            C1659 c16599 = (C1659) childAt8.getLayoutParams();
                            float f12 = c16599.f5393;
                            if (f12 > 0.0f) {
                                i9 = iResolveSizeAndState;
                                int i87 = (int) ((i86 * f12) / f9);
                                float f13 = f9 - f12;
                                int i88 = i86 - i87;
                                int childMeasureSpec2 = ViewGroup.getChildMeasureSpec(i2, getPaddingBottom() + getPaddingTop() + ((ViewGroup.MarginLayoutParams) c16599).topMargin + ((ViewGroup.MarginLayoutParams) c16599).bottomMargin, ((ViewGroup.MarginLayoutParams) c16599).height);
                                if (((ViewGroup.MarginLayoutParams) c16599).width == 0) {
                                    i17 = 1073741824;
                                    if (i4 == 1073741824) {
                                        if (i87 <= 0) {
                                            i87 = 0;
                                        }
                                        childAt8.measure(View.MeasureSpec.makeMeasureSpec(i87, 1073741824), childMeasureSpec2);
                                    }
                                    iCombineMeasuredStates = View.combineMeasuredStates(iCombineMeasuredStates, childAt8.getMeasuredState() & (-16777216));
                                    f9 = f13;
                                    i13 = i88;
                                } else {
                                    i17 = 1073741824;
                                }
                                int measuredWidth4 = childAt8.getMeasuredWidth() + i87;
                                childAt8.measure(View.MeasureSpec.makeMeasureSpec(measuredWidth4 < 0 ? 0 : measuredWidth4, i17), childMeasureSpec2);
                                iCombineMeasuredStates = View.combineMeasuredStates(iCombineMeasuredStates, childAt8.getMeasuredState() & (-16777216));
                                f9 = f13;
                                i13 = i88;
                            } else {
                                i9 = iResolveSizeAndState;
                                i13 = i86;
                            }
                            if (z12) {
                                i14 = i13;
                                f2 = f9;
                                i10 = i4;
                                this.f5383 = C2803.m4861(childAt8.getMeasuredWidth() + ((ViewGroup.MarginLayoutParams) c16599).leftMargin, ((ViewGroup.MarginLayoutParams) c16599).rightMargin, 0, this.f5383);
                            } else {
                                i14 = i13;
                                f2 = f9;
                                i10 = i4;
                                int i89 = this.f5383;
                                this.f5383 = Math.max(i89, childAt8.getMeasuredWidth() + i89 + ((ViewGroup.MarginLayoutParams) c16599).leftMargin + ((ViewGroup.MarginLayoutParams) c16599).rightMargin + 0);
                            }
                            boolean z19 = mode4 != 1073741824 && ((ViewGroup.MarginLayoutParams) c16599).height == -1;
                            int i90 = ((ViewGroup.MarginLayoutParams) c16599).topMargin + ((ViewGroup.MarginLayoutParams) c16599).bottomMargin;
                            int measuredHeight4 = childAt8.getMeasuredHeight() + i90;
                            iMax11 = Math.max(iMax11, measuredHeight4);
                            if (!z19) {
                                i90 = measuredHeight4;
                            }
                            int iMax13 = Math.max(i80, i90);
                            if (z14) {
                                i15 = -1;
                                boolean z20 = ((ViewGroup.MarginLayoutParams) c16599).height == -1;
                                if (z10 && (baseline = childAt8.getBaseline()) != i15) {
                                    i16 = c16599.f5394;
                                    if (i16 < 0) {
                                        i16 = this.f5382;
                                    }
                                    int i91 = (((i16 & 112) >> 4) & (-2)) >> 1;
                                    iArr[i91] = Math.max(iArr[i91], baseline);
                                    iArr2[i91] = Math.max(iArr2[i91], measuredHeight4 - baseline);
                                }
                                i80 = iMax13;
                                z14 = z20;
                                f9 = f2;
                                i11 = i14;
                                i5++;
                                i86 = i11;
                                virtualChildCount2 = i12;
                                iResolveSizeAndState = i9;
                                i4 = i10;
                            } else {
                                i15 = -1;
                            }
                            if (z10) {
                                i16 = c16599.f5394;
                                if (i16 < 0) {
                                }
                                int i912 = (((i16 & 112) >> 4) & (-2)) >> 1;
                                iArr[i912] = Math.max(iArr[i912], baseline);
                                iArr2[i912] = Math.max(iArr2[i912], measuredHeight4 - baseline);
                            }
                            i80 = iMax13;
                            z14 = z20;
                            f9 = f2;
                            i11 = i14;
                            i5++;
                            i86 = i11;
                            virtualChildCount2 = i12;
                            iResolveSizeAndState = i9;
                            i4 = i10;
                        }
                    } else {
                        i9 = iResolveSizeAndState;
                        i10 = i4;
                        i11 = i86;
                        i12 = virtualChildCount2;
                    }
                    i5++;
                    i86 = i11;
                    virtualChildCount2 = i12;
                    iResolveSizeAndState = i9;
                    i4 = i10;
                }
                i6 = i2;
                i7 = iResolveSizeAndState;
                i8 = virtualChildCount2;
                this.f5383 = getPaddingRight() + getPaddingLeft() + this.f5383;
                if (iArr[1] != -1 && iArr[0] == -1 && iArr[2] == -1) {
                    c2 = 3;
                    if (iArr[3] == -1) {
                        iMax = i80;
                    }
                } else {
                    c2 = 3;
                }
                iMax11 = Math.max(iMax11, Math.max(iArr2[c2], Math.max(iArr2[0], Math.max(iArr2[1], iArr2[2]))) + Math.max(iArr[c2], Math.max(iArr[0], Math.max(iArr[1], iArr[2]))));
                if (z14 || mode4 == 1073741824) {
                    i80 = iMax11;
                }
                setMeasuredDimension(((-16777216) & iCombineMeasuredStates) | i7, View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i80, getSuggestedMinimumHeight()), i6, iCombineMeasuredStates << 16));
                if (z15) {
                    int iMakeMeasureSpec3 = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824);
                    int i92 = i8;
                    for (int i93 = 0; i93 < i92; i93++) {
                        View childAt9 = getChildAt(i93);
                        if (childAt9.getVisibility() != 8) {
                            C1659 c165910 = (C1659) childAt9.getLayoutParams();
                            if (((ViewGroup.MarginLayoutParams) c165910).height == -1) {
                                int i94 = ((ViewGroup.MarginLayoutParams) c165910).width;
                                ((ViewGroup.MarginLayoutParams) c165910).width = childAt9.getMeasuredWidth();
                                measureChildWithMargins(childAt9, i, 0, iMakeMeasureSpec3, 0);
                                ((ViewGroup.MarginLayoutParams) c165910).width = i94;
                            }
                        }
                    }
                    return;
                }
                return;
            }
            iMax = Math.max(i80, i82);
            if (z18 && i4 != 1073741824) {
                for (int i95 = 0; i95 < virtualChildCount2; i95++) {
                    View childAt10 = getChildAt(i95);
                    if (childAt10 != null && childAt10.getVisibility() != 8 && ((C1659) childAt10.getLayoutParams()).f5393 > 0.0f) {
                        childAt10.measure(View.MeasureSpec.makeMeasureSpec(i79, 1073741824), View.MeasureSpec.makeMeasureSpec(childAt10.getMeasuredHeight(), 1073741824));
                    }
                }
            }
            i6 = i2;
            i7 = iResolveSizeAndState;
            i8 = virtualChildCount2;
            iCombineMeasuredStates = i3;
            i80 = iMax;
            if (z14) {
                i80 = iMax11;
            }
            setMeasuredDimension(((-16777216) & iCombineMeasuredStates) | i7, View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i80, getSuggestedMinimumHeight()), i6, iCombineMeasuredStates << 16));
            if (z15) {
            }
        } else {
            c = 3;
        }
        i3 = i72;
        iMax11 = Math.max(iMax11, Math.max(iArr2[3], Math.max(iArr2[0], Math.max(iArr2[1], iArr2[2]))) + Math.max(iArr[c], Math.max(iArr[0], Math.max(iArr[1], iArr[2]))));
        if (z18) {
        }
        int paddingRight2 = getPaddingRight() + getPaddingLeft() + this.f5383;
        this.f5383 = paddingRight2;
        iResolveSizeAndState = View.resolveSizeAndState(Math.max(paddingRight2, getSuggestedMinimumWidth()), i, 0);
        int i862 = (16777215 & iResolveSizeAndState) - this.f5383;
        if (z13) {
            f = this.f5384;
            if (f > 0.0f) {
            }
            iArr[3] = -1;
            iArr[2] = -1;
            iArr[1] = -1;
            iArr[0] = -1;
            iArr2[3] = -1;
            iArr2[2] = -1;
            iArr2[1] = -1;
            iArr2[0] = -1;
            this.f5383 = 0;
            iMax11 = -1;
            i5 = 0;
            iCombineMeasuredStates = i3;
            while (i5 < virtualChildCount2) {
            }
            i6 = i2;
            i7 = iResolveSizeAndState;
            i8 = virtualChildCount2;
            this.f5383 = getPaddingRight() + getPaddingLeft() + this.f5383;
            if (iArr[1] != -1) {
                c2 = 3;
                iMax11 = Math.max(iMax11, Math.max(iArr2[c2], Math.max(iArr2[0], Math.max(iArr2[1], iArr2[2]))) + Math.max(iArr[c2], Math.max(iArr[0], Math.max(iArr[1], iArr[2]))));
            }
        }
        if (z14) {
        }
        setMeasuredDimension(((-16777216) & iCombineMeasuredStates) | i7, View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i80, getSuggestedMinimumHeight()), i6, iCombineMeasuredStates << 16));
        if (z15) {
        }
    }

    public void setBaselineAligned(boolean z) {
        this.f5378 = z;
    }

    public void setBaselineAlignedChildIndex(int i) {
        if (i >= 0 && i < getChildCount()) {
            this.f5379 = i;
            return;
        }
        StringBuilder sbM4889 = C2803.m4889("base aligned child index out of range (0, ");
        sbM4889.append(getChildCount());
        sbM4889.append(")");
        throw new IllegalArgumentException(sbM4889.toString());
    }

    public void setDividerDrawable(Drawable drawable) {
        if (drawable == this.f5388) {
            return;
        }
        this.f5388 = drawable;
        if (drawable != null) {
            this.f5389 = drawable.getIntrinsicWidth();
            this.f5390 = drawable.getIntrinsicHeight();
        } else {
            this.f5389 = 0;
            this.f5390 = 0;
        }
        setWillNotDraw(drawable == null);
        requestLayout();
    }

    public void setDividerPadding(int i) {
        this.f5392 = i;
    }

    public void setGravity(int i) {
        if (this.f5382 != i) {
            if ((8388615 & i) == 0) {
                i |= 8388611;
            }
            if ((i & 112) == 0) {
                i |= 48;
            }
            this.f5382 = i;
            requestLayout();
        }
    }

    public void setHorizontalGravity(int i) {
        int i2 = i & 8388615;
        int i3 = this.f5382;
        if ((8388615 & i3) != i2) {
            this.f5382 = i2 | ((-8388616) & i3);
            requestLayout();
        }
    }

    public void setMeasureWithLargestChildEnabled(boolean z) {
        this.f5385 = z;
    }

    public void setOrientation(int i) {
        if (this.f5381 != i) {
            this.f5381 = i;
            requestLayout();
        }
    }

    public void setShowDividers(int i) {
        if (i != this.f5391) {
            requestLayout();
        }
        this.f5391 = i;
    }

    public void setVerticalGravity(int i) {
        int i2 = i & 112;
        int i3 = this.f5382;
        if ((i3 & 112) != i2) {
            this.f5382 = i2 | (i3 & (-113));
            requestLayout();
        }
    }

    public void setWeightSum(float f) {
        this.f5384 = Math.max(0.0f, f);
    }

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

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3248(Canvas canvas, int i) {
        this.f5388.setBounds(getPaddingLeft() + this.f5392, i, (getWidth() - getPaddingRight()) - this.f5392, this.f5390 + i);
        this.f5388.draw(canvas);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean m3249(int i) {
        if (i == 0) {
            return (this.f5391 & 1) != 0;
        }
        if (i == getChildCount()) {
            return (this.f5391 & 4) != 0;
        }
        if ((this.f5391 & 2) == 0) {
            return false;
        }
        for (int i2 = i - 1; i2 >= 0; i2--) {
            if (getChildAt(i2).getVisibility() != 8) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m3250(Canvas canvas, int i) {
        this.f5388.setBounds(i, getPaddingTop() + this.f5392, this.f5389 + i, (getHeight() - getPaddingBottom()) - this.f5392);
        this.f5388.draw(canvas);
    }
}
