package go;

import hp.e0;
import hp.g1;
import hp.h1;
import hp.j1;
import hp.p1;
import hp.t1;
import hp.v;
import hp.w;
import java.util.List;
import kotlin.jvm.internal.t;
import tn.e1;

/* loaded from: classes3.dex */
public final class f extends v {

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

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

        static {
            int[] iArr = new int[c.values().length];
            try {
                iArr[c.FLEXIBLE_LOWER_BOUND.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[c.FLEXIBLE_UPPER_BOUND.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[c.INFLEXIBLE.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            f20097a = iArr;
        }
    }

    @Override // hp.v
    public h1 a(e1 parameter, w typeAttr, g1 typeParameterUpperBoundEraser, e0 erasedUpperBound) {
        h1 j1Var;
        t.g(parameter, "parameter");
        t.g(typeAttr, "typeAttr");
        t.g(typeParameterUpperBoundEraser, "typeParameterUpperBoundEraser");
        t.g(erasedUpperBound, "erasedUpperBound");
        if (!(typeAttr instanceof go.a)) {
            return super.a(parameter, typeAttr, typeParameterUpperBoundEraser, erasedUpperBound);
        }
        go.a aVar = (go.a) typeAttr;
        if (!aVar.i()) {
            aVar = aVar.l(c.INFLEXIBLE);
        }
        int i10 = a.f20097a[aVar.g().ordinal()];
        if (i10 == 1) {
            return new j1(t1.INVARIANT, erasedUpperBound);
        }
        if (i10 != 2 && i10 != 3) {
            throw new rm.t();
        }
        if (parameter.l().getAllowsOutPosition()) {
            List parameters = erasedUpperBound.K0().getParameters();
            t.f(parameters, "getParameters(...)");
            j1Var = parameters.isEmpty() ^ true ? new j1(t1.OUT_VARIANCE, erasedUpperBound) : p1.t(parameter, aVar);
        } else {
            j1Var = new j1(t1.INVARIANT, xo.c.j(parameter).H());
        }
        t.d(j1Var);
        return j1Var;
    }
}
