package com.google.android.gms.internal.measurement;

/* JADX INFO: loaded from: classes.dex */
public final class Y1 implements InterfaceC0693r2 {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final Y1 f9790b = new Y1(0);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f9791a;

    public /* synthetic */ Y1(int i) {
        this.f9791a = i;
    }

    public static final C0684p2 c(Object obj, Object obj2) {
        C0684p2 c0684p2 = (C0684p2) obj;
        C0684p2 c0684p22 = (C0684p2) obj2;
        if (!c0684p22.isEmpty()) {
            if (!c0684p2.f9943q) {
                if (c0684p2.isEmpty()) {
                    c0684p2 = new C0684p2();
                } else {
                    C0684p2 c0684p23 = new C0684p2(c0684p2);
                    c0684p23.f9943q = true;
                    c0684p2 = c0684p23;
                }
            }
            c0684p2.d();
            if (!c0684p22.isEmpty()) {
                c0684p2.putAll(c0684p22);
            }
        }
        return c0684p2;
    }

    @Override // com.google.android.gms.internal.measurement.InterfaceC0693r2
    public C0733z2 a(Class cls) {
        switch (this.f9791a) {
            case n4.u0.f15495q /* 0 */:
                if (!AbstractC0609a2.class.isAssignableFrom(cls)) {
                    throw new IllegalArgumentException("Unsupported message type: ".concat(cls.getName()));
                }
                try {
                    return (C0733z2) AbstractC0609a2.g(cls.asSubclass(AbstractC0609a2.class)).m(3);
                } catch (Exception e8) {
                    throw new RuntimeException("Unable to get message info for ".concat(cls.getName()), e8);
                }
            default:
                throw new IllegalStateException("This should never be called.");
        }
    }

    @Override // com.google.android.gms.internal.measurement.InterfaceC0693r2
    public boolean b(Class cls) {
        switch (this.f9791a) {
            case n4.u0.f15495q /* 0 */:
                return AbstractC0609a2.class.isAssignableFrom(cls);
            default:
                return false;
        }
    }
}
