package com.strmr.ps.data.repository;

import com.strmr.ps.data.model.ContentItem;
import com.strmr.ps.data.model.continuewatching.ContinueWatchingItem;
import defpackage.ak1;
import defpackage.ck1;
import defpackage.e6a;
import defpackage.gr3;
import defpackage.s38;
import defpackage.xf8;
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\u0004\u0018\u00010\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lak1;", "Lcom/strmr/ps/data/model/ContentItem;", "<anonymous>", "(Lak1;)Lcom/strmr/ps/data/model/ContentItem;"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.data.repository.ContinueWatchingRepository$parallelEnrich$2$results$1$1", f = "ContinueWatchingRepository.kt", i = {}, l = {1262, 1264}, m = "invokeSuspend", n = {}, s = {})
public final class ContinueWatchingRepository$parallelEnrich$2$results$1$1 extends SuspendLambda implements gr3<ak1, Continuation<? super ContentItem>, Object> {
    final /* synthetic */ ContinueWatchingItem $item;
    final /* synthetic */ xf8 $semaphore;
    int label;
    final /* synthetic */ ContinueWatchingRepository this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ContinueWatchingRepository$parallelEnrich$2$results$1$1(xf8 xf8Var, ContinueWatchingRepository continueWatchingRepository, ContinueWatchingItem continueWatchingItem, Continuation<? super ContinueWatchingRepository$parallelEnrich$2$results$1$1> continuation) {
        super(2, continuation);
        this.$semaphore = xf8Var;
        this.this$0 = continueWatchingRepository;
        this.$item = continueWatchingItem;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation<e6a> create(Object obj, Continuation<?> continuation) {
        return new ContinueWatchingRepository$parallelEnrich$2$results$1$1(this.$semaphore, this.this$0, this.$item, continuation);
    }

    @Override // defpackage.gr3
    public final Object invoke(ak1 ak1Var, Continuation<? super ContentItem> continuation) {
        return ((ContinueWatchingRepository$parallelEnrich$2$results$1$1) create(ak1Var, continuation)).invokeSuspend(e6a.a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:17:0x0036, code lost:
    
        if (r5 == r0) goto L18;
     */
    @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.label;
        try {
            if (i == 0) {
                s38.b(obj);
                xf8 xf8Var = this.$semaphore;
                this.label = 1;
                if (xf8Var.b(this) != ck1Var) {
                }
                return ck1Var;
            }
            if (i != 1) {
                if (i != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                s38.b(obj);
                return (ContentItem) obj;
            }
            s38.b(obj);
            ContinueWatchingRepository continueWatchingRepository = this.this$0;
            ContinueWatchingItem continueWatchingItem = this.$item;
            this.label = 2;
            obj = continueWatchingRepository.enrichToContentItem(continueWatchingItem, this);
        } finally {
            this.$semaphore.release();
        }
    }
}
