package defpackage;

import androidx.media3.exoplayer.analytics.AnalyticsListener;

/* JADX INFO: loaded from: classes2.dex */
public final class et3 {
    public static final et3 g;
    public final int[] a;
    public final int[] b;
    public final ft3 c;
    public final int d;
    public final int e;
    public final int f;

    static {
        new et3(4201, 4096, 1);
        new et3(AnalyticsListener.EVENT_RENDERER_READY_CHANGED, 1024, 1);
        new et3(67, 64, 1);
        new et3(19, 16, 1);
        g = new et3(285, 256, 0);
        new et3(301, 256, 1);
    }

    public et3(int i, int i2, int i3) {
        this.e = i;
        this.d = i2;
        this.f = i3;
        this.a = new int[i2];
        this.b = new int[i2];
        int i4 = 1;
        for (int i5 = 0; i5 < i2; i5++) {
            this.a[i5] = i4;
            i4 *= 2;
            if (i4 >= i2) {
                i4 = (i4 ^ i) & (i2 - 1);
            }
        }
        for (int i6 = 0; i6 < i2 - 1; i6++) {
            this.b[this.a[i6]] = i6;
        }
        this.c = new ft3(this, new int[]{0});
        new ft3(this, new int[]{1});
    }

    public final int a(int i, int i2) {
        if (i == 0 || i2 == 0) {
            return 0;
        }
        int[] iArr = this.b;
        return this.a[(iArr[i] + iArr[i2]) % (this.d - 1)];
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("GF(0x");
        sb.append(Integer.toHexString(this.e));
        sb.append(',');
        return vw2.n(sb, this.d, ')');
    }
}
