package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.fe, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1208fe implements EJ {
    public static final C1208fe a = new C1208fe();
    public static final GY b = new GY("kotlin.Boolean", DY.u);

    @Override // o.EJ
    public final Object a(Ua0 ua0) {
        boolean z;
        boolean z2;
        Ua0 ua02 = (Ua0) ua0.e;
        int iA = ua02.A();
        String str = (String) ua02.f;
        if (iA == str.length()) {
            Ua0.w(ua02, "EOF", 0, 6);
            throw null;
        }
        if (str.charAt(iA) == '\"') {
            iA++;
            z = true;
        } else {
            z = false;
        }
        int iZ = ua02.z(iA);
        if (iZ >= str.length() || iZ == -1) {
            Ua0.w(ua02, "EOF", 0, 6);
            throw null;
        }
        int i = iZ + 1;
        int iCharAt = str.charAt(iZ) | ' ';
        if (iCharAt == 102) {
            ua02.d(i, "alse");
            z2 = false;
        } else {
            if (iCharAt != 116) {
                Ua0.w(ua02, "Expected valid boolean literal prefix, but had '" + ua02.i() + '\'', 0, 6);
                throw null;
            }
            ua02.d(i, "rue");
            z2 = true;
        }
        if (z) {
            if (ua02.b == str.length()) {
                Ua0.w(ua02, "EOF", 0, 6);
                throw null;
            }
            if (str.charAt(ua02.b) != '\"') {
                Ua0.w(ua02, "Expected closing quotation mark", 0, 6);
                throw null;
            }
            ua02.b++;
        }
        return Boolean.valueOf(z2);
    }

    @Override // o.EJ
    public final void c(C0173Gr c0173Gr, Object obj) {
        boolean zBooleanValue = ((Boolean) obj).booleanValue();
        if (c0173Gr.a) {
            c0173Gr.l(String.valueOf(zBooleanValue));
        } else {
            ((C1254g2) ((C2160pe) c0173Gr.b).m).j(String.valueOf(zBooleanValue));
        }
    }

    @Override // o.EJ
    public final L60 d() {
        return b;
    }
}
