package k9; import a9.a; import ai.clova.cic.clientlib.exoplayer2.C; import ai.clova.cic.clientlib.exoplayer2.util.MimeTypes; import android.util.Pair; import android.util.SparseArray; import androidx.biometric.b0; import com.google.android.exoplayer.text.eia608.ClosedCaptionCtrl; import com.google.android.exoplayer2.drm.DrmInitData; import com.google.common.collect.l0; import com.google.common.collect.l2; import com.linecorp.yuki.sensetime.model.SegmentationData; import f9.a0; import f9.h; import f9.j; import f9.v; import f9.x; import io.card.payment.CardScanner; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.UUID; import k9.b; import kotlin.UByte; import ra.k0; import ra.r; import ra.t; import ra.u; import ra.y; import sa.e; import y8.a2; import y8.i; import y8.j1; public class g implements h { /* renamed from: b0 reason: collision with root package name */ public static final byte[] f101254b0 = {49, 10, 48, 48, 58, 48, 48, 58, 48, 48, ClosedCaptionCtrl.ERASE_DISPLAYED_MEMORY, 48, 48, 48, ClosedCaptionCtrl.RESUME_CAPTION_LOADING, ClosedCaptionCtrl.CARRIAGE_RETURN, ClosedCaptionCtrl.CARRIAGE_RETURN, 62, ClosedCaptionCtrl.RESUME_CAPTION_LOADING, 48, 48, 58, 48, 48, 58, 48, 48, ClosedCaptionCtrl.ERASE_DISPLAYED_MEMORY, 48, 48, 48, 10}; /* renamed from: c0 reason: collision with root package name */ public static final byte[] f101255c0 = k0.D("Format: Start, End, ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text"); /* renamed from: d0 reason: collision with root package name */ public static final byte[] f101256d0 = {68, 105, 97, 108, 111, 103, 117, 101, 58, ClosedCaptionCtrl.RESUME_CAPTION_LOADING, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, ClosedCaptionCtrl.ERASE_DISPLAYED_MEMORY, 48, 58, 48, 48, 58, 48, 48, 58, 48, 48, ClosedCaptionCtrl.ERASE_DISPLAYED_MEMORY}; /* renamed from: e0 reason: collision with root package name */ public static final UUID f101257e0 = new UUID(72057594037932032L, -9223371306706625679L); /* renamed from: f0 reason: collision with root package name */ public static final Map<String, Integer> f101258f0; public long A = -1; public long B = C.TIME_UNSET; public r C; public r D; public boolean E; public boolean F; public int G; public long H; public long I; public int J; public int K; public int[] L; public int M; public int N; public int O; public int P; public boolean Q; public int R; public int S; public int T; public boolean U; public boolean V; public boolean W; public int X; public byte Y; public boolean Z; /* renamed from: a reason: collision with root package name */ public final d f101259a; /* renamed from: a0 reason: collision with root package name */ public j f101260a0; /* renamed from: b reason: collision with root package name */ public final i f101261b; /* renamed from: c reason: collision with root package name */ public final SparseArray<c> f101262c; /* renamed from: d reason: collision with root package name */ public final boolean f101263d; /* renamed from: e reason: collision with root package name */ public final y f101264e; /* renamed from: f reason: collision with root package name */ public final y f101265f; /* renamed from: g reason: collision with root package name */ public final y f101266g; /* renamed from: h reason: collision with root package name */ public final y f101267h; /* renamed from: i reason: collision with root package name */ public final y f101268i; /* renamed from: j reason: collision with root package name */ public final y f101269j; /* renamed from: k reason: collision with root package name */ public final y f101270k; /* renamed from: l reason: collision with root package name */ public final y f101271l; /* renamed from: m reason: collision with root package name */ public final y f101272m; /* renamed from: n reason: collision with root package name */ public final y f101273n; /* renamed from: o reason: collision with root package name */ public ByteBuffer f101274o; /* renamed from: p reason: collision with root package name */ public long f101275p; /* renamed from: q reason: collision with root package name */ public long f101276q = -1; /* renamed from: r reason: collision with root package name */ public long f101277r = C.TIME_UNSET; /* renamed from: s reason: collision with root package name */ public long f101278s = C.TIME_UNSET; /* renamed from: t reason: collision with root package name */ public long f101279t = C.TIME_UNSET; /* renamed from: u reason: collision with root package name */ public c f101280u; /* renamed from: v reason: collision with root package name */ public boolean f101281v; /* renamed from: w reason: collision with root package name */ public int f101282w; /* renamed from: x reason: collision with root package name */ public long f101283x; /* renamed from: y reason: collision with root package name */ public boolean f101284y; /* renamed from: z reason: collision with root package name */ public long f101285z = -1; public final class b implements c { public b(a aVar) { } /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARNING: Code restructure failed: missing block: B:291:0x05ca, code lost: if (r11 == 0) goto L_0x05eb; */ /* JADX WARNING: Code restructure failed: missing block: B:407:0x0824, code lost: if (r0.n() == r2.getLeastSignificantBits()) goto L_0x0826; */ /* JADX WARNING: Code restructure failed: missing block: B:412:0x0831, code lost: if (r11 == 0) goto L_0x083e; */ /* JADX WARNING: Removed duplicated region for block: B:411:0x082b */ /* JADX WARNING: Removed duplicated region for block: B:414:0x0839 */ /* JADX WARNING: Removed duplicated region for block: B:436:0x0890 */ /* JADX WARNING: Removed duplicated region for block: B:437:0x0892 */ /* JADX WARNING: Removed duplicated region for block: B:440:0x089f */ /* JADX WARNING: Removed duplicated region for block: B:441:0x08ac */ /* JADX WARNING: Removed duplicated region for block: B:498:0x09e1 */ /* JADX WARNING: Removed duplicated region for block: B:499:0x09e3 */ public void a(int i14) throws a2 { Object obj; Object obj2; char c14; boolean z14; g gVar; char c15; int i15; int i16; c cVar; int i17; String str; int i18; List<byte[]> list; String str2; j1.b bVar; int i19; int i24; sa.b bVar2; int i25; int i26; byte[] bArr; int i27; sa.c a14; String str3; int i28; String str4; ArrayList arrayList; String str5; List<byte[]> list2; String str6; String str7; boolean z15; String str8; ArrayList arrayList2; int i29; Throwable th4; List<byte[]> list3; String str9; Pair pair; String str10; String str11; String str12; String str13; String str14; v vVar; int i34; int i35; g gVar2 = g.this; b0.g(gVar2.f101260a0); if (i14 != 160) { if (i14 == 174) { c cVar2 = gVar2.f101280u; b0.g(cVar2); String str15 = cVar2.f101288b; if (str15 != null) { switch (str15.hashCode()) { case -2095576542: obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; if (str15.equals(obj)) { c14 = 0; break; } c14 = 65535; break; case -2095575984: obj2 = "V_MPEG4/ISO/SP"; obj = "V_MPEG4/ISO/AP"; if (str15.equals(obj2)) { c14 = 1; break; } c14 = 65535; break; case -1985379776: if (str15.equals("A_MS/ACM")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 2; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -1784763192: if (str15.equals("A_TRUEHD")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 3; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -1730367663: if (str15.equals("A_VORBIS")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 4; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -1482641358: if (str15.equals("A_MPEG/L2")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 5; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -1482641357: if (str15.equals("A_MPEG/L3")) { c14 = 6; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -1373388978: if (str15.equals("V_MS/VFW/FOURCC")) { c14 = 7; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -933872740: if (str15.equals("S_DVBSUB")) { c14 = '\b'; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -538363189: if (str15.equals("V_MPEG4/ISO/ASP")) { c14 = '\t'; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -538363109: if (str15.equals("V_MPEG4/ISO/AVC")) { c14 = '\n'; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -425012669: if (str15.equals("S_VOBSUB")) { c14 = 11; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case -356037306: if (str15.equals("A_DTS/LOSSLESS")) { c14 = '\f'; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 62923557: if (str15.equals("A_AAC")) { c14 = '\r'; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 62923603: if (str15.equals("A_AC3")) { c14 = 14; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 62927045: if (str15.equals("A_DTS")) { c14 = 15; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 82318131: if (str15.equals("V_AV1")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 16; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 82338133: if (str15.equals("V_VP8")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 17; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 82338134: if (str15.equals("V_VP9")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 18; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 99146302: if (str15.equals("S_HDMV/PGS")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 19; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 444813526: if (str15.equals("V_THEORA")) { c14 = 20; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 542569478: if (str15.equals("A_DTS/EXPRESS")) { c14 = 21; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 635596514: if (str15.equals("A_PCM/FLOAT/IEEE")) { c14 = 22; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 725948237: if (str15.equals("A_PCM/INT/BIG")) { c14 = 23; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 725957860: if (str15.equals("A_PCM/INT/LIT")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 24; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 738597099: if (str15.equals("S_TEXT/ASS")) { obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 25; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 855502857: if (str15.equals("V_MPEGH/ISO/HEVC")) { c14 = 26; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 1422270023: if (str15.equals("S_TEXT/UTF8")) { c14 = 27; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 1809237540: if (str15.equals("V_MPEG2")) { c14 = 28; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 1950749482: if (str15.equals("A_EAC3")) { c14 = 29; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 1950789798: if (str15.equals("A_FLAC")) { c14 = 30; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; case 1951062397: if (str15.equals("A_OPUS")) { c14 = 31; obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; break; } obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; default: obj = "V_MPEG4/ISO/AP"; obj2 = "V_MPEG4/ISO/SP"; c14 = 65535; break; } switch (c14) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case '\b': case '\t': case '\n': case 11: case '\f': case '\r': case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: z14 = true; break; default: z14 = false; break; } if (z14) { j jVar = gVar2.f101260a0; int i36 = cVar2.f101289c; String str16 = cVar2.f101288b; Objects.requireNonNull(str16); switch (str16.hashCode()) { case -2095576542: if (str16.equals(obj)) { c15 = 0; break; } c15 = 65535; break; case -2095575984: if (str16.equals(obj2)) { c15 = 1; break; } c15 = 65535; break; case -1985379776: if (str16.equals("A_MS/ACM")) { c15 = 2; break; } c15 = 65535; break; case -1784763192: if (str16.equals("A_TRUEHD")) { c15 = 3; break; } c15 = 65535; break; case -1730367663: if (str16.equals("A_VORBIS")) { c15 = 4; break; } c15 = 65535; break; case -1482641358: if (str16.equals("A_MPEG/L2")) { c15 = 5; break; } c15 = 65535; break; case -1482641357: if (str16.equals("A_MPEG/L3")) { c15 = 6; break; } c15 = 65535; break; case -1373388978: if (str16.equals("V_MS/VFW/FOURCC")) { c15 = 7; break; } c15 = 65535; break; case -933872740: if (str16.equals("S_DVBSUB")) { c15 = '\b'; break; } c15 = 65535; break; case -538363189: if (str16.equals("V_MPEG4/ISO/ASP")) { c15 = '\t'; break; } c15 = 65535; break; case -538363109: if (str16.equals("V_MPEG4/ISO/AVC")) { c15 = '\n'; break; } c15 = 65535; break; case -425012669: if (str16.equals("S_VOBSUB")) { c15 = 11; break; } c15 = 65535; break; case -356037306: if (str16.equals("A_DTS/LOSSLESS")) { c15 = '\f'; break; } c15 = 65535; break; case 62923557: if (str16.equals("A_AAC")) { c15 = '\r'; break; } c15 = 65535; break; case 62923603: if (str16.equals("A_AC3")) { c15 = 14; break; } c15 = 65535; break; case 62927045: if (str16.equals("A_DTS")) { c15 = 15; break; } c15 = 65535; break; case 82318131: if (str16.equals("V_AV1")) { c15 = 16; break; } c15 = 65535; break; case 82338133: if (str16.equals("V_VP8")) { c15 = 17; break; } c15 = 65535; break; case 82338134: if (str16.equals("V_VP9")) { c15 = 18; break; } c15 = 65535; break; case 99146302: if (str16.equals("S_HDMV/PGS")) { c15 = 19; break; } c15 = 65535; break; case 444813526: if (str16.equals("V_THEORA")) { c15 = 20; break; } c15 = 65535; break; case 542569478: if (str16.equals("A_DTS/EXPRESS")) { c15 = 21; break; } c15 = 65535; break; case 635596514: if (str16.equals("A_PCM/FLOAT/IEEE")) { c15 = 22; break; } c15 = 65535; break; case 725948237: if (str16.equals("A_PCM/INT/BIG")) { c15 = 23; break; } c15 = 65535; break; case 725957860: if (str16.equals("A_PCM/INT/LIT")) { c15 = 24; break; } c15 = 65535; break; case 738597099: if (str16.equals("S_TEXT/ASS")) { c15 = 25; break; } c15 = 65535; break; case 855502857: if (str16.equals("V_MPEGH/ISO/HEVC")) { c15 = 26; break; } c15 = 65535; break; case 1422270023: if (str16.equals("S_TEXT/UTF8")) { c15 = 27; break; } c15 = 65535; break; case 1809237540: if (str16.equals("V_MPEG2")) { c15 = 28; break; } c15 = 65535; break; case 1950749482: if (str16.equals("A_EAC3")) { c15 = 29; break; } c15 = 65535; break; case 1950789798: if (str16.equals("A_FLAC")) { c15 = 30; break; } c15 = 65535; break; case 1951062397: if (str16.equals("A_OPUS")) { c15 = 31; break; } c15 = 65535; break; default: c15 = 65535; break; } int i37 = 4096; String str17 = MimeTypes.VIDEO_UNKNOWN; String str18 = MimeTypes.AUDIO_UNKNOWN; switch (c15) { case 0: case 1: case '\t': cVar = cVar2; i18 = 1; i16 = 3; byte[] bArr2 = cVar.f101297k; list2 = bArr2 == null ? null : Collections.singletonList(bArr2); str6 = "video/mp4v-es"; str5 = null; str4 = str6; arrayList = list2; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3 = cVar.N; if (!(bArr3 == null || (a14 = sa.c.a(new y(bArr3))) == null)) { str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; } int i38 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { bVar.f186666x = cVar.O; bVar.f186667y = cVar.Q; bVar.f186668z = i15; i19 = i18; } else if (t.k(str2)) { if (cVar.f101303q == 0) { int i39 = cVar.f101301o; i24 = -1; if (i39 == -1) { i39 = cVar.f101299m; } cVar.f101301o = i39; int i44 = cVar.f101302p; if (i44 == -1) { i44 = cVar.f101300n; } cVar.f101302p = i44; } else { i24 = -1; } float f14 = -1.0f; int i45 = cVar.f101301o; if (!(i45 == i24 || (i27 = cVar.f101302p) == i24)) { f14 = ((float) (cVar.f101300n * i45)) / ((float) (cVar.f101299m * i27)); } if (cVar.f101310x) { if (cVar.D == -1.0f || cVar.E == -1.0f || cVar.F == -1.0f || cVar.G == -1.0f || cVar.H == -1.0f || cVar.I == -1.0f || cVar.J == -1.0f || cVar.K == -1.0f || cVar.L == -1.0f || cVar.M == -1.0f) { bArr = null; } else { bArr = new byte[25]; ByteBuffer order = ByteBuffer.wrap(bArr).order(ByteOrder.LITTLE_ENDIAN); order.put((byte) 0); order.putShort((short) ((int) ((cVar.D * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.E * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.F * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.G * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.H * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.I * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.J * 50000.0f) + 0.5f))); order.putShort((short) ((int) ((cVar.K * 50000.0f) + 0.5f))); order.putShort((short) ((int) (cVar.L + 0.5f))); order.putShort((short) ((int) (cVar.M + 0.5f))); order.putShort((short) cVar.B); order.putShort((short) cVar.C); } bVar2 = new sa.b(cVar.f101311y, cVar.A, cVar.f101312z, bArr); } else { bVar2 = null; } String str19 = cVar.f101287a; if (str19 != null) { Map<String, Integer> map = g.f101258f0; if (map.containsKey(str19)) { i25 = map.get(cVar.f101287a).intValue(); if (cVar.f101304r == 0 && Float.compare(cVar.f101305s, 0.0f) == 0 && Float.compare(cVar.f101306t, 0.0f) == 0) { if (Float.compare(cVar.f101307u, 0.0f) != 0) { i26 = 0; } else if (Float.compare(cVar.f101306t, 90.0f) == 0) { i26 = 90; } else if (Float.compare(cVar.f101306t, -180.0f) == 0 || Float.compare(cVar.f101306t, 180.0f) == 0) { i26 = 180; } else if (Float.compare(cVar.f101306t, -90.0f) == 0) { i26 = CardScanner.CREDIT_CARD_TARGET_HEIGHT; } bVar.f186658p = cVar.f101299m; bVar.f186659q = cVar.f101300n; bVar.f186662t = f14; bVar.f186661s = i26; bVar.f186663u = cVar.f101308v; bVar.f186664v = cVar.f101309w; bVar.f186665w = bVar2; i19 = 2; } i26 = i25; bVar.f186658p = cVar.f101299m; bVar.f186659q = cVar.f101300n; bVar.f186662t = f14; bVar.f186661s = i26; bVar.f186663u = cVar.f101308v; bVar.f186664v = cVar.f101309w; bVar.f186665w = bVar2; i19 = 2; } } i25 = i24; if (Float.compare(cVar.f101307u, 0.0f) != 0) { } bVar.f186658p = cVar.f101299m; bVar.f186659q = cVar.f101300n; bVar.f186662t = f14; bVar.f186661s = i26; bVar.f186663u = cVar.f101308v; bVar.f186664v = cVar.f101309w; bVar.f186665w = bVar2; i19 = 2; } else if ("application/x-subrip".equals(str2) || MimeTypes.TEXT_SSA.equals(str2) || MimeTypes.APPLICATION_VOBSUB.equals(str2) || MimeTypes.APPLICATION_PGS.equals(str2) || MimeTypes.APPLICATION_DVBSUBS.equals(str2)) { i19 = i16; } else { throw a2.a("Unexpected MIME type.", null); } String str20 = cVar.f101287a; if (str20 != null && !g.f101258f0.containsKey(str20)) { bVar.f186644b = cVar.f101287a; } bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15 = bVar.a(); x track = jVar.track(cVar.f101289c, i19); cVar.X = track; track.d(a15); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 2: cVar = cVar2; i16 = 3; y yVar = new y(cVar.a(cVar.f101288b)); try { int m14 = yVar.m(); i18 = 1; if (m14 != 1) { if (m14 == 65534) { yVar.F(24); long n14 = yVar.n(); UUID uuid = g.f101257e0; if (n14 == uuid.getMostSignificantBits()) { break; } } z15 = false; if (!z15) { i15 = k0.w(cVar.P); break; } else { "Non-PCM MS/ACM is unsupported. Setting mimeType to ".concat(str18); } str7 = null; list = null; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr32 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152 = bVar.a(); x track2 = jVar.track(cVar.f101289c, i19); cVar.X = track2; track2.d(a152); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; } z15 = true; if (!z15) { } str7 = null; list = null; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr322 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522 = bVar.a(); x track22 = jVar.track(cVar.f101289c, i19); cVar.X = track22; track22.d(a1522); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); } catch (ArrayIndexOutOfBoundsException unused) { throw a2.a("Error parsing MS/ACM codec private", null); } break; case 3: cVar = cVar2; i16 = 3; cVar.T = new f9.y(); str6 = MimeTypes.AUDIO_TRUEHD; list2 = null; i18 = 1; str5 = null; str4 = str6; arrayList = list2; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222 = bVar.a(); x track222 = jVar.track(cVar.f101289c, i19); cVar.X = track222; track222.d(a15222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 4: cVar = cVar2; i29 = 8192; byte[] a16 = cVar.a(cVar.f101288b); try { if (a16[0] == 2) { int i46 = 0; int i47 = 1; while ((a16[i47] & UByte.MAX_VALUE) == 255) { i46 += 255; i47++; } int i48 = i47 + 1; int i49 = i46 + (a16[i47] & 255); int i54 = 0; while ((a16[i48] & UByte.MAX_VALUE) == 255) { i54 += 255; i48++; } int i55 = i48 + 1; int i56 = i54 + (a16[i48] & 255); if (a16[i55] == 1) { byte[] bArr4 = new byte[i49]; System.arraycopy(a16, i55, bArr4, 0, i49); int i57 = i55 + i49; i16 = 3; if (a16[i57] == 3) { int i58 = i57 + i56; if (a16[i58] == 5) { byte[] bArr5 = new byte[(a16.length - i58)]; System.arraycopy(a16, i58, bArr5, 0, a16.length - i58); arrayList2 = new ArrayList(2); arrayList2.add(bArr4); arrayList2.add(bArr5); str8 = "audio/vorbis"; i37 = i29; arrayList = arrayList2; str4 = str8; i28 = i37; i18 = 1; str3 = null; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222 = bVar.a(); x track2222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222; track2222.d(a152222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; } else { th4 = null; try { throw a2.a("Error parsing vorbis codec private", null); } catch (ArrayIndexOutOfBoundsException unused2) { throw a2.a("Error parsing vorbis codec private", th4); } } } else { throw a2.a("Error parsing vorbis codec private", null); } } else { throw a2.a("Error parsing vorbis codec private", null); } } else { throw a2.a("Error parsing vorbis codec private", null); } } catch (ArrayIndexOutOfBoundsException unused3) { th4 = null; throw a2.a("Error parsing vorbis codec private", th4); } break; case 5: cVar = cVar2; str9 = "audio/mpeg-L2"; str4 = str9; list3 = null; i16 = 3; arrayList = list3; i28 = i37; i18 = 1; str3 = null; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222 = bVar.a(); x track22222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222; track22222.d(a1522222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 6: cVar = cVar2; str9 = "audio/mpeg"; str4 = str9; list3 = null; i16 = 3; arrayList = list3; i28 = i37; i18 = 1; str3 = null; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222 = bVar.a(); x track222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222; track222222.d(a15222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 7: cVar = cVar2; byte[] a17 = cVar.a(cVar.f101288b); try { b0.b(16 <= a17.length); long j14 = (((long) a17[16]) & 255) | ((((long) a17[17]) & 255) << 8) | ((((long) a17[18]) & 255) << 16) | ((255 & ((long) a17[19])) << 24); if (j14 == 1482049860) { pair = new Pair(MimeTypes.VIDEO_DIVX, null); } else if (j14 == 859189832) { pair = new Pair("video/3gpp", null); } else if (j14 == 826496599) { for (int i59 = 40; i59 < a17.length - 4; i59++) { if (a17[i59] == 0 && a17[i59 + 1] == 0 && a17[i59 + 2] == 1 && a17[i59 + 3] == 15) { pair = new Pair(MimeTypes.VIDEO_VC1, Collections.singletonList(Arrays.copyOfRange(a17, i59, a17.length))); } } throw a2.a("Failed to find FourCC VC1 initialization data", null); } else { pair = new Pair(str17, null); } str4 = (String) pair.first; list3 = (List) pair.second; i37 = -1; i16 = 3; arrayList = list3; i28 = i37; i18 = 1; str3 = null; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222 = bVar.a(); x track2222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222; track2222222.d(a152222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; } catch (ArrayIndexOutOfBoundsException unused4) { throw a2.a("Error parsing FourCC private data", null); } break; case '\b': cVar = cVar2; byte[] bArr6 = new byte[4]; System.arraycopy(cVar.a(cVar.f101288b), 0, bArr6, 0, 4); int i64 = l0.f31474c; list = new l2(bArr6); str10 = MimeTypes.APPLICATION_DVBSUBS; str18 = str10; str7 = null; i18 = 1; i16 = 3; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr322222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222 = bVar.a(); x track22222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222; track22222222.d(a1522222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case '\n': cVar = cVar2; sa.a b14 = sa.a.b(new y(cVar.a(cVar.f101288b))); list = b14.f142148a; cVar.Y = b14.f142149b; str7 = b14.f142153f; str11 = "video/avc"; str18 = str11; i18 = 1; i16 = 3; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr3222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222 = bVar.a(); x track222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222; track222222222.d(a15222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 11: cVar = cVar2; byte[] a18 = cVar.a(cVar.f101288b); int i65 = l0.f31474c; list = new l2<>(a18); str10 = MimeTypes.APPLICATION_VOBSUB; str18 = str10; str7 = null; i18 = 1; i16 = 3; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr32222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222 = bVar.a(); x track2222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222; track2222222222.d(a152222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case '\f': cVar = cVar2; str17 = MimeTypes.AUDIO_DTS_HD; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222 = bVar.a(); x track22222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222; track22222222222.d(a1522222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case '\r': cVar = cVar2; arrayList = Collections.singletonList(cVar.a(cVar.f101288b)); a.b c16 = a9.a.c(cVar.f101297k); cVar.Q = c16.f2869a; cVar.O = c16.f2870b; str13 = c16.f2871c; str12 = "audio/mp4a-latm"; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222 = bVar.a(); x track222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222; track222222222222.d(a15222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 14: cVar = cVar2; str17 = "audio/ac3"; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222 = bVar.a(); x track2222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222; track2222222222222.d(a152222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 15: case 21: cVar = cVar2; str17 = MimeTypes.AUDIO_DTS; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222 = bVar.a(); x track22222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222; track22222222222222.d(a1522222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 16: cVar = cVar2; str17 = MimeTypes.VIDEO_AV1; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222 = bVar.a(); x track222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222; track222222222222222.d(a15222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 17: cVar = cVar2; str17 = "video/x-vnd.on2.vp8"; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222222 = bVar.a(); x track2222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222222; track2222222222222222.d(a152222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 18: cVar = cVar2; str17 = "video/x-vnd.on2.vp9"; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222222 = bVar.a(); x track22222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222222; track22222222222222222.d(a1522222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 19: cVar = cVar2; str17 = MimeTypes.APPLICATION_PGS; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222222 = bVar.a(); x track222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222222; track222222222222222222.d(a15222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 20: cVar = cVar2; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222222222 = bVar.a(); x track2222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222222222; track2222222222222222222.d(a152222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 22: cVar = cVar2; if (cVar.P == 32) { i15 = 4; i18 = 1; i16 = 3; str2 = "audio/raw"; list = null; str = null; i17 = -1; byte[] bArr322222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222222222 = bVar.a(); x track22222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222222222; track22222222222222222222.d(a1522222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; } i18 = 1; i16 = 3; str7 = null; list = null; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr3222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222222222 = bVar.a(); x track222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222222222; track222222222222222222222.d(a15222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 23: cVar = cVar2; int i66 = cVar.P; if (i66 != 8) { if (i66 == 16) { i15 = 268435456; } i18 = 1; i16 = 3; str7 = null; list = null; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr32222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222222222222 = bVar.a(); x track2222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222222222222; track2222222222222222222222.d(a152222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; } else { i15 = 3; } i18 = 1; i16 = 3; str2 = "audio/raw"; list = null; str = null; i17 = -1; byte[] bArr322222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222222222222 = bVar.a(); x track22222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222222222222; track22222222222222222222222.d(a1522222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 24: cVar = cVar2; i15 = k0.w(cVar.P); break; case 25: cVar = cVar2; byte[] bArr7 = g.f101255c0; byte[] a19 = cVar.a(cVar.f101288b); int i67 = l0.f31474c; arrayList = l0.A(bArr7, a19); str14 = MimeTypes.TEXT_SSA; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222222222222 = bVar.a(); x track222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222222222222; track222222222222222222222222.d(a15222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 26: cVar = cVar2; e a24 = e.a(new y(cVar.a(cVar.f101288b))); list = a24.f142174a; cVar.Y = a24.f142175b; str7 = a24.f142177d; str11 = "video/hevc"; str18 = str11; i18 = 1; i16 = 3; str = str7; str2 = str18; i15 = -1; i17 = -1; byte[] bArr32222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222222222222222 = bVar.a(); x track2222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222222222222222; track2222222222222222222222222.d(a152222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 27: cVar = cVar2; str17 = "application/x-subrip"; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222222222222222 = bVar.a(); x track22222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222222222222222; track22222222222222222222222222.d(a1522222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 28: cVar = cVar2; str17 = MimeTypes.VIDEO_MPEG2; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222222222222222 = bVar.a(); x track222222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222222222222222; track222222222222222222222222222.d(a15222222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 29: cVar = cVar2; str17 = "audio/eac3"; str14 = str17; arrayList = null; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr32222222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i382222222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str202222222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i382222222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a152222222222222222222222222222 = bVar.a(); x track2222222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track2222222222222222222222222222; track2222222222222222222222222222.d(a152222222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 30: cVar = cVar2; arrayList = Collections.singletonList(cVar.a(cVar.f101288b)); str14 = MimeTypes.AUDIO_FLAC; str12 = str14; str13 = null; str5 = str13; str4 = str12; i18 = 1; i16 = 3; str3 = str5; i28 = -1; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr322222222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i3822222222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str2022222222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i3822222222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a1522222222222222222222222222222 = bVar.a(); x track22222222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track22222222222222222222222222222; track22222222222222222222222222222.d(a1522222222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; case 31: i29 = 5760; arrayList2 = new ArrayList(3); cVar = cVar2; arrayList2.add(cVar.a(cVar.f101288b)); ByteBuffer allocate = ByteBuffer.allocate(8); ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN; arrayList2.add(allocate.order(byteOrder).putLong(cVar.R).array()); arrayList2.add(ByteBuffer.allocate(8).order(byteOrder).putLong(cVar.S).array()); str8 = "audio/opus"; i16 = 3; i37 = i29; arrayList = arrayList2; str4 = str8; i28 = i37; i18 = 1; str3 = null; i15 = -1; list = arrayList; str2 = str4; i17 = i28; str = str3; byte[] bArr3222222222222222222222222222222 = cVar.N; str = a14.f142160a; str2 = MimeTypes.VIDEO_DOLBY_VISION; int i38222222222222222222222222222222 = (cVar.V ? 1 : 0) | 0 | (cVar.U ? 2 : 0); bVar = new j1.b(); if (t.i(str2)) { } String str20222222222222222222222222222222 = cVar.f101287a; bVar.f186644b = cVar.f101287a; bVar.b(i36); bVar.f186653k = str2; bVar.f186654l = i17; bVar.f186645c = cVar.W; bVar.f186646d = i38222222222222222222222222222222; bVar.f186655m = list; bVar.f186650h = str; bVar.f186656n = cVar.f101298l; j1 a15222222222222222222222222222222 = bVar.a(); x track222222222222222222222222222222 = jVar.track(cVar.f101289c, i19); cVar.X = track222222222222222222222222222222; track222222222222222222222222222222.d(a15222222222222222222222222222222); gVar = gVar2; gVar.f101262c.put(cVar.f101289c, cVar); break; default: throw a2.a("Unrecognized codec identifier.", null); } } else { gVar = gVar2; } gVar.f101280u = null; return; } throw a2.a("CodecId is missing in TrackEntry element", null); } else if (i14 == 19899) { int i68 = gVar2.f101282w; if (i68 != -1) { long j15 = gVar2.f101283x; if (j15 != -1) { if (i68 == 475249515) { gVar2.f101285z = j15; return; } return; } } throw a2.a("Mandatory element SeekID or SeekPosition not found", null); } else if (i14 == 25152) { gVar2.e(i14); c cVar3 = gVar2.f101280u; if (cVar3.f101294h) { x.a aVar = cVar3.f101296j; if (aVar != null) { cVar3.f101298l = new DrmInitData(null, true, new DrmInitData.SchemeData(i.f186577a, "video/webm", aVar.f71222b)); return; } throw a2.a("Encrypted Track found but ContentEncKeyID was not found", null); } } else if (i14 == 28032) { gVar2.e(i14); c cVar4 = gVar2.f101280u; if (cVar4.f101294h && cVar4.f101295i != null) { throw a2.a("Combining encryption and compression is not supported", null); } } else if (i14 == 357149030) { if (gVar2.f101277r == C.TIME_UNSET) { gVar2.f101277r = 1000000; } long j16 = gVar2.f101278s; if (j16 != C.TIME_UNSET) { gVar2.f101279t = gVar2.k(j16); } } else if (i14 != 374648427) { if (i14 == 475249515) { if (!gVar2.f101281v) { j jVar2 = gVar2.f101260a0; r rVar = gVar2.C; r rVar2 = gVar2.D; if (gVar2.f101276q == -1 || gVar2.f101279t == C.TIME_UNSET || rVar == null || (i34 = rVar.f136502a) == 0 || rVar2 == null || rVar2.f136502a != i34) { vVar = new v.b(gVar2.f101279t, 0); } else { int[] iArr = new int[i34]; long[] jArr = new long[i34]; long[] jArr2 = new long[i34]; long[] jArr3 = new long[i34]; for (int i69 = 0; i69 < i34; i69++) { jArr3[i69] = rVar.b(i69); jArr[i69] = rVar2.b(i69) + gVar2.f101276q; } int i74 = 0; while (true) { i35 = i34 - 1; if (i74 >= i35) { break; } int i75 = i74 + 1; iArr[i74] = (int) (jArr[i75] - jArr[i74]); jArr2[i74] = jArr3[i75] - jArr3[i74]; i74 = i75; } iArr[i35] = (int) ((gVar2.f101276q + gVar2.f101275p) - jArr[i35]); jArr2[i35] = gVar2.f101279t - jArr3[i35]; if (jArr2[i35] <= 0) { iArr = Arrays.copyOf(iArr, i35); jArr = Arrays.copyOf(jArr, i35); jArr2 = Arrays.copyOf(jArr2, i35); jArr3 = Arrays.copyOf(jArr3, i35); } vVar = new f9.c(iArr, jArr, jArr2, jArr3); } jVar2.c(vVar); gVar2.f101281v = true; } gVar2.C = null; gVar2.D = null; } } else if (gVar2.f101262c.size() != 0) { gVar2.f101260a0.endTracks(); } else { throw a2.a("No valid tracks were found", null); } } else if (gVar2.G == 2) { int i76 = 0; for (int i77 = 0; i77 < gVar2.K; i77++) { i76 += gVar2.L[i77]; } c cVar5 = gVar2.f101262c.get(gVar2.M); Objects.requireNonNull(cVar5.X); int i78 = 0; while (i78 < gVar2.K) { long j17 = gVar2.H + ((long) ((cVar5.f101291e * i78) / 1000)); int i79 = gVar2.O; if (i78 == 0 && !gVar2.Q) { i79 |= 1; } int i84 = gVar2.L[i78]; int i85 = i76 - i84; gVar2.f(cVar5, j17, i79, i84, i85); i78++; i76 = i85; } gVar2.G = 0; } } } static { HashMap hashMap = new HashMap(); f.a(0, hashMap, "htc_video_rotA-000", 90, "htc_video_rotA-090", 180, "htc_video_rotA-180", CardScanner.CREDIT_CARD_TARGET_HEIGHT, "htc_video_rotA-270"); f101258f0 = Collections.unmodifiableMap(hashMap); } public g(int i14) { b bVar = new b(); this.f101259a = bVar; bVar.f101242d = new b(null); this.f101263d = (i14 & 1) == 0; this.f101261b = new i(); this.f101262c = new SparseArray<>(); this.f101266g = new y(4); this.f101267h = new y(ByteBuffer.allocate(4).putInt(-1).array()); this.f101268i = new y(4); this.f101264e = new y(u.f136508a); this.f101265f = new y(4); this.f101269j = new y(); this.f101270k = new y(); this.f101271l = new y(8); this.f101272m = new y(); this.f101273n = new y(); this.L = new int[1]; } public static int[] g(int[] iArr, int i14) { if (iArr == null) { return new int[i14]; } if (iArr.length >= i14) { return iArr; } return new int[Math.max(iArr.length * 2, i14)]; } public static byte[] h(long j14, String str, long j15) { b0.b(j14 != C.TIME_UNSET); int i14 = (int) (j14 / 3600000000L); long j16 = j14 - (((long) (i14 * 3600)) * 1000000); int i15 = (int) (j16 / 60000000); long j17 = j16 - (((long) (i15 * 60)) * 1000000); int i16 = (int) (j17 / 1000000); return k0.D(String.format(Locale.US, str, Integer.valueOf(i14), Integer.valueOf(i15), Integer.valueOf(i16), Integer.valueOf((int) ((j17 - (((long) i16) * 1000000)) / j15)))); } /* JADX DEBUG: Failed to insert an additional move for type inference into block B:448:0x00a1 */ /* JADX DEBUG: Multi-variable search result rejected for r29v0, resolved type: f9.i */ /* JADX DEBUG: Multi-variable search result rejected for r12v24, resolved type: k9.i */ /* JADX DEBUG: Multi-variable search result rejected for r8v22, resolved type: ra.y */ /* JADX DEBUG: Multi-variable search result rejected for r5v88, resolved type: ra.y */ /* JADX DEBUG: Multi-variable search result rejected for r4v72, resolved type: k9.i */ /* JADX DEBUG: Multi-variable search result rejected for r4v74, resolved type: k9.i */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Type inference failed for: r5v0 */ /* JADX WARN: Type inference failed for: r5v1, types: [int, boolean] */ /* JADX WARN: Type inference failed for: r3v4, types: [int, boolean] */ /* JADX WARN: Type inference failed for: r5v2 */ /* JADX WARN: Type inference failed for: r3v13 */ /* JADX WARN: Type inference failed for: r3v126 */ /* JADX WARN: Type inference failed for: r3v127 */ /* JADX WARN: Type inference failed for: r3v144 */ /* JADX WARNING: Code restructure failed: missing block: B:32:0x00a1, code lost: r4 = r3 == true ? 1 : 0; */ /* JADX WARNING: Removed duplicated region for block: B:434:0x08d5 A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:446:0x08d7 A[SYNTHETIC] */ /* JADX WARNING: Unknown variable types count: 2 */ @Override // f9.h public final int a(f9.i iVar, f9.u uVar) throws IOException { boolean z14; int i14; int i15; int i16; String str; boolean z15; long j14; int i17; int[] iArr; double d14; boolean z16 = false; this.F = false; boolean z17 = true; ?? r54 = 1; while (z17 && !this.F) { b bVar = (b) this.f101259a; b0.g(bVar.f101242d); ?? r34 = z16; while (true) { b.C1585b peek = bVar.f101240b.peek(); if (peek == null || iVar.getPosition() < peek.f101247b) { if (bVar.f101243e == 0) { long c14 = bVar.f101241c.c(iVar, r54, r34, 4); if (c14 == -2) { iVar.resetPeekPosition(); while (true) { iVar.peekFully(bVar.f101239a, r34, 4); int b14 = i.b(bVar.f101239a[r34]); if (b14 != -1 && b14 <= 4) { int a14 = (int) i.a(bVar.f101239a, b14, r34); Objects.requireNonNull(g.this); if ((a14 == 357149030 || a14 == 524531317 || a14 == 475249515 || a14 == 374648427) ? r54 : r34) { iVar.skipFully(b14); c14 = (long) a14; } } iVar.skipFully(r54); } } if (c14 != -1) { bVar.f101244f = (int) c14; bVar.f101243e = r54; } } if (bVar.f101243e == r54) { bVar.f101245g = bVar.f101241c.c(iVar, r34, r54, 8); bVar.f101243e = 2; } c cVar = bVar.f101242d; int i18 = bVar.f101244f; Objects.requireNonNull(g.this); switch (i18) { case 131: case 136: case 155: case 159: case 176: case 179: case 186: case 215: case 231: case 238: case 241: case 251: case 16871: case 16980: case 17029: case 17143: case 18401: case 18408: case 20529: case 20530: case 21420: case 21432: case 21680: case 21682: case 21690: case 21930: case 21945: case 21946: case 21947: case 21948: case 21949: case 21998: case 22186: case 22203: case 25188: case 30321: case 2352003: case 2807729: i14 = 2; break; case 134: case 17026: case 21358: case 2274716: i14 = 3; break; case SegmentationData.MAX_SEGMENTATION_WIDTH: case 166: case 174: case 183: case 187: case 224: case 225: case 16868: case 18407: case 19899: case 20532: case 20533: case 21936: case 21968: case 25152: case 28032: case 30113: case 30320: case 290298740: case 357149030: case 374648427: case 408125543: case 440786851: case 475249515: case 524531317: i14 = r54; break; case 161: case 163: case 165: case 16877: case 16981: case 18402: case 21419: case 25506: case 30322: i14 = 4; break; case 181: case 17545: case 21969: case 21970: case 21971: case 21972: case 21973: case 21974: case 21975: case 21976: case 21977: case 21978: case 30323: case 30324: case 30325: i14 = 5; break; default: i14 = r34; break; } if (i14 != 0) { if (i14 == r54) { long position = iVar.getPosition(); bVar.f101240b.push(new b.C1585b(bVar.f101244f, bVar.f101245g + position, null)); c cVar2 = bVar.f101242d; int i19 = bVar.f101244f; long j15 = bVar.f101245g; g gVar = g.this; b0.g(gVar.f101260a0); if (i19 == 160) { i15 = 0; gVar.Q = false; } else if (i19 == 174) { i15 = 0; gVar.f101280u = new c(null); } else if (i19 != 187) { if (i19 == 19899) { gVar.f101282w = -1; gVar.f101283x = -1; } else if (i19 == 20533) { gVar.e(i19); gVar.f101280u.f101294h = true; } else if (i19 == 21968) { gVar.e(i19); gVar.f101280u.f101310x = true; } else if (i19 == 408125543) { long j16 = gVar.f101276q; if (j16 == -1 || j16 == position) { gVar.f101276q = position; gVar.f101275p = j15; } else { throw a2.a("Multiple Segment elements not supported", null); } } else if (i19 == 475249515) { gVar.C = new r(0, null); gVar.D = new r(0, null); } else if (i19 == 524531317 && !gVar.f101281v) { if (!gVar.f101263d || gVar.f101285z == -1) { gVar.f101260a0.c(new v.b(gVar.f101279t, 0)); gVar.f101281v = true; } else { gVar.f101284y = true; } } i15 = 0; } else { i15 = 0; gVar.E = false; } bVar.f101243e = i15; } else if (i14 == 2) { long j17 = bVar.f101245g; if (j17 <= 8) { c cVar3 = bVar.f101242d; int i24 = bVar.f101244f; long a15 = bVar.a(iVar, (int) j17); g gVar2 = g.this; Objects.requireNonNull(gVar2); if (i24 != 20529) { if (i24 != 20530) { switch (i24) { case 131: gVar2.e(i24); gVar2.f101280u.f101290d = (int) a15; break; case 136: gVar2.e(i24); gVar2.f101280u.V = a15 == 1; break; case 155: gVar2.I = gVar2.k(a15); break; case 159: gVar2.e(i24); gVar2.f101280u.O = (int) a15; break; case 176: gVar2.e(i24); gVar2.f101280u.f101299m = (int) a15; break; case 179: gVar2.d(i24); gVar2.C.a(gVar2.k(a15)); break; case 186: gVar2.e(i24); gVar2.f101280u.f101300n = (int) a15; break; case 215: gVar2.e(i24); gVar2.f101280u.f101289c = (int) a15; break; case 231: gVar2.B = gVar2.k(a15); break; case 238: gVar2.P = (int) a15; break; case 241: if (!gVar2.E) { gVar2.d(i24); gVar2.D.a(a15); gVar2.E = true; break; } break; case 251: gVar2.Q = true; break; case 16871: gVar2.e(i24); gVar2.f101280u.f101293g = (int) a15; break; case 16980: if (a15 != 3) { throw a2.a(a.a(50, "ContentCompAlgo ", a15, " not supported"), null); } break; case 17029: if (a15 < 1 || a15 > 2) { throw a2.a(a.a(53, "DocTypeReadVersion ", a15, " not supported"), null); } case 17143: if (a15 != 1) { throw a2.a(a.a(50, "EBMLReadVersion ", a15, " not supported"), null); } break; case 18401: if (a15 != 5) { throw a2.a(a.a(49, "ContentEncAlgo ", a15, " not supported"), null); } break; case 18408: if (a15 != 1) { throw a2.a(a.a(56, "AESSettingsCipherMode ", a15, " not supported"), null); } break; case 21420: gVar2.f101283x = a15 + gVar2.f101276q; break; case 21432: int i25 = (int) a15; gVar2.e(i24); if (i25 != 0) { if (i25 != 1) { if (i25 != 3) { if (i25 == 15) { gVar2.f101280u.f101309w = 3; break; } } else { gVar2.f101280u.f101309w = 1; break; } } else { gVar2.f101280u.f101309w = 2; break; } } else { i16 = 0; gVar2.f101280u.f101309w = 0; break; } break; case 21680: gVar2.e(i24); gVar2.f101280u.f101301o = (int) a15; break; case 21682: gVar2.e(i24); gVar2.f101280u.f101303q = (int) a15; break; case 21690: gVar2.e(i24); gVar2.f101280u.f101302p = (int) a15; break; case 21930: gVar2.e(i24); gVar2.f101280u.U = a15 == 1; break; case 21998: gVar2.e(i24); gVar2.f101280u.f101292f = (int) a15; break; case 22186: gVar2.e(i24); gVar2.f101280u.R = a15; break; case 22203: gVar2.e(i24); gVar2.f101280u.S = a15; break; case 25188: gVar2.e(i24); gVar2.f101280u.P = (int) a15; break; case 30321: gVar2.e(i24); int i26 = (int) a15; if (i26 != 0) { if (i26 != 1) { if (i26 != 2) { if (i26 == 3) { gVar2.f101280u.f101304r = 3; break; } } else { gVar2.f101280u.f101304r = 2; break; } } else { gVar2.f101280u.f101304r = 1; break; } } else { i16 = 0; gVar2.f101280u.f101304r = 0; break; } break; case 2352003: gVar2.e(i24); gVar2.f101280u.f101291e = (int) a15; break; case 2807729: gVar2.f101277r = a15; break; default: switch (i24) { case 21945: gVar2.e(i24); int i27 = (int) a15; if (i27 != 1) { if (i27 == 2) { gVar2.f101280u.A = 1; break; } } else { gVar2.f101280u.A = 2; break; } break; case 21946: gVar2.e(i24); int c15 = sa.b.c((int) a15); if (c15 != -1) { gVar2.f101280u.f101312z = c15; break; } break; case 21947: gVar2.e(i24); gVar2.f101280u.f101310x = true; int b15 = sa.b.b((int) a15); if (b15 != -1) { gVar2.f101280u.f101311y = b15; break; } break; case 21948: gVar2.e(i24); gVar2.f101280u.B = (int) a15; break; case 21949: gVar2.e(i24); gVar2.f101280u.C = (int) a15; break; } } bVar.f101243e = i16; } else if (a15 != 1) { throw a2.a(a.a(55, "ContentEncodingScope ", a15, " not supported"), null); } } else if (a15 != 0) { throw a2.a(a.a(55, "ContentEncodingOrder ", a15, " not supported"), null); } i16 = 0; bVar.f101243e = i16; } else { StringBuilder sb4 = new StringBuilder(42); sb4.append("Invalid integer size: "); sb4.append(j17); throw a2.a(sb4.toString(), null); } } else if (i14 == 3) { long j18 = bVar.f101245g; if (j18 <= 2147483647L) { c cVar4 = bVar.f101242d; int i28 = bVar.f101244f; int i29 = (int) j18; if (i29 == 0) { str = ""; } else { byte[] bArr = new byte[i29]; iVar.readFully(bArr, 0, i29); while (i29 > 0) { int i34 = i29 - 1; if (bArr[i34] == 0) { i29 = i34; } else { str = new String(bArr, 0, i29); } } str = new String(bArr, 0, i29); } g gVar3 = g.this; Objects.requireNonNull(gVar3); if (i28 == 134) { gVar3.e(i28); gVar3.f101280u.f101288b = str; } else if (i28 != 17026) { if (i28 == 21358) { gVar3.e(i28); gVar3.f101280u.f101287a = str; } else if (i28 == 2274716) { gVar3.e(i28); gVar3.f101280u.W = str; } } else if (!"webm".equals(str) && !"matroska".equals(str)) { StringBuilder sb5 = new StringBuilder(str.length() + 22); sb5.append("DocType "); sb5.append(str); sb5.append(" not supported"); throw a2.a(sb5.toString(), null); } bVar.f101243e = 0; } else { StringBuilder sb6 = new StringBuilder(41); sb6.append("String element size: "); sb6.append(j18); throw a2.a(sb6.toString(), null); } } else if (i14 == 4) { c cVar5 = bVar.f101242d; int i35 = bVar.f101244f; int i36 = (int) bVar.f101245g; g gVar4 = g.this; Objects.requireNonNull(gVar4); if (i35 == 161 || i35 == 163) { if (gVar4.G == 0) { gVar4.M = (int) gVar4.f101261b.c(iVar, r34, r54, 8); gVar4.N = gVar4.f101261b.f101318c; gVar4.I = C.TIME_UNSET; gVar4.G = r54; gVar4.f101266g.B(r34); } c cVar6 = gVar4.f101262c.get(gVar4.M); if (cVar6 == null) { iVar.skipFully(i36 - gVar4.N); gVar4.G = r34; z15 = r34; } else { Objects.requireNonNull(cVar6.X); if (gVar4.G == r54) { gVar4.i(iVar, 3); int i37 = r54 == true ? 1 : 0; int i38 = r54 == true ? 1 : 0; int i39 = r54 == true ? 1 : 0; int i44 = (gVar4.f101266g.f136548a[2] & 6) >> i37; byte b16 = UByte.MAX_VALUE; if (i44 == 0) { gVar4.K = r54; int[] g14 = g(gVar4.L, r54); gVar4.L = g14; char c16 = r34 == true ? 1 : 0; char c17 = r34 == true ? 1 : 0; g14[c16] = (i36 - gVar4.N) - 3; } else { gVar4.i(iVar, 4); int i45 = (gVar4.f101266g.f136548a[3] & UByte.MAX_VALUE) + r54; gVar4.K = i45; int[] g15 = g(gVar4.L, i45); gVar4.L = g15; if (i44 == 2) { int i46 = gVar4.K; int i47 = r34 == true ? 1 : 0; int i48 = r34 == true ? 1 : 0; Arrays.fill(g15, i47, i46, ((i36 - gVar4.N) - 4) / i46); } else { int i49 = 4; if (i44 == r54) { int i54 = r34; int i55 = i54; while (true) { int i56 = gVar4.K; if (i54 < i56 - 1) { int[] iArr2 = gVar4.L; int i57 = r34 == true ? 1 : 0; int i58 = r34 == true ? 1 : 0; iArr2[i54] = i57; do { i49 += r54; gVar4.i(iVar, i49); i17 = gVar4.f101266g.f136548a[i49 - 1] & UByte.MAX_VALUE; iArr = gVar4.L; iArr[i54] = iArr[i54] + i17; } while (i17 == 255); i55 += iArr[i54]; i54++; } else { gVar4.L[i56 - 1] = ((i36 - gVar4.N) - i49) - i55; } } } else if (i44 == 3) { int i59 = r54; int i64 = 4; int i65 = r34 == true ? 1 : 0; boolean z18 = r34 == true ? 1 : 0; int i66 = i65; int i67 = i66; int i68 = r34; while (true) { int i69 = gVar4.K; if (i68 < i69 - 1) { gVar4.L[i68 == 1 ? 1 : 0] = i67; i64++; gVar4.i(iVar, i64); int i74 = i64 - 1; if (gVar4.f101266g.f136548a[i74] != 0) { int i75 = 8; while (true) { if (i67 < i75) { int i76 = i59 << (7 - i67); if ((gVar4.f101266g.f136548a[i74] & i76) != 0) { int i77 = i64 + i67; gVar4.i(iVar, i77); j14 = (long) ((~i76) & gVar4.f101266g.f136548a[i74] & b16); int i78 = i74 + 1; while (i78 < i77) { j14 = (j14 << 8) | ((long) (gVar4.f101266g.f136548a[i78] & UByte.MAX_VALUE)); i78++; i77 = i77; } if (i68 > 0) { j14 -= (1 << ((i67 * 7) + 6)) - 1; } i64 = i77; } else { i67++; i75 = 8; i59 = 1; b16 = UByte.MAX_VALUE; } } else { j14 = 0; } } if (j14 >= -2147483648L && j14 <= 2147483647L) { int i79 = (int) j14; int[] iArr3 = gVar4.L; if (i68 != 0) { i79 += iArr3[i68 - 1]; } iArr3[i68] = i79; i66 += iArr3[i68]; i67 = 0; i59 = 1; b16 = UByte.MAX_VALUE; i68 = (i68 == 1 ? 1 : 0) + 1; } } else { throw a2.a("No valid varint length mask found", null); } } else { gVar4.L[i69 - 1] = ((i36 - gVar4.N) - i64) - i66; } } throw a2.a("EBML lacing sample size out of range.", null); } else { throw a0.b(36, "Unexpected lacing value: ", i44, null); } } } byte[] bArr2 = gVar4.f101266g.f136548a; gVar4.H = gVar4.k((long) ((bArr2[1] & UByte.MAX_VALUE) | (bArr2[0] << 8))) + gVar4.B; gVar4.O = (cVar6.f101290d == 2 || (i35 == 163 && (gVar4.f101266g.f136548a[2] & 128) == 128)) ? 1 : 0; gVar4.G = 2; gVar4.J = 0; } if (i35 == 163) { while (true) { int i84 = gVar4.J; if (i84 < gVar4.K) { gVar4.f(cVar6, ((long) ((gVar4.J * cVar6.f101291e) / 1000)) + gVar4.H, gVar4.O, gVar4.l(iVar, cVar6, gVar4.L[i84]), 0); gVar4.J++; } else { gVar4.G = 0; } } } else { while (true) { int i85 = gVar4.J; if (i85 < gVar4.K) { int[] iArr4 = gVar4.L; iArr4[i85] = gVar4.l(iVar, cVar6, iArr4[i85]); gVar4.J++; } } } z15 = false; } } else if (i35 == 165) { z15 = r34; if (gVar4.G == 2) { c cVar7 = gVar4.f101262c.get(gVar4.M); if (gVar4.P != 4 || !"V_VP9".equals(cVar7.f101288b)) { iVar.skipFully(i36); z15 = r34; } else { y yVar = gVar4.f101273n; byte[] bArr3 = yVar.f136548a; if (bArr3.length < i36) { bArr3 = new byte[i36]; } yVar.D(bArr3, i36); iVar.readFully(gVar4.f101273n.f136548a, r34, i36); z15 = r34; } } } else if (i35 == 16877) { gVar4.e(i35); c cVar8 = gVar4.f101280u; int i86 = cVar8.f101293g; if (i86 == 1685485123 || i86 == 1685480259) { byte[] bArr4 = new byte[i36]; cVar8.N = bArr4; iVar.readFully(bArr4, r34, i36); z15 = r34; } else { iVar.skipFully(i36); z15 = r34; } } else if (i35 == 16981) { gVar4.e(i35); byte[] bArr5 = new byte[i36]; gVar4.f101280u.f101295i = bArr5; iVar.readFully(bArr5, r34, i36); z15 = r34; } else if (i35 == 18402) { byte[] bArr6 = new byte[i36]; iVar.readFully(bArr6, r34, i36); gVar4.e(i35); gVar4.f101280u.f101296j = new x.a(r54, bArr6, r34, r34); z15 = r34; } else if (i35 == 21419) { byte[] bArr7 = gVar4.f101268i.f136548a; byte b17 = r34 == true ? (byte) 1 : 0; byte b18 = r34 == true ? (byte) 1 : 0; Arrays.fill(bArr7, b17); iVar.readFully(gVar4.f101268i.f136548a, 4 - i36, i36); gVar4.f101268i.F(r34); gVar4.f101282w = (int) gVar4.f101268i.v(); z15 = r34; } else if (i35 == 25506) { gVar4.e(i35); byte[] bArr8 = new byte[i36]; gVar4.f101280u.f101297k = bArr8; iVar.readFully(bArr8, r34, i36); z15 = r34; } else if (i35 == 30322) { gVar4.e(i35); byte[] bArr9 = new byte[i36]; gVar4.f101280u.f101308v = bArr9; iVar.readFully(bArr9, r34, i36); z15 = r34; } else { throw a0.b(26, "Unexpected id: ", i35, null); } bVar.f101243e = z15 ? 1 : 0; } else if (i14 == 5) { long j19 = bVar.f101245g; if (j19 == 4 || j19 == 8) { c cVar9 = bVar.f101242d; int i87 = bVar.f101244f; int i88 = (int) j19; long a16 = bVar.a(iVar, i88); if (i88 == 4) { d14 = (double) Float.intBitsToFloat((int) a16); } else { d14 = Double.longBitsToDouble(a16); } g gVar5 = g.this; Objects.requireNonNull(gVar5); if (i87 == 181) { gVar5.e(i87); gVar5.f101280u.Q = (int) d14; } else if (i87 != 17545) { switch (i87) { case 21969: gVar5.e(i87); gVar5.f101280u.D = (float) d14; break; case 21970: gVar5.e(i87); gVar5.f101280u.E = (float) d14; break; case 21971: gVar5.e(i87); gVar5.f101280u.F = (float) d14; break; case 21972: gVar5.e(i87); gVar5.f101280u.G = (float) d14; break; case 21973: gVar5.e(i87); gVar5.f101280u.H = (float) d14; break; case 21974: gVar5.e(i87); gVar5.f101280u.I = (float) d14; break; case 21975: gVar5.e(i87); gVar5.f101280u.J = (float) d14; break; case 21976: gVar5.e(i87); gVar5.f101280u.K = (float) d14; break; case 21977: gVar5.e(i87); gVar5.f101280u.L = (float) d14; break; case 21978: gVar5.e(i87); gVar5.f101280u.M = (float) d14; break; default: switch (i87) { case 30323: gVar5.e(i87); gVar5.f101280u.f101305s = (float) d14; break; case 30324: gVar5.e(i87); gVar5.f101280u.f101306t = (float) d14; break; case 30325: gVar5.e(i87); gVar5.f101280u.f101307u = (float) d14; break; } } } else { gVar5.f101278s = (long) d14; } bVar.f101243e = r34; } else { StringBuilder sb7 = new StringBuilder(40); sb7.append("Invalid float size: "); sb7.append(j19); throw a2.a(sb7.toString(), null); } } else { throw a0.b(32, "Invalid element type ", i14, null); } r34 = 1; } else { iVar.skipFully((int) bVar.f101245g); r34 = 0; bVar.f101243e = 0; } } else { ((b) bVar.f101242d).a(bVar.f101240b.pop().f101246a); } } boolean z19 = r54 == true ? 1 : 0; boolean z24 = r54 == true ? 1 : 0; boolean z25 = r54 == true ? 1 : 0; z17 = z19; if (z17) { long position2 = iVar.getPosition(); if (this.f101284y) { this.A = position2; uVar.f71213a = this.f101285z; this.f101284y = false; } else { if (this.f101281v) { long j24 = this.A; if (j24 != -1) { uVar.f71213a = j24; this.A = -1; } } z14 = false; if (!z14) { return 1; } } z14 = true; if (!z14) { } } r54 = 1; z16 = false; } if (z17) { return 0; } for (int i89 = 0; i89 < this.f101262c.size(); i89++) { c valueAt = this.f101262c.valueAt(i89); Objects.requireNonNull(valueAt.X); f9.y yVar2 = valueAt.T; if (yVar2 != null) { yVar2.a(valueAt.X, valueAt.f101296j); } } return -1; } @Override // f9.h public final void b(j jVar) { this.f101260a0 = jVar; } @Override // f9.h public final boolean c(f9.i iVar) throws IOException { long a14; int i14; h hVar = new h(); long length = iVar.getLength(); int i15 = (length > -1 ? 1 : (length == -1 ? 0 : -1)); long j14 = 1024; if (i15 != 0 && length <= 1024) { j14 = length; } int i16 = (int) j14; iVar.peekFully(hVar.f101313a.f136548a, 0, 4); hVar.f101314b = 4; for (long v14 = hVar.f101313a.v(); v14 != 440786851; v14 = ((v14 << 8) & -256) | ((long) (hVar.f101313a.f136548a[0] & UByte.MAX_VALUE))) { int i17 = hVar.f101314b + 1; hVar.f101314b = i17; if (i17 == i16) { return false; } iVar.peekFully(hVar.f101313a.f136548a, 0, 1); } long a15 = hVar.a(iVar); long j15 = (long) hVar.f101314b; if (a15 == Long.MIN_VALUE) { return false; } if (i15 != 0 && j15 + a15 >= length) { return false; } while (true) { int i18 = (((long) hVar.f101314b) > (j15 + a15) ? 1 : (((long) hVar.f101314b) == (j15 + a15) ? 0 : -1)); if (i18 < 0) { if (hVar.a(iVar) == Long.MIN_VALUE || (a14 = hVar.a(iVar)) < 0 || a14 > 2147483647L) { return false; } if (i14 != 0) { int i19 = (int) a14; iVar.advancePeekPosition(i19); hVar.f101314b += i19; } } else if (i18 == 0) { return true; } else { return false; } } } public final void d(int i14) throws a2 { if (this.C == null || this.D == null) { StringBuilder sb4 = new StringBuilder(37); sb4.append("Element "); sb4.append(i14); sb4.append(" must be in a Cues"); throw a2.a(sb4.toString(), null); } } public final void e(int i14) throws a2 { if (this.f101280u == null) { StringBuilder sb4 = new StringBuilder(43); sb4.append("Element "); sb4.append(i14); sb4.append(" must be in a TrackEntry"); throw a2.a(sb4.toString(), null); } } public final void f(c cVar, long j14, int i14, int i15, int i16) { int i17; byte[] bArr; f9.y yVar = cVar.T; if (yVar != null) { yVar.b(cVar.X, j14, i14, i15, i16, cVar.f101296j); } else { if (("S_TEXT/UTF8".equals(cVar.f101288b) || "S_TEXT/ASS".equals(cVar.f101288b)) && this.K <= 1) { long j15 = this.I; if (j15 != C.TIME_UNSET) { String str = cVar.f101288b; byte[] bArr2 = this.f101270k.f136548a; Objects.requireNonNull(str); if (str.equals("S_TEXT/ASS")) { bArr = h(j15, "%01d:%02d:%02d:%02d", 10000); i17 = 21; } else if (str.equals("S_TEXT/UTF8")) { bArr = h(j15, "%02d:%02d:%02d,%03d", 1000); i17 = 19; } else { throw new IllegalArgumentException(); } System.arraycopy(bArr, 0, bArr2, i17, bArr.length); int i18 = this.f101270k.f136549b; while (true) { y yVar2 = this.f101270k; if (i18 >= yVar2.f136550c) { break; } else if (yVar2.f136548a[i18] == 0) { yVar2.E(i18); break; } else { i18++; } } x xVar = cVar.X; y yVar3 = this.f101270k; xVar.a(yVar3, yVar3.f136550c); i15 += this.f101270k.f136550c; } } if ((268435456 & i14) != 0) { if (this.K > 1) { i14 &= -268435457; } else { y yVar4 = this.f101273n; int i19 = yVar4.f136550c; cVar.X.f(yVar4, i19, 2); i15 += i19; } } cVar.X.b(j14, i14, i15, i16, cVar.f101296j); } this.F = true; } public final void i(f9.i iVar, int i14) throws IOException { y yVar = this.f101266g; if (yVar.f136550c < i14) { byte[] bArr = yVar.f136548a; if (bArr.length < i14) { yVar.b(Math.max(bArr.length * 2, i14)); } y yVar2 = this.f101266g; byte[] bArr2 = yVar2.f136548a; int i15 = yVar2.f136550c; iVar.readFully(bArr2, i15, i14 - i15); this.f101266g.E(i14); } } public final void j() { this.R = 0; this.S = 0; this.T = 0; this.U = false; this.V = false; this.W = false; this.X = 0; this.Y = 0; this.Z = false; this.f101269j.B(0); } public final long k(long j14) throws a2 { long j15 = this.f101277r; if (j15 != C.TIME_UNSET) { return k0.P(j14, j15, 1000); } throw a2.a("Can't scale timecode prior to timecodeScale being set.", null); } public final int l(f9.i iVar, c cVar, int i14) throws IOException { int i15; if ("S_TEXT/UTF8".equals(cVar.f101288b)) { m(iVar, f101254b0, i14); int i16 = this.S; j(); return i16; } else if ("S_TEXT/ASS".equals(cVar.f101288b)) { m(iVar, f101256d0, i14); int i17 = this.S; j(); return i17; } else { x xVar = cVar.X; boolean z14 = true; if (!this.U) { if (cVar.f101294h) { this.O &= -1073741825; int i18 = 128; if (!this.V) { iVar.readFully(this.f101266g.f136548a, 0, 1); this.R++; byte[] bArr = this.f101266g.f136548a; if ((bArr[0] & 128) != 128) { this.Y = bArr[0]; this.V = true; } else { throw a2.a("Extension bit is set in signal byte", null); } } byte b14 = this.Y; if ((b14 & 1) == 1) { boolean z15 = (b14 & 2) == 2; this.O |= C.BUFFER_FLAG_ENCRYPTED; if (!this.Z) { iVar.readFully(this.f101271l.f136548a, 0, 8); this.R += 8; this.Z = true; y yVar = this.f101266g; byte[] bArr2 = yVar.f136548a; if (!z15) { i18 = 0; } bArr2[0] = (byte) (i18 | 8); yVar.F(0); xVar.f(this.f101266g, 1, 1); this.S++; this.f101271l.F(0); xVar.f(this.f101271l, 8, 1); this.S += 8; } if (z15) { if (!this.W) { iVar.readFully(this.f101266g.f136548a, 0, 1); this.R++; this.f101266g.F(0); this.X = this.f101266g.u(); this.W = true; } int i19 = this.X * 4; this.f101266g.B(i19); iVar.readFully(this.f101266g.f136548a, 0, i19); this.R += i19; short s14 = (short) ((this.X / 2) + 1); int i24 = (s14 * 6) + 2; ByteBuffer byteBuffer = this.f101274o; if (byteBuffer == null || byteBuffer.capacity() < i24) { this.f101274o = ByteBuffer.allocate(i24); } this.f101274o.position(0); this.f101274o.putShort(s14); int i25 = 0; int i26 = 0; while (true) { i15 = this.X; if (i25 >= i15) { break; } int x14 = this.f101266g.x(); if (i25 % 2 == 0) { this.f101274o.putShort((short) (x14 - i26)); } else { this.f101274o.putInt(x14 - i26); } i25++; i26 = x14; } int i27 = (i14 - this.R) - i26; if (i15 % 2 == 1) { this.f101274o.putInt(i27); } else { this.f101274o.putShort((short) i27); this.f101274o.putInt(0); } this.f101272m.D(this.f101274o.array(), i24); xVar.f(this.f101272m, i24, 1); this.S += i24; } } } else { byte[] bArr3 = cVar.f101295i; if (bArr3 != null) { y yVar2 = this.f101269j; int length = bArr3.length; yVar2.f136548a = bArr3; yVar2.f136550c = length; yVar2.f136549b = 0; } } if (cVar.f101292f > 0) { this.O |= 268435456; this.f101273n.B(0); this.f101266g.B(4); y yVar3 = this.f101266g; byte[] bArr4 = yVar3.f136548a; bArr4[0] = (byte) ((i14 >> 24) & 255); bArr4[1] = (byte) ((i14 >> 16) & 255); bArr4[2] = (byte) ((i14 >> 8) & 255); bArr4[3] = (byte) (i14 & 255); xVar.f(yVar3, 4, 2); this.S += 4; } this.U = true; } int i28 = i14 + this.f101269j.f136550c; if (!"V_MPEG4/ISO/AVC".equals(cVar.f101288b) && !"V_MPEGH/ISO/HEVC".equals(cVar.f101288b)) { if (cVar.T != null) { if (this.f101269j.f136550c != 0) { z14 = false; } b0.e(z14); cVar.T.c(iVar); } while (true) { int i29 = this.R; if (i29 >= i28) { break; } int n14 = n(iVar, xVar, i28 - i29); this.R += n14; this.S += n14; } } else { byte[] bArr5 = this.f101265f.f136548a; bArr5[0] = 0; bArr5[1] = 0; bArr5[2] = 0; int i34 = cVar.Y; int i35 = 4 - i34; while (this.R < i28) { int i36 = this.T; if (i36 == 0) { int min = Math.min(i34, this.f101269j.a()); iVar.readFully(bArr5, i35 + min, i34 - min); if (min > 0) { y yVar4 = this.f101269j; System.arraycopy(yVar4.f136548a, yVar4.f136549b, bArr5, i35, min); yVar4.f136549b += min; } this.R += i34; this.f101265f.F(0); this.T = this.f101265f.x(); this.f101264e.F(0); xVar.a(this.f101264e, 4); this.S += 4; } else { int n15 = n(iVar, xVar, i36); this.R += n15; this.S += n15; this.T -= n15; } } } if ("A_VORBIS".equals(cVar.f101288b)) { this.f101267h.F(0); xVar.a(this.f101267h, 4); this.S += 4; } int i37 = this.S; j(); return i37; } } public final void m(f9.i iVar, byte[] bArr, int i14) throws IOException { int length = bArr.length + i14; y yVar = this.f101270k; byte[] bArr2 = yVar.f136548a; if (bArr2.length < length) { yVar.C(Arrays.copyOf(bArr, length + i14)); } else { System.arraycopy(bArr, 0, bArr2, 0, bArr.length); } iVar.readFully(this.f101270k.f136548a, bArr.length, i14); this.f101270k.F(0); this.f101270k.E(length); } public final int n(f9.i iVar, x xVar, int i14) throws IOException { int a14 = this.f101269j.a(); if (a14 <= 0) { return xVar.c(iVar, i14, false); } int min = Math.min(i14, a14); xVar.a(this.f101269j, min); return min; } @Override // f9.h public final void release() { } @Override // f9.h public void seek(long j14, long j15) { this.B = C.TIME_UNSET; this.G = 0; b bVar = (b) this.f101259a; bVar.f101243e = 0; bVar.f101240b.clear(); i iVar = bVar.f101241c; iVar.f101317b = 0; iVar.f101318c = 0; i iVar2 = this.f101261b; iVar2.f101317b = 0; iVar2.f101318c = 0; j(); for (int i14 = 0; i14 < this.f101262c.size(); i14++) { f9.y yVar = this.f101262c.valueAt(i14).T; if (yVar != null) { yVar.f71226b = false; yVar.f71227c = 0; } } } public static final class c { public int A = -1; public int B = 1000; public int C = 200; public float D = -1.0f; public float E = -1.0f; public float F = -1.0f; public float G = -1.0f; public float H = -1.0f; public float I = -1.0f; public float J = -1.0f; public float K = -1.0f; public float L = -1.0f; public float M = -1.0f; public byte[] N; public int O = 1; public int P = -1; public int Q = 8000; public long R = 0; public long S = 0; public f9.y T; public boolean U; public boolean V = true; public String W = "eng"; public x X; public int Y; /* renamed from: a reason: collision with root package name */ public String f101287a; /* renamed from: b reason: collision with root package name */ public String f101288b; /* renamed from: c reason: collision with root package name */ public int f101289c; /* renamed from: d reason: collision with root package name */ public int f101290d; /* renamed from: e reason: collision with root package name */ public int f101291e; /* renamed from: f reason: collision with root package name */ public int f101292f; /* renamed from: g reason: collision with root package name */ public int f101293g; /* renamed from: h reason: collision with root package name */ public boolean f101294h; /* renamed from: i reason: collision with root package name */ public byte[] f101295i; /* renamed from: j reason: collision with root package name */ public x.a f101296j; /* renamed from: k reason: collision with root package name */ public byte[] f101297k; /* renamed from: l reason: collision with root package name */ public DrmInitData f101298l; /* renamed from: m reason: collision with root package name */ public int f101299m = -1; /* renamed from: n reason: collision with root package name */ public int f101300n = -1; /* renamed from: o reason: collision with root package name */ public int f101301o = -1; /* renamed from: p reason: collision with root package name */ public int f101302p = -1; /* renamed from: q reason: collision with root package name */ public int f101303q = 0; /* renamed from: r reason: collision with root package name */ public int f101304r = -1; /* renamed from: s reason: collision with root package name */ public float f101305s = 0.0f; /* renamed from: t reason: collision with root package name */ public float f101306t = 0.0f; /* renamed from: u reason: collision with root package name */ public float f101307u = 0.0f; /* renamed from: v reason: collision with root package name */ public byte[] f101308v = null; /* renamed from: w reason: collision with root package name */ public int f101309w = -1; /* renamed from: x reason: collision with root package name */ public boolean f101310x = false; /* renamed from: y reason: collision with root package name */ public int f101311y = -1; /* renamed from: z reason: collision with root package name */ public int f101312z = -1; public c() { } public final byte[] a(String str) throws a2 { byte[] bArr = this.f101297k; if (bArr != null) { return bArr; } String valueOf = String.valueOf(str); throw a2.a(valueOf.length() != 0 ? "Missing CodecPrivate for codec ".concat(valueOf) : new String("Missing CodecPrivate for codec "), null); } public c(a aVar) { } } }