package defpackage;

import androidx.media3.common.ParserException;
import java.util.Collections;
import java.util.List;

/* renamed from: ᵙᵱ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2617 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final int f10119;

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final float f10120;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final int f10121;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final int f10122;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final int f10123;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final int f10124;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final List f10125;

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public final String f10126;

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public final int f10127;

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public final ᵮᵥٴ f10128;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final int f10129;

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final int f10130;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final int f10131;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final int f10132;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final int f10133;

    public C2617(List list, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, float f, int i11, String str, ᵮᵥٴ r15) {
        this.f10125 = list;
        this.f10129 = i;
        this.f10123 = i2;
        this.f10133 = i3;
        this.f10119 = i4;
        this.f10122 = i5;
        this.f10121 = i6;
        this.f10132 = i7;
        this.f10124 = i8;
        this.f10130 = i9;
        this.f10131 = i10;
        this.f10120 = f;
        this.f10127 = i11;
        this.f10126 = str;
        this.f10128 = r15;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static C2617 m6585(C3493 c3493, boolean z, ᵮᵥٴ r37) throws ParserException {
        boolean z2;
        ᵺˑʔˇ r1;
        int i;
        int i2 = 4;
        try {
            if (z) {
                c3493.m7946(4);
            } else {
                c3493.m7946(21);
            }
            int iM7956 = c3493.m7956() & 3;
            int iM79562 = c3493.m7956();
            int i3 = c3493.f13083;
            int i4 = 0;
            int i5 = 0;
            int i6 = 0;
            while (true) {
                z2 = true;
                if (i5 >= iM79562) {
                    break;
                }
                c3493.m7946(1);
                int iM7972 = c3493.m7972();
                for (int i7 = 0; i7 < iM7972; i7++) {
                    int iM79722 = c3493.m7972();
                    i6 += iM79722 + 4;
                    c3493.m7946(iM79722);
                }
                i5++;
            }
            c3493.m7955(i3);
            byte[] bArr = new byte[i6];
            ᵮᵥٴ r26 = r37;
            int i8 = -1;
            int i9 = -1;
            int i10 = -1;
            int i11 = -1;
            int i12 = -1;
            int i13 = -1;
            int i14 = -1;
            int i15 = -1;
            int i16 = -1;
            int i17 = -1;
            float f = 1.0f;
            String strM8995 = null;
            int i18 = 0;
            int i19 = 0;
            while (i18 < iM79562) {
                int iM79563 = c3493.m7956() & 63;
                int iM79723 = c3493.m7972();
                int i20 = i4;
                ᵮᵥٴ r12 = r26;
                while (i20 < iM79723) {
                    boolean z3 = z2;
                    int iM79724 = c3493.m7972();
                    int i21 = iM7956;
                    System.arraycopy(ˊˉʤﹳ.ˏˋٴ, i4, bArr, i19, i2);
                    int i22 = i19 + 4;
                    System.arraycopy(c3493.f13082, c3493.f13083, bArr, i22, iM79724);
                    if (iM79563 == 32 && i20 == 0) {
                        r12 = ˊˉʤﹳ.ˆᵼᵷˊ(bArr, i22, i22 + iM79724);
                    } else {
                        if (iM79563 == 33 && i20 == 0) {
                            C5039 c5039 = ˊˉʤﹳ.ˀᵗᵩ(bArr, i22, i22 + iM79724, r12);
                            i8 = c5039.f18835 + 1;
                            i9 = c5039.f18831;
                            int i23 = c5039.f18840;
                            i11 = c5039.f18833 + 8;
                            i12 = c5039.f18841 + 8;
                            int i24 = c5039.f18839;
                            i10 = i23;
                            int i25 = c5039.f18830;
                            int i26 = c5039.f18836;
                            float f2 = c5039.f18834;
                            int i27 = c5039.f18838;
                            C5310 c5310 = c5039.f18837;
                            if (c5310 != null) {
                                i = i27;
                                strM8995 = AbstractC4109.m8995(c5310.f19876, c5310.f19877, c5310.f19875, c5310.f19878, c5310.f19873, c5310.f19874);
                            } else {
                                i = i27;
                            }
                            i17 = i;
                            f = f2;
                            i15 = i26;
                            i14 = i25;
                            i13 = i24;
                        } else if (iM79563 == 39 && i20 == 0 && (r1 = ˊˉʤﹳ.ˊᵸˊ(bArr, i22, i22 + iM79724)) != null && r12 != null) {
                            i4 = 0;
                            i16 = r1.ᵢˇᵭ == ((C0456) ((AbstractC2692) r12.ᵢˇᵭ).get(0)).f2515 ? 4 : 5;
                        }
                        i4 = 0;
                    }
                    i19 = i22 + iM79724;
                    c3493.m7946(iM79724);
                    i20++;
                    z2 = z3;
                    iM7956 = i21;
                    i2 = 4;
                }
                i18++;
                r26 = r12;
                i2 = 4;
            }
            return new C2617(i6 == 0 ? Collections.EMPTY_LIST : Collections.singletonList(bArr), iM7956 + 1, i8, i9, i10, i11, i12, i13, i14, i15, i16, f, i17, strM8995, r26);
        } catch (ArrayIndexOutOfBoundsException e) {
            throw ParserException.m356("Error parsing".concat(z ? "L-HEVC config" : "HEVC config"), e);
        }
    }
}
