package h3;

import com.debridstream.tv.screens.SearchRecommendationsViewModel;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class K2 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f17001a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ boolean f17002b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ SearchRecommendationsViewModel f17003c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ n0.x f17004d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ n0.x f17005e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public K2(boolean z6, SearchRecommendationsViewModel searchRecommendationsViewModel, n0.x xVar, n0.x xVar2, A4.d dVar) {
        super(2, dVar);
        this.f17002b = z6;
        this.f17003c = searchRecommendationsViewModel;
        this.f17004d = xVar;
        this.f17005e = xVar2;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new K2(this.f17002b, this.f17003c, this.f17004d, this.f17005e, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((K2) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:16:0x0036, code lost:
    
        if (V4.E.l(48, r9) == r0) goto L23;
     */
    /* JADX WARN: Code restructure failed: missing block: B:19:0x003d, code lost:
    
        if (r3.hasPendingPosterRestore() != false) goto L20;
     */
    /* JADX WARN: Code restructure failed: missing block: B:22:0x0046, code lost:
    
        if (V4.E.l(48, r9) == r0) goto L23;
     */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f17001a;
        C3137A c3137a = C3137A.f25453a;
        SearchRecommendationsViewModel searchRecommendationsViewModel = this.f17003c;
        boolean z6 = this.f17002b;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            if (z6) {
                if (!searchRecommendationsViewModel.hasPendingPosterRestore()) {
                    this.f17001a = 1;
                }
                return c3137a;
            }
            this.f17001a = 2;
            return aVar;
        }
        if (i6 != 1) {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            if (z6) {
                n0.x.a(this.f17005e);
                return c3137a;
            }
            n0.x.a(this.f17004d);
            return c3137a;
        }
        AbstractC2467b.l(obj);
    }
}
