package V2;

import a.AbstractC0872a;
import android.content.Context;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import java.util.Map;
import m3.AbstractC2467b;
import org.json.JSONArray;
import s2.SharedPreferencesC2907b;
import w4.C3137A;
import x4.C3224A;

/* JADX INFO: renamed from: V2.s, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0716s {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final C0716s f8049a = new C0716s();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final a5.c f8050b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static volatile V4.B0 f8051c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static volatile V4.B0 f8052d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static volatile V4.B0 f8053e;

    static {
        V4.D0 d0D = V4.E.d();
        c5.e eVar = V4.N.f8259a;
        f8050b = V4.E.c(AbstractC0872a.a0(d0D, c5.d.f13466b));
    }

    public static final Object a(Context context, C0692m c0692m) {
        Object objH;
        Context applicationContext = context.getApplicationContext();
        Y4.c0 c0Var = z3.f8212a;
        kotlin.jvm.internal.o.e(applicationContext);
        String strA = z3.a(applicationContext);
        if (strA == null) {
            strA = "main";
        }
        FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();
        return (currentUser != null && (objH = V4.E.H(c5.d.f13466b, new C0705p(currentUser, strA, applicationContext, null), c0692m)) == B4.a.f492a) ? objH : C3137A.f25453a;
    }

    public static Object d(Context context, r rVar) {
        c5.e eVar = V4.N.f8259a;
        Object objH = V4.E.H(c5.d.f13466b, new C0657f(context, null), rVar);
        return objH == B4.a.f492a ? objH : C3137A.f25453a;
    }

    public static void e(Context context, boolean z6) {
        kotlin.jvm.internal.o.h(context, "context");
        V4.E.y(f8050b, null, null, new C0662g(context.getApplicationContext(), z6, null), 3);
    }

    public static void f(Context context, String str) {
        kotlin.jvm.internal.o.h(context, "context");
        Context applicationContext = context.getApplicationContext();
        V4.B0 b02 = f8051c;
        if (b02 != null) {
            b02.cancel(null);
        }
        f8051c = V4.E.y(f8050b, null, null, new C0667h(applicationContext, null), 3);
    }

    public static void g(Context context, J4.a aVar) {
        kotlin.jvm.internal.o.h(context, "context");
        V4.E.y(f8050b, null, null, new C0692m(context.getApplicationContext(), aVar, null), 3);
    }

    public static void h(Context context, String str) {
        kotlin.jvm.internal.o.h(context, "context");
        Context applicationContext = context.getApplicationContext();
        V4.B0 b02 = f8052d;
        if (b02 != null) {
            b02.cancel(null);
        }
        V4.B0 b03 = f8053e;
        if (b03 != null) {
            b03.cancel(null);
        }
        f8052d = V4.E.y(f8050b, null, null, new C0697n(applicationContext, null), 3);
    }

    public static void i(Context context, String str) {
        kotlin.jvm.internal.o.h(context, "context");
        Context applicationContext = context.getApplicationContext();
        V4.B0 b02 = f8052d;
        if (b02 != null) {
            b02.cancel(null);
        }
        f8052d = V4.E.y(f8050b, null, null, new C0701o(applicationContext, null), 3);
    }

    public static boolean j(Context context) {
        Object objD;
        kotlin.jvm.internal.o.h(context, "context");
        try {
            Context applicationContext = context.getApplicationContext();
            kotlin.jvm.internal.o.g(applicationContext, "getApplicationContext(...)");
            Context applicationContext2 = applicationContext.getApplicationContext();
            kotlin.jvm.internal.o.g(applicationContext2, "getApplicationContext(...)");
            String string = ((SharedPreferencesC2907b) W.c.D(applicationContext2)).getString("access", null);
            objD = Boolean.valueOf((string == null || S4.p.Q0(string)) ? false : true);
        } catch (Throwable th) {
            objD = AbstractC2467b.d(th);
        }
        if (w4.n.a(objD) != null) {
            objD = Boolean.FALSE;
        }
        return ((Boolean) objD).booleanValue();
    }

    public static void k(Context context) {
        kotlin.jvm.internal.o.h(context, "context");
        Context applicationContext = context.getApplicationContext();
        V4.B0 b02 = f8051c;
        if (b02 != null) {
            b02.cancel(null);
        }
        V4.B0 b03 = f8052d;
        if (b03 != null) {
            b03.cancel(null);
        }
        V4.B0 b04 = f8053e;
        if (b04 != null) {
            b04.cancel(null);
        }
        kotlin.jvm.internal.o.e(applicationContext);
        Context applicationContext2 = applicationContext.getApplicationContext();
        kotlin.jvm.internal.o.g(applicationContext2, "getApplicationContext(...)");
        ((SharedPreferencesC2907b) W.c.D(applicationContext2)).edit().clear().apply();
        Context context2 = i3.M.f18897a;
        Context context3 = i3.M.f18897a;
        synchronized (i3.M.f18898b) {
            if (context3 != null) {
                try {
                    context3.getSharedPreferences("debridstream_trakt_watched_history", 0).edit().clear().apply();
                } catch (Throwable th) {
                    throw th;
                }
            }
            i3.M.e(C3224A.f26032a);
        }
        Y4.c0 c0Var = C0706p0.f8000e;
        JSONArray jSONArray = new JSONArray();
        c0Var.getClass();
        c0Var.k(null, jSONArray);
        Y4.c0 c0Var2 = C0706p0.f8002g;
        x4.y yVar = x4.y.f26065a;
        c0Var2.getClass();
        c0Var2.k(null, yVar);
        Context context4 = AbstractC0696m3.f7937d0;
        if (context4 != null) {
            context4.getSharedPreferences("debridstream_app_progress_cache", 0).edit().putString("trakt_continue_watching_json", "[]").apply();
        }
        Context context5 = AbstractC0696m3.f7937d0;
        if (context5 != null) {
            context5.getSharedPreferences("debridstream_app_progress_cache", 0).edit().putString("trakt_watchlist_json", "[]").apply();
        }
        applicationContext.getApplicationContext().getSharedPreferences("debridstream_app_progress_cache", 0).edit().remove("trakt_continue_watching_json").remove("trakt_watchlist_json").apply();
        Context context6 = W.b.f8366i;
        if (context6 != null) {
            context6.getSharedPreferences("debridstream_trakt_catalog_list_cache", 0).edit().clear().apply();
        }
        u3.e(new T0.A(20));
    }

    public static Object l(Context context, boolean z6, C0662g c0662g) {
        Context applicationContext = context.getApplicationContext();
        c5.e eVar = V4.N.f8259a;
        Object objH = V4.E.H(c5.d.f13466b, new C0709q(applicationContext, z6, null), c0662g);
        return objH == B4.a.f492a ? objH : C3137A.f25453a;
    }

    public static boolean n(C0716s c0716s, Context context, String str) {
        Y4.J j4 = u3.f8112c;
        boolean z6 = ((n3) ((Y4.c0) j4.f8871a).getValue()).f7972b.f7757a;
        boolean z7 = ((n3) ((Y4.c0) j4.f8871a).getValue()).f7972b.f7759c;
        c0716s.getClass();
        kotlin.jvm.internal.o.h(context, "context");
        if (z7) {
            return o(context, str, z6);
        }
        return false;
    }

    public static boolean o(Context context, String str, boolean z6) {
        kotlin.jvm.internal.o.h(context, "context");
        Context applicationContext = context.getApplicationContext();
        if (str == null) {
            Y4.c0 c0Var = z3.f8212a;
            kotlin.jvm.internal.o.e(applicationContext);
            str = z3.a(applicationContext);
            if (str == null) {
                str = "main";
            }
        }
        if (!str.equals("main") || !z6) {
            return false;
        }
        kotlin.jvm.internal.o.e(applicationContext);
        return j(applicationContext);
    }

    public static boolean p(C0716s c0716s, Context context, String str) {
        boolean z6 = ((n3) ((Y4.c0) u3.f8112c.f8871a).getValue()).f7972b.f7757a;
        c0716s.getClass();
        return o(context, str, z6);
    }

    public final Object b(Context context, Map map, r rVar) {
        String strA = z3.a(context);
        if (strA == null) {
            strA = "main";
        }
        boolean zN = n(this, context, strA);
        C3137A c3137a = C3137A.f25453a;
        if (zN) {
            Object objH = V4.E.H(c5.d.f13466b, new C0632a(strA, null), rVar);
            if (objH == B4.a.f492a) {
                return objH;
            }
        } else {
            Object objH2 = V4.E.H(c5.d.f13466b, new C0637b(context, strA, map, null), rVar);
            if (objH2 == B4.a.f492a) {
                return objH2;
            }
        }
        return c3137a;
    }

    public final Object c(Context context, Map map, r rVar) {
        Context applicationContext = context.getApplicationContext();
        Y4.c0 c0Var = z3.f8212a;
        kotlin.jvm.internal.o.e(applicationContext);
        String strA = z3.a(applicationContext);
        if (strA == null) {
            strA = "main";
        }
        boolean zP = p(this, applicationContext, strA);
        C3137A c3137a = C3137A.f25453a;
        if (zP) {
            Object objH = V4.E.H(c5.d.f13466b, new C0642c(strA, null), rVar);
            if (objH == B4.a.f492a) {
                return objH;
            }
        } else {
            Object objH2 = V4.E.H(c5.d.f13466b, new C0647d(applicationContext, strA, map, null), rVar);
            if (objH2 == B4.a.f492a) {
                return objH2;
            }
        }
        return c3137a;
    }

    /* JADX WARN: Removed duplicated region for block: B:100:0x029e A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:101:0x029f A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:44:0x013e  */
    /* JADX WARN: Removed duplicated region for block: B:48:0x0161  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x0166 A[PHI: r1 r2 r3
      0x0166: PHI (r1v34 J4.c) = (r1v31 J4.c), (r1v38 J4.c) binds: [B:49:0x0162, B:14:0x0042] A[DONT_GENERATE, DONT_INLINE]
      0x0166: PHI (r2v27 android.content.Context) = (r2v25 android.content.Context), (r2v28 android.content.Context) binds: [B:49:0x0162, B:14:0x0042] A[DONT_GENERATE, DONT_INLINE]
      0x0166: PHI (r3v29 V2.s) = (r3v27 V2.s), (r3v31 V2.s) binds: [B:49:0x0162, B:14:0x0042] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:63:0x01b6  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x01d9  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x01de A[PHI: r1 r2 r3
      0x01de: PHI (r1v22 J4.c) = (r1v19 J4.c), (r1v26 J4.c) binds: [B:68:0x01da, B:19:0x0074] A[DONT_GENERATE, DONT_INLINE]
      0x01de: PHI (r2v18 android.content.Context) = (r2v16 android.content.Context), (r2v19 android.content.Context) binds: [B:68:0x01da, B:19:0x0074] A[DONT_GENERATE, DONT_INLINE]
      0x01de: PHI (r3v20 V2.s) = (r3v18 V2.s), (r3v22 V2.s) binds: [B:68:0x01da, B:19:0x0074] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:7:0x001d  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x0227  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0253  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object m(Context context, EnumC0728v enumC0728v, Map map, C0673i0 c0673i0, C4.c cVar) {
        r rVar;
        C0716s c0716s;
        C0716s c0716s2;
        C0716s c0716s3;
        C0716s c0716s4;
        Context context2;
        J4.c cVar2;
        C0716s c0716s5;
        Context applicationContext;
        V4.B0 b02;
        Context context3;
        J4.c cVar3;
        C0716s c0716s6;
        Object objH;
        Context context4;
        J4.c cVar4;
        C0716s c0716s7;
        Object objH2;
        Context context5 = context;
        Map map2 = map;
        J4.c cVar5 = c0673i0;
        if (cVar instanceof r) {
            rVar = (r) cVar;
            int i6 = rVar.f8032j;
            if ((i6 & Integer.MIN_VALUE) != 0) {
                rVar.f8032j = i6 - Integer.MIN_VALUE;
            } else {
                rVar = new r(this, cVar);
            }
        }
        Object obj = rVar.f8030e;
        B4.a aVar = B4.a.f492a;
        int i7 = rVar.f8032j;
        C3137A c3137a = C3137A.f25453a;
        switch (i7) {
            case 0:
                AbstractC2467b.l(obj);
                Y4.c0 c0Var = C0706p0.f8000e;
                JSONArray jSONArray = new JSONArray();
                c0Var.getClass();
                c0Var.k(null, jSONArray);
                Y4.c0 c0Var2 = C0706p0.f8002g;
                x4.y yVar = x4.y.f26065a;
                c0Var2.getClass();
                c0Var2.k(null, yVar);
                V4.B0 b03 = f8051c;
                if (b03 != null) {
                    b03.cancel(null);
                }
                int iOrdinal = enumC0728v.ordinal();
                if (iOrdinal == 0) {
                    cVar5.invoke("Loading continue watching…");
                    rVar.f8026a = this;
                    rVar.f8027b = context5;
                    rVar.f8028c = map2;
                    rVar.f8029d = cVar5;
                    rVar.f8032j = 1;
                    if (b(context5, map2, rVar) != aVar) {
                        c0716s = this;
                        cVar5.invoke("Loading watchlist…");
                        rVar.f8026a = null;
                        rVar.f8027b = null;
                        rVar.f8028c = null;
                        rVar.f8029d = null;
                        rVar.f8032j = 2;
                        if (c0716s.c(context5, map2, rVar) == aVar) {
                        }
                    }
                } else if (iOrdinal == 1) {
                    cVar5.invoke("Loading continue watching…");
                    rVar.f8026a = this;
                    rVar.f8027b = context5;
                    rVar.f8028c = map2;
                    rVar.f8029d = cVar5;
                    rVar.f8032j = 3;
                    if (b(context5, map2, rVar) != aVar) {
                        c0716s2 = this;
                        cVar5.invoke("Loading watchlist…");
                        rVar.f8026a = c0716s2;
                        rVar.f8027b = context5;
                        rVar.f8028c = cVar5;
                        rVar.f8029d = null;
                        rVar.f8032j = 4;
                        if (c0716s2.c(context5, map2, rVar) != aVar) {
                            context2 = context5;
                            cVar2 = cVar5;
                            c0716s5 = c0716s2;
                            c0716s5.getClass();
                            kotlin.jvm.internal.o.h(context2, "context");
                            applicationContext = context2.getApplicationContext();
                            Y4.c0 c0Var3 = z3.f8212a;
                            kotlin.jvm.internal.o.e(applicationContext);
                            if (kotlin.jvm.internal.o.c(z3.a(applicationContext), "main") && p(c0716s5, applicationContext, "main")) {
                                b02 = f8053e;
                                if (b02 != null) {
                                    b02.cancel(null);
                                }
                                f8053e = V4.E.y(f8050b, null, null, new C0672i(applicationContext, null), 3);
                            }
                            cVar2.invoke("Loading Trakt watchlist…");
                            rVar.f8026a = null;
                            rVar.f8027b = null;
                            rVar.f8028c = null;
                            rVar.f8032j = 5;
                            if (d(context2, rVar) != aVar) {
                            }
                        }
                    }
                } else if (iOrdinal == 2) {
                    cVar5.invoke("Loading continue watching…");
                    rVar.f8026a = this;
                    rVar.f8027b = context5;
                    rVar.f8028c = map2;
                    rVar.f8029d = cVar5;
                    rVar.f8032j = 6;
                    if (b(context5, map2, rVar) != aVar) {
                        c0716s3 = this;
                        cVar5.invoke("Loading watchlist…");
                        rVar.f8026a = c0716s3;
                        rVar.f8027b = context5;
                        rVar.f8028c = cVar5;
                        rVar.f8029d = null;
                        rVar.f8032j = 7;
                        if (c0716s3.c(context5, map2, rVar) != aVar) {
                            context3 = context5;
                            cVar3 = cVar5;
                            c0716s6 = c0716s3;
                            cVar3.invoke("Loading Trakt continue watching…");
                            rVar.f8026a = c0716s6;
                            rVar.f8027b = context3;
                            rVar.f8028c = cVar3;
                            rVar.f8032j = 8;
                            c0716s6.getClass();
                            c5.e eVar = V4.N.f8259a;
                            objH = V4.E.H(c5.d.f13466b, new C0652e(context3, null), rVar);
                            if (objH != aVar) {
                                objH = c3137a;
                            }
                            if (objH != aVar) {
                                c0716s6.getClass();
                                f(context3, "startup_first_time_trakt_cw");
                                cVar3.invoke("Loading Trakt watchlist…");
                                rVar.f8026a = null;
                                rVar.f8027b = null;
                                rVar.f8028c = null;
                                rVar.f8032j = 9;
                                if (d(context3, rVar) != aVar) {
                                }
                            }
                        }
                    }
                } else {
                    if (iOrdinal != 3) {
                        throw new E3.v();
                    }
                    cVar5.invoke("Loading continue watching…");
                    rVar.f8026a = this;
                    rVar.f8027b = context5;
                    rVar.f8028c = map2;
                    rVar.f8029d = cVar5;
                    rVar.f8032j = 10;
                    if (b(context5, map2, rVar) != aVar) {
                        c0716s4 = this;
                        cVar5.invoke("Loading watchlist…");
                        rVar.f8026a = c0716s4;
                        rVar.f8027b = context5;
                        rVar.f8028c = cVar5;
                        rVar.f8029d = null;
                        rVar.f8032j = 11;
                        if (c0716s4.c(context5, map2, rVar) != aVar) {
                            context4 = context5;
                            cVar4 = cVar5;
                            c0716s7 = c0716s4;
                            cVar4.invoke("Loading Trakt continue watching…");
                            rVar.f8026a = c0716s7;
                            rVar.f8027b = context4;
                            rVar.f8028c = cVar4;
                            rVar.f8032j = 12;
                            c0716s7.getClass();
                            c5.e eVar2 = V4.N.f8259a;
                            objH2 = V4.E.H(c5.d.f13466b, new C0652e(context4, null), rVar);
                            if (objH2 != aVar) {
                                objH2 = c3137a;
                            }
                            if (objH2 != aVar) {
                                c0716s7.getClass();
                                f(context4, "startup_cached_trakt_cw_refresh");
                                cVar4.invoke("Loading Trakt watchlist…");
                                rVar.f8026a = null;
                                rVar.f8027b = null;
                                rVar.f8028c = null;
                                rVar.f8032j = 13;
                                if (d(context4, rVar) == aVar) {
                                    return c3137a;
                                }
                            }
                        }
                    }
                }
                return aVar;
            case 1:
                J4.c cVar6 = rVar.f8029d;
                map2 = (Map) rVar.f8028c;
                Context context6 = rVar.f8027b;
                c0716s = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar5 = cVar6;
                context5 = context6;
                cVar5.invoke("Loading watchlist…");
                rVar.f8026a = null;
                rVar.f8027b = null;
                rVar.f8028c = null;
                rVar.f8029d = null;
                rVar.f8032j = 2;
                if (c0716s.c(context5, map2, rVar) == aVar) {
                    return aVar;
                }
                break;
            case 2:
                AbstractC2467b.l(obj);
                return c3137a;
            case 3:
                J4.c cVar7 = rVar.f8029d;
                map2 = (Map) rVar.f8028c;
                Context context7 = rVar.f8027b;
                c0716s2 = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar5 = cVar7;
                context5 = context7;
                cVar5.invoke("Loading watchlist…");
                rVar.f8026a = c0716s2;
                rVar.f8027b = context5;
                rVar.f8028c = cVar5;
                rVar.f8029d = null;
                rVar.f8032j = 4;
                if (c0716s2.c(context5, map2, rVar) != aVar) {
                }
                return aVar;
            case 4:
                cVar2 = (J4.c) rVar.f8028c;
                context2 = rVar.f8027b;
                c0716s5 = rVar.f8026a;
                AbstractC2467b.l(obj);
                c0716s5.getClass();
                kotlin.jvm.internal.o.h(context2, "context");
                applicationContext = context2.getApplicationContext();
                Y4.c0 c0Var32 = z3.f8212a;
                kotlin.jvm.internal.o.e(applicationContext);
                if (kotlin.jvm.internal.o.c(z3.a(applicationContext), "main")) {
                    b02 = f8053e;
                    if (b02 != null) {
                    }
                    f8053e = V4.E.y(f8050b, null, null, new C0672i(applicationContext, null), 3);
                }
                cVar2.invoke("Loading Trakt watchlist…");
                rVar.f8026a = null;
                rVar.f8027b = null;
                rVar.f8028c = null;
                rVar.f8032j = 5;
                if (d(context2, rVar) != aVar) {
                }
                break;
            case 5:
                AbstractC2467b.l(obj);
                return c3137a;
            case 6:
                J4.c cVar8 = rVar.f8029d;
                map2 = (Map) rVar.f8028c;
                Context context8 = rVar.f8027b;
                c0716s3 = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar5 = cVar8;
                context5 = context8;
                cVar5.invoke("Loading watchlist…");
                rVar.f8026a = c0716s3;
                rVar.f8027b = context5;
                rVar.f8028c = cVar5;
                rVar.f8029d = null;
                rVar.f8032j = 7;
                if (c0716s3.c(context5, map2, rVar) != aVar) {
                }
                return aVar;
            case 7:
                cVar3 = (J4.c) rVar.f8028c;
                context3 = rVar.f8027b;
                c0716s6 = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar3.invoke("Loading Trakt continue watching…");
                rVar.f8026a = c0716s6;
                rVar.f8027b = context3;
                rVar.f8028c = cVar3;
                rVar.f8032j = 8;
                c0716s6.getClass();
                c5.e eVar3 = V4.N.f8259a;
                objH = V4.E.H(c5.d.f13466b, new C0652e(context3, null), rVar);
                if (objH != aVar) {
                }
                if (objH != aVar) {
                }
                return aVar;
            case 8:
                cVar3 = (J4.c) rVar.f8028c;
                context3 = rVar.f8027b;
                c0716s6 = rVar.f8026a;
                AbstractC2467b.l(obj);
                c0716s6.getClass();
                f(context3, "startup_first_time_trakt_cw");
                cVar3.invoke("Loading Trakt watchlist…");
                rVar.f8026a = null;
                rVar.f8027b = null;
                rVar.f8028c = null;
                rVar.f8032j = 9;
                if (d(context3, rVar) != aVar) {
                }
                break;
            case 9:
                AbstractC2467b.l(obj);
                return c3137a;
            case 10:
                J4.c cVar9 = rVar.f8029d;
                map2 = (Map) rVar.f8028c;
                Context context9 = rVar.f8027b;
                c0716s4 = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar5 = cVar9;
                context5 = context9;
                cVar5.invoke("Loading watchlist…");
                rVar.f8026a = c0716s4;
                rVar.f8027b = context5;
                rVar.f8028c = cVar5;
                rVar.f8029d = null;
                rVar.f8032j = 11;
                if (c0716s4.c(context5, map2, rVar) != aVar) {
                }
                return aVar;
            case 11:
                cVar4 = (J4.c) rVar.f8028c;
                context4 = rVar.f8027b;
                c0716s7 = rVar.f8026a;
                AbstractC2467b.l(obj);
                cVar4.invoke("Loading Trakt continue watching…");
                rVar.f8026a = c0716s7;
                rVar.f8027b = context4;
                rVar.f8028c = cVar4;
                rVar.f8032j = 12;
                c0716s7.getClass();
                c5.e eVar22 = V4.N.f8259a;
                objH2 = V4.E.H(c5.d.f13466b, new C0652e(context4, null), rVar);
                if (objH2 != aVar) {
                }
                if (objH2 != aVar) {
                }
                return aVar;
            case 12:
                cVar4 = (J4.c) rVar.f8028c;
                context4 = rVar.f8027b;
                c0716s7 = rVar.f8026a;
                AbstractC2467b.l(obj);
                c0716s7.getClass();
                f(context4, "startup_cached_trakt_cw_refresh");
                cVar4.invoke("Loading Trakt watchlist…");
                rVar.f8026a = null;
                rVar.f8027b = null;
                rVar.f8028c = null;
                rVar.f8032j = 13;
                if (d(context4, rVar) == aVar) {
                }
                break;
            case 13:
                AbstractC2467b.l(obj);
                return c3137a;
            default:
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }
}
