package R1;

import V.C0629x;
import androidx.datastore.preferences.protobuf.AbstractC1030t;
import androidx.datastore.preferences.protobuf.C1020i;
import androidx.datastore.preferences.protobuf.C1023l;
import androidx.datastore.preferences.protobuf.C1029s;
import androidx.datastore.preferences.protobuf.C1034x;
import androidx.datastore.preferences.protobuf.I;
import androidx.datastore.preferences.protobuf.S;
import androidx.datastore.preferences.protobuf.U;
import androidx.datastore.preferences.protobuf.W;
import androidx.datastore.preferences.protobuf.X;
import androidx.datastore.preferences.protobuf.g0;
import androidx.datastore.preferences.protobuf.r;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Map;
import m1.AbstractC2464a;

/* JADX INFO: loaded from: classes.dex */
public final class e extends AbstractC1030t {
    private static final e DEFAULT_INSTANCE;
    private static volatile S PARSER = null;
    public static final int PREFERENCES_FIELD_NUMBER = 1;
    private I preferences_ = I.f11315b;

    static {
        e eVar = new e();
        DEFAULT_INSTANCE = eVar;
        AbstractC1030t.j(e.class, eVar);
    }

    public static I l(e eVar) {
        I i6 = eVar.preferences_;
        if (!i6.f11316a) {
            eVar.preferences_ = i6.b();
        }
        return eVar.preferences_;
    }

    public static c n() {
        return (c) ((r) DEFAULT_INSTANCE.c(5));
    }

    public static e o(InputStream inputStream) {
        e eVar = DEFAULT_INSTANCE;
        C1020i c1020i = new C1020i(inputStream);
        C1023l c1023lA = C1023l.a();
        AbstractC1030t abstractC1030tI = eVar.i();
        try {
            U u6 = U.f11340c;
            u6.getClass();
            X xA = u6.a(abstractC1030tI.getClass());
            C0629x c0629x = (C0629x) c1020i.f1379b;
            if (c0629x == null) {
                c0629x = new C0629x(c1020i);
            }
            xA.f(abstractC1030tI, c0629x, c1023lA);
            xA.b(abstractC1030tI);
            if (AbstractC1030t.f(abstractC1030tI, true)) {
                return (e) abstractC1030tI;
            }
            throw new C1034x(new g0().getMessage());
        } catch (g0 e6) {
            throw new C1034x(e6.getMessage());
        } catch (C1034x e7) {
            if (e7.f11447a) {
                throw new C1034x(e7.getMessage(), e7);
            }
            throw e7;
        } catch (IOException e8) {
            if (e8.getCause() instanceof C1034x) {
                throw ((C1034x) e8.getCause());
            }
            throw new C1034x(e8.getMessage(), e8);
        } catch (RuntimeException e9) {
            if (e9.getCause() instanceof C1034x) {
                throw ((C1034x) e9.getCause());
            }
            throw e9;
        }
    }

    @Override // androidx.datastore.preferences.protobuf.AbstractC1030t
    public final Object c(int i6) {
        S c1029s;
        switch (AbstractC2464a.c(i6)) {
            case 0:
                return (byte) 1;
            case 1:
                return null;
            case 2:
                return new W(DEFAULT_INSTANCE, "\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u00012", new Object[]{"preferences_", d.f6044a});
            case 3:
                return new e();
            case 4:
                return new c(DEFAULT_INSTANCE);
            case 5:
                return DEFAULT_INSTANCE;
            case 6:
                S s6 = PARSER;
                if (s6 != null) {
                    return s6;
                }
                synchronized (e.class) {
                    try {
                        c1029s = PARSER;
                        if (c1029s == null) {
                            c1029s = new C1029s();
                            PARSER = c1029s;
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                    break;
                }
                return c1029s;
            default:
                throw new UnsupportedOperationException();
        }
    }

    public final Map m() {
        return Collections.unmodifiableMap(this.preferences_);
    }
}
