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

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

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

    public static L b(Object obj, Object obj2) {
        L lE = (L) obj;
        L l8 = (L) obj2;
        if (!l8.isEmpty()) {
            if (!lE.f10444q) {
                lE = lE.e();
            }
            lE.d();
            if (!l8.isEmpty()) {
                lE.putAll(l8);
            }
        }
        return lE;
    }
}
