package d2;

import android.R;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.Keyframe;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.util.Xml;
import android.view.InflateException;
import android.view.animation.AnimationUtils;
import java.io.IOException;
import java.util.ArrayList;
import org.xmlpull.v1.XmlPullParserException;
import v0.AbstractC1664c;

/* JADX INFO: loaded from: classes.dex */
public abstract class a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final int[] f11338a = {R.attr.name, R.attr.tint, R.attr.height, R.attr.width, R.attr.alpha, R.attr.autoMirrored, R.attr.tintMode, R.attr.viewportWidth, R.attr.viewportHeight};

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final int[] f11339b = {R.attr.name, R.attr.pivotX, R.attr.pivotY, R.attr.scaleX, R.attr.scaleY, R.attr.rotation, R.attr.translateX, R.attr.translateY};

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final int[] f11340c = {R.attr.name, R.attr.fillColor, R.attr.pathData, R.attr.strokeColor, R.attr.strokeWidth, R.attr.trimPathStart, R.attr.trimPathEnd, R.attr.trimPathOffset, R.attr.strokeLineCap, R.attr.strokeLineJoin, R.attr.strokeMiterLimit, R.attr.strokeAlpha, R.attr.fillAlpha, R.attr.fillType};

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final int[] f11341d = {R.attr.name, R.attr.pathData, R.attr.fillType};

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final int[] f11342e = {R.attr.drawable};

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final int[] f11343f = {R.attr.name, R.attr.animation};

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final int[] f11344g = {R.attr.interpolator, R.attr.duration, R.attr.startOffset, R.attr.repeatCount, R.attr.repeatMode, R.attr.valueFrom, R.attr.valueTo, R.attr.valueType};

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final int[] f11345h = {R.attr.ordering};
    public static final int[] i = {R.attr.valueFrom, R.attr.valueTo, R.attr.valueType, R.attr.propertyName};

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public static final int[] f11346j = {R.attr.value, R.attr.interpolator, R.attr.valueType, R.attr.fraction};

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public static final int[] f11347k = {R.attr.propertyName, R.attr.pathData, R.attr.propertyXName, R.attr.propertyYName};

    /* JADX WARN: Code restructure failed: missing block: B:207:0x03a4, code lost:
    
        if (r32 == null) goto L216;
     */
    /* JADX WARN: Code restructure failed: missing block: B:208:0x03a6, code lost:
    
        if (r10 == null) goto L216;
     */
    /* JADX WARN: Code restructure failed: missing block: B:209:0x03a8, code lost:
    
        r2 = new android.animation.Animator[r10.size()];
        r3 = r10.size();
        r11 = 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:210:0x03b3, code lost:
    
        if (r1 >= r3) goto L224;
     */
    /* JADX WARN: Code restructure failed: missing block: B:211:0x03b5, code lost:
    
        r4 = r10.get(r1);
        r1 = r1 + 1;
        r2[r11] = (android.animation.Animator) r4;
        r11 = r11 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:212:0x03c3, code lost:
    
        if (r33 != 0) goto L215;
     */
    /* JADX WARN: Code restructure failed: missing block: B:213:0x03c5, code lost:
    
        r32.playTogether(r2);
     */
    /* JADX WARN: Code restructure failed: missing block: B:214:0x03c8, code lost:
    
        return r0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:215:0x03c9, code lost:
    
        r32.playSequentially(r2);
     */
    /* JADX WARN: Code restructure failed: missing block: B:216:0x03cc, code lost:
    
        return r0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:8:0x0017, code lost:
    
        r1 = 0;
     */
    /* JADX WARN: Removed duplicated region for block: B:200:0x037c A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:202:0x0380  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static Animator a(Context context, Resources resources, Resources.Theme theme, XmlResourceParser xmlResourceParser, AttributeSet attributeSet, AnimatorSet animatorSet, int i5) throws XmlPullParserException, IOException {
        int i8;
        PropertyValuesHolder[] propertyValuesHolderArr;
        AttributeSet attributeSet2;
        int i9;
        int i10;
        int i11;
        int i12;
        String str;
        int i13;
        PropertyValuesHolder propertyValuesHolderB;
        int size;
        int i14;
        String str2;
        Keyframe keyframeOfFloat;
        Resources.Theme theme2;
        int i15;
        AttributeSet attributeSet3;
        Resources resources2;
        XmlResourceParser xmlResourceParser2;
        Animator animator;
        Animator animatorD;
        int depth = xmlResourceParser.getDepth();
        Animator animator2 = null;
        ArrayList arrayList = null;
        while (true) {
            int next = xmlResourceParser.next();
            int i16 = 0;
            int i17 = 3;
            if (next == 3 && xmlResourceParser.getDepth() <= depth) {
                break;
            }
            int i18 = 1;
            if (next == 1) {
                break;
            }
            int i19 = 2;
            if (next == 2) {
                String name = xmlResourceParser.getName();
                if (name.equals("objectAnimator")) {
                    ObjectAnimator objectAnimator = new ObjectAnimator();
                    d(context, resources, theme, attributeSet, objectAnimator, xmlResourceParser);
                    animatorD = objectAnimator;
                } else if (name.equals("animator")) {
                    animatorD = d(context, resources, theme, attributeSet, null, xmlResourceParser);
                } else {
                    Resources resources3 = resources;
                    Resources.Theme theme3 = theme;
                    if (name.equals("set")) {
                        AnimatorSet animatorSet2 = new AnimatorSet();
                        TypedArray typedArrayG = E.b.g(resources3, theme3, attributeSet, f11345h);
                        if (xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "ordering") != null) {
                            theme2 = theme3;
                            i15 = typedArrayG.getInt(0, 0);
                            attributeSet3 = attributeSet;
                            xmlResourceParser2 = xmlResourceParser;
                            resources2 = resources3;
                        } else {
                            theme2 = theme3;
                            i15 = 0;
                            attributeSet3 = attributeSet;
                            resources2 = resources3;
                            xmlResourceParser2 = xmlResourceParser;
                        }
                        a(context, resources2, theme2, xmlResourceParser2, attributeSet3, animatorSet2, i15);
                        animator = animatorSet2;
                        typedArrayG.recycle();
                        i8 = depth;
                        animator2 = animator;
                        if (animatorSet != null && i16 == 0) {
                            if (arrayList == null) {
                                arrayList = new ArrayList();
                            }
                            arrayList.add(animator2);
                        }
                        depth = i8;
                    } else {
                        String str3 = "propertyValuesHolder";
                        if (!name.equals("propertyValuesHolder")) {
                            throw new RuntimeException("Unknown animator name: " + xmlResourceParser.getName());
                        }
                        AttributeSet attributeSetAsAttributeSet = Xml.asAttributeSet(xmlResourceParser);
                        ArrayList arrayList2 = null;
                        while (true) {
                            int eventType = xmlResourceParser.getEventType();
                            if (eventType == i17 || eventType == i18) {
                                break;
                            }
                            if (eventType != i19) {
                                xmlResourceParser.next();
                            } else {
                                if (xmlResourceParser.getName().equals(str3)) {
                                    TypedArray typedArrayG2 = E.b.g(resources3, theme3, attributeSetAsAttributeSet, i);
                                    String strC = E.b.c(typedArrayG2, xmlResourceParser, "propertyName", i17);
                                    int i20 = !(xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "valueType") != null) ? 4 : typedArrayG2.getInt(i19, 4);
                                    attributeSet2 = attributeSetAsAttributeSet;
                                    int i21 = i20;
                                    i10 = i19;
                                    ArrayList arrayList3 = null;
                                    while (true) {
                                        int next2 = xmlResourceParser.next();
                                        i11 = depth;
                                        if (next2 == 3 || next2 == 1) {
                                            break;
                                        }
                                        if (xmlResourceParser.getName().equals("keyframe")) {
                                            int[] iArr = f11346j;
                                            str2 = str3;
                                            if (i21 == 4) {
                                                TypedArray typedArrayG3 = E.b.g(resources3, theme3, Xml.asAttributeSet(xmlResourceParser), iArr);
                                                TypedValue typedValuePeekValue = !E.b.d(xmlResourceParser, "value") ? null : typedArrayG3.peekValue(0);
                                                int i22 = (typedValuePeekValue == null || !c(typedValuePeekValue.type)) ? 0 : 3;
                                                typedArrayG3.recycle();
                                                i21 = i22;
                                            }
                                            TypedArray typedArrayG4 = E.b.g(resources3, theme3, Xml.asAttributeSet(xmlResourceParser), iArr);
                                            float f3 = E.b.d(xmlResourceParser, "fraction") ? typedArrayG4.getFloat(3, -1.0f) : -1.0f;
                                            TypedValue typedValuePeekValue2 = !E.b.d(xmlResourceParser, "value") ? null : typedArrayG4.peekValue(0);
                                            boolean z8 = typedValuePeekValue2 != null;
                                            int i23 = i21 == 4 ? (z8 && c(typedValuePeekValue2.type)) ? 3 : 0 : i21;
                                            if (!z8) {
                                                keyframeOfFloat = i23 == 0 ? Keyframe.ofFloat(f3) : Keyframe.ofInt(f3);
                                            } else if (i23 == 0) {
                                                keyframeOfFloat = Keyframe.ofFloat(f3, xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "value") != null ? typedArrayG4.getFloat(0, 0.0f) : 0.0f);
                                            } else if (i23 == 1 || i23 == 3) {
                                                keyframeOfFloat = Keyframe.ofInt(f3, xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "value") != null ? typedArrayG4.getInt(0, 0) : 0);
                                            } else {
                                                keyframeOfFloat = null;
                                            }
                                            int resourceId = xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "interpolator") != null ? typedArrayG4.getResourceId(1, 0) : 0;
                                            if (resourceId > 0) {
                                                keyframeOfFloat.setInterpolator(AnimationUtils.loadInterpolator(context, resourceId));
                                            }
                                            typedArrayG4.recycle();
                                            if (keyframeOfFloat != null) {
                                                if (arrayList3 == null) {
                                                    arrayList3 = new ArrayList();
                                                }
                                                arrayList3.add(keyframeOfFloat);
                                            }
                                            xmlResourceParser.next();
                                        } else {
                                            str2 = str3;
                                        }
                                        resources3 = resources;
                                        theme3 = theme;
                                        depth = i11;
                                        str3 = str2;
                                    }
                                    str = str3;
                                    if (arrayList3 == null || (size = arrayList3.size()) <= 0) {
                                        i13 = 3;
                                        propertyValuesHolderB = null;
                                    } else {
                                        Keyframe keyframe = (Keyframe) arrayList3.get(0);
                                        Keyframe keyframe2 = (Keyframe) arrayList3.get(size - 1);
                                        float fraction = keyframe2.getFraction();
                                        int i24 = size;
                                        Class cls = Integer.TYPE;
                                        Class cls2 = Float.TYPE;
                                        if (fraction < 1.0f) {
                                            if (fraction < 0.0f) {
                                                keyframe2.setFraction(1.0f);
                                            } else {
                                                arrayList3.add(arrayList3.size(), keyframe2.getType() == cls2 ? Keyframe.ofFloat(1.0f) : keyframe2.getType() == cls ? Keyframe.ofInt(1.0f) : Keyframe.ofObject(1.0f));
                                                i24++;
                                            }
                                        }
                                        float fraction2 = keyframe.getFraction();
                                        if (fraction2 != 0.0f) {
                                            if (fraction2 < 0.0f) {
                                                keyframe.setFraction(0.0f);
                                            } else {
                                                arrayList3.add(0, keyframe.getType() == cls2 ? Keyframe.ofFloat(0.0f) : keyframe.getType() == cls ? Keyframe.ofInt(0.0f) : Keyframe.ofObject(0.0f));
                                                i24++;
                                            }
                                        }
                                        int i25 = i24;
                                        Keyframe[] keyframeArr = new Keyframe[i25];
                                        arrayList3.toArray(keyframeArr);
                                        int i26 = 0;
                                        while (i26 < i25) {
                                            Keyframe keyframe3 = keyframeArr[i26];
                                            if (keyframe3.getFraction() >= 0.0f) {
                                                i14 = i25;
                                            } else if (i26 == 0) {
                                                keyframe3.setFraction(0.0f);
                                                i14 = i25;
                                            } else {
                                                int i27 = i25 - 1;
                                                if (i26 == i27) {
                                                    keyframe3.setFraction(1.0f);
                                                    i14 = i25;
                                                } else {
                                                    int i28 = i26;
                                                    for (int i29 = i26 + 1; i29 < i27 && keyframeArr[i29].getFraction() < 0.0f; i29++) {
                                                        i28 = i29;
                                                    }
                                                    float fraction3 = (keyframeArr[i28 + 1].getFraction() - keyframeArr[i26 - 1].getFraction()) / ((i28 - i26) + 2);
                                                    int i30 = i26;
                                                    while (i30 <= i28) {
                                                        float f7 = fraction3;
                                                        keyframeArr[i30].setFraction(keyframeArr[i30 - 1].getFraction() + f7);
                                                        i30++;
                                                        i25 = i25;
                                                        fraction3 = f7;
                                                    }
                                                    i14 = i25;
                                                }
                                            }
                                            i26++;
                                            i25 = i14;
                                        }
                                        propertyValuesHolderB = PropertyValuesHolder.ofKeyframe(strC, keyframeArr);
                                        i13 = 3;
                                        if (i21 == 3) {
                                            propertyValuesHolderB.setEvaluator(g.f11359a);
                                        }
                                    }
                                    i12 = 0;
                                    i9 = 1;
                                    if (propertyValuesHolderB == null) {
                                        propertyValuesHolderB = b(typedArrayG2, i20, 0, 1, strC);
                                    }
                                    if (propertyValuesHolderB != null) {
                                        if (arrayList2 == null) {
                                            arrayList2 = new ArrayList();
                                        }
                                        arrayList2.add(propertyValuesHolderB);
                                    }
                                    typedArrayG2.recycle();
                                } else {
                                    attributeSet2 = attributeSetAsAttributeSet;
                                    i9 = i18;
                                    i10 = i19;
                                    i11 = depth;
                                    i12 = i16;
                                    str = str3;
                                    i13 = i17;
                                }
                                xmlResourceParser.next();
                                resources3 = resources;
                                i16 = i12;
                                i18 = i9;
                                i17 = i13;
                                i19 = i10;
                                attributeSetAsAttributeSet = attributeSet2;
                                depth = i11;
                                str3 = str;
                                theme3 = theme;
                            }
                        }
                        int i31 = i18;
                        i8 = depth;
                        int i32 = i16;
                        if (arrayList2 != null) {
                            int size2 = arrayList2.size();
                            propertyValuesHolderArr = new PropertyValuesHolder[size2];
                            for (int i33 = i32; i33 < size2; i33++) {
                                propertyValuesHolderArr[i33] = (PropertyValuesHolder) arrayList2.get(i33);
                            }
                        } else {
                            propertyValuesHolderArr = null;
                        }
                        if (propertyValuesHolderArr != null && (animator2 instanceof ValueAnimator)) {
                            ((ValueAnimator) animator2).setValues(propertyValuesHolderArr);
                        }
                        i16 = i31;
                        animator2 = animator2;
                        if (animatorSet != null) {
                            if (arrayList == null) {
                            }
                            arrayList.add(animator2);
                        }
                        depth = i8;
                    }
                }
                animator = animatorD;
                i8 = depth;
                animator2 = animator;
                if (animatorSet != null) {
                }
                depth = i8;
            }
        }
    }

    public static PropertyValuesHolder b(TypedArray typedArray, int i5, int i8, int i9, String str) {
        PropertyValuesHolder propertyValuesHolderOfFloat;
        TypedValue typedValuePeekValue = typedArray.peekValue(i8);
        boolean z8 = typedValuePeekValue != null;
        int i10 = z8 ? typedValuePeekValue.type : 0;
        TypedValue typedValuePeekValue2 = typedArray.peekValue(i9);
        boolean z9 = typedValuePeekValue2 != null;
        int i11 = z9 ? typedValuePeekValue2.type : 0;
        if (i5 == 4) {
            i5 = ((z8 && c(i10)) || (z9 && c(i11))) ? 3 : 0;
        }
        boolean z10 = i5 == 0;
        PropertyValuesHolder propertyValuesHolderOfInt = null;
        if (i5 == 2) {
            String string = typedArray.getString(i8);
            String string2 = typedArray.getString(i9);
            F.d[] dVarArrM = AbstractC1664c.m(string);
            F.d[] dVarArrM2 = AbstractC1664c.m(string2);
            if (dVarArrM != null || dVarArrM2 != null) {
                if (dVarArrM != null) {
                    f fVar = new f();
                    if (dVarArrM2 == null) {
                        return PropertyValuesHolder.ofObject(str, fVar, dVarArrM);
                    }
                    if (AbstractC1664c.d(dVarArrM, dVarArrM2)) {
                        return PropertyValuesHolder.ofObject(str, fVar, dVarArrM, dVarArrM2);
                    }
                    throw new InflateException(" Can't morph from " + string + " to " + string2);
                }
                if (dVarArrM2 != null) {
                    return PropertyValuesHolder.ofObject(str, new f(), dVarArrM2);
                }
            }
            return null;
        }
        g gVar = i5 == 3 ? g.f11359a : null;
        if (z10) {
            if (z8) {
                float dimension = i10 == 5 ? typedArray.getDimension(i8, 0.0f) : typedArray.getFloat(i8, 0.0f);
                if (z9) {
                    propertyValuesHolderOfFloat = PropertyValuesHolder.ofFloat(str, dimension, i11 == 5 ? typedArray.getDimension(i9, 0.0f) : typedArray.getFloat(i9, 0.0f));
                } else {
                    propertyValuesHolderOfFloat = PropertyValuesHolder.ofFloat(str, dimension);
                }
            } else {
                propertyValuesHolderOfFloat = PropertyValuesHolder.ofFloat(str, i11 == 5 ? typedArray.getDimension(i9, 0.0f) : typedArray.getFloat(i9, 0.0f));
            }
            propertyValuesHolderOfInt = propertyValuesHolderOfFloat;
        } else if (z8) {
            int dimension2 = i10 == 5 ? (int) typedArray.getDimension(i8, 0.0f) : c(i10) ? typedArray.getColor(i8, 0) : typedArray.getInt(i8, 0);
            if (z9) {
                propertyValuesHolderOfInt = PropertyValuesHolder.ofInt(str, dimension2, i11 == 5 ? (int) typedArray.getDimension(i9, 0.0f) : c(i11) ? typedArray.getColor(i9, 0) : typedArray.getInt(i9, 0));
            } else {
                propertyValuesHolderOfInt = PropertyValuesHolder.ofInt(str, dimension2);
            }
        } else if (z9) {
            propertyValuesHolderOfInt = PropertyValuesHolder.ofInt(str, i11 == 5 ? (int) typedArray.getDimension(i9, 0.0f) : c(i11) ? typedArray.getColor(i9, 0) : typedArray.getInt(i9, 0));
        }
        if (propertyValuesHolderOfInt != null && gVar != null) {
            propertyValuesHolderOfInt.setEvaluator(gVar);
        }
        return propertyValuesHolderOfInt;
    }

    public static boolean c(int i5) {
        return i5 >= 28 && i5 <= 31;
    }

    public static ValueAnimator d(Context context, Resources resources, Resources.Theme theme, AttributeSet attributeSet, ObjectAnimator objectAnimator, XmlResourceParser xmlResourceParser) {
        ValueAnimator valueAnimator;
        ValueAnimator valueAnimator2;
        int resourceId = 0;
        TypedArray typedArrayG = E.b.g(resources, theme, attributeSet, f11344g);
        TypedArray typedArrayG2 = E.b.g(resources, theme, attributeSet, f11347k);
        ValueAnimator valueAnimator3 = objectAnimator == null ? new ValueAnimator() : objectAnimator;
        long j8 = E.b.d(xmlResourceParser, "duration") ? typedArrayG.getInt(1, 300) : 300;
        long j9 = !(xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "startOffset") != null) ? 0 : typedArrayG.getInt(2, 0);
        int i5 = !(xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "valueType") != null) ? 4 : typedArrayG.getInt(7, 4);
        if (xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "valueFrom") != null && xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "valueTo") != null) {
            if (i5 == 4) {
                TypedValue typedValuePeekValue = typedArrayG.peekValue(5);
                boolean z8 = typedValuePeekValue != null;
                int i8 = z8 ? typedValuePeekValue.type : 0;
                TypedValue typedValuePeekValue2 = typedArrayG.peekValue(6);
                boolean z9 = typedValuePeekValue2 != null;
                i5 = ((z8 && c(i8)) || (z9 && c(z9 ? typedValuePeekValue2.type : 0))) ? 3 : 0;
            }
            PropertyValuesHolder propertyValuesHolderB = b(typedArrayG, i5, 5, 6, "");
            if (propertyValuesHolderB != null) {
                valueAnimator3.setValues(propertyValuesHolderB);
            }
        }
        valueAnimator3.setDuration(j8);
        valueAnimator3.setStartDelay(j9);
        valueAnimator3.setRepeatCount(xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "repeatCount") != null ? typedArrayG.getInt(3, 0) : 0);
        valueAnimator3.setRepeatMode(xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "repeatMode") != null ? typedArrayG.getInt(4, 1) : 1);
        if (typedArrayG2 != null) {
            ObjectAnimator objectAnimator2 = (ObjectAnimator) valueAnimator3;
            String strC = E.b.c(typedArrayG2, xmlResourceParser, "pathData", 1);
            if (strC != null) {
                String strC2 = E.b.c(typedArrayG2, xmlResourceParser, "propertyXName", 2);
                String strC3 = E.b.c(typedArrayG2, xmlResourceParser, "propertyYName", 3);
                if (i5 != 2) {
                }
                if (strC2 == null && strC3 == null) {
                    throw new InflateException(typedArrayG2.getPositionDescription() + " propertyXName or propertyYName is needed for PathData");
                }
                Path path = new Path();
                try {
                    F.d.b(AbstractC1664c.m(strC), path);
                    PathMeasure pathMeasure = new PathMeasure(path, false);
                    ArrayList arrayList = new ArrayList();
                    arrayList.add(Float.valueOf(0.0f));
                    float length = 0.0f;
                    do {
                        length += pathMeasure.getLength();
                        arrayList.add(Float.valueOf(length));
                    } while (pathMeasure.nextContour());
                    PathMeasure pathMeasure2 = new PathMeasure(path, false);
                    int iMin = Math.min(100, ((int) (length / 0.5f)) + 1);
                    float[] fArr = new float[iMin];
                    float[] fArr2 = new float[iMin];
                    float[] fArr3 = new float[2];
                    float f3 = length / (iMin - 1);
                    valueAnimator = valueAnimator3;
                    int i9 = 0;
                    int i10 = 0;
                    float f7 = 0.0f;
                    while (true) {
                        if (i9 >= iMin) {
                            break;
                        }
                        int i11 = i9;
                        pathMeasure2.getPosTan(f7 - ((Float) arrayList.get(i10)).floatValue(), fArr3, null);
                        fArr[i11] = fArr3[0];
                        fArr2[i11] = fArr3[1];
                        int i12 = i10 + 1;
                        f7 += f3;
                        if (i12 < arrayList.size() && f7 > ((Float) arrayList.get(i12)).floatValue()) {
                            pathMeasure2.nextContour();
                            i10 = i12;
                        }
                        i9 = i11 + 1;
                    }
                    PropertyValuesHolder propertyValuesHolderOfFloat = strC2 != null ? PropertyValuesHolder.ofFloat(strC2, fArr) : null;
                    PropertyValuesHolder propertyValuesHolderOfFloat2 = strC3 != null ? PropertyValuesHolder.ofFloat(strC3, fArr2) : null;
                    if (propertyValuesHolderOfFloat == null) {
                        objectAnimator2.setValues(propertyValuesHolderOfFloat2);
                    } else if (propertyValuesHolderOfFloat2 == null) {
                        objectAnimator2.setValues(propertyValuesHolderOfFloat);
                    } else {
                        objectAnimator2.setValues(propertyValuesHolderOfFloat, propertyValuesHolderOfFloat2);
                    }
                    resourceId = 0;
                } catch (RuntimeException e8) {
                    throw new RuntimeException("Error in parsing ".concat(strC), e8);
                }
            } else {
                valueAnimator = valueAnimator3;
                objectAnimator2.setPropertyName(E.b.c(typedArrayG2, xmlResourceParser, "propertyName", 0));
            }
        } else {
            valueAnimator = valueAnimator3;
        }
        if (xmlResourceParser.getAttributeValue("http://schemas.android.com/apk/res/android", "interpolator") != null) {
            resourceId = typedArrayG.getResourceId(resourceId, resourceId);
        }
        if (resourceId > 0) {
            valueAnimator2 = valueAnimator;
            valueAnimator2.setInterpolator(AnimationUtils.loadInterpolator(context, resourceId));
        } else {
            valueAnimator2 = valueAnimator;
        }
        typedArrayG.recycle();
        if (typedArrayG2 != null) {
            typedArrayG2.recycle();
        }
        return valueAnimator2;
    }
}
