package androidx.lifecycle;

import java.util.Queue;

/* JADX INFO: loaded from: classes.dex */
public final class y extends kotlinx.coroutines.t {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final e f2720c = new e();

    @Override // kotlinx.coroutines.t
    public final void L(kotlin.coroutines.h hVar, Runnable runnable) {
        nb.g.i(hVar, "context");
        nb.g.i(runnable, "block");
        e eVar = this.f2720c;
        eVar.getClass();
        be.d dVar = kotlinx.coroutines.h0.f29440a;
        ae.d dVar2 = ((ae.d) kotlinx.coroutines.internal.n.f29483a).f453f;
        if (!dVar2.M(hVar)) {
            if (!(eVar.f2647b || !eVar.f2646a)) {
                if (!((Queue) eVar.f2649d).offer(runnable)) {
                    throw new IllegalStateException("cannot enqueue any more runnables".toString());
                }
                eVar.a();
                return;
            }
        }
        dVar2.L(hVar, new e.t(eVar, runnable, 5));
    }

    @Override // kotlinx.coroutines.t
    public final boolean M(kotlin.coroutines.h hVar) {
        nb.g.i(hVar, "context");
        be.d dVar = kotlinx.coroutines.h0.f29440a;
        if (((ae.d) kotlinx.coroutines.internal.n.f29483a).f453f.M(hVar)) {
            return true;
        }
        e eVar = this.f2720c;
        return !(eVar.f2647b || !eVar.f2646a);
    }
}
