package defpackage;

import android.util.Pair;
import android.util.SparseArray;
import androidx.media3.common.ParserException;
import j$.util.DesugarCollections;
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;

/* JADX INFO: renamed from: ᵜᵸ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2889 implements InterfaceC4291 {

    /* JADX INFO: renamed from: ˆʤᵳ, reason: contains not printable characters */
    public static final byte[] f11014;

    /* JADX INFO: renamed from: ˏʜᵪ, reason: contains not printable characters */
    public static final byte[] f11015;

    /* JADX INFO: renamed from: ᵘᵝ, reason: contains not printable characters */
    public static final byte[] f11016;

    /* JADX INFO: renamed from: ᵬᵦˋ, reason: contains not printable characters */
    public static final byte[] f11017 = {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: ᵮᵟᵡ, reason: contains not printable characters */
    public static final Map f11018;

    /* JADX INFO: renamed from: ᵹʾᵢᵯ, reason: contains not printable characters */
    public static final UUID f11019;

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C2722 f11020;

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public long f11021;

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public int f11022;

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public boolean f11023;

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public int f11024;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public boolean f11025;

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public int f11026;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public int f11027;

    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    public boolean f11028;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public long f11029;

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public long f11030;

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public int f11031;

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public long f11032;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public long f11033;

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public int[] f11034;

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public long f11035;

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public long f11036;

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public long f11037;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final C4545 f11038;

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public long f11039;

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public int f11040;

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final C4545 f11041;

    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    public boolean f11042;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public long f11043;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final SparseArray f11044;

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public long f11045;

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public int f11046;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final SparseArray f11047;

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public int f11048;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public int f11049;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public long f11050;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public boolean f11051;

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public byte f11052;

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public int f11053;

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public long f11054;

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public boolean f11055;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public boolean f11056;

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final C4545 f11057;

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public int f11058;

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final C4545 f11059;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public long f11060;

    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public long f11061;

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public int f11062;

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public int f11063;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final boolean f11064;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public C1140 f11065;

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final C4545 f11066;

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public boolean f11067;

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final C4545 f11068;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public boolean f11069;

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public ByteBuffer f11070;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final C4545 f11071;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C3436 f11072;

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public boolean f11073;

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public InterfaceC4550 f11074;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final C4545 f11075;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public int f11076;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final C4545 f11077;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final boolean f11078;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public boolean f11079;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final C4545 f11080;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final InterfaceC1471 f11081;

    static {
        String str = AbstractC0956.f4222;
        f11015 = "Format: Start, End, ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text".getBytes(StandardCharsets.UTF_8);
        f11016 = 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};
        f11014 = 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};
        f11019 = new UUID(72057594037932032L, -9223371306706625679L);
        HashMap map = new HashMap();
        AbstractC3653.m8229(0, map, "htc_video_rotA-000", 90, "htc_video_rotA-090");
        AbstractC3653.m8229(180, map, "htc_video_rotA-180", 270, "htc_video_rotA-270");
        f11018 = DesugarCollections.unmodifiableMap(map);
    }

    public C2889(InterfaceC1471 interfaceC1471, int i) {
        C3436 c3436 = new C3436();
        this.f11032 = -1L;
        this.f11045 = -9223372036854775807L;
        this.f11037 = -9223372036854775807L;
        this.f11043 = -9223372036854775807L;
        this.f11050 = -9223372036854775807L;
        this.f11022 = -1;
        this.f11060 = -1L;
        this.f11033 = -1L;
        this.f11027 = -1;
        this.f11039 = -1L;
        this.f11036 = -1L;
        this.f11054 = -9223372036854775807L;
        this.f11072 = c3436;
        c3436.f13262 = new ˈᵷᵵᵞ(3, this);
        this.f11081 = interfaceC1471;
        this.f11044 = new SparseArray();
        this.f11078 = (i & 1) == 0;
        this.f11064 = (i & 2) == 0;
        this.f11020 = new C2722();
        this.f11047 = new SparseArray();
        this.f11080 = new C4545(4);
        this.f11071 = new C4545(ByteBuffer.allocate(4).putInt(-1).array());
        this.f11077 = new C4545(4);
        this.f11075 = new C4545(ᵥˇᵛˎ.ːˏᵟᵯ);
        this.f11038 = new C4545(4);
        this.f11068 = new C4545();
        this.f11057 = new C4545();
        this.f11041 = new C4545(8);
        this.f11066 = new C4545();
        this.f11059 = new C4545();
        this.f11034 = new int[1];
        this.f11051 = true;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public static byte[] m6863(long j, long j2, String str) {
        ᵻᵪ.ᵱᵽʡᵚ(j != -9223372036854775807L);
        int i = (int) (j / 3600000000L);
        long j3 = j - (((long) i) * 3600000000L);
        int i2 = (int) (j3 / 60000000);
        long j4 = j3 - (((long) i2) * 60000000);
        int i3 = (int) (j4 / 1000000);
        String str2 = String.format(Locale.US, str, Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf((int) ((j4 - (((long) i3) * 1000000)) / j2)));
        String str3 = AbstractC0956.f4222;
        return str2.getBytes(StandardCharsets.UTF_8);
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo1252(long j, long j2) {
        this.f11054 = -9223372036854775807L;
        this.f11049 = 0;
        C3436 c3436 = this.f11072;
        c3436.f13259 = 0;
        c3436.f13257.clear();
        C2722 c2722 = c3436.f13258;
        c2722.f10437 = 0;
        c2722.f10435 = 0;
        C2722 c27222 = this.f11020;
        c27222.f10437 = 0;
        c27222.f10435 = 0;
        m6865();
        this.f11079 = false;
        this.f11050 = -9223372036854775807L;
        this.f11022 = -1;
        this.f11060 = -1L;
        this.f11033 = -1L;
        if (!this.f11069) {
            this.f11044.clear();
        }
        int i = 0;
        while (true) {
            SparseArray sparseArray = this.f11047;
            if (i >= sparseArray.size()) {
                return;
            }
            C0246 c0246 = ((C1140) sparseArray.valueAt(i)).f4856;
            if (c0246 != null) {
                c0246.f1811 = false;
                c0246.f1812 = 0;
            }
            i++;
        }
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final void m6864(int i) throws ParserException {
        if (this.f11079) {
            return;
        }
        throw ParserException.m357("Element " + i + " must be in a Cues", null);
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void m6865() {
        this.f11062 = 0;
        this.f11040 = 0;
        this.f11031 = 0;
        this.f11028 = false;
        this.f11042 = false;
        this.f11055 = false;
        this.f11048 = 0;
        this.f11052 = (byte) 0;
        this.f11067 = false;
        this.f11068.m9603(0);
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final InterfaceC4291 mo1254() {
        return this;
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final void m6866(InterfaceC5206 interfaceC5206, int i) {
        C4545 c4545 = this.f11080;
        if (c4545.f17283 >= i) {
            return;
        }
        byte[] bArr = c4545.f17284;
        if (bArr.length < i) {
            c4545.m9608(Math.max(bArr.length * 2, i));
        }
        byte[] bArr2 = c4545.f17284;
        int i2 = c4545.f17283;
        interfaceC5206.readFully(bArr2, i2, i - i2);
        c4545.m9612(i);
    }

    /* JADX WARN: Removed duplicated region for block: B:80:0x01df  */
    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m6867(InterfaceC5206 interfaceC5206, C1140 c1140, int i, boolean z) throws ParserException {
        int iMo1744;
        int iMo17442;
        int i2;
        int i3;
        if ("S_TEXT/UTF8".equals(c1140.f4877)) {
            m6870(interfaceC5206, f11017, i);
            int i4 = this.f11040;
            m6865();
            return i4;
        }
        if ("S_TEXT/ASS".equals(c1140.f4877) || "S_TEXT/SSA".equals(c1140.f4877)) {
            m6870(interfaceC5206, f11016, i);
            int i5 = this.f11040;
            m6865();
            return i5;
        }
        if ("S_TEXT/WEBVTT".equals(c1140.f4877)) {
            m6870(interfaceC5206, f11014, i);
            int i6 = this.f11040;
            m6865();
            return i6;
        }
        int i7 = 2;
        if (c1140.f4876) {
            c1140.f4871.getClass();
            C4545 c4545 = new C4545(i);
            if (interfaceC5206.mo4708(c4545.f17284, 0, i, true)) {
                interfaceC5206.mo4698();
                if (ᵸᵺᵜ.ᵱʡˏ(c4545.m9629()) == 1 && c4545.m9623() >= 10) {
                    byte[] bArr = new byte[10];
                    c4545.m9627(bArr, 0, 10);
                    c4545.m9624(0);
                    int i8 = ᵸᵺᵜ.ᵪᵹᵥᵻ(bArr);
                    if (i8 > 0 && c4545.m9623() >= i8 + 4) {
                        c4545.m9609(i8);
                        if (ᵸᵺᵜ.ᵱʡˏ(c4545.m9614()) == 2) {
                            C4753 c4753M10878 = c1140.f4871.m10878();
                            c4753M10878.f18101 = AbstractC4208.m9132("audio/vnd.dts.hd");
                            c1140.f4871 = new C5286(c4753M10878);
                        }
                    }
                }
            }
            c1140.f4889.mo1742(c1140.f4871);
            c1140.f4876 = false;
            m6869();
        }
        InterfaceC5226 interfaceC5226 = c1140.f4889;
        boolean z2 = this.f11028;
        C4545 c45452 = this.f11068;
        if (!z2) {
            boolean z3 = c1140.f4905;
            C4545 c45453 = this.f11080;
            if (z3) {
                this.f11046 &= -1073741825;
                if (!this.f11042) {
                    interfaceC5206.readFully(c45453.f17284, 0, 1);
                    this.f11062++;
                    byte b = c45453.f17284[0];
                    if ((b & 128) == 128) {
                        throw ParserException.m357("Extension bit is set in signal byte", null);
                    }
                    this.f11052 = b;
                    this.f11042 = true;
                }
                byte b2 = this.f11052;
                if ((b2 & 1) != 1) {
                    i2 = 2;
                } else {
                    boolean z4 = (b2 & 2) == 2;
                    this.f11046 |= 1073741824;
                    if (!this.f11067) {
                        C4545 c45454 = this.f11041;
                        interfaceC5206.readFully(c45454.f17284, 0, 8);
                        this.f11062 += 8;
                        this.f11067 = true;
                        c45453.f17284[0] = (byte) ((z4 ? 128 : 0) | 8);
                        c45453.m9624(0);
                        interfaceC5226.mo1738(c45453, 1, 1);
                        this.f11040++;
                        c45454.m9624(0);
                        interfaceC5226.mo1738(c45454, 8, 1);
                        this.f11040 += 8;
                    }
                    if (z4) {
                        if (!this.f11055) {
                            interfaceC5206.readFully(c45453.f17284, 0, 1);
                            this.f11062++;
                            c45453.m9624(0);
                            this.f11048 = c45453.m9626();
                            this.f11055 = true;
                        }
                        int i9 = this.f11048 * 4;
                        c45453.m9603(i9);
                        interfaceC5206.readFully(c45453.f17284, 0, i9);
                        this.f11062 += i9;
                        short s = (short) ((this.f11048 / 2) + 1);
                        int i10 = (s * 6) + 2;
                        ByteBuffer byteBuffer = this.f11070;
                        if (byteBuffer == null || byteBuffer.capacity() < i10) {
                            this.f11070 = ByteBuffer.allocate(i10);
                        }
                        this.f11070.position(0);
                        this.f11070.putShort(s);
                        int i11 = 0;
                        int i12 = 0;
                        while (true) {
                            i3 = this.f11048;
                            if (i11 >= i3) {
                                break;
                            }
                            int iM9610 = c45453.m9610();
                            int i13 = i11 % 2;
                            int i14 = i7;
                            ByteBuffer byteBuffer2 = this.f11070;
                            if (i13 == 0) {
                                byteBuffer2.putShort((short) (iM9610 - i12));
                            } else {
                                byteBuffer2.putInt(iM9610 - i12);
                            }
                            i11++;
                            i12 = iM9610;
                            i7 = i14;
                        }
                        i2 = i7;
                        int i15 = (i - this.f11062) - i12;
                        int i16 = i3 % 2;
                        ByteBuffer byteBuffer3 = this.f11070;
                        if (i16 == 1) {
                            byteBuffer3.putInt(i15);
                        } else {
                            byteBuffer3.putShort((short) i15);
                            this.f11070.putInt(0);
                        }
                        byte[] bArrArray = this.f11070.array();
                        C4545 c45455 = this.f11066;
                        c45455.m9600(i10, bArrArray);
                        interfaceC5226.mo1738(c45455, i10, 1);
                        this.f11040 += i10;
                    }
                }
            } else {
                i2 = 2;
                byte[] bArr2 = c1140.f4897;
                if (bArr2 != null) {
                    c45452.m9600(bArr2.length, bArr2);
                }
            }
            if ("A_OPUS".equals(c1140.f4877) ? z : c1140.f4900 > 0) {
                this.f11046 |= 268435456;
                this.f11059.m9603(0);
                int i17 = (c45452.f17283 + i) - this.f11062;
                c45453.m9603(4);
                byte[] bArr3 = c45453.f17284;
                bArr3[0] = (byte) ((i17 >> 24) & 255);
                bArr3[1] = (byte) ((i17 >> 16) & 255);
                bArr3[i2] = (byte) ((i17 >> 8) & 255);
                bArr3[3] = (byte) (i17 & 255);
                interfaceC5226.mo1738(c45453, 4, i2);
                this.f11040 += 4;
            }
            this.f11028 = true;
        }
        int i18 = i + c45452.f17283;
        if (!"V_MPEG4/ISO/AVC".equals(c1140.f4877) && !"V_MPEGH/ISO/HEVC".equals(c1140.f4877)) {
            if (c1140.f4856 != null) {
                ᵻᵪ.ˌᴵ(c45452.f17283 == 0);
                c1140.f4856.m1461(interfaceC5206);
            }
            while (true) {
                int i19 = this.f11062;
                if (i19 >= i18) {
                    break;
                }
                int i20 = i18 - i19;
                int iM9623 = c45452.m9623();
                if (iM9623 > 0) {
                    iMo17442 = Math.min(i20, iM9623);
                    interfaceC5226.mo1740(iMo17442, c45452);
                } else {
                    iMo17442 = interfaceC5226.mo1744(interfaceC5206, i20, false);
                }
                this.f11062 += iMo17442;
                this.f11040 += iMo17442;
            }
        } else {
            C4545 c45456 = this.f11038;
            byte[] bArr4 = c45456.f17284;
            bArr4[0] = 0;
            bArr4[1] = 0;
            bArr4[2] = 0;
            int i21 = c1140.f4862;
            int i22 = 4 - i21;
            while (this.f11062 < i18) {
                int i23 = this.f11031;
                if (i23 == 0) {
                    int iMin = Math.min(i21, c45452.m9623());
                    interfaceC5206.readFully(bArr4, i22 + iMin, i21 - iMin);
                    if (iMin > 0) {
                        c45452.m9627(bArr4, i22, iMin);
                    }
                    this.f11062 += i21;
                    c45456.m9624(0);
                    this.f11031 = c45456.m9610();
                    C4545 c45457 = this.f11075;
                    c45457.m9624(0);
                    interfaceC5226.mo1740(4, c45457);
                    this.f11040 += 4;
                } else {
                    int iM96232 = c45452.m9623();
                    if (iM96232 > 0) {
                        iMo1744 = Math.min(i23, iM96232);
                        interfaceC5226.mo1740(iMo1744, c45452);
                    } else {
                        iMo1744 = interfaceC5226.mo1744(interfaceC5206, i23, false);
                    }
                    this.f11062 += iMo1744;
                    this.f11040 += iMo1744;
                    this.f11031 -= iMo1744;
                }
            }
        }
        if ("A_VORBIS".equals(c1140.f4877)) {
            C4545 c45458 = this.f11071;
            c45458.m9624(0);
            interfaceC5226.mo1740(4, c45458);
            this.f11040 += 4;
        }
        int i24 = this.f11040;
        m6865();
        return i24;
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵨᵣ */
    public final boolean mo1255(InterfaceC5206 interfaceC5206) throws EOFException, InterruptedIOException {
        C1785 c1785 = new C1785((byte) 0, 12);
        C4545 c4545 = (C4545) c1785.f7162;
        C2373 c2373 = (C2373) interfaceC5206;
        long j = c2373.f9288;
        long j2 = 1024;
        if (j != -1 && j <= 1024) {
            j2 = j;
        }
        int i = (int) j2;
        c2373.mo4708(c4545.f17284, 0, 4, false);
        long jM9606 = c4545.m9606();
        c1785.f7163 = 4;
        while (true) {
            if (jM9606 != 440786851) {
                int i2 = c1785.f7163 + 1;
                c1785.f7163 = i2;
                if (i2 == i) {
                    break;
                }
                c2373.mo4708(c4545.f17284, 0, 1, false);
                jM9606 = ((long) (c4545.f17284[0] & 255)) | ((jM9606 << 8) & (-256));
            } else {
                long jM4923 = c1785.m4923(c2373);
                long j3 = c1785.f7163;
                if (jM4923 != Long.MIN_VALUE && (j == -1 || j3 + jM4923 < j)) {
                    while (true) {
                        long j4 = c1785.f7163;
                        long j5 = j3 + jM4923;
                        if (j4 < j5) {
                            if (c1785.m4923(c2373) == Long.MIN_VALUE) {
                                break;
                            }
                            long jM49232 = c1785.m4923(c2373);
                            if (jM49232 < 0 || jM49232 > 2147483647L) {
                                break;
                            }
                            if (jM49232 != 0) {
                                int i3 = (int) jM49232;
                                c2373.m6055(i3, false);
                                c1785.f7163 += i3;
                            }
                        } else if (j4 == j5) {
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final long m6868(long j) throws ParserException {
        long j2 = this.f11045;
        if (j2 == -9223372036854775807L) {
            throw ParserException.m357("Can't scale timecode prior to timecodeScale being set.", null);
        }
        String str = AbstractC0956.f4222;
        return AbstractC0956.m3218(j, j2, 1000L, RoundingMode.DOWN);
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final void m6869() {
        if (!this.f11051) {
            return;
        }
        int i = 0;
        while (true) {
            SparseArray sparseArray = this.f11047;
            if (i >= sparseArray.size()) {
                InterfaceC4550 interfaceC4550 = this.f11074;
                interfaceC4550.getClass();
                interfaceC4550.mo2740();
                this.f11051 = false;
                return;
            }
            if (((C1140) sparseArray.valueAt(i)).f4876) {
                return;
            } else {
                i++;
            }
        }
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public final void m6870(InterfaceC5206 interfaceC5206, byte[] bArr, int i) {
        int length = bArr.length + i;
        C4545 c4545 = this.f11057;
        byte[] bArr2 = c4545.f17284;
        if (bArr2.length < length) {
            byte[] bArrCopyOf = Arrays.copyOf(bArr, length + i);
            c4545.getClass();
            c4545.m9600(bArrCopyOf.length, bArrCopyOf);
        } else {
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
        }
        interfaceC5206.readFully(c4545.f17284, bArr.length, i);
        c4545.m9624(0);
        c4545.m9612(length);
    }

    /* JADX WARN: Removed duplicated region for block: B:56:0x00e6  */
    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6871(C1140 c1140, long j, int i, int i2, int i3) {
        byte[] bArrM6863;
        int i4;
        int i5;
        C0246 c0246 = c1140.f4856;
        if (c0246 != null) {
            c0246.m1460(c1140.f4889, j, i, i2, i3, c1140.f4902);
        } else if ("S_TEXT/UTF8".equals(c1140.f4877) || "S_TEXT/ASS".equals(c1140.f4877) || "S_TEXT/SSA".equals(c1140.f4877) || "S_TEXT/WEBVTT".equals(c1140.f4877)) {
            if (this.f11058 > 1) {
                ˋˀᵧ.ʿٴˇ("Skipping subtitle sample in laced block.");
            } else {
                long j2 = this.f11030;
                if (j2 == -9223372036854775807L) {
                    ˋˀᵧ.ʿٴˇ("Skipping subtitle sample with no duration.");
                } else {
                    String str = c1140.f4877;
                    C4545 c4545 = this.f11057;
                    byte[] bArr = c4545.f17284;
                    str.getClass();
                    switch (str) {
                        case "S_TEXT/ASS":
                        case "S_TEXT/SSA":
                            bArrM6863 = m6863(j2, 10000L, "%01d:%02d:%02d:%02d");
                            i4 = 21;
                            break;
                        case "S_TEXT/WEBVTT":
                            bArrM6863 = m6863(j2, 1000L, "%02d:%02d:%02d.%03d");
                            i4 = 25;
                            break;
                        case "S_TEXT/UTF8":
                            bArrM6863 = m6863(j2, 1000L, "%02d:%02d:%02d,%03d");
                            i4 = 19;
                            break;
                        default:
                            ᵷᵝˎ.ᵷᵺʾᵖ();
                            return;
                    }
                    System.arraycopy(bArrM6863, 0, bArr, i4, bArrM6863.length);
                    int i6 = c4545.f17282;
                    while (true) {
                        if (i6 < c4545.f17283) {
                            if (c4545.f17284[i6] == 0) {
                                c4545.m9612(i6);
                            } else {
                                i6++;
                            }
                        }
                    }
                    c1140.f4889.mo1740(c4545.f17283, c4545);
                    i5 = i2 + c4545.f17283;
                    if ((i & 268435456) != 0) {
                        int i7 = this.f11058;
                        C4545 c45452 = this.f11059;
                        if (i7 > 1) {
                            c45452.m9603(0);
                        } else {
                            int i8 = c45452.f17283;
                            c1140.f4889.mo1738(c45452, i8, 2);
                            i5 += i8;
                        }
                    }
                    c1140.f4889.mo1741(j, i, i5, i3, c1140.f4902);
                }
            }
            i5 = i2;
            if ((i & 268435456) != 0) {
            }
            c1140.f4889.mo1741(j, i, i5, i3, c1140.f4902);
        } else {
            i5 = i2;
            if ((i & 268435456) != 0) {
            }
            c1140.f4889.mo1741(j, i, i5, i3, c1140.f4902);
        }
        this.f11073 = true;
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo1256() {
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵵᵽ */
    public final void mo1257(InterfaceC4550 interfaceC4550) {
        if (this.f11064) {
            interfaceC4550 = new C0764(interfaceC4550, this.f11081);
        }
        this.f11074 = interfaceC4550;
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Code restructure failed: missing block: B:756:0x0d2b, code lost:
    
        r5 = true;
        r1 = r1;
        r4 = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:869:0x0f53, code lost:
    
        if (r5 == false) goto L880;
     */
    /* JADX WARN: Code restructure failed: missing block: B:870:0x0f55, code lost:
    
        r2 = r1.getPosition();
        r0 = r43;
     */
    /* JADX WARN: Code restructure failed: missing block: B:871:0x0f5d, code lost:
    
        if (r0.f11025 == false) goto L874;
     */
    /* JADX WARN: Code restructure failed: missing block: B:872:0x0f5f, code lost:
    
        r0.f11036 = r2;
        r45.f10317 = r0.f11039;
        r0.f11025 = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:873:0x0f6b, code lost:
    
        return 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:874:0x0f6c, code lost:
    
        r35 = true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:875:0x0f72, code lost:
    
        if (r0.f11069 == false) goto L930;
     */
    /* JADX WARN: Code restructure failed: missing block: B:876:0x0f74, code lost:
    
        r6 = r0.f11036;
     */
    /* JADX WARN: Code restructure failed: missing block: B:877:0x0f78, code lost:
    
        if (r6 == (-1)) goto L931;
     */
    /* JADX WARN: Code restructure failed: missing block: B:878:0x0f7a, code lost:
    
        r45.f10317 = r6;
        r0.f11036 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:879:0x0f80, code lost:
    
        return 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:880:0x0f81, code lost:
    
        r35 = true;
        r0 = r43;
     */
    /* JADX WARN: Code restructure failed: missing block: B:881:0x0f87, code lost:
    
        r4 = r35;
        r3 = false;
     */
    /* JADX WARN: Code restructure failed: missing block: B:930:0x0f87, code lost:
    
        continue;
     */
    /* 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:184:0x0360  */
    /* JADX WARN: Removed duplicated region for block: B:325:0x0525  */
    /* JADX WARN: Removed duplicated region for block: B:622:0x0a55  */
    /* JADX WARN: Removed duplicated region for block: B:627:0x0a6c  */
    /* JADX WARN: Removed duplicated region for block: B:628:0x0a6f  */
    /* JADX WARN: Removed duplicated region for block: B:631:0x0a82  */
    /* JADX WARN: Removed duplicated region for block: B:632:0x0a8e  */
    /* JADX WARN: Removed duplicated region for block: B:722:0x0c4d  */
    /* JADX WARN: Removed duplicated region for block: B:727:0x0c61  */
    /* JADX WARN: Removed duplicated region for block: B:728:0x0c64  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x0191  */
    /* JADX WARN: Removed duplicated region for block: B:79:0x019d  */
    /* JADX WARN: Type inference failed for: r1v107 */
    /* JADX WARN: Type inference failed for: r1v108 */
    /* JADX WARN: Type inference failed for: r1v109 */
    /* JADX WARN: Type inference failed for: r1v110 */
    /* JADX WARN: Type inference failed for: r1v111 */
    /* JADX WARN: Type inference failed for: r1v112 */
    /* JADX WARN: Type inference failed for: r1v113 */
    /* JADX WARN: Type inference failed for: r1v16, types: [ᵻᵗᵻ] */
    /* JADX WARN: Type inference failed for: r1v19 */
    /* JADX WARN: Type inference failed for: r1v33 */
    /* JADX WARN: Type inference failed for: r1v4, types: [ᵻᵗᵻ] */
    /* JADX WARN: Type inference failed for: r2v39 */
    /* JADX WARN: Type inference failed for: r2v40, types: [java.lang.RuntimeException] */
    /* JADX WARN: Type inference failed for: r2v41 */
    /* JADX WARN: Type inference failed for: r35v5, types: [int] */
    /* JADX WARN: Type inference failed for: r4v113 */
    /* JADX WARN: Type inference failed for: r4v119 */
    /* JADX WARN: Type inference failed for: r4v26 */
    /* JADX WARN: Type inference failed for: r4v27, types: [int] */
    /* JADX WARN: Type inference failed for: r4v32 */
    /* JADX WARN: Type inference failed for: r4v36, types: [boolean] */
    /* JADX WARN: Type inference failed for: r7v1, types: [ᵤᵚ] */
    /* JADX WARN: Type inference failed for: r8v0, types: [ᵚᵕᵵˉ] */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	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 // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int mo1258(InterfaceC5206 interfaceC5206, C2669 c2669) throws ParserException {
        boolean z;
        int i;
        int i2;
        int i3;
        String str;
        int i4;
        int iM6618;
        ?? r1;
        int i5;
        byte b;
        List listSingletonList;
        int iM3212;
        ?? r2;
        int i6;
        ArrayList arrayList;
        RuntimeException runtimeException;
        long jM9599;
        Pair pair;
        String str2;
        String str3;
        List list;
        List listM9553;
        String str4;
        List list2;
        List list3;
        C4753 c4753;
        boolean zM9139;
        int i7;
        C3281 c3281;
        byte[] bArr;
        int i8;
        String str5;
        C5534 c5534M11157;
        List list4;
        int i9;
        List list5;
        int i10;
        long j;
        int i11;
        long j2;
        long j3;
        C1956 c1956M5239;
        C2889 c2889 = this;
        boolean z2 = false;
        c2889.f11073 = false;
        boolean z3 = true;
        boolean z4 = true;
        while (z4 && !c2889.f11073) {
            ?? r7 = c2889.f11072;
            ?? r8 = r7.f13258;
            ArrayDeque arrayDeque = r7.f13257;
            r7.f13262.getClass();
            while (true) {
                C2485 c2485 = (C2485) arrayDeque.peek();
                if (c2485 == null || interfaceC5206.getPosition() < c2485.f9660) {
                    boolean z5 = z2 ? 1 : 0;
                    ?? r12 = interfaceC5206;
                    if (r7.f13259 == 0) {
                        int i12 = 4;
                        long jM6619 = r8.m6619(r12, true, z5, 4);
                        if (jM6619 == -2) {
                            byte[] bArr2 = r7.f13260;
                            r12.mo4698();
                            ?? r4 = z5;
                            while (true) {
                                r12.mo4701(bArr2, r4, i12);
                                byte b2 = bArr2[r4];
                                int i13 = 0;
                                while (true) {
                                    if (i13 >= 8) {
                                        i4 = -1;
                                    } else if ((C2722.f10434[i13] & ((long) b2)) != 0) {
                                        i4 = i13 + 1;
                                    } else {
                                        i13++;
                                    }
                                }
                                if (i4 != -1 && i4 <= 4) {
                                    iM6618 = (int) C2722.m6618(i4, false, bArr2);
                                    Object obj = r7.f13262.ᵜᵪʾ;
                                    if (iM6618 == 357149030 || iM6618 == 524531317 || iM6618 == 475249515 || iM6618 == 374648427) {
                                    }
                                }
                                r12.mo4700(1);
                                i12 = 4;
                                r4 = 0;
                            }
                            r12.mo4700(i4);
                            jM6619 = iM6618;
                        }
                        z = true;
                        if (jM6619 == -1) {
                            ?? r42 = 0;
                            z4 = false;
                            ?? r13 = r12;
                        } else {
                            r7.f13263 = (int) jM6619;
                            r7.f13259 = 1;
                        }
                    } else {
                        z = true;
                    }
                    if (r7.f13259 == z) {
                        r7.f13261 = r8.m6619(r12, false, z, 8);
                        r7.f13259 = 2;
                    }
                    ˈᵷᵵᵞ r0 = r7.f13262;
                    int i14 = r7.f13263;
                    Object obj2 = r0.ᵜᵪʾ;
                    switch (i14) {
                        case 131:
                        case 136:
                        case 155:
                        case 159:
                        case 176:
                        case 179:
                        case 186:
                        case 215:
                        case 231:
                        case 238:
                        case 240:
                        case 241:
                        case 247:
                        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) {
                        r12.mo4700((int) r7.f13261);
                        r7.f13259 = 0;
                        z2 = false;
                        z3 = true;
                    } else if (i == 1) {
                        long position = r12.getPosition();
                        arrayDeque.push(new C2485(r7.f13261 + position, r7.f13263));
                        r7.f13262.ʽᵡᵢᵾ(position, r7.f13263, r7.f13261);
                        i2 = 0;
                        r7.f13259 = 0;
                        r1 = r12;
                    } else if (i == 2) {
                        long j4 = r7.f13261;
                        if (j4 > 8) {
                            throw ParserException.m357("Invalid integer size: " + r7.f13261, null);
                        }
                        r0.ˉᵵᵜ(r7.m7854(r12, (int) j4), i14);
                        i2 = 0;
                        r7.f13259 = 0;
                        r1 = r12;
                    } else if (i == 3) {
                        long j5 = r7.f13261;
                        if (j5 > 2147483647L) {
                            throw ParserException.m357("String element size: " + r7.f13261, null);
                        }
                        int i15 = (int) j5;
                        if (i15 == 0) {
                            str = "";
                            i3 = 0;
                        } else {
                            byte[] bArr3 = new byte[i15];
                            r12.readFully(bArr3, 0, i15);
                            while (i15 > 0 && bArr3[i15 - 1] == 0) {
                                i15--;
                            }
                            i3 = 0;
                            str = new String(bArr3, 0, i15);
                        }
                        r0.ˈⁱᵡ(i14, str);
                        r7.f13259 = i3;
                        i2 = i3;
                        r1 = r12;
                    } else if (i == 4) {
                        r0.ˑˊᵲ(i14, (int) r7.f13261, (InterfaceC5206) r12);
                        i2 = 0;
                        r7.f13259 = 0;
                        r1 = r12;
                    } else {
                        if (i != 5) {
                            throw ParserException.m357("Invalid element type " + i, null);
                        }
                        long j6 = r7.f13261;
                        if (j6 != 4 && j6 != 8) {
                            throw ParserException.m357("Invalid float size: " + r7.f13261, null);
                        }
                        int i16 = (int) j6;
                        double dIntBitsToFloat = i16 == 4 ? Float.intBitsToFloat((int) r4) : Double.longBitsToDouble(r7.m7854(r12, i16));
                        C2889 c28892 = (C2889) r0.ᵜᵪʾ;
                        if (i14 == 181) {
                            c28892.m6872(i14);
                            c28892.f11065.f4885 = (int) dIntBitsToFloat;
                        } else if (i14 != 17545) {
                            switch (i14) {
                                case 21969:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4854 = (float) dIntBitsToFloat;
                                    break;
                                case 21970:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4887 = (float) dIntBitsToFloat;
                                    break;
                                case 21971:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4864 = (float) dIntBitsToFloat;
                                    break;
                                case 21972:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4859 = (float) dIntBitsToFloat;
                                    break;
                                case 21973:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4857 = (float) dIntBitsToFloat;
                                    break;
                                case 21974:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4870 = (float) dIntBitsToFloat;
                                    break;
                                case 21975:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4867 = (float) dIntBitsToFloat;
                                    break;
                                case 21976:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4882 = (float) dIntBitsToFloat;
                                    break;
                                case 21977:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4899 = (float) dIntBitsToFloat;
                                    break;
                                case 21978:
                                    c28892.m6872(i14);
                                    c28892.f11065.f4878 = (float) dIntBitsToFloat;
                                    break;
                                default:
                                    switch (i14) {
                                        case 30323:
                                            c28892.m6872(i14);
                                            c28892.f11065.f4868 = (float) dIntBitsToFloat;
                                            break;
                                        case 30324:
                                            c28892.m6872(i14);
                                            c28892.f11065.f4873 = (float) dIntBitsToFloat;
                                            break;
                                        case 30325:
                                            c28892.m6872(i14);
                                            c28892.f11065.f4883 = (float) dIntBitsToFloat;
                                            break;
                                    }
                                    break;
                            }
                        } else {
                            c28892.f11037 = (long) dIntBitsToFloat;
                        }
                        i2 = 0;
                        r7.f13259 = 0;
                        r1 = r12;
                    }
                } else {
                    ˈᵷᵵᵞ r5 = r7.f13262;
                    int i17 = ((C2485) arrayDeque.pop()).f9661;
                    C2889 c28893 = (C2889) r5.ᵜᵪʾ;
                    SparseArray sparseArray = c28893.f11044;
                    SparseArray sparseArray2 = c28893.f11047;
                    c28893.f11074.getClass();
                    if (i17 != 160) {
                        if (i17 == 174) {
                            C1140 c1140 = c28893.f11065;
                            c1140.getClass();
                            String str6 = c1140.f4877;
                            if (str6 == null) {
                                throw ParserException.m357("CodecId is missing in TrackEntry element", null);
                            }
                            switch (str6) {
                                case "V_MPEG4/ISO/AP":
                                case "V_MPEG4/ISO/SP":
                                case "A_MS/ACM":
                                case "A_TRUEHD":
                                case "A_VORBIS":
                                case "A_MPEG/L2":
                                case "A_MPEG/L3":
                                case "V_MS/VFW/FOURCC":
                                case "S_DVBSUB":
                                case "V_MPEG4/ISO/ASP":
                                case "V_MPEG4/ISO/AVC":
                                case "S_VOBSUB":
                                case "A_DTS/LOSSLESS":
                                case "A_AAC":
                                case "A_AC3":
                                case "A_DTS":
                                case "V_AV1":
                                case "V_VP8":
                                case "V_VP9":
                                case "S_HDMV/PGS":
                                case "V_THEORA":
                                case "A_DTS/EXPRESS":
                                case "A_PCM/FLOAT/IEEE":
                                case "A_PCM/INT/BIG":
                                case "A_PCM/INT/LIT":
                                case "S_TEXT/ASS":
                                case "S_TEXT/SSA":
                                case "V_MPEGH/ISO/HEVC":
                                case "S_TEXT/WEBVTT":
                                case "S_TEXT/UTF8":
                                case "V_MPEG2":
                                case "A_EAC3":
                                case "A_FLAC":
                                case "A_OPUS":
                                    int i18 = c1140.f4903;
                                    switch (str6.hashCode()) {
                                        case -2095576542:
                                            b = str6.equals("V_MPEG4/ISO/AP") ? (byte) 0 : (byte) -1;
                                            break;
                                        case -2095575984:
                                            if (str6.equals("V_MPEG4/ISO/SP")) {
                                                b = 1;
                                                break;
                                            }
                                            break;
                                        case -1985379776:
                                            if (str6.equals("A_MS/ACM")) {
                                                b = 2;
                                                break;
                                            }
                                            break;
                                        case -1784763192:
                                            if (str6.equals("A_TRUEHD")) {
                                                b = 3;
                                                break;
                                            }
                                            break;
                                        case -1730367663:
                                            if (str6.equals("A_VORBIS")) {
                                                b = 4;
                                                break;
                                            }
                                            break;
                                        case -1482641358:
                                            if (str6.equals("A_MPEG/L2")) {
                                                b = 5;
                                                break;
                                            }
                                            break;
                                        case -1482641357:
                                            if (str6.equals("A_MPEG/L3")) {
                                                b = 6;
                                                break;
                                            }
                                            break;
                                        case -1373388978:
                                            if (str6.equals("V_MS/VFW/FOURCC")) {
                                                b = 7;
                                                break;
                                            }
                                            break;
                                        case -933872740:
                                            if (str6.equals("S_DVBSUB")) {
                                                b = 8;
                                                break;
                                            }
                                            break;
                                        case -538363189:
                                            if (str6.equals("V_MPEG4/ISO/ASP")) {
                                                b = 9;
                                                break;
                                            }
                                            break;
                                        case -538363109:
                                            if (str6.equals("V_MPEG4/ISO/AVC")) {
                                                b = 10;
                                                break;
                                            }
                                            break;
                                        case -425012669:
                                            if (str6.equals("S_VOBSUB")) {
                                                b = 11;
                                                break;
                                            }
                                            break;
                                        case -356037306:
                                            if (str6.equals("A_DTS/LOSSLESS")) {
                                                b = 12;
                                                break;
                                            }
                                            break;
                                        case 62923557:
                                            if (str6.equals("A_AAC")) {
                                                b = 13;
                                                break;
                                            }
                                            break;
                                        case 62923603:
                                            if (str6.equals("A_AC3")) {
                                                b = 14;
                                                break;
                                            }
                                            break;
                                        case 62927045:
                                            if (str6.equals("A_DTS")) {
                                                b = 15;
                                                break;
                                            }
                                            break;
                                        case 82318131:
                                            if (str6.equals("V_AV1")) {
                                                b = 16;
                                                break;
                                            }
                                            break;
                                        case 82338133:
                                            if (str6.equals("V_VP8")) {
                                                b = 17;
                                                break;
                                            }
                                            break;
                                        case 82338134:
                                            if (str6.equals("V_VP9")) {
                                                b = 18;
                                                break;
                                            }
                                            break;
                                        case 99146302:
                                            if (str6.equals("S_HDMV/PGS")) {
                                                b = 19;
                                                break;
                                            }
                                            break;
                                        case 444813526:
                                            if (str6.equals("V_THEORA")) {
                                                b = 20;
                                                break;
                                            }
                                            break;
                                        case 542569478:
                                            if (str6.equals("A_DTS/EXPRESS")) {
                                                b = 21;
                                                break;
                                            }
                                            break;
                                        case 635596514:
                                            if (str6.equals("A_PCM/FLOAT/IEEE")) {
                                                b = 22;
                                                break;
                                            }
                                            break;
                                        case 725948237:
                                            if (str6.equals("A_PCM/INT/BIG")) {
                                                b = 23;
                                                break;
                                            }
                                            break;
                                        case 725957860:
                                            if (str6.equals("A_PCM/INT/LIT")) {
                                                b = 24;
                                                break;
                                            }
                                            break;
                                        case 738597099:
                                            if (str6.equals("S_TEXT/ASS")) {
                                                b = 25;
                                                break;
                                            }
                                            break;
                                        case 738614379:
                                            if (str6.equals("S_TEXT/SSA")) {
                                                b = 26;
                                                break;
                                            }
                                            break;
                                        case 855502857:
                                            if (str6.equals("V_MPEGH/ISO/HEVC")) {
                                                b = 27;
                                                break;
                                            }
                                            break;
                                        case 1045209816:
                                            if (str6.equals("S_TEXT/WEBVTT")) {
                                                b = 28;
                                                break;
                                            }
                                            break;
                                        case 1422270023:
                                            if (str6.equals("S_TEXT/UTF8")) {
                                                b = 29;
                                                break;
                                            }
                                            break;
                                        case 1809237540:
                                            if (str6.equals("V_MPEG2")) {
                                                b = 30;
                                                break;
                                            }
                                            break;
                                        case 1950749482:
                                            if (str6.equals("A_EAC3")) {
                                                b = 31;
                                                break;
                                            }
                                            break;
                                        case 1950789798:
                                            if (str6.equals("A_FLAC")) {
                                                b = 32;
                                                break;
                                            }
                                            break;
                                        case 1951062397:
                                            if (str6.equals("A_OPUS")) {
                                                b = 33;
                                                break;
                                            }
                                            break;
                                    }
                                    String str7 = "video/x-unknown";
                                    switch (b) {
                                        case 0:
                                        case 1:
                                        case 9:
                                            byte[] bArr4 = c1140.f4894;
                                            listSingletonList = bArr4 == null ? null : Collections.singletonList(bArr4);
                                            str7 = "video/mp4v-es";
                                            listM9553 = listSingletonList;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null && (c5534M11157 = C5534.m11157(new C4545(c1140.f4853))) != null) {
                                                str3 = c5534M11157.f20903;
                                                str7 = "video/dolby-vision";
                                            }
                                            int i19 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map = f11018;
                                            if (zM9139) {
                                                c4753.f18090 = c1140.f4861;
                                                c4753.f18113 = c1140.f4885;
                                                c4753.f18095 = iM3212;
                                            } else if (AbstractC4208.m9134(str7)) {
                                                if (c1140.f4863 == 0) {
                                                    int i20 = c1140.f4896;
                                                    i7 = -1;
                                                    if (i20 == -1) {
                                                        i20 = c1140.f4872;
                                                    }
                                                    c1140.f4896 = i20;
                                                    int i21 = c1140.f4866;
                                                    if (i21 == -1) {
                                                        i21 = c1140.f4893;
                                                    }
                                                    c1140.f4866 = i21;
                                                } else {
                                                    i7 = -1;
                                                }
                                                float f = (c1140.f4896 == i7 || (i8 = c1140.f4866) == i7) ? -1.0f : (c1140.f4893 * r0) / (c1140.f4872 * i8);
                                                if (c1140.f4895) {
                                                    if (c1140.f4854 == -1.0f || c1140.f4887 == -1.0f || c1140.f4864 == -1.0f || c1140.f4859 == -1.0f || c1140.f4857 == -1.0f || c1140.f4870 == -1.0f || c1140.f4867 == -1.0f || c1140.f4882 == -1.0f || c1140.f4899 == -1.0f || c1140.f4878 == -1.0f) {
                                                        bArr = null;
                                                    } else {
                                                        byte[] bArr5 = new byte[25];
                                                        ByteBuffer byteBufferOrder = ByteBuffer.wrap(bArr5).order(ByteOrder.LITTLE_ENDIAN);
                                                        byteBufferOrder.put((byte) 0);
                                                        byteBufferOrder.putShort((short) ((c1140.f4854 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4887 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4864 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4859 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4857 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4870 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4867 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) ((c1140.f4882 * 50000.0f) + 0.5f));
                                                        byteBufferOrder.putShort((short) (c1140.f4899 + 0.5f));
                                                        byteBufferOrder.putShort((short) (c1140.f4878 + 0.5f));
                                                        byteBufferOrder.putShort((short) c1140.f4904);
                                                        byteBufferOrder.putShort((short) c1140.f4879);
                                                        bArr = bArr5;
                                                    }
                                                    int i22 = c1140.f4901;
                                                    int i23 = c1140.f4874;
                                                    int i24 = c1140.f4860;
                                                    int i25 = c1140.f4886;
                                                    c3281 = new C3281(i22, i23, i24, bArr, i25, i25);
                                                } else {
                                                    c3281 = null;
                                                }
                                                String str8 = c1140.f4852;
                                                int iIntValue = (str8 == null || !map.containsKey(str8)) ? -1 : ((Integer) map.get(c1140.f4852)).intValue();
                                                if (c1140.f4875 == 0 && Float.compare(c1140.f4868, 0.0f) == 0 && Float.compare(c1140.f4873, 0.0f) == 0) {
                                                    if (Float.compare(c1140.f4883, 0.0f) == 0) {
                                                        iIntValue = 0;
                                                    } else if (Float.compare(c1140.f4883, 90.0f) == 0) {
                                                        iIntValue = 90;
                                                    } else if (Float.compare(c1140.f4883, -180.0f) == 0 || Float.compare(c1140.f4883, 180.0f) == 0) {
                                                        iIntValue = 180;
                                                    } else if (Float.compare(c1140.f4883, -90.0f) == 0) {
                                                        iIntValue = 270;
                                                    }
                                                }
                                                c4753.f18098 = c1140.f4872;
                                                c4753.f18102 = c1140.f4893;
                                                c4753.f18124 = f;
                                                c4753.f18118 = iIntValue;
                                                c4753.f18093 = c1140.f4880;
                                                c4753.f18103 = c1140.f4892;
                                                c4753.f18127 = c3281;
                                            } else if (!"application/x-subrip".equals(str7) && !"text/x-ssa".equals(str7) && !"text/vtt".equals(str7) && !"application/vobsub".equals(str7) && !"application/pgs".equals(str7) && !"application/dvbsubs".equals(str7)) {
                                                throw ParserException.m357("Unexpected MIME type.", null);
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null && !map.containsKey(str5)) {
                                                c4753.f18089 = c1140.f4852;
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 2:
                                            C4545 c4545 = new C4545(c1140.m3628(c1140.f4877));
                                            try {
                                                int iM9607 = c4545.m9607();
                                                if (iM9607 != 1) {
                                                    if (iM9607 == 65534) {
                                                        c4545.m9624(24);
                                                        long jM9601 = c4545.m9601();
                                                        UUID uuid = f11019;
                                                        if (jM9601 != uuid.getMostSignificantBits() || c4545.m9601() != uuid.getLeastSignificantBits()) {
                                                        }
                                                        str7 = "audio/x-unknown";
                                                        iM3212 = -1;
                                                        i6 = -1;
                                                        str3 = null;
                                                        list3 = null;
                                                        if (c1140.f4853 != null) {
                                                            str3 = c5534M11157.f20903;
                                                            str7 = "video/dolby-vision";
                                                        }
                                                        int i192 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                        c4753 = new C4753();
                                                        zM9139 = AbstractC4208.m9139(str7);
                                                        Map map2 = f11018;
                                                        if (zM9139) {
                                                        }
                                                        str5 = c1140.f4852;
                                                        if (str5 != null) {
                                                            c4753.f18089 = c1140.f4852;
                                                        }
                                                        c4753.f18121 = Integer.toString(i18);
                                                        c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                        c4753.f18101 = AbstractC4208.m9132(str7);
                                                        c4753.f18116 = i6;
                                                        c4753.f18126 = c1140.f4888;
                                                        c4753.f18114 = i192;
                                                        c4753.f18119 = list3;
                                                        c4753.f18120 = str3;
                                                        c4753.f18096 = c1140.f4884;
                                                        c1140.f4871 = c4753.m9934();
                                                        c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                        sparseArray2.put(c1140.f4903, c1140);
                                                    }
                                                    ˋˀᵧ.ʿٴˇ("Non-PCM MS/ACM is unsupported. Setting mimeType to audio/x-unknown");
                                                    str7 = "audio/x-unknown";
                                                    iM3212 = -1;
                                                    i6 = -1;
                                                    str3 = null;
                                                    list3 = null;
                                                    if (c1140.f4853 != null) {
                                                    }
                                                    int i1922 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                    c4753 = new C4753();
                                                    zM9139 = AbstractC4208.m9139(str7);
                                                    Map map22 = f11018;
                                                    if (zM9139) {
                                                    }
                                                    str5 = c1140.f4852;
                                                    if (str5 != null) {
                                                    }
                                                    c4753.f18121 = Integer.toString(i18);
                                                    c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                    c4753.f18101 = AbstractC4208.m9132(str7);
                                                    c4753.f18116 = i6;
                                                    c4753.f18126 = c1140.f4888;
                                                    c4753.f18114 = i1922;
                                                    c4753.f18119 = list3;
                                                    c4753.f18120 = str3;
                                                    c4753.f18096 = c1140.f4884;
                                                    c1140.f4871 = c4753.m9934();
                                                    c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                    sparseArray2.put(c1140.f4903, c1140);
                                                    break;
                                                }
                                                int i26 = c1140.f4890;
                                                String str9 = AbstractC0956.f4222;
                                                iM3212 = AbstractC0956.m3212(i26, ByteOrder.LITTLE_ENDIAN);
                                                if (iM3212 == 0) {
                                                    ˋˀᵧ.ʿٴˇ("Unsupported PCM bit depth: " + c1140.f4890 + ". Setting mimeType to audio/x-unknown");
                                                    str7 = "audio/x-unknown";
                                                    iM3212 = -1;
                                                    i6 = -1;
                                                    str3 = null;
                                                    list3 = null;
                                                    if (c1140.f4853 != null) {
                                                    }
                                                    int i19222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                    c4753 = new C4753();
                                                    zM9139 = AbstractC4208.m9139(str7);
                                                    Map map222 = f11018;
                                                    if (zM9139) {
                                                    }
                                                    str5 = c1140.f4852;
                                                    if (str5 != null) {
                                                    }
                                                    c4753.f18121 = Integer.toString(i18);
                                                    c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                    c4753.f18101 = AbstractC4208.m9132(str7);
                                                    c4753.f18116 = i6;
                                                    c4753.f18126 = c1140.f4888;
                                                    c4753.f18114 = i19222;
                                                    c4753.f18119 = list3;
                                                    c4753.f18120 = str3;
                                                    c4753.f18096 = c1140.f4884;
                                                    c1140.f4871 = c4753.m9934();
                                                    c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                    sparseArray2.put(c1140.f4903, c1140);
                                                }
                                                str7 = "audio/raw";
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i192222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map2222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i192222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            } catch (ArrayIndexOutOfBoundsException unused) {
                                                throw ParserException.m357("Error parsing MS/ACM codec private", null);
                                            }
                                            break;
                                        case 3:
                                            c1140.f4856 = new C0246();
                                            str7 = "audio/true-hd";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 4:
                                            byte[] bArrM3628 = c1140.m3628(str6);
                                            try {
                                                r2 = bArrM3628[0];
                                                try {
                                                    if (r2 != 2) {
                                                        throw ParserException.m357("Error parsing vorbis codec private", null);
                                                    }
                                                    int i27 = 0;
                                                    int i28 = 1;
                                                    while (true) {
                                                        int i29 = bArrM3628[i28] & 255;
                                                        if (i29 != 255) {
                                                            int i30 = i28 + 1;
                                                            int i31 = i27 + i29;
                                                            int i32 = 0;
                                                            while (true) {
                                                                int i33 = bArrM3628[i30] & 255;
                                                                if (i33 != 255) {
                                                                    int i34 = i30 + 1;
                                                                    int i35 = i32 + i33;
                                                                    if (bArrM3628[i34] != 1) {
                                                                        throw ParserException.m357("Error parsing vorbis codec private", null);
                                                                    }
                                                                    byte[] bArr6 = new byte[i31];
                                                                    System.arraycopy(bArrM3628, i34, bArr6, 0, i31);
                                                                    int i36 = i34 + i31;
                                                                    if (bArrM3628[i36] != 3) {
                                                                        throw ParserException.m357("Error parsing vorbis codec private", null);
                                                                    }
                                                                    int i37 = i36 + i35;
                                                                    if (bArrM3628[i37] != 5) {
                                                                        throw ParserException.m357("Error parsing vorbis codec private", null);
                                                                    }
                                                                    byte[] bArr7 = new byte[bArrM3628.length - i37];
                                                                    System.arraycopy(bArrM3628, i37, bArr7, 0, bArrM3628.length - i37);
                                                                    ArrayList arrayList2 = new ArrayList(2);
                                                                    arrayList2.add(bArr6);
                                                                    arrayList2.add(bArr7);
                                                                    str7 = "audio/vorbis";
                                                                    i6 = 8192;
                                                                    arrayList = arrayList2;
                                                                    iM3212 = -1;
                                                                    list4 = arrayList;
                                                                    str3 = null;
                                                                    list3 = list4;
                                                                    if (c1140.f4853 != null) {
                                                                    }
                                                                    int i19222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                                    c4753 = new C4753();
                                                                    zM9139 = AbstractC4208.m9139(str7);
                                                                    Map map222222 = f11018;
                                                                    if (zM9139) {
                                                                    }
                                                                    str5 = c1140.f4852;
                                                                    if (str5 != null) {
                                                                    }
                                                                    c4753.f18121 = Integer.toString(i18);
                                                                    c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                                    c4753.f18101 = AbstractC4208.m9132(str7);
                                                                    c4753.f18116 = i6;
                                                                    c4753.f18126 = c1140.f4888;
                                                                    c4753.f18114 = i19222222;
                                                                    c4753.f18119 = list3;
                                                                    c4753.f18120 = str3;
                                                                    c4753.f18096 = c1140.f4884;
                                                                    c1140.f4871 = c4753.m9934();
                                                                    c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                                    sparseArray2.put(c1140.f4903, c1140);
                                                                } else {
                                                                    i32 += 255;
                                                                    i30++;
                                                                }
                                                            }
                                                        } else {
                                                            i27 += 255;
                                                            i28++;
                                                        }
                                                    }
                                                } catch (ArrayIndexOutOfBoundsException unused2) {
                                                    throw ParserException.m357("Error parsing vorbis codec private", r2);
                                                }
                                            } catch (ArrayIndexOutOfBoundsException unused3) {
                                                r2 = 0;
                                            }
                                            break;
                                        case 5:
                                            str7 = "audio/mpeg-L2";
                                            iM3212 = -1;
                                            i6 = 4096;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                                            str7 = "audio/mpeg";
                                            iM3212 = -1;
                                            i6 = 4096;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                                            C4545 c45452 = new C4545(c1140.m3628(c1140.f4877));
                                            try {
                                                c45452.m9609(16);
                                                jM9599 = c45452.m9599();
                                            } catch (ArrayIndexOutOfBoundsException unused4) {
                                                runtimeException = null;
                                            }
                                            if (jM9599 == 1482049860) {
                                                try {
                                                    pair = new Pair("video/divx", null);
                                                    str2 = null;
                                                } catch (ArrayIndexOutOfBoundsException unused5) {
                                                    runtimeException = null;
                                                }
                                            } else {
                                                if (jM9599 != 859189832) {
                                                    if (jM9599 == 826496599) {
                                                        byte[] bArr8 = c45452.f17284;
                                                        for (int i38 = c45452.f17282 + 20; i38 < bArr8.length - 4; i38++) {
                                                            if (bArr8[i38] == 0 && bArr8[i38 + 1] == 0 && bArr8[i38 + 2] == 1) {
                                                                if (bArr8[i38 + 3] == 15) {
                                                                    pair = new Pair("video/wvc1", Collections.singletonList(Arrays.copyOfRange(bArr8, i38, bArr8.length)));
                                                                }
                                                            }
                                                        }
                                                        runtimeException = null;
                                                        try {
                                                            throw ParserException.m357("Failed to find FourCC VC1 initialization data", null);
                                                        } catch (ArrayIndexOutOfBoundsException unused6) {
                                                        }
                                                    } else {
                                                        ˋˀᵧ.ʿٴˇ("Unknown FourCC. Setting mimeType to video/x-unknown");
                                                        str2 = null;
                                                        pair = new Pair("video/x-unknown", null);
                                                    }
                                                    throw ParserException.m357("Error parsing FourCC private data", runtimeException);
                                                }
                                                pair = new Pair("video/3gpp", null);
                                                str2 = null;
                                            }
                                            str7 = (String) pair.first;
                                            str3 = str2;
                                            list = (List) pair.second;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list3 = list;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case C5224.BYTES_FIELD_NUMBER /* 8 */:
                                            byte[] bArr9 = new byte[4];
                                            System.arraycopy(c1140.m3628(str6), 0, bArr9, 0, 4);
                                            listM9553 = AbstractC4509.m9553(bArr9);
                                            str7 = "application/dvbsubs";
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 10:
                                            C3923 c3923M8653 = C3923.m8653(new C4545(c1140.m3628(c1140.f4877)));
                                            ArrayList arrayList3 = c3923M8653.f14980;
                                            c1140.f4862 = c3923M8653.f14974;
                                            str4 = c3923M8653.f14978;
                                            str7 = "video/avc";
                                            list2 = arrayList3;
                                            str3 = str4;
                                            list = list2;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list3 = list;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 11:
                                            listM9553 = AbstractC4509.m9553(c1140.m3628(str6));
                                            str7 = "application/vobsub";
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 12:
                                            str7 = "audio/vnd.dts.hd";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 13:
                                            List listSingletonList2 = Collections.singletonList(c1140.m3628(str6));
                                            byte[] bArr10 = c1140.f4894;
                                            C1260 c1260 = ᵱˉˈ.ˑˊᵲ(new C3180(bArr10.length, bArr10), false);
                                            c1140.f4885 = c1260.f5308;
                                            c1140.f4861 = c1260.f5306;
                                            str7 = "audio/mp4a-latm";
                                            list = listSingletonList2;
                                            str3 = c1260.f5307;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list3 = list;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 14:
                                            str7 = "audio/ac3";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 15:
                                        case 21:
                                            c1140.f4876 = true;
                                            str7 = "audio/vnd.dts";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 16:
                                            byte[] bArr11 = c1140.f4894;
                                            listSingletonList = bArr11 == null ? null : AbstractC4509.m9553(bArr11);
                                            str7 = "video/av01";
                                            listM9553 = listSingletonList;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 17:
                                            str7 = "video/x-vnd.on2.vp8";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 18:
                                            byte[] bArr12 = c1140.f4894;
                                            listSingletonList = bArr12 == null ? null : AbstractC4509.m9553(bArr12);
                                            str7 = "video/x-vnd.on2.vp9";
                                            listM9553 = listSingletonList;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 19:
                                            str7 = "application/pgs";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 20:
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 22:
                                            if (c1140.f4890 == 32) {
                                                str7 = "audio/raw";
                                                iM3212 = 4;
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i192222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map2222222222222222222222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i192222222222222222222222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            } else {
                                                ˋˀᵧ.ʿٴˇ("Unsupported floating point PCM bit depth: " + c1140.f4890 + ". Setting mimeType to audio/x-unknown");
                                                str7 = "audio/x-unknown";
                                                iM3212 = -1;
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i1922222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map22222222222222222222222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i1922222222222222222222222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            }
                                            break;
                                        case 23:
                                            int i39 = c1140.f4890;
                                            if (i39 == 8) {
                                                str7 = "audio/raw";
                                                iM3212 = 3;
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i19222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map222222222222222222222222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i19222222222222222222222222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            } else {
                                                if (i39 == 16) {
                                                    iM3212 = 268435456;
                                                } else if (i39 == 24) {
                                                    iM3212 = 1342177280;
                                                } else if (i39 != 32) {
                                                    ˋˀᵧ.ʿٴˇ("Unsupported big endian PCM bit depth: " + c1140.f4890 + ". Setting mimeType to audio/x-unknown");
                                                    str7 = "audio/x-unknown";
                                                    iM3212 = -1;
                                                    i6 = -1;
                                                    str3 = null;
                                                    list3 = null;
                                                    if (c1140.f4853 != null) {
                                                    }
                                                    int i192222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                    c4753 = new C4753();
                                                    zM9139 = AbstractC4208.m9139(str7);
                                                    Map map2222222222222222222222222 = f11018;
                                                    if (zM9139) {
                                                    }
                                                    str5 = c1140.f4852;
                                                    if (str5 != null) {
                                                    }
                                                    c4753.f18121 = Integer.toString(i18);
                                                    c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                    c4753.f18101 = AbstractC4208.m9132(str7);
                                                    c4753.f18116 = i6;
                                                    c4753.f18126 = c1140.f4888;
                                                    c4753.f18114 = i192222222222222222222222222;
                                                    c4753.f18119 = list3;
                                                    c4753.f18120 = str3;
                                                    c4753.f18096 = c1140.f4884;
                                                    c1140.f4871 = c4753.m9934();
                                                    c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                    sparseArray2.put(c1140.f4903, c1140);
                                                } else {
                                                    iM3212 = 1610612736;
                                                }
                                                str7 = "audio/raw";
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i1922222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map22222222222222222222222222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i1922222222222222222222222222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            }
                                            break;
                                        case 24:
                                            int i40 = c1140.f4890;
                                            String str10 = AbstractC0956.f4222;
                                            iM3212 = AbstractC0956.m3212(i40, ByteOrder.LITTLE_ENDIAN);
                                            if (iM3212 == 0) {
                                                ˋˀᵧ.ʿٴˇ("Unsupported little endian PCM bit depth: " + c1140.f4890 + ". Setting mimeType to audio/x-unknown");
                                                str7 = "audio/x-unknown";
                                                iM3212 = -1;
                                                i6 = -1;
                                                str3 = null;
                                                list3 = null;
                                                if (c1140.f4853 != null) {
                                                }
                                                int i19222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                                c4753 = new C4753();
                                                zM9139 = AbstractC4208.m9139(str7);
                                                Map map222222222222222222222222222 = f11018;
                                                if (zM9139) {
                                                }
                                                str5 = c1140.f4852;
                                                if (str5 != null) {
                                                }
                                                c4753.f18121 = Integer.toString(i18);
                                                c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                                c4753.f18101 = AbstractC4208.m9132(str7);
                                                c4753.f18116 = i6;
                                                c4753.f18126 = c1140.f4888;
                                                c4753.f18114 = i19222222222222222222222222222;
                                                c4753.f18119 = list3;
                                                c4753.f18120 = str3;
                                                c4753.f18096 = c1140.f4884;
                                                c1140.f4871 = c4753.m9934();
                                                c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                                sparseArray2.put(c1140.f4903, c1140);
                                            }
                                            str7 = "audio/raw";
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 25:
                                        case 26:
                                            listM9553 = AbstractC4509.m9557(f11015, c1140.m3628(str6));
                                            str7 = "text/x-ssa";
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 27:
                                            C3853 c3853M8565 = C3853.m8565(new C4545(c1140.m3628(c1140.f4877)), false, null);
                                            List list6 = c3853M8565.f14726;
                                            c1140.f4862 = c3853M8565.f14717;
                                            str4 = c3853M8565.f14719;
                                            str7 = "video/hevc";
                                            list2 = list6;
                                            str3 = str4;
                                            list = list2;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list3 = list;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 28:
                                            str7 = "text/vtt";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 29:
                                            str7 = "application/x-subrip";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 30:
                                            str7 = "video/mpeg2";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 31:
                                            str7 = "audio/eac3";
                                            iM3212 = -1;
                                            i6 = -1;
                                            str3 = null;
                                            list3 = null;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i192222222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map2222222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i192222222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 32:
                                            listSingletonList = Collections.singletonList(c1140.m3628(str6));
                                            str7 = "audio/flac";
                                            listM9553 = listSingletonList;
                                            iM3212 = -1;
                                            i6 = -1;
                                            list4 = listM9553;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i1922222222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map22222222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i1922222222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        case 33:
                                            ArrayList arrayList4 = new ArrayList(3);
                                            arrayList4.add(c1140.m3628(c1140.f4877));
                                            ByteBuffer byteBufferAllocate = ByteBuffer.allocate(8);
                                            ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
                                            arrayList4.add(byteBufferAllocate.order(byteOrder).putLong(c1140.f4865).array());
                                            arrayList4.add(ByteBuffer.allocate(8).order(byteOrder).putLong(c1140.f4858).array());
                                            str7 = "audio/opus";
                                            i6 = 5760;
                                            arrayList = arrayList4;
                                            iM3212 = -1;
                                            list4 = arrayList;
                                            str3 = null;
                                            list3 = list4;
                                            if (c1140.f4853 != null) {
                                            }
                                            int i19222222222222222222222222222222222222 = (c1140.f4855 ? 1 : 0) | (c1140.f4881 ? 2 : 0);
                                            c4753 = new C4753();
                                            zM9139 = AbstractC4208.m9139(str7);
                                            Map map222222222222222222222222222222222222 = f11018;
                                            if (zM9139) {
                                            }
                                            str5 = c1140.f4852;
                                            if (str5 != null) {
                                            }
                                            c4753.f18121 = Integer.toString(i18);
                                            c4753.f18111 = AbstractC4208.m9132(c1140.f4898 ? "video/webm" : "video/x-matroska");
                                            c4753.f18101 = AbstractC4208.m9132(str7);
                                            c4753.f18116 = i6;
                                            c4753.f18126 = c1140.f4888;
                                            c4753.f18114 = i19222222222222222222222222222222222222;
                                            c4753.f18119 = list3;
                                            c4753.f18120 = str3;
                                            c4753.f18096 = c1140.f4884;
                                            c1140.f4871 = c4753.m9934();
                                            c1140.f4889 = c28893.f11074.mo2743(c1140.f4903, c1140.f4891);
                                            sparseArray2.put(c1140.f4903, c1140);
                                            break;
                                        default:
                                            throw ParserException.m357("Unrecognized codec identifier.", null);
                                    }
                                default:
                                    c28893.f11065 = null;
                                    break;
                            }
                        } else if (i17 != 183) {
                            if (i17 == 19899) {
                                int i41 = c28893.f11076;
                                if (i41 != -1) {
                                    long j7 = c28893.f11029;
                                    if (j7 != -1) {
                                        if (i41 == 475249515) {
                                            c28893.f11039 = j7;
                                        }
                                    }
                                }
                                throw ParserException.m357("Mandatory element SeekID or SeekPosition not found", null);
                            }
                            if (i17 == 25152) {
                                c28893.m6872(i17);
                                C1140 c11402 = c28893.f11065;
                                if (c11402.f4905) {
                                    C1688 c1688 = c11402.f4902;
                                    if (c1688 == null) {
                                        throw ParserException.m357("Encrypted Track found but ContentEncKeyID was not found", null);
                                    }
                                    c11402.f4884 = new C5576(new C4386(AbstractC3361.f12880, null, "video/webm", c1688.f6661));
                                }
                            } else if (i17 == 28032) {
                                c28893.m6872(i17);
                                C1140 c11403 = c28893.f11065;
                                if (c11403.f4905 && c11403.f4897 != null) {
                                    throw ParserException.m357("Combining encryption and compression is not supported", null);
                                }
                            } else if (i17 == 357149030) {
                                if (c28893.f11045 == -9223372036854775807L) {
                                    c28893.f11045 = 1000000L;
                                }
                                long j8 = c28893.f11037;
                                if (j8 != -9223372036854775807L) {
                                    c28893.f11043 = c28893.m6868(j8);
                                }
                            } else if (i17 != 374648427) {
                                if (i17 == 475249515 && !c28893.f11069) {
                                    int i42 = z2 ? 1 : 0;
                                    while (true) {
                                        if (i42 < sparseArray.size()) {
                                            if (((List) sparseArray.valueAt(i42)).isEmpty()) {
                                                i42++;
                                            } else if (c28893.f11043 != -9223372036854775807L) {
                                                for (int i43 = z2 ? 1 : 0; i43 < sparseArray.size(); i43++) {
                                                    Collections.sort((List) sparseArray.valueAt(i43));
                                                }
                                                c28893.f11074.mo2739(new C1082(sparseArray, c28893.f11043, c28893.f11027, c28893.f11032, c28893.f11035));
                                            }
                                        }
                                    }
                                    c28893.f11074.mo2739(new C3782(c28893.f11043));
                                    c28893.f11069 = z3;
                                    c28893.f11079 = z2;
                                    int i44 = z2 ? 1 : 0;
                                    while (i44 < sparseArray2.size()) {
                                        C1140 c11404 = (C1140) sparseArray2.valueAt(i44);
                                        long j9 = c28893.f11043;
                                        long j10 = c28893.f11032;
                                        long j11 = c28893.f11035;
                                        boolean z6 = z2;
                                        int i45 = z3;
                                        if (c11404.f4891 != 2 || (list5 = (List) sparseArray.get(c11404.f4903)) == null || list5.isEmpty()) {
                                            i10 = i44;
                                        } else {
                                            if (list5.isEmpty()) {
                                                i10 = i44;
                                            } else {
                                                i10 = i44;
                                                int iMin = Math.min(list5.size(), 20);
                                                double d = 0.0d;
                                                int i46 = z6 ? 1 : 0;
                                                int i47 = -1;
                                                while (i46 < iMin) {
                                                    C5504 c5504 = (C5504) list5.get(i46);
                                                    long j12 = j10;
                                                    long j13 = c5504.f20793;
                                                    long j14 = c5504.f20794;
                                                    long j15 = c5504.f20795;
                                                    if (j13 > 10000000) {
                                                        if (i47 == -1) {
                                                            j = ((C5504) list5.get(i47 == true ? 1 : 0)).f20793;
                                                        }
                                                        if (j != -9223372036854775807L) {
                                                            C5286 c5286 = c11404.f4871;
                                                            c5286.getClass();
                                                            C1956 c1956 = c5286.f19988;
                                                            C3138 c3138 = new C3138(j);
                                                            if (c1956 == null) {
                                                                InterfaceC2223[] interfaceC2223Arr = new InterfaceC2223[i45];
                                                                interfaceC2223Arr[z6 ? 1 : 0] = c3138;
                                                                c1956M5239 = new C1956(interfaceC2223Arr);
                                                            } else {
                                                                InterfaceC2223[] interfaceC2223Arr2 = new InterfaceC2223[i45];
                                                                interfaceC2223Arr2[z6 ? 1 : 0] = c3138;
                                                                c1956M5239 = c1956.m5239(interfaceC2223Arr2);
                                                            }
                                                            C4753 c4753M10878 = c11404.f4871.m10878();
                                                            c4753M10878.f18125 = c1956M5239;
                                                            c11404.f4871 = new C5286(c4753M10878);
                                                        }
                                                    } else {
                                                        if (i46 < list5.size() - 1) {
                                                            C5504 c55042 = (C5504) list5.get(i46 + 1);
                                                            i11 = i46;
                                                            j2 = (c55042.f20795 + c55042.f20794) - (j15 + j14);
                                                            j3 = c55042.f20793 - j13;
                                                        } else {
                                                            i11 = i46;
                                                            j2 = (j12 + j11) - (j15 + j14);
                                                            j3 = j9 - j13;
                                                        }
                                                        if (j3 > 0) {
                                                            double d2 = j2 / j3;
                                                            if (d2 > d) {
                                                                d = d2;
                                                                i47 = i11;
                                                            }
                                                        }
                                                        i46 = i11 + 1;
                                                        j10 = j12;
                                                    }
                                                }
                                                if (i47 == -1) {
                                                }
                                                if (j != -9223372036854775807L) {
                                                }
                                            }
                                            j = -9223372036854775807L;
                                            if (j != -9223372036854775807L) {
                                            }
                                        }
                                        if (!c11404.f4876) {
                                            c11404.f4889.getClass();
                                            InterfaceC5226 interfaceC5226 = c11404.f4889;
                                            C5286 c52862 = c11404.f4871;
                                            c52862.getClass();
                                            interfaceC5226.mo1742(c52862);
                                        }
                                        i44 = i10 + 1;
                                        z2 = z6 ? 1 : 0;
                                        z3 = true;
                                    }
                                    c28893.m6869();
                                    i5 = z2 ? 1 : 0;
                                }
                                r1 = interfaceC5206;
                                i2 = i5;
                            } else {
                                boolean z7 = z2 ? 1 : 0;
                                if (sparseArray2.size() == 0) {
                                    throw ParserException.m357("No valid tracks were found", null);
                                }
                                boolean z8 = (!c28893.f11078 || c28893.f11039 == -1) ? true : z7 ? 1 : 0;
                                int i48 = -1;
                                int i49 = -1;
                                int i50 = -1;
                                int i51 = -1;
                                for (int i52 = z7 ? 1 : 0; i52 < sparseArray2.size(); i52++) {
                                    C1140 c11405 = (C1140) sparseArray2.valueAt(i52);
                                    int i53 = c11405.f4891;
                                    if (i53 == 2) {
                                        if (c11405.f4855) {
                                            i48 = c11405.f4903;
                                        }
                                        if (i49 == -1) {
                                            i49 = c11405.f4903;
                                        }
                                    } else if (i53 == 1) {
                                        if (c11405.f4855) {
                                            i50 = c11405.f4903;
                                        }
                                        if (i51 == -1) {
                                            i51 = c11405.f4903;
                                        }
                                    }
                                    if (z8) {
                                        c11405.f4889.getClass();
                                        if (!c11405.f4876) {
                                            InterfaceC5226 interfaceC52262 = c11405.f4889;
                                            C5286 c52863 = c11405.f4871;
                                            c52863.getClass();
                                            interfaceC52262.mo1742(c52863);
                                        }
                                    }
                                }
                                if (i48 != -1) {
                                    c28893.f11027 = i48;
                                } else if (i49 != -1) {
                                    c28893.f11027 = i49;
                                } else if (i50 != -1) {
                                    c28893.f11027 = i50;
                                } else if (i51 != -1) {
                                    c28893.f11027 = i51;
                                } else {
                                    c28893.f11027 = sparseArray2.size() > 0 ? ((C1140) sparseArray2.valueAt(z7 ? 1 : 0)).f4903 : -1;
                                }
                                if (z8) {
                                    c28893.m6869();
                                }
                            }
                        } else if (!c28893.f11069) {
                            c28893.m6864(i17);
                            if (c28893.f11050 != -9223372036854775807L && (i9 = c28893.f11022) != -1 && c28893.f11060 != -1) {
                                List arrayList5 = (List) sparseArray.get(i9);
                                if (arrayList5 == null) {
                                    arrayList5 = new ArrayList();
                                    sparseArray.put(c28893.f11022, arrayList5);
                                }
                                arrayList5.add(new C5504(c28893.f11050, c28893.f11032 + c28893.f11060, c28893.f11033));
                            }
                        }
                        i5 = 0;
                        r1 = interfaceC5206;
                        i2 = i5;
                    } else {
                        if (c28893.f11049 != 2) {
                            i5 = 0;
                        } else {
                            C1140 c11406 = (C1140) sparseArray2.get(c28893.f11026);
                            c11406.f4889.getClass();
                            if (c28893.f11061 > 0 && "A_OPUS".equals(c11406.f4877)) {
                                C4545 c45453 = c28893.f11059;
                                byte[] bArrArray = ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(c28893.f11061).array();
                                c45453.getClass();
                                c45453.m9600(bArrArray.length, bArrArray);
                            }
                            int i54 = 0;
                            for (int i55 = 0; i55 < c28893.f11058; i55++) {
                                i54 += c28893.f11034[i55];
                            }
                            int i56 = 0;
                            while (i56 < c28893.f11058) {
                                long j16 = c28893.f11021 + ((long) ((c11406.f4906 * i56) / 1000));
                                int i57 = c28893.f11046;
                                if (i56 == 0 && !c28893.f11023) {
                                    i57 |= 1;
                                }
                                int i58 = c28893.f11034[i56];
                                int i59 = i54 - i58;
                                c28893.m6871(c11406, j16, i57, i58, i59);
                                i56++;
                                i54 = i59;
                            }
                            i5 = 0;
                            c28893.f11049 = 0;
                        }
                        r1 = interfaceC5206;
                        i2 = i5;
                    }
                }
            }
        }
        if (z4) {
            return 0;
        }
        int i60 = 0;
        while (true) {
            SparseArray sparseArray3 = c2889.f11047;
            if (i60 >= sparseArray3.size()) {
                return -1;
            }
            C1140 c11407 = (C1140) sparseArray3.valueAt(i60);
            c11407.f4889.getClass();
            C0246 c0246 = c11407.f4856;
            if (c0246 != null) {
                c0246.m1462(c11407.f4889, c11407.f4902);
            }
            i60++;
        }
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final void m6872(int i) throws ParserException {
        if (this.f11065 != null) {
            return;
        }
        throw ParserException.m357("Element " + i + " must be in a TrackEntry", null);
    }

    @Override // defpackage.InterfaceC4291
    /* JADX INFO: renamed from: ᵻˈᵦʼ */
    public final List mo1259() {
        C2822 c2822 = AbstractC4509.f17159;
        return C2598.f10048;
    }
}
