package t3;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.collection.s;
import i0.r;
import java.io.IOException;
import java.util.ArrayDeque;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

/* JADX INFO: loaded from: classes.dex */
public final class p extends g {

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public static final PorterDuff.Mode f32933j = PorterDuff.Mode.SRC_IN;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public n f32934b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public PorterDuffColorFilter f32935c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public ColorFilter f32936d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f32937e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f32938f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final float[] f32939g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final Matrix f32940h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final Rect f32941i;

    public p() {
        this.f32938f = true;
        this.f32939g = new float[9];
        this.f32940h = new Matrix();
        this.f32941i = new Rect();
        n nVar = new n();
        nVar.f32922c = null;
        nVar.f32923d = f32933j;
        nVar.f32921b = new m();
        this.f32934b = nVar;
    }

    @Nullable
    public static p create(@NonNull Resources resources, @DrawableRes int i10, @Nullable Resources.Theme theme) {
        p pVar = new p();
        pVar.f32876a = r.getDrawable(resources, i10, theme);
        new o(pVar.f32876a.getConstantState());
        return pVar;
    }

    public final PorterDuffColorFilter a(ColorStateList colorStateList, PorterDuff.Mode mode) {
        if (colorStateList == null || mode == null) {
            return null;
        }
        return new PorterDuffColorFilter(colorStateList.getColorForState(getState(), 0), mode);
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean canApplyTheme() {
        Drawable drawable = this.f32876a;
        if (drawable == null) {
            return false;
        }
        drawable.canApplyTheme();
        return false;
    }

    @Override // android.graphics.drawable.Drawable
    public final void draw(Canvas canvas) {
        Paint paint;
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.draw(canvas);
            return;
        }
        Rect rect = this.f32941i;
        copyBounds(rect);
        if (rect.width() <= 0 || rect.height() <= 0) {
            return;
        }
        ColorFilter colorFilter = this.f32936d;
        if (colorFilter == null) {
            colorFilter = this.f32935c;
        }
        Matrix matrix = this.f32940h;
        canvas.getMatrix(matrix);
        float[] fArr = this.f32939g;
        matrix.getValues(fArr);
        float fAbs = Math.abs(fArr[0]);
        float fAbs2 = Math.abs(fArr[4]);
        float fAbs3 = Math.abs(fArr[1]);
        float fAbs4 = Math.abs(fArr[3]);
        if (fAbs3 != 0.0f || fAbs4 != 0.0f) {
            fAbs = 1.0f;
            fAbs2 = 1.0f;
        }
        int iWidth = (int) (rect.width() * fAbs);
        int iMin = Math.min(2048, iWidth);
        int iMin2 = Math.min(2048, (int) (rect.height() * fAbs2));
        if (iMin <= 0 || iMin2 <= 0) {
            return;
        }
        int iSave = canvas.save();
        canvas.translate(rect.left, rect.top);
        if (isAutoMirrored() && getLayoutDirection() == 1) {
            canvas.translate(rect.width(), 0.0f);
            canvas.scale(-1.0f, 1.0f);
        }
        rect.offsetTo(0, 0);
        n nVar = this.f32934b;
        Bitmap bitmap = nVar.f32925f;
        if (bitmap == null || iMin != bitmap.getWidth() || iMin2 != nVar.f32925f.getHeight()) {
            nVar.f32925f = Bitmap.createBitmap(iMin, iMin2, Bitmap.Config.ARGB_8888);
            nVar.f32930k = true;
        }
        if (this.f32938f) {
            n nVar2 = this.f32934b;
            if (nVar2.f32930k || nVar2.f32926g != nVar2.f32922c || nVar2.f32927h != nVar2.f32923d || nVar2.f32929j != nVar2.f32924e || nVar2.f32928i != nVar2.f32921b.getRootAlpha()) {
                n nVar3 = this.f32934b;
                nVar3.f32925f.eraseColor(0);
                Canvas canvas2 = new Canvas(nVar3.f32925f);
                m mVar = nVar3.f32921b;
                mVar.a(mVar.f32911g, m.f32904p, canvas2, iMin, iMin2);
                n nVar4 = this.f32934b;
                nVar4.f32926g = nVar4.f32922c;
                nVar4.f32927h = nVar4.f32923d;
                nVar4.f32928i = nVar4.f32921b.getRootAlpha();
                nVar4.f32929j = nVar4.f32924e;
                nVar4.f32930k = false;
            }
        } else {
            n nVar5 = this.f32934b;
            nVar5.f32925f.eraseColor(0);
            Canvas canvas3 = new Canvas(nVar5.f32925f);
            m mVar2 = nVar5.f32921b;
            mVar2.a(mVar2.f32911g, m.f32904p, canvas3, iMin, iMin2);
        }
        n nVar6 = this.f32934b;
        if (nVar6.f32921b.getRootAlpha() >= 255 && colorFilter == null) {
            paint = null;
        } else {
            if (nVar6.f32931l == null) {
                Paint paint2 = new Paint();
                nVar6.f32931l = paint2;
                paint2.setFilterBitmap(true);
            }
            nVar6.f32931l.setAlpha(nVar6.f32921b.getRootAlpha());
            nVar6.f32931l.setColorFilter(colorFilter);
            paint = nVar6.f32931l;
        }
        canvas.drawBitmap(nVar6.f32925f, (Rect) null, rect, paint);
        canvas.restoreToCount(iSave);
    }

