package q3;

import i3.C0642j;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
import l3.g;
import p0.AbstractC0928a;

/* JADX INFO: renamed from: q3.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0956a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static C0956a f9564a;

    public static void a(C0957b c0957b) throws IOException {
        if (c0957b instanceof g) {
            g gVar = (g) c0957b;
            gVar.O(5);
            Map.Entry entry = (Map.Entry) ((Iterator) gVar.S()).next();
            gVar.U(entry.getValue());
            gVar.U(new C0642j((String) entry.getKey()));
            return;
        }
        int iH = c0957b.f9570r;
        if (iH == 0) {
            iH = c0957b.h();
        }
        if (iH == 13) {
            c0957b.f9570r = 9;
            return;
        }
        if (iH == 12) {
            c0957b.f9570r = 8;
        } else {
            if (iH == 14) {
                c0957b.f9570r = 10;
                return;
            }
            throw new IllegalStateException("Expected a name but was " + AbstractC0928a.A(c0957b.G()) + c0957b.v());
        }
    }
}
