package V2;

import android.content.Context;
import java.util.List;
import m3.AbstractC2467b;

/* JADX INFO: loaded from: classes.dex */
public final class I2 {
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final Object a(String str, C4.c cVar) {
        A2 a22;
        if (cVar instanceof A2) {
            a22 = (A2) cVar;
            int i6 = a22.f7257b;
            if ((i6 & Integer.MIN_VALUE) != 0) {
                a22.f7257b = i6 - Integer.MIN_VALUE;
            } else {
                a22 = new A2(cVar);
            }
        }
        Object objH = a22.f7256a;
        B4.a aVar = B4.a.f492a;
        int i7 = a22.f7257b;
        if (i7 == 0) {
            AbstractC2467b.l(objH);
            a22.f7257b = 1;
            c5.e eVar = V4.N.f8259a;
            objH = V4.E.H(c5.d.f13466b, new C0743y2(str, null), a22);
            if (objH != aVar) {
            }
        }
        if (i7 != 1) {
            if (i7 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(objH);
            return objH;
        }
        AbstractC2467b.l(objH);
        String str2 = (String) objH;
        if (str2 == null) {
            return x4.y.f26065a;
        }
        c5.e eVar2 = V4.N.f8259a;
        B2 b22 = new B2(str2, null);
        a22.f7257b = 2;
        Object objH2 = V4.E.H(eVar2, b22, a22);
        return objH2 == aVar ? aVar : objH2;
    }

    public static final List b(String str) {
        Object objD;
        String string;
        Context context = W.c.f8375h;
        String str2 = null;
        if (context != null) {
            try {
                objD = context.getSharedPreferences("debridstream_remote_map", 0).getString(str, null);
            } catch (Throwable th) {
                objD = AbstractC2467b.d(th);
            }
            if (objD instanceof w4.m) {
                objD = null;
            }
            String str3 = (String) objD;
            if (str3 != null && (string = S4.p.o1(str3).toString()) != null && string.length() > 0) {
                str2 = string;
            }
        }
        return str2 == null ? x4.y.f26065a : AbstractC0696m3.i(str2);
    }
}
