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

import io.netty.handler.codec.compression.Bzip2Constants;
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.g.e;
import kotlin.reflect.w.internal.y0.g.q;
import kotlin.reflect.w.internal.y0.g.t;
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.f;
import kotlin.reflect.w.internal.y0.i.h;
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 i extends h.d<i> implements q {

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final i f7835m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static r<i> f7836n = new a();
    public int A;
    public List<u> B;
    public t C;
    public List<Integer> D;
    public e E;
    public byte F;
    public int G;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final c f7837o;

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

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

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

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

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

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

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public List<s> f7844v;

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

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

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

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public List<Integer> f7848z;

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

    public static final class b extends h.c<i, b> implements q {
        public t A;
        public List<Integer> B;
        public e C;

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

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

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public int f7851q = 6;

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

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

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

        /* JADX INFO: renamed from: u, reason: collision with root package name */
        public List<s> f7855u;

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

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

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

        /* JADX INFO: renamed from: y, reason: collision with root package name */
        public List<Integer> f7859y;

        /* JADX INFO: renamed from: z, reason: collision with root package name */
        public List<u> f7860z;

        public b() {
            q qVar = q.f7965m;
            this.f7853s = qVar;
            this.f7855u = Collections.emptyList();
            this.f7856v = qVar;
            this.f7858x = Collections.emptyList();
            this.f7859y = Collections.emptyList();
            this.f7860z = Collections.emptyList();
            this.A = t.f8059f;
            this.B = Collections.emptyList();
            this.C = e.f7767f;
        }

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

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

        @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 {
            p(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 {
            p(dVar, fVar);
            return this;
        }

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

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

        public i n() {
            i iVar = new i(this, null);
            int i2 = this.f7849o;
            int i3 = (i2 & 1) != 1 ? 0 : 1;
            iVar.f7839q = this.f7850p;
            if ((i2 & 2) == 2) {
                i3 |= 2;
            }
            iVar.f7840r = this.f7851q;
            if ((i2 & 4) == 4) {
                i3 |= 4;
            }
            iVar.f7841s = this.f7852r;
            if ((i2 & 8) == 8) {
                i3 |= 8;
            }
            iVar.f7842t = this.f7853s;
            if ((i2 & 16) == 16) {
                i3 |= 16;
            }
            iVar.f7843u = this.f7854t;
            if ((i2 & 32) == 32) {
                this.f7855u = Collections.unmodifiableList(this.f7855u);
                this.f7849o &= -33;
            }
            iVar.f7844v = this.f7855u;
            if ((i2 & 64) == 64) {
                i3 |= 32;
            }
            iVar.f7845w = this.f7856v;
            if ((i2 & 128) == 128) {
                i3 |= 64;
            }
            iVar.f7846x = this.f7857w;
            if ((this.f7849o & 256) == 256) {
                this.f7858x = Collections.unmodifiableList(this.f7858x);
                this.f7849o &= -257;
            }
            iVar.f7847y = this.f7858x;
            if ((this.f7849o & 512) == 512) {
                this.f7859y = Collections.unmodifiableList(this.f7859y);
                this.f7849o &= -513;
            }
            iVar.f7848z = this.f7859y;
            if ((this.f7849o & 1024) == 1024) {
                this.f7860z = Collections.unmodifiableList(this.f7860z);
                this.f7849o &= -1025;
            }
            iVar.B = this.f7860z;
            if ((i2 & 2048) == 2048) {
                i3 |= 128;
            }
            iVar.C = this.A;
            if ((this.f7849o & 4096) == 4096) {
                this.B = Collections.unmodifiableList(this.B);
                this.f7849o &= -4097;
            }
            iVar.D = this.B;
            if ((i2 & 8192) == 8192) {
                i3 |= 256;
            }
            iVar.E = this.C;
            iVar.f7838p = i3;
            return iVar;
        }

        public b o(i iVar) {
            e eVar;
            t tVar;
            q qVar;
            q qVar2;
            if (iVar == i.f7835m) {
                return this;
            }
            int i2 = iVar.f7838p;
            if ((i2 & 1) == 1) {
                int i3 = iVar.f7839q;
                this.f7849o |= 1;
                this.f7850p = i3;
            }
            if ((i2 & 2) == 2) {
                int i4 = iVar.f7840r;
                this.f7849o = 2 | this.f7849o;
                this.f7851q = i4;
            }
            if ((i2 & 4) == 4) {
                int i5 = iVar.f7841s;
                this.f7849o = 4 | this.f7849o;
                this.f7852r = i5;
            }
            if (iVar.u()) {
                q qVarN = iVar.f7842t;
                if ((this.f7849o & 8) == 8 && (qVar2 = this.f7853s) != q.f7965m) {
                    q.c cVarY = q.y(qVar2);
                    cVarY.l(qVarN);
                    qVarN = cVarY.n();
                }
                this.f7853s = qVarN;
                this.f7849o |= 8;
            }
            if ((iVar.f7838p & 16) == 16) {
                int i6 = iVar.f7843u;
                this.f7849o = 16 | this.f7849o;
                this.f7854t = i6;
            }
            if (!iVar.f7844v.isEmpty()) {
                if (this.f7855u.isEmpty()) {
                    this.f7855u = iVar.f7844v;
                    this.f7849o &= -33;
                } else {
                    if ((this.f7849o & 32) != 32) {
                        this.f7855u = new ArrayList(this.f7855u);
                        this.f7849o |= 32;
                    }
                    this.f7855u.addAll(iVar.f7844v);
                }
            }
            if (iVar.s()) {
                q qVarN2 = iVar.f7845w;
                if ((this.f7849o & 64) == 64 && (qVar = this.f7856v) != q.f7965m) {
                    q.c cVarY2 = q.y(qVar);
                    cVarY2.l(qVarN2);
                    qVarN2 = cVarY2.n();
                }
                this.f7856v = qVarN2;
                this.f7849o |= 64;
            }
            if (iVar.t()) {
                int i7 = iVar.f7846x;
                this.f7849o |= 128;
                this.f7857w = i7;
            }
            if (!iVar.f7847y.isEmpty()) {
                if (this.f7858x.isEmpty()) {
                    this.f7858x = iVar.f7847y;
                    this.f7849o &= -257;
                } else {
                    if ((this.f7849o & 256) != 256) {
                        this.f7858x = new ArrayList(this.f7858x);
                        this.f7849o |= 256;
                    }
                    this.f7858x.addAll(iVar.f7847y);
                }
            }
            if (!iVar.f7848z.isEmpty()) {
                if (this.f7859y.isEmpty()) {
                    this.f7859y = iVar.f7848z;
                    this.f7849o &= -513;
                } else {
                    if ((this.f7849o & 512) != 512) {
                        this.f7859y = new ArrayList(this.f7859y);
                        this.f7849o |= 512;
                    }
                    this.f7859y.addAll(iVar.f7848z);
                }
            }
            if (!iVar.B.isEmpty()) {
                if (this.f7860z.isEmpty()) {
                    this.f7860z = iVar.B;
                    this.f7849o &= -1025;
                } else {
                    if ((this.f7849o & 1024) != 1024) {
                        this.f7860z = new ArrayList(this.f7860z);
                        this.f7849o |= 1024;
                    }
                    this.f7860z.addAll(iVar.B);
                }
            }
            if ((iVar.f7838p & 128) == 128) {
                t tVarM = iVar.C;
                if ((this.f7849o & 2048) == 2048 && (tVar = this.A) != t.f8059f) {
                    t.b bVarK = t.k(tVar);
                    bVarK.n(tVarM);
                    tVarM = bVarK.m();
                }
                this.A = tVarM;
                this.f7849o |= 2048;
            }
            if (!iVar.D.isEmpty()) {
                if (this.B.isEmpty()) {
                    this.B = iVar.D;
                    this.f7849o &= -4097;
                } else {
                    if ((this.f7849o & 4096) != 4096) {
                        this.B = new ArrayList(this.B);
                        this.f7849o |= 4096;
                    }
                    this.B.addAll(iVar.D);
                }
            }
            if ((iVar.f7838p & 256) == 256) {
                e eVarM = iVar.E;
                if ((this.f7849o & 8192) == 8192 && (eVar = this.C) != e.f7767f) {
                    e.b bVar = new e.b();
                    bVar.n(eVar);
                    bVar.n(eVarM);
                    eVarM = bVar.m();
                }
                this.C = eVarM;
                this.f7849o |= 8192;
            }
            m(iVar);
            this.f8259f = this.f8259f.b(iVar.f7837o);
            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.i.b p(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.i> r1 = kotlin.reflect.w.internal.y0.g.i.f7836n     // 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.i r3 = (kotlin.reflect.w.internal.y0.g.i) r3     // Catch: java.lang.Throwable -> Lf kotlin.reflect.w.internal.y0.i.j -> L11
                if (r3 == 0) goto Le
                r2.o(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.i r4 = (kotlin.reflect.w.internal.y0.g.i) 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.o(r0)
            L1e:
                throw r3
            */
            throw new UnsupportedOperationException("Method not decompiled: r.i0.w.b.y0.g.i.b.p(r.i0.w.b.y0.i.d, r.i0.w.b.y0.i.f):r.i0.w.b.y0.g.i$b");
        }
    }

    static {
        i iVar = new i();
        f7835m = iVar;
        iVar.v();
    }

    public i() {
        this.A = -1;
        this.F = (byte) -1;
        this.G = -1;
        this.f7837o = c.f8234f;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r4v0 */
    /* JADX WARN: Type inference failed for: r4v1 */
    /* JADX WARN: Type inference failed for: r4v2, types: [boolean] */
    public i(d dVar, f fVar, kotlin.reflect.w.internal.y0.g.a aVar) {
        int i2;
        List list;
        Object obj;
        int i3;
        int iL;
        int iD;
        Object objH;
        int i4;
        this.A = -1;
        this.F = (byte) -1;
        this.G = -1;
        v();
        c.b bVarN = c.n();
        kotlin.reflect.w.internal.y0.i.e eVarK = kotlin.reflect.w.internal.y0.i.e.k(bVarN, 1);
        boolean z2 = false;
        int i5 = 0;
        while (true) {
            ?? Q = 32;
            if (z2) {
                if (((i5 == true ? 1 : 0) & 32) == 32) {
                    this.f7844v = Collections.unmodifiableList(this.f7844v);
                }
                if (((i5 == true ? 1 : 0) & 1024) == 1024) {
                    this.B = Collections.unmodifiableList(this.B);
                }
                if (((i5 == true ? 1 : 0) & 256) == 256) {
                    this.f7847y = Collections.unmodifiableList(this.f7847y);
                }
                if (((i5 == true ? 1 : 0) & 512) == 512) {
                    this.f7848z = Collections.unmodifiableList(this.f7848z);
                }
                if (((i5 == true ? 1 : 0) & 4096) == 4096) {
                    this.D = Collections.unmodifiableList(this.D);
                }
                try {
                    eVarK.j();
                } catch (IOException unused) {
                } catch (Throwable th) {
                    this.f7837o = bVarN.d();
                    throw th;
                }
                this.f7837o = bVarN.d();
                this.f8262f.i();
                return;
            }
            try {
                try {
                    int iO = dVar.o();
                    q.c cVarY = null;
                    e.b bVar = null;
                    t.b bVarK = null;
                    q.c cVarY2 = null;
                    switch (iO) {
                        case 0:
                            z2 = true;
                            break;
                        case 8:
                            this.f7838p |= 2;
                            this.f7840r = dVar.l();
                            break;
                        case 16:
                            this.f7838p |= 4;
                            this.f7841s = dVar.l();
                            break;
                        case 26:
                            i2 = 8;
                            if ((this.f7838p & 8) == 8) {
                                q qVar = this.f7842t;
                                Objects.requireNonNull(qVar);
                                cVarY = q.y(qVar);
                            }
                            q qVar2 = (q) dVar.h(q.f7966n, fVar);
                            this.f7842t = qVar2;
                            if (cVarY != null) {
                                cVarY.l(qVar2);
                                this.f7842t = cVarY.n();
                            }
                            this.f7838p |= i2;
                            break;
                        case 34:
                            int i6 = (i5 == true ? 1 : 0) & 32;
                            int i7 = i5;
                            if (i6 != 32) {
                                this.f7844v = new ArrayList();
                                i7 = (i5 == true ? 1 : 0) | 32;
                            }
                            list = this.f7844v;
                            i3 = i7;
                            obj = s.f8035n;
                            i5 = i3;
                            objH = dVar.h(obj, fVar);
                            list.add(objH);
                            break;
                        case 42:
                            if ((this.f7838p & 32) == 32) {
                                q qVar3 = this.f7845w;
                                Objects.requireNonNull(qVar3);
                                cVarY2 = q.y(qVar3);
                            }
                            q qVar4 = (q) dVar.h(q.f7966n, fVar);
                            this.f7845w = qVar4;
                            if (cVarY2 != null) {
                                cVarY2.l(qVar4);
                                this.f7845w = cVarY2.n();
                            }
                            this.f7838p |= 32;
                            break;
                        case 50:
                            int i8 = (i5 == true ? 1 : 0) & 1024;
                            int i9 = i5;
                            if (i8 != 1024) {
                                this.B = new ArrayList();
                                i9 = (i5 == true ? 1 : 0) | 1024;
                            }
                            list = this.B;
                            i3 = i9;
                            obj = u.f8071n;
                            i5 = i3;
                            objH = dVar.h(obj, fVar);
                            list.add(objH);
                            break;
                        case 56:
                            this.f7838p |= 16;
                            this.f7843u = dVar.l();
                            break;
                        case 64:
                            this.f7838p |= 64;
                            this.f7846x = dVar.l();
                            break;
                        case 72:
                            this.f7838p |= 1;
                            this.f7839q = dVar.l();
                            break;
                        case 82:
                            int i10 = (i5 == true ? 1 : 0) & 256;
                            int i11 = i5;
                            if (i10 != 256) {
                                this.f7847y = new ArrayList();
                                i11 = (i5 == true ? 1 : 0) | 256;
                            }
                            list = this.f7847y;
                            i3 = i11;
                            obj = q.f7966n;
                            i5 = i3;
                            objH = dVar.h(obj, fVar);
                            list.add(objH);
                            break;
                        case 88:
                            int i12 = (i5 == true ? 1 : 0) & 512;
                            int i13 = i5;
                            if (i12 != 512) {
                                this.f7848z = new ArrayList();
                                i13 = (i5 == true ? 1 : 0) | 512;
                            }
                            list = this.f7848z;
                            iL = dVar.l();
                            i4 = i13;
                            i5 = i4;
                            objH = Integer.valueOf(iL);
                            list.add(objH);
                            break;
                        case 90:
                            iD = dVar.d(dVar.l());
                            int i14 = (i5 == true ? 1 : 0) & 512;
                            i5 = i5;
                            if (i14 != 512) {
                                i5 = i5;
                                if (dVar.b() > 0) {
                                    this.f7848z = new ArrayList();
                                    i5 = (i5 == true ? 1 : 0) | 512;
                                }
                            }
                            while (dVar.b() > 0) {
                                this.f7848z.add(Integer.valueOf(dVar.l()));
                            }
                            dVar.f8248i = iD;
                            dVar.p();
                            break;
                        case 242:
                            i2 = 128;
                            if ((this.f7838p & 128) == 128) {
                                t tVar = this.C;
                                Objects.requireNonNull(tVar);
                                bVarK = t.k(tVar);
                            }
                            t tVar2 = (t) dVar.h(t.f8060m, fVar);
                            this.C = tVar2;
                            if (bVarK != null) {
                                bVarK.n(tVar2);
                                this.C = bVarK.m();
                            }
                            this.f7838p |= i2;
                            break;
                        case 248:
                            int i15 = (i5 == true ? 1 : 0) & 4096;
                            int i16 = i5;
                            if (i15 != 4096) {
                                this.D = new ArrayList();
                                i16 = (i5 == true ? 1 : 0) | 4096;
                            }
                            list = this.D;
                            iL = dVar.l();
                            i4 = i16;
                            i5 = i4;
                            objH = Integer.valueOf(iL);
                            list.add(objH);
                            break;
                        case 250:
                            iD = dVar.d(dVar.l());
                            int i17 = (i5 == true ? 1 : 0) & 4096;
                            i5 = i5;
                            if (i17 != 4096) {
                                i5 = i5;
                                if (dVar.b() > 0) {
                                    this.D = new ArrayList();
                                    i5 = (i5 == true ? 1 : 0) | 4096;
                                }
                            }
                            while (dVar.b() > 0) {
                                this.D.add(Integer.valueOf(dVar.l()));
                            }
                            dVar.f8248i = iD;
                            dVar.p();
                            break;
                        case Bzip2Constants.HUFFMAN_MAX_ALPHABET_SIZE /* 258 */:
                            if ((this.f7838p & 256) == 256) {
                                e eVar = this.E;
                                Objects.requireNonNull(eVar);
                                bVar = new e.b();
                                bVar.n(eVar);
                            }
                            e eVar2 = (e) dVar.h(e.f7768m, fVar);
                            this.E = eVar2;
                            if (bVar != null) {
                                bVar.n(eVar2);
                                this.E = bVar.m();
                            }
                            this.f7838p |= 256;
                            break;
                        default:
                            Q = q(dVar, eVarK, fVar, iO);
                            if (Q == 0) {
                                z2 = true;
                            }
                            break;
                    }
                } catch (Throwable th2) {
                    if (((i5 == true ? 1 : 0) & 32) == Q) {
                        this.f7844v = Collections.unmodifiableList(this.f7844v);
                    }
                    if (((i5 == true ? 1 : 0) & 1024) == 1024) {
                        this.B = Collections.unmodifiableList(this.B);
                    }
                    if (((i5 == true ? 1 : 0) & 256) == 256) {
                        this.f7847y = Collections.unmodifiableList(this.f7847y);
                    }
                    if (((i5 == true ? 1 : 0) & 512) == 512) {
                        this.f7848z = Collections.unmodifiableList(this.f7848z);
                    }
                    if (((i5 == true ? 1 : 0) & 4096) == 4096) {
                        this.D = Collections.unmodifiableList(this.D);
                    }
                    try {
                        eVarK.j();
                    } catch (IOException unused2) {
                    } catch (Throwable th3) {
                        this.f7837o = bVarN.d();
                        throw th3;
                    }
                    this.f7837o = bVarN.d();
                    this.f8262f.i();
                    throw th2;
                }
            } catch (j e2) {
                e2.f8275f = this;
                throw e2;
            } catch (IOException e3) {
                j jVar = new j(e3.getMessage());
                jVar.f8275f = this;
                throw jVar;
            }
        }
    }

    @Override // kotlin.reflect.w.internal.y0.i.q
    public p b() {
        return f7835m;
    }

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

    @Override // kotlin.reflect.w.internal.y0.i.p
    public void d(kotlin.reflect.w.internal.y0.i.e eVar) throws IOException {
        f();
        h.d<MessageType>.a aVarP = p();
        if ((this.f7838p & 2) == 2) {
            eVar.p(1, this.f7840r);
        }
        if ((this.f7838p & 4) == 4) {
            eVar.p(2, this.f7841s);
        }
        if ((this.f7838p & 8) == 8) {
            eVar.r(3, this.f7842t);
        }
        for (int i2 = 0; i2 < this.f7844v.size(); i2++) {
            eVar.r(4, this.f7844v.get(i2));
        }
        if ((this.f7838p & 32) == 32) {
            eVar.r(5, this.f7845w);
        }
        for (int i3 = 0; i3 < this.B.size(); i3++) {
            eVar.r(6, this.B.get(i3));
        }
        if ((this.f7838p & 16) == 16) {
            eVar.p(7, this.f7843u);
        }
        if ((this.f7838p & 64) == 64) {
            eVar.p(8, this.f7846x);
        }
        if ((this.f7838p & 1) == 1) {
            eVar.p(9, this.f7839q);
        }
        for (int i4 = 0; i4 < this.f7847y.size(); i4++) {
            eVar.r(10, this.f7847y.get(i4));
        }
        if (this.f7848z.size() > 0) {
            eVar.y(90);
            eVar.y(this.A);
        }
        for (int i5 = 0; i5 < this.f7848z.size(); i5++) {
            eVar.q(this.f7848z.get(i5).intValue());
        }
        if ((this.f7838p & 128) == 128) {
            eVar.r(30, this.C);
        }
        for (int i6 = 0; i6 < this.D.size(); i6++) {
            eVar.p(31, this.D.get(i6).intValue());
        }
        if ((this.f7838p & 256) == 256) {
            eVar.r(32, this.E);
        }
        aVarP.a(19000, eVar);
        eVar.u(this.f7837o);
    }

    @Override // kotlin.reflect.w.internal.y0.i.p
    public int f() {
        int i2 = this.G;
        if (i2 != -1) {
            return i2;
        }
        int iC = (this.f7838p & 2) == 2 ? kotlin.reflect.w.internal.y0.i.e.c(1, this.f7840r) + 0 : 0;
        if ((this.f7838p & 4) == 4) {
            iC += kotlin.reflect.w.internal.y0.i.e.c(2, this.f7841s);
        }
        if ((this.f7838p & 8) == 8) {
            iC += kotlin.reflect.w.internal.y0.i.e.e(3, this.f7842t);
        }
        for (int i3 = 0; i3 < this.f7844v.size(); i3++) {
            iC += kotlin.reflect.w.internal.y0.i.e.e(4, this.f7844v.get(i3));
        }
        if ((this.f7838p & 32) == 32) {
            iC += kotlin.reflect.w.internal.y0.i.e.e(5, this.f7845w);
        }
        for (int i4 = 0; i4 < this.B.size(); i4++) {
            iC += kotlin.reflect.w.internal.y0.i.e.e(6, this.B.get(i4));
        }
        if ((this.f7838p & 16) == 16) {
            iC += kotlin.reflect.w.internal.y0.i.e.c(7, this.f7843u);
        }
        if ((this.f7838p & 64) == 64) {
            iC += kotlin.reflect.w.internal.y0.i.e.c(8, this.f7846x);
        }
        if ((this.f7838p & 1) == 1) {
            iC += kotlin.reflect.w.internal.y0.i.e.c(9, this.f7839q);
        }
        for (int i5 = 0; i5 < this.f7847y.size(); i5++) {
            iC += kotlin.reflect.w.internal.y0.i.e.e(10, this.f7847y.get(i5));
        }
        int iD = 0;
        for (int i6 = 0; i6 < this.f7848z.size(); i6++) {
            iD += kotlin.reflect.w.internal.y0.i.e.d(this.f7848z.get(i6).intValue());
        }
        int iE = iC + iD;
        if (!this.f7848z.isEmpty()) {
            iE = iE + 1 + kotlin.reflect.w.internal.y0.i.e.d(iD);
        }
        this.A = iD;
        if ((this.f7838p & 128) == 128) {
            iE += kotlin.reflect.w.internal.y0.i.e.e(30, this.C);
        }
        int iD2 = 0;
        for (int i7 = 0; i7 < this.D.size(); i7++) {
            iD2 += kotlin.reflect.w.internal.y0.i.e.d(this.D.get(i7).intValue());
        }
        int size = (this.D.size() * 2) + iE + iD2;
        if ((this.f7838p & 256) == 256) {
            size += kotlin.reflect.w.internal.y0.i.e.e(32, this.E);
        }
        int size2 = this.f7837o.size() + l() + size;
        this.G = size2;
        return size2;
    }

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

    @Override // kotlin.reflect.w.internal.y0.i.q
    public final boolean i() {
        byte b2 = this.F;
        if (b2 == 1) {
            return true;
        }
        if (b2 == 0) {
            return false;
        }
        if (!((this.f7838p & 4) == 4)) {
            this.F = (byte) 0;
            return false;
        }
        if (u() && !this.f7842t.i()) {
            this.F = (byte) 0;
            return false;
        }
        for (int i2 = 0; i2 < this.f7844v.size(); i2++) {
            if (!this.f7844v.get(i2).i()) {
                this.F = (byte) 0;
                return false;
            }
        }
        if (s() && !this.f7845w.i()) {
            this.F = (byte) 0;
            return false;
        }
        for (int i3 = 0; i3 < this.f7847y.size(); i3++) {
            if (!this.f7847y.get(i3).i()) {
                this.F = (byte) 0;
                return false;
            }
        }
        for (int i4 = 0; i4 < this.B.size(); i4++) {
            if (!this.B.get(i4).i()) {
                this.F = (byte) 0;
                return false;
            }
        }
        if (((this.f7838p & 128) == 128) && !this.C.i()) {
            this.F = (byte) 0;
            return false;
        }
        if (((this.f7838p & 256) == 256) && !this.E.i()) {
            this.F = (byte) 0;
            return false;
        }
        if (k()) {
            this.F = (byte) 1;
            return true;
        }
        this.F = (byte) 0;
        return false;
    }

    public boolean s() {
        return (this.f7838p & 32) == 32;
    }

    public boolean t() {
        return (this.f7838p & 64) == 64;
    }

    public boolean u() {
        return (this.f7838p & 8) == 8;
    }

    public final void v() {
        this.f7839q = 6;
        this.f7840r = 6;
        this.f7841s = 0;
        q qVar = q.f7965m;
        this.f7842t = qVar;
        this.f7843u = 0;
        this.f7844v = Collections.emptyList();
        this.f7845w = qVar;
        this.f7846x = 0;
        this.f7847y = Collections.emptyList();
        this.f7848z = Collections.emptyList();
        this.B = Collections.emptyList();
        this.C = t.f8059f;
        this.D = Collections.emptyList();
        this.E = e.f7767f;
    }

    public i(h.c cVar, kotlin.reflect.w.internal.y0.g.a aVar) {
        super(cVar);
        this.A = -1;
        this.F = (byte) -1;
        this.G = -1;
        this.f7837o = cVar.f8259f;
    }
}
