package com.google.android.gms.internal.ads;

import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.media3.common.MimeTypes;

/* JADX INFO: loaded from: classes2.dex */
public final class x8 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f18348a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f18349b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f18350c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f18351d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f18352e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f18353f;

    public x8(int i10, int i11, int i12, int i13, int i14, int i15) {
        this.f18348a = i10;
        this.f18349b = i11;
        this.f18350c = i12;
        this.f18351d = i13;
        this.f18352e = i14;
        this.f18353f = i15;
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    @Nullable
    public static x8 zza(String str) {
        byte b10;
        ih1.x(str.startsWith("Format:"));
        String[] strArrSplit = TextUtils.split(str.substring(7), ",");
        int i10 = 0;
        int i11 = -1;
        int i12 = -1;
        int i13 = -1;
        int i14 = -1;
        int i15 = -1;
        while (true) {
            int length = strArrSplit.length;
            if (i10 >= length) {
                if (i12 == -1 || i13 == -1 || i15 == -1) {
                    return null;
                }
                return new x8(i11, i12, i13, i14, i15, length);
            }
            String strR = ih1.r(strArrSplit[i10].trim());
            switch (strR.hashCode()) {
                case 100571:
                    b10 = !strR.equals("end") ? (byte) -1 : (byte) 2;
                    break;
                case 3556653:
                    b10 = !strR.equals(MimeTypes.BASE_TYPE_TEXT) ? (byte) -1 : (byte) 4;
                    break;
                case 102749521:
                    b10 = !strR.equals("layer") ? (byte) -1 : (byte) 0;
                    break;
                case 109757538:
                    b10 = !strR.equals("start") ? (byte) -1 : (byte) 1;
                    break;
                case 109780401:
                    b10 = !strR.equals("style") ? (byte) -1 : (byte) 3;
                    break;
                default:
                    b10 = -1;
                    break;
            }
            if (b10 == 0) {
                i11 = i10;
            } else if (b10 == 1) {
                i12 = i10;
            } else if (b10 == 2) {
                i13 = i10;
            } else if (b10 == 3) {
                i14 = i10;
            } else if (b10 == 4) {
                i15 = i10;
            }
            i10++;
        }
    }
}
