package j3;

import V4.C;
import Y4.H;
import Y4.c0;
import com.debridstream.tv.updater.UpdateViewModel;
import k3.C2381a;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2364p(UpdateViewModel updateViewModel, A4.d dVar) {
        super(2, dVar);
        this.f19601b = updateViewModel;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C2364p(this.f19601b, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        c0 c0Var;
        Object value;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f19600a;
        C3137A c3137a = C3137A.f25453a;
        UpdateViewModel updateViewModel = this.f19601b;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            C2381a c2381a = ((C2359k) ((c0) updateViewModel._uiState).getValue()).f19578b;
            String str = c2381a != null ? c2381a.f19780a : null;
            C2357i c2357i = updateViewModel.updatePreferences;
            this.f19600a = 1;
            c2357i.getClass();
            Object objC = L4.a.C(c2357i.f19571a, new C2354f(str, c2357i, null), this);
            if (objC != aVar) {
                objC = c3137a;
            }
            if (objC == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        H h5 = updateViewModel._uiState;
        do {
            c0Var = (c0) h5;
            value = c0Var.getValue();
        } while (!c0Var.i(value, C2359k.a((C2359k) value, false, null, false, false, null, null, false, false, false, null, 959)));
        return c3137a;
    }
}
