package mo;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.protobuf.a;
import kotlin.reflect.jvm.internal.impl.protobuf.d;
import kotlin.reflect.jvm.internal.impl.protobuf.i;
import kotlin.reflect.jvm.internal.impl.protobuf.j;
import mo.h;

/* loaded from: classes3.dex */
public final class f extends kotlin.reflect.jvm.internal.impl.protobuf.i implements kotlin.reflect.jvm.internal.impl.protobuf.q {

    /* renamed from: y, reason: collision with root package name */
    private static final f f29320y;

    /* renamed from: z, reason: collision with root package name */
    public static kotlin.reflect.jvm.internal.impl.protobuf.r f29321z = new a();

    /* renamed from: q, reason: collision with root package name */
    private final kotlin.reflect.jvm.internal.impl.protobuf.d f29322q;

    /* renamed from: r, reason: collision with root package name */
    private int f29323r;

    /* renamed from: s, reason: collision with root package name */
    private c f29324s;

    /* renamed from: t, reason: collision with root package name */
    private List f29325t;

    /* renamed from: u, reason: collision with root package name */
    private h f29326u;

    /* renamed from: v, reason: collision with root package name */
    private d f29327v;

    /* renamed from: w, reason: collision with root package name */
    private byte f29328w;

    /* renamed from: x, reason: collision with root package name */
    private int f29329x;

    /* loaded from: classes3.dex */
    static class a extends kotlin.reflect.jvm.internal.impl.protobuf.b {
        a() {
        }

        @Override // kotlin.reflect.jvm.internal.impl.protobuf.r
        /* renamed from: j, reason: merged with bridge method [inline-methods] */
        public f b(kotlin.reflect.jvm.internal.impl.protobuf.e eVar, kotlin.reflect.jvm.internal.impl.protobuf.g gVar) {
            return new f(eVar, gVar);
        }
    }

    /* loaded from: classes3.dex */
    public static final class b extends i.b implements kotlin.reflect.jvm.internal.impl.protobuf.q {

        /* renamed from: q, reason: collision with root package name */
        private int f29330q;

        /* renamed from: r, reason: collision with root package name */
        private c f29331r = c.RETURNS_CONSTANT;

        /* renamed from: s, reason: collision with root package name */
        private List f29332s = Collections.emptyList();

        /* renamed from: t, reason: collision with root package name */
        private h f29333t = h.z();

        /* renamed from: u, reason: collision with root package name */
        private d f29334u = d.AT_MOST_ONCE;

        private b() {
            o();
        }

        static /* synthetic */ b h() {
            return l();
        }

        private static b l() {
            return new b();
        }

        private void n() {
            if ((this.f29330q & 2) != 2) {
                this.f29332s = new ArrayList(this.f29332s);
                this.f29330q |= 2;
            }
        }

        private void o() {
        }

        @Override // kotlin.reflect.jvm.internal.impl.protobuf.p.a
        /* renamed from: i, reason: merged with bridge method [inline-methods] */
        public f build() {
            f j10 = j();
            if (j10.isInitialized()) {
                return j10;
            }
            throw a.AbstractC0563a.b(j10);
        }

        public f j() {
            f fVar = new f(this);
            int i10 = this.f29330q;
            int i11 = (i10 & 1) != 1 ? 0 : 1;
            fVar.f29324s = this.f29331r;
            if ((this.f29330q & 2) == 2) {
                this.f29332s = Collections.unmodifiableList(this.f29332s);
                this.f29330q &= -3;
            }
            fVar.f29325t = this.f29332s;
            if ((i10 & 4) == 4) {
                i11 |= 2;
            }
            fVar.f29326u = this.f29333t;
            if ((i10 & 8) == 8) {
                i11 |= 4;
            }
            fVar.f29327v = this.f29334u;
            fVar.f29323r = i11;
            return fVar;
        }

        /* renamed from: k, reason: merged with bridge method [inline-methods] */
        public b clone() {
            return l().d(j());
        }

