package h.b.p.a0;

/* JADX INFO: compiled from: JsonTreeReader.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
@g.e0.j.a.e(c = "kotlinx.serialization.json.internal.JsonTreeReader$readDeepRecursive$1", f = "JsonTreeReader.kt", l = {112}, m = "invokeSuspend")
public final class u extends g.e0.j.a.h implements g.h0.b.q<g.b<g.a0, h.b.p.h>, g.a0, g.e0.d<? super h.b.p.h>, Object> {

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public /* synthetic */ Object f4536g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final /* synthetic */ w f4537h;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public u(w wVar, g.e0.d<? super u> dVar) {
        super(3, dVar);
        this.f4537h = wVar;
    }

    @Override // g.e0.j.a.a
    public final Object b(Object obj) throws Throwable {
        g.e0.i.a aVar = g.e0.i.a.COROUTINE_SUSPENDED;
        int i2 = this.f4535f;
        if (i2 == 0) {
            f.a.y.a.e1(obj);
            g.b bVar = (g.b) this.f4536g;
            byte bU = this.f4537h.a.u();
            if (bU == 1) {
                return this.f4537h.d(true);
            }
            if (bU == 0) {
                return this.f4537h.d(false);
            }
            if (bU != 6) {
                if (bU == 8) {
                    return this.f4537h.c();
                }
                a.q(this.f4537h.a, "Can't begin reading element, unexpected token", 0, null, 6, null);
                throw null;
            }
            w wVar = this.f4537h;
            this.f4535f = 1;
            obj = w.a(wVar, bVar, this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i2 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            f.a.y.a.e1(obj);
        }
        return (h.b.p.h) obj;
    }

    @Override // g.h0.b.q
    public Object invoke(g.b<g.a0, h.b.p.h> bVar, g.a0 a0Var, g.e0.d<? super h.b.p.h> dVar) {
        u uVar = new u(this.f4537h, dVar);
        uVar.f4536g = bVar;
        return uVar.b(g.a0.a);
    }
}
