package defpackage;

import androidx.media3.extractor.text.ttml.TtmlNode;
import com.strmr.ps.data.local.entity.ContentImageOverrideEntity;
import com.strmr.ps.data.model.ContentItem;
import com.strmr.ps.data.repository.ContentImageOverrideRepository;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import okhttp3.internal.http.StatusLine;

/* 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$executeReset$1$ok$1", f = "ContextMenuHelper.kt", i = {}, l = {298, 303, StatusLine.HTTP_TEMP_REDIRECT}, m = "invokeSuspend", n = {}, s = {})
final class cg1 extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public int a;
    public final /* synthetic */ String b;
    public final /* synthetic */ ContentImageOverrideRepository c;
    public final /* synthetic */ ContentItem d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public cg1(String str, ContentImageOverrideRepository contentImageOverrideRepository, ContentItem contentItem, Continuation continuation) {
        super(2, continuation);
        this.b = str;
        this.c = contentImageOverrideRepository;
        this.d = contentItem;
    }

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

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

    /* JADX WARN: Code restructure failed: missing block: B:22:0x004c, code lost:
    
        if (r7.resetOverride(r9, com.strmr.ps.data.local.entity.ContentImageOverrideEntity.TYPE_BACKDROP, r8) == r0) goto L34;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x0062, code lost:
    
        if (r7.resetAllOverrides(r9, r8) == r0) goto L34;
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x0077, code lost:
    
        if (r7.resetOverride(r9, com.strmr.ps.data.local.entity.ContentImageOverrideEntity.TYPE_POSTER, r8) == r0) goto L34;
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x0079, code lost:
    
        return r0;
     */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        ck1 ck1Var = ck1.a;
        int i = this.a;
        if (i == 0) {
            s38.b(obj);
            String str = this.b;
            int iHashCode = str.hashCode();
            ContentItem contentItem = this.d;
            ContentImageOverrideRepository contentImageOverrideRepository = this.c;
            if (iHashCode != -982450867) {
                if (iHashCode != 96673) {
                    if (iHashCode == 2121427030 && str.equals(ContentImageOverrideEntity.TYPE_BACKDROP)) {
                        int tmdbId = contentItem.getTmdbId();
                        this.a = 2;
                    }
                } else if (str.equals(TtmlNode.COMBINE_ALL)) {
                    int tmdbId2 = contentItem.getTmdbId();
                    this.a = 3;
                }
            } else if (str.equals(ContentImageOverrideEntity.TYPE_POSTER)) {
                int tmdbId3 = contentItem.getTmdbId();
                this.a = 1;
            }
        } else {
            if (i != 1 && i != 2 && i != 3) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
        }
        return e6a.a;
    }
}
