package androidx.lifecycle;

import androidx.lifecycle.f;
import f.l;

/* JADX INFO: compiled from: WithLifecycleState.kt */
/* JADX INFO: loaded from: classes.dex */
@f.i(bv = {1, 0, 3}, d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u001f\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0016¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t¸\u0006\u0000"}, d2 = {"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$observer$1", "Landroidx/lifecycle/j;", "Landroidx/lifecycle/LifecycleOwner;", "source", "Landroidx/lifecycle/Lifecycle$Event;", "event", "", "onStateChanged", "(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V", "lifecycle-runtime-ktx_release"}, k = 1, mv = {1, 1, 15}, pn = "", xi = 0, xs = "")
public final class WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$1 implements j {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    final /* synthetic */ g.a.j f930b;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    final /* synthetic */ f f931f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    final /* synthetic */ f.c f932g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    final /* synthetic */ f.z.c.a f933h;

    @Override // androidx.lifecycle.j
    public void d(l lVar, f.b bVar) {
        Object objA;
        f.z.d.k.e(lVar, "source");
        f.z.d.k.e(bVar, "event");
        if (bVar != f.b.upTo(this.f932g)) {
            if (bVar == f.b.ON_DESTROY) {
                this.f931f.c(this);
                g.a.j jVar = this.f930b;
                i iVar = new i();
                l.a aVar = f.l.f3940b;
                Object objA2 = f.m.a(iVar);
                f.l.a(objA2);
                jVar.resumeWith(objA2);
                return;
            }
            return;
        }
        this.f931f.c(this);
        g.a.j jVar2 = this.f930b;
        f.z.c.a aVar2 = this.f933h;
        try {
            l.a aVar3 = f.l.f3940b;
            objA = aVar2.invoke();
            f.l.a(objA);
        } catch (Throwable th) {
            l.a aVar4 = f.l.f3940b;
            objA = f.m.a(th);
            f.l.a(objA);
        }
        jVar2.resumeWith(objA);
    }
}
