package e.a.r.y;

import com.seewo.libmcuservice.constant.ITVStateConstants;
import java.util.List;

/* JADX INFO: compiled from: TreeJsonDecoder.kt */
/* JADX INFO: loaded from: classes.dex */
@d.n
final class g0 extends e0 {
    private final e.a.r.t k;
    private final List<String> l;
    private final int m;
    private int n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public g0(e.a.r.a aVar, e.a.r.t tVar) {
        super(aVar, tVar, null, null, 12, null);
        d.n0.c.s.e(aVar, "json");
        d.n0.c.s.e(tVar, ITVStateConstants.KEY_VOICE_VALUE);
        this.k = tVar;
        List<String> listD = d.j0.x.D(r0().keySet());
        this.l = listD;
        this.m = listD.size() * 2;
        this.n = -1;
    }

    @Override // e.a.r.y.e0, e.a.q.v0
    protected String Z(e.a.o.f fVar, int i) {
        d.n0.c.s.e(fVar, "desc");
        return this.l.get(i / 2);
    }

    @Override // e.a.r.y.e0, e.a.r.y.c, e.a.p.c
    public void a(e.a.o.f fVar) {
        d.n0.c.s.e(fVar, "descriptor");
    }

    @Override // e.a.r.y.e0, e.a.r.y.c
    protected e.a.r.h d0(String str) {
        d.n0.c.s.e(str, "tag");
        return this.n % 2 == 0 ? e.a.r.i.c(str) : (e.a.r.h) d.j0.i0.f(r0(), str);
    }

    @Override // e.a.r.y.e0, e.a.r.y.c
    /* JADX INFO: renamed from: v0, reason: merged with bridge method [inline-methods] */
    public e.a.r.t r0() {
        return this.k;
    }

    @Override // e.a.r.y.e0, e.a.p.c
    public int w(e.a.o.f fVar) {
        d.n0.c.s.e(fVar, "descriptor");
        int i = this.n;
        if (i >= this.m - 1) {
            return -1;
        }
        int i2 = i + 1;
        this.n = i2;
        return i2;
    }
}
