package x1;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.util.ArrayList;
import java.util.List;
import x1.h;

/* loaded from: classes.dex */
public abstract class i {
    public static final void a(char c10, ArrayList arrayList, float[] fArr, int i10) {
        int i11 = 0;
        if (c10 == 'z' || c10 == 'Z') {
            arrayList.add(h.b.f50336c);
            return;
        }
        if (c10 == 'm') {
            c(arrayList, fArr, i10);
            return;
        }
        if (c10 == 'M') {
            b(arrayList, fArr, i10);
            return;
        }
        if (c10 == 'l') {
            int i12 = i10 - 2;
            while (i11 <= i12) {
                arrayList.add(new h.m(fArr[i11], fArr[i11 + 1]));
                i11 += 2;
            }
            return;
        }
        if (c10 == 'L') {
            int i13 = i10 - 2;
            while (i11 <= i13) {
                arrayList.add(new h.e(fArr[i11], fArr[i11 + 1]));
                i11 += 2;
            }
            return;
        }
        if (c10 == 'h') {
            int i14 = i10 - 1;
            while (i11 <= i14) {
                arrayList.add(new h.l(fArr[i11]));
                i11++;
            }
            return;
        }
        if (c10 == 'H') {
            int i15 = i10 - 1;
            while (i11 <= i15) {
                arrayList.add(new h.d(fArr[i11]));
                i11++;
            }
            return;
        }
        if (c10 == 'v') {
            int i16 = i10 - 1;
            while (i11 <= i16) {
                arrayList.add(new h.r(fArr[i11]));
                i11++;
            }
            return;
        }
        if (c10 == 'V') {
            int i17 = i10 - 1;
            while (i11 <= i17) {
                arrayList.add(new h.s(fArr[i11]));
                i11++;
            }
            return;
        }
        if (c10 == 'c') {
            int i18 = i10 - 6;
            while (i11 <= i18) {
                arrayList.add(new h.k(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3], fArr[i11 + 4], fArr[i11 + 5]));
                i11 += 6;
            }
            return;
        }
        if (c10 == 'C') {
            int i19 = i10 - 6;
            while (i11 <= i19) {
                arrayList.add(new h.c(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3], fArr[i11 + 4], fArr[i11 + 5]));
                i11 += 6;
            }
            return;
        }
        if (c10 == 's') {
            int i20 = i10 - 4;
            while (i11 <= i20) {
                arrayList.add(new h.p(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3]));
                i11 += 4;
            }
            return;
        }
        if (c10 == 'S') {
            int i21 = i10 - 4;
            while (i11 <= i21) {
                arrayList.add(new h.C1000h(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3]));
                i11 += 4;
            }
            return;
        }
        if (c10 == 'q') {
            int i22 = i10 - 4;
            while (i11 <= i22) {
                arrayList.add(new h.o(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3]));
                i11 += 4;
            }
            return;
        }
        if (c10 == 'Q') {
            int i23 = i10 - 4;
            while (i11 <= i23) {
                arrayList.add(new h.g(fArr[i11], fArr[i11 + 1], fArr[i11 + 2], fArr[i11 + 3]));
                i11 += 4;
            }
            return;
        }
        if (c10 == 't') {
            int i24 = i10 - 2;
            while (i11 <= i24) {
                arrayList.add(new h.q(fArr[i11], fArr[i11 + 1]));
                i11 += 2;
            }
            return;
        }
        if (c10 == 'T') {
            int i25 = i10 - 2;
            while (i11 <= i25) {
                arrayList.add(new h.i(fArr[i11], fArr[i11 + 1]));
                i11 += 2;
            }
            return;
        }
        if (c10 == 'a') {
            int i26 = i10 - 7;
            for (int i27 = 0; i27 <= i26; i27 += 7) {
                arrayList.add(new h.j(fArr[i27], fArr[i27 + 1], fArr[i27 + 2], Float.compare(fArr[i27 + 3], BitmapDescriptorFactory.HUE_RED) != 0, Float.compare(fArr[i27 + 4], BitmapDescriptorFactory.HUE_RED) != 0, fArr[i27 + 5], fArr[i27 + 6]));
            }
            return;
        }
        if (c10 != 'A') {
            throw new IllegalArgumentException("Unknown command for: " + c10);
        }
        int i28 = i10 - 7;
        for (int i29 = 0; i29 <= i28; i29 += 7) {
            arrayList.add(new h.a(fArr[i29], fArr[i29 + 1], fArr[i29 + 2], Float.compare(fArr[i29 + 3], BitmapDescriptorFactory.HUE_RED) != 0, Float.compare(fArr[i29 + 4], BitmapDescriptorFactory.HUE_RED) != 0, fArr[i29 + 5], fArr[i29 + 6]));
        }
    }

    private static final void b(List list, float[] fArr, int i10) {
        int i11 = i10 - 2;
        if (i11 >= 0) {
            list.add(new h.f(fArr[0], fArr[1]));
            for (int i12 = 2; i12 <= i11; i12 += 2) {
                list.add(new h.e(fArr[i12], fArr[i12 + 1]));
            }
        }
    }

    private static final void c(List list, float[] fArr, int i10) {
        int i11 = i10 - 2;
        if (i11 >= 0) {
            list.add(new h.n(fArr[0], fArr[1]));
            for (int i12 = 2; i12 <= i11; i12 += 2) {
                list.add(new h.m(fArr[i12], fArr[i12 + 1]));
            }
        }
    }
}
