package kotlin.reflect.jvm.internal.impl.renderer;

import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.internal.t;
import sm.a0;
import tn.e1;
import tn.k0;

/* loaded from: classes3.dex */
public interface b {

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

        /* renamed from: a, reason: collision with root package name */
        public static final a f26349a = new a();

        private a() {
        }

        @Override // kotlin.reflect.jvm.internal.impl.renderer.b
        public String a(tn.h classifier, kotlin.reflect.jvm.internal.impl.renderer.c renderer) {
            t.g(classifier, "classifier");
            t.g(renderer, "renderer");
            if (classifier instanceof e1) {
                ro.f name = ((e1) classifier).getName();
                t.f(name, "getName(...)");
                return renderer.v(name, false);
            }
            ro.d m10 = to.f.m(classifier);
            t.f(m10, "getFqName(...)");
            return renderer.u(m10);
        }
    }

    /* renamed from: kotlin.reflect.jvm.internal.impl.renderer.b$b, reason: collision with other inner class name */
    /* loaded from: classes3.dex */
    public static final class C0567b implements b {

        /* renamed from: a, reason: collision with root package name */
        public static final C0567b f26350a = new C0567b();

        private C0567b() {
        }

        /* JADX WARN: Multi-variable type inference failed */
        /* JADX WARN: Type inference failed for: r1v0, types: [tn.h, java.lang.Object] */
        /* JADX WARN: Type inference failed for: r1v1, types: [tn.i0, tn.m] */
        /* JADX WARN: Type inference failed for: r1v2, types: [tn.m] */
        @Override // kotlin.reflect.jvm.internal.impl.renderer.b
        public String a(tn.h classifier, kotlin.reflect.jvm.internal.impl.renderer.c renderer) {
            List M;
            t.g(classifier, "classifier");
            t.g(renderer, "renderer");
            if (classifier instanceof e1) {
                ro.f name = ((e1) classifier).getName();
                t.f(name, "getName(...)");
                return renderer.v(name, false);
            }
            ArrayList arrayList = new ArrayList();
            do {
                arrayList.add(classifier.getName());
                classifier = classifier.b();
            } while (classifier instanceof tn.e);
            M = a0.M(arrayList);
            return n.c(M);
        }
    }

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

        /* renamed from: a, reason: collision with root package name */
        public static final c f26351a = new c();

        private c() {
        }

        private final String b(tn.h hVar) {
            ro.f name = hVar.getName();
            t.f(name, "getName(...)");
            String b10 = n.b(name);
            if (hVar instanceof e1) {
                return b10;
            }
            tn.m b11 = hVar.b();
            t.f(b11, "getContainingDeclaration(...)");
            String c10 = c(b11);
            if (c10 == null || t.b(c10, "")) {
                return b10;
            }
            return c10 + '.' + b10;
        }

        private final String c(tn.m mVar) {
            if (mVar instanceof tn.e) {
                return b((tn.h) mVar);
            }
            if (!(mVar instanceof k0)) {
                return null;
            }
            ro.d j10 = ((k0) mVar).d().j();
            t.f(j10, "toUnsafe(...)");
            return n.a(j10);
        }

        @Override // kotlin.reflect.jvm.internal.impl.renderer.b
        public String a(tn.h classifier, kotlin.reflect.jvm.internal.impl.renderer.c renderer) {
            t.g(classifier, "classifier");
            t.g(renderer, "renderer");
            return b(classifier);
        }
    }

    String a(tn.h hVar, kotlin.reflect.jvm.internal.impl.renderer.c cVar);
}
