package V2;

import android.content.Context;
import java.util.concurrent.CancellationException;
import m3.AbstractC2467b;
import s2.SharedPreferencesC2907b;
import w4.C3137A;

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

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

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

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

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

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

    /* JADX WARN: Code restructure failed: missing block: B:19:0x0044, code lost:
    
        if (r7.H(r6) == r0) goto L20;
     */
    @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.f7784a;
        C3137A c3137a = C3137A.f25453a;
        Context context = this.f7785b;
        try {
        } catch (CancellationException e6) {
            throw e6;
        } catch (Exception unused) {
        }
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            kotlin.jvm.internal.o.e(context);
            i3.J j4 = new i3.J(context);
            this.f7784a = 1;
            if (j4.G(this) == aVar) {
            }
            return aVar;
        }
        if (i6 != 1) {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            Y4.c0 c0Var = z3.f8212a;
            kotlin.jvm.internal.o.e(context);
            if (kotlin.jvm.internal.o.c(z3.a(context), "main")) {
                Y4.c0 c0Var2 = C0706p0.f7996a;
                Context applicationContext = context.getApplicationContext();
                kotlin.jvm.internal.o.g(applicationContext, "getApplicationContext(...)");
                C0706p0.i(((SharedPreferencesC2907b) W.c.D(applicationContext)).getString("continue_watching_payload", null));
            }
            return c3137a;
        }
        AbstractC2467b.l(obj);
        kotlin.jvm.internal.o.e(context);
        i3.J j6 = new i3.J(context);
        this.f7784a = 2;
    }
}