    @Override // android.graphics.drawable.Drawable
    public final int getAlpha() {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.getAlpha() : this.f32934b.f32921b.getRootAlpha();
    }

    @Override // android.graphics.drawable.Drawable
    public final int getChangingConfigurations() {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.getChangingConfigurations() : super.getChangingConfigurations() | this.f32934b.getChangingConfigurations();
    }

    @Override // android.graphics.drawable.Drawable
    public final ColorFilter getColorFilter() {
        Drawable drawable = this.f32876a;
        return drawable != null ? k0.a.getColorFilter(drawable) : this.f32936d;
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable.ConstantState getConstantState() {
        if (this.f32876a != null) {
            return new o(this.f32876a.getConstantState());
        }
        this.f32934b.f32920a = getChangingConfigurations();
        return this.f32934b;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicHeight() {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.getIntrinsicHeight() : (int) this.f32934b.f32921b.f32913i;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicWidth() {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.getIntrinsicWidth() : (int) this.f32934b.f32921b.f32912h;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getOpacity() {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            return drawable.getOpacity();
        }
        return -3;
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet) throws XmlPullParserException, IOException {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.inflate(resources, xmlPullParser, attributeSet);
        } else {
            inflate(resources, xmlPullParser, attributeSet, null);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void invalidateSelf() {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.invalidateSelf();
        } else {
            super.invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isAutoMirrored() {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.isAutoMirrored() : this.f32934b.f32924e;
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isStateful() {
        ColorStateList colorStateList;
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            return drawable.isStateful();
        }
        if (!super.isStateful()) {
            n nVar = this.f32934b;
            if (nVar != null) {
                m mVar = nVar.f32921b;
                if (mVar.f32918n == null) {
                    mVar.f32918n = Boolean.valueOf(mVar.f32911g.a());
                }
                if (mVar.f32918n.booleanValue() || ((colorStateList = this.f32934b.f32922c) != null && colorStateList.isStateful())) {
                }
            }
            return false;
        }
        return true;
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable mutate() {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.mutate();
            return this;
        }
        if (!this.f32937e && super.mutate() == this) {
            n nVar = this.f32934b;
            n nVar2 = new n();
            nVar2.f32922c = null;
            nVar2.f32923d = f32933j;
            if (nVar != null) {
                nVar2.f32920a = nVar.f32920a;
                m mVar = new m(nVar.f32921b);
                nVar2.f32921b = mVar;
                if (nVar.f32921b.f32909e != null) {
                    mVar.f32909e = new Paint(nVar.f32921b.f32909e);
                }
                if (nVar.f32921b.f32908d != null) {
                    nVar2.f32921b.f32908d = new Paint(nVar.f32921b.f32908d);
                }
                nVar2.f32922c = nVar.f32922c;
                nVar2.f32923d = nVar.f32923d;
                nVar2.f32924e = nVar.f32924e;
            }
            this.f32934b = nVar2;
            this.f32937e = true;
        }
        return this;
    }

    @Override // android.graphics.drawable.Drawable
    public final void onBoundsChange(Rect rect) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.setBounds(rect);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean onStateChange(int[] iArr) {
        boolean z10;
        PorterDuff.Mode mode;
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            return drawable.setState(iArr);
        }
        n nVar = this.f32934b;
        ColorStateList colorStateList = nVar.f32922c;
        if (colorStateList == null || (mode = nVar.f32923d) == null) {
            z10 = false;
        } else {
            this.f32935c = a(colorStateList, mode);
            invalidateSelf();
            z10 = true;
        }
        m mVar = nVar.f32921b;
        if (mVar.f32918n == null) {
            mVar.f32918n = Boolean.valueOf(mVar.f32911g.a());
        }
        if (mVar.f32918n.booleanValue()) {
            boolean zB = nVar.f32921b.f32911g.b(iArr);
            nVar.f32930k |= zB;
            if (zB) {
                invalidateSelf();
                return true;
            }
        }
        return z10;
    }

    @Override // android.graphics.drawable.Drawable
    public final void scheduleSelf(Runnable runnable, long j10) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.scheduleSelf(runnable, j10);
        } else {
            super.scheduleSelf(runnable, j10);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAlpha(int i10) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.setAlpha(i10);
        } else if (this.f32934b.f32921b.getRootAlpha() != i10) {
            this.f32934b.f32921b.setRootAlpha(i10);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAutoMirrored(boolean z10) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.setAutoMirrored(z10);
        } else {
            this.f32934b.f32924e = z10;
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setColorFilter(ColorFilter colorFilter) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.setColorFilter(colorFilter);
        } else {
            this.f32936d = colorFilter;
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTint(int i10) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            k0.a.a(drawable, i10);
        } else {
            setTintList(ColorStateList.valueOf(i10));
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintList(ColorStateList colorStateList) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            k0.a.setTintList(drawable, colorStateList);
            return;
        }
        n nVar = this.f32934b;
        if (nVar.f32922c != colorStateList) {
            nVar.f32922c = colorStateList;
            this.f32935c = a(colorStateList, nVar.f32923d);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintMode(PorterDuff.Mode mode) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            k0.a.setTintMode(drawable, mode);
            return;
        }
        n nVar = this.f32934b;
        if (nVar.f32923d != mode) {
            nVar.f32923d = mode;
            this.f32935c = a(nVar.f32922c, mode);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean setVisible(boolean z10, boolean z11) {
        Drawable drawable = this.f32876a;
        return drawable != null ? drawable.setVisible(z10, z11) : super.setVisible(z10, z11);
    }

    @Override // android.graphics.drawable.Drawable
    public final void unscheduleSelf(Runnable runnable) {
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            drawable.unscheduleSelf(runnable);
        } else {
            super.unscheduleSelf(runnable);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Resources.Theme theme) throws XmlPullParserException, IOException {
        m mVar;
        int i10;
        int i11;
        int i12;
        ArrayDeque arrayDeque;
        s sVar;
        TypedArray typedArray;
        char c6;
        int i13;
        int i14;
        Paint.Cap cap;
        TypedArray typedArray2;
        i iVar;
        Drawable drawable = this.f32876a;
        if (drawable != null) {
            k0.a.inflate(drawable, resources, xmlPullParser, attributeSet, theme);
            return;
        }
        n nVar = this.f32934b;
        nVar.f32921b = new m();
        TypedArray typedArrayObtainAttributes = i0.s.obtainAttributes(resources, theme, attributeSet, a.f32856a);
        n nVar2 = this.f32934b;
        m mVar2 = nVar2.f32921b;
        int i15 = !i0.s.c(xmlPullParser, "tintMode") ? -1 : typedArrayObtainAttributes.getInt(6, -1);
        PorterDuff.Mode mode = PorterDuff.Mode.SRC_IN;
        int i16 = 3;
        if (i15 == 3) {
            mode = PorterDuff.Mode.SRC_OVER;
        } else if (i15 != 5) {
            if (i15 != 9) {
                switch (i15) {
                    case 14:
                        mode = PorterDuff.Mode.MULTIPLY;
                        break;
                    case 15:
                        mode = PorterDuff.Mode.SCREEN;
                        break;
                    case 16:
                        mode = PorterDuff.Mode.ADD;
                        break;
                }
            } else {
                mode = PorterDuff.Mode.SRC_ATOP;
            }
        }
        nVar2.f32923d = mode;
        int i17 = 1;
        ColorStateList namedColorStateList = i0.s.getNamedColorStateList(typedArrayObtainAttributes, xmlPullParser, theme, "tint", 1);
        if (namedColorStateList != null) {
            nVar2.f32922c = namedColorStateList;
        }
        boolean z10 = nVar2.f32924e;
        if (i0.s.c(xmlPullParser, "autoMirrored")) {
            z10 = typedArrayObtainAttributes.getBoolean(5, z10);
        }
        nVar2.f32924e = z10;
        float f10 = mVar2.f32914j;
        if (i0.s.c(xmlPullParser, "viewportWidth")) {
            f10 = typedArrayObtainAttributes.getFloat(7, f10);
        }
        mVar2.f32914j = f10;
        float f11 = mVar2.f32915k;
        if (i0.s.c(xmlPullParser, "viewportHeight")) {
            f11 = typedArrayObtainAttributes.getFloat(8, f11);
        }
        mVar2.f32915k = f11;
        float f12 = 0.0f;
        if (mVar2.f32914j <= 0.0f) {
            throw new XmlPullParserException(typedArrayObtainAttributes.getPositionDescription() + "<vector> tag requires viewportWidth > 0");
        }
        if (f11 > 0.0f) {
            mVar2.f32912h = typedArrayObtainAttributes.getDimension(3, mVar2.f32912h);
            int i18 = 2;
            float dimension = typedArrayObtainAttributes.getDimension(2, mVar2.f32913i);
            mVar2.f32913i = dimension;
            if (mVar2.f32912h <= 0.0f) {
                throw new XmlPullParserException(typedArrayObtainAttributes.getPositionDescription() + "<vector> tag requires width > 0");
            }
            if (dimension > 0.0f) {
                float alpha = mVar2.getAlpha();
                if (i0.s.c(xmlPullParser, "alpha")) {
                    alpha = typedArrayObtainAttributes.getFloat(4, alpha);
                }
                mVar2.setAlpha(alpha);
                String string = typedArrayObtainAttributes.getString(0);
                if (string != null) {
                    mVar2.f32917m = string;
                    mVar2.f32919o.put(string, mVar2);
                }
                typedArrayObtainAttributes.recycle();
                nVar.f32920a = getChangingConfigurations();
                nVar.f32930k = true;
                n nVar3 = this.f32934b;
                m mVar3 = nVar3.f32921b;
                ArrayDeque arrayDeque2 = new ArrayDeque();
                arrayDeque2.push(mVar3.f32911g);
                int eventType = xmlPullParser.getEventType();
                int depth = xmlPullParser.getDepth() + 1;
                boolean z11 = true;
                while (eventType != i17 && (xmlPullParser.getDepth() >= depth || eventType != i16)) {
                    if (eventType == i18) {
                        String name = xmlPullParser.getName();
                        j jVar = (j) arrayDeque2.peek();
                        boolean zEquals = "path".equals(name);
                        s sVar2 = mVar3.f32919o;
                        if (zEquals) {
                            i iVar2 = new i();
                            iVar2.f32878f = f12;
                            iVar2.f32880h = 1.0f;
                            iVar2.f32881i = 1.0f;
                            iVar2.f32882j = f12;
                            iVar2.f32883k = 1.0f;
                            iVar2.f32884l = f12;
                            Paint.Cap cap2 = Paint.Cap.BUTT;
                            iVar2.f32885m = cap2;
                            Paint.Join join = Paint.Join.MITER;
                            iVar2.f32886n = join;
                            iVar2.f32887o = 4.0f;
                            TypedArray typedArrayObtainAttributes2 = i0.s.obtainAttributes(resources, theme, attributeSet, a.f32858c);
                            if (i0.s.c(xmlPullParser, "pathData")) {
                                ArrayDeque arrayDeque3 = arrayDeque2;
                                String string2 = typedArrayObtainAttributes2.getString(0);
                                if (string2 != null) {
                                    iVar2.f32901b = string2;
                                }
                                String string3 = typedArrayObtainAttributes2.getString(2);
                                if (string3 != null) {
                                    iVar2.f32900a = j0.g.b(string3);
                                }
                                arrayDeque = arrayDeque3;
                                mVar = mVar3;
                                i10 = depth;
                                sVar = sVar2;
                                iVar2.f32879g = i0.s.getNamedComplexColor(typedArrayObtainAttributes2, xmlPullParser, theme, "fillColor", 1, 0);
                                float f13 = iVar2.f32881i;
                                if (i0.s.c(xmlPullParser, "fillAlpha")) {
                                    typedArray = typedArrayObtainAttributes2;
                                    f13 = typedArray.getFloat(12, f13);
                                } else {
                                    typedArray = typedArrayObtainAttributes2;
                                }
                                iVar2.f32881i = f13;
                                if (i0.s.c(xmlPullParser, "strokeLineCap")) {
                                    c6 = '\b';
                                    i13 = typedArray.getInt(8, -1);
                                } else {
                                    i13 = -1;
                                    c6 = '\b';
                                }
                                Paint.Cap cap3 = iVar2.f32885m;
                                if (i13 == 0) {
                                    i14 = 2;
                                    cap = cap2;
                                } else if (i13 != 1) {
                                    i14 = 2;
                                    cap = i13 != 2 ? cap3 : Paint.Cap.SQUARE;
                                } else {
                                    i14 = 2;
                                    cap = Paint.Cap.ROUND;
                                }
                                iVar2.f32885m = cap;
                                int i19 = !i0.s.c(xmlPullParser, "strokeLineJoin") ? -1 : typedArray.getInt(9, -1);
                                Paint.Join join2 = iVar2.f32886n;
                                if (i19 != 0) {
                                    if (i19 != 1) {
                                        join = i19 != i14 ? join2 : Paint.Join.BEVEL;
                                    } else {
                                        join = Paint.Join.ROUND;
                                    }
                                }
                                iVar2.f32886n = join;
                                float f14 = iVar2.f32887o;
                                if (i0.s.c(xmlPullParser, "strokeMiterLimit")) {
                                    f14 = typedArray.getFloat(10, f14);
                                }
                                iVar2.f32887o = f14;
                                typedArray2 = typedArray;
                                iVar = iVar2;
                                iVar.f32877e = i0.s.getNamedComplexColor(typedArray, xmlPullParser, theme, "strokeColor", 3, 0);
                                float f15 = iVar.f32880h;
                                if (i0.s.c(xmlPullParser, "strokeAlpha")) {
                                    f15 = typedArray2.getFloat(11, f15);
                                }
                                iVar.f32880h = f15;
                                float f16 = iVar.f32878f;
                                if (i0.s.c(xmlPullParser, "strokeWidth")) {
                                    f16 = typedArray2.getFloat(4, f16);
                                }
                                iVar.f32878f = f16;
                                float f17 = iVar.f32883k;
                                if (i0.s.c(xmlPullParser, "trimPathEnd")) {
                                    f17 = typedArray2.getFloat(6, f17);
                                }
                                iVar.f32883k = f17;
                                float f18 = iVar.f32884l;
                                if (i0.s.c(xmlPullParser, "trimPathOffset")) {
                                    f18 = typedArray2.getFloat(7, f18);
                                }
                                iVar.f32884l = f18;
                                float f19 = iVar.f32882j;
                                if (i0.s.c(xmlPullParser, "trimPathStart")) {
                                    f19 = typedArray2.getFloat(5, f19);
                                }
                                iVar.f32882j = f19;
                                int i20 = iVar.f32902c;
                                if (i0.s.c(xmlPullParser, "fillType")) {
                                    i20 = typedArray2.getInt(13, i20);
                                }
                                iVar.f32902c = i20;
                            } else {
                                typedArray2 = typedArrayObtainAttributes2;
                                arrayDeque = arrayDeque2;
                                mVar = mVar3;
                                i10 = depth;
                                sVar = sVar2;
                                iVar = iVar2;
                            }
                            typedArray2.recycle();
                            jVar.f32889b.add(iVar);
                            if (iVar.getPathName() != null) {
                                sVar.put(iVar.getPathName(), iVar);
                            }
                            nVar3.f32920a |= iVar.f32903d;
                            arrayDeque2 = arrayDeque;
                            i12 = 1;
                            z11 = false;
                        } else {
                            ArrayDeque arrayDeque4 = arrayDeque2;
                            mVar = mVar3;
                            i10 = depth;
                            if ("clip-path".equals(name)) {
                                h hVar = new h();
                                if (i0.s.c(xmlPullParser, "pathData")) {
                                    TypedArray typedArrayObtainAttributes3 = i0.s.obtainAttributes(resources, theme, attributeSet, a.f32859d);
                                    String string4 = typedArrayObtainAttributes3.getString(0);
                                    if (string4 != null) {
                                        hVar.f32901b = string4;
                                    }
                                    String string5 = typedArrayObtainAttributes3.getString(1);
                                    if (string5 != null) {
                                        hVar.f32900a = j0.g.b(string5);
                                    }
                                    hVar.f32902c = !i0.s.c(xmlPullParser, "fillType") ? 0 : typedArrayObtainAttributes3.getInt(2, 0);
                                    typedArrayObtainAttributes3.recycle();
                                }
                                jVar.f32889b.add(hVar);
                                if (hVar.getPathName() != null) {
                                    sVar2.put(hVar.getPathName(), hVar);
                                }
                                nVar3.f32920a = hVar.f32903d | nVar3.f32920a;
                            } else if ("group".equals(name)) {
                                j jVar2 = new j();
                                TypedArray typedArrayObtainAttributes4 = i0.s.obtainAttributes(resources, theme, attributeSet, a.f32857b);
                                float f20 = jVar2.f32890c;
                                if (i0.s.c(xmlPullParser, "rotation")) {
                                    f20 = typedArrayObtainAttributes4.getFloat(5, f20);
                                }
                                jVar2.f32890c = f20;
                                i12 = 1;
                                jVar2.f32891d = typedArrayObtainAttributes4.getFloat(1, jVar2.f32891d);
                                jVar2.f32892e = typedArrayObtainAttributes4.getFloat(2, jVar2.f32892e);
                                float f21 = jVar2.f32893f;
                                if (i0.s.c(xmlPullParser, "scaleX")) {
                                    f21 = typedArrayObtainAttributes4.getFloat(3, f21);
                                }
                                jVar2.f32893f = f21;
                                float f22 = jVar2.f32894g;
                                if (i0.s.c(xmlPullParser, "scaleY")) {
                                    f22 = typedArrayObtainAttributes4.getFloat(4, f22);
                                }
                                jVar2.f32894g = f22;
                                float f23 = jVar2.f32895h;
                                if (i0.s.c(xmlPullParser, "translateX")) {
                                    f23 = typedArrayObtainAttributes4.getFloat(6, f23);
                                }
                                jVar2.f32895h = f23;
                                float f24 = jVar2.f32896i;
                                if (i0.s.c(xmlPullParser, "translateY")) {
                                    f24 = typedArrayObtainAttributes4.getFloat(7, f24);
                                }
                                jVar2.f32896i = f24;
                                String string6 = typedArrayObtainAttributes4.getString(0);
                                if (string6 != null) {
                                    jVar2.f32899l = string6;
                                }
                                jVar2.c();
                                typedArrayObtainAttributes4.recycle();
                                jVar.f32889b.add(jVar2);
                                arrayDeque2 = arrayDeque4;
                                arrayDeque2.push(jVar2);
                                if (jVar2.getGroupName() != null) {
                                    sVar2.put(jVar2.getGroupName(), jVar2);
                                }
                                nVar3.f32920a = jVar2.f32898k | nVar3.f32920a;
                            }
                            arrayDeque2 = arrayDeque4;
                            i12 = 1;
                        }
                        i11 = 3;
                    } else {
                        mVar = mVar3;
                        i10 = depth;
                        i11 = i16;
                        i12 = 1;
                        if (eventType == i11 && "group".equals(xmlPullParser.getName())) {
                            arrayDeque2.pop();
                        }
                    }
                    eventType = xmlPullParser.next();
                    i16 = i11;
                    i17 = i12;
                    depth = i10;
                    mVar3 = mVar;
                    i18 = 2;
                    f12 = 0.0f;
                }
                if (!z11) {
                    this.f32935c = a(nVar.f32922c, nVar.f32923d);
                    return;
                }
                throw new XmlPullParserException("no path defined");
            }
            throw new XmlPullParserException(typedArrayObtainAttributes.getPositionDescription() + "<vector> tag requires height > 0");
        }
        throw new XmlPullParserException(typedArrayObtainAttributes.getPositionDescription() + "<vector> tag requires viewportHeight > 0");
    }

    public p(n nVar) {
        this.f32938f = true;
        this.f32939g = new float[9];
        this.f32940h = new Matrix();
        this.f32941i = new Rect();
        this.f32934b = nVar;
        this.f32935c = a(nVar.f32922c, nVar.f32923d);
    }
}
