package i1;

import dn.p;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import kotlin.jvm.internal.v0;

/* loaded from: classes.dex */
public abstract class a {

    /* renamed from: i1.a$a, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    static final class C0476a extends v implements p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ p f22239p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0476a(p pVar) {
            super(2);
            this.f22239p = pVar;
        }

        @Override // dn.p
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Object invoke(l lVar, Object obj) {
            List list = (List) this.f22239p.invoke(lVar, obj);
            int size = list.size();
            for (int i10 = 0; i10 < size; i10++) {
                Object obj2 = list.get(i10);
                if (obj2 != null && !lVar.a(obj2)) {
                    throw new IllegalArgumentException("item can't be saved".toString());
                }
            }
            List list2 = list;
            if (!list2.isEmpty()) {
                return new ArrayList(list2);
            }
            return null;
        }
    }

    public static final j a(p pVar, dn.l lVar) {
        C0476a c0476a = new C0476a(pVar);
        t.e(lVar, "null cannot be cast to non-null type kotlin.Function1<kotlin.Any, Original of androidx.compose.runtime.saveable.ListSaverKt.listSaver?>");
        return k.a(c0476a, (dn.l) v0.e(lVar, 1));
    }
}
