package l1;

import B0.C0016c;
import B3.f;
import C3.W;
import L4.h;
import T0.AbstractC0302b;
import T0.C0301a;
import T0.C0303c;
import T0.G;
import T0.H;
import T0.i;
import T0.j;
import T0.m;
import T0.n;
import T0.o;
import T0.q;
import T0.u;
import T0.z;
import Z.g;
import android.util.Pair;
import android.util.SparseArray;
import d3.V0;
import d5.AbstractC0844a;
import java.io.EOFException;
import java.io.InterruptedIOException;
import java.math.RoundingMode;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import n4.u0;
import q1.InterfaceC1454k;
import u0.AbstractC1569e;
import u0.C1570f;
import u0.C1574j;
import u0.C1575k;
import u0.C1578n;
import u0.C1579o;
import u0.E;
import u0.F;
import x0.AbstractC1709a;
import x0.v;

/* JADX INFO: renamed from: l1.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1123d implements m {

    /* JADX INFO: renamed from: f0, reason: collision with root package name */
    public static final byte[] f14313f0 = {49, 10, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 32, 45, 45, 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 10};

    /* JADX INFO: renamed from: g0, reason: collision with root package name */
    public static final byte[] f14314g0;

    /* JADX INFO: renamed from: h0, reason: collision with root package name */
    public static final byte[] f14315h0;

    /* JADX INFO: renamed from: i0, reason: collision with root package name */
    public static final byte[] f14316i0;

    /* JADX INFO: renamed from: j0, reason: collision with root package name */
    public static final UUID f14317j0;

    /* JADX INFO: renamed from: k0, reason: collision with root package name */
    public static final Map f14318k0;

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public long f14319A;

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

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public long f14321C;
    public long D;

    /* JADX INFO: renamed from: E, reason: collision with root package name */
    public long f14322E;

    /* JADX INFO: renamed from: F, reason: collision with root package name */
    public B7.a f14323F;

    /* JADX INFO: renamed from: G, reason: collision with root package name */
    public B7.a f14324G;
    public boolean H;

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

    /* JADX INFO: renamed from: J, reason: collision with root package name */
    public int f14326J;

    /* JADX INFO: renamed from: K, reason: collision with root package name */
    public long f14327K;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    public long f14328L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    public int f14329M;

    /* JADX INFO: renamed from: N, reason: collision with root package name */
    public int f14330N;

    /* JADX INFO: renamed from: O, reason: collision with root package name */
    public int[] f14331O;

    /* JADX INFO: renamed from: P, reason: collision with root package name */
    public int f14332P;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    public int f14333Q;

    /* JADX INFO: renamed from: R, reason: collision with root package name */
    public int f14334R;

    /* JADX INFO: renamed from: S, reason: collision with root package name */
    public int f14335S;

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

    /* JADX INFO: renamed from: U, reason: collision with root package name */
    public long f14337U;

    /* JADX INFO: renamed from: V, reason: collision with root package name */
    public int f14338V;

    /* JADX INFO: renamed from: W, reason: collision with root package name */
    public int f14339W;
    public int X;

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

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

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

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

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

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public int f14345b0;

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

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public byte f14347c0;

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

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

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

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    public o f14351e0;

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final x0.o f14353g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final x0.o f14354h;
    public final x0.o i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final x0.o f14355j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final x0.o f14356k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final x0.o f14357l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final x0.o f14358m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final x0.o f14359n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final x0.o f14360o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public final x0.o f14361p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public ByteBuffer f14362q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public long f14363r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public long f14364s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public long f14365t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public long f14366u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public long f14367v;

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

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public C1122c f14369x;

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

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public int f14371z;

    static {
        int i = v.f18553a;
        f14314g0 = "Format: Start, End, ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text".getBytes(StandardCharsets.UTF_8);
        f14315h0 = new byte[]{68, 105, 97, 108, 111, 103, 117, 101, 58, 32, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, 44};
        f14316i0 = new byte[]{87, 69, 66, 86, 84, 84, 10, 10, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 32, 45, 45, 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 10};
        f14317j0 = new UUID(72057594037932032L, -9223371306706625679L);
        HashMap map = new HashMap();
        AbstractC0844a.t(0, map, "htc_video_rotA-000", 90, "htc_video_rotA-090");
        AbstractC0844a.t(180, map, "htc_video_rotA-180", 270, "htc_video_rotA-270");
        f14318k0 = Collections.unmodifiableMap(map);
    }

    public C1123d(InterfaceC1454k interfaceC1454k, int i) {
        C1121b c1121b = new C1121b();
        this.f14364s = -1L;
        this.f14365t = -9223372036854775807L;
        this.f14366u = -9223372036854775807L;
        this.f14367v = -9223372036854775807L;
        this.f14321C = -1L;
        this.D = -1L;
        this.f14322E = -9223372036854775807L;
        this.f14342a = c1121b;
        c1121b.f14260d = new V0(28, this);
        this.f14352f = interfaceC1454k;
        this.f14348d = (i & 1) == 0;
        this.f14350e = (i & 2) == 0;
        this.f14344b = new C1124e();
        this.f14346c = new SparseArray();
        this.i = new x0.o(4);
        this.f14355j = new x0.o(ByteBuffer.allocate(4).putInt(-1).array());
        this.f14356k = new x0.o(4);
        this.f14353g = new x0.o(y0.o.f18870a);
        this.f14354h = new x0.o(4);
        this.f14357l = new x0.o();
        this.f14358m = new x0.o();
        this.f14359n = new x0.o(8);
        this.f14360o = new x0.o();
        this.f14361p = new x0.o();
        this.f14331O = new int[1];
    }

    public static byte[] h(long j8, String str, long j9) {
        AbstractC1709a.d(j8 != -9223372036854775807L);
        int i = (int) (j8 / 3600000000L);
        long j10 = j8 - (((long) i) * 3600000000L);
        int i5 = (int) (j10 / 60000000);
        long j11 = j10 - (((long) i5) * 60000000);
        int i8 = (int) (j11 / 1000000);
        String str2 = String.format(Locale.US, str, Integer.valueOf(i), Integer.valueOf(i5), Integer.valueOf(i8), Integer.valueOf((int) ((j11 - (((long) i8) * 1000000)) / j9)));
        int i9 = v.f18553a;
        return str2.getBytes(StandardCharsets.UTF_8);
    }

    public final void b(int i) {
        if (this.f14323F == null || this.f14324G == null) {
            throw F.a(null, "Element " + i + " must be in a Cues");
        }
    }

    @Override // T0.m
    public final m c() {
        return this;
    }

    public final void d(int i) {
        if (this.f14369x != null) {
            return;
        }
        throw F.a(null, "Element " + i + " must be in a TrackEntry");
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:246:0x04ee A[PHI: r41
      0x04ee: PHI (r41v39 java.lang.String) = 
      (r41v4 java.lang.String)
      (r41v5 java.lang.String)
      (r41v6 java.lang.String)
      (r41v7 java.lang.String)
      (r41v8 java.lang.String)
      (r41v9 java.lang.String)
      (r41v10 java.lang.String)
      (r41v11 java.lang.String)
      (r41v12 java.lang.String)
      (r41v13 java.lang.String)
      (r41v14 java.lang.String)
      (r41v15 java.lang.String)
      (r41v16 java.lang.String)
      (r41v17 java.lang.String)
      (r41v18 java.lang.String)
      (r41v19 java.lang.String)
      (r41v20 java.lang.String)
      (r41v21 java.lang.String)
      (r41v22 java.lang.String)
      (r41v23 java.lang.String)
      (r41v24 java.lang.String)
      (r41v25 java.lang.String)
      (r41v26 java.lang.String)
      (r41v27 java.lang.String)
      (r41v28 java.lang.String)
      (r41v29 java.lang.String)
      (r41v30 java.lang.String)
      (r41v31 java.lang.String)
      (r41v32 java.lang.String)
      (r41v33 java.lang.String)
      (r41v34 java.lang.String)
      (r41v35 java.lang.String)
      (r41v40 java.lang.String)
     binds: [B:376:0x06d6, B:372:0x06cb, B:368:0x06bf, B:364:0x06b4, B:360:0x06a9, B:356:0x069e, B:352:0x0693, B:348:0x0686, B:344:0x0676, B:340:0x0666, B:336:0x0656, B:332:0x0646, B:328:0x0636, B:324:0x0626, B:320:0x0616, B:316:0x0606, B:312:0x05f6, B:308:0x05e6, B:304:0x05d6, B:300:0x05c6, B:296:0x05b6, B:292:0x05a6, B:288:0x0596, B:284:0x0586, B:280:0x0576, B:276:0x0566, B:272:0x0556, B:268:0x0546, B:264:0x0536, B:260:0x0526, B:256:0x0516, B:252:0x0506, B:245:0x04ec] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:546:0x0b37  */
    /* JADX WARN: Removed duplicated region for block: B:551:0x0b4e  */
    /* JADX WARN: Removed duplicated region for block: B:552:0x0b50  */
    /* JADX WARN: Removed duplicated region for block: B:555:0x0b61  */
    /* JADX WARN: Removed duplicated region for block: B:557:0x0b70  */
    /* JADX WARN: Removed duplicated region for block: B:648:0x0d4c  */
    /* JADX WARN: Removed duplicated region for block: B:653:0x0d60  */
    /* JADX WARN: Removed duplicated region for block: B:654:0x0d63  */
    /* JADX WARN: Type inference failed for: r2v111 */
    /* JADX WARN: Type inference failed for: r2v14, types: [boolean, int] */
    /* JADX WARN: Type inference failed for: r2v15 */
    /* JADX WARN: Type inference failed for: r4v17, types: [T0.j] */
    /* JADX WARN: Type inference failed for: r8v38 */
    /* JADX WARN: Type inference failed for: r8v39, types: [java.lang.RuntimeException] */
    /* JADX WARN: Type inference failed for: r8v40 */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // T0.m
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int e(n nVar, h hVar) throws F, EOFException, InterruptedIOException {
        String str;
        boolean z8;
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        String str7;
        char c3;
        boolean z9;
        C1123d c1123d;
        boolean z10;
        int i;
        String str8;
        ?? r42;
        int iB;
        int iA;
        String str9;
        boolean z11;
        boolean z12;
        int i5;
        String str10;
        byte b8;
        char c8;
        char c9;
        char c10;
        byte b9;
        String str11;
        List listSingletonList;
        int iY;
        int i8;
        ?? r8;
        ArrayList arrayList;
        int i9;
        char c11;
        String str12;
        RuntimeException runtimeException;
        long jK;
        char c12;
        Pair pair;
        String str13;
        RuntimeException runtimeException2;
        List listP;
        boolean zI;
        int i10;
        int i11;
        C1570f c1570f;
        byte[] bArr;
        int i12;
        String str14;
        C1123d c1123d2;
        f fVarE;
        String str15;
        String str16;
        String str17;
        z qVar;
        int i13;
        C1123d c1123d3 = this;
        String str18 = "A_MPEG/L2";
        String str19 = "A_VORBIS";
        String str20 = "A_TRUEHD";
        String str21 = "A_MS/ACM";
        String str22 = "V_MPEG4/ISO/SP";
        String str23 = "V_MPEG4/ISO/AP";
        String str24 = "A_OPUS";
        char c13 = 2;
        boolean z13 = false;
        c1123d3.f14325I = false;
        boolean z14 = true;
        while (z14 && !c1123d3.f14325I) {
            C1121b c1121b = c1123d3.f14342a;
            AbstractC1709a.k(c1121b.f14260d);
            while (true) {
                ArrayDeque arrayDeque = c1121b.f14258b;
                C1120a c1120a = (C1120a) arrayDeque.peek();
                boolean z15 = z13;
                if (c1120a != null) {
                    String str25 = str24;
                    if (((j) nVar).f6428t >= c1120a.f14256b) {
                        V0 v02 = c1121b.f14260d;
                        int i14 = ((C1120a) arrayDeque.pop()).f14255a;
                        C1123d c1123d4 = (C1123d) v02.f11784r;
                        AbstractC1709a.k(c1123d4.f14351e0);
                        SparseArray sparseArray = c1123d4.f14346c;
                        if (i14 != 160) {
                            if (i14 == 174) {
                                String str26 = str21;
                                String str27 = str22;
                                String str28 = str23;
                                C1122c c1122c = c1123d4.f14369x;
                                AbstractC1709a.k(c1122c);
                                String str29 = c1122c.f14290c;
                                if (str29 == null) {
                                    throw F.a(null, "CodecId is missing in TrackEntry element");
                                }
                                switch (str29.hashCode()) {
                                    case -2095576542:
                                        str10 = str25;
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        b8 = str29.equals(str) ? z15 ? 1 : 0 : (byte) -1;
                                        break;
                                    case -2095575984:
                                        str10 = str25;
                                        str3 = str26;
                                        str2 = str27;
                                        if (str29.equals(str2)) {
                                            str = str28;
                                            b8 = 1;
                                        } else {
                                            str = str28;
                                        }
                                        break;
                                    case -1985379776:
                                        str10 = str25;
                                        str3 = str26;
                                        if (str29.equals(str3)) {
                                            c8 = c13;
                                            str = str28;
                                            str2 = str27;
                                            b8 = c8;
                                        } else {
                                            str = str28;
                                            str2 = str27;
                                        }
                                        break;
                                    case -1784763192:
                                        str10 = str25;
                                        if (str29.equals(str20)) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 3;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -1730367663:
                                        str10 = str25;
                                        if (str29.equals(str19)) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 4;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -1482641358:
                                        str10 = str25;
                                        if (str29.equals(str18)) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 5;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -1482641357:
                                        str10 = str25;
                                        if (str29.equals("A_MPEG/L3")) {
                                            c9 = 6;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -1373388978:
                                        str10 = str25;
                                        if (str29.equals("V_MS/VFW/FOURCC")) {
                                            c9 = 7;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -933872740:
                                        str10 = str25;
                                        if (str29.equals("S_DVBSUB")) {
                                            c10 = '\b';
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -538363189:
                                        str10 = str25;
                                        if (str29.equals("V_MPEG4/ISO/ASP")) {
                                            c9 = '\t';
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -538363109:
                                        str10 = str25;
                                        if (str29.equals("V_MPEG4/ISO/AVC")) {
                                            c9 = '\n';
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -425012669:
                                        str10 = str25;
                                        if (str29.equals("S_VOBSUB")) {
                                            c9 = 11;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case -356037306:
                                        str10 = str25;
                                        if (str29.equals("A_DTS/LOSSLESS")) {
                                            c9 = '\f';
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 62923557:
                                        str10 = str25;
                                        if (str29.equals("A_AAC")) {
                                            c9 = '\r';
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 62923603:
                                        str10 = str25;
                                        if (str29.equals("A_AC3")) {
                                            c9 = 14;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 62927045:
                                        str10 = str25;
                                        if (str29.equals("A_DTS")) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 15;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 82318131:
                                        str10 = str25;
                                        if (str29.equals("V_AV1")) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 16;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 82338133:
                                        str10 = str25;
                                        if (str29.equals("V_VP8")) {
                                            c9 = 17;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 82338134:
                                        str10 = str25;
                                        if (str29.equals("V_VP9")) {
                                            c9 = 18;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 99146302:
                                        str10 = str25;
                                        if (str29.equals("S_HDMV/PGS")) {
                                            c9 = 19;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 444813526:
                                        str10 = str25;
                                        if (str29.equals("V_THEORA")) {
                                            c10 = 20;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 542569478:
                                        str10 = str25;
                                        if (str29.equals("A_DTS/EXPRESS")) {
                                            c9 = 21;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 635596514:
                                        str10 = str25;
                                        if (str29.equals("A_PCM/FLOAT/IEEE")) {
                                            c9 = 22;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 725948237:
                                        str10 = str25;
                                        if (str29.equals("A_PCM/INT/BIG")) {
                                            c9 = 23;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 725957860:
                                        str10 = str25;
                                        if (str29.equals("A_PCM/INT/LIT")) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 24;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 738597099:
                                        str10 = str25;
                                        if (str29.equals("S_TEXT/ASS")) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 25;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 855502857:
                                        str10 = str25;
                                        if (str29.equals("V_MPEGH/ISO/HEVC")) {
                                            c9 = 26;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1045209816:
                                        str10 = str25;
                                        if (str29.equals("S_TEXT/WEBVTT")) {
                                            c9 = 27;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1422270023:
                                        str10 = str25;
                                        if (str29.equals("S_TEXT/UTF8")) {
                                            c9 = 28;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1809237540:
                                        str10 = str25;
                                        if (str29.equals("V_MPEG2")) {
                                            c9 = 29;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1950749482:
                                        str10 = str25;
                                        if (str29.equals("A_EAC3")) {
                                            c9 = 30;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1950789798:
                                        str10 = str25;
                                        if (str29.equals("A_FLAC")) {
                                            c9 = 31;
                                            c10 = c9;
                                            str = str28;
                                            str3 = str26;
                                            c8 = c10;
                                            str2 = str27;
                                            b8 = c8;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    case 1951062397:
                                        str10 = str25;
                                        if (str29.equals(str10)) {
                                            str = str28;
                                            str3 = str26;
                                            str2 = str27;
                                            b8 = 32;
                                        }
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                    default:
                                        str10 = str25;
                                        str = str28;
                                        str3 = str26;
                                        str2 = str27;
                                        break;
                                }
                                switch (b8) {
                                    case u0.f15495q /* 0 */:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case g.STRING_SET_FIELD_NUMBER /* 6 */:
                                    case g.DOUBLE_FIELD_NUMBER /* 7 */:
                                    case g.BYTES_FIELD_NUMBER /* 8 */:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                        o oVar = c1123d4.f14351e0;
                                        int i15 = c1122c.f14291d;
                                        String str30 = "video/x-unknown";
                                        switch (str29.hashCode()) {
                                            case -2095576542:
                                                str9 = str10;
                                                b9 = str29.equals(str) ? z15 ? 1 : 0 : (byte) -1;
                                                break;
                                            case -2095575984:
                                                str9 = str10;
                                                if (str29.equals(str2)) {
                                                    b9 = 1;
                                                    break;
                                                }
                                                break;
                                            case -1985379776:
                                                str9 = str10;
                                                if (str29.equals(str3)) {
                                                    b9 = c13;
                                                    break;
                                                }
                                                break;
                                            case -1784763192:
                                                str9 = str10;
                                                if (str29.equals(str20)) {
                                                    b9 = 3;
                                                    break;
                                                }
                                                break;
                                            case -1730367663:
                                                str9 = str10;
                                                if (str29.equals(str19)) {
                                                    b9 = 4;
                                                    break;
                                                }
                                                break;
                                            case -1482641358:
                                                str9 = str10;
                                                if (str29.equals(str18)) {
                                                    b9 = 5;
                                                    break;
                                                }
                                                break;
                                            case -1482641357:
                                                str9 = str10;
                                                if (str29.equals("A_MPEG/L3")) {
                                                    b9 = 6;
                                                    break;
                                                }
                                                break;
                                            case -1373388978:
                                                str9 = str10;
                                                if (str29.equals("V_MS/VFW/FOURCC")) {
                                                    b9 = 7;
                                                    break;
                                                }
                                                break;
                                            case -933872740:
                                                str9 = str10;
                                                if (str29.equals("S_DVBSUB")) {
                                                    b9 = 8;
                                                    break;
                                                }
                                                break;
                                            case -538363189:
                                                str9 = str10;
                                                if (str29.equals("V_MPEG4/ISO/ASP")) {
                                                    b9 = 9;
                                                    break;
                                                }
                                                break;
                                            case -538363109:
                                                str9 = str10;
                                                if (str29.equals("V_MPEG4/ISO/AVC")) {
                                                    b9 = 10;
                                                    break;
                                                }
                                                break;
                                            case -425012669:
                                                str9 = str10;
                                                if (str29.equals("S_VOBSUB")) {
                                                    b9 = 11;
                                                    break;
                                                }
                                                break;
                                            case -356037306:
                                                str9 = str10;
                                                if (str29.equals("A_DTS/LOSSLESS")) {
                                                    b9 = 12;
                                                    break;
                                                }
                                                break;
                                            case 62923557:
                                                str9 = str10;
                                                if (str29.equals("A_AAC")) {
                                                    b9 = 13;
                                                    break;
                                                }
                                                break;
                                            case 62923603:
                                                str9 = str10;
                                                if (str29.equals("A_AC3")) {
                                                    b9 = 14;
                                                    break;
                                                }
                                                break;
                                            case 62927045:
                                                str9 = str10;
                                                if (str29.equals("A_DTS")) {
                                                    b9 = 15;
                                                    break;
                                                }
                                                break;
                                            case 82318131:
                                                str9 = str10;
                                                if (str29.equals("V_AV1")) {
                                                    b9 = 16;
                                                    break;
                                                }
                                                break;
                                            case 82338133:
                                                str9 = str10;
                                                if (str29.equals("V_VP8")) {
                                                    b9 = 17;
                                                    break;
                                                }
                                                break;
                                            case 82338134:
                                                str9 = str10;
                                                if (str29.equals("V_VP9")) {
                                                    b9 = 18;
                                                    break;
                                                }
                                                break;
                                            case 99146302:
                                                str9 = str10;
                                                if (str29.equals("S_HDMV/PGS")) {
                                                    b9 = 19;
                                                    break;
                                                }
                                                break;
                                            case 444813526:
                                                str9 = str10;
                                                if (str29.equals("V_THEORA")) {
                                                    b9 = 20;
                                                    break;
                                                }
                                                break;
                                            case 542569478:
                                                str9 = str10;
                                                if (str29.equals("A_DTS/EXPRESS")) {
                                                    b9 = 21;
                                                    break;
                                                }
                                                break;
                                            case 635596514:
                                                str9 = str10;
                                                if (str29.equals("A_PCM/FLOAT/IEEE")) {
                                                    b9 = 22;
                                                    break;
                                                }
                                                break;
                                            case 725948237:
                                                str9 = str10;
                                                if (str29.equals("A_PCM/INT/BIG")) {
                                                    b9 = 23;
                                                    break;
                                                }
                                                break;
                                            case 725957860:
                                                str9 = str10;
                                                if (str29.equals("A_PCM/INT/LIT")) {
                                                    b9 = 24;
                                                    break;
                                                }
                                                break;
                                            case 738597099:
                                                str9 = str10;
                                                if (str29.equals("S_TEXT/ASS")) {
                                                    b9 = 25;
                                                    break;
                                                }
                                                break;
                                            case 855502857:
                                                str9 = str10;
                                                if (str29.equals("V_MPEGH/ISO/HEVC")) {
                                                    b9 = 26;
                                                    break;
                                                }
                                                break;
                                            case 1045209816:
                                                str9 = str10;
                                                if (str29.equals("S_TEXT/WEBVTT")) {
                                                    b9 = 27;
                                                    break;
                                                }
                                                break;
                                            case 1422270023:
                                                str9 = str10;
                                                if (str29.equals("S_TEXT/UTF8")) {
                                                    b9 = 28;
                                                    break;
                                                }
                                                break;
                                            case 1809237540:
                                                str9 = str10;
                                                if (str29.equals("V_MPEG2")) {
                                                    b9 = 29;
                                                    break;
                                                }
                                                break;
                                            case 1950749482:
                                                str9 = str10;
                                                if (str29.equals("A_EAC3")) {
                                                    b9 = 30;
                                                    break;
                                                }
                                                break;
                                            case 1950789798:
                                                str9 = str10;
                                                if (str29.equals("A_FLAC")) {
                                                    b9 = 31;
                                                    break;
                                                }
                                                break;
                                            case 1951062397:
                                                if (str29.equals(str10)) {
                                                    str9 = str10;
                                                    b9 = 32;
                                                    break;
                                                }
                                            default:
                                                str9 = str10;
                                                break;
                                        }
                                        switch (b9) {
                                            case u0.f15495q /* 0 */:
                                            case 1:
                                            case 9:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                byte[] bArr2 = c1122c.f14298l;
                                                str30 = "video/mp4v-es";
                                                listSingletonList = bArr2 == null ? null : Collections.singletonList(bArr2);
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null && (fVarE = f.e(new x0.o(c1122c.f14277P))) != null) {
                                                    str12 = fVarE.f975b;
                                                    str30 = "video/dolby-vision";
                                                }
                                                int i16 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map = f14318k0;
                                                if (!zI) {
                                                    c1578n.f17301C = c1122c.f14278Q;
                                                    c1578n.D = c1122c.f14280S;
                                                    c1578n.f17302E = iY;
                                                    i10 = 1;
                                                } else if (!E.l(str30)) {
                                                    if (!"application/x-subrip".equals(str30) && !"text/x-ssa".equals(str30) && !"text/vtt".equals(str30) && !"application/vobsub".equals(str30) && !"application/pgs".equals(str30) && !"application/dvbsubs".equals(str30)) {
                                                        throw F.a(null, "Unexpected MIME type.");
                                                    }
                                                    i10 = 3;
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null && !map.containsKey(str14)) {
                                                        c1578n.f17310b = c1122c.f14289b;
                                                    }
                                                    c1578n.f17309a = Integer.toString(i15);
                                                    c1578n.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n.f17320m = E.m(str30);
                                                    c1578n.f17321n = i8;
                                                    c1578n.f17312d = c1122c.f14285Y;
                                                    c1578n.f17313e = i16;
                                                    c1578n.f17323p = listSingletonList;
                                                    c1578n.f17317j = str12;
                                                    c1578n.f17324q = c1122c.f14299m;
                                                    C1579o c1579o = new C1579o(c1578n);
                                                    T0.F fJ = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ;
                                                    fJ.e(c1579o);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                } else {
                                                    if (c1122c.f14305s == 0) {
                                                        int i17 = c1122c.f14303q;
                                                        i11 = -1;
                                                        if (i17 == -1) {
                                                            i17 = c1122c.f14300n;
                                                        }
                                                        c1122c.f14303q = i17;
                                                        int i18 = c1122c.f14304r;
                                                        if (i18 == -1) {
                                                            i18 = c1122c.f14301o;
                                                        }
                                                        c1122c.f14304r = i18;
                                                    } else {
                                                        i11 = -1;
                                                    }
                                                    float f3 = (c1122c.f14303q == i11 || (i12 = c1122c.f14304r) == i11) ? -1.0f : (c1122c.f14301o * r1) / (c1122c.f14300n * i12);
                                                    if (c1122c.f14312z) {
                                                        if (c1122c.f14268F == -1.0f || c1122c.f14269G == -1.0f || c1122c.H == -1.0f || c1122c.f14270I == -1.0f || c1122c.f14271J == -1.0f || c1122c.f14272K == -1.0f || c1122c.f14273L == -1.0f || c1122c.f14274M == -1.0f || c1122c.f14275N == -1.0f || c1122c.f14276O == -1.0f) {
                                                            bArr = null;
                                                        } else {
                                                            byte[] bArr3 = new byte[25];
                                                            ByteBuffer byteBufferOrder = ByteBuffer.wrap(bArr3).order(ByteOrder.LITTLE_ENDIAN);
                                                            byteBufferOrder.put((byte) 0);
                                                            byteBufferOrder.putShort((short) ((c1122c.f14268F * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14269G * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.H * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14270I * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14271J * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14272K * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14273L * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) ((c1122c.f14274M * 50000.0f) + 0.5f));
                                                            byteBufferOrder.putShort((short) (c1122c.f14275N + 0.5f));
                                                            byteBufferOrder.putShort((short) (c1122c.f14276O + 0.5f));
                                                            byteBufferOrder.putShort((short) c1122c.D);
                                                            byteBufferOrder.putShort((short) c1122c.f14267E);
                                                            bArr = bArr3;
                                                        }
                                                        int i19 = c1122c.f14264A;
                                                        int i20 = c1122c.f14266C;
                                                        int i21 = c1122c.f14265B;
                                                        int i22 = c1122c.f14302p;
                                                        c1570f = new C1570f(i19, i20, i21, i22, i22, bArr);
                                                    } else {
                                                        c1570f = null;
                                                    }
                                                    String str31 = c1122c.f14289b;
                                                    int iIntValue = (str31 == null || !map.containsKey(str31)) ? -1 : ((Integer) map.get(c1122c.f14289b)).intValue();
                                                    if (c1122c.f14306t == 0 && Float.compare(c1122c.f14307u, 0.0f) == 0 && Float.compare(c1122c.f14308v, 0.0f) == 0) {
                                                        if (Float.compare(c1122c.f14309w, 0.0f) == 0) {
                                                            iIntValue = 0;
                                                        } else if (Float.compare(c1122c.f14309w, 90.0f) == 0) {
                                                            iIntValue = 90;
                                                        } else if (Float.compare(c1122c.f14309w, -180.0f) == 0 || Float.compare(c1122c.f14309w, 180.0f) == 0) {
                                                            iIntValue = 180;
                                                        } else if (Float.compare(c1122c.f14309w, -90.0f) == 0) {
                                                            iIntValue = 270;
                                                        }
                                                    }
                                                    c1578n.f17327t = c1122c.f14300n;
                                                    c1578n.f17328u = c1122c.f14301o;
                                                    c1578n.f17331x = f3;
                                                    c1578n.f17330w = iIntValue;
                                                    c1578n.f17332y = c1122c.f14310x;
                                                    c1578n.f17333z = c1122c.f14311y;
                                                    c1578n.f17299A = c1570f;
                                                    i10 = 2;
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                    c1578n.f17310b = c1122c.f14289b;
                                                }
                                                c1578n.f17309a = Integer.toString(i15);
                                                c1578n.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n.f17320m = E.m(str30);
                                                c1578n.f17321n = i8;
                                                c1578n.f17312d = c1122c.f14285Y;
                                                c1578n.f17313e = i16;
                                                c1578n.f17323p = listSingletonList;
                                                c1578n.f17317j = str12;
                                                c1578n.f17324q = c1122c.f14299m;
                                                C1579o c1579o2 = new C1579o(c1578n);
                                                T0.F fJ2 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2;
                                                fJ2.e(c1579o2);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 2:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                x0.o oVar2 = new x0.o(c1122c.a(c1122c.f14290c));
                                                try {
                                                    int iM = oVar2.m();
                                                    if (iM != 1) {
                                                        if (iM == 65534) {
                                                            oVar2.F(24);
                                                            long jN = oVar2.n();
                                                            UUID uuid = f14317j0;
                                                            if (jN != uuid.getMostSignificantBits() || oVar2.n() != uuid.getLeastSignificantBits()) {
                                                            }
                                                            str30 = "audio/x-unknown";
                                                            iY = -1;
                                                            i8 = -1;
                                                            listSingletonList = null;
                                                            str12 = null;
                                                            if (c1122c.f14277P != null) {
                                                                str12 = fVarE.f975b;
                                                                str30 = "video/dolby-vision";
                                                            }
                                                            int i162 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                            C1578n c1578n2 = new C1578n();
                                                            zI = E.i(str30);
                                                            str7 = str11;
                                                            Map map2 = f14318k0;
                                                            if (!zI) {
                                                            }
                                                            str14 = c1122c.f14289b;
                                                            if (str14 != null) {
                                                            }
                                                            c1578n2.f17309a = Integer.toString(i15);
                                                            c1578n2.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                            c1578n2.f17320m = E.m(str30);
                                                            c1578n2.f17321n = i8;
                                                            c1578n2.f17312d = c1122c.f14285Y;
                                                            c1578n2.f17313e = i162;
                                                            c1578n2.f17323p = listSingletonList;
                                                            c1578n2.f17317j = str12;
                                                            c1578n2.f17324q = c1122c.f14299m;
                                                            C1579o c1579o22 = new C1579o(c1578n2);
                                                            T0.F fJ22 = oVar.j(c1122c.f14291d, i10);
                                                            c1122c.f14286Z = fJ22;
                                                            fJ22.e(c1579o22);
                                                            sparseArray.put(c1122c.f14291d, c1122c);
                                                            c1123d2 = c1123d4;
                                                            break;
                                                        }
                                                        AbstractC1709a.B("MatroskaExtractor", "Non-PCM MS/ACM is unsupported. Setting mimeType to audio/x-unknown");
                                                        str30 = "audio/x-unknown";
                                                        iY = -1;
                                                        i8 = -1;
                                                        listSingletonList = null;
                                                        str12 = null;
                                                        if (c1122c.f14277P != null) {
                                                        }
                                                        int i1622 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                        C1578n c1578n22 = new C1578n();
                                                        zI = E.i(str30);
                                                        str7 = str11;
                                                        Map map22 = f14318k0;
                                                        if (!zI) {
                                                        }
                                                        str14 = c1122c.f14289b;
                                                        if (str14 != null) {
                                                        }
                                                        c1578n22.f17309a = Integer.toString(i15);
                                                        c1578n22.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                        c1578n22.f17320m = E.m(str30);
                                                        c1578n22.f17321n = i8;
                                                        c1578n22.f17312d = c1122c.f14285Y;
                                                        c1578n22.f17313e = i1622;
                                                        c1578n22.f17323p = listSingletonList;
                                                        c1578n22.f17317j = str12;
                                                        c1578n22.f17324q = c1122c.f14299m;
                                                        C1579o c1579o222 = new C1579o(c1578n22);
                                                        T0.F fJ222 = oVar.j(c1122c.f14291d, i10);
                                                        c1122c.f14286Z = fJ222;
                                                        fJ222.e(c1579o222);
                                                        sparseArray.put(c1122c.f14291d, c1122c);
                                                        c1123d2 = c1123d4;
                                                        break;
                                                    }
                                                    iY = v.y(c1122c.f14279R);
                                                    if (iY == 0) {
                                                        AbstractC1709a.B("MatroskaExtractor", "Unsupported PCM bit depth: " + c1122c.f14279R + ". Setting mimeType to audio/x-unknown");
                                                        str30 = "audio/x-unknown";
                                                        iY = -1;
                                                        i8 = -1;
                                                        listSingletonList = null;
                                                        str12 = null;
                                                        if (c1122c.f14277P != null) {
                                                        }
                                                        int i16222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                        C1578n c1578n222 = new C1578n();
                                                        zI = E.i(str30);
                                                        str7 = str11;
                                                        Map map222 = f14318k0;
                                                        if (!zI) {
                                                        }
                                                        str14 = c1122c.f14289b;
                                                        if (str14 != null) {
                                                        }
                                                        c1578n222.f17309a = Integer.toString(i15);
                                                        c1578n222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                        c1578n222.f17320m = E.m(str30);
                                                        c1578n222.f17321n = i8;
                                                        c1578n222.f17312d = c1122c.f14285Y;
                                                        c1578n222.f17313e = i16222;
                                                        c1578n222.f17323p = listSingletonList;
                                                        c1578n222.f17317j = str12;
                                                        c1578n222.f17324q = c1122c.f14299m;
                                                        C1579o c1579o2222 = new C1579o(c1578n222);
                                                        T0.F fJ2222 = oVar.j(c1122c.f14291d, i10);
                                                        c1122c.f14286Z = fJ2222;
                                                        fJ2222.e(c1579o2222);
                                                        sparseArray.put(c1122c.f14291d, c1122c);
                                                        c1123d2 = c1123d4;
                                                    } else {
                                                        str30 = "audio/raw";
                                                        i8 = -1;
                                                        listSingletonList = null;
                                                        str12 = null;
                                                        if (c1122c.f14277P != null) {
                                                        }
                                                        int i162222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                        C1578n c1578n2222 = new C1578n();
                                                        zI = E.i(str30);
                                                        str7 = str11;
                                                        Map map2222 = f14318k0;
                                                        if (!zI) {
                                                        }
                                                        str14 = c1122c.f14289b;
                                                        if (str14 != null) {
                                                        }
                                                        c1578n2222.f17309a = Integer.toString(i15);
                                                        c1578n2222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                        c1578n2222.f17320m = E.m(str30);
                                                        c1578n2222.f17321n = i8;
                                                        c1578n2222.f17312d = c1122c.f14285Y;
                                                        c1578n2222.f17313e = i162222;
                                                        c1578n2222.f17323p = listSingletonList;
                                                        c1578n2222.f17317j = str12;
                                                        c1578n2222.f17324q = c1122c.f14299m;
                                                        C1579o c1579o22222 = new C1579o(c1578n2222);
                                                        T0.F fJ22222 = oVar.j(c1122c.f14291d, i10);
                                                        c1122c.f14286Z = fJ22222;
                                                        fJ22222.e(c1579o22222);
                                                        sparseArray.put(c1122c.f14291d, c1122c);
                                                        c1123d2 = c1123d4;
                                                    }
                                                } catch (ArrayIndexOutOfBoundsException unused) {
                                                    throw F.a(null, "Error parsing MS/ACM codec private");
                                                }
                                                break;
                                            case 3:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                c1122c.f14283V = new G();
                                                str30 = "audio/true-hd";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222.f17309a = Integer.toString(i15);
                                                c1578n22222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222.f17320m = E.m(str30);
                                                c1578n22222.f17321n = i8;
                                                c1578n22222.f17312d = c1122c.f14285Y;
                                                c1578n22222.f17313e = i1622222;
                                                c1578n22222.f17323p = listSingletonList;
                                                c1578n22222.f17317j = str12;
                                                c1578n22222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222 = new C1579o(c1578n22222);
                                                T0.F fJ222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222;
                                                fJ222222.e(c1579o222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 4:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                byte[] bArrA = c1122c.a(str29);
                                                try {
                                                    r8 = bArrA[0];
                                                } catch (ArrayIndexOutOfBoundsException unused2) {
                                                    r8 = 0;
                                                }
                                                try {
                                                    if (r8 != c13) {
                                                        throw F.a(null, "Error parsing vorbis codec private");
                                                    }
                                                    int i23 = 0;
                                                    int i24 = 1;
                                                    while (true) {
                                                        int i25 = bArrA[i24] & 255;
                                                        if (i25 != 255) {
                                                            int i26 = i24 + 1;
                                                            int i27 = i23 + i25;
                                                            int i28 = 0;
                                                            while (true) {
                                                                int i29 = bArrA[i26] & 255;
                                                                if (i29 != 255) {
                                                                    int i30 = i26 + 1;
                                                                    int i31 = i28 + i29;
                                                                    if (bArrA[i30] != 1) {
                                                                        throw F.a(null, "Error parsing vorbis codec private");
                                                                    }
                                                                    byte[] bArr4 = new byte[i27];
                                                                    System.arraycopy(bArrA, i30, bArr4, 0, i27);
                                                                    int i32 = i30 + i27;
                                                                    if (bArrA[i32] != 3) {
                                                                        throw F.a(null, "Error parsing vorbis codec private");
                                                                    }
                                                                    int i33 = i32 + i31;
                                                                    if (bArrA[i33] != 5) {
                                                                        throw F.a(null, "Error parsing vorbis codec private");
                                                                    }
                                                                    byte[] bArr5 = new byte[bArrA.length - i33];
                                                                    System.arraycopy(bArrA, i33, bArr5, 0, bArrA.length - i33);
                                                                    arrayList = new ArrayList(2);
                                                                    arrayList.add(bArr4);
                                                                    arrayList.add(bArr5);
                                                                    str30 = "audio/vorbis";
                                                                    i9 = 8192;
                                                                    listSingletonList = arrayList;
                                                                    i8 = i9;
                                                                    iY = -1;
                                                                    str12 = null;
                                                                    if (c1122c.f14277P != null) {
                                                                    }
                                                                    int i16222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                                    C1578n c1578n222222 = new C1578n();
                                                                    zI = E.i(str30);
                                                                    str7 = str11;
                                                                    Map map222222 = f14318k0;
                                                                    if (!zI) {
                                                                    }
                                                                    str14 = c1122c.f14289b;
                                                                    if (str14 != null) {
                                                                    }
                                                                    c1578n222222.f17309a = Integer.toString(i15);
                                                                    c1578n222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                                    c1578n222222.f17320m = E.m(str30);
                                                                    c1578n222222.f17321n = i8;
                                                                    c1578n222222.f17312d = c1122c.f14285Y;
                                                                    c1578n222222.f17313e = i16222222;
                                                                    c1578n222222.f17323p = listSingletonList;
                                                                    c1578n222222.f17317j = str12;
                                                                    c1578n222222.f17324q = c1122c.f14299m;
                                                                    C1579o c1579o2222222 = new C1579o(c1578n222222);
                                                                    T0.F fJ2222222 = oVar.j(c1122c.f14291d, i10);
                                                                    c1122c.f14286Z = fJ2222222;
                                                                    fJ2222222.e(c1579o2222222);
                                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                                    c1123d2 = c1123d4;
                                                                } else {
                                                                    i28 += 255;
                                                                    i26++;
                                                                }
                                                            }
                                                        } else {
                                                            i23 += 255;
                                                            i24++;
                                                        }
                                                    }
                                                } catch (ArrayIndexOutOfBoundsException unused3) {
                                                    throw F.a(r8, "Error parsing vorbis codec private");
                                                }
                                                break;
                                            case 5:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                c11 = 15;
                                                str30 = "audio/mpeg-L2";
                                                iY = -1;
                                                i8 = 4096;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222.f17309a = Integer.toString(i15);
                                                c1578n2222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222.f17320m = E.m(str30);
                                                c1578n2222222.f17321n = i8;
                                                c1578n2222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222.f17313e = i162222222;
                                                c1578n2222222.f17323p = listSingletonList;
                                                c1578n2222222.f17317j = str12;
                                                c1578n2222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222 = new C1579o(c1578n2222222);
                                                T0.F fJ22222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222;
                                                fJ22222222.e(c1579o22222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case g.STRING_SET_FIELD_NUMBER /* 6 */:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                c11 = 15;
                                                str30 = "audio/mpeg";
                                                iY = -1;
                                                i8 = 4096;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222.f17309a = Integer.toString(i15);
                                                c1578n22222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222.f17320m = E.m(str30);
                                                c1578n22222222.f17321n = i8;
                                                c1578n22222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222.f17313e = i1622222222;
                                                c1578n22222222.f17323p = listSingletonList;
                                                c1578n22222222.f17317j = str12;
                                                c1578n22222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222 = new C1579o(c1578n22222222);
                                                T0.F fJ222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222;
                                                fJ222222222.e(c1579o222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case g.DOUBLE_FIELD_NUMBER /* 7 */:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                x0.o oVar3 = new x0.o(c1122c.a(c1122c.f14290c));
                                                try {
                                                    oVar3.G(16);
                                                    jK = oVar3.k();
                                                } catch (ArrayIndexOutOfBoundsException unused4) {
                                                    runtimeException = null;
                                                }
                                                if (jK != 1482049860) {
                                                    if (jK != 859189832) {
                                                        if (jK == 826496599) {
                                                            byte[] bArr6 = oVar3.f18539a;
                                                            for (int i34 = oVar3.f18540b + 20; i34 < bArr6.length - 4; i34++) {
                                                                if (bArr6[i34] == 0) {
                                                                    if (bArr6[i34 + 1] == 0 && bArr6[i34 + 2] == 1) {
                                                                        c12 = 15;
                                                                        if (bArr6[i34 + 3] == 15) {
                                                                            pair = new Pair("video/wvc1", Collections.singletonList(Arrays.copyOfRange(bArr6, i34, bArr6.length)));
                                                                            str13 = null;
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            runtimeException2 = null;
                                                            throw F.a(null, "Failed to find FourCC VC1 initialization data");
                                                        }
                                                        c12 = 15;
                                                        AbstractC1709a.B("MatroskaExtractor", "Unknown FourCC. Setting mimeType to video/x-unknown");
                                                        str13 = null;
                                                        pair = new Pair("video/x-unknown", null);
                                                        str30 = (String) pair.first;
                                                        List list = (List) pair.second;
                                                        iY = -1;
                                                        i8 = -1;
                                                        str12 = str13;
                                                        listSingletonList = list;
                                                        if (c1122c.f14277P != null) {
                                                        }
                                                        int i16222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                        C1578n c1578n222222222 = new C1578n();
                                                        zI = E.i(str30);
                                                        str7 = str11;
                                                        Map map222222222 = f14318k0;
                                                        if (!zI) {
                                                        }
                                                        str14 = c1122c.f14289b;
                                                        if (str14 != null) {
                                                        }
                                                        c1578n222222222.f17309a = Integer.toString(i15);
                                                        c1578n222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                        c1578n222222222.f17320m = E.m(str30);
                                                        c1578n222222222.f17321n = i8;
                                                        c1578n222222222.f17312d = c1122c.f14285Y;
                                                        c1578n222222222.f17313e = i16222222222;
                                                        c1578n222222222.f17323p = listSingletonList;
                                                        c1578n222222222.f17317j = str12;
                                                        c1578n222222222.f17324q = c1122c.f14299m;
                                                        C1579o c1579o2222222222 = new C1579o(c1578n222222222);
                                                        T0.F fJ2222222222 = oVar.j(c1122c.f14291d, i10);
                                                        c1122c.f14286Z = fJ2222222222;
                                                        fJ2222222222.e(c1579o2222222222);
                                                        sparseArray.put(c1122c.f14291d, c1122c);
                                                        c1123d2 = c1123d4;
                                                        break;
                                                    } else {
                                                        pair = new Pair("video/3gpp", null);
                                                    }
                                                    throw F.a(runtimeException, "Error parsing FourCC private data");
                                                }
                                                runtimeException2 = null;
                                                try {
                                                    pair = new Pair("video/divx", null);
                                                } catch (ArrayIndexOutOfBoundsException unused5) {
                                                    runtimeException = runtimeException2;
                                                }
                                                str13 = null;
                                                c12 = 15;
                                                str30 = (String) pair.first;
                                                List list2 = (List) pair.second;
                                                iY = -1;
                                                i8 = -1;
                                                str12 = str13;
                                                listSingletonList = list2;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222.f17320m = E.m(str30);
                                                c1578n2222222222.f17321n = i8;
                                                c1578n2222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222.f17313e = i162222222222;
                                                c1578n2222222222.f17323p = listSingletonList;
                                                c1578n2222222222.f17317j = str12;
                                                c1578n2222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222 = new C1579o(c1578n2222222222);
                                                T0.F fJ22222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222;
                                                fJ22222222222.e(c1579o22222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case g.BYTES_FIELD_NUMBER /* 8 */:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                byte[] bArr7 = new byte[4];
                                                System.arraycopy(c1122c.a(str29), 0, bArr7, 0, 4);
                                                listSingletonList = C3.G.p(bArr7);
                                                str30 = "application/dvbsubs";
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222.f17320m = E.m(str30);
                                                c1578n22222222222.f17321n = i8;
                                                c1578n22222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222.f17313e = i1622222222222;
                                                c1578n22222222222.f17323p = listSingletonList;
                                                c1578n22222222222.f17317j = str12;
                                                c1578n22222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222 = new C1579o(c1578n22222222222);
                                                T0.F fJ222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222;
                                                fJ222222222222.e(c1579o222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 10:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                C0303c c0303cA = C0303c.a(new x0.o(c1122c.a(c1122c.f14290c)));
                                                c1122c.f14288a0 = c0303cA.f6391b;
                                                ArrayList arrayList2 = c0303cA.f6390a;
                                                str30 = "video/avc";
                                                str12 = c0303cA.f6400l;
                                                listSingletonList = arrayList2;
                                                iY = -1;
                                                i8 = -1;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222.f17320m = E.m(str30);
                                                c1578n222222222222.f17321n = i8;
                                                c1578n222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222.f17313e = i16222222222222;
                                                c1578n222222222222.f17323p = listSingletonList;
                                                c1578n222222222222.f17317j = str12;
                                                c1578n222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222 = new C1579o(c1578n222222222222);
                                                T0.F fJ2222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222;
                                                fJ2222222222222.e(c1579o2222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 11:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                listSingletonList = C3.G.p(c1122c.a(str29));
                                                str30 = "application/vobsub";
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222.f17321n = i8;
                                                c1578n2222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222.f17313e = i162222222222222;
                                                c1578n2222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222.f17317j = str12;
                                                c1578n2222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222 = new C1579o(c1578n2222222222222);
                                                T0.F fJ22222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222;
                                                fJ22222222222222.e(c1579o22222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 12:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "audio/vnd.dts.hd";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222.f17321n = i8;
                                                c1578n22222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222.f17313e = i1622222222222222;
                                                c1578n22222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222.f17317j = str12;
                                                c1578n22222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222 = new C1579o(c1578n22222222222222);
                                                T0.F fJ222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222;
                                                fJ222222222222222.e(c1579o222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 13:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                List listSingletonList2 = Collections.singletonList(c1122c.a(str29));
                                                byte[] bArr8 = c1122c.f14298l;
                                                C0301a c0301aN = AbstractC0302b.n(new H(bArr8.length, bArr8), false);
                                                c1122c.f14280S = c0301aN.f6364b;
                                                c1122c.f14278Q = c0301aN.f6365c;
                                                str30 = "audio/mp4a-latm";
                                                String str32 = c0301aN.f6363a;
                                                listSingletonList = listSingletonList2;
                                                str12 = str32;
                                                iY = -1;
                                                i8 = -1;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222.f17321n = i8;
                                                c1578n222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222.f17313e = i16222222222222222;
                                                c1578n222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222.f17317j = str12;
                                                c1578n222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222 = new C1579o(c1578n222222222222222);
                                                T0.F fJ2222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222;
                                                fJ2222222222222222.e(c1579o2222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 14:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "audio/ac3";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222.f17321n = i8;
                                                c1578n2222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222.f17313e = i162222222222222222;
                                                c1578n2222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222.f17317j = str12;
                                                c1578n2222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222 = new C1579o(c1578n2222222222222222);
                                                T0.F fJ22222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222;
                                                fJ22222222222222222.e(c1579o22222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 15:
                                            case 21:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "audio/vnd.dts";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222222.f17321n = i8;
                                                c1578n22222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222222.f17313e = i1622222222222222222;
                                                c1578n22222222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222222.f17317j = str12;
                                                c1578n22222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222222 = new C1579o(c1578n22222222222222222);
                                                T0.F fJ222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222222;
                                                fJ222222222222222222.e(c1579o222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 16:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                byte[] bArr9 = c1122c.f14298l;
                                                listP = bArr9 == null ? null : C3.G.p(bArr9);
                                                str30 = "video/av01";
                                                listSingletonList = listP;
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222222.f17321n = i8;
                                                c1578n222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222222.f17313e = i16222222222222222222;
                                                c1578n222222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222222.f17317j = str12;
                                                c1578n222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222222 = new C1579o(c1578n222222222222222222);
                                                T0.F fJ2222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222222;
                                                fJ2222222222222222222.e(c1579o2222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 17:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "video/x-vnd.on2.vp8";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222222.f17321n = i8;
                                                c1578n2222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222222.f17313e = i162222222222222222222;
                                                c1578n2222222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222222.f17317j = str12;
                                                c1578n2222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222222 = new C1579o(c1578n2222222222222222222);
                                                T0.F fJ22222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222222;
                                                fJ22222222222222222222.e(c1579o22222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 18:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                byte[] bArr10 = c1122c.f14298l;
                                                listP = bArr10 == null ? null : C3.G.p(bArr10);
                                                str30 = "video/x-vnd.on2.vp9";
                                                listSingletonList = listP;
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222222222.f17321n = i8;
                                                c1578n22222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222222222.f17313e = i1622222222222222222222;
                                                c1578n22222222222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222222222.f17317j = str12;
                                                c1578n22222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222222222 = new C1579o(c1578n22222222222222222222);
                                                T0.F fJ222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222222222;
                                                fJ222222222222222222222.e(c1579o222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 19:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "application/pgs";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222222222.f17321n = i8;
                                                c1578n222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222222222.f17313e = i16222222222222222222222;
                                                c1578n222222222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222222222.f17317j = str12;
                                                c1578n222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222222222 = new C1579o(c1578n222222222222222222222);
                                                T0.F fJ2222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222222222;
                                                fJ2222222222222222222222.e(c1579o2222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 20:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222222222.f17321n = i8;
                                                c1578n2222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222222222.f17313e = i162222222222222222222222;
                                                c1578n2222222222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222222222.f17317j = str12;
                                                c1578n2222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222222222 = new C1579o(c1578n2222222222222222222222);
                                                T0.F fJ22222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222222222;
                                                fJ22222222222222222222222.e(c1579o22222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 22:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                if (c1122c.f14279R == 32) {
                                                    str30 = "audio/raw";
                                                    iY = 4;
                                                    i8 = -1;
                                                    listSingletonList = null;
                                                    str12 = null;
                                                    if (c1122c.f14277P != null) {
                                                    }
                                                    int i1622222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                    C1578n c1578n22222222222222222222222 = new C1578n();
                                                    zI = E.i(str30);
                                                    str7 = str11;
                                                    Map map22222222222222222222222 = f14318k0;
                                                    if (!zI) {
                                                    }
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null) {
                                                    }
                                                    c1578n22222222222222222222222.f17309a = Integer.toString(i15);
                                                    c1578n22222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n22222222222222222222222.f17320m = E.m(str30);
                                                    c1578n22222222222222222222222.f17321n = i8;
                                                    c1578n22222222222222222222222.f17312d = c1122c.f14285Y;
                                                    c1578n22222222222222222222222.f17313e = i1622222222222222222222222;
                                                    c1578n22222222222222222222222.f17323p = listSingletonList;
                                                    c1578n22222222222222222222222.f17317j = str12;
                                                    c1578n22222222222222222222222.f17324q = c1122c.f14299m;
                                                    C1579o c1579o222222222222222222222222 = new C1579o(c1578n22222222222222222222222);
                                                    T0.F fJ222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ222222222222222222222222;
                                                    fJ222222222222222222222222.e(c1579o222222222222222222222222);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                } else {
                                                    AbstractC1709a.B("MatroskaExtractor", "Unsupported floating point PCM bit depth: " + c1122c.f14279R + ". Setting mimeType to audio/x-unknown");
                                                    str30 = "audio/x-unknown";
                                                    iY = -1;
                                                    i8 = -1;
                                                    listSingletonList = null;
                                                    str12 = null;
                                                    if (c1122c.f14277P != null) {
                                                    }
                                                    int i16222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                    C1578n c1578n222222222222222222222222 = new C1578n();
                                                    zI = E.i(str30);
                                                    str7 = str11;
                                                    Map map222222222222222222222222 = f14318k0;
                                                    if (!zI) {
                                                    }
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null) {
                                                    }
                                                    c1578n222222222222222222222222.f17309a = Integer.toString(i15);
                                                    c1578n222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n222222222222222222222222.f17320m = E.m(str30);
                                                    c1578n222222222222222222222222.f17321n = i8;
                                                    c1578n222222222222222222222222.f17312d = c1122c.f14285Y;
                                                    c1578n222222222222222222222222.f17313e = i16222222222222222222222222;
                                                    c1578n222222222222222222222222.f17323p = listSingletonList;
                                                    c1578n222222222222222222222222.f17317j = str12;
                                                    c1578n222222222222222222222222.f17324q = c1122c.f14299m;
                                                    C1579o c1579o2222222222222222222222222 = new C1579o(c1578n222222222222222222222222);
                                                    T0.F fJ2222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ2222222222222222222222222;
                                                    fJ2222222222222222222222222.e(c1579o2222222222222222222222222);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                }
                                                break;
                                            case 23:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                int i35 = c1122c.f14279R;
                                                if (i35 == 8) {
                                                    str30 = "audio/raw";
                                                    iY = 3;
                                                    i8 = -1;
                                                    listSingletonList = null;
                                                    str12 = null;
                                                    if (c1122c.f14277P != null) {
                                                    }
                                                    int i162222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                    C1578n c1578n2222222222222222222222222 = new C1578n();
                                                    zI = E.i(str30);
                                                    str7 = str11;
                                                    Map map2222222222222222222222222 = f14318k0;
                                                    if (!zI) {
                                                    }
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null) {
                                                    }
                                                    c1578n2222222222222222222222222.f17309a = Integer.toString(i15);
                                                    c1578n2222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n2222222222222222222222222.f17320m = E.m(str30);
                                                    c1578n2222222222222222222222222.f17321n = i8;
                                                    c1578n2222222222222222222222222.f17312d = c1122c.f14285Y;
                                                    c1578n2222222222222222222222222.f17313e = i162222222222222222222222222;
                                                    c1578n2222222222222222222222222.f17323p = listSingletonList;
                                                    c1578n2222222222222222222222222.f17317j = str12;
                                                    c1578n2222222222222222222222222.f17324q = c1122c.f14299m;
                                                    C1579o c1579o22222222222222222222222222 = new C1579o(c1578n2222222222222222222222222);
                                                    T0.F fJ22222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ22222222222222222222222222;
                                                    fJ22222222222222222222222222.e(c1579o22222222222222222222222222);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                } else {
                                                    if (i35 == 16) {
                                                        iY = 268435456;
                                                    } else if (i35 == 24) {
                                                        iY = 1342177280;
                                                    } else if (i35 != 32) {
                                                        AbstractC1709a.B("MatroskaExtractor", "Unsupported big endian PCM bit depth: " + c1122c.f14279R + ". Setting mimeType to audio/x-unknown");
                                                        str30 = "audio/x-unknown";
                                                        iY = -1;
                                                        i8 = -1;
                                                        listSingletonList = null;
                                                        str12 = null;
                                                        if (c1122c.f14277P != null) {
                                                        }
                                                        int i1622222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                        C1578n c1578n22222222222222222222222222 = new C1578n();
                                                        zI = E.i(str30);
                                                        str7 = str11;
                                                        Map map22222222222222222222222222 = f14318k0;
                                                        if (!zI) {
                                                        }
                                                        str14 = c1122c.f14289b;
                                                        if (str14 != null) {
                                                        }
                                                        c1578n22222222222222222222222222.f17309a = Integer.toString(i15);
                                                        c1578n22222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                        c1578n22222222222222222222222222.f17320m = E.m(str30);
                                                        c1578n22222222222222222222222222.f17321n = i8;
                                                        c1578n22222222222222222222222222.f17312d = c1122c.f14285Y;
                                                        c1578n22222222222222222222222222.f17313e = i1622222222222222222222222222;
                                                        c1578n22222222222222222222222222.f17323p = listSingletonList;
                                                        c1578n22222222222222222222222222.f17317j = str12;
                                                        c1578n22222222222222222222222222.f17324q = c1122c.f14299m;
                                                        C1579o c1579o222222222222222222222222222 = new C1579o(c1578n22222222222222222222222222);
                                                        T0.F fJ222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                        c1122c.f14286Z = fJ222222222222222222222222222;
                                                        fJ222222222222222222222222222.e(c1579o222222222222222222222222222);
                                                        sparseArray.put(c1122c.f14291d, c1122c);
                                                        c1123d2 = c1123d4;
                                                    } else {
                                                        iY = 1610612736;
                                                    }
                                                    str30 = "audio/raw";
                                                    i8 = -1;
                                                    listSingletonList = null;
                                                    str12 = null;
                                                    if (c1122c.f14277P != null) {
                                                    }
                                                    int i16222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                    C1578n c1578n222222222222222222222222222 = new C1578n();
                                                    zI = E.i(str30);
                                                    str7 = str11;
                                                    Map map222222222222222222222222222 = f14318k0;
                                                    if (!zI) {
                                                    }
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null) {
                                                    }
                                                    c1578n222222222222222222222222222.f17309a = Integer.toString(i15);
                                                    c1578n222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n222222222222222222222222222.f17320m = E.m(str30);
                                                    c1578n222222222222222222222222222.f17321n = i8;
                                                    c1578n222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                    c1578n222222222222222222222222222.f17313e = i16222222222222222222222222222;
                                                    c1578n222222222222222222222222222.f17323p = listSingletonList;
                                                    c1578n222222222222222222222222222.f17317j = str12;
                                                    c1578n222222222222222222222222222.f17324q = c1122c.f14299m;
                                                    C1579o c1579o2222222222222222222222222222 = new C1579o(c1578n222222222222222222222222222);
                                                    T0.F fJ2222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ2222222222222222222222222222;
                                                    fJ2222222222222222222222222222.e(c1579o2222222222222222222222222222);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                }
                                                break;
                                            case 24:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                iY = v.y(c1122c.f14279R);
                                                if (iY == 0) {
                                                    AbstractC1709a.B("MatroskaExtractor", "Unsupported little endian PCM bit depth: " + c1122c.f14279R + ". Setting mimeType to audio/x-unknown");
                                                    str30 = "audio/x-unknown";
                                                    iY = -1;
                                                    i8 = -1;
                                                    listSingletonList = null;
                                                    str12 = null;
                                                    if (c1122c.f14277P != null) {
                                                    }
                                                    int i162222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                    C1578n c1578n2222222222222222222222222222 = new C1578n();
                                                    zI = E.i(str30);
                                                    str7 = str11;
                                                    Map map2222222222222222222222222222 = f14318k0;
                                                    if (!zI) {
                                                    }
                                                    str14 = c1122c.f14289b;
                                                    if (str14 != null) {
                                                    }
                                                    c1578n2222222222222222222222222222.f17309a = Integer.toString(i15);
                                                    c1578n2222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                    c1578n2222222222222222222222222222.f17320m = E.m(str30);
                                                    c1578n2222222222222222222222222222.f17321n = i8;
                                                    c1578n2222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                    c1578n2222222222222222222222222222.f17313e = i162222222222222222222222222222;
                                                    c1578n2222222222222222222222222222.f17323p = listSingletonList;
                                                    c1578n2222222222222222222222222222.f17317j = str12;
                                                    c1578n2222222222222222222222222222.f17324q = c1122c.f14299m;
                                                    C1579o c1579o22222222222222222222222222222 = new C1579o(c1578n2222222222222222222222222222);
                                                    T0.F fJ22222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                    c1122c.f14286Z = fJ22222222222222222222222222222;
                                                    fJ22222222222222222222222222222.e(c1579o22222222222222222222222222222);
                                                    sparseArray.put(c1122c.f14291d, c1122c);
                                                    c1123d2 = c1123d4;
                                                }
                                                str30 = "audio/raw";
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222222222222222222.f17321n = i8;
                                                c1578n22222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222222222222222222.f17313e = i1622222222222222222222222222222;
                                                c1578n22222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222222222222222222.f17317j = str12;
                                                c1578n22222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222222222222222222 = new C1579o(c1578n22222222222222222222222222222);
                                                T0.F fJ222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222222222222222222;
                                                fJ222222222222222222222222222222.e(c1579o222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 25:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                listSingletonList = C3.G.s(f14314g0, c1122c.a(str29));
                                                str30 = "text/x-ssa";
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222222222222222222.f17321n = i8;
                                                c1578n222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222222222222222222.f17313e = i16222222222222222222222222222222;
                                                c1578n222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222222222222222222.f17317j = str12;
                                                c1578n222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222222222222222222 = new C1579o(c1578n222222222222222222222222222222);
                                                T0.F fJ2222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222222222222222222;
                                                fJ2222222222222222222222222222222.e(c1579o2222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 26:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                u uVarA = u.a(new x0.o(c1122c.a(c1122c.f14290c)), z15, null);
                                                c1122c.f14288a0 = uVarA.f6460b;
                                                str30 = "video/hevc";
                                                List list3 = uVarA.f6459a;
                                                str12 = uVarA.f6469l;
                                                listSingletonList = list3;
                                                iY = -1;
                                                i8 = -1;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222222222222222222.f17321n = i8;
                                                c1578n2222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222222222222222222.f17313e = i162222222222222222222222222222222;
                                                c1578n2222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222222222222222222.f17317j = str12;
                                                c1578n2222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222222222222222222 = new C1579o(c1578n2222222222222222222222222222222);
                                                T0.F fJ22222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222222222222222222;
                                                fJ22222222222222222222222222222222.e(c1579o22222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 27:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "text/vtt";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222222222222222222222.f17321n = i8;
                                                c1578n22222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222222222222222222222.f17313e = i1622222222222222222222222222222222;
                                                c1578n22222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222222222222222222222.f17317j = str12;
                                                c1578n22222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222222222222222222222 = new C1579o(c1578n22222222222222222222222222222222);
                                                T0.F fJ222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222222222222222222222;
                                                fJ222222222222222222222222222222222.e(c1579o222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 28:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "application/x-subrip";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222222222222222222222.f17321n = i8;
                                                c1578n222222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222222222222222222222.f17313e = i16222222222222222222222222222222222;
                                                c1578n222222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222222222222222222222.f17317j = str12;
                                                c1578n222222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222222222222222222222 = new C1579o(c1578n222222222222222222222222222222222);
                                                T0.F fJ2222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222222222222222222222;
                                                fJ2222222222222222222222222222222222.e(c1579o2222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 29:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "video/mpeg2";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222222222222222222222.f17321n = i8;
                                                c1578n2222222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222222222222222222222.f17313e = i162222222222222222222222222222222222;
                                                c1578n2222222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222222222222222222222.f17317j = str12;
                                                c1578n2222222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222222222222222222222 = new C1579o(c1578n2222222222222222222222222222222222);
                                                T0.F fJ22222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222222222222222222222;
                                                fJ22222222222222222222222222222222222.e(c1579o22222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 30:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                str30 = "audio/eac3";
                                                iY = -1;
                                                i8 = -1;
                                                listSingletonList = null;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i1622222222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n22222222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map22222222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n22222222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n22222222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n22222222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n22222222222222222222222222222222222.f17321n = i8;
                                                c1578n22222222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n22222222222222222222222222222222222.f17313e = i1622222222222222222222222222222222222;
                                                c1578n22222222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n22222222222222222222222222222222222.f17317j = str12;
                                                c1578n22222222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o222222222222222222222222222222222222 = new C1579o(c1578n22222222222222222222222222222222222);
                                                T0.F fJ222222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ222222222222222222222222222222222222;
                                                fJ222222222222222222222222222222222222.e(c1579o222222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 31:
                                                str6 = str18;
                                                str5 = str19;
                                                str11 = str20;
                                                listP = Collections.singletonList(c1122c.a(str29));
                                                str30 = "audio/flac";
                                                listSingletonList = listP;
                                                iY = -1;
                                                i8 = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i16222222222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n222222222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map222222222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n222222222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n222222222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n222222222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n222222222222222222222222222222222222.f17321n = i8;
                                                c1578n222222222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n222222222222222222222222222222222222.f17313e = i16222222222222222222222222222222222222;
                                                c1578n222222222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n222222222222222222222222222222222222.f17317j = str12;
                                                c1578n222222222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o2222222222222222222222222222222222222 = new C1579o(c1578n222222222222222222222222222222222222);
                                                T0.F fJ2222222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ2222222222222222222222222222222222222;
                                                fJ2222222222222222222222222222222222222.e(c1579o2222222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            case 32:
                                                arrayList = new ArrayList(3);
                                                arrayList.add(c1122c.a(c1122c.f14290c));
                                                ByteBuffer byteBufferAllocate = ByteBuffer.allocate(8);
                                                ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
                                                str6 = str18;
                                                str5 = str19;
                                                arrayList.add(byteBufferAllocate.order(byteOrder).putLong(c1122c.f14281T).array());
                                                str11 = str20;
                                                arrayList.add(ByteBuffer.allocate(8).order(byteOrder).putLong(c1122c.f14282U).array());
                                                str30 = "audio/opus";
                                                i9 = 5760;
                                                listSingletonList = arrayList;
                                                i8 = i9;
                                                iY = -1;
                                                str12 = null;
                                                if (c1122c.f14277P != null) {
                                                }
                                                int i162222222222222222222222222222222222222 = (c1122c.X ? 1 : 0) | (!c1122c.f14284W ? 2 : 0);
                                                C1578n c1578n2222222222222222222222222222222222222 = new C1578n();
                                                zI = E.i(str30);
                                                str7 = str11;
                                                Map map2222222222222222222222222222222222222 = f14318k0;
                                                if (!zI) {
                                                }
                                                str14 = c1122c.f14289b;
                                                if (str14 != null) {
                                                }
                                                c1578n2222222222222222222222222222222222222.f17309a = Integer.toString(i15);
                                                c1578n2222222222222222222222222222222222222.f17319l = E.m(c1122c.f14287a ? "video/webm" : "video/x-matroska");
                                                c1578n2222222222222222222222222222222222222.f17320m = E.m(str30);
                                                c1578n2222222222222222222222222222222222222.f17321n = i8;
                                                c1578n2222222222222222222222222222222222222.f17312d = c1122c.f14285Y;
                                                c1578n2222222222222222222222222222222222222.f17313e = i162222222222222222222222222222222222222;
                                                c1578n2222222222222222222222222222222222222.f17323p = listSingletonList;
                                                c1578n2222222222222222222222222222222222222.f17317j = str12;
                                                c1578n2222222222222222222222222222222222222.f17324q = c1122c.f14299m;
                                                C1579o c1579o22222222222222222222222222222222222222 = new C1579o(c1578n2222222222222222222222222222222222222);
                                                T0.F fJ22222222222222222222222222222222222222 = oVar.j(c1122c.f14291d, i10);
                                                c1122c.f14286Z = fJ22222222222222222222222222222222222222;
                                                fJ22222222222222222222222222222222222222.e(c1579o22222222222222222222222222222222222222);
                                                sparseArray.put(c1122c.f14291d, c1122c);
                                                c1123d2 = c1123d4;
                                                break;
                                            default:
                                                throw F.a(null, "Unrecognized codec identifier.");
                                        }
                                        break;
                                    default:
                                        str6 = str18;
                                        str5 = str19;
                                        str7 = str20;
                                        str9 = str10;
                                        c1123d2 = c1123d4;
                                        break;
                                }
                                c1123d2.f14369x = null;
                            } else {
                                if (i14 == 19899) {
                                    str15 = str21;
                                    str16 = str22;
                                    str17 = str23;
                                    int i36 = c1123d4.f14371z;
                                    if (i36 != -1) {
                                        long j8 = c1123d4.f14319A;
                                        if (j8 != -1) {
                                            if (i36 == 475249515) {
                                                c1123d4.f14321C = j8;
                                                str5 = str19;
                                                str4 = str25;
                                                str = str17;
                                                str3 = str15;
                                                str2 = str16;
                                                z12 = true;
                                                str6 = str18;
                                                str7 = str20;
                                                z11 = z15 ? 1 : 0;
                                                z9 = z11;
                                                z14 = z12;
                                                c3 = 2;
                                            }
                                            str5 = str19;
                                            str = str17;
                                            str3 = str15;
                                            str2 = str16;
                                            str6 = str18;
                                            str7 = str20;
                                            str9 = str25;
                                        }
                                    }
                                    throw F.a(null, "Mandatory element SeekID or SeekPosition not found");
                                }
                                if (i14 != 25152) {
                                    if (i14 != 28032) {
                                        if (i14 == 357149030) {
                                            str15 = str21;
                                            str16 = str22;
                                            str17 = str23;
                                            if (c1123d4.f14365t == -9223372036854775807L) {
                                                c1123d4.f14365t = 1000000L;
                                            }
                                            long j9 = c1123d4.f14366u;
                                            if (j9 != -9223372036854775807L) {
                                                c1123d4.f14367v = c1123d4.n(j9);
                                            }
                                        } else if (i14 == 374648427) {
                                            str15 = str21;
                                            str16 = str22;
                                            str17 = str23;
                                            if (sparseArray.size() == 0) {
                                                throw F.a(null, "No valid tracks were found");
                                            }
                                            c1123d4.f14351e0.h();
                                        } else if (i14 != 475249515) {
                                            str6 = str18;
                                            str5 = str19;
                                            str7 = str20;
                                            str = str23;
                                            str9 = str25;
                                            str2 = str22;
                                            str3 = str21;
                                        } else {
                                            if (c1123d4.f14370y) {
                                                str15 = str21;
                                                str16 = str22;
                                                str17 = str23;
                                            } else {
                                                o oVar4 = c1123d4.f14351e0;
                                                B7.a aVar = c1123d4.f14323F;
                                                B7.a aVar2 = c1123d4.f14324G;
                                                if (c1123d4.f14364s == -1 || c1123d4.f14367v == -9223372036854775807L || aVar == null || (i13 = aVar.f1039r) == 0 || aVar2 == null || aVar2.f1039r != i13) {
                                                    str15 = str21;
                                                    str16 = str22;
                                                    str17 = str23;
                                                    qVar = new q(c1123d4.f14367v);
                                                } else {
                                                    int[] iArrCopyOf = new int[i13];
                                                    long[] jArrCopyOf = new long[i13];
                                                    long[] jArrCopyOf2 = new long[i13];
                                                    long[] jArrCopyOf3 = new long[i13];
                                                    str17 = str23;
                                                    int i37 = z15 ? 1 : 0;
                                                    while (i37 < i13) {
                                                        jArrCopyOf3[i37] = aVar.j(i37);
                                                        jArrCopyOf[i37] = aVar2.j(i37) + c1123d4.f14364s;
                                                        i37++;
                                                        aVar = aVar;
                                                        i13 = i13;
                                                    }
                                                    int i38 = i13;
                                                    int i39 = z15 ? 1 : 0;
                                                    while (true) {
                                                        int i40 = i38 - 1;
                                                        if (i39 < i40) {
                                                            int i41 = i39 + 1;
                                                            iArrCopyOf[i39] = (int) (jArrCopyOf[i41] - jArrCopyOf[i39]);
                                                            jArrCopyOf2[i39] = jArrCopyOf3[i41] - jArrCopyOf3[i39];
                                                            i39 = i41;
                                                        } else {
                                                            int i42 = i40;
                                                            while (true) {
                                                                if (i42 > 0) {
                                                                    str15 = str21;
                                                                    str16 = str22;
                                                                    if (jArrCopyOf3[i42] > c1123d4.f14367v) {
                                                                        i42--;
                                                                        str21 = str15;
                                                                        str22 = str16;
                                                                    }
                                                                } else {
                                                                    str15 = str21;
                                                                    str16 = str22;
                                                                }
                                                            }
                                                            iArrCopyOf[i42] = (int) ((c1123d4.f14364s + c1123d4.f14363r) - jArrCopyOf[i42]);
                                                            jArrCopyOf2[i42] = c1123d4.f14367v - jArrCopyOf3[i42];
                                                            if (i42 < i40) {
                                                                AbstractC1709a.B("MatroskaExtractor", "Discarding trailing cue points with timestamps greater than total duration");
                                                                int i43 = i42 + 1;
                                                                iArrCopyOf = Arrays.copyOf(iArrCopyOf, i43);
                                                                jArrCopyOf = Arrays.copyOf(jArrCopyOf, i43);
                                                                jArrCopyOf2 = Arrays.copyOf(jArrCopyOf2, i43);
                                                                jArrCopyOf3 = Arrays.copyOf(jArrCopyOf3, i43);
                                                            }
                                                            qVar = new i(iArrCopyOf, jArrCopyOf, jArrCopyOf2, jArrCopyOf3);
                                                        }
                                                    }
                                                }
                                                oVar4.v(qVar);
                                                c1123d4.f14370y = true;
                                            }
                                            c1123d4.f14323F = null;
                                            c1123d4.f14324G = null;
                                        }
                                        str5 = str19;
                                        str4 = str25;
                                        str = str17;
                                        str3 = str15;
                                        str2 = str16;
                                        z12 = true;
                                        str6 = str18;
                                        str7 = str20;
                                        z11 = z15 ? 1 : 0;
                                        z9 = z11;
                                        z14 = z12;
                                        c3 = 2;
                                    } else {
                                        str15 = str21;
                                        str16 = str22;
                                        str17 = str23;
                                        c1123d4.d(i14);
                                        C1122c c1122c2 = c1123d4.f14369x;
                                        if (c1122c2.i && c1122c2.f14296j != null) {
                                            throw F.a(null, "Combining encryption and compression is not supported");
                                        }
                                    }
                                    str5 = str19;
                                    str = str17;
                                    str3 = str15;
                                    str2 = str16;
                                    str6 = str18;
                                    str7 = str20;
                                    str9 = str25;
                                } else {
                                    str15 = str21;
                                    str16 = str22;
                                    str17 = str23;
                                    c1123d4.d(i14);
                                    C1122c c1122c3 = c1123d4.f14369x;
                                    if (c1122c3.i) {
                                        T0.E e8 = c1122c3.f14297k;
                                        if (e8 == null) {
                                            throw F.a(null, "Encrypted Track found but ContentEncKeyID was not found");
                                        }
                                        C1574j[] c1574jArr = new C1574j[1];
                                        c1574jArr[z15 ? 1 : 0] = new C1574j(AbstractC1569e.f17272a, null, "video/webm", e8.f6348b);
                                        c1122c3.f14299m = new C1575k(null, true, c1574jArr);
                                        str5 = str19;
                                        str4 = str25;
                                        str = str17;
                                        str3 = str15;
                                        str2 = str16;
                                        z12 = true;
                                        str6 = str18;
                                        str7 = str20;
                                        z11 = z15 ? 1 : 0;
                                        z9 = z11;
                                        z14 = z12;
                                        c3 = 2;
                                    }
                                    str5 = str19;
                                    str = str17;
                                    str3 = str15;
                                    str2 = str16;
                                    str6 = str18;
                                    str7 = str20;
                                    str9 = str25;
                                }
                            }
                            str4 = str9;
                            z11 = false;
                            z12 = true;
                            z9 = z11;
                            z14 = z12;
                            c3 = 2;
                        } else {
                            str6 = str18;
                            str5 = str19;
                            str7 = str20;
                            str = str23;
                            str9 = str25;
                            str2 = str22;
                            str3 = str21;
                            if (c1123d4.f14326J != 2) {
                                str4 = str9;
                                z11 = false;
                                z12 = true;
                            } else {
                                C1122c c1122c4 = (C1122c) sparseArray.get(c1123d4.f14332P);
                                c1122c4.f14286Z.getClass();
                                if (c1123d4.f14337U > 0) {
                                    str4 = str9;
                                    if (str4.equals(c1122c4.f14290c)) {
                                        byte[] bArrArray = ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(c1123d4.f14337U).array();
                                        x0.o oVar5 = c1123d4.f14361p;
                                        oVar5.getClass();
                                        oVar5.D(bArrArray.length, bArrArray);
                                    }
                                } else {
                                    str4 = str9;
                                }
                                int i44 = 0;
                                for (int i45 = 0; i45 < c1123d4.f14330N; i45++) {
                                    i44 += c1123d4.f14331O[i45];
                                }
                                int i46 = 0;
                                while (i46 < c1123d4.f14330N) {
                                    long j10 = c1123d4.f14327K + ((long) ((c1122c4.f14293f * i46) / 1000));
                                    int i47 = c1123d4.f14334R;
                                    if (i46 != 0 || c1123d4.f14336T) {
                                        i5 = 1;
                                    } else {
                                        i5 = 1;
                                        i47 |= 1;
                                    }
                                    int i48 = i47;
                                    int i49 = c1123d4.f14331O[i46];
                                    int i50 = i44 - i49;
                                    c1123d4.g(c1122c4, j10, i48, i49, i50);
                                    i46 += i5;
                                    i44 = i50;
                                }
                                z11 = false;
                                z12 = true;
                                c1123d4.f14326J = 0;
                            }
                            z9 = z11;
                            z14 = z12;
                            c3 = 2;
                        }
                    } else {
                        str = str23;
                        z8 = true;
                        str2 = str22;
                        str3 = str21;
                        str4 = str25;
                    }
                } else {
                    str = str23;
                    z8 = true;
                    str2 = str22;
                    str3 = str21;
                    str4 = str24;
                }
                str6 = str18;
                str5 = str19;
                str7 = str20;
                boolean z16 = z15 ? 1 : 0;
                int i51 = c1121b.f14261e;
                C1124e c1124e = c1121b.f14259c;
                if (i51 == 0) {
                    j jVar = (j) nVar;
                    int i52 = 4;
                    long jC = c1124e.c(jVar, z8, z16, 4);
                    if (jC == -2) {
                        jVar.f6430v = z16 ? 1 : 0;
                        ?? r22 = z16;
                        while (true) {
                            byte[] bArr11 = c1121b.f14257a;
                            r42 = (j) nVar;
                            r42.f(bArr11, r22, i52, r22);
                            iB = C1124e.b(bArr11[r22]);
                            if (iB != -1 && iB <= i52) {
                                iA = (int) C1124e.a(iB, r22, bArr11);
                                ((C1123d) c1121b.f14260d.f11784r).getClass();
                                if (iA == 357149030 || iA == 524531317 || iA == 475249515 || iA == 374648427) {
                                }
                            }
                            r42.b(1);
                            r22 = 0;
                            i52 = 4;
                        }
                        r42.b(iB);
                        jC = iA;
                    }
                    z10 = true;
                    if (jC == -1) {
                        z9 = false;
                        c3 = 2;
                        z14 = false;
                    } else {
                        c1121b.f14262f = (int) jC;
                        c1121b.f14261e = 1;
                    }
                } else {
                    z10 = z8;
                }
                if (c1121b.f14261e == z10) {
                    c1121b.f14263g = c1124e.c((j) nVar, false, z10, 8);
                    c1121b.f14261e = 2;
                }
                V0 v03 = c1121b.f14260d;
                int i53 = c1121b.f14262f;
                ((C1123d) v03.f11784r).getClass();
                switch (i53) {
                    case 131:
                    case 136:
                    case 155:
                    case 159:
                    case 176:
                    case 179:
                    case 186:
                    case 215:
                    case 231:
                    case 238:
                    case 241:
                    case 251:
                    case 16871:
                    case 16980:
                    case 17029:
                    case 17143:
                    case 18401:
                    case 18408:
                    case 20529:
                    case 20530:
                    case 21420:
                    case 21432:
                    case 21680:
                    case 21682:
                    case 21690:
                    case 21930:
                    case 21938:
                    case 21945:
                    case 21946:
                    case 21947:
                    case 21948:
                    case 21949:
                    case 21998:
                    case 22186:
                    case 22203:
                    case 25188:
                    case 30114:
                    case 30321:
                    case 2352003:
                    case 2807729:
                        i = 2;
                        break;
                    case 134:
                    case 17026:
                    case 21358:
                    case 2274716:
                        i = 3;
                        break;
                    case 160:
                    case 166:
                    case 174:
                    case 183:
                    case 187:
                    case 224:
                    case 225:
                    case 16868:
                    case 18407:
                    case 19899:
                    case 20532:
                    case 20533:
                    case 21936:
                    case 21968:
                    case 25152:
                    case 28032:
                    case 30113:
                    case 30320:
                    case 290298740:
                    case 357149030:
                    case 374648427:
                    case 408125543:
                    case 440786851:
                    case 475249515:
                    case 524531317:
                        i = 1;
                        break;
                    case 161:
                    case 163:
                    case 165:
                    case 16877:
                    case 16981:
                    case 18402:
                    case 21419:
                    case 25506:
                    case 30322:
                        i = 4;
                        break;
                    case 181:
                    case 17545:
                    case 21969:
                    case 21970:
                    case 21971:
                    case 21972:
                    case 21973:
                    case 21974:
                    case 21975:
                    case 21976:
                    case 21977:
                    case 21978:
                    case 30323:
                    case 30324:
                    case 30325:
                        i = 5;
                        break;
                    default:
                        i = 0;
                        break;
                }
                if (i != 0) {
                    if (i != 1) {
                        c3 = 2;
                        if (i == 2) {
                            long j11 = c1121b.f14263g;
                            if (j11 > 8) {
                                throw F.a(null, "Invalid integer size: " + c1121b.f14263g);
                            }
                            c1121b.f14260d.n(c1121b.a((j) nVar, (int) j11), c1121b.f14262f);
                            z9 = false;
                            c1121b.f14261e = 0;
                        } else if (i == 3) {
                            long j12 = c1121b.f14263g;
                            if (j12 > 2147483647L) {
                                throw F.a(null, "String element size: " + c1121b.f14263g);
                            }
                            V0 v04 = c1121b.f14260d;
                            int i54 = c1121b.f14262f;
                            int i55 = (int) j12;
                            if (i55 == 0) {
                                str8 = "";
                            } else {
                                byte[] bArr12 = new byte[i55];
                                ((j) nVar).c(bArr12, 0, i55, false);
                                while (i55 > 0 && bArr12[i55 - 1] == 0) {
                                    i55--;
                                }
                                str8 = new String(bArr12, 0, i55);
                            }
                            C1123d c1123d5 = (C1123d) v04.f11784r;
                            c1123d5.getClass();
                            if (i54 == 134) {
                                c1123d5.d(i54);
                                c1123d5.f14369x.f14290c = str8;
                            } else if (i54 == 17026) {
                                if (!"webm".equals(str8) && !"matroska".equals(str8)) {
                                    throw F.a(null, "DocType " + str8 + " not supported");
                                }
                                c1123d5.f14368w = str8.equals("webm");
                            } else if (i54 == 21358) {
                                c1123d5.d(i54);
                                c1123d5.f14369x.f14289b = str8;
                            } else if (i54 == 2274716) {
                                c1123d5.d(i54);
                                c1123d5.f14369x.f14285Y = str8;
                            }
                            z9 = false;
                            c1121b.f14261e = 0;
                        } else if (i == 4) {
                            c1121b.f14260d.g(c1121b.f14262f, (int) c1121b.f14263g, (j) nVar);
                            z9 = false;
                            c1121b.f14261e = 0;
                        } else {
                            if (i != 5) {
                                throw F.a(null, "Invalid element type " + i);
                            }
                            long j13 = c1121b.f14263g;
                            if (j13 != 4 && j13 != 8) {
                                throw F.a(null, "Invalid float size: " + c1121b.f14263g);
                            }
                            V0 v05 = c1121b.f14260d;
                            int i56 = c1121b.f14262f;
                            int i57 = (int) j13;
                            double dIntBitsToFloat = i57 == 4 ? Float.intBitsToFloat((int) r10) : Double.longBitsToDouble(c1121b.a((j) nVar, i57));
                            C1123d c1123d6 = (C1123d) v05.f11784r;
                            if (i56 == 181) {
                                c1123d6.d(i56);
                                c1123d6.f14369x.f14280S = (int) dIntBitsToFloat;
                            } else if (i56 != 17545) {
                                switch (i56) {
                                    case 21969:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14268F = (float) dIntBitsToFloat;
                                        break;
                                    case 21970:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14269G = (float) dIntBitsToFloat;
                                        break;
                                    case 21971:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.H = (float) dIntBitsToFloat;
                                        break;
                                    case 21972:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14270I = (float) dIntBitsToFloat;
                                        break;
                                    case 21973:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14271J = (float) dIntBitsToFloat;
                                        break;
                                    case 21974:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14272K = (float) dIntBitsToFloat;
                                        break;
                                    case 21975:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14273L = (float) dIntBitsToFloat;
                                        break;
                                    case 21976:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14274M = (float) dIntBitsToFloat;
                                        break;
                                    case 21977:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14275N = (float) dIntBitsToFloat;
                                        break;
                                    case 21978:
                                        c1123d6.d(i56);
                                        c1123d6.f14369x.f14276O = (float) dIntBitsToFloat;
                                        break;
                                    default:
                                        switch (i56) {
                                            case 30323:
                                                c1123d6.d(i56);
                                                c1123d6.f14369x.f14307u = (float) dIntBitsToFloat;
                                                break;
                                            case 30324:
                                                c1123d6.d(i56);
                                                c1123d6.f14369x.f14308v = (float) dIntBitsToFloat;
                                                break;
                                            case 30325:
                                                c1123d6.d(i56);
                                                c1123d6.f14369x.f14309w = (float) dIntBitsToFloat;
                                                break;
                                            default:
                                                c1123d6.getClass();
                                                break;
                                        }
                                        break;
                                }
                            } else {
                                c1123d6.f14366u = (long) dIntBitsToFloat;
                            }
                            z9 = false;
                            c1121b.f14261e = 0;
                        }
                    } else {
                        c3 = 2;
                        long j14 = ((j) nVar).f6428t;
                        arrayDeque.push(new C1120a(c1121b.f14263g + j14, c1121b.f14262f));
                        c1121b.f14260d.v(c1121b.f14262f, j14, c1121b.f14263g);
                        z9 = false;
                        c1121b.f14261e = 0;
                    }
                    z14 = true;
                } else {
                    ((j) nVar).b((int) c1121b.f14263g);
                    c1121b.f14261e = 0;
                    str24 = str4;
                    str21 = str3;
                    str22 = str2;
                    str23 = str;
                    c13 = 2;
                    str20 = str7;
                    str18 = str6;
                    str19 = str5;
                    z13 = false;
                }
            }
            if (z14) {
                long jQ = ((j) nVar).q();
                c1123d = this;
                if (c1123d.f14320B) {
                    c1123d.D = jQ;
                    hVar.f4006a = c1123d.f14321C;
                    c1123d.f14320B = z9;
                    return 1;
                }
                if (c1123d.f14370y) {
                    long j15 = c1123d.D;
                    if (j15 != -1) {
                        hVar.f4006a = j15;
                        c1123d.D = -1L;
                        return 1;
                    }
                } else {
                    continue;
                }
            } else {
                c1123d = this;
            }
            c1123d3 = c1123d;
            str24 = str4;
            str21 = str3;
            str22 = str2;
            str23 = str;
            c13 = c3;
            str20 = str7;
            str18 = str6;
            str19 = str5;
            z13 = false;
        }
        C1123d c1123d7 = c1123d3;
        if (z14) {
            return 0;
        }
        int i58 = 0;
        while (true) {
            SparseArray sparseArray2 = c1123d7.f14346c;
            if (i58 >= sparseArray2.size()) {
                return -1;
            }
            C1122c c1122c5 = (C1122c) sparseArray2.valueAt(i58);
            c1122c5.f14286Z.getClass();
            G g8 = c1122c5.f14283V;
            if (g8 != null) {
                g8.a(c1122c5.f14286Z, c1122c5.f14297k);
            }
            i58++;
        }
    }

    @Override // T0.m
    public final boolean f(n nVar) throws EOFException, InterruptedIOException {
        B7.a aVar = new B7.a(6, (byte) 0);
        j jVar = (j) nVar;
        long j8 = jVar.f6427s;
        long j9 = 1024;
        if (j8 != -1 && j8 <= 1024) {
            j9 = j8;
        }
        int i = (int) j9;
        x0.o oVar = (x0.o) aVar.f1040s;
        jVar.f(oVar.f18539a, 0, 4, false);
        long jV = oVar.v();
        aVar.f1039r = 4;
        while (true) {
            if (jV != 440786851) {
                int i5 = aVar.f1039r + 1;
                aVar.f1039r = i5;
                if (i5 == i) {
                    break;
                }
                jVar.f(oVar.f18539a, 0, 1, false);
                jV = ((jV << 8) & (-256)) | ((long) (oVar.f18539a[0] & 255));
            } else {
                long jQ = aVar.q(jVar);
                long j10 = aVar.f1039r;
                if (jQ != Long.MIN_VALUE && (j8 == -1 || j10 + jQ < j8)) {
                    while (true) {
                        long j11 = aVar.f1039r;
                        long j12 = j10 + jQ;
                        if (j11 < j12) {
                            if (aVar.q(jVar) == Long.MIN_VALUE) {
                                break;
                            }
                            long jQ2 = aVar.q(jVar);
                            if (jQ2 < 0 || jQ2 > 2147483647L) {
                                break;
                            }
                            if (jQ2 != 0) {
                                int i8 = (int) jQ2;
                                jVar.h(i8, false);
                                aVar.f1039r += i8;
                            }
                        } else if (j11 == j12) {
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }

    /* JADX WARN: Removed duplicated region for block: B:49:0x00d4  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void g(C1122c c1122c, long j8, int i, int i5, int i8) {
        byte[] bArrH;
        int i9;
        int i10;
        G g8 = c1122c.f14283V;
        if (g8 != null) {
            g8.b(c1122c.f14286Z, j8, i, i5, i8, c1122c.f14297k);
        } else if ("S_TEXT/UTF8".equals(c1122c.f14290c) || "S_TEXT/ASS".equals(c1122c.f14290c) || "S_TEXT/WEBVTT".equals(c1122c.f14290c)) {
            if (this.f14330N > 1) {
                AbstractC1709a.B("MatroskaExtractor", "Skipping subtitle sample in laced block.");
            } else {
                long j9 = this.f14328L;
                if (j9 == -9223372036854775807L) {
                    AbstractC1709a.B("MatroskaExtractor", "Skipping subtitle sample with no duration.");
                } else {
                    String str = c1122c.f14290c;
                    x0.o oVar = this.f14358m;
                    byte[] bArr = oVar.f18539a;
                    str.getClass();
                    switch (str) {
                        case "S_TEXT/ASS":
                            bArrH = h(j9, "%01d:%02d:%02d:%02d", 10000L);
                            i9 = 21;
                            break;
                        case "S_TEXT/WEBVTT":
                            bArrH = h(j9, "%02d:%02d:%02d.%03d", 1000L);
                            i9 = 25;
                            break;
                        case "S_TEXT/UTF8":
                            bArrH = h(j9, "%02d:%02d:%02d,%03d", 1000L);
                            i9 = 19;
                            break;
                        default:
                            throw new IllegalArgumentException();
                    }
                    System.arraycopy(bArrH, 0, bArr, i9, bArrH.length);
                    int i11 = oVar.f18540b;
                    while (true) {
                        if (i11 < oVar.f18541c) {
                            if (oVar.f18539a[i11] == 0) {
                                oVar.E(i11);
                            } else {
                                i11++;
                            }
                        }
                    }
                    c1122c.f14286Z.c(oVar.f18541c, oVar);
                    i10 = i5 + oVar.f18541c;
                    if ((i & 268435456) != 0) {
                        int i12 = this.f14330N;
                        x0.o oVar2 = this.f14361p;
                        if (i12 > 1) {
                            oVar2.C(0);
                        } else {
                            int i13 = oVar2.f18541c;
                            c1122c.f14286Z.b(oVar2, i13, 2);
                            i10 += i13;
                        }
                    }
                    c1122c.f14286Z.a(j8, i, i10, i8, c1122c.f14297k);
                }
            }
            i10 = i5;
            if ((i & 268435456) != 0) {
            }
            c1122c.f14286Z.a(j8, i, i10, i8, c1122c.f14297k);
        } else {
            i10 = i5;
            if ((i & 268435456) != 0) {
            }
            c1122c.f14286Z.a(j8, i, i10, i8, c1122c.f14297k);
        }
        this.f14325I = true;
    }

    @Override // T0.m
    public final void i(long j8, long j9) {
        this.f14322E = -9223372036854775807L;
        this.f14326J = 0;
        C1121b c1121b = this.f14342a;
        c1121b.f14261e = 0;
        c1121b.f14258b.clear();
        C1124e c1124e = c1121b.f14259c;
        c1124e.f14374b = 0;
        c1124e.f14375c = 0;
        C1124e c1124e2 = this.f14344b;
        c1124e2.f14374b = 0;
        c1124e2.f14375c = 0;
        k();
        int i = 0;
        while (true) {
            SparseArray sparseArray = this.f14346c;
            if (i >= sparseArray.size()) {
                return;
            }
            G g8 = ((C1122c) sparseArray.valueAt(i)).f14283V;
            if (g8 != null) {
                g8.f6352b = false;
                g8.f6353c = 0;
            }
            i++;
        }
    }

    public final void j(j jVar, int i) {
        x0.o oVar = this.i;
        if (oVar.f18541c >= i) {
            return;
        }
        byte[] bArr = oVar.f18539a;
        if (bArr.length < i) {
            oVar.b(Math.max(bArr.length * 2, i));
        }
        byte[] bArr2 = oVar.f18539a;
        int i5 = oVar.f18541c;
        jVar.c(bArr2, i5, i - i5, false);
        oVar.E(i);
    }

    public final void k() {
        this.f14338V = 0;
        this.f14339W = 0;
        this.X = 0;
        this.f14340Y = false;
        this.f14341Z = false;
        this.f14343a0 = false;
        this.f14345b0 = 0;
        this.f14347c0 = (byte) 0;
        this.f14349d0 = false;
        this.f14357l.C(0);
    }

    @Override // T0.m
    public final void l(o oVar) {
        if (this.f14350e) {
            oVar = new C0016c(oVar, this.f14352f);
        }
        this.f14351e0 = oVar;
    }

    @Override // T0.m
    public final List m() {
        C3.E e8 = C3.G.f1197r;
        return W.f1225u;
    }

    public final long n(long j8) throws F {
        long j9 = this.f14365t;
        if (j9 == -9223372036854775807L) {
            throw F.a(null, "Can't scale timecode prior to timecodeScale being set.");
        }
        int i = v.f18553a;
        return v.S(j8, j9, 1000L, RoundingMode.DOWN);
    }

    public final int o(j jVar, C1122c c1122c, int i, boolean z8) throws F, EOFException, InterruptedIOException {
        int iF;
        int iF2;
        int i5;
        if ("S_TEXT/UTF8".equals(c1122c.f14290c)) {
            p(jVar, f14313f0, i);
            int i8 = this.f14339W;
            k();
            return i8;
        }
        if ("S_TEXT/ASS".equals(c1122c.f14290c)) {
            p(jVar, f14315h0, i);
            int i9 = this.f14339W;
            k();
            return i9;
        }
        if ("S_TEXT/WEBVTT".equals(c1122c.f14290c)) {
            p(jVar, f14316i0, i);
            int i10 = this.f14339W;
            k();
            return i10;
        }
        T0.F f3 = c1122c.f14286Z;
        boolean z9 = this.f14340Y;
        x0.o oVar = this.f14357l;
        if (!z9) {
            boolean z10 = c1122c.i;
            x0.o oVar2 = this.i;
            if (z10) {
                this.f14334R &= -1073741825;
                if (!this.f14341Z) {
                    jVar.c(oVar2.f18539a, 0, 1, false);
                    this.f14338V++;
                    byte b8 = oVar2.f18539a[0];
                    if ((b8 & 128) == 128) {
                        throw F.a(null, "Extension bit is set in signal byte");
                    }
                    this.f14347c0 = b8;
                    this.f14341Z = true;
                }
                byte b9 = this.f14347c0;
                if ((b9 & 1) == 1) {
                    boolean z11 = (b9 & 2) == 2;
                    this.f14334R |= 1073741824;
                    if (!this.f14349d0) {
                        x0.o oVar3 = this.f14359n;
                        jVar.c(oVar3.f18539a, 0, 8, false);
                        this.f14338V += 8;
                        this.f14349d0 = true;
                        oVar2.f18539a[0] = (byte) ((z11 ? 128 : 0) | 8);
                        oVar2.F(0);
                        f3.b(oVar2, 1, 1);
                        this.f14339W++;
                        oVar3.F(0);
                        f3.b(oVar3, 8, 1);
                        this.f14339W += 8;
                    }
                    if (z11) {
                        if (!this.f14343a0) {
                            jVar.c(oVar2.f18539a, 0, 1, false);
                            this.f14338V++;
                            oVar2.F(0);
                            this.f14345b0 = oVar2.t();
                            this.f14343a0 = true;
                        }
                        int i11 = this.f14345b0 * 4;
                        oVar2.C(i11);
                        jVar.c(oVar2.f18539a, 0, i11, false);
                        this.f14338V += i11;
                        short s8 = (short) ((this.f14345b0 / 2) + 1);
                        int i12 = (s8 * 6) + 2;
                        ByteBuffer byteBuffer = this.f14362q;
                        if (byteBuffer == null || byteBuffer.capacity() < i12) {
                            this.f14362q = ByteBuffer.allocate(i12);
                        }
                        this.f14362q.position(0);
                        this.f14362q.putShort(s8);
                        int i13 = 0;
                        int i14 = 0;
                        while (true) {
                            i5 = this.f14345b0;
                            if (i13 >= i5) {
                                break;
                            }
                            int iX = oVar2.x();
                            if (i13 % 2 == 0) {
                                this.f14362q.putShort((short) (iX - i14));
                            } else {
                                this.f14362q.putInt(iX - i14);
                            }
                            i13++;
                            i14 = iX;
                        }
                        int i15 = (i - this.f14338V) - i14;
                        if (i5 % 2 == 1) {
                            this.f14362q.putInt(i15);
                        } else {
                            this.f14362q.putShort((short) i15);
                            this.f14362q.putInt(0);
                        }
                        byte[] bArrArray = this.f14362q.array();
                        x0.o oVar4 = this.f14360o;
                        oVar4.D(i12, bArrArray);
                        f3.b(oVar4, i12, 1);
                        this.f14339W += i12;
                    }
                }
            } else {
                byte[] bArr = c1122c.f14296j;
                if (bArr != null) {
                    oVar.D(bArr.length, bArr);
                }
            }
            if ("A_OPUS".equals(c1122c.f14290c) ? z8 : c1122c.f14294g > 0) {
                this.f14334R |= 268435456;
                this.f14361p.C(0);
                int i16 = (oVar.f18541c + i) - this.f14338V;
                oVar2.C(4);
                byte[] bArr2 = oVar2.f18539a;
                bArr2[0] = (byte) ((i16 >> 24) & 255);
                bArr2[1] = (byte) ((i16 >> 16) & 255);
                bArr2[2] = (byte) ((i16 >> 8) & 255);
                bArr2[3] = (byte) (i16 & 255);
                f3.b(oVar2, 4, 2);
                this.f14339W += 4;
            }
            this.f14340Y = true;
        }
        int i17 = i + oVar.f18541c;
        if (!"V_MPEG4/ISO/AVC".equals(c1122c.f14290c) && !"V_MPEGH/ISO/HEVC".equals(c1122c.f14290c)) {
            if (c1122c.f14283V != null) {
                AbstractC1709a.j(oVar.f18541c == 0);
                c1122c.f14283V.c(jVar);
            }
            while (true) {
                int i18 = this.f14338V;
                if (i18 >= i17) {
                    break;
                }
                int i19 = i17 - i18;
                int iA = oVar.a();
                if (iA > 0) {
                    iF2 = Math.min(i19, iA);
                    f3.c(iF2, oVar);
                } else {
                    iF2 = f3.f(jVar, i19, false);
                }
                this.f14338V += iF2;
                this.f14339W += iF2;
            }
        } else {
            x0.o oVar5 = this.f14354h;
            byte[] bArr3 = oVar5.f18539a;
            bArr3[0] = 0;
            bArr3[1] = 0;
            bArr3[2] = 0;
            int i20 = c1122c.f14288a0;
            int i21 = 4 - i20;
            while (this.f14338V < i17) {
                int i22 = this.X;
                if (i22 == 0) {
                    int iMin = Math.min(i20, oVar.a());
                    jVar.c(bArr3, i21 + iMin, i20 - iMin, false);
                    if (iMin > 0) {
                        oVar.e(bArr3, i21, iMin);
                    }
                    this.f14338V += i20;
                    oVar5.F(0);
                    this.X = oVar5.x();
                    x0.o oVar6 = this.f14353g;
                    oVar6.F(0);
                    f3.c(4, oVar6);
                    this.f14339W += 4;
                } else {
                    int iA2 = oVar.a();
                    if (iA2 > 0) {
                        iF = Math.min(i22, iA2);
                        f3.c(iF, oVar);
                    } else {
                        iF = f3.f(jVar, i22, false);
                    }
                    this.f14338V += iF;
                    this.f14339W += iF;
                    this.X -= iF;
                }
            }
        }
        if ("A_VORBIS".equals(c1122c.f14290c)) {
            x0.o oVar7 = this.f14355j;
            oVar7.F(0);
            f3.c(4, oVar7);
            this.f14339W += 4;
        }
        int i23 = this.f14339W;
        k();
        return i23;
    }

    public final void p(j jVar, byte[] bArr, int i) throws EOFException, InterruptedIOException {
        int length = bArr.length + i;
        x0.o oVar = this.f14358m;
        byte[] bArr2 = oVar.f18539a;
        if (bArr2.length < length) {
            byte[] bArrCopyOf = Arrays.copyOf(bArr, length + i);
            oVar.D(bArrCopyOf.length, bArrCopyOf);
        } else {
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
        }
        jVar.c(oVar.f18539a, bArr.length, i, false);
        oVar.F(0);
        oVar.E(length);
    }

    @Override // T0.m
    public final void a() {
    }
}
