package kotlinx.coroutines;

/* JADX INFO: compiled from: CoroutineStart.kt */
/* JADX INFO: loaded from: classes.dex */
public enum p0 {
    DEFAULT,
    LAZY,
    ATOMIC,
    UNDISPATCHED;

    /* JADX INFO: compiled from: CoroutineStart.kt */
    public /* synthetic */ class a {
        public static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[p0.values().length];
            iArr[p0.DEFAULT.ordinal()] = 1;
            iArr[p0.ATOMIC.ordinal()] = 2;
            iArr[p0.UNDISPATCHED.ordinal()] = 3;
            iArr[p0.LAZY.ordinal()] = 4;
            a = iArr;
        }
    }

    public static /* synthetic */ void isLazy$annotations() {
    }

    public final <T> void invoke(h.x.c.l<? super h.u.d<? super T>, ? extends Object> lVar, h.u.d<? super T> dVar) throws Throwable {
        int i2 = a.a[ordinal()];
        if (i2 == 1) {
            kotlinx.coroutines.p2.a.d(lVar, dVar);
            return;
        }
        if (i2 == 2) {
            h.u.f.a(lVar, dVar);
        } else if (i2 == 3) {
            kotlinx.coroutines.p2.b.a(lVar, dVar);
        } else if (i2 != 4) {
            throw new h.j();
        }
    }

    public final boolean isLazy() {
        return this == LAZY;
    }

    public final <R, T> void invoke(h.x.c.p<? super R, ? super h.u.d<? super T>, ? extends Object> pVar, R r, h.u.d<? super T> dVar) throws Throwable {
        int i2 = a.a[ordinal()];
        if (i2 == 1) {
            kotlinx.coroutines.p2.a.f(pVar, r, dVar, null, 4, null);
            return;
        }
        if (i2 == 2) {
            h.u.f.b(pVar, r, dVar);
        } else if (i2 == 3) {
            kotlinx.coroutines.p2.b.b(pVar, r, dVar);
        } else if (i2 != 4) {
            throw new h.j();
        }
    }
}
