package kotlin.reflect.w.internal.y0.g;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import kotlin.reflect.w.internal.y0.i.a;
import kotlin.reflect.w.internal.y0.i.c;
import kotlin.reflect.w.internal.y0.i.d;
import kotlin.reflect.w.internal.y0.i.e;
import kotlin.reflect.w.internal.y0.i.f;
import kotlin.reflect.w.internal.y0.i.h;
import kotlin.reflect.w.internal.y0.i.i;
import kotlin.reflect.w.internal.y0.i.j;
import kotlin.reflect.w.internal.y0.i.p;
import kotlin.reflect.w.internal.y0.i.q;
import kotlin.reflect.w.internal.y0.i.r;
import kotlin.reflect.w.internal.y0.i.v;

/* JADX INFO: loaded from: classes2.dex */
public final class b extends h implements q {

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final b f7655f;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static r<b> f7656m = new a();

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final kotlin.reflect.w.internal.y0.i.c f7657n;

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

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

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public List<C0146b> f7660q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public byte f7661r;

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

    public static class a extends kotlin.reflect.w.internal.y0.i.b<b> {
        @Override // kotlin.reflect.w.internal.y0.i.r
        public Object a(d dVar, f fVar) {
            return new b(dVar, fVar, null);
        }
    }

    public static final class c extends h.b<b, c> implements q {

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

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

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public List<C0146b> f7718o = Collections.emptyList();

        @Override // r.i0.w.b.y0.i.p.a
        public p a() {
            b bVarM = m();
            if (bVarM.i()) {
                return bVarM;
            }
            throw new v();
        }

        @Override // r.i0.w.b.y0.i.h.b
        public Object clone() {
            c cVar = new c();
            cVar.n(m());
            return cVar;
        }

        @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a, r.i0.w.b.y0.i.p.a
        public /* bridge */ /* synthetic */ p.a h(d dVar, f fVar) throws Throwable {
            o(dVar, fVar);
            return this;
        }

        @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a
        /* JADX INFO: renamed from: j */
        public /* bridge */ /* synthetic */ a.AbstractC0155a h(d dVar, f fVar) throws Throwable {
            o(dVar, fVar);
            return this;
        }

        @Override // r.i0.w.b.y0.i.h.b
        /* JADX INFO: renamed from: k */
        public h.b clone() {
            c cVar = new c();
            cVar.n(m());
            return cVar;
        }

        @Override // r.i0.w.b.y0.i.h.b
        public /* bridge */ /* synthetic */ h.b l(h hVar) {
            n((b) hVar);
            return this;
        }

        public b m() {
            b bVar = new b(this, null);
            int i2 = this.f7716m;
            int i3 = (i2 & 1) != 1 ? 0 : 1;
            bVar.f7659p = this.f7717n;
            if ((i2 & 2) == 2) {
                this.f7718o = Collections.unmodifiableList(this.f7718o);
                this.f7716m &= -3;
            }
            bVar.f7660q = this.f7718o;
            bVar.f7658o = i3;
            return bVar;
        }

        public c n(b bVar) {
            if (bVar == b.f7655f) {
                return this;
            }
            if ((bVar.f7658o & 1) == 1) {
                int i2 = bVar.f7659p;
                this.f7716m = 1 | this.f7716m;
                this.f7717n = i2;
            }
            if (!bVar.f7660q.isEmpty()) {
                if (this.f7718o.isEmpty()) {
                    this.f7718o = bVar.f7660q;
                    this.f7716m &= -3;
                } else {
                    if ((this.f7716m & 2) != 2) {
                        this.f7718o = new ArrayList(this.f7718o);
                        this.f7716m |= 2;
                    }
                    this.f7718o.addAll(bVar.f7660q);
                }
            }
            this.f8259f = this.f8259f.b(bVar.f7657n);
            return this;
        }