        public b p(h hVar) {
            if ((this.f29330q & 4) != 4 || this.f29333t == h.z()) {
                this.f29333t = hVar;
            } else {
                this.f29333t = h.O(this.f29333t).d(hVar).j();
            }
            this.f29330q |= 4;
            return this;
        }

        /* JADX WARN: Removed duplicated region for block: B:17:0x001d  */
        @Override // kotlin.reflect.jvm.internal.impl.protobuf.p.a
        /* renamed from: q, reason: merged with bridge method [inline-methods] */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public b I(kotlin.reflect.jvm.internal.impl.protobuf.e eVar, kotlin.reflect.jvm.internal.impl.protobuf.g gVar) {
            f fVar = null;
            try {
                try {
                    f fVar2 = (f) f.f29321z.b(eVar, gVar);
                    if (fVar2 != null) {
                        d(fVar2);
                    }
                    return this;
                } catch (kotlin.reflect.jvm.internal.impl.protobuf.k e10) {
                    f fVar3 = (f) e10.a();
                    try {
                        throw e10;
                    } catch (Throwable th2) {
                        th = th2;
                        fVar = fVar3;
                        if (fVar != null) {
                            d(fVar);
                        }
                        throw th;
                    }
                }
            } catch (Throwable th3) {
                th = th3;
                if (fVar != null) {
                }
                throw th;
            }
        }

        @Override // kotlin.reflect.jvm.internal.impl.protobuf.i.b
        /* renamed from: s, reason: merged with bridge method [inline-methods] */
        public b d(f fVar) {
            if (fVar == f.t()) {
                return this;
            }
            if (fVar.z()) {
                t(fVar.w());
            }
            if (!fVar.f29325t.isEmpty()) {
                if (this.f29332s.isEmpty()) {
                    this.f29332s = fVar.f29325t;
                    this.f29330q &= -3;
                } else {
                    n();
                    this.f29332s.addAll(fVar.f29325t);
                }
            }
            if (fVar.y()) {
                p(fVar.s());
            }
            if (fVar.A()) {
                u(fVar.x());
            }
            f(c().g(fVar.f29322q));
            return this;
        }

        public b t(c cVar) {
            cVar.getClass();
            this.f29330q |= 1;
            this.f29331r = cVar;
            return this;
        }

        public b u(d dVar) {
            dVar.getClass();
            this.f29330q |= 8;
            this.f29334u = dVar;
            return this;
        }
    }

    /* loaded from: classes3.dex */
    public enum c implements j.a {
        RETURNS_CONSTANT(0, 0),
        CALLS(1, 1),
        RETURNS_NOT_NULL(2, 2);

        private static j.b internalValueMap = new a();
        private final int value;

        /* loaded from: classes3.dex */
        static class a implements j.b {
            a() {
            }

            @Override // kotlin.reflect.jvm.internal.impl.protobuf.j.b
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public c findValueByNumber(int i10) {
                return c.valueOf(i10);
            }
        }

        c(int i10, int i11) {
            this.value = i11;
        }

        @Override // kotlin.reflect.jvm.internal.impl.protobuf.j.a
        public final int getNumber() {
            return this.value;
        }

        public static c valueOf(int i10) {
            if (i10 == 0) {
                return RETURNS_CONSTANT;
            }
            if (i10 == 1) {
                return CALLS;
            }
            if (i10 != 2) {
                return null;
            }
            return RETURNS_NOT_NULL;
        }
    }

    /* loaded from: classes3.dex */
    public enum d implements j.a {
        AT_MOST_ONCE(0, 0),
        EXACTLY_ONCE(1, 1),
        AT_LEAST_ONCE(2, 2);

        private static j.b internalValueMap = new a();
        private final int value;

        /* loaded from: classes3.dex */
        static class a implements j.b {
            a() {
            }

            @Override // kotlin.reflect.jvm.internal.impl.protobuf.j.b
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public d findValueByNumber(int i10) {
                return d.valueOf(i10);
            }
        }

