package h.s;

import java.util.Collections;
import java.util.Map;
import org.snmp4j.mp.MPv3;

/* JADX INFO: compiled from: MapsJVM.kt */
/* JADX INFO: loaded from: classes.dex */
class d0 extends c0 {
    public static int a(int i2) {
        return i2 < 0 ? i2 : i2 < 3 ? i2 + 1 : i2 < 1073741824 ? (int) ((i2 / 0.75f) + 1.0f) : MPv3.MAX_MESSAGE_ID;
    }

    public static final <K, V> Map<K, V> b(h.k<? extends K, ? extends V> kVar) {
        h.x.d.k.d(kVar, "pair");
        Map<K, V> mapSingletonMap = Collections.singletonMap(kVar.c(), kVar.d());
        h.x.d.k.c(mapSingletonMap, "singletonMap(pair.first, pair.second)");
        return mapSingletonMap;
    }

    public static final <K, V> Map<K, V> c(Map<? extends K, ? extends V> map) {
        h.x.d.k.d(map, "<this>");
        Map.Entry<? extends K, ? extends V> next = map.entrySet().iterator().next();
        Map<K, V> mapSingletonMap = Collections.singletonMap(next.getKey(), next.getValue());
        h.x.d.k.c(mapSingletonMap, "with(entries.iterator().…ingletonMap(key, value) }");
        return mapSingletonMap;
    }
}
