package ap;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.t;
import sm.c0;
import sm.u;

/* loaded from: classes3.dex */
public final class d {

    /* renamed from: c, reason: collision with root package name */
    public static final a f6107c;

    /* renamed from: d, reason: collision with root package name */
    private static int f6108d;

    /* renamed from: e, reason: collision with root package name */
    private static final int f6109e;

    /* renamed from: f, reason: collision with root package name */
    private static final int f6110f;

    /* renamed from: g, reason: collision with root package name */
    private static final int f6111g;

    /* renamed from: h, reason: collision with root package name */
    private static final int f6112h;

    /* renamed from: i, reason: collision with root package name */
    private static final int f6113i;

    /* renamed from: j, reason: collision with root package name */
    private static final int f6114j;

    /* renamed from: k, reason: collision with root package name */
    private static final int f6115k;

    /* renamed from: l, reason: collision with root package name */
    private static final int f6116l;

    /* renamed from: m, reason: collision with root package name */
    private static final int f6117m;

    /* renamed from: n, reason: collision with root package name */
    private static final int f6118n;

    /* renamed from: o, reason: collision with root package name */
    public static final d f6119o;

    /* renamed from: p, reason: collision with root package name */
    public static final d f6120p;

    /* renamed from: q, reason: collision with root package name */
    public static final d f6121q;

    /* renamed from: r, reason: collision with root package name */
    public static final d f6122r;

    /* renamed from: s, reason: collision with root package name */
    public static final d f6123s;

    /* renamed from: t, reason: collision with root package name */
    public static final d f6124t;

    /* renamed from: u, reason: collision with root package name */
    public static final d f6125u;

    /* renamed from: v, reason: collision with root package name */
    public static final d f6126v;

    /* renamed from: w, reason: collision with root package name */
    public static final d f6127w;

    /* renamed from: x, reason: collision with root package name */
    public static final d f6128x;

    /* renamed from: y, reason: collision with root package name */
    private static final List f6129y;

    /* renamed from: z, reason: collision with root package name */
    private static final List f6130z;

    /* renamed from: a, reason: collision with root package name */
    private final List f6131a;

    /* renamed from: b, reason: collision with root package name */
    private final int f6132b;

    /* loaded from: classes3.dex */
    public static final class a {

        /* renamed from: ap.d$a$a, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        private static final class C0158a {

            /* renamed from: a, reason: collision with root package name */
            private final int f6133a;

            /* renamed from: b, reason: collision with root package name */
            private final String f6134b;

            public C0158a(int i10, String name) {
                t.g(name, "name");
                this.f6133a = i10;
                this.f6134b = name;
            }

            public final int a() {
                return this.f6133a;
            }

            public final String b() {
                return this.f6134b;
            }
        }

        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final int j() {
            int i10 = d.f6108d;
            d.f6108d <<= 1;
            return i10;
        }

        public final int b() {
            return d.f6115k;
        }

        public final int c() {
            return d.f6116l;
        }

        public final int d() {
            return d.f6113i;
        }

        public final int e() {
            return d.f6109e;
        }

        public final int f() {
            return d.f6112h;
        }

        public final int g() {
            return d.f6110f;
        }

        public final int h() {
            return d.f6111g;
        }

