package defpackage;

import android.net.Uri;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Pair;
import android.util.Xml;
import androidx.media3.common.ParserException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.RoundingMode;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlSerializer;

/* JADX INFO: renamed from: ᵡˆˆٴ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3196 extends DefaultHandler implements InterfaceC2793 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final XmlPullParserFactory f12140;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public static final Pattern f12136 = Pattern.compile("(\\d+)(?:/(\\d+))?");

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public static final Pattern f12135 = Pattern.compile("CC([1-4])=.*");

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static final Pattern f12137 = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public static final int[] f12138 = {2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2};

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public static final int[] f12139 = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};

    public C3196() {
        try {
            this.f12140 = XmlPullParserFactory.newInstance();
        } catch (XmlPullParserException e) {
            ᵷᵝˎ.ᵪᵹᵥᵻ("Couldn't create XmlPullParserFactory instance", e);
            throw null;
        }
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public static void m7309(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        if (xmlPullParser.getEventType() == 2) {
            int i = 1;
            while (i != 0) {
                xmlPullParser.next();
                if (xmlPullParser.getEventType() == 2) {
                    i++;
                } else if (xmlPullParser.getEventType() == 3) {
                    i--;
                }
            }
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:30:0x00fc. Please report as an issue. */
    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public static C5398 m7310(XmlPullParser xmlPullParser, String str, C5398 c5398) {
        String strSubstring;
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue == null) {
            return c5398;
        }
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        ArrayList arrayList3 = new ArrayList();
        arrayList.add("");
        int length = 0;
        while (length < attributeValue.length()) {
            int iIndexOf = attributeValue.indexOf("$", length);
            if (iIndexOf == -1) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + attributeValue.substring(length));
                length = attributeValue.length();
            } else if (iIndexOf != length) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + attributeValue.substring(length, iIndexOf));
                length = iIndexOf;
            } else if (attributeValue.startsWith("$$", length)) {
                arrayList.set(arrayList2.size(), ((String) arrayList.get(arrayList2.size())) + "$");
                length += 2;
            } else {
                arrayList3.add("");
                int i = length + 1;
                int iIndexOf2 = attributeValue.indexOf("$", i);
                String strSubstring2 = attributeValue.substring(i, iIndexOf2);
                if (strSubstring2.equals("RepresentationID")) {
                    arrayList2.add(1);
                } else {
                    int iIndexOf3 = strSubstring2.indexOf("%0");
                    if (iIndexOf3 != -1) {
                        strSubstring = strSubstring2.substring(iIndexOf3);
                        if (!strSubstring.endsWith("d") && !strSubstring.endsWith("x") && !strSubstring.endsWith("X")) {
                            strSubstring = strSubstring.concat("d");
                        }
                        strSubstring2 = strSubstring2.substring(0, iIndexOf3);
                    } else {
                        strSubstring = "%01d";
                    }
                    switch (strSubstring2) {
                        case "Number":
                            arrayList2.add(2);
                            break;
                        case "Time":
                            arrayList2.add(4);
                            break;
                        case "Bandwidth":
                            arrayList2.add(3);
                            break;
                        default:
                            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Invalid template: ".concat(attributeValue));
                            return null;
                    }
                    arrayList3.set(arrayList2.size() - 1, strSubstring);
                }
                arrayList.add("");
                length = iIndexOf2 + 1;
            }
        }
        return new C5398(arrayList, arrayList2, arrayList3, 5);
    }

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public static ArrayList m7311(XmlPullParser xmlPullParser, long j, long j2) throws XmlPullParserException, IOException {
        long j3;
        ArrayList arrayList = new ArrayList();
        long jM7322 = 0;
        long j4 = -9223372036854775807L;
        boolean z = false;
        int i = 0;
        do {
            xmlPullParser.next();
            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "S")) {
                String attributeValue = xmlPullParser.getAttributeValue(null, "t");
                long j5 = attributeValue == null ? -9223372036854775807L : Long.parseLong(attributeValue);
                if (z) {
                    int i2 = i;
                    j3 = j5;
                    jM7322 = m7322(arrayList, jM7322, j4, i2, j3);
                } else {
                    j3 = j5;
                }
                if (j3 != -9223372036854775807L) {
                    jM7322 = j3;
                }
                String attributeValue2 = xmlPullParser.getAttributeValue(null, "d");
                j4 = attributeValue2 == null ? -9223372036854775807L : Long.parseLong(attributeValue2);
                String attributeValue3 = xmlPullParser.getAttributeValue(null, "r");
                i = attributeValue3 == null ? 0 : Integer.parseInt(attributeValue3);
                z = true;
            } else {
                m7309(xmlPullParser);
            }
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "SegmentTimeline"));
        if (z) {
            String str = AbstractC0956.f4222;
            m7322(arrayList, jM7322, j4, i, AbstractC0956.m3218(j2, j, 1000L, RoundingMode.DOWN));
        }
        return arrayList;
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public static C3837 m7312(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
        String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue == null) {
            attributeValue = "";
        }
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "value");
        if (attributeValue2 == null) {
            attributeValue2 = null;
        }
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "id");
        String str2 = attributeValue3 != null ? attributeValue3 : null;
        do {
            xmlPullParser.next();
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str));
        return new C3837(attributeValue, attributeValue2, str2);
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public static int m7313(ArrayList arrayList) {
        int i = 0;
        for (int i2 = 0; i2 < arrayList.size(); i2++) {
            if (ᵻᵕᵭ.ᵱᵽʡᵚ("http://dashif.org/guidelines/trickmode", ((C3837) arrayList.get(i2)).f14647)) {
                i = 16384;
            }
        }
        return i;
    }

    /* JADX WARN: Removed duplicated region for block: B:49:0x0093 A[PHI: r13
      0x0093: PHI (r13v30 int) = (r13v5 int), (r13v8 int), (r13v33 int) binds: [B:128:0x01a3, B:120:0x0190, B:47:0x008f] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:60:0x00b3  */
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static int m7314(XmlPullParser xmlPullParser, String str) throws XmlPullParserException, IOException {
        int i;
        int i2;
        int i3;
        int iBitCount;
        String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue == null) {
            attributeValue = null;
        }
        attributeValue.getClass();
        i = 5;
        i2 = 0;
        i3 = -1;
        switch (attributeValue) {
            case "urn:dts:dash:audio_channel_configuration:2012":
            case "tag:dts.com,2014:dash:audio_channel_configuration:2012":
                String attributeValue2 = xmlPullParser.getAttributeValue(null, "value");
                iBitCount = attributeValue2 == null ? -1 : Integer.parseInt(attributeValue2);
                if (iBitCount > 0 && iBitCount < 33) {
                    i3 = iBitCount;
                    break;
                }
                break;
            case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":
                String attributeValue3 = xmlPullParser.getAttributeValue(null, "value");
                if (attributeValue3 != null && attributeValue3.length() == 6) {
                    int i4 = Integer.parseInt(attributeValue3, 16);
                    if ((8388608 & i4) != 0) {
                        String[] strArrM3238 = AbstractC0956.m3238(str);
                        if (strArrM3238.length != 0) {
                            List listM5119 = C1886.m5117('.').m5119(ᵻᵕᵭ.ʽᵡᵢᵾ(strArrM3238[0].trim()));
                            if (listM5119.size() == 4 && ((String) listM5119.get(0)).equals("ac-4")) {
                                String str2 = (String) listM5119.get(3);
                                str2.getClass();
                                if (str2.equals("03")) {
                                    i3 = 18;
                                } else if (str2.equals("04")) {
                                    i3 = 21;
                                }
                            }
                        }
                        break;
                    } else {
                        iBitCount = 0;
                        while (true) {
                            int[] iArr = f12138;
                            if (i2 < iArr.length) {
                                iBitCount += ((i4 >> i2) & 1) * iArr[i2];
                                i2++;
                            } else if (iBitCount != 0) {
                            }
                        }
                    }
                }
                break;
            case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":
                String attributeValue4 = xmlPullParser.getAttributeValue(null, "value");
                if (attributeValue4 != null) {
                    i3 = Integer.parseInt(attributeValue4);
                    break;
                }
                break;
            case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":
            case "urn:dolby:dash:audio_channel_configuration:2011":
                String attributeValue5 = xmlPullParser.getAttributeValue(null, "value");
                if (attributeValue5 == null) {
                    i = -1;
                    i3 = i;
                    break;
                } else {
                    String str3 = ᵻᵕᵭ.ʽᵡᵢᵾ(attributeValue5);
                    str3.getClass();
                    switch (str3) {
                        case "4000":
                            i = 1;
                            break;
                        case "a000":
                            i = 2;
                            break;
                        case "f801":
                            i = 6;
                            break;
                        case "fa01":
                            i = 8;
                            break;
                    }
                    i3 = i;
                    break;
                }
                break;
            case "urn:mpeg:mpegB:cicp:ChannelConfiguration":
                String attributeValue6 = xmlPullParser.getAttributeValue(null, "value");
                int i5 = attributeValue6 == null ? -1 : Integer.parseInt(attributeValue6);
                if (i5 >= 0) {
                    int[] iArr2 = f12139;
                    if (i5 < iArr2.length) {
                        i3 = iArr2[i5];
                    }
                    break;
                }
                break;
            case "tag:dts.com,2018:uhd:audio_channel_configuration":
                String attributeValue7 = xmlPullParser.getAttributeValue(null, "value");
                if (attributeValue7 != null && (iBitCount = Integer.bitCount(Integer.parseInt(attributeValue7, 16))) != 0) {
                }
                break;
        }
        do {
            xmlPullParser.next();
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "AudioChannelConfiguration"));
        return i3;
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public static int m7315(String str) {
        if (str != null) {
            switch (str) {
                case "subtitle":
                case "forced_subtitle":
                case "forced-subtitle":
                    return 128;
                case "description":
                    return 512;
                case "enhanced-audio-intelligibility":
                    return 2048;
                case "alternate":
                    return 2;
                case "dub":
                    return 16;
                case "main":
                    return 1;
                case "sign":
                    return 256;
                case "caption":
                    return 64;
                case "commentary":
                    return 8;
                case "emergency":
                    return 32;
                case "supplementary":
                    return 4;
            }
        }
        return 0;
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public static C2429 m7316(XmlPullParser xmlPullParser, C2429 c2429, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
        long j6 = c2429 != null ? c2429.f16865 : 1L;
        List arrayList = null;
        String attributeValue = xmlPullParser.getAttributeValue(null, "timescale");
        if (attributeValue != null) {
            j6 = Long.parseLong(attributeValue);
        }
        long j7 = j6;
        long j8 = c2429 != null ? c2429.f16866 : 0L;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
        if (attributeValue2 != null) {
            j8 = Long.parseLong(attributeValue2);
        }
        long j9 = j8;
        long j10 = c2429 != null ? c2429.f9214 : -9223372036854775807L;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "duration");
        if (attributeValue3 != null) {
            j10 = Long.parseLong(attributeValue3);
        }
        long j11 = j10;
        long j12 = c2429 != null ? c2429.f9216 : 1L;
        String attributeValue4 = xmlPullParser.getAttributeValue(null, "startNumber");
        if (attributeValue4 != null) {
            j12 = Long.parseLong(attributeValue4);
        }
        long j13 = j12;
        long j14 = j4 == -9223372036854775807L ? j3 : j4;
        long j15 = j14 == Long.MAX_VALUE ? -9223372036854775807L : j14;
        C4281 c4281M7319 = null;
        List listM7311 = null;
        do {
            xmlPullParser.next();
            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Initialization")) {
                c4281M7319 = m7319(xmlPullParser, "sourceURL", "range");
            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SegmentTimeline")) {
                listM7311 = m7311(xmlPullParser, j7, j2);
            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SegmentURL")) {
                if (arrayList == null) {
                    arrayList = new ArrayList();
                }
                arrayList.add(m7319(xmlPullParser, "media", "mediaRange"));
            } else {
                m7309(xmlPullParser);
            }
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "SegmentList"));
        if (c2429 != null) {
            if (c4281M7319 == null) {
                c4281M7319 = c2429.f16867;
            }
            if (listM7311 == null) {
                listM7311 = c2429.f9218;
            }
            if (arrayList == null) {
                arrayList = c2429.f9466;
            }
        }
        return new C2429(c4281M7319, j7, j9, j13, j11, listM7311, j15, arrayList, AbstractC0956.m3214(j5), AbstractC0956.m3214(j));
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public static ArrayList m7317(XmlPullParser xmlPullParser, ArrayList arrayList, boolean z) throws XmlPullParserException, IOException {
        String attributeValue = xmlPullParser.getAttributeValue(null, "dvb:priority");
        int i = attributeValue != null ? Integer.parseInt(attributeValue) : z ? 1 : Integer.MIN_VALUE;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "dvb:weight");
        int i2 = attributeValue2 != null ? Integer.parseInt(attributeValue2) : 1;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "serviceLocation");
        String text = "";
        do {
            xmlPullParser.next();
            if (xmlPullParser.getEventType() == 4) {
                text = xmlPullParser.getText();
            } else {
                m7309(xmlPullParser);
            }
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "BaseURL"));
        if (text != null && ᵶᵦ.ᵟᵹᵙ(text)[0] != -1) {
            if (attributeValue3 == null) {
                attributeValue3 = text;
            }
            return ᵫﾞˌ.ˊᵙᵾᵲ(new C1318[]{new C1318(i, i2, text, attributeValue3)});
        }
        ArrayList arrayList2 = new ArrayList();
        for (int i3 = 0; i3 < arrayList.size(); i3++) {
            C1318 c1318 = (C1318) arrayList.get(i3);
            String str = ᵶᵦ.ᵔᵖᵹᵫ(c1318.f5498, text);
            String str2 = attributeValue3 == null ? str : attributeValue3;
            if (z) {
                i = c1318.f5497;
                i2 = c1318.f5499;
                str2 = c1318.f5496;
            }
            arrayList2.add(new C1318(i, i2, str, str2));
        }
        return arrayList2;
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public static C3980 m7318(XmlPullParser xmlPullParser, C3980 c3980) throws XmlPullParserException, IOException {
        long j = c3980 != null ? c3980.f16865 : 1L;
        String attributeValue = xmlPullParser.getAttributeValue(null, "timescale");
        if (attributeValue != null) {
            j = Long.parseLong(attributeValue);
        }
        long j2 = j;
        long j3 = c3980 != null ? c3980.f16866 : 0L;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
        if (attributeValue2 != null) {
            j3 = Long.parseLong(attributeValue2);
        }
        long j4 = j3;
        long j5 = c3980 != null ? c3980.f15242 : 0L;
        long j6 = c3980 != null ? c3980.f15241 : 0L;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "indexRange");
        if (attributeValue3 != null) {
            String[] strArrSplit = attributeValue3.split("-");
            j5 = Long.parseLong(strArrSplit[0]);
            j6 = (Long.parseLong(strArrSplit[1]) - j5) + 1;
        }
        long j7 = j6;
        long j8 = j5;
        C4281 c4281M7319 = c3980 != null ? c3980.f16867 : null;
        while (true) {
            xmlPullParser.next();
            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Initialization")) {
                c4281M7319 = m7319(xmlPullParser, "sourceURL", "range");
            } else {
                m7309(xmlPullParser);
            }
            C4281 c4281 = c4281M7319;
            if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "SegmentBase")) {
                return new C3980(c4281, j2, j4, j8, j7);
            }
            c4281M7319 = c4281;
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public static C4281 m7319(XmlPullParser xmlPullParser, String str, String str2) {
        long j;
        long j2;
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
        if (attributeValue2 != null) {
            String[] strArrSplit = attributeValue2.split("-");
            j = Long.parseLong(strArrSplit[0]);
            if (strArrSplit.length == 2) {
                j2 = (Long.parseLong(strArrSplit[1]) - j) + 1;
            }
            return new C4281(j, j2, attributeValue);
        }
        j = 0;
        j2 = -1;
        return new C4281(j, j2, attributeValue);
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public static C2204 m7320(XmlPullParser xmlPullParser, C2204 c2204, List list, long j, long j2, long j3, long j4, long j5) throws XmlPullParserException, IOException {
        long j6;
        long j7 = c2204 != null ? c2204.f16865 : 1L;
        C4281 c4281M7319 = null;
        String attributeValue = xmlPullParser.getAttributeValue(null, "timescale");
        if (attributeValue != null) {
            j7 = Long.parseLong(attributeValue);
        }
        long j8 = j7;
        long j9 = c2204 != null ? c2204.f16866 : 0L;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
        if (attributeValue2 != null) {
            j9 = Long.parseLong(attributeValue2);
        }
        long j10 = j9;
        long j11 = c2204 != null ? c2204.f9214 : -9223372036854775807L;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "duration");
        if (attributeValue3 != null) {
            j11 = Long.parseLong(attributeValue3);
        }
        long j12 = j11;
        long j13 = c2204 != null ? c2204.f9216 : 1L;
        String attributeValue4 = xmlPullParser.getAttributeValue(null, "startNumber");
        if (attributeValue4 != null) {
            j13 = Long.parseLong(attributeValue4);
        }
        long j14 = j13;
        int i = 0;
        while (true) {
            if (i >= list.size()) {
                j6 = -1;
                break;
            }
            C3837 c3837 = (C3837) list.get(i);
            if (ᵻᵕᵭ.ᵱᵽʡᵚ("http://dashif.org/guidelines/last-segment-number", c3837.f14647)) {
                j6 = Long.parseLong(c3837.f14645);
                break;
            }
            i++;
        }
        long j15 = j6;
        long j16 = j4 == -9223372036854775807L ? j3 : j4;
        long j17 = j16 == Long.MAX_VALUE ? -9223372036854775807L : j16;
        C5398 c5398M7310 = m7310(xmlPullParser, "media", c2204 != null ? c2204.f8761 : null);
        C5398 c5398M73102 = m7310(xmlPullParser, "initialization", c2204 != null ? c2204.f8760 : null);
        List listM7311 = null;
        do {
            xmlPullParser.next();
            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Initialization")) {
                c4281M7319 = m7319(xmlPullParser, "sourceURL", "range");
            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SegmentTimeline")) {
                listM7311 = m7311(xmlPullParser, j8, j2);
            } else {
                m7309(xmlPullParser);
            }
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "SegmentTemplate"));
        if (c2204 != null) {
            if (c4281M7319 == null) {
                c4281M7319 = c2204.f16867;
            }
            if (listM7311 == null) {
                listM7311 = c2204.f9218;
            }
        }
        return new C2204(c4281M7319, j8, j10, j14, j15, j12, listM7311, j17, c5398M73102, c5398M7310, AbstractC0956.m3214(j5), AbstractC0956.m3214(j));
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static float m7321(XmlPullParser xmlPullParser, float f) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
        if (attributeValue != null) {
            Matcher matcher = f12136.matcher(attributeValue);
            if (matcher.matches()) {
                int i = Integer.parseInt(matcher.group(1));
                return !TextUtils.isEmpty(matcher.group(2)) ? i / Integer.parseInt(r2) : i;
            }
        }
        return f;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public static long m7322(ArrayList arrayList, long j, long j2, int i, long j3) {
        int i2;
        if (i >= 0) {
            i2 = i + 1;
        } else {
            String str = AbstractC0956.f4222;
            i2 = (int) ((((j3 - j) + j2) - 1) / j2);
        }
        for (int i3 = 0; i3 < i2; i3++) {
            arrayList.add(new C4327(j, j2));
            j += j2;
        }
        return j;
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public static int m7323(XmlPullParser xmlPullParser) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
        if (TextUtils.isEmpty(attributeValue)) {
            return -1;
        }
        if ("audio".equals(attributeValue)) {
            return 1;
        }
        if ("video".equals(attributeValue)) {
            return 2;
        }
        if ("text".equals(attributeValue)) {
            return 3;
        }
        return "image".equals(attributeValue) ? 4 : -1;
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* 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:318:0x0960  */
    /* JADX WARN: Removed duplicated region for block: B:334:0x09a8  */
    /* JADX WARN: Removed duplicated region for block: B:336:0x09b1  */
    /* JADX WARN: Removed duplicated region for block: B:339:0x09ba  */
    /* JADX WARN: Removed duplicated region for block: B:344:0x09cf  */
    /* JADX WARN: Removed duplicated region for block: B:348:0x09dd  */
    /* JADX WARN: Removed duplicated region for block: B:378:0x0a74  */
    /* JADX WARN: Removed duplicated region for block: B:381:0x0a7e  */
    /* JADX WARN: Removed duplicated region for block: B:493:0x0cb6 A[LOOP:11: B:252:0x06b7->B:493:0x0cb6, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:590:0x0fc8 A[LOOP:5: B:159:0x0411->B:590:0x0fc8, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:716:0x13aa A[LOOP:1: B:45:0x00cd->B:716:0x13aa, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:724:0x1376 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:728:0x0e61 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:747:0x0915 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:753:0x0a12 A[SYNTHETIC] */
    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static C2906 m7324(XmlPullParser xmlPullParser, Uri uri) throws XmlPullParserException, IOException {
        int i;
        boolean z;
        int i2;
        int i3;
        ArrayList arrayList;
        boolean z2;
        long j;
        long j2;
        ArrayList arrayList2;
        long j3;
        long j4;
        ArrayList arrayList3;
        long j5;
        ArrayList arrayList4;
        String str;
        String str2;
        String str3;
        ArrayList arrayList5;
        ArrayList arrayList6;
        long j6;
        ArrayList arrayList7;
        String str4;
        long j7;
        long j8;
        String str5;
        String str6;
        String str7;
        long j9;
        ByteArrayOutputStream byteArrayOutputStream;
        String str8;
        String str9;
        long j10;
        String str10;
        String str11;
        long j11;
        ByteArrayOutputStream byteArrayOutputStream2;
        ArrayList arrayList8;
        long j12;
        ArrayList arrayList9;
        ArrayList arrayList10;
        ArrayList arrayList11;
        ArrayList arrayList12;
        String str12;
        String str13;
        String str14;
        float f;
        String str15;
        String str16;
        String str17;
        ArrayList arrayList13;
        ArrayList arrayList14;
        String str18;
        String str19;
        String str20;
        long j13;
        String str21;
        String str22;
        String str23;
        String str24;
        int i4;
        ArrayList arrayList15;
        long j14;
        ArrayList arrayList16;
        long j15;
        ArrayList arrayList17;
        String str25;
        int i5;
        String str26;
        String str27;
        ArrayList arrayList18;
        int i6;
        String str28;
        String str29;
        String str30;
        int i7;
        String str31;
        float f2;
        int i8;
        String str32;
        String str33;
        String str34;
        String str35;
        String str36;
        String str37;
        ArrayList arrayList19;
        int i9;
        String str38;
        int i10;
        int i11;
        ArrayList arrayList20;
        String str39;
        ArrayList arrayList21;
        long j16;
        ArrayList arrayList22;
        long j17;
        String str40;
        ArrayList arrayList23;
        long j18;
        String str41;
        ArrayList arrayList24;
        long j19;
        ArrayList arrayList25;
        String str42;
        AbstractC4434 abstractC4434M7316;
        int i12;
        String str43;
        String strM9133;
        String str44;
        ArrayList arrayList26;
        String str45;
        String str46;
        C3281 c3281;
        int i13;
        ArrayList arrayList27;
        Pair pairCreate;
        int i14;
        String str47;
        int i15;
        int iM7315;
        String str48;
        long j20;
        String str49;
        AbstractC0841 c0847;
        String str50;
        ArrayList arrayList28;
        long j21;
        int i16 = 0;
        String[] strArrSplit = new String[0];
        String str51 = null;
        String attributeValue = xmlPullParser.getAttributeValue(null, "profiles");
        if (attributeValue != null) {
            strArrSplit = attributeValue.split(",");
        }
        int length = strArrSplit.length;
        int i17 = 0;
        while (true) {
            i = 1;
            if (i17 >= length) {
                z = false;
                break;
            }
            if (strArrSplit[i17].startsWith("urn:dvb:dash:profile:dvb-dash:")) {
                z = true;
                break;
            }
            i17++;
        }
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "availabilityStartTime");
        long j22 = -9223372036854775807L;
        long jM3213 = attributeValue2 == null ? -9223372036854775807L : AbstractC0956.m3213(attributeValue2);
        long jM7326 = m7326(xmlPullParser, "mediaPresentationDuration", -9223372036854775807L);
        long jM73262 = m7326(xmlPullParser, "minBufferTime", -9223372036854775807L);
        boolean zEquals = "dynamic".equals(xmlPullParser.getAttributeValue(null, "type"));
        long jM73263 = zEquals ? m7326(xmlPullParser, "minimumUpdatePeriod", -9223372036854775807L) : -9223372036854775807L;
        long jM73264 = zEquals ? m7326(xmlPullParser, "timeShiftBufferDepth", -9223372036854775807L) : -9223372036854775807L;
        long jM73265 = zEquals ? m7326(xmlPullParser, "suggestedPresentationDelay", -9223372036854775807L) : -9223372036854775807L;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "publishTime");
        long jM32132 = attributeValue3 == null ? -9223372036854775807L : AbstractC0956.m3213(attributeValue3);
        long jM7325 = zEquals ? 0L : -9223372036854775807L;
        ArrayList arrayList29 = ᵫﾞˌ.ˊᵙᵾᵲ(new C1318[]{new C1318(z ? 1 : Integer.MIN_VALUE, 1, uri.toString(), uri.toString())});
        ArrayList arrayList30 = new ArrayList();
        ArrayList arrayList31 = new ArrayList();
        long j23 = zEquals ? -9223372036854775807L : 0L;
        int i18 = 0;
        int i19 = 0;
        C2459 c2459 = null;
        C0946 c0946 = null;
        Uri uri2 = null;
        C0288 c0288 = null;
        while (true) {
            xmlPullParser.next();
            String str52 = "BaseURL";
            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "BaseURL")) {
                if (i18 == 0) {
                    jM7325 = m7325(xmlPullParser, jM7325);
                    i18 = i;
                }
                arrayList31.addAll(m7317(xmlPullParser, arrayList29, z));
                arrayList = arrayList29;
                arrayList2 = arrayList31;
                j4 = j23;
                z2 = z;
                i2 = i16;
                i3 = i;
                arrayList3 = arrayList30;
                j2 = j22;
            } else {
                i2 = i16;
                i3 = i;
                String str53 = "lang";
                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "ProgramInformation")) {
                    String attributeValue4 = xmlPullParser.getAttributeValue(str51, "moreInformationURL");
                    String str54 = attributeValue4 == null ? str51 : attributeValue4;
                    String attributeValue5 = xmlPullParser.getAttributeValue(str51, "lang");
                    String str55 = attributeValue5 == null ? str51 : attributeValue5;
                    String strNextText = str51;
                    String strNextText2 = strNextText;
                    String strNextText3 = strNextText2;
                    while (true) {
                        xmlPullParser.next();
                        long j24 = j22;
                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Title")) {
                            strNextText = xmlPullParser.nextText();
                        } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Source")) {
                            strNextText2 = xmlPullParser.nextText();
                        } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Copyright")) {
                            strNextText3 = xmlPullParser.nextText();
                        } else {
                            m7309(xmlPullParser);
                        }
                        String str56 = strNextText;
                        String str57 = strNextText2;
                        String str58 = strNextText3;
                        if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "ProgramInformation")) {
                            C2459 c24592 = new C2459(str56, str57, str58, str54, str55);
                            arrayList = arrayList29;
                            arrayList2 = arrayList31;
                            z2 = z;
                            c2459 = c24592;
                            j2 = j24;
                            j4 = j23;
                            j = jM73264;
                        } else {
                            strNextText = str56;
                            strNextText2 = str57;
                            strNextText3 = str58;
                            j22 = j24;
                        }
                    }
                } else {
                    long j25 = j22;
                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "UTCTiming")) {
                        arrayList = arrayList29;
                        arrayList2 = arrayList31;
                        j4 = j23;
                        c0946 = new C0946(xmlPullParser.getAttributeValue(str51, "schemeIdUri"), xmlPullParser.getAttributeValue(str51, "value"));
                    } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Location")) {
                        uri2 = ᵶᵦ.ᵯᵷʽ(uri.toString(), xmlPullParser.nextText());
                        arrayList = arrayList29;
                        arrayList2 = arrayList31;
                        j4 = j23;
                    } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "ServiceDescription")) {
                        float f3 = -3.4028235E38f;
                        float f4 = -3.4028235E38f;
                        long j26 = j25;
                        long j27 = j26;
                        long j28 = j27;
                        while (true) {
                            xmlPullParser.next();
                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Latency")) {
                                arrayList = arrayList29;
                                String attributeValue6 = xmlPullParser.getAttributeValue(null, "target");
                                j26 = attributeValue6 == null ? j25 : Long.parseLong(attributeValue6);
                                String attributeValue7 = xmlPullParser.getAttributeValue(null, "min");
                                j27 = attributeValue7 == null ? j25 : Long.parseLong(attributeValue7);
                                String attributeValue8 = xmlPullParser.getAttributeValue(null, "max");
                                j28 = attributeValue8 == null ? j25 : Long.parseLong(attributeValue8);
                            } else {
                                arrayList = arrayList29;
                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "PlaybackRate")) {
                                    String attributeValue9 = xmlPullParser.getAttributeValue(null, "min");
                                    f3 = attributeValue9 == null ? -3.4028235E38f : Float.parseFloat(attributeValue9);
                                    String attributeValue10 = xmlPullParser.getAttributeValue(null, "max");
                                    f4 = attributeValue10 == null ? -3.4028235E38f : Float.parseFloat(attributeValue10);
                                }
                            }
                            long j29 = j26;
                            long j30 = jM7325;
                            long j31 = j27;
                            long j32 = jM73264;
                            long j33 = j28;
                            if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "ServiceDescription")) {
                                C0288 c02882 = new C0288();
                                c02882.f1931 = j29;
                                c02882.f1928 = j31;
                                c02882.f1929 = j33;
                                c02882.f1932 = f3;
                                c02882.f1930 = f4;
                                c0288 = c02882;
                                z2 = z;
                                jM7325 = j30;
                                j = j32;
                                j2 = j25;
                                arrayList2 = arrayList31;
                                j4 = j23;
                            } else {
                                j28 = j33;
                                jM73264 = j32;
                                arrayList29 = arrayList;
                                j27 = j31;
                                jM7325 = j30;
                                j26 = j29;
                            }
                        }
                    } else {
                        arrayList = arrayList29;
                        long j34 = jM7325;
                        long j35 = jM73264;
                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Period") && i19 == 0) {
                            ArrayList arrayList32 = !arrayList31.isEmpty() ? arrayList31 : arrayList;
                            String str59 = "id";
                            String attributeValue11 = xmlPullParser.getAttributeValue(null, "id");
                            long jM73266 = m7326(xmlPullParser, "start", j23);
                            String str60 = "duration";
                            String str61 = "schemeIdUri";
                            long j36 = jM3213 != j25 ? jM3213 + jM73266 : j25;
                            long jM73267 = m7326(xmlPullParser, "duration", j25);
                            ArrayList arrayList33 = new ArrayList();
                            ArrayList arrayList34 = new ArrayList();
                            ArrayList arrayList35 = new ArrayList();
                            long j37 = j25;
                            String str62 = "value";
                            String str63 = "Period";
                            int i20 = i2;
                            long jM73252 = j34;
                            AbstractC4434 abstractC4434M7320 = null;
                            while (true) {
                                xmlPullParser.next();
                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str52)) {
                                    if (i20 == 0) {
                                        jM73252 = m7325(xmlPullParser, jM73252);
                                        i20 = i3;
                                    }
                                    arrayList35.addAll(m7317(xmlPullParser, arrayList32, z));
                                    arrayList4 = arrayList32;
                                    str5 = str59;
                                    str = str52;
                                    str2 = str60;
                                    str4 = str61;
                                    z2 = z;
                                    j5 = jM73252;
                                    str3 = str53;
                                    j = j35;
                                    j7 = j36;
                                    arrayList7 = arrayList33;
                                    arrayList5 = arrayList34;
                                    str6 = str63;
                                    j2 = -9223372036854775807L;
                                    arrayList6 = arrayList35;
                                    arrayList2 = arrayList31;
                                    j3 = j34;
                                    j8 = jM73267;
                                    j6 = j23;
                                } else {
                                    j5 = jM73252;
                                    String str64 = "SegmentTemplate";
                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "AdaptationSet")) {
                                        if (arrayList35.isEmpty()) {
                                            arrayList8 = arrayList32;
                                            arrayList4 = arrayList8;
                                        } else {
                                            arrayList4 = arrayList32;
                                            arrayList8 = arrayList35;
                                        }
                                        String attributeValue12 = xmlPullParser.getAttributeValue(null, str59);
                                        long j38 = attributeValue12 == null ? -1L : Long.parseLong(attributeValue12);
                                        int iM7323 = m7323(xmlPullParser);
                                        String str65 = "AdaptationSet";
                                        String attributeValue13 = xmlPullParser.getAttributeValue(null, "mimeType");
                                        ArrayList arrayList36 = arrayList35;
                                        ArrayList arrayList37 = arrayList31;
                                        String attributeValue14 = xmlPullParser.getAttributeValue(null, "codecs");
                                        long j39 = j23;
                                        String attributeValue15 = xmlPullParser.getAttributeValue(null, "scte214:supplementalCodecs");
                                        String attributeValue16 = xmlPullParser.getAttributeValue(null, "scte214:supplementalProfiles");
                                        String str66 = str60;
                                        String attributeValue17 = xmlPullParser.getAttributeValue(null, "width");
                                        int i21 = attributeValue17 == null ? -1 : Integer.parseInt(attributeValue17);
                                        String str67 = str61;
                                        String attributeValue18 = xmlPullParser.getAttributeValue(null, "height");
                                        int i22 = attributeValue18 == null ? -1 : Integer.parseInt(attributeValue18);
                                        float fM7321 = m7321(xmlPullParser, -1.0f);
                                        String str68 = "SegmentList";
                                        String str69 = "SegmentBase";
                                        String attributeValue19 = xmlPullParser.getAttributeValue(null, "audioSamplingRate");
                                        int i23 = attributeValue19 == null ? -1 : Integer.parseInt(attributeValue19);
                                        String attributeValue20 = xmlPullParser.getAttributeValue(null, str53);
                                        String str70 = "audioSamplingRate";
                                        String attributeValue21 = xmlPullParser.getAttributeValue(null, "label");
                                        ArrayList arrayList38 = new ArrayList();
                                        String str71 = attributeValue21;
                                        ArrayList arrayList39 = new ArrayList();
                                        ArrayList arrayList40 = arrayList38;
                                        ArrayList arrayList41 = new ArrayList();
                                        ArrayList arrayList42 = new ArrayList();
                                        float f5 = fM7321;
                                        ArrayList arrayList43 = new ArrayList();
                                        String str72 = "height";
                                        ArrayList arrayList44 = new ArrayList();
                                        String str73 = "width";
                                        ArrayList arrayList45 = new ArrayList();
                                        String str74 = "scte214:supplementalProfiles";
                                        ArrayList arrayList46 = new ArrayList();
                                        ArrayList arrayList47 = new ArrayList();
                                        String str75 = str59;
                                        String str76 = "mimeType";
                                        String str77 = "codecs";
                                        int i24 = i2;
                                        AbstractC4434 abstractC4434M73202 = abstractC4434M7320;
                                        long j40 = j37;
                                        long jM73253 = j5;
                                        String str78 = attributeValue20;
                                        int iM7314 = -1;
                                        String str79 = "scte214:supplementalCodecs";
                                        int i25 = iM7323;
                                        String str80 = null;
                                        while (true) {
                                            xmlPullParser.next();
                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str52)) {
                                                if (i24 == 0) {
                                                    jM73253 = m7325(xmlPullParser, jM73253);
                                                    i24 = i3;
                                                }
                                                j12 = jM73253;
                                                arrayList47.addAll(m7317(xmlPullParser, arrayList8, z));
                                            } else {
                                                j12 = jM73253;
                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "ContentProtection")) {
                                                    Pair pairM7327 = m7327(xmlPullParser);
                                                    Object obj = pairM7327.first;
                                                    if (obj != null) {
                                                        str80 = (String) obj;
                                                    }
                                                    Object obj2 = pairM7327.second;
                                                    if (obj2 != null) {
                                                        arrayList39.add((C4386) obj2);
                                                    }
                                                } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "ContentComponent")) {
                                                    String attributeValue22 = xmlPullParser.getAttributeValue(null, str53);
                                                    if (str78 == null) {
                                                        str78 = attributeValue22;
                                                    } else if (attributeValue22 != null) {
                                                        ᵻᵪ.ˌᴵ(str78.equals(attributeValue22));
                                                    }
                                                    int iM73232 = m7323(xmlPullParser);
                                                    if (i25 == -1) {
                                                        i25 = iM73232;
                                                    } else if (iM73232 != -1) {
                                                        ᵻᵪ.ˌᴵ(i25 == iM73232 ? i3 : i2);
                                                    }
                                                    arrayList11 = arrayList44;
                                                    arrayList12 = arrayList8;
                                                    str24 = str78;
                                                    str = str52;
                                                    z2 = z;
                                                    arrayList9 = arrayList39;
                                                    arrayList10 = arrayList42;
                                                    j14 = j36;
                                                    arrayList7 = arrayList33;
                                                    arrayList5 = arrayList34;
                                                    str26 = str65;
                                                    arrayList6 = arrayList36;
                                                    str2 = str66;
                                                    str14 = str67;
                                                    str22 = str68;
                                                    str23 = str69;
                                                    arrayList17 = arrayList40;
                                                    f = f5;
                                                    str15 = str73;
                                                    str16 = str74;
                                                    str17 = str75;
                                                    i5 = i25;
                                                    arrayList13 = arrayList47;
                                                    str25 = str53;
                                                    str12 = str64;
                                                    str18 = str79;
                                                    str19 = str77;
                                                    str20 = str76;
                                                    arrayList14 = arrayList45;
                                                    j13 = jM73267;
                                                    str21 = attributeValue14;
                                                    arrayList15 = arrayList43;
                                                    j = j35;
                                                    arrayList2 = arrayList37;
                                                    arrayList16 = arrayList41;
                                                    j3 = j34;
                                                    j6 = j39;
                                                    if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                                        i3 = 1;
                                                        str65 = str26;
                                                        arrayList40 = arrayList17;
                                                        arrayList41 = arrayList16;
                                                        str69 = str23;
                                                        j39 = j6;
                                                        arrayList37 = arrayList2;
                                                        j34 = j3;
                                                        attributeValue14 = str21;
                                                        arrayList45 = arrayList14;
                                                        arrayList47 = arrayList13;
                                                        jM73253 = j12;
                                                        arrayList42 = arrayList10;
                                                        arrayList44 = arrayList11;
                                                        f5 = f;
                                                        str52 = str;
                                                        arrayList33 = arrayList7;
                                                        arrayList34 = arrayList5;
                                                        str67 = str14;
                                                        str66 = str2;
                                                        j35 = j;
                                                        str68 = str22;
                                                        str64 = str12;
                                                        arrayList43 = arrayList15;
                                                        z = z2;
                                                        jM73267 = j13;
                                                        arrayList39 = arrayList9;
                                                        str75 = str17;
                                                        str53 = str25;
                                                        i25 = i5;
                                                        str76 = str20;
                                                        arrayList36 = arrayList6;
                                                        str77 = str19;
                                                        str79 = str18;
                                                        j36 = j14;
                                                        str74 = str16;
                                                        arrayList8 = arrayList12;
                                                        str78 = str24;
                                                        str73 = str15;
                                                    } else {
                                                        ArrayList arrayList48 = new ArrayList(arrayList46.size());
                                                        int i26 = i2;
                                                        while (i26 < arrayList46.size()) {
                                                            ArrayList arrayList49 = arrayList46;
                                                            C4303 c4303 = (C4303) arrayList49.get(i26);
                                                            C4753 c4753M10878 = c4303.f16393.m10878();
                                                            if (str71 == null || !arrayList17.isEmpty()) {
                                                                str48 = str71;
                                                                c4753M10878.f18105 = AbstractC4509.m9559(arrayList17);
                                                            } else {
                                                                str48 = str71;
                                                                c4753M10878.f18089 = str48;
                                                            }
                                                            String str81 = c4303.f16394;
                                                            if (str81 == null) {
                                                                str81 = str80;
                                                            }
                                                            ArrayList arrayList50 = c4303.f16392;
                                                            int i27 = i26;
                                                            arrayList50.addAll(arrayList9);
                                                            ArrayList arrayList51 = arrayList17;
                                                            if (arrayList50.isEmpty()) {
                                                                j20 = j14;
                                                                str49 = str25;
                                                                arrayList46 = arrayList49;
                                                            } else {
                                                                int i28 = i2;
                                                                while (true) {
                                                                    if (i28 < arrayList50.size()) {
                                                                        C4386 c4386 = (C4386) arrayList50.get(i28);
                                                                        j20 = j14;
                                                                        if (!AbstractC3361.f12878.equals(c4386.f16666) || (str50 = c4386.f16665) == null) {
                                                                            i28++;
                                                                            j14 = j20;
                                                                        } else {
                                                                            arrayList50.remove(i28);
                                                                        }
                                                                    } else {
                                                                        j20 = j14;
                                                                        str50 = null;
                                                                    }
                                                                }
                                                                if (str50 != null) {
                                                                    int i29 = i2;
                                                                    while (i29 < arrayList50.size()) {
                                                                        C4386 c43862 = (C4386) arrayList50.get(i29);
                                                                        String str82 = str25;
                                                                        if (AbstractC3361.f12877.equals(c43862.f16666) && c43862.f16665 == null) {
                                                                            arrayList28 = arrayList49;
                                                                            arrayList50.set(i29, new C4386(AbstractC3361.f12878, str50, c43862.f16667, c43862.f16668));
                                                                        } else {
                                                                            arrayList28 = arrayList49;
                                                                        }
                                                                        i29++;
                                                                        arrayList49 = arrayList28;
                                                                        str25 = str82;
                                                                    }
                                                                }
                                                                str49 = str25;
                                                                arrayList46 = arrayList49;
                                                                for (int size = arrayList50.size() - 1; size >= 0; size--) {
                                                                    C4386 c43863 = (C4386) arrayList50.get(size);
                                                                    if (c43863.f16668 == null) {
                                                                        int i30 = i2;
                                                                        while (true) {
                                                                            if (i30 < arrayList50.size()) {
                                                                                C4386 c43864 = (C4386) arrayList50.get(i30);
                                                                                if (c43864.f16668 != null && c43863.f16668 == null && c43864.m9401(c43863.f16666)) {
                                                                                    arrayList50.remove(size);
                                                                                } else {
                                                                                    i30++;
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                                c4753M10878.f18096 = new C5576(str81, arrayList50);
                                                            }
                                                            ArrayList arrayList52 = c4303.f16395;
                                                            arrayList52.addAll(arrayList16);
                                                            C5286 c5286 = new C5286(c4753M10878);
                                                            AbstractC4509 abstractC4509 = c4303.f16390;
                                                            AbstractC4434 abstractC4434 = c4303.f16391;
                                                            if (abstractC4434 instanceof C3980) {
                                                                c0847 = new C3466(c5286, abstractC4509, (C3980) abstractC4434, arrayList52);
                                                            } else {
                                                                if (!(abstractC4434 instanceof AbstractC2349)) {
                                                                    ᵕᵩʽᵲ.ᵮᵣᵗˈ("segmentBase must be of type SingleSegmentBase or MultiSegmentBase");
                                                                    return null;
                                                                }
                                                                c0847 = new C0847(c5286, abstractC4509, (AbstractC2349) abstractC4434, arrayList52);
                                                            }
                                                            arrayList48.add(c0847);
                                                            i26 = i27 + 1;
                                                            str71 = str48;
                                                            j14 = j20;
                                                            arrayList17 = arrayList51;
                                                            str25 = str49;
                                                        }
                                                        str3 = str25;
                                                        i3 = 1;
                                                        arrayList7.add(new C2104(j38, i5, arrayList48, arrayList10, arrayList11, arrayList14));
                                                        j7 = j14;
                                                        j8 = j13;
                                                        str4 = str14;
                                                        str5 = str17;
                                                        j2 = -9223372036854775807L;
                                                    }
                                                } else {
                                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Role")) {
                                                        arrayList43.add(m7312(xmlPullParser, "Role"));
                                                    } else {
                                                        String str83 = "AudioChannelConfiguration";
                                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "AudioChannelConfiguration")) {
                                                            arrayList11 = arrayList44;
                                                            iM7314 = m7314(xmlPullParser, attributeValue14);
                                                            arrayList12 = arrayList8;
                                                            str24 = str78;
                                                            str = str52;
                                                            z2 = z;
                                                            arrayList9 = arrayList39;
                                                            arrayList10 = arrayList42;
                                                            j14 = j36;
                                                            arrayList7 = arrayList33;
                                                            arrayList5 = arrayList34;
                                                            str26 = str65;
                                                            arrayList6 = arrayList36;
                                                            str2 = str66;
                                                            str14 = str67;
                                                            str22 = str68;
                                                            str23 = str69;
                                                            arrayList17 = arrayList40;
                                                            f = f5;
                                                            str15 = str73;
                                                            str16 = str74;
                                                            str17 = str75;
                                                            i5 = i25;
                                                            arrayList13 = arrayList47;
                                                            str25 = str53;
                                                            str12 = str64;
                                                            str18 = str79;
                                                            str19 = str77;
                                                            str20 = str76;
                                                            arrayList14 = arrayList45;
                                                            j13 = jM73267;
                                                            str21 = attributeValue14;
                                                            arrayList15 = arrayList43;
                                                            j = j35;
                                                            arrayList2 = arrayList37;
                                                            arrayList16 = arrayList41;
                                                            j3 = j34;
                                                            j6 = j39;
                                                            if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                                            }
                                                        } else {
                                                            String str84 = "ContentProtection";
                                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Accessibility")) {
                                                                arrayList42.add(m7312(xmlPullParser, "Accessibility"));
                                                            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "EssentialProperty")) {
                                                                arrayList44.add(m7312(xmlPullParser, "EssentialProperty"));
                                                            } else {
                                                                arrayList9 = arrayList39;
                                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SupplementalProperty")) {
                                                                    arrayList45.add(m7312(xmlPullParser, "SupplementalProperty"));
                                                                    arrayList11 = arrayList44;
                                                                    arrayList12 = arrayList8;
                                                                    str24 = str78;
                                                                    i4 = i25;
                                                                    str = str52;
                                                                    z2 = z;
                                                                    arrayList10 = arrayList42;
                                                                    str25 = str53;
                                                                    j14 = j36;
                                                                    arrayList7 = arrayList33;
                                                                    arrayList5 = arrayList34;
                                                                    str12 = str64;
                                                                    str13 = str65;
                                                                    arrayList6 = arrayList36;
                                                                    str2 = str66;
                                                                    str14 = str67;
                                                                    str22 = str68;
                                                                    str23 = str69;
                                                                    arrayList17 = arrayList40;
                                                                    f = f5;
                                                                    str15 = str73;
                                                                    str16 = str74;
                                                                    str17 = str75;
                                                                    j15 = j40;
                                                                    arrayList13 = arrayList47;
                                                                    arrayList14 = arrayList45;
                                                                    str18 = str79;
                                                                    str19 = str77;
                                                                    str20 = str76;
                                                                    j13 = jM73267;
                                                                    str21 = attributeValue14;
                                                                    arrayList15 = arrayList43;
                                                                    j = j35;
                                                                    arrayList2 = arrayList37;
                                                                    arrayList16 = arrayList41;
                                                                    j3 = j34;
                                                                    j6 = j39;
                                                                    j40 = j15;
                                                                    i5 = i4;
                                                                    str26 = str13;
                                                                    if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                                                    }
                                                                } else {
                                                                    String str85 = str53;
                                                                    arrayList10 = arrayList42;
                                                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Representation")) {
                                                                        arrayList12 = arrayList8;
                                                                        if (arrayList47.isEmpty()) {
                                                                            str27 = "Representation";
                                                                            arrayList18 = arrayList12;
                                                                        } else {
                                                                            str27 = "Representation";
                                                                            arrayList18 = arrayList47;
                                                                        }
                                                                        String str86 = "SupplementalProperty";
                                                                        String str87 = str75;
                                                                        String str88 = "EssentialProperty";
                                                                        String attributeValue23 = xmlPullParser.getAttributeValue(null, str87);
                                                                        String str89 = str87;
                                                                        String attributeValue24 = xmlPullParser.getAttributeValue(null, "bandwidth");
                                                                        if (attributeValue24 == null) {
                                                                            str28 = str76;
                                                                            i6 = -1;
                                                                        } else {
                                                                            String str90 = str76;
                                                                            i6 = Integer.parseInt(attributeValue24);
                                                                            str28 = str90;
                                                                        }
                                                                        String attributeValue25 = xmlPullParser.getAttributeValue(null, str28);
                                                                        String str91 = str77;
                                                                        str20 = str28;
                                                                        String str92 = attributeValue25 == null ? attributeValue13 : attributeValue25;
                                                                        String attributeValue26 = xmlPullParser.getAttributeValue(null, str91);
                                                                        String str93 = str79;
                                                                        str19 = str91;
                                                                        String str94 = attributeValue26 == null ? attributeValue14 : attributeValue26;
                                                                        String attributeValue27 = xmlPullParser.getAttributeValue(null, str93);
                                                                        String str95 = str74;
                                                                        str18 = str93;
                                                                        String str96 = attributeValue27 == null ? attributeValue15 : attributeValue27;
                                                                        String attributeValue28 = xmlPullParser.getAttributeValue(null, str95);
                                                                        String str97 = str73;
                                                                        str16 = str95;
                                                                        String str98 = attributeValue28 == null ? attributeValue16 : attributeValue28;
                                                                        String attributeValue29 = xmlPullParser.getAttributeValue(null, str97);
                                                                        if (attributeValue29 == null) {
                                                                            String str99 = str72;
                                                                            str29 = str97;
                                                                            str30 = str99;
                                                                            i7 = i21;
                                                                        } else {
                                                                            String str100 = str72;
                                                                            str29 = str97;
                                                                            str30 = str100;
                                                                            i7 = Integer.parseInt(attributeValue29);
                                                                        }
                                                                        String attributeValue30 = xmlPullParser.getAttributeValue(null, str30);
                                                                        if (attributeValue30 == null) {
                                                                            float f6 = f5;
                                                                            str31 = str30;
                                                                            f2 = f6;
                                                                            i8 = i22;
                                                                        } else {
                                                                            float f7 = f5;
                                                                            str31 = str30;
                                                                            f2 = f7;
                                                                            i8 = Integer.parseInt(attributeValue30);
                                                                        }
                                                                        String str101 = "InbandEventStream";
                                                                        float fM73212 = m7321(xmlPullParser, f2);
                                                                        String str102 = str70;
                                                                        String attributeValue31 = xmlPullParser.getAttributeValue(null, str102);
                                                                        int i31 = attributeValue31 == null ? i23 : Integer.parseInt(attributeValue31);
                                                                        str70 = str102;
                                                                        ArrayList arrayList53 = new ArrayList();
                                                                        ArrayList arrayList54 = new ArrayList();
                                                                        ArrayList arrayList55 = new ArrayList(arrayList44);
                                                                        ArrayList arrayList56 = new ArrayList(arrayList45);
                                                                        ArrayList arrayList57 = new ArrayList();
                                                                        arrayList11 = arrayList44;
                                                                        int i32 = i31;
                                                                        String str103 = attributeValue14;
                                                                        int i33 = i25;
                                                                        int i34 = i2;
                                                                        AbstractC4434 abstractC44342 = abstractC4434M73202;
                                                                        long j41 = j40;
                                                                        int iM73142 = iM7314;
                                                                        long jM73254 = j12;
                                                                        String str104 = null;
                                                                        while (true) {
                                                                            xmlPullParser.next();
                                                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str52)) {
                                                                                if (i34 == 0) {
                                                                                    jM73254 = m7325(xmlPullParser, jM73254);
                                                                                    i34 = i3;
                                                                                }
                                                                                f = f2;
                                                                                arrayList57.addAll(m7317(xmlPullParser, arrayList18, z));
                                                                            } else {
                                                                                f = f2;
                                                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str83)) {
                                                                                    iM73142 = m7314(xmlPullParser, str94);
                                                                                } else {
                                                                                    String str105 = str69;
                                                                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str105)) {
                                                                                        str32 = str83;
                                                                                        str34 = str105;
                                                                                        str35 = str78;
                                                                                        str = str52;
                                                                                        z2 = z;
                                                                                        str36 = str94;
                                                                                        arrayList7 = arrayList33;
                                                                                        arrayList5 = arrayList34;
                                                                                        str37 = str65;
                                                                                        str2 = str66;
                                                                                        str14 = str67;
                                                                                        str33 = str68;
                                                                                        str15 = str29;
                                                                                        arrayList19 = arrayList46;
                                                                                        i9 = i6;
                                                                                        str38 = str84;
                                                                                        str42 = str27;
                                                                                        str17 = str89;
                                                                                        str40 = str101;
                                                                                        i10 = i33;
                                                                                        abstractC4434M7316 = m7318(xmlPullParser, (C3980) abstractC44342);
                                                                                        arrayList25 = arrayList56;
                                                                                        i11 = i32;
                                                                                        arrayList13 = arrayList47;
                                                                                        arrayList20 = arrayList57;
                                                                                        arrayList22 = arrayList18;
                                                                                        str12 = str64;
                                                                                        str72 = str31;
                                                                                        str39 = str88;
                                                                                        str43 = str104;
                                                                                        j17 = jM73254;
                                                                                        arrayList14 = arrayList45;
                                                                                        j16 = jM73267;
                                                                                        str21 = str103;
                                                                                        arrayList23 = arrayList53;
                                                                                        arrayList21 = arrayList43;
                                                                                        j = j35;
                                                                                        arrayList2 = arrayList37;
                                                                                        arrayList6 = arrayList36;
                                                                                        j18 = j41;
                                                                                        j3 = j34;
                                                                                        j6 = j39;
                                                                                        arrayList24 = arrayList55;
                                                                                        i12 = iM73142;
                                                                                        j19 = j36;
                                                                                        if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str42)) {
                                                                                            if (AbstractC4208.m9139(str92)) {
                                                                                                strM9133 = AbstractC4208.m9127(str36);
                                                                                            } else if (AbstractC4208.m9134(str92)) {
                                                                                                strM9133 = AbstractC4208.m9136(str36);
                                                                                            } else {
                                                                                                if (AbstractC4208.m9129(str92) || AbstractC4208.m9131(str92)) {
                                                                                                    strM9133 = str92;
                                                                                                    str44 = strM9133;
                                                                                                } else {
                                                                                                    str44 = str92;
                                                                                                    if ("application/mp4".equals(str44)) {
                                                                                                        strM9133 = AbstractC4208.m9133(str36);
                                                                                                        if ("text/vtt".equals(strM9133)) {
                                                                                                            strM9133 = "application/x-mp4-vtt";
                                                                                                        }
                                                                                                    } else {
                                                                                                        strM9133 = null;
                                                                                                    }
                                                                                                }
                                                                                                if ("audio/eac3".equals(strM9133)) {
                                                                                                    arrayList26 = arrayList25;
                                                                                                } else {
                                                                                                    int i35 = i2;
                                                                                                    while (i35 < arrayList25.size()) {
                                                                                                        C3837 c3837 = (C3837) arrayList25.get(i35);
                                                                                                        int i36 = i35;
                                                                                                        String str106 = c3837.f14647;
                                                                                                        String str107 = c3837.f14645;
                                                                                                        arrayList26 = arrayList25;
                                                                                                        if (("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str106) && "JOC".equals(str107)) || ("tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str106) && "ec+3".equals(str107))) {
                                                                                                            strM9133 = "audio/eac3-joc";
                                                                                                            if (!"audio/eac3-joc".equals(strM9133)) {
                                                                                                                str46 = "ec+3";
                                                                                                                str45 = str96;
                                                                                                            }
                                                                                                            if (AbstractC4208.m9135(str46, str45)) {
                                                                                                                c3281 = null;
                                                                                                            } else {
                                                                                                                C3281 c3281M3255 = AbstractC0956.m3255(str46, str45, str98);
                                                                                                                String str108 = str45 != null ? str45 : str46;
                                                                                                                c3281 = c3281M3255;
                                                                                                                strM9133 = "video/dolby-vision";
                                                                                                                str46 = str108;
                                                                                                            }
                                                                                                            i13 = i2;
                                                                                                            int i37 = i13;
                                                                                                            while (true) {
                                                                                                                j13 = j16;
                                                                                                                if (i13 >= arrayList21.size()) {
                                                                                                                    ArrayList arrayList58 = arrayList21;
                                                                                                                    C3837 c38372 = (C3837) arrayList58.get(i13);
                                                                                                                    String str109 = str44;
                                                                                                                    if (ᵻᵕᵭ.ᵱᵽʡᵚ("urn:mpeg:dash:role:2011", c38372.f14647)) {
                                                                                                                        String str110 = c38372.f14645;
                                                                                                                        i37 |= (str110 != null && (str110.equals("forced_subtitle") || str110.equals("forced-subtitle"))) ? 2 : i2;
                                                                                                                    }
                                                                                                                    i13++;
                                                                                                                    str44 = str109;
                                                                                                                    arrayList21 = arrayList58;
                                                                                                                    j16 = j13;
                                                                                                                } else {
                                                                                                                    ArrayList arrayList59 = arrayList21;
                                                                                                                    String str111 = str44;
                                                                                                                    int i38 = i2;
                                                                                                                    int iM73152 = i38;
                                                                                                                    while (i38 < arrayList59.size()) {
                                                                                                                        C3837 c38373 = (C3837) arrayList59.get(i38);
                                                                                                                        ArrayList arrayList60 = arrayList59;
                                                                                                                        if (ᵻᵕᵭ.ᵱᵽʡᵚ("urn:mpeg:dash:role:2011", c38373.f14647)) {
                                                                                                                            iM73152 |= m7315(c38373.f14645);
                                                                                                                        }
                                                                                                                        i38++;
                                                                                                                        arrayList59 = arrayList60;
                                                                                                                    }
                                                                                                                    ArrayList arrayList61 = arrayList59;
                                                                                                                    int i39 = i2;
                                                                                                                    int i40 = i39;
                                                                                                                    while (i39 < arrayList10.size()) {
                                                                                                                        ArrayList arrayList62 = arrayList10;
                                                                                                                        int i41 = i39;
                                                                                                                        C3837 c38374 = (C3837) arrayList62.get(i39);
                                                                                                                        int i42 = i40;
                                                                                                                        String str112 = c38374.f14647;
                                                                                                                        int i43 = iM73152;
                                                                                                                        String str113 = c38374.f14645;
                                                                                                                        if (ᵻᵕᵭ.ᵱᵽʡᵚ("urn:mpeg:dash:role:2011", str112)) {
                                                                                                                            iM7315 = m7315(str113);
                                                                                                                        } else if (ᵻᵕᵭ.ᵱᵽʡᵚ("urn:tva:metadata:cs:AudioPurposeCS:2007", c38374.f14647)) {
                                                                                                                            if (str113 != null) {
                                                                                                                                switch (str113.hashCode()) {
                                                                                                                                    case 49:
                                                                                                                                        i15 = str113.equals("1") ? i2 : -1;
                                                                                                                                        break;
                                                                                                                                    case 50:
                                                                                                                                        if (str113.equals("2")) {
                                                                                                                                            i15 = i3;
                                                                                                                                            break;
                                                                                                                                        }
                                                                                                                                        break;
                                                                                                                                    case 51:
                                                                                                                                        if (str113.equals("3")) {
                                                                                                                                            i15 = 2;
                                                                                                                                            break;
                                                                                                                                        }
                                                                                                                                        break;
                                                                                                                                    case 52:
                                                                                                                                        if (str113.equals("4")) {
                                                                                                                                            i15 = 3;
                                                                                                                                            break;
                                                                                                                                        }
                                                                                                                                        break;
                                                                                                                                    case 54:
                                                                                                                                        if (str113.equals("6")) {
                                                                                                                                            i15 = 4;
                                                                                                                                            break;
                                                                                                                                        }
                                                                                                                                        break;
                                                                                                                                }
                                                                                                                                switch (i15) {
                                                                                                                                    case 0:
                                                                                                                                        iM7315 = 512;
                                                                                                                                        break;
                                                                                                                                    case 1:
                                                                                                                                        iM7315 = 2048;
                                                                                                                                        break;
                                                                                                                                    case 2:
                                                                                                                                        iM7315 = 4;
                                                                                                                                        break;
                                                                                                                                    case 3:
                                                                                                                                        iM7315 = 8;
                                                                                                                                        break;
                                                                                                                                    case 4:
                                                                                                                                        iM7315 = i3;
                                                                                                                                        break;
                                                                                                                                }
                                                                                                                            } else {
                                                                                                                                iM7315 = i2;
                                                                                                                            }
                                                                                                                            i39 = i41 + 1;
                                                                                                                            arrayList10 = arrayList62;
                                                                                                                            iM73152 = i43;
                                                                                                                        } else {
                                                                                                                            i40 = i42;
                                                                                                                            i39 = i41 + 1;
                                                                                                                            arrayList10 = arrayList62;
                                                                                                                            iM73152 = i43;
                                                                                                                        }
                                                                                                                        i40 = i42 | iM7315;
                                                                                                                        i39 = i41 + 1;
                                                                                                                        arrayList10 = arrayList62;
                                                                                                                        iM73152 = i43;
                                                                                                                    }
                                                                                                                    ArrayList arrayList63 = arrayList10;
                                                                                                                    int iM7313 = iM73152 | i40 | m7313(arrayList24) | m7313(arrayList26);
                                                                                                                    int i44 = i2;
                                                                                                                    while (true) {
                                                                                                                        if (i44 < arrayList24.size()) {
                                                                                                                            C3837 c38375 = (C3837) arrayList24.get(i44);
                                                                                                                            arrayList27 = arrayList24;
                                                                                                                            if ((ᵻᵕᵭ.ᵱᵽʡᵚ("http://dashif.org/thumbnail_tile", c38375.f14647) || ᵻᵕᵭ.ᵱᵽʡᵚ("http://dashif.org/guidelines/thumbnail_tile", c38375.f14647)) && (str47 = c38375.f14645) != null) {
                                                                                                                                String str114 = AbstractC0956.f4222;
                                                                                                                                String[] strArrSplit2 = str47.split("x", -1);
                                                                                                                                if (strArrSplit2.length != 2) {
                                                                                                                                    continue;
                                                                                                                                } else {
                                                                                                                                    try {
                                                                                                                                        pairCreate = Pair.create(Integer.valueOf(Integer.parseInt(strArrSplit2[i2])), Integer.valueOf(Integer.parseInt(strArrSplit2[i3])));
                                                                                                                                    } catch (NumberFormatException unused) {
                                                                                                                                        continue;
                                                                                                                                        i44++;
                                                                                                                                        arrayList24 = arrayList27;
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                            i44++;
                                                                                                                            arrayList24 = arrayList27;
                                                                                                                        } else {
                                                                                                                            arrayList27 = arrayList24;
                                                                                                                            pairCreate = null;
                                                                                                                        }
                                                                                                                    }
                                                                                                                    C4753 c4753 = new C4753();
                                                                                                                    c4753.f18121 = attributeValue23;
                                                                                                                    c4753.f18111 = AbstractC4208.m9132(str111);
                                                                                                                    c4753.f18101 = AbstractC4208.m9132(strM9133);
                                                                                                                    c4753.f18120 = str46;
                                                                                                                    c4753.f18128 = i9;
                                                                                                                    c4753.f18114 = i37;
                                                                                                                    c4753.f18129 = iM7313;
                                                                                                                    c4753.f18127 = c3281;
                                                                                                                    String str115 = str35;
                                                                                                                    c4753.f18126 = str115;
                                                                                                                    c4753.f18109 = pairCreate != null ? ((Integer) pairCreate.first).intValue() : -1;
                                                                                                                    c4753.f18122 = pairCreate != null ? ((Integer) pairCreate.second).intValue() : -1;
                                                                                                                    if (AbstractC4208.m9134(strM9133)) {
                                                                                                                        c4753.f18098 = i7;
                                                                                                                        c4753.f18102 = i8;
                                                                                                                        c4753.f18115 = fM73212;
                                                                                                                    } else {
                                                                                                                        int i45 = i7;
                                                                                                                        int i46 = i8;
                                                                                                                        if (AbstractC4208.m9139(strM9133)) {
                                                                                                                            c4753.f18090 = i12;
                                                                                                                            c4753.f18113 = i11;
                                                                                                                        } else if (AbstractC4208.m9129(strM9133)) {
                                                                                                                            if ("application/cea-608".equals(strM9133)) {
                                                                                                                                int i47 = i2;
                                                                                                                                while (i47 < arrayList63.size()) {
                                                                                                                                    C3837 c38376 = (C3837) arrayList63.get(i47);
                                                                                                                                    String str116 = c38376.f14647;
                                                                                                                                    String str117 = c38376.f14645;
                                                                                                                                    if ("urn:scte:dash:cc:cea-608:2015".equals(str116) && str117 != null) {
                                                                                                                                        Matcher matcher = f12135.matcher(str117);
                                                                                                                                        if (matcher.matches()) {
                                                                                                                                            i14 = Integer.parseInt(matcher.group(i3));
                                                                                                                                            c4753.f18100 = i14;
                                                                                                                                        } else {
                                                                                                                                            ˋˀᵧ.ʿٴˇ("Unable to parse CEA-608 channel number from: ".concat(str117));
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                    i47++;
                                                                                                                                    i3 = 1;
                                                                                                                                }
                                                                                                                                i14 = -1;
                                                                                                                                c4753.f18100 = i14;
                                                                                                                            } else if ("application/cea-708".equals(strM9133)) {
                                                                                                                                for (int i48 = i2; i48 < arrayList63.size(); i48++) {
                                                                                                                                    C3837 c38377 = (C3837) arrayList63.get(i48);
                                                                                                                                    String str118 = c38377.f14647;
                                                                                                                                    String str119 = c38377.f14645;
                                                                                                                                    if ("urn:scte:dash:cc:cea-708:2015".equals(str118) && str119 != null) {
                                                                                                                                        Matcher matcher2 = f12137.matcher(str119);
                                                                                                                                        if (matcher2.matches()) {
                                                                                                                                            i14 = Integer.parseInt(matcher2.group(1));
                                                                                                                                            c4753.f18100 = i14;
                                                                                                                                        } else {
                                                                                                                                            ˋˀᵧ.ʿٴˇ("Unable to parse CEA-708 service block number from: ".concat(str119));
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                i14 = -1;
                                                                                                                                c4753.f18100 = i14;
                                                                                                                            } else {
                                                                                                                                i14 = -1;
                                                                                                                                c4753.f18100 = i14;
                                                                                                                            }
                                                                                                                            if (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "MPD")) {
                                                                                                                                if (jM7326 == j2) {
                                                                                                                                    if (j4 != j2) {
                                                                                                                                        jM7326 = j4;
                                                                                                                                    } else if (!zEquals) {
                                                                                                                                        throw ParserException.m355("Unable to determine duration of static manifest.", null);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                if (arrayList3.isEmpty()) {
                                                                                                                                    throw ParserException.m355("No periods found.", null);
                                                                                                                                }
                                                                                                                                return new C2906(jM3213, jM7326, jM73262, zEquals, jM73263, j, jM73265, jM32132, c2459, c0946, c0288, uri2, arrayList3);
                                                                                                                            }
                                                                                                                            arrayList30 = arrayList3;
                                                                                                                            jM73264 = j;
                                                                                                                            j22 = j2;
                                                                                                                            i16 = i2;
                                                                                                                            i = i3;
                                                                                                                            j23 = j4;
                                                                                                                            arrayList31 = arrayList2;
                                                                                                                            arrayList29 = arrayList;
                                                                                                                            z = z2;
                                                                                                                            str51 = null;
                                                                                                                        } else if (AbstractC4208.m9131(strM9133)) {
                                                                                                                            c4753.f18098 = i45;
                                                                                                                            c4753.f18102 = i46;
                                                                                                                        }
                                                                                                                    }
                                                                                                                    C5286 c52862 = new C5286(c4753);
                                                                                                                    C4303 c43032 = new C4303(c52862, !arrayList20.isEmpty() ? arrayList20 : arrayList22, abstractC4434M7316 != null ? abstractC4434M7316 : new C3980(null, 1L, 0L, 0L, 0L), str43, arrayList23, arrayList54, arrayList27, arrayList26);
                                                                                                                    int iM9141 = AbstractC4208.m9141(c52862.f19987);
                                                                                                                    int i49 = i10;
                                                                                                                    if (i49 != -1) {
                                                                                                                        if (iM9141 != -1) {
                                                                                                                            ᵻᵪ.ˌᴵ(i49 == iM9141 ? 1 : i2);
                                                                                                                        }
                                                                                                                        iM9141 = i49;
                                                                                                                    }
                                                                                                                    ArrayList arrayList64 = arrayList19;
                                                                                                                    arrayList64.add(c43032);
                                                                                                                    arrayList46 = arrayList64;
                                                                                                                    str24 = str115;
                                                                                                                    i5 = iM9141;
                                                                                                                    arrayList10 = arrayList63;
                                                                                                                    j14 = j19;
                                                                                                                    arrayList15 = arrayList61;
                                                                                                                    arrayList17 = arrayList40;
                                                                                                                    arrayList16 = arrayList41;
                                                                                                                    str25 = str85;
                                                                                                                    str26 = str37;
                                                                                                                    str22 = str33;
                                                                                                                    str23 = str34;
                                                                                                                }
                                                                                                            }
                                                                                                        } else {
                                                                                                            i35 = i36 + 1;
                                                                                                            arrayList25 = arrayList26;
                                                                                                        }
                                                                                                    }
                                                                                                    arrayList26 = arrayList25;
                                                                                                    strM9133 = "audio/eac3";
                                                                                                    if (!"audio/eac3-joc".equals(strM9133)) {
                                                                                                    }
                                                                                                    if (AbstractC4208.m9135(str46, str45)) {
                                                                                                    }
                                                                                                    i13 = i2;
                                                                                                    int i372 = i13;
                                                                                                    while (true) {
                                                                                                        j13 = j16;
                                                                                                        if (i13 >= arrayList21.size()) {
                                                                                                        }
                                                                                                        i13++;
                                                                                                        str44 = str109;
                                                                                                        arrayList21 = arrayList58;
                                                                                                        j16 = j13;
                                                                                                    }
                                                                                                }
                                                                                                str45 = str96;
                                                                                                str46 = str36;
                                                                                                if (AbstractC4208.m9135(str46, str45)) {
                                                                                                }
                                                                                                i13 = i2;
                                                                                                int i3722 = i13;
                                                                                                while (true) {
                                                                                                    j13 = j16;
                                                                                                    if (i13 >= arrayList21.size()) {
                                                                                                    }
                                                                                                    i13++;
                                                                                                    str44 = str109;
                                                                                                    arrayList21 = arrayList58;
                                                                                                    j16 = j13;
                                                                                                }
                                                                                            }
                                                                                            str44 = str92;
                                                                                            if ("audio/eac3".equals(strM9133)) {
                                                                                            }
                                                                                            str45 = str96;
                                                                                            str46 = str36;
                                                                                            if (AbstractC4208.m9135(str46, str45)) {
                                                                                            }
                                                                                            i13 = i2;
                                                                                            int i37222 = i13;
                                                                                            while (true) {
                                                                                                j13 = j16;
                                                                                                if (i13 >= arrayList21.size()) {
                                                                                                }
                                                                                                i13++;
                                                                                                str44 = str109;
                                                                                                arrayList21 = arrayList58;
                                                                                                j16 = j13;
                                                                                            }
                                                                                        } else {
                                                                                            arrayList55 = arrayList24;
                                                                                            arrayList56 = arrayList25;
                                                                                            long j42 = j16;
                                                                                            arrayList53 = arrayList23;
                                                                                            iM73142 = i12;
                                                                                            str27 = str42;
                                                                                            jM73254 = j17;
                                                                                            str101 = str40;
                                                                                            str84 = str38;
                                                                                            str103 = str21;
                                                                                            arrayList45 = arrayList14;
                                                                                            j41 = j18;
                                                                                            arrayList47 = arrayList13;
                                                                                            str83 = str32;
                                                                                            str31 = str72;
                                                                                            str104 = str43;
                                                                                            f2 = f;
                                                                                            str52 = str;
                                                                                            str94 = str36;
                                                                                            i33 = i10;
                                                                                            arrayList46 = arrayList19;
                                                                                            str78 = str35;
                                                                                            i32 = i11;
                                                                                            str67 = str14;
                                                                                            str66 = str2;
                                                                                            str68 = str33;
                                                                                            str69 = str34;
                                                                                            str89 = str17;
                                                                                            i3 = 1;
                                                                                            str64 = str12;
                                                                                            arrayList37 = arrayList2;
                                                                                            arrayList36 = arrayList6;
                                                                                            arrayList18 = arrayList22;
                                                                                            str29 = str15;
                                                                                            abstractC44342 = abstractC4434M7316;
                                                                                            arrayList33 = arrayList7;
                                                                                            str65 = str37;
                                                                                            str88 = str39;
                                                                                            arrayList57 = arrayList20;
                                                                                            arrayList34 = arrayList5;
                                                                                            i6 = i9;
                                                                                            long j43 = j;
                                                                                            arrayList43 = arrayList21;
                                                                                            z = z2;
                                                                                            jM73267 = j42;
                                                                                            j35 = j43;
                                                                                            j36 = j19;
                                                                                            j39 = j6;
                                                                                            j34 = j3;
                                                                                        }
                                                                                    } else {
                                                                                        str32 = str83;
                                                                                        String str120 = str68;
                                                                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str120)) {
                                                                                            arrayList13 = arrayList47;
                                                                                            str = str52;
                                                                                            long jM73255 = m7325(xmlPullParser, j41);
                                                                                            str33 = str120;
                                                                                            str34 = str105;
                                                                                            str35 = str78;
                                                                                            str36 = str94;
                                                                                            long j44 = j36;
                                                                                            long j45 = jM73267;
                                                                                            arrayList7 = arrayList33;
                                                                                            arrayList5 = arrayList34;
                                                                                            str37 = str65;
                                                                                            arrayList6 = arrayList36;
                                                                                            str2 = str66;
                                                                                            str14 = str67;
                                                                                            str15 = str29;
                                                                                            arrayList19 = arrayList46;
                                                                                            i9 = i6;
                                                                                            str38 = str84;
                                                                                            str17 = str89;
                                                                                            str21 = str103;
                                                                                            i10 = i33;
                                                                                            i11 = i32;
                                                                                            ArrayList arrayList65 = arrayList45;
                                                                                            arrayList21 = arrayList43;
                                                                                            arrayList20 = arrayList57;
                                                                                            long j46 = j35;
                                                                                            arrayList2 = arrayList37;
                                                                                            str72 = str31;
                                                                                            str39 = str88;
                                                                                            j3 = j34;
                                                                                            j6 = j39;
                                                                                            j16 = j45;
                                                                                            j18 = jM73255;
                                                                                            j17 = jM73254;
                                                                                            arrayList22 = arrayList18;
                                                                                            str12 = str64;
                                                                                            arrayList14 = arrayList65;
                                                                                            j19 = j44;
                                                                                            z2 = z;
                                                                                            str42 = str27;
                                                                                            str40 = str101;
                                                                                            abstractC4434M7316 = m7316(xmlPullParser, (C2429) abstractC44342, j44, j45, jM73254, jM73255, j46);
                                                                                            arrayList24 = arrayList55;
                                                                                            arrayList25 = arrayList56;
                                                                                            i12 = iM73142;
                                                                                            j = j46;
                                                                                            str43 = str104;
                                                                                            arrayList23 = arrayList53;
                                                                                        } else {
                                                                                            str33 = str120;
                                                                                            str34 = str105;
                                                                                            str35 = str78;
                                                                                            arrayList13 = arrayList47;
                                                                                            str = str52;
                                                                                            str36 = str94;
                                                                                            long j47 = j36;
                                                                                            arrayList7 = arrayList33;
                                                                                            arrayList5 = arrayList34;
                                                                                            str37 = str65;
                                                                                            arrayList6 = arrayList36;
                                                                                            str2 = str66;
                                                                                            str14 = str67;
                                                                                            str15 = str29;
                                                                                            arrayList19 = arrayList46;
                                                                                            i9 = i6;
                                                                                            str38 = str84;
                                                                                            str17 = str89;
                                                                                            i10 = i33;
                                                                                            i11 = i32;
                                                                                            ArrayList arrayList66 = arrayList45;
                                                                                            arrayList20 = arrayList57;
                                                                                            str72 = str31;
                                                                                            str39 = str88;
                                                                                            long j48 = jM73267;
                                                                                            arrayList21 = arrayList43;
                                                                                            long j49 = j35;
                                                                                            arrayList2 = arrayList37;
                                                                                            str21 = str103;
                                                                                            long j50 = jM73254;
                                                                                            j3 = j34;
                                                                                            j16 = j48;
                                                                                            String str121 = str64;
                                                                                            j6 = j39;
                                                                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str121)) {
                                                                                                j = j49;
                                                                                                long jM73256 = m7325(xmlPullParser, j41);
                                                                                                z2 = z;
                                                                                                arrayList22 = arrayList18;
                                                                                                str12 = str121;
                                                                                                j17 = j50;
                                                                                                C2204 c2204M7320 = m7320(xmlPullParser, (C2204) abstractC44342, arrayList66, j47, j16, j17, jM73256, j);
                                                                                                arrayList14 = arrayList66;
                                                                                                j19 = j47;
                                                                                                j18 = jM73256;
                                                                                                str42 = str27;
                                                                                                str40 = str101;
                                                                                                abstractC4434M7316 = c2204M7320;
                                                                                                arrayList23 = arrayList53;
                                                                                            } else {
                                                                                                z2 = z;
                                                                                                arrayList14 = arrayList66;
                                                                                                j = j49;
                                                                                                arrayList22 = arrayList18;
                                                                                                str12 = str121;
                                                                                                j17 = j50;
                                                                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str38)) {
                                                                                                    Pair pairM73272 = m7327(xmlPullParser);
                                                                                                    Object obj3 = pairM73272.first;
                                                                                                    if (obj3 != null) {
                                                                                                        str104 = (String) obj3;
                                                                                                    }
                                                                                                    Object obj4 = pairM73272.second;
                                                                                                    if (obj4 != null) {
                                                                                                        arrayList23 = arrayList53;
                                                                                                        arrayList23.add((C4386) obj4);
                                                                                                    } else {
                                                                                                        arrayList23 = arrayList53;
                                                                                                    }
                                                                                                    j18 = j41;
                                                                                                    j19 = j47;
                                                                                                    str42 = str27;
                                                                                                    str40 = str101;
                                                                                                    abstractC4434M7316 = abstractC44342;
                                                                                                } else {
                                                                                                    str40 = str101;
                                                                                                    arrayList23 = arrayList53;
                                                                                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str40)) {
                                                                                                        j18 = j41;
                                                                                                        arrayList54.add(m7312(xmlPullParser, str40));
                                                                                                        j19 = j47;
                                                                                                        str41 = str86;
                                                                                                        arrayList24 = arrayList55;
                                                                                                    } else {
                                                                                                        j18 = j41;
                                                                                                        ArrayList arrayList67 = arrayList54;
                                                                                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str39)) {
                                                                                                            arrayList54 = arrayList67;
                                                                                                            arrayList24 = arrayList55;
                                                                                                            arrayList24.add(m7312(xmlPullParser, str39));
                                                                                                            j19 = j47;
                                                                                                            str41 = str86;
                                                                                                        } else {
                                                                                                            arrayList54 = arrayList67;
                                                                                                            str41 = str86;
                                                                                                            arrayList24 = arrayList55;
                                                                                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str41)) {
                                                                                                                j19 = j47;
                                                                                                                arrayList25 = arrayList56;
                                                                                                                arrayList25.add(m7312(xmlPullParser, str41));
                                                                                                            } else {
                                                                                                                j19 = j47;
                                                                                                                arrayList25 = arrayList56;
                                                                                                                m7309(xmlPullParser);
                                                                                                            }
                                                                                                            str86 = str41;
                                                                                                            str42 = str27;
                                                                                                            abstractC4434M7316 = abstractC44342;
                                                                                                            i12 = iM73142;
                                                                                                            str43 = str104;
                                                                                                        }
                                                                                                    }
                                                                                                    arrayList25 = arrayList56;
                                                                                                    str86 = str41;
                                                                                                    str42 = str27;
                                                                                                    abstractC4434M7316 = abstractC44342;
                                                                                                    i12 = iM73142;
                                                                                                    str43 = str104;
                                                                                                }
                                                                                            }
                                                                                            arrayList24 = arrayList55;
                                                                                            arrayList25 = arrayList56;
                                                                                            i12 = iM73142;
                                                                                            str43 = str104;
                                                                                        }
                                                                                        if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str42)) {
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            str35 = str78;
                                                                            str = str52;
                                                                            z2 = z;
                                                                            str36 = str94;
                                                                            arrayList7 = arrayList33;
                                                                            arrayList5 = arrayList34;
                                                                            str37 = str65;
                                                                            str2 = str66;
                                                                            str14 = str67;
                                                                            str33 = str68;
                                                                            str34 = str69;
                                                                            str15 = str29;
                                                                            arrayList19 = arrayList46;
                                                                            i9 = i6;
                                                                            str38 = str84;
                                                                            str17 = str89;
                                                                            str40 = str101;
                                                                            i10 = i33;
                                                                            abstractC4434M7316 = abstractC44342;
                                                                            arrayList25 = arrayList56;
                                                                            i11 = i32;
                                                                            str32 = str83;
                                                                            arrayList13 = arrayList47;
                                                                            arrayList20 = arrayList57;
                                                                            arrayList22 = arrayList18;
                                                                            str12 = str64;
                                                                            str72 = str31;
                                                                            str39 = str88;
                                                                            str42 = str27;
                                                                            str43 = str104;
                                                                            j17 = jM73254;
                                                                            arrayList14 = arrayList45;
                                                                            j16 = jM73267;
                                                                            str21 = str103;
                                                                            arrayList23 = arrayList53;
                                                                            arrayList21 = arrayList43;
                                                                            j = j35;
                                                                            arrayList2 = arrayList37;
                                                                            arrayList6 = arrayList36;
                                                                            j18 = j41;
                                                                            j3 = j34;
                                                                            j6 = j39;
                                                                            arrayList24 = arrayList55;
                                                                            i12 = iM73142;
                                                                            j19 = j36;
                                                                            if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str42)) {
                                                                            }
                                                                        }
                                                                    } else {
                                                                        arrayList11 = arrayList44;
                                                                        arrayList12 = arrayList8;
                                                                        str = str52;
                                                                        z2 = z;
                                                                        arrayList7 = arrayList33;
                                                                        arrayList5 = arrayList34;
                                                                        str12 = str64;
                                                                        str13 = str65;
                                                                        str2 = str66;
                                                                        str14 = str67;
                                                                        String str122 = str68;
                                                                        String str123 = str69;
                                                                        f = f5;
                                                                        str15 = str73;
                                                                        str16 = str74;
                                                                        str17 = str75;
                                                                        arrayList13 = arrayList47;
                                                                        arrayList14 = arrayList45;
                                                                        ArrayList arrayList68 = arrayList43;
                                                                        j = j35;
                                                                        arrayList2 = arrayList37;
                                                                        str18 = str79;
                                                                        str19 = str77;
                                                                        str20 = str76;
                                                                        j13 = jM73267;
                                                                        str21 = attributeValue14;
                                                                        int i50 = i25;
                                                                        long j51 = j36;
                                                                        arrayList6 = arrayList36;
                                                                        j3 = j34;
                                                                        j6 = j39;
                                                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str123)) {
                                                                            abstractC4434M73202 = m7318(xmlPullParser, (C3980) abstractC4434M73202);
                                                                            str23 = str123;
                                                                            str24 = str78;
                                                                            i5 = i50;
                                                                            j14 = j51;
                                                                            arrayList15 = arrayList68;
                                                                            arrayList17 = arrayList40;
                                                                            arrayList16 = arrayList41;
                                                                            str25 = str85;
                                                                            str26 = str13;
                                                                            str22 = str122;
                                                                        } else {
                                                                            str22 = str122;
                                                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str22)) {
                                                                                long jM73257 = m7325(xmlPullParser, j40);
                                                                                str23 = str123;
                                                                                str24 = str78;
                                                                                arrayList15 = arrayList68;
                                                                                abstractC4434M73202 = m7316(xmlPullParser, (C2429) abstractC4434M73202, j51, j13, j12, jM73257, j);
                                                                                j = j;
                                                                                j13 = j13;
                                                                                j40 = jM73257;
                                                                                arrayList16 = arrayList41;
                                                                                str25 = str85;
                                                                                i5 = i50;
                                                                                str26 = str13;
                                                                                j14 = j51;
                                                                                arrayList17 = arrayList40;
                                                                            } else {
                                                                                str23 = str123;
                                                                                str24 = str78;
                                                                                i4 = i50;
                                                                                arrayList15 = arrayList68;
                                                                                long j52 = j40;
                                                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str12)) {
                                                                                    long jM73258 = m7325(xmlPullParser, j52);
                                                                                    abstractC4434M73202 = m7320(xmlPullParser, (C2204) abstractC4434M73202, arrayList14, j51, j13, j12, jM73258, j);
                                                                                    j13 = j13;
                                                                                    j14 = j51;
                                                                                    j40 = jM73258;
                                                                                    arrayList17 = arrayList40;
                                                                                    arrayList16 = arrayList41;
                                                                                    str25 = str85;
                                                                                    i5 = i4;
                                                                                    str26 = str13;
                                                                                } else {
                                                                                    j13 = j13;
                                                                                    j14 = j51;
                                                                                    if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "InbandEventStream")) {
                                                                                        arrayList16 = arrayList41;
                                                                                        arrayList16.add(m7312(xmlPullParser, "InbandEventStream"));
                                                                                        j15 = j52;
                                                                                        arrayList17 = arrayList40;
                                                                                        str25 = str85;
                                                                                    } else {
                                                                                        arrayList16 = arrayList41;
                                                                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Label")) {
                                                                                            str25 = str85;
                                                                                            String attributeValue32 = xmlPullParser.getAttributeValue(null, str25);
                                                                                            String text = "";
                                                                                            while (true) {
                                                                                                xmlPullParser.next();
                                                                                                j15 = j52;
                                                                                                if (xmlPullParser.getEventType() == 4) {
                                                                                                    text = xmlPullParser.getText();
                                                                                                } else {
                                                                                                    m7309(xmlPullParser);
                                                                                                }
                                                                                                if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "Label")) {
                                                                                                    arrayList17 = arrayList40;
                                                                                                    arrayList17.add(new C2700(attributeValue32, text));
                                                                                                } else {
                                                                                                    j52 = j15;
                                                                                                }
                                                                                            }
                                                                                        } else {
                                                                                            j15 = j52;
                                                                                            arrayList17 = arrayList40;
                                                                                            str25 = str85;
                                                                                            if (xmlPullParser.getEventType() == 2) {
                                                                                                m7309(xmlPullParser);
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    j40 = j15;
                                                                                    i5 = i4;
                                                                                    str26 = str13;
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                    arrayList11 = arrayList44;
                                                    arrayList12 = arrayList8;
                                                    str24 = str78;
                                                    i4 = i25;
                                                    str = str52;
                                                    z2 = z;
                                                    arrayList9 = arrayList39;
                                                    arrayList10 = arrayList42;
                                                    str25 = str53;
                                                    j14 = j36;
                                                    arrayList7 = arrayList33;
                                                    arrayList5 = arrayList34;
                                                    str12 = str64;
                                                    str13 = str65;
                                                    arrayList6 = arrayList36;
                                                    str2 = str66;
                                                    str14 = str67;
                                                    str22 = str68;
                                                    str23 = str69;
                                                    arrayList17 = arrayList40;
                                                    f = f5;
                                                    str15 = str73;
                                                    str16 = str74;
                                                    str17 = str75;
                                                    j15 = j40;
                                                    arrayList13 = arrayList47;
                                                    arrayList14 = arrayList45;
                                                    str18 = str79;
                                                    str19 = str77;
                                                    str20 = str76;
                                                    j13 = jM73267;
                                                    str21 = attributeValue14;
                                                    arrayList15 = arrayList43;
                                                    j = j35;
                                                    arrayList2 = arrayList37;
                                                    arrayList16 = arrayList41;
                                                    j3 = j34;
                                                    j6 = j39;
                                                    j40 = j15;
                                                    i5 = i4;
                                                    str26 = str13;
                                                    if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                                    }
                                                }
                                            }
                                            arrayList11 = arrayList44;
                                            arrayList12 = arrayList8;
                                            str24 = str78;
                                            str = str52;
                                            z2 = z;
                                            arrayList9 = arrayList39;
                                            arrayList10 = arrayList42;
                                            j14 = j36;
                                            arrayList7 = arrayList33;
                                            arrayList5 = arrayList34;
                                            str26 = str65;
                                            arrayList6 = arrayList36;
                                            str2 = str66;
                                            str14 = str67;
                                            str22 = str68;
                                            str23 = str69;
                                            arrayList17 = arrayList40;
                                            f = f5;
                                            str15 = str73;
                                            str16 = str74;
                                            str17 = str75;
                                            i5 = i25;
                                            arrayList13 = arrayList47;
                                            str25 = str53;
                                            str12 = str64;
                                            str18 = str79;
                                            str19 = str77;
                                            str20 = str76;
                                            arrayList14 = arrayList45;
                                            j13 = jM73267;
                                            str21 = attributeValue14;
                                            arrayList15 = arrayList43;
                                            j = j35;
                                            arrayList2 = arrayList37;
                                            arrayList16 = arrayList41;
                                            j3 = j34;
                                            j6 = j39;
                                            if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str26)) {
                                            }
                                        }
                                    } else {
                                        arrayList4 = arrayList32;
                                        String str124 = str59;
                                        str = str52;
                                        str2 = str60;
                                        String str125 = str61;
                                        z2 = z;
                                        str3 = str53;
                                        j = j35;
                                        long j53 = jM73267;
                                        ArrayList arrayList69 = arrayList33;
                                        arrayList5 = arrayList34;
                                        arrayList2 = arrayList31;
                                        long j54 = j36;
                                        arrayList6 = arrayList35;
                                        j3 = j34;
                                        j6 = j23;
                                        if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "EventStream")) {
                                            String str126 = str125;
                                            String attributeValue33 = xmlPullParser.getAttributeValue(null, str126);
                                            String str127 = attributeValue33 == null ? "" : attributeValue33;
                                            String str128 = str62;
                                            String attributeValue34 = xmlPullParser.getAttributeValue(null, str128);
                                            String str129 = attributeValue34 == null ? "" : attributeValue34;
                                            String attributeValue35 = xmlPullParser.getAttributeValue(null, "timescale");
                                            long j55 = attributeValue35 == null ? 1L : Long.parseLong(attributeValue35);
                                            String attributeValue36 = xmlPullParser.getAttributeValue(null, "presentationTimeOffset");
                                            long j56 = attributeValue36 == null ? 0L : Long.parseLong(attributeValue36);
                                            ArrayList arrayList70 = new ArrayList();
                                            ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(512);
                                            while (true) {
                                                xmlPullParser.next();
                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "Event")) {
                                                    str11 = str124;
                                                    String attributeValue37 = xmlPullParser.getAttributeValue(null, str11);
                                                    long j57 = attributeValue37 == null ? 0L : Long.parseLong(attributeValue37);
                                                    str10 = str2;
                                                    String attributeValue38 = xmlPullParser.getAttributeValue(null, str10);
                                                    long j58 = attributeValue38 == null ? -9223372036854775807L : Long.parseLong(attributeValue38);
                                                    String attributeValue39 = xmlPullParser.getAttributeValue(null, "presentationTime");
                                                    long j59 = attributeValue39 == null ? 0L : Long.parseLong(attributeValue39);
                                                    String str130 = AbstractC0956.f4222;
                                                    RoundingMode roundingMode = RoundingMode.DOWN;
                                                    long jM3218 = AbstractC0956.m3218(j58, 1000L, j55, roundingMode);
                                                    long jM32182 = AbstractC0956.m3218(j59 - j56, 1000000L, j55, roundingMode);
                                                    arrayList7 = arrayList69;
                                                    j10 = j55;
                                                    str4 = str126;
                                                    String attributeValue40 = xmlPullParser.getAttributeValue(null, "messageData");
                                                    if (attributeValue40 == null) {
                                                        attributeValue40 = null;
                                                    }
                                                    byteArrayOutputStream3.reset();
                                                    XmlSerializer xmlSerializerNewSerializer = Xml.newSerializer();
                                                    str7 = str128;
                                                    xmlSerializerNewSerializer.setOutput(byteArrayOutputStream3, StandardCharsets.UTF_8.name());
                                                    xmlPullParser.nextToken();
                                                    while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "Event")) {
                                                        switch (xmlPullParser.getEventType()) {
                                                            case 0:
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                xmlSerializerNewSerializer.startDocument(null, Boolean.FALSE);
                                                                break;
                                                            case 1:
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                xmlSerializerNewSerializer.endDocument();
                                                                break;
                                                            case 2:
                                                                j11 = j56;
                                                                xmlSerializerNewSerializer.startTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
                                                                int i51 = i2;
                                                                while (i51 < xmlPullParser.getAttributeCount()) {
                                                                    xmlSerializerNewSerializer.attribute(xmlPullParser.getAttributeNamespace(i51), xmlPullParser.getAttributeName(i51), xmlPullParser.getAttributeValue(i51));
                                                                    i51++;
                                                                    byteArrayOutputStream3 = byteArrayOutputStream3;
                                                                }
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case 3:
                                                                j11 = j56;
                                                                xmlSerializerNewSerializer.endTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case 4:
                                                                xmlSerializerNewSerializer.text(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case 5:
                                                                xmlSerializerNewSerializer.cdsect(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                                                                xmlSerializerNewSerializer.entityRef(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                                                                xmlSerializerNewSerializer.ignorableWhitespace(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                                                                xmlSerializerNewSerializer.processingInstruction(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case 9:
                                                                xmlSerializerNewSerializer.comment(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            case 10:
                                                                xmlSerializerNewSerializer.docdecl(xmlPullParser.getText());
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                            default:
                                                                j11 = j56;
                                                                byteArrayOutputStream2 = byteArrayOutputStream3;
                                                                break;
                                                        }
                                                        xmlPullParser.nextToken();
                                                        byteArrayOutputStream3 = byteArrayOutputStream2;
                                                        j56 = j11;
                                                    }
                                                    j9 = j56;
                                                    byteArrayOutputStream = byteArrayOutputStream3;
                                                    xmlSerializerNewSerializer.flush();
                                                    byte[] byteArray = byteArrayOutputStream.toByteArray();
                                                    Long lValueOf = Long.valueOf(jM32182);
                                                    if (attributeValue40 != null) {
                                                        byteArray = attributeValue40.getBytes(StandardCharsets.UTF_8);
                                                    }
                                                    str8 = str127;
                                                    str9 = str129;
                                                    arrayList70.add(Pair.create(lValueOf, new C3175(str127, str129, jM3218, j57, byteArray)));
                                                } else {
                                                    arrayList7 = arrayList69;
                                                    str4 = str126;
                                                    str7 = str128;
                                                    j9 = j56;
                                                    byteArrayOutputStream = byteArrayOutputStream3;
                                                    str8 = str127;
                                                    str9 = str129;
                                                    j10 = j55;
                                                    str10 = str2;
                                                    str11 = str124;
                                                    m7309(xmlPullParser);
                                                }
                                                if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "EventStream")) {
                                                    long[] jArr = new long[arrayList70.size()];
                                                    C3175[] c3175Arr = new C3175[arrayList70.size()];
                                                    for (int i52 = i2; i52 < arrayList70.size(); i52++) {
                                                        Pair pair = (Pair) arrayList70.get(i52);
                                                        jArr[i52] = ((Long) pair.first).longValue();
                                                        c3175Arr[i52] = (C3175) pair.second;
                                                    }
                                                    arrayList5.add(new C2316(str8, str9, jArr, c3175Arr));
                                                    str2 = str10;
                                                    j7 = j54;
                                                    str62 = str7;
                                                    j8 = j53;
                                                    j2 = -9223372036854775807L;
                                                    str5 = str11;
                                                } else {
                                                    str127 = str8;
                                                    str129 = str9;
                                                    str124 = str11;
                                                    str2 = str10;
                                                    byteArrayOutputStream3 = byteArrayOutputStream;
                                                    str128 = str7;
                                                    j55 = j10;
                                                    j56 = j9;
                                                    str126 = str4;
                                                    arrayList69 = arrayList7;
                                                }
                                            }
                                        } else {
                                            arrayList7 = arrayList69;
                                            String str131 = str62;
                                            str4 = str125;
                                            if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SegmentBase")) {
                                                abstractC4434M7320 = m7318(xmlPullParser, null);
                                                arrayList5 = arrayList5;
                                                j7 = j54;
                                                str6 = str63;
                                                str62 = str131;
                                                j8 = j53;
                                                j2 = -9223372036854775807L;
                                                str5 = str124;
                                            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "SegmentList")) {
                                                j2 = -9223372036854775807L;
                                                long jM73259 = m7325(xmlPullParser, -9223372036854775807L);
                                                arrayList5 = arrayList5;
                                                str62 = str131;
                                                str5 = str124;
                                                abstractC4434M7320 = m7316(xmlPullParser, null, j54, j53, j5, jM73259, j);
                                                j = j;
                                                j8 = j53;
                                                j7 = j54;
                                                j37 = jM73259;
                                            } else {
                                                arrayList5 = arrayList5;
                                                j7 = j54;
                                                str62 = str131;
                                                j8 = j53;
                                                j2 = -9223372036854775807L;
                                                str5 = str124;
                                                if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, str64)) {
                                                    long jM732510 = m7325(xmlPullParser, -9223372036854775807L);
                                                    C2822 c2822 = AbstractC4509.f17159;
                                                    abstractC4434M7320 = m7320(xmlPullParser, null, C2598.f10048, j7, j8, j5, jM732510, j);
                                                    j37 = jM732510;
                                                } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "AssetIdentifier")) {
                                                    m7312(xmlPullParser, "AssetIdentifier");
                                                } else {
                                                    m7309(xmlPullParser);
                                                }
                                            }
                                        }
                                    }
                                    str6 = str63;
                                }
                                if (ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, str6)) {
                                    Pair pairCreate2 = Pair.create(new C1736(attributeValue11, jM73266, arrayList7, arrayList5), Long.valueOf(j8));
                                    C1736 c1736 = (C1736) pairCreate2.first;
                                    if (c1736.f6964 != j2) {
                                        long jLongValue = ((Long) pairCreate2.second).longValue();
                                        j21 = jLongValue == j2 ? j2 : jLongValue + c1736.f6964;
                                        arrayList3 = arrayList30;
                                        arrayList3.add(c1736);
                                    } else {
                                        if (!zEquals) {
                                            throw ParserException.m355("Unable to determine start of period " + arrayList30.size(), null);
                                        }
                                        arrayList3 = arrayList30;
                                        i19 = i3;
                                        j21 = j6;
                                    }
                                    j4 = j21;
                                } else {
                                    str63 = str6;
                                    jM73267 = j8;
                                    j23 = j6;
                                    arrayList31 = arrayList2;
                                    j34 = j3;
                                    arrayList35 = arrayList6;
                                    arrayList32 = arrayList4;
                                    str59 = str5;
                                    str53 = str3;
                                    str52 = str;
                                    arrayList33 = arrayList7;
                                    arrayList34 = arrayList5;
                                    str60 = str2;
                                    j36 = j7;
                                    j35 = j;
                                    z = z2;
                                    jM73252 = j5;
                                    str61 = str4;
                                }
                            }
                        } else {
                            z2 = z;
                            j = j35;
                            j2 = j25;
                            arrayList2 = arrayList31;
                            j3 = j34;
                            j4 = j23;
                            arrayList3 = arrayList30;
                            m7309(xmlPullParser);
                        }
                        jM7325 = j3;
                        if (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "MPD")) {
                        }
                    }
                    z2 = z;
                    arrayList3 = arrayList30;
                    j2 = j25;
                }
                arrayList3 = arrayList30;
                if (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "MPD")) {
                }
            }
            j = jM73264;
            if (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "MPD")) {
            }
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static long m7325(XmlPullParser xmlPullParser, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
        if (attributeValue == null) {
            return j;
        }
        if ("INF".equals(attributeValue)) {
            return Long.MAX_VALUE;
        }
        return (long) (Float.parseFloat(attributeValue) * 1000000.0f);
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public static long m7326(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue == null) {
            return j;
        }
        Matcher matcher = AbstractC0956.f4219.matcher(attributeValue);
        if (!matcher.matches()) {
            return (long) (Double.parseDouble(attributeValue) * 3600.0d * 1000.0d);
        }
        boolean zIsEmpty = TextUtils.isEmpty(matcher.group(1));
        String strGroup = matcher.group(3);
        double d = strGroup != null ? Double.parseDouble(strGroup) * 3.1556908E7d : 0.0d;
        String strGroup2 = matcher.group(5);
        double d2 = d + (strGroup2 != null ? Double.parseDouble(strGroup2) * 2629739.0d : 0.0d);
        String strGroup3 = matcher.group(7);
        double d3 = d2 + (strGroup3 != null ? Double.parseDouble(strGroup3) * 86400.0d : 0.0d);
        String strGroup4 = matcher.group(10);
        double d4 = d3 + (strGroup4 != null ? Double.parseDouble(strGroup4) * 3600.0d : 0.0d);
        String strGroup5 = matcher.group(12);
        double d5 = d4 + (strGroup5 != null ? Double.parseDouble(strGroup5) * 60.0d : 0.0d);
        String strGroup6 = matcher.group(14);
        long j2 = (long) ((d5 + (strGroup6 != null ? Double.parseDouble(strGroup6) : 0.0d)) * 1000.0d);
        return !zIsEmpty ? -j2 : j2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:49:0x00b1  */
    /* JADX WARN: Removed duplicated region for block: B:78:0x012e  */
    /* JADX WARN: Removed duplicated region for block: B:86:0x0153  */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference failed for: r8v15 */
    /* JADX WARN: Type inference failed for: r8v16 */
    /* JADX WARN: Type inference failed for: r8v17 */
    /* JADX WARN: Type inference failed for: r8v18 */
    /* JADX WARN: Type inference failed for: r8v19 */
    /* JADX WARN: Type inference failed for: r8v2 */
    /* JADX WARN: Type inference failed for: r8v20 */
    /* JADX WARN: Type inference failed for: r8v4, types: [java.lang.String] */
    /* JADX WARN: Type inference failed for: r8v9 */
    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static Pair m7327(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException {
        String attributeValue;
        UUID uuid;
        byte[] bArr;
        ?? text;
        String attributeValue2;
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue3 != null) {
            String str = ᵻᵕᵭ.ʽᵡᵢᵾ(attributeValue3);
            str.getClass();
            switch (str) {
                case "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":
                    uuid = AbstractC3361.f12878;
                    attributeValue = null;
                    bArr = null;
                    text = bArr;
                    break;
                case "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":
                    uuid = AbstractC3361.f12879;
                    attributeValue = null;
                    bArr = null;
                    text = bArr;
                    break;
                case "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":
                    uuid = AbstractC3361.f12881;
                    attributeValue = null;
                    bArr = null;
                    text = bArr;
                    break;
                case "urn:mpeg:dash:mp4protection:2011":
                    attributeValue = xmlPullParser.getAttributeValue(null, "value");
                    int attributeCount = xmlPullParser.getAttributeCount();
                    int i = 0;
                    while (true) {
                        if (i >= attributeCount) {
                            attributeValue2 = null;
                        } else {
                            String attributeName = xmlPullParser.getAttributeName(i);
                            int iIndexOf = attributeName.indexOf(58);
                            if (iIndexOf != -1) {
                                attributeName = attributeName.substring(iIndexOf + 1);
                            }
                            if (attributeName.equals("default_KID")) {
                                attributeValue2 = xmlPullParser.getAttributeValue(i);
                            } else {
                                i++;
                            }
                        }
                    }
                    if (TextUtils.isEmpty(attributeValue2)) {
                        attributeValue2 = "00000000-0000-0000-0000-000000000000";
                    }
                    String[] strArrSplit = attributeValue2.split("\\s+");
                    UUID[] uuidArr = new UUID[strArrSplit.length];
                    for (int i2 = 0; i2 < strArrSplit.length; i2++) {
                        uuidArr[i2] = UUID.fromString(strArrSplit[i2]);
                    }
                    uuid = AbstractC3361.f12877;
                    bArr = ᵲᵧˇ.ʽˈˋ(uuid, uuidArr, (byte[]) null);
                    text = 0;
                    break;
                default:
                    attributeValue = null;
                    uuid = null;
                    bArr = null;
                    text = bArr;
                    break;
            }
        }
        do {
            xmlPullParser.next();
            if ((ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "clearkey:Laurl") || ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "dashif:Laurl")) && xmlPullParser.next() == 4) {
                text = xmlPullParser.getText();
            } else if (ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "ms:laurl")) {
                text = xmlPullParser.getAttributeValue(null, "licenseUrl");
            } else if (bArr == null && xmlPullParser.getEventType() == 2) {
                String name = xmlPullParser.getName();
                int iIndexOf2 = name.indexOf(58);
                if (iIndexOf2 != -1) {
                    name = name.substring(iIndexOf2 + 1);
                }
                if (name.equals("pssh") && xmlPullParser.next() == 4) {
                    byte[] bArrDecode = Base64.decode(xmlPullParser.getText(), 0);
                    ˆᴵᵶ r7 = ᵲᵧˇ.ᵜᵪʾ(bArrDecode);
                    UUID uuid2 = r7 == null ? null : (UUID) r7.ᵜᵪʾ;
                    if (uuid2 == null) {
                        ˋˀᵧ.ʿٴˇ("Skipping malformed cenc:pssh data");
                        uuid = uuid2;
                        bArr = null;
                        text = text;
                    } else {
                        UUID uuid3 = uuid2;
                        bArr = bArrDecode;
                        uuid = uuid3;
                        text = text;
                    }
                }
            } else if (bArr == null) {
                UUID uuid4 = AbstractC3361.f12879;
                if (uuid4.equals(uuid) && ˀᵳˎᵹ.ˉᵲ(xmlPullParser, "mspr:pro") && xmlPullParser.next() == 4) {
                    bArr = ᵲᵧˇ.ʽˈˋ(uuid4, (UUID[]) null, Base64.decode(xmlPullParser.getText(), 0));
                    text = text;
                } else {
                    m7309(xmlPullParser);
                    text = text;
                }
            }
        } while (!ˀᵳˎᵹ.ˊᵙᵾᵲ(xmlPullParser, "ContentProtection"));
        return Pair.create(attributeValue, uuid != null ? new C4386(uuid, text, "video/mp4", bArr) : null);
    }

    @Override // defpackage.InterfaceC2793
    /* JADX INFO: renamed from: ᵜᵪʾ */
    public final Object mo6779(Uri uri, C4437 c4437) throws IOException {
        try {
            XmlPullParser xmlPullParserNewPullParser = this.f12140.newPullParser();
            xmlPullParserNewPullParser.setInput(c4437, null);
            if (xmlPullParserNewPullParser.next() == 2 && "MPD".equals(xmlPullParserNewPullParser.getName())) {
                return m7324(xmlPullParserNewPullParser, uri);
            }
            throw ParserException.m355("inputStream does not contain a valid media presentation description", null);
        } catch (XmlPullParserException e) {
            if (e.getDetail() instanceof IOException) {
                throw ((IOException) e.getDetail());
            }
            throw ParserException.m355(null, e);
        }
    }
}