        /* JADX WARN: Removed duplicated region for block: B:15:0x001b  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public r.i0.w.b.y0.g.b.c o(kotlin.reflect.w.internal.y0.i.d r3, kotlin.reflect.w.internal.y0.i.f r4) throws java.lang.Throwable {
            /*
                r2 = this;
                r0 = 0
                r.i0.w.b.y0.i.r<r.i0.w.b.y0.g.b> r1 = kotlin.reflect.w.internal.y0.g.b.f7656m     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                java.lang.Object r3 = r1.a(r3, r4)     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                r.i0.w.b.y0.g.b r3 = (kotlin.reflect.w.internal.y0.g.b) r3     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                if (r3 == 0) goto Le
                r2.n(r3)
            Le:
                return r2
            Lf:
                r3 = move-exception
                goto L19
            L11:
                r3 = move-exception
                r.i0.w.b.y0.i.p r4 = r3.f8275f     // Catch: java.lang.Throwable -> Lf
                r.i0.w.b.y0.g.b r4 = (kotlin.reflect.w.internal.y0.g.b) r4     // Catch: java.lang.Throwable -> Lf
                throw r3     // Catch: java.lang.Throwable -> L17
            L17:
                r3 = move-exception
                r0 = r4
            L19:
                if (r0 == 0) goto L1e
                r2.n(r0)
            L1e:
                throw r3
            */
            throw new UnsupportedOperationException("Method not decompiled: r.i0.w.b.y0.g.b.c.o(r.i0.w.b.y0.i.d, r.i0.w.b.y0.i.f):r.i0.w.b.y0.g.b$c");
        }
    }

    static {
        b bVar = new b();
        f7655f = bVar;
        bVar.f7659p = 0;
        bVar.f7660q = Collections.emptyList();
    }

    public b() {
        this.f7661r = (byte) -1;
        this.f7662s = -1;
        this.f7657n = kotlin.reflect.w.internal.y0.i.c.f8234f;
    }

    public b(d dVar, f fVar, kotlin.reflect.w.internal.y0.g.a aVar) {
        this.f7661r = (byte) -1;
        this.f7662s = -1;
        boolean z2 = false;
        this.f7659p = 0;
        this.f7660q = Collections.emptyList();
        c.b bVarN = kotlin.reflect.w.internal.y0.i.c.n();
        e eVarK = e.k(bVarN, 1);
        int i2 = 0;
        while (!z2) {
            try {
                try {
                    try {
                        int iO = dVar.o();
                        if (iO != 0) {
                            if (iO == 8) {
                                this.f7658o |= 1;
                                this.f7659p = dVar.l();
                            } else if (iO == 18) {
                                if ((i2 & 2) != 2) {
                                    this.f7660q = new ArrayList();
                                    i2 |= 2;
                                }
                                this.f7660q.add((C0146b) dVar.h(C0146b.f7664m, fVar));
                            } else if (!dVar.r(iO, eVarK)) {
                            }
                        }
                        z2 = true;
                    } catch (j e2) {
                        e2.f8275f = this;
                        throw e2;
                    }
                } catch (IOException e3) {
                    j jVar = new j(e3.getMessage());
                    jVar.f8275f = this;
                    throw jVar;
                }
            } catch (Throwable th) {
                if ((i2 & 2) == 2) {
                    this.f7660q = Collections.unmodifiableList(this.f7660q);
                }
                try {
                    eVarK.j();
                } catch (IOException unused) {
                } catch (Throwable th2) {
                    this.f7657n = bVarN.d();
                    throw th2;
                }
                this.f7657n = bVarN.d();
                throw th;
            }
        }
        if ((i2 & 2) == 2) {
            this.f7660q = Collections.unmodifiableList(this.f7660q);
        }
        try {
            eVarK.j();
        } catch (IOException unused2) {
        } catch (Throwable th3) {
            this.f7657n = bVarN.d();
            throw th3;
        }
        this.f7657n = bVarN.d();
    }

    @Override // kotlin.reflect.w.internal.y0.i.p
    public p.a c() {
        c cVar = new c();
        cVar.n(this);
        return cVar;
    }

    @Override // kotlin.reflect.w.internal.y0.i.p
    public void d(e eVar) throws IOException {
        f();
        if ((this.f7658o & 1) == 1) {
            eVar.p(1, this.f7659p);
        }
        for (int i2 = 0; i2 < this.f7660q.size(); i2++) {
            eVar.r(2, this.f7660q.get(i2));
        }
        eVar.u(this.f7657n);
    }

    @Override // kotlin.reflect.w.internal.y0.i.p
    public int f() {
        int i2 = this.f7662s;
        if (i2 != -1) {
            return i2;
        }
        int iC = (this.f7658o & 1) == 1 ? e.c(1, this.f7659p) + 0 : 0;
        for (int i3 = 0; i3 < this.f7660q.size(); i3++) {
            iC += e.e(2, this.f7660q.get(i3));
        }
        int size = this.f7657n.size() + iC;
        this.f7662s = size;
        return size;
    }

    @Override // kotlin.reflect.w.internal.y0.i.p
    public p.a g() {
        return new c();
    }

    @Override // kotlin.reflect.w.internal.y0.i.q
    public final boolean i() {
        byte b2 = this.f7661r;
        if (b2 == 1) {
            return true;
        }
        if (b2 == 0) {
            return false;
        }
        if (!((this.f7658o & 1) == 1)) {
            this.f7661r = (byte) 0;
            return false;
        }
        for (int i2 = 0; i2 < this.f7660q.size(); i2++) {
            if (!this.f7660q.get(i2).i()) {
                this.f7661r = (byte) 0;
                return false;
            }
        }
        this.f7661r = (byte) 1;
        return true;
    }

    public b(h.b bVar, kotlin.reflect.w.internal.y0.g.a aVar) {
        super(bVar);
        this.f7661r = (byte) -1;
        this.f7662s = -1;
        this.f7657n = bVar.f8259f;
    }

    /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b, reason: collision with other inner class name */
    public static final class C0146b extends h implements q {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public static final C0146b f7663f;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public static r<C0146b> f7664m = new a();

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public final kotlin.reflect.w.internal.y0.i.c f7665n;

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

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

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public c f7668q;

        /* JADX INFO: renamed from: r, reason: collision with root package name */
        public byte f7669r;

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

        /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$a */
        public static class a extends kotlin.reflect.w.internal.y0.i.b<C0146b> {
            @Override // kotlin.reflect.w.internal.y0.i.r
            public Object a(d dVar, f fVar) {
                return new C0146b(dVar, fVar, null);
            }
        }

        /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$b, reason: collision with other inner class name */
        public static final class C0147b extends h.b<C0146b, C0147b> implements q {

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

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

            /* JADX INFO: renamed from: o, reason: collision with root package name */
            public c f7673o = c.f7674f;

            @Override // r.i0.w.b.y0.i.p.a
            public p a() {
                C0146b c0146bM = m();
                if (c0146bM.i()) {
                    return c0146bM;
                }
                throw new v();
            }

            @Override // r.i0.w.b.y0.i.h.b
            public Object clone() {
                C0147b c0147b = new C0147b();
                c0147b.n(m());
                return c0147b;
            }

            @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a, r.i0.w.b.y0.i.p.a
            public /* bridge */ /* synthetic */ p.a h(d dVar, f fVar) throws Throwable {
                o(dVar, fVar);
                return this;
            }

            @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a
            /* JADX INFO: renamed from: j */
            public /* bridge */ /* synthetic */ a.AbstractC0155a h(d dVar, f fVar) throws Throwable {
                o(dVar, fVar);
                return this;
            }

            @Override // r.i0.w.b.y0.i.h.b
            /* JADX INFO: renamed from: k */
            public h.b clone() {
                C0147b c0147b = new C0147b();
                c0147b.n(m());
                return c0147b;
            }

            @Override // r.i0.w.b.y0.i.h.b
            public /* bridge */ /* synthetic */ h.b l(h hVar) {
                n((C0146b) hVar);
                return this;
            }

            public C0146b m() {
                C0146b c0146b = new C0146b(this, null);
                int i2 = this.f7671m;
                int i3 = (i2 & 1) != 1 ? 0 : 1;
                c0146b.f7667p = this.f7672n;
                if ((i2 & 2) == 2) {
                    i3 |= 2;
                }
                c0146b.f7668q = this.f7673o;
                c0146b.f7666o = i3;
                return c0146b;
            }

            public C0147b n(C0146b c0146b) {
                c cVar;
                if (c0146b == C0146b.f7663f) {
                    return this;
                }
                int i2 = c0146b.f7666o;
                if ((i2 & 1) == 1) {
                    int i3 = c0146b.f7667p;
                    this.f7671m |= 1;
                    this.f7672n = i3;
                }
                if ((i2 & 2) == 2) {
                    c cVarM = c0146b.f7668q;
                    if ((this.f7671m & 2) == 2 && (cVar = this.f7673o) != c.f7674f) {
                        c.C0148b c0148b = new c.C0148b();
                        c0148b.n(cVar);
                        c0148b.n(cVarM);
                        cVarM = c0148b.m();
                    }
                    this.f7673o = cVarM;
                    this.f7671m |= 2;
                }
                this.f8259f = this.f8259f.b(c0146b.f7665n);
                return this;
            }

            /* JADX WARN: Removed duplicated region for block: B:15:0x001b  */
            /*
                Code decompiled incorrectly, please refer to instructions dump.
                To view partially-correct add '--show-bad-code' argument
            */
            public kotlin.reflect.w.internal.y0.g.b.C0146b.C0147b o(kotlin.reflect.w.internal.y0.i.d r3, kotlin.reflect.w.internal.y0.i.f r4) throws java.lang.Throwable {
                /*
                    r2 = this;
                    r0 = 0
                    r.i0.w.b.y0.i.r<r.i0.w.b.y0.g.b$b> r1 = kotlin.reflect.w.internal.y0.g.b.C0146b.f7664m     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                    java.lang.Object r3 = r1.a(r3, r4)     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                    r.i0.w.b.y0.g.b$b r3 = (kotlin.reflect.w.internal.y0.g.b.C0146b) r3     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                    if (r3 == 0) goto Le
                    r2.n(r3)
                Le:
                    return r2
                Lf:
                    r3 = move-exception
                    goto L19
                L11:
                    r3 = move-exception
                    r.i0.w.b.y0.i.p r4 = r3.f8275f     // Catch: java.lang.Throwable -> Lf
                    r.i0.w.b.y0.g.b$b r4 = (kotlin.reflect.w.internal.y0.g.b.C0146b) r4     // Catch: java.lang.Throwable -> Lf
                    throw r3     // Catch: java.lang.Throwable -> L17
                L17:
                    r3 = move-exception
                    r0 = r4
                L19:
                    if (r0 == 0) goto L1e
                    r2.n(r0)
                L1e:
                    throw r3
                */
                throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.w.internal.y0.g.b.C0146b.C0147b.o(r.i0.w.b.y0.i.d, r.i0.w.b.y0.i.f):r.i0.w.b.y0.g.b$b$b");
            }
        }

        static {
            C0146b c0146b = new C0146b();
            f7663f = c0146b;
            c0146b.f7667p = 0;
            c0146b.f7668q = c.f7674f;
        }

        public C0146b() {
            this.f7669r = (byte) -1;
            this.f7670s = -1;
            this.f7665n = kotlin.reflect.w.internal.y0.i.c.f8234f;
        }

        public C0146b(d dVar, f fVar, kotlin.reflect.w.internal.y0.g.a aVar) {
            this.f7669r = (byte) -1;
            this.f7670s = -1;
            boolean z2 = false;
            this.f7667p = 0;
            this.f7668q = c.f7674f;
            c.b bVarN = kotlin.reflect.w.internal.y0.i.c.n();
            e eVarK = e.k(bVarN, 1);
            while (!z2) {
                try {
                    try {
                        int iO = dVar.o();
                        if (iO != 0) {
                            if (iO == 8) {
                                this.f7666o |= 1;
                                this.f7667p = dVar.l();
                            } else if (iO == 18) {
                                c.C0148b c0148b = null;
                                if ((this.f7666o & 2) == 2) {
                                    c cVar = this.f7668q;
                                    Objects.requireNonNull(cVar);
                                    c.C0148b c0148b2 = new c.C0148b();
                                    c0148b2.n(cVar);
                                    c0148b = c0148b2;
                                }
                                c cVar2 = (c) dVar.h(c.f7675m, fVar);
                                this.f7668q = cVar2;
                                if (c0148b != null) {
                                    c0148b.n(cVar2);
                                    this.f7668q = c0148b.m();
                                }
                                this.f7666o |= 2;
                            } else if (!dVar.r(iO, eVarK)) {
                            }
                        }
                        z2 = true;
                    } catch (j e2) {
                        e2.f8275f = this;
                        throw e2;
                    } catch (IOException e3) {
                        j jVar = new j(e3.getMessage());
                        jVar.f8275f = this;
                        throw jVar;
                    }
                } catch (Throwable th) {
                    try {
                        eVarK.j();
                    } catch (IOException unused) {
                    } catch (Throwable th2) {
                        this.f7665n = bVarN.d();
                        throw th2;
                    }
                    this.f7665n = bVarN.d();
                    throw th;
                }
            }
            try {
                eVarK.j();
            } catch (IOException unused2) {
            } catch (Throwable th3) {
                this.f7665n = bVarN.d();
                throw th3;
            }
            this.f7665n = bVarN.d();
        }

        @Override // kotlin.reflect.w.internal.y0.i.p
        public p.a c() {
            C0147b c0147b = new C0147b();
            c0147b.n(this);
            return c0147b;
        }

        @Override // kotlin.reflect.w.internal.y0.i.p
        public void d(e eVar) throws IOException {
            f();
            if ((this.f7666o & 1) == 1) {
                eVar.p(1, this.f7667p);
            }
            if ((this.f7666o & 2) == 2) {
                eVar.r(2, this.f7668q);
            }
            eVar.u(this.f7665n);
        }

        @Override // kotlin.reflect.w.internal.y0.i.p
        public int f() {
            int i2 = this.f7670s;
            if (i2 != -1) {
                return i2;
            }
            int iC = (this.f7666o & 1) == 1 ? 0 + e.c(1, this.f7667p) : 0;
            if ((this.f7666o & 2) == 2) {
                iC += e.e(2, this.f7668q);
            }
            int size = this.f7665n.size() + iC;
            this.f7670s = size;
            return size;
        }

        @Override // kotlin.reflect.w.internal.y0.i.p
        public p.a g() {
            return new C0147b();
        }

        @Override // kotlin.reflect.w.internal.y0.i.q
        public final boolean i() {
            byte b2 = this.f7669r;
            if (b2 == 1) {
                return true;
            }
            if (b2 == 0) {
                return false;
            }
            int i2 = this.f7666o;
            if (!((i2 & 1) == 1)) {
                this.f7669r = (byte) 0;
                return false;
            }
            if (!((i2 & 2) == 2)) {
                this.f7669r = (byte) 0;
                return false;
            }
            if (this.f7668q.i()) {
                this.f7669r = (byte) 1;
                return true;
            }
            this.f7669r = (byte) 0;
            return false;
        }

        public C0146b(h.b bVar, kotlin.reflect.w.internal.y0.g.a aVar) {
            super(bVar);
            this.f7669r = (byte) -1;
            this.f7670s = -1;
            this.f7665n = bVar.f8259f;
        }

        /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$c */
        public static final class c extends h implements q {

            /* JADX INFO: renamed from: f, reason: collision with root package name */
            public static final c f7674f;

            /* JADX INFO: renamed from: m, reason: collision with root package name */
            public static r<c> f7675m = new a();
            public byte A;
            public int B;

            /* JADX INFO: renamed from: n, reason: collision with root package name */
            public final kotlin.reflect.w.internal.y0.i.c f7676n;

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

            /* JADX INFO: renamed from: p, reason: collision with root package name */
            public EnumC0149c f7678p;

            /* JADX INFO: renamed from: q, reason: collision with root package name */
            public long f7679q;

            /* JADX INFO: renamed from: r, reason: collision with root package name */
            public float f7680r;

            /* JADX INFO: renamed from: s, reason: collision with root package name */
            public double f7681s;

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

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

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

            /* JADX INFO: renamed from: w, reason: collision with root package name */
            public b f7685w;

            /* JADX INFO: renamed from: x, reason: collision with root package name */
            public List<c> f7686x;

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

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

            /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$c$a */
            public static class a extends kotlin.reflect.w.internal.y0.i.b<c> {
                @Override // kotlin.reflect.w.internal.y0.i.r
                public Object a(d dVar, f fVar) {
                    return new c(dVar, fVar, null);
                }
            }

            /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$c$b, reason: collision with other inner class name */
            public static final class C0148b extends h.b<c, C0148b> implements q {

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

                /* JADX INFO: renamed from: o, reason: collision with root package name */
                public long f7691o;

                /* JADX INFO: renamed from: p, reason: collision with root package name */
                public float f7692p;

                /* JADX INFO: renamed from: q, reason: collision with root package name */
                public double f7693q;

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

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

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

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

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

                /* JADX INFO: renamed from: n, reason: collision with root package name */
                public EnumC0149c f7690n = EnumC0149c.BYTE;

                /* JADX INFO: renamed from: u, reason: collision with root package name */
                public b f7697u = b.f7655f;

                /* JADX INFO: renamed from: v, reason: collision with root package name */
                public List<c> f7698v = Collections.emptyList();

                @Override // r.i0.w.b.y0.i.p.a
                public p a() {
                    c cVarM = m();
                    if (cVarM.i()) {
                        return cVarM;
                    }
                    throw new v();
                }

                @Override // r.i0.w.b.y0.i.h.b
                public Object clone() {
                    C0148b c0148b = new C0148b();
                    c0148b.n(m());
                    return c0148b;
                }

                @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a, r.i0.w.b.y0.i.p.a
                public /* bridge */ /* synthetic */ p.a h(d dVar, f fVar) throws Throwable {
                    o(dVar, fVar);
                    return this;
                }

                @Override // kotlin.reflect.w.internal.y0.i.a.AbstractC0155a
                /* JADX INFO: renamed from: j */
                public /* bridge */ /* synthetic */ a.AbstractC0155a h(d dVar, f fVar) throws Throwable {
                    o(dVar, fVar);
                    return this;
                }

                @Override // r.i0.w.b.y0.i.h.b
                /* JADX INFO: renamed from: k */
                public h.b clone() {
                    C0148b c0148b = new C0148b();
                    c0148b.n(m());
                    return c0148b;
                }

                @Override // r.i0.w.b.y0.i.h.b
                public /* bridge */ /* synthetic */ h.b l(h hVar) {
                    n((c) hVar);
                    return this;
                }

                public c m() {
                    c cVar = new c(this, null);
                    int i2 = this.f7689m;
                    int i3 = (i2 & 1) != 1 ? 0 : 1;
                    cVar.f7678p = this.f7690n;
                    if ((i2 & 2) == 2) {
                        i3 |= 2;
                    }
                    cVar.f7679q = this.f7691o;
                    if ((i2 & 4) == 4) {
                        i3 |= 4;
                    }
                    cVar.f7680r = this.f7692p;
                    if ((i2 & 8) == 8) {
                        i3 |= 8;
                    }
                    cVar.f7681s = this.f7693q;
                    if ((i2 & 16) == 16) {
                        i3 |= 16;
                    }
                    cVar.f7682t = this.f7694r;
                    if ((i2 & 32) == 32) {
                        i3 |= 32;
                    }
                    cVar.f7683u = this.f7695s;
                    if ((i2 & 64) == 64) {
                        i3 |= 64;
                    }
                    cVar.f7684v = this.f7696t;
                    if ((i2 & 128) == 128) {
                        i3 |= 128;
                    }
                    cVar.f7685w = this.f7697u;
                    if ((i2 & 256) == 256) {
                        this.f7698v = Collections.unmodifiableList(this.f7698v);
                        this.f7689m &= -257;
                    }
                    cVar.f7686x = this.f7698v;
                    if ((i2 & 512) == 512) {
                        i3 |= 256;
                    }
                    cVar.f7687y = this.f7699w;
                    if ((i2 & 1024) == 1024) {
                        i3 |= 512;
                    }
                    cVar.f7688z = this.f7700x;
                    cVar.f7677o = i3;
                    return cVar;
                }

                public C0148b n(c cVar) {
                    b bVar;
                    if (cVar == c.f7674f) {
                        return this;
                    }
                    if ((cVar.f7677o & 1) == 1) {
                        EnumC0149c enumC0149c = cVar.f7678p;
                        Objects.requireNonNull(enumC0149c);
                        this.f7689m |= 1;
                        this.f7690n = enumC0149c;
                    }
                    int i2 = cVar.f7677o;
                    if ((i2 & 2) == 2) {
                        long j2 = cVar.f7679q;
                        this.f7689m |= 2;
                        this.f7691o = j2;
                    }
                    if ((i2 & 4) == 4) {
                        float f2 = cVar.f7680r;
                        this.f7689m = 4 | this.f7689m;
                        this.f7692p = f2;
                    }
                    if ((i2 & 8) == 8) {
                        double d2 = cVar.f7681s;
                        this.f7689m |= 8;
                        this.f7693q = d2;
                    }
                    if ((i2 & 16) == 16) {
                        int i3 = cVar.f7682t;
                        this.f7689m = 16 | this.f7689m;
                        this.f7694r = i3;
                    }
                    if ((i2 & 32) == 32) {
                        int i4 = cVar.f7683u;
                        this.f7689m = 32 | this.f7689m;
                        this.f7695s = i4;
                    }
                    if ((i2 & 64) == 64) {
                        int i5 = cVar.f7684v;
                        this.f7689m = 64 | this.f7689m;
                        this.f7696t = i5;
                    }
                    if ((i2 & 128) == 128) {
                        b bVarM = cVar.f7685w;
                        if ((this.f7689m & 128) == 128 && (bVar = this.f7697u) != b.f7655f) {
                            c cVar2 = new c();
                            cVar2.n(bVar);
                            cVar2.n(bVarM);
                            bVarM = cVar2.m();
                        }
                        this.f7697u = bVarM;
                        this.f7689m |= 128;
                    }
                    if (!cVar.f7686x.isEmpty()) {
                        if (this.f7698v.isEmpty()) {
                            this.f7698v = cVar.f7686x;
                            this.f7689m &= -257;
                        } else {
                            if ((this.f7689m & 256) != 256) {
                                this.f7698v = new ArrayList(this.f7698v);
                                this.f7689m |= 256;
                            }
                            this.f7698v.addAll(cVar.f7686x);
                        }
                    }
                    int i6 = cVar.f7677o;
                    if ((i6 & 256) == 256) {
                        int i7 = cVar.f7687y;
                        this.f7689m |= 512;
                        this.f7699w = i7;
                    }
                    if ((i6 & 512) == 512) {
                        int i8 = cVar.f7688z;
                        this.f7689m |= 1024;
                        this.f7700x = i8;
                    }
                    this.f8259f = this.f8259f.b(cVar.f7676n);
                    return this;
                }

                /* JADX WARN: Removed duplicated region for block: B:15:0x001b  */
                /*
                    Code decompiled incorrectly, please refer to instructions dump.
                    To view partially-correct add '--show-bad-code' argument
                */
                public kotlin.reflect.w.internal.y0.g.b.C0146b.c.C0148b o(kotlin.reflect.w.internal.y0.i.d r3, kotlin.reflect.w.internal.y0.i.f r4) throws java.lang.Throwable {
                    /*
                        r2 = this;
                        r0 = 0
                        r.i0.w.b.y0.i.r<r.i0.w.b.y0.g.b$b$c> r1 = kotlin.reflect.w.internal.y0.g.b.C0146b.c.f7675m     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                        java.lang.Object r3 = r1.a(r3, r4)     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                        r.i0.w.b.y0.g.b$b$c r3 = (kotlin.reflect.w.internal.y0.g.b.C0146b.c) r3     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                        if (r3 == 0) goto Le
                        r2.n(r3)
                    Le:
                        return r2
                    Lf:
                        r3 = move-exception
                        goto L19
                    L11:
                        r3 = move-exception
                        r.i0.w.b.y0.i.p r4 = r3.f8275f     // Catch: java.lang.Throwable -> Lf
                        r.i0.w.b.y0.g.b$b$c r4 = (kotlin.reflect.w.internal.y0.g.b.C0146b.c) r4     // Catch: java.lang.Throwable -> Lf
                        throw r3     // Catch: java.lang.Throwable -> L17
                    L17:
                        r3 = move-exception
                        r0 = r4
                    L19:
                        if (r0 == 0) goto L1e
                        r2.n(r0)
                    L1e:
                        throw r3
                    */
                    throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.w.internal.y0.g.b.C0146b.c.C0148b.o(r.i0.w.b.y0.i.d, r.i0.w.b.y0.i.f):r.i0.w.b.y0.g.b$b$c$b");
                }
            }

            /* JADX INFO: renamed from: r.i0.w.b.y0.g.b$b$c$c, reason: collision with other inner class name */
            public enum EnumC0149c implements i.a {
                BYTE(0),
                CHAR(1),
                SHORT(2),
                INT(3),
                LONG(4),
                FLOAT(5),
                DOUBLE(6),
                BOOLEAN(7),
                STRING(8),
                CLASS(9),
                ENUM(10),
                ANNOTATION(11),
                ARRAY(12);


                /* JADX INFO: renamed from: z, reason: collision with root package name */
                public final int f7715z;

                EnumC0149c(int i2) {
                    this.f7715z = i2;
                }

                public static EnumC0149c b(int i2) {
                    switch (i2) {
                        case 0:
                            return BYTE;
                        case 1:
                            return CHAR;
                        case 2:
                            return SHORT;
                        case 3:
                            return INT;
                        case 4:
                            return LONG;
                        case 5:
                            return FLOAT;
                        case 6:
                            return DOUBLE;
                        case 7:
                            return BOOLEAN;
                        case 8:
                            return STRING;
                        case 9:
                            return CLASS;
                        case 10:
                            return ENUM;
                        case 11:
                            return ANNOTATION;
                        case 12:
                            return ARRAY;
                        default:
                            return null;
                    }
                }

                @Override // r.i0.w.b.y0.i.i.a
                public final int a() {
                    return this.f7715z;
                }
            }

            static {
                c cVar = new c();
                f7674f = cVar;
                cVar.k();
            }

            public c() {
                this.A = (byte) -1;
                this.B = -1;
                this.f7676n = kotlin.reflect.w.internal.y0.i.c.f8234f;
            }

            public c(d dVar, f fVar, kotlin.reflect.w.internal.y0.g.a aVar) {
                this.A = (byte) -1;
                this.B = -1;
                k();
                c.b bVarN = kotlin.reflect.w.internal.y0.i.c.n();
                e eVarK = e.k(bVarN, 1);
                boolean z2 = false;
                int i2 = 0;
                while (!z2) {
                    try {
                        try {
                            int iO = dVar.o();
                            switch (iO) {
                                case 0:
                                    z2 = true;
                                    break;
                                case 8:
                                    int iL = dVar.l();
                                    EnumC0149c enumC0149cB = EnumC0149c.b(iL);
                                    if (enumC0149cB == null) {
                                        eVarK.y(iO);
                                        eVarK.y(iL);
                                    } else {
                                        this.f7677o |= 1;
                                        this.f7678p = enumC0149cB;
                                    }
                                    break;
                                case 16:
                                    this.f7677o |= 2;
                                    long jM = dVar.m();
                                    this.f7679q = (-(jM & 1)) ^ (jM >>> 1);
                                    break;
                                case 29:
                                    this.f7677o |= 4;
                                    this.f7680r = Float.intBitsToFloat(dVar.j());
                                    break;
                                case 33:
                                    this.f7677o |= 8;
                                    this.f7681s = Double.longBitsToDouble(dVar.k());
                                    break;
                                case 40:
                                    this.f7677o |= 16;
                                    this.f7682t = dVar.l();
                                    break;
                                case 48:
                                    this.f7677o |= 32;
                                    this.f7683u = dVar.l();
                                    break;
                                case 56:
                                    this.f7677o |= 64;
                                    this.f7684v = dVar.l();
                                    break;
                                case 66:
                                    c cVar = null;
                                    if ((this.f7677o & 128) == 128) {
                                        b bVar = this.f7685w;
                                        Objects.requireNonNull(bVar);
                                        c cVar2 = new c();
                                        cVar2.n(bVar);
                                        cVar = cVar2;
                                    }
                                    b bVar2 = (b) dVar.h(b.f7656m, fVar);
                                    this.f7685w = bVar2;
                                    if (cVar != null) {
                                        cVar.n(bVar2);
                                        this.f7685w = cVar.m();
                                    }
                                    this.f7677o |= 128;
                                    break;
                                case 74:
                                    if ((i2 & 256) != 256) {
                                        this.f7686x = new ArrayList();
                                        i2 |= 256;
                                    }
                                    this.f7686x.add((c) dVar.h(f7675m, fVar));
                                    break;
                                case 80:
                                    this.f7677o |= 512;
                                    this.f7688z = dVar.l();
                                    break;
                                case 88:
                                    this.f7677o |= 256;
                                    this.f7687y = dVar.l();
                                    break;
                                default:
                                    if (!dVar.r(iO, eVarK)) {
                                        z2 = true;
                                    }
                                    break;
                            }
                        } catch (Throwable th) {
                            if ((i2 & 256) == 256) {
                                this.f7686x = Collections.unmodifiableList(this.f7686x);
                            }
                            try {
                                eVarK.j();
                            } catch (IOException unused) {
                            } catch (Throwable th2) {
                                this.f7676n = bVarN.d();
                                throw th2;
                            }
                            this.f7676n = bVarN.d();
                            throw th;
                        }
                    } catch (j e2) {
                        e2.f8275f = this;
                        throw e2;
                    } catch (IOException e3) {
                        j jVar = new j(e3.getMessage());
                        jVar.f8275f = this;
                        throw jVar;
                    }
                }
                if ((i2 & 256) == 256) {
                    this.f7686x = Collections.unmodifiableList(this.f7686x);
                }
                try {
                    eVarK.j();
                } catch (IOException unused2) {
                } catch (Throwable th3) {
                    this.f7676n = bVarN.d();
                    throw th3;
                }
                this.f7676n = bVarN.d();
            }

            @Override // kotlin.reflect.w.internal.y0.i.p
            public p.a c() {
                C0148b c0148b = new C0148b();
                c0148b.n(this);
                return c0148b;
            }

            @Override // kotlin.reflect.w.internal.y0.i.p
            public void d(e eVar) throws IOException {
                f();
                if ((this.f7677o & 1) == 1) {
                    eVar.n(1, this.f7678p.f7715z);
                }
                if ((this.f7677o & 2) == 2) {
                    long j2 = this.f7679q;
                    eVar.y(16);
                    eVar.z((j2 << 1) ^ (j2 >> 63));
                }
                if ((this.f7677o & 4) == 4) {
                    float f2 = this.f7680r;
                    eVar.y(29);
                    eVar.w(Float.floatToRawIntBits(f2));
                }
                if ((this.f7677o & 8) == 8) {
                    double d2 = this.f7681s;
                    eVar.y(33);
                    eVar.x(Double.doubleToRawLongBits(d2));
                }
                if ((this.f7677o & 16) == 16) {
                    eVar.p(5, this.f7682t);
                }
                if ((this.f7677o & 32) == 32) {
                    eVar.p(6, this.f7683u);
                }
                if ((this.f7677o & 64) == 64) {
                    eVar.p(7, this.f7684v);
                }
                if ((this.f7677o & 128) == 128) {
                    eVar.r(8, this.f7685w);
                }
                for (int i2 = 0; i2 < this.f7686x.size(); i2++) {
                    eVar.r(9, this.f7686x.get(i2));
                }
                if ((this.f7677o & 512) == 512) {
                    eVar.p(10, this.f7688z);
                }
                if ((this.f7677o & 256) == 256) {
                    eVar.p(11, this.f7687y);
                }
                eVar.u(this.f7676n);
            }

            @Override // kotlin.reflect.w.internal.y0.i.p
            public int f() {
                int i2 = this.B;
                if (i2 != -1) {
                    return i2;
                }
                int iB = (this.f7677o & 1) == 1 ? e.b(1, this.f7678p.f7715z) + 0 : 0;
                if ((this.f7677o & 2) == 2) {
                    long j2 = this.f7679q;
                    iB += e.h((j2 >> 63) ^ (j2 << 1)) + e.i(2);
                }
                if ((this.f7677o & 4) == 4) {
                    iB += e.i(3) + 4;
                }
                if ((this.f7677o & 8) == 8) {
                    iB += e.i(4) + 8;
                }
                if ((this.f7677o & 16) == 16) {
                    iB += e.c(5, this.f7682t);
                }
                if ((this.f7677o & 32) == 32) {
                    iB += e.c(6, this.f7683u);
                }
                if ((this.f7677o & 64) == 64) {
                    iB += e.c(7, this.f7684v);
                }
                if ((this.f7677o & 128) == 128) {
                    iB += e.e(8, this.f7685w);
                }
                for (int i3 = 0; i3 < this.f7686x.size(); i3++) {
                    iB += e.e(9, this.f7686x.get(i3));
                }
                if ((this.f7677o & 512) == 512) {
                    iB += e.c(10, this.f7688z);
                }
                if ((this.f7677o & 256) == 256) {
                    iB += e.c(11, this.f7687y);
                }
                int size = this.f7676n.size() + iB;
                this.B = size;
                return size;
            }

            @Override // kotlin.reflect.w.internal.y0.i.p
            public p.a g() {
                return new C0148b();
            }

            @Override // kotlin.reflect.w.internal.y0.i.q
            public final boolean i() {
                byte b2 = this.A;
                if (b2 == 1) {
                    return true;
                }
                if (b2 == 0) {
                    return false;
                }
                if (((this.f7677o & 128) == 128) && !this.f7685w.i()) {
                    this.A = (byte) 0;
                    return false;
                }
                for (int i2 = 0; i2 < this.f7686x.size(); i2++) {
                    if (!this.f7686x.get(i2).i()) {
                        this.A = (byte) 0;
                        return false;
                    }
                }
                this.A = (byte) 1;
                return true;
            }

            public final void k() {
                this.f7678p = EnumC0149c.BYTE;
                this.f7679q = 0L;
                this.f7680r = 0.0f;
                this.f7681s = 0.0d;
                this.f7682t = 0;
                this.f7683u = 0;
                this.f7684v = 0;
                this.f7685w = b.f7655f;
                this.f7686x = Collections.emptyList();
                this.f7687y = 0;
                this.f7688z = 0;
            }

            public c(h.b bVar, kotlin.reflect.w.internal.y0.g.a aVar) {
                super(bVar);
                this.A = (byte) -1;
                this.B = -1;
                this.f7676n = bVar.f8259f;
            }
        }
    }
}
