package qg;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.jvm.internal.v;
import sm.z;

/* loaded from: classes4.dex */
public abstract class d {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class a extends v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.l f33756p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ List f33757q;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(dn.l lVar, List list) {
            super(1);
            this.f33756p = lVar;
            this.f33757q = list;
        }

        public final boolean a(Object obj) {
            if (!((Boolean) this.f33756p.invoke(obj)).booleanValue()) {
                return false;
            }
            this.f33757q.add(obj);
            return true;
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            return Boolean.valueOf(a(obj));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Collection b(Collection collection, dn.l lVar) {
        ArrayList arrayList = new ArrayList();
        z.E(collection, new a(lVar, arrayList));
        return arrayList;
    }
}
