package com.google.crypto.tink.shaded.protobuf;

import java.util.Iterator;
import java.util.Map;

/* JADX INFO: loaded from: classes3.dex */
public final class N {
    public static void a(Object obj, Object obj2) {
        M m6 = (M) obj;
        if (obj2 != null) {
            throw new ClassCastException();
        }
        if (m6.isEmpty()) {
            return;
        }
        Iterator it = m6.entrySet().iterator();
        if (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            entry.getKey();
            entry.getValue();
            throw null;
        }
    }

    public static M b(Object obj, Object obj2) {
        M mC = (M) obj;
        M m6 = (M) obj2;
        if (!m6.isEmpty()) {
            if (!mC.f13735a) {
                mC = mC.c();
            }
            mC.b();
            if (!m6.isEmpty()) {
                mC.putAll(m6);
            }
        }
        return mC;
    }
}
