package V2;

import com.debridstream.tv.data.home.HomeMetaItem;
import java.util.ArrayList;
import java.util.HashSet;
import m3.AbstractC2467b;
import w4.C3137A;
import x4.AbstractC3229F;
import x4.AbstractC3253s;

/* JADX INFO: renamed from: V2.o1, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0703o1 extends C4.j implements J4.e {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public /* synthetic */ Object f7984b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ Y2.o f7986d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0703o1(ArrayList arrayList, Y2.o oVar, A4.d dVar) {
        super(2, dVar);
        this.f7985c = arrayList;
        this.f7986d = oVar;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C0703o1 c0703o1 = new C0703o1(this.f7985c, this.f7986d, dVar);
        c0703o1.f7984b = obj;
        return c0703o1;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((C0703o1) 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.f7983a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            V4.C c6 = (V4.C) this.f7984b;
            HashSet hashSet = new HashSet();
            ArrayList<w4.k> arrayList = new ArrayList();
            for (Object obj2 : this.f7985c) {
                w4.k kVar = (w4.k) obj2;
                int iIntValue = ((Number) kVar.f25469a).intValue();
                String str = (String) kVar.f25470b;
                C0707p1 c0707p1 = C0707p1.f8004a;
                if (hashSet.add(C0707p1.e(iIntValue, str))) {
                    arrayList.add(obj2);
                }
            }
            ArrayList arrayList2 = new ArrayList(AbstractC3253s.G(arrayList, 10));
            for (w4.k kVar2 : arrayList) {
                arrayList2.add(V4.E.e(c6, null, new C0699n1(((Number) kVar2.f25469a).intValue(), (String) kVar2.f25470b, this.f7986d, null), 3));
            }
            this.f7983a = 1;
            obj = V4.E.f(arrayList2, this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        ArrayList arrayList3 = new ArrayList();
        for (w4.k kVar3 : (Iterable) obj) {
            String str2 = (String) kVar3.f25469a;
            HomeMetaItem homeMetaItem = (HomeMetaItem) kVar3.f25470b;
            w4.k kVar4 = homeMetaItem != null ? new w4.k(str2, homeMetaItem) : null;
            if (kVar4 != null) {
                arrayList3.add(kVar4);
            }
        }
        return AbstractC3229F.F(arrayList3);
    }
}
