package com.google.common.collect;

import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;

/* JADX INFO: loaded from: classes2.dex */
@GwtCompatible(emulated = true, serializable = true)
@ElementTypesAreNonnullByDefault
final class RegularImmutableSet<E> extends ImmutableSet<E> {

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public static final Object[] f23631i = null;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public static final RegularImmutableSet f23632j;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final transient Object[] f23633d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final transient int f23634e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final transient Object[] f23635f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final transient int f23636g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final transient int f23637h;

    static {
        Object[] objArr = new Object[0];
        f23632j = new RegularImmutableSet(objArr, 0, objArr, 0, 0);
    }

    public RegularImmutableSet(Object[] objArr, int i10, Object[] objArr2, int i11, int i12) {
        this.f23633d = objArr;
        this.f23634e = i10;
        this.f23635f = objArr2;
        this.f23636g = i11;
        this.f23637h = i12;
    }

    @Override // com.google.common.collect.ImmutableCollection, java.util.AbstractCollection, java.util.Collection
    public final boolean contains(Object obj) {
        if (obj != null) {
            Object[] objArr = this.f23635f;
            if (objArr.length != 0) {
                int iX = z0.x(obj);
                while (true) {
                    int i10 = iX & this.f23636g;
                    Object obj2 = objArr[i10];
                    if (obj2 == null) {
                        return false;
                    }
                    if (obj2.equals(obj)) {
                        return true;
                    }
                    iX = i10 + 1;
                }
            }
        }
        return false;
    }

    @Override // com.google.common.collect.ImmutableCollection
    public final int f(int i10, Object[] objArr) {
        Object[] objArr2 = this.f23633d;
        int i11 = this.f23637h;
        System.arraycopy(objArr2, 0, objArr, i10, i11);
        return i10 + i11;
    }

    @Override // com.google.common.collect.ImmutableCollection
    public final Object[] g() {
        return this.f23633d;
    }

    @Override // com.google.common.collect.ImmutableCollection
    public final int h() {
        return this.f23637h;
    }

    @Override // com.google.common.collect.ImmutableSet, java.util.Collection, java.util.Set
    public final int hashCode() {
        return this.f23634e;
    }

    @Override // com.google.common.collect.ImmutableCollection
    public final int i() {
        return 0;
    }

    @Override // com.google.common.collect.ImmutableCollection
    public final boolean j() {
        return false;
    }

    @Override // com.google.common.collect.ImmutableCollection
    /* JADX INFO: renamed from: k */
    public final v1 iterator() {
        return c().listIterator(0);
    }

    @Override // com.google.common.collect.ImmutableSet
    public final ImmutableList q() {
        return ImmutableList.l(this.f23637h, this.f23633d);
    }

    @Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
    public final int size() {
        return this.f23637h;
    }

    @Override // com.google.common.collect.ImmutableSet, com.google.common.collect.ImmutableCollection
    @J2ktIncompatible
    @GwtIncompatible
    public Object writeReplace() {
        return super.writeReplace();
    }
}
