package j$.time.format;

import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
final class B {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final Map f19192a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final HashMap f19193b;

    B(Map map) {
        this.f19192a = map;
        HashMap map2 = new HashMap();
        ArrayList arrayList = new ArrayList();
        for (Map.Entry entry : map.entrySet()) {
            HashMap map3 = new HashMap();
            for (Map.Entry entry2 : ((Map) entry.getValue()).entrySet()) {
                String str = (String) entry2.getValue();
                String str2 = (String) entry2.getValue();
                Long l = (Long) entry2.getKey();
                int i6 = C.f19197d;
                map3.put(str, new AbstractMap.SimpleImmutableEntry(str2, l));
            }
            ArrayList arrayList2 = new ArrayList(map3.values());
            Collections.sort(arrayList2, C.f19195b);
            map2.put((I) entry.getKey(), arrayList2);
            arrayList.addAll(arrayList2);
            map2.put(null, arrayList);
        }
        Collections.sort(arrayList, C.f19195b);
        this.f19193b = map2;
    }

    final String a(long j4, I i6) {
        Map map = (Map) this.f19192a.get(i6);
        if (map != null) {
            return (String) map.get(Long.valueOf(j4));
        }
        return null;
    }

    final Iterator b(I i6) {
        List list = (List) this.f19193b.get(i6);
        if (list != null) {
            return list.iterator();
        }
        return null;
    }
}
