package M2;

import Y4.InterfaceC0843i;
import androidx.compose.runtime.SnapshotStateKt;
import com.debridstream.tv.screens.CatalogBrowseViewModel;
import h3.AbstractC2138k;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ E.D f4281c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ CatalogBrowseViewModel f4282d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public G1(AbstractC2138k abstractC2138k, E.D d6, CatalogBrowseViewModel catalogBrowseViewModel, A4.d dVar) {
        super(2, dVar);
        this.f4280b = abstractC2138k;
        this.f4281c = d6;
        this.f4282d = catalogBrowseViewModel;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new G1(this.f4280b, this.f4281c, this.f4282d, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f4279a;
        C3137A c3137a = C3137A.f25453a;
        if (i6 != 0) {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            return c3137a;
        }
        AbstractC2467b.l(obj);
        if (this.f4280b.a()) {
            InterfaceC0843i interfaceC0843iJ = Y4.O.j(SnapshotStateKt.snapshotFlow(new C1(this.f4281c, 0)));
            D1 d1 = new D1(this.f4282d, 0);
            this.f4279a = 1;
            Object objCollect = interfaceC0843iJ.collect(new F1(d1, 0), this);
            if (objCollect != aVar) {
                objCollect = c3137a;
            }
            if (objCollect == aVar) {
                return aVar;
            }
        }
        return c3137a;
    }
}