        d(int i10, int i11) {
            this.value = i11;
        }

        @Override // kotlin.reflect.jvm.internal.impl.protobuf.j.a
        public final int getNumber() {
            return this.value;
        }

        public static d valueOf(int i10) {
            if (i10 == 0) {
                return AT_MOST_ONCE;
            }
            if (i10 == 1) {
                return EXACTLY_ONCE;
            }
            if (i10 != 2) {
                return null;
            }
            return AT_LEAST_ONCE;
        }
    }

    static {
        f fVar = new f(true);
        f29320y = fVar;
        fVar.B();
    }

    private void B() {
        this.f29324s = c.RETURNS_CONSTANT;
        this.f29325t = Collections.emptyList();
        this.f29326u = h.z();
        this.f29327v = d.AT_MOST_ONCE;
    }

    public static b C() {
        return b.h();
    }

    public static b D(f fVar) {
        return C().d(fVar);
    }

    public static f t() {
        return f29320y;
    }

    public boolean A() {
        return (this.f29323r & 4) == 4;
    }

    @Override // kotlin.reflect.jvm.internal.impl.protobuf.p
    /* renamed from: E, reason: merged with bridge method [inline-methods] */
    public b newBuilderForType() {
        return C();
    }

    @Override // kotlin.reflect.jvm.internal.impl.protobuf.p
    /* renamed from: F, reason: merged with bridge method [inline-methods] */
    public b toBuilder() {
        return D(this);
    }

    @Override // kotlin.reflect.jvm.internal.impl.protobuf.p
    public void a(kotlin.reflect.jvm.internal.impl.protobuf.f fVar) {
        getSerializedSize();
        if ((this.f29323r & 1) == 1) {
            fVar.R(1, this.f29324s.getNumber());
        }
        for (int i10 = 0; i10 < this.f29325t.size(); i10++) {
            fVar.c0(2, (kotlin.reflect.jvm.internal.impl.protobuf.p) this.f29325t.get(i10));
        }
        if ((this.f29323r & 2) == 2) {
            fVar.c0(3, this.f29326u);
        }
        if ((this.f29323r & 4) == 4) {
            fVar.R(4, this.f29327v.getNumber());
        }
        fVar.h0(this.f29322q);
    }

    @Override // kotlin.reflect.jvm.internal.impl.protobuf.p
    public int getSerializedSize() {
        int i10 = this.f29329x;
        if (i10 != -1) {
            return i10;
        }
        int h10 = (this.f29323r & 1) == 1 ? kotlin.reflect.jvm.internal.impl.protobuf.f.h(1, this.f29324s.getNumber()) + 0 : 0;
        for (int i11 = 0; i11 < this.f29325t.size(); i11++) {
            h10 += kotlin.reflect.jvm.internal.impl.protobuf.f.r(2, (kotlin.reflect.jvm.internal.impl.protobuf.p) this.f29325t.get(i11));
        }
        if ((this.f29323r & 2) == 2) {
            h10 += kotlin.reflect.jvm.internal.impl.protobuf.f.r(3, this.f29326u);
        }
        if ((this.f29323r & 4) == 4) {
            h10 += kotlin.reflect.jvm.internal.impl.protobuf.f.h(4, this.f29327v.getNumber());
        }
        int size = h10 + this.f29322q.size();
        this.f29329x = size;
        return size;
    }

    @Override // kotlin.reflect.jvm.internal.impl.protobuf.q
    public final boolean isInitialized() {
        byte b10 = this.f29328w;
        if (b10 == 1) {
            return true;
        }
        if (b10 == 0) {
            return false;
        }
        for (int i10 = 0; i10 < v(); i10++) {
            if (!u(i10).isInitialized()) {
                this.f29328w = (byte) 0;
                return false;
            }
        }
        if (!y() || s().isInitialized()) {
            this.f29328w = (byte) 1;
            return true;
        }
        this.f29328w = (byte) 0;
        return false;
    }

