package com.facebook.share.model;

import X.M12;
import X.M8A;
import X.M8J;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import java.util.List;
import java.util.Objects;

public final class ShareMediaContent extends ShareContent<ShareMediaContent, Object> {
    public static final Parcelable.Creator<ShareMediaContent> CREATOR = new M8A();
    public static final M8J LIZ = new M8J((byte) 0);
    public final List<ShareMedia<?, ?>> LIZIZ;

    public final int describeContents() {
        return 0;
    }

    static {
        Covode.recordClassIndex(42115);
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    /* JADX WARNING: Code restructure failed: missing block: B:12:0x002c, code lost:
        if (r3 == null) goto L_0x0012;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public ShareMediaContent(android.os.Parcel r6) {
        /*
            r5 = this;
            X.M12.LIZ((java.lang.Object) r6)
            r5.<init>((android.os.Parcel) r6)
            java.lang.Class<com.facebook.share.model.ShareMedia> r0 = com.facebook.share.model.ShareMedia.class
            java.lang.ClassLoader r0 = r0.getClassLoader()
            android.os.Parcelable[] r4 = r6.readParcelableArray(r0)
            if (r4 != 0) goto L_0x0017
        L_0x0012:
            X.Lel r3 = X.C4116Lel.INSTANCE
        L_0x0014:
            r5.LIZIZ = r3
            return
        L_0x0017:
            java.util.ArrayList r3 = new java.util.ArrayList
            r3.<init>()
            int r2 = r4.length
            r1 = 0
        L_0x001e:
            if (r1 >= r2) goto L_0x002a
            r0 = r4[r1]
            if (r0 == 0) goto L_0x0027
            r3.add(r0)
        L_0x0027:
            int r1 = r1 + 1
            goto L_0x001e
        L_0x002a:
            java.util.List r3 = (java.util.List) r3
            if (r3 != 0) goto L_0x0014
            goto L_0x0012
        */
        throw new UnsupportedOperationException("Method not decompiled: com.facebook.share.model.ShareMediaContent.<init>(android.os.Parcel):void");
    }

    public final void writeToParcel(Parcel parcel, int i) {
        M12.LIZ((Object) parcel);
        super.writeToParcel(parcel, i);
        Object[] array = this.LIZIZ.toArray(new ShareMedia[0]);
        Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
        parcel.writeParcelableArray((Parcelable[]) array, i);
    }
}
