package com.strmr.ps.ui.contextmenu;

import com.strmr.ps.data.model.ContentItem;
import defpackage.ak1;
import defpackage.ck1;
import defpackage.e6a;
import defpackage.gr3;
import defpackage.m02;
import defpackage.m12;
import defpackage.qm5;
import defpackage.s38;
import defpackage.sc2;
import defpackage.sm5;
import defpackage.wj0;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lak1;", "Le6a;", "<anonymous>", "(Lak1;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.ui.contextmenu.ContextMenuHelper$showRemoveFromListDialog$1", f = "ContextMenuHelper.kt", i = {}, l = {577, 582, 588, 604}, m = "invokeSuspend", n = {}, s = {})
final class y extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public int a;
    public final /* synthetic */ h b;
    public final /* synthetic */ ContentItem c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public y(h hVar, ContentItem contentItem, Continuation continuation) {
        super(2, continuation);
        this.b = hVar;
        this.c = contentItem;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        return new y(this.b, this.c, continuation);
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((y) create((ak1) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    /* JADX WARN: Removed duplicated region for block: B:29:0x007f A[RETURN] */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        ck1 ck1Var = ck1.a;
        int i = this.a;
        e6a e6aVar = e6a.a;
        h hVar = this.b;
        try {
        } catch (Exception unused) {
            m12 m12Var = sc2.a;
            qm5 qm5Var = sm5.a;
            w wVar = new w(hVar, null);
            this.a = 4;
            if (wj0.f(qm5Var, wVar, this) == ck1Var) {
            }
        }
        if (i == 0) {
            s38.b(obj);
            m12 m12Var2 = sc2.a;
            m02 m02Var = m02.c;
            x xVar = new x(hVar, null);
            this.a = 1;
            obj = wj0.f(m02Var, xVar, this);
            if (obj == ck1Var) {
            }
        }
        if (i != 1) {
            if (i == 2 || i == 3) {
                s38.b(obj);
                return e6aVar;
            }
            if (i == 4) {
                s38.b(obj);
            }
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        s38.b(obj);
        List list = (List) obj;
        if (list.isEmpty()) {
            m12 m12Var3 = sc2.a;
            qm5 qm5Var2 = sm5.a;
            u uVar = new u(hVar, null);
            this.a = 2;
            if (wj0.f(qm5Var2, uVar, this) == ck1Var) {
            }
        }
        m12 m12Var4 = sc2.a;
        qm5 qm5Var3 = sm5.a;
        v vVar = new v(this.c, hVar, list, null);
        this.a = 3;
        return wj0.f(qm5Var3, vVar, this) == ck1Var ? ck1Var : e6aVar;
    }
}
