package bo;

import com.google.firebase.messaging.Constants;
import java.util.HashMap;
import java.util.Map;
import tn.k0;
import tn.m1;

/* loaded from: classes3.dex */
public abstract class s {

    /* renamed from: a, reason: collision with root package name */
    public static final tn.u f7159a;

    /* renamed from: b, reason: collision with root package name */
    public static final tn.u f7160b;

    /* renamed from: c, reason: collision with root package name */
    public static final tn.u f7161c;

    /* renamed from: d, reason: collision with root package name */
    private static final Map f7162d;

    /* loaded from: classes3.dex */
    static class a extends tn.r {
        a(m1 m1Var) {
            super(m1Var);
        }

        private static /* synthetic */ void g(int i10) {
            Object[] objArr = new Object[3];
            if (i10 != 1) {
                objArr[0] = "what";
            } else {
                objArr[0] = Constants.MessagePayloadKeys.FROM;
            }
            objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$1";
            objArr[2] = "isVisible";
            throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
        }

        @Override // tn.u
        public boolean e(bp.g gVar, tn.q qVar, tn.m mVar, boolean z10) {
            if (qVar == null) {
                g(0);
            }
            if (mVar == null) {
                g(1);
            }
            return s.d(qVar, mVar);
        }
    }

    /* loaded from: classes3.dex */
    static class b extends tn.r {
        b(m1 m1Var) {
            super(m1Var);
        }

        private static /* synthetic */ void g(int i10) {
            Object[] objArr = new Object[3];
            if (i10 != 1) {
                objArr[0] = "what";
            } else {
                objArr[0] = Constants.MessagePayloadKeys.FROM;
            }
            objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$2";
            objArr[2] = "isVisible";
            throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
        }

        @Override // tn.u
        public boolean e(bp.g gVar, tn.q qVar, tn.m mVar, boolean z10) {
            if (qVar == null) {
                g(0);
            }
            if (mVar == null) {
                g(1);
            }
            return s.e(gVar, qVar, mVar);
        }
    }

    /* loaded from: classes3.dex */
    static class c extends tn.r {
        c(m1 m1Var) {
            super(m1Var);
        }

        private static /* synthetic */ void g(int i10) {
            Object[] objArr = new Object[3];
            if (i10 != 1) {
                objArr[0] = "what";
            } else {
                objArr[0] = Constants.MessagePayloadKeys.FROM;
            }
            objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$3";
            objArr[2] = "isVisible";
            throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
        }

        @Override // tn.u
        public boolean e(bp.g gVar, tn.q qVar, tn.m mVar, boolean z10) {
            if (qVar == null) {
                g(0);
            }
            if (mVar == null) {
                g(1);
            }
            return s.e(gVar, qVar, mVar);
        }
    }

    static {
        a aVar = new a(wn.a.f49550c);
        f7159a = aVar;
        b bVar = new b(wn.c.f49552c);
        f7160b = bVar;
        c cVar = new c(wn.b.f49551c);
        f7161c = cVar;
        f7162d = new HashMap();
        f(aVar);
        f(bVar);
        f(cVar);
    }

    private static /* synthetic */ void a(int i10) {
        String str = (i10 == 5 || i10 == 6) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
        Object[] objArr = new Object[(i10 == 5 || i10 == 6) ? 2 : 3];
        switch (i10) {
            case 1:
                objArr[0] = Constants.MessagePayloadKeys.FROM;
                break;
            case 2:
                objArr[0] = "first";
                break;
            case 3:
                objArr[0] = "second";
                break;
            case 4:
                objArr[0] = "visibility";
                break;
            case 5:
            case 6:
                objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities";
                break;
            default:
                objArr[0] = "what";
                break;
        }
        if (i10 == 5 || i10 == 6) {
            objArr[1] = "toDescriptorVisibility";
        } else {
            objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities";
        }
        if (i10 == 2 || i10 == 3) {
            objArr[2] = "areInSamePackage";
        } else if (i10 == 4) {
            objArr[2] = "toDescriptorVisibility";
        } else if (i10 != 5 && i10 != 6) {
            objArr[2] = "isVisibleForProtectedAndPackage";
        }
        String format = String.format(str, objArr);
        if (i10 != 5 && i10 != 6) {
            throw new IllegalArgumentException(format);
        }
        throw new IllegalStateException(format);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static boolean d(tn.m mVar, tn.m mVar2) {
        if (mVar == null) {
            a(2);
        }
        if (mVar2 == null) {
            a(3);
        }
        k0 k0Var = (k0) to.f.r(mVar, k0.class, false);
        k0 k0Var2 = (k0) to.f.r(mVar2, k0.class, false);
        return (k0Var2 == null || k0Var == null || !k0Var.d().equals(k0Var2.d())) ? false : true;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static boolean e(bp.g gVar, tn.q qVar, tn.m mVar) {
        if (qVar == null) {
            a(0);
        }
        if (mVar == null) {
            a(1);
        }
        if (d(to.f.M(qVar), mVar)) {
            return true;
        }
        return tn.t.f36412c.e(gVar, qVar, mVar, false);
    }

    private static void f(tn.u uVar) {
        f7162d.put(uVar.b(), uVar);
    }

    public static tn.u g(m1 m1Var) {
        if (m1Var == null) {
            a(4);
        }
        tn.u uVar = (tn.u) f7162d.get(m1Var);
        if (uVar != null) {
            return uVar;
        }
        tn.u j10 = tn.t.j(m1Var);
        if (j10 == null) {
            a(5);
        }
        return j10;
    }
}
