package y0;

import g1.e;

/* loaded from: classes.dex */
public abstract class z {
    public static final boolean a(a2 a2Var, v vVar) {
        kotlin.jvm.internal.t.e(vVar, "null cannot be cast to non-null type androidx.compose.runtime.CompositionLocal<kotlin.Any?>");
        return a2Var.containsKey(vVar);
    }

    public static final Object b(a2 a2Var, v vVar) {
        kotlin.jvm.internal.t.e(vVar, "null cannot be cast to non-null type androidx.compose.runtime.CompositionLocal<kotlin.Any?>");
        Object obj = a2Var.get(vVar);
        if (obj == null) {
            obj = vVar.a();
        }
        return ((e4) obj).a(a2Var);
    }

    public static final a2 c(i2[] i2VarArr, a2 a2Var, a2 a2Var2) {
        e.a builder = g1.f.a().builder();
        for (i2 i2Var : i2VarArr) {
            v b10 = i2Var.b();
            kotlin.jvm.internal.t.e(b10, "null cannot be cast to non-null type androidx.compose.runtime.ProvidableCompositionLocal<kotlin.Any?>");
            h2 h2Var = (h2) b10;
            if (i2Var.a() || !a(a2Var, h2Var)) {
                e4 e4Var = (e4) a2Var2.get(h2Var);
                kotlin.jvm.internal.t.e(i2Var, "null cannot be cast to non-null type androidx.compose.runtime.ProvidedValue<kotlin.Any?>");
                builder.put(h2Var, h2Var.b(i2Var, e4Var));
            }
        }
        return builder.e();
    }

    public static /* synthetic */ a2 d(i2[] i2VarArr, a2 a2Var, a2 a2Var2, int i10, Object obj) {
        if ((i10 & 4) != 0) {
            a2Var2 = g1.f.a();
        }
        return c(i2VarArr, a2Var, a2Var2);
    }
}
