package e.a.q;

import com.seewo.libmcuservice.constant.ITVStateConstants;
import e.a.o.k;
import java.lang.annotation.Annotation;
import java.util.List;

/* JADX INFO: compiled from: ObjectSerializer.kt */
/* JADX INFO: loaded from: classes.dex */
@d.n
public final class x0<T> implements e.a.b<T> {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final T f2920a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private List<? extends Annotation> f2921b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final d.i f2922c;

    /* JADX INFO: compiled from: ObjectSerializer.kt */
    @d.n
    static final class a extends d.n0.c.t implements d.n0.b.a<e.a.o.f> {

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        final /* synthetic */ String f2923d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        final /* synthetic */ x0<T> f2924e;

        /* JADX INFO: renamed from: e.a.q.x0$a$a, reason: collision with other inner class name */
        /* JADX INFO: compiled from: ObjectSerializer.kt */
        @d.n
        static final class C0091a extends d.n0.c.t implements d.n0.b.l<e.a.o.a, d.g0> {

            /* JADX INFO: renamed from: d, reason: collision with root package name */
            final /* synthetic */ x0<T> f2925d;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0091a(x0<T> x0Var) {
                super(1);
                this.f2925d = x0Var;
            }

            public final void c(e.a.o.a aVar) {
                d.n0.c.s.e(aVar, "$this$buildSerialDescriptor");
                aVar.h(((x0) this.f2925d).f2921b);
            }

            @Override // d.n0.b.l
            public /* bridge */ /* synthetic */ d.g0 e(e.a.o.a aVar) {
                c(aVar);
                return d.g0.f2578a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(String str, x0<T> x0Var) {
            super(0);
            this.f2923d = str;
            this.f2924e = x0Var;
        }

        @Override // d.n0.b.a
        /* JADX INFO: renamed from: c, reason: merged with bridge method [inline-methods] */
        public final e.a.o.f a() {
            return e.a.o.i.c(this.f2923d, k.d.f2795a, new e.a.o.f[0], new C0091a(this.f2924e));
        }
    }

    public x0(String str, T t) {
        d.n0.c.s.e(str, "serialName");
        d.n0.c.s.e(t, "objectInstance");
        this.f2920a = t;
        this.f2921b = d.j0.p.d();
        this.f2922c = d.k.a(d.m.PUBLICATION, new a(str, this));
    }

    @Override // e.a.a
    public T deserialize(e.a.p.e eVar) {
        d.n0.c.s.e(eVar, "decoder");
        e.a.o.f descriptor = getDescriptor();
        e.a.p.c cVarC = eVar.c(descriptor);
        int iW = cVarC.w(getDescriptor());
        if (iW == -1) {
            d.g0 g0Var = d.g0.f2578a;
            cVarC.a(descriptor);
            return this.f2920a;
        }
        throw new e.a.i("Unexpected index " + iW);
    }

    @Override // e.a.b, e.a.j, e.a.a
    public e.a.o.f getDescriptor() {
        return (e.a.o.f) this.f2922c.getValue();
    }

    @Override // e.a.j
    public void serialize(e.a.p.f fVar, T t) {
        d.n0.c.s.e(fVar, "encoder");
        d.n0.c.s.e(t, ITVStateConstants.KEY_VOICE_VALUE);
        fVar.c(getDescriptor()).a(getDescriptor());
    }
}
