package hp;

import java.util.ArrayDeque;
import java.util.Set;

/* loaded from: classes3.dex */
public class c1 {

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

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

    /* renamed from: c, reason: collision with root package name */
    private final boolean f21885c;

    /* renamed from: d, reason: collision with root package name */
    private final jp.o f21886d;

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

    /* renamed from: f, reason: collision with root package name */
    private final h f21888f;

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

    /* renamed from: h, reason: collision with root package name */
    private boolean f21890h;

    /* renamed from: i, reason: collision with root package name */
    private ArrayDeque f21891i;

    /* renamed from: j, reason: collision with root package name */
    private Set f21892j;

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

        /* renamed from: hp.c1$a$a, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        public static final class C0468a implements a {

            /* renamed from: a, reason: collision with root package name */
            private boolean f21893a;

            @Override // hp.c1.a
            public void a(dn.a block) {
                kotlin.jvm.internal.t.g(block, "block");
                if (this.f21893a) {
                    return;
                }
                this.f21893a = ((Boolean) block.invoke()).booleanValue();
            }

            public final boolean b() {
                return this.f21893a;
            }
        }

        void a(dn.a aVar);
    }

    /* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
    /* JADX WARN: Unknown enum class pattern. Please report as an issue! */
    /* loaded from: classes3.dex */
    public static final class b {
        private static final /* synthetic */ xm.a $ENTRIES;
        private static final /* synthetic */ b[] $VALUES;
        public static final b CHECK_ONLY_LOWER = new b("CHECK_ONLY_LOWER", 0);
        public static final b CHECK_SUBTYPE_AND_LOWER = new b("CHECK_SUBTYPE_AND_LOWER", 1);
        public static final b SKIP_LOWER = new b("SKIP_LOWER", 2);

        private static final /* synthetic */ b[] $values() {
            return new b[]{CHECK_ONLY_LOWER, CHECK_SUBTYPE_AND_LOWER, SKIP_LOWER};
        }

        static {
            b[] $values = $values();
            $VALUES = $values;
            $ENTRIES = xm.b.a($values);
        }

        private b(String str, int i10) {
        }

        public static b valueOf(String str) {
            return (b) Enum.valueOf(b.class, str);
        }

        public static b[] values() {
            return (b[]) $VALUES.clone();
        }
    }

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

        /* loaded from: classes3.dex */
        public static abstract class a extends c {
            public a() {
                super(null);
            }
        }

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

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

            private b() {
                super(null);
            }

            @Override // hp.c1.c
            public jp.j a(c1 state, jp.i type) {
                kotlin.jvm.internal.t.g(state, "state");
                kotlin.jvm.internal.t.g(type, "type");
                return state.j().c0(type);
            }
        }

        /* renamed from: hp.c1$c$c, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        public static final class C0469c extends c {

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

            private C0469c() {
                super(null);
            }

            @Override // hp.c1.c
            public /* bridge */ /* synthetic */ jp.j a(c1 c1Var, jp.i iVar) {
                return (jp.j) b(c1Var, iVar);
            }

            public Void b(c1 state, jp.i type) {
                kotlin.jvm.internal.t.g(state, "state");
                kotlin.jvm.internal.t.g(type, "type");
                throw new UnsupportedOperationException("Should not be called");
            }
        }

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

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

            private d() {
                super(null);
            }

            @Override // hp.c1.c
            public jp.j a(c1 state, jp.i type) {
                kotlin.jvm.internal.t.g(state, "state");
                kotlin.jvm.internal.t.g(type, "type");
                return state.j().l(type);
            }
        }

        private c() {
        }

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

        public abstract jp.j a(c1 c1Var, jp.i iVar);
    }

    public c1(boolean z10, boolean z11, boolean z12, jp.o typeSystemContext, g kotlinTypePreparator, h kotlinTypeRefiner) {
        kotlin.jvm.internal.t.g(typeSystemContext, "typeSystemContext");
        kotlin.jvm.internal.t.g(kotlinTypePreparator, "kotlinTypePreparator");
        kotlin.jvm.internal.t.g(kotlinTypeRefiner, "kotlinTypeRefiner");
        this.f21883a = z10;
        this.f21884b = z11;
        this.f21885c = z12;
        this.f21886d = typeSystemContext;
        this.f21887e = kotlinTypePreparator;
        this.f21888f = kotlinTypeRefiner;
    }

    public static /* synthetic */ Boolean d(c1 c1Var, jp.i iVar, jp.i iVar2, boolean z10, int i10, Object obj) {
        if (obj != null) {
            throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: addSubtypeConstraint");
        }
        if ((i10 & 4) != 0) {
            z10 = false;
        }
        return c1Var.c(iVar, iVar2, z10);
    }

    public Boolean c(jp.i subType, jp.i superType, boolean z10) {
        kotlin.jvm.internal.t.g(subType, "subType");
        kotlin.jvm.internal.t.g(superType, "superType");
        return null;
    }

    public final void e() {
        ArrayDeque arrayDeque = this.f21891i;
        kotlin.jvm.internal.t.d(arrayDeque);
        arrayDeque.clear();
        Set set = this.f21892j;
        kotlin.jvm.internal.t.d(set);
        set.clear();
        this.f21890h = false;
    }

    public boolean f(jp.i subType, jp.i superType) {
        kotlin.jvm.internal.t.g(subType, "subType");
        kotlin.jvm.internal.t.g(superType, "superType");
        return true;
    }

    public b g(jp.j subType, jp.d superType) {
        kotlin.jvm.internal.t.g(subType, "subType");
        kotlin.jvm.internal.t.g(superType, "superType");
        return b.CHECK_SUBTYPE_AND_LOWER;
    }

    public final ArrayDeque h() {
        return this.f21891i;
    }

    public final Set i() {
        return this.f21892j;
    }

    public final jp.o j() {
        return this.f21886d;
    }

    public final void k() {
        this.f21890h = true;
        if (this.f21891i == null) {
            this.f21891i = new ArrayDeque(4);
        }
        if (this.f21892j == null) {
            this.f21892j = pp.g.f33039r.a();
        }
    }

    public final boolean l(jp.i type) {
        kotlin.jvm.internal.t.g(type, "type");
        return this.f21885c && this.f21886d.B0(type);
    }

    public final boolean m() {
        return this.f21883a;
    }

    public final boolean n() {
        return this.f21884b;
    }

    public final jp.i o(jp.i type) {
        kotlin.jvm.internal.t.g(type, "type");
        return this.f21887e.a(type);
    }

    public final jp.i p(jp.i type) {
        kotlin.jvm.internal.t.g(type, "type");
        return this.f21888f.a(type);
    }

    public boolean q(dn.l block) {
        kotlin.jvm.internal.t.g(block, "block");
        a.C0468a c0468a = new a.C0468a();
        block.invoke(c0468a);
        return c0468a.b();
    }
}