    public h s() {
        return this.f29326u;
    }

    public h u(int i10) {
        return (h) this.f29325t.get(i10);
    }

    public int v() {
        return this.f29325t.size();
    }

    public c w() {
        return this.f29324s;
    }

    public d x() {
        return this.f29327v;
    }

    public boolean y() {
        return (this.f29323r & 2) == 2;
    }

    public boolean z() {
        return (this.f29323r & 1) == 1;
    }

    private f(i.b bVar) {
        super(bVar);
        this.f29328w = (byte) -1;
        this.f29329x = -1;
        this.f29322q = bVar.c();
    }

    private f(boolean z10) {
        this.f29328w = (byte) -1;
        this.f29329x = -1;
        this.f29322q = kotlin.reflect.jvm.internal.impl.protobuf.d.f26243p;
    }

    private f(kotlin.reflect.jvm.internal.impl.protobuf.e eVar, kotlin.reflect.jvm.internal.impl.protobuf.g gVar) {
        this.f29328w = (byte) -1;
        this.f29329x = -1;
        B();
        d.b u10 = kotlin.reflect.jvm.internal.impl.protobuf.d.u();
        kotlin.reflect.jvm.internal.impl.protobuf.f I = kotlin.reflect.jvm.internal.impl.protobuf.f.I(u10, 1);
        boolean z10 = false;
        int i10 = 0;
        while (!z10) {
            try {
                try {
                    try {
                        int J = eVar.J();
                        if (J != 0) {
                            if (J == 8) {
                                int m10 = eVar.m();
                                c valueOf = c.valueOf(m10);
                                if (valueOf == null) {
                                    I.n0(J);
                                    I.n0(m10);
                                } else {
                                    this.f29323r |= 1;
                                    this.f29324s = valueOf;
                                }
                            } else if (J == 18) {
                                if ((i10 & 2) != 2) {
                                    this.f29325t = new ArrayList();
                                    i10 |= 2;
                                }
                                this.f29325t.add(eVar.t(h.C, gVar));
                            } else if (J == 26) {
                                h.b builder = (this.f29323r & 2) == 2 ? this.f29326u.toBuilder() : null;
                                h hVar = (h) eVar.t(h.C, gVar);
                                this.f29326u = hVar;
                                if (builder != null) {
                                    builder.d(hVar);
                                    this.f29326u = builder.j();
                                }
                                this.f29323r |= 2;
                            } else if (J != 32) {
                                if (!j(eVar, I, gVar, J)) {
                                }
                            } else {
                                int m11 = eVar.m();
                                d valueOf2 = d.valueOf(m11);
                                if (valueOf2 == null) {
                                    I.n0(J);
                                    I.n0(m11);
                                } else {
                                    this.f29323r |= 4;
                                    this.f29327v = valueOf2;
                                }
                            }
                        }
                        z10 = true;
                    } catch (IOException e10) {
                        throw new kotlin.reflect.jvm.internal.impl.protobuf.k(e10.getMessage()).i(this);
                    }
                } catch (kotlin.reflect.jvm.internal.impl.protobuf.k e11) {
                    throw e11.i(this);
                }
            } catch (Throwable th2) {
                if ((i10 & 2) == 2) {
                    this.f29325t = Collections.unmodifiableList(this.f29325t);
                }
                try {
                    I.H();
                } catch (IOException unused) {
                } catch (Throwable th3) {
                    this.f29322q = u10.e();
                    throw th3;
                }
                this.f29322q = u10.e();
                g();
                throw th2;
            }
        }
        if ((i10 & 2) == 2) {
            this.f29325t = Collections.unmodifiableList(this.f29325t);
        }
        try {
            I.H();
        } catch (IOException unused2) {
        } catch (Throwable th4) {
            this.f29322q = u10.e();
            throw th4;
        }
        this.f29322q = u10.e();
        g();
    }
}
