package com.applovin.impl; import android.os.Parcel; import android.os.Parcelable; import com.mbridge.msdk.playercommon.exoplayer2.C; import java.util.ArrayList; import java.util.Collections; import java.util.List; /* loaded from: classes.dex */ public final class uk extends sk { public static final Parcelable.Creator CREATOR = new a(); public final long a; public final boolean b; public final boolean c; public final boolean d; public final boolean f; public final long g; public final long h; public final List i; public final boolean j; public final long k; public final int l; public final int m; public final int n; private uk(long j, boolean z, boolean z2, boolean z3, boolean z4, long j2, long j3, List list, boolean z5, long j4, int i, int i2, int i3) { this.a = j; this.b = z; this.c = z2; this.d = z3; this.f = z4; this.g = j2; this.h = j3; this.i = Collections.unmodifiableList(list); this.j = z5; this.k = j4; this.l = i; this.m = i2; this.n = i3; } public static uk a(bh bhVar, long j, ho hoVar) { List list; boolean z; boolean z2; long j2; boolean z3; long j3; int i; int i2; int i3; boolean z4; boolean z5; long j4; long y = bhVar.y(); boolean z6 = (bhVar.w() & 128) != 0; List emptyList = Collections.emptyList(); if (z6) { list = emptyList; z = false; z2 = false; j2 = C.TIME_UNSET; z3 = false; j3 = C.TIME_UNSET; i = 0; i2 = 0; i3 = 0; z4 = false; } else { int w = bhVar.w(); boolean z7 = (w & 128) != 0; boolean z8 = (w & 64) != 0; boolean z9 = (w & 32) != 0; boolean z10 = (w & 16) != 0; long a2 = (!z8 || z10) ? C.TIME_UNSET : Cdo.a(bhVar, j); if (!z8) { int w2 = bhVar.w(); ArrayList arrayList = new ArrayList(w2); for (int i4 = 0; i4 < w2; i4++) { int w3 = bhVar.w(); long a3 = !z10 ? Cdo.a(bhVar, j) : C.TIME_UNSET; arrayList.add(new b(w3, a3, hoVar.b(a3), null)); } emptyList = arrayList; } if (z9) { long w4 = bhVar.w(); boolean z11 = (128 & w4) != 0; j4 = ((((w4 & 1) << 32) | bhVar.y()) * 1000) / 90; z5 = z11; } else { z5 = false; j4 = C.TIME_UNSET; } i = bhVar.C(); z4 = z8; i2 = bhVar.w(); i3 = bhVar.w(); list = emptyList; long j5 = a2; z3 = z5; j3 = j4; z2 = z10; z = z7; j2 = j5; } return new uk(y, z6, z, z4, z2, j2, hoVar.b(j2), list, z3, j3, i, i2, i3); } public static final class b { public final int a; public final long b; public final long c; public static b a(Parcel parcel) { return new b(parcel.readInt(), parcel.readLong(), parcel.readLong()); } private b(int i, long j, long j2) { this.a = i; this.b = j; this.c = j2; } public void b(Parcel parcel) { parcel.writeInt(this.a); parcel.writeLong(this.b); parcel.writeLong(this.c); } public /* synthetic */ b(int i, long j, long j2, a aVar) { this(i, j, j2); } } private uk(Parcel parcel) { this.a = parcel.readLong(); this.b = parcel.readByte() == 1; this.c = parcel.readByte() == 1; this.d = parcel.readByte() == 1; this.f = parcel.readByte() == 1; this.g = parcel.readLong(); this.h = parcel.readLong(); int readInt = parcel.readInt(); ArrayList arrayList = new ArrayList(readInt); for (int i = 0; i < readInt; i++) { arrayList.add(b.a(parcel)); } this.i = Collections.unmodifiableList(arrayList); this.j = parcel.readByte() == 1; this.k = parcel.readLong(); this.l = parcel.readInt(); this.m = parcel.readInt(); this.n = parcel.readInt(); } @Override // android.os.Parcelable public void writeToParcel(Parcel parcel, int i) { parcel.writeLong(this.a); parcel.writeByte(this.b ? (byte) 1 : (byte) 0); parcel.writeByte(this.c ? (byte) 1 : (byte) 0); parcel.writeByte(this.d ? (byte) 1 : (byte) 0); parcel.writeByte(this.f ? (byte) 1 : (byte) 0); parcel.writeLong(this.g); parcel.writeLong(this.h); int size = this.i.size(); parcel.writeInt(size); for (int i2 = 0; i2 < size; i2++) { ((b) this.i.get(i2)).b(parcel); } parcel.writeByte(this.j ? (byte) 1 : (byte) 0); parcel.writeLong(this.k); parcel.writeInt(this.l); parcel.writeInt(this.m); parcel.writeInt(this.n); } public class a implements Parcelable.Creator { @Override // android.os.Parcelable.Creator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public uk[] newArray(int i) { return new uk[i]; } @Override // android.os.Parcelable.Creator /* renamed from: a, reason: merged with bridge method [inline-methods] */ public uk createFromParcel(Parcel parcel) { return new uk(parcel, null); } } public /* synthetic */ uk(Parcel parcel, a aVar) { this(parcel); } }