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

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/* JADX INFO: loaded from: classes2.dex */
public final class pg2 implements kg2 {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final /* synthetic */ int f15414c = 0;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final List f15415a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final List f15416b;

    static {
        lg2.a(Collections.emptySet());
    }

    public /* synthetic */ pg2(List list, List list2) {
        this.f15415a = list;
        this.f15416b = list2;
    }

    public static uz0 a(int i10, int i11) {
        return new uz0(i10, i11);
    }

    @Override // com.google.android.gms.internal.ads.rg2
    /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
    public final Set zzb() {
        List list = this.f15415a;
        int size = list.size();
        List list2 = this.f15416b;
        ArrayList arrayList = new ArrayList(list2.size());
        int size2 = list2.size();
        for (int i10 = 0; i10 < size2; i10++) {
            Collection collection = (Collection) ((og2) list2.get(i10)).zzb();
            size += collection.size();
            arrayList.add(collection);
        }
        HashSet hashSet = new HashSet(size < 3 ? size + 1 : size < 1073741824 ? (int) ((size / 0.75f) + 1.0f) : Integer.MAX_VALUE);
        int size3 = list.size();
        for (int i11 = 0; i11 < size3; i11++) {
            Object objZzb = ((og2) list.get(i11)).zzb();
            objZzb.getClass();
            hashSet.add(objZzb);
        }
        int size4 = arrayList.size();
        for (int i12 = 0; i12 < size4; i12++) {
            for (Object obj : (Collection) arrayList.get(i12)) {
                obj.getClass();
                hashSet.add(obj);
            }
        }
        return Collections.unmodifiableSet(hashSet);
    }
}
