package dp;

import dp.a0;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.protobuf.i;
import mo.b;
import tn.j0;

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

    /* renamed from: a, reason: collision with root package name */
    private final cp.a f16417a;

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

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

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f16419a;

        static {
            int[] iArr = new int[b.values().length];
            try {
                iArr[b.PROPERTY.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[b.PROPERTY_GETTER.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[b.PROPERTY_SETTER.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            f16419a = iArr;
        }
    }

    public d(tn.g0 module, j0 notFoundClasses, cp.a protocol) {
        kotlin.jvm.internal.t.g(module, "module");
        kotlin.jvm.internal.t.g(notFoundClasses, "notFoundClasses");
        kotlin.jvm.internal.t.g(protocol, "protocol");
        this.f16417a = protocol;
        this.f16418b = new e(module, notFoundClasses);
    }

    @Override // dp.f
    public List a(a0.a container) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        List list = (List) container.f().o(this.f16417a.a());
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List b(a0 container, mo.n proto) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        i.f k10 = this.f16417a.k();
        List list = k10 != null ? (List) proto.o(k10) : null;
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List c(a0 container, kotlin.reflect.jvm.internal.impl.protobuf.p callableProto, b kind, int i10, mo.u proto) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(callableProto, "callableProto");
        kotlin.jvm.internal.t.g(kind, "kind");
        kotlin.jvm.internal.t.g(proto, "proto");
        List list = (List) proto.o(this.f16417a.h());
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List d(mo.q proto, oo.c nameResolver) {
        int v10;
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(nameResolver, "nameResolver");
        List list = (List) proto.o(this.f16417a.o());
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), nameResolver));
        }
        return arrayList;
    }

    @Override // dp.f
    public List f(a0 container, kotlin.reflect.jvm.internal.impl.protobuf.p proto, b kind) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(kind, "kind");
        List list = null;
        if (proto instanceof mo.i) {
            i.f g10 = this.f16417a.g();
            if (g10 != null) {
                list = (List) ((mo.i) proto).o(g10);
            }
        } else {
            if (!(proto instanceof mo.n)) {
                throw new IllegalStateException(("Unknown message: " + proto).toString());
            }
            int i10 = a.f16419a[kind.ordinal()];
            if (i10 != 1 && i10 != 2 && i10 != 3) {
                throw new IllegalStateException(("Unsupported callable kind with property proto for receiver annotations: " + kind).toString());
            }
            i.f l10 = this.f16417a.l();
            if (l10 != null) {
                list = (List) ((mo.n) proto).o(l10);
            }
        }
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List g(mo.s proto, oo.c nameResolver) {
        int v10;
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(nameResolver, "nameResolver");
        List list = (List) proto.o(this.f16417a.p());
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), nameResolver));
        }
        return arrayList;
    }

    @Override // dp.f
    public List h(a0 container, kotlin.reflect.jvm.internal.impl.protobuf.p proto, b kind) {
        List list;
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(kind, "kind");
        if (proto instanceof mo.d) {
            list = (List) ((mo.d) proto).o(this.f16417a.c());
        } else if (proto instanceof mo.i) {
            list = (List) ((mo.i) proto).o(this.f16417a.f());
        } else {
            if (!(proto instanceof mo.n)) {
                throw new IllegalStateException(("Unknown message: " + proto).toString());
            }
            int i10 = a.f16419a[kind.ordinal()];
            if (i10 == 1) {
                list = (List) ((mo.n) proto).o(this.f16417a.i());
            } else if (i10 == 2) {
                list = (List) ((mo.n) proto).o(this.f16417a.m());
            } else {
                if (i10 != 3) {
                    throw new IllegalStateException("Unsupported callable kind with property proto".toString());
                }
                list = (List) ((mo.n) proto).o(this.f16417a.n());
            }
        }
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List i(a0 container, mo.n proto) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        i.f j10 = this.f16417a.j();
        List list = j10 != null ? (List) proto.o(j10) : null;
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.f
    public List k(a0 container, mo.g proto) {
        int v10;
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        List list = (List) proto.o(this.f16417a.d());
        if (list == null) {
            list = sm.u.k();
        }
        List list2 = list;
        v10 = sm.v.v(list2, 10);
        ArrayList arrayList = new ArrayList(v10);
        Iterator it = list2.iterator();
        while (it.hasNext()) {
            arrayList.add(this.f16418b.a((mo.b) it.next(), container.b()));
        }
        return arrayList;
    }

    @Override // dp.c
    /* renamed from: l, reason: merged with bridge method [inline-methods] */
    public vo.g e(a0 container, mo.n proto, hp.e0 expectedType) {
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(expectedType, "expectedType");
        return null;
    }

    @Override // dp.c
    /* renamed from: m, reason: merged with bridge method [inline-methods] */
    public vo.g j(a0 container, mo.n proto, hp.e0 expectedType) {
        kotlin.jvm.internal.t.g(container, "container");
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(expectedType, "expectedType");
        b.C0665b.c cVar = (b.C0665b.c) oo.e.a(proto, this.f16417a.b());
        if (cVar == null) {
            return null;
        }
        return this.f16418b.f(expectedType, cVar, container.b());
    }
}
