package f5;

import Z6.InterfaceC0382w;
import a5.C0405d;
import android.content.SharedPreferences;
import com.google.android.gms.internal.measurement.C1;
import e5.InterfaceC0882b;
import java.util.Arrays;

/* JADX INFO: renamed from: f5.E, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0928E extends G6.i implements O6.p {

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

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ C0929F f12723v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0928E(C0929F c0929f, E6.d dVar) {
        super(2, dVar);
        this.f12723v = c0929f;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((C0928E) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new C0928E(this.f12723v, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:47:0x0107, code lost:
    
        if (r11 == r1) goto L52;
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:0x0129, code lost:
    
        if (r11 == r1) goto L52;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objJ;
        F6.a aVar = F6.a.f2580q;
        int i = this.f12722u;
        if (i != 0) {
            if (i == 1) {
                C1.N(obj);
                return new X4.b(obj);
            }
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            return new X4.b(obj);
        }
        C1.N(obj);
        C0929F c0929f = this.f12723v;
        C0405d c0405d = c0929f.f12726c;
        String strN = g6.o.f12958a.N();
        P6.d dVarA = P6.n.a(String.class);
        boolean zEquals = dVarA.equals(P6.n.a(Float.TYPE));
        SharedPreferences sharedPreferences = c0405d.f7619a;
        Object string = "";
        if (zEquals) {
            string = (String) new Float(sharedPreferences.getFloat(strN, ((Float) "").floatValue()));
        } else if (dVarA.equals(P6.n.a(Integer.TYPE))) {
            string = (String) new Integer(sharedPreferences.getInt(strN, ((Integer) "").intValue()));
        } else if (dVarA.equals(P6.n.a(Long.TYPE))) {
            string = (String) new Long(sharedPreferences.getLong(strN, ((Long) "").longValue()));
        } else if (dVarA.equals(P6.n.a(String.class))) {
            string = sharedPreferences.getString(strN, "");
            if (string == null) {
                throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
            }
        } else if (dVarA.equals(P6.n.a(Boolean.TYPE))) {
            string = (String) Boolean.valueOf(sharedPreferences.getBoolean(strN, ((Boolean) "").booleanValue()));
        } else {
            String string2 = sharedPreferences.getString(strN, "");
            if (string2 != null && string2.length() != 0) {
                try {
                    objJ = c0405d.f7620b.a(String.class).a(string2);
                } catch (Throwable th) {
                    objJ = C1.j(th);
                }
                if (objJ instanceof A6.i) {
                    objJ = null;
                }
                if (objJ != null) {
                    string = objJ;
                }
            }
        }
        String str = (String) string;
        boolean zV = X6.e.V(str);
        InterfaceC0882b interfaceC0882b = c0929f.f12725b;
        if (zV) {
            String strI = g6.o.f12958a.i();
            this.f12722u = 1;
            obj = interfaceC0882b.a(strI, this);
        } else {
            String str2 = String.format(g6.o.f12958a.h(), Arrays.copyOf(new Object[]{str}, 1));
            this.f12722u = 2;
            obj = interfaceC0882b.a(str2, this);
        }
        return aVar;
    }
}