        public final int i() {
            return d.f6114j;
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    static {
        a.C0158a c0158a;
        a.C0158a c0158a2;
        a aVar = new a(null);
        f6107c = aVar;
        f6108d = 1;
        int j10 = aVar.j();
        f6109e = j10;
        int j11 = aVar.j();
        f6110f = j11;
        int j12 = aVar.j();
        f6111g = j12;
        int j13 = aVar.j();
        f6112h = j13;
        int j14 = aVar.j();
        f6113i = j14;
        int j15 = aVar.j();
        f6114j = j15;
        int j16 = aVar.j() - 1;
        f6115k = j16;
        int i10 = j10 | j11 | j12;
        f6116l = i10;
        int i11 = j11 | j14 | j15;
        f6117m = i11;
        int i12 = j14 | j15;
        f6118n = i12;
        int i13 = 2;
        f6119o = new d(j16, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6120p = new d(i12, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6121q = new d(j10, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6122r = new d(j11, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6123s = new d(j12, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6124t = new d(i10, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6125u = new d(j13, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6126v = new d(j14, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6127w = new d(j15, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        f6128x = new d(i11, 0 == true ? 1 : 0, i13, 0 == true ? 1 : 0);
        Field[] fields = d.class.getFields();
        t.f(fields, "getFields(...)");
        ArrayList<Field> arrayList = new ArrayList();
        for (Field field : fields) {
            if (Modifier.isStatic(field.getModifiers())) {
                arrayList.add(field);
            }
        }
        ArrayList arrayList2 = new ArrayList();
        for (Field field2 : arrayList) {
            Object obj = field2.get(null);
            d dVar = obj instanceof d ? (d) obj : null;
            if (dVar != null) {
                int i14 = dVar.f6132b;
                String name = field2.getName();
                t.f(name, "getName(...)");
                c0158a2 = new a.C0158a(i14, name);
            } else {
                c0158a2 = null;
            }
            if (c0158a2 != null) {
                arrayList2.add(c0158a2);
            }
        }
        f6129y = arrayList2;
        Field[] fields2 = d.class.getFields();
        t.f(fields2, "getFields(...)");
        ArrayList arrayList3 = new ArrayList();
        for (Field field3 : fields2) {
            if (Modifier.isStatic(field3.getModifiers())) {
                arrayList3.add(field3);
            }
        }
        ArrayList<Field> arrayList4 = new ArrayList();
        for (Object obj2 : arrayList3) {
            if (t.b(((Field) obj2).getType(), Integer.TYPE)) {
                arrayList4.add(obj2);
            }
        }
        ArrayList arrayList5 = new ArrayList();
        for (Field field4 : arrayList4) {
            Object obj3 = field4.get(null);
            t.e(obj3, "null cannot be cast to non-null type kotlin.Int");
            int intValue = ((Integer) obj3).intValue();
            if ((intValue == ((-intValue) & intValue)) == true) {
                String name2 = field4.getName();
                t.f(name2, "getName(...)");
                c0158a = new a.C0158a(intValue, name2);
            } else {
                c0158a = null;
            }
            if (c0158a != null) {
                arrayList5.add(c0158a);
            }
        }
        f6130z = arrayList5;
    }

    public d(int i10, List excludes) {
        t.g(excludes, "excludes");
        this.f6131a = excludes;
        Iterator it = excludes.iterator();
        while (it.hasNext()) {
            i10 &= ~((c) it.next()).a();
        }
        this.f6132b = i10;
    }

    public final boolean a(int i10) {
        return (this.f6132b & i10) != 0;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!t.b(d.class, obj != null ? obj.getClass() : null)) {
            return false;
        }
        t.e(obj, "null cannot be cast to non-null type org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter");
        d dVar = (d) obj;
        return t.b(this.f6131a, dVar.f6131a) && this.f6132b == dVar.f6132b;
    }

    public int hashCode() {
        return (this.f6131a.hashCode() * 31) + this.f6132b;
    }

    public final List l() {
        return this.f6131a;
    }

    public final int m() {
        return this.f6132b;
    }

    public final d n(int i10) {
        int i11 = i10 & this.f6132b;
        if (i11 == 0) {
            return null;
        }
        return new d(i11, this.f6131a);
    }

    public String toString() {
        Object obj;
        Iterator it = f6129y.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it.next();
            if (((a.C0158a) obj).a() == this.f6132b) {
                break;
            }
        }
        a.C0158a c0158a = (a.C0158a) obj;
        String b10 = c0158a != null ? c0158a.b() : null;
        if (b10 == null) {
            List<a.C0158a> list = f6130z;
            ArrayList arrayList = new ArrayList();
            for (a.C0158a c0158a2 : list) {
                String b11 = a(c0158a2.a()) ? c0158a2.b() : null;
                if (b11 != null) {
                    arrayList.add(b11);
                }
            }
            b10 = c0.m0(arrayList, " | ", null, null, 0, null, null, 62, null);
        }
        return "DescriptorKindFilter(" + b10 + ", " + this.f6131a + ')';
    }

    public /* synthetic */ d(int i10, List list, int i11, kotlin.jvm.internal.k kVar) {
        this(i10, (i11 & 2) != 0 ? u.k() : list);
    }
}
