package com.google.zxing.common.reedsolomon; import com.ijm.dataencryption.de.DataDecryptTool; import com.ubt.jimu.base.util.FileUtil; import com.ubt.jimu.diy.model.DiyPreviewStep; /* loaded from: classes.dex */ public final class GenericGF { public static final GenericGF h = new GenericGF(4201, FileUtil.ZIP_BUFFER_SIZE, 1); public static final GenericGF i = new GenericGF(1033, DataDecryptTool.DECRYPT_SP_FILE, 1); public static final GenericGF j = new GenericGF(67, 64, 1); public static final GenericGF k = new GenericGF(19, 16, 1); public static final GenericGF l = new GenericGF(285, DataDecryptTool.DECRYPT_ALL_FILE, 0); public static final GenericGF m; public static final GenericGF n; public static final GenericGF o; private final int[] a; private final int[] b; private final GenericGFPoly c; private final GenericGFPoly d; private final int e; private final int f; private final int g; static { GenericGF genericGF = new GenericGF(DiyPreviewStep.TYPE_PROGRAM, DataDecryptTool.DECRYPT_ALL_FILE, 1); m = genericGF; n = genericGF; o = j; } public GenericGF(int i2, int i3, int i4) { this.f = i2; this.e = i3; this.g = i4; this.a = new int[i3]; this.b = new int[i3]; int i5 = 1; for (int i6 = 0; i6 < i3; i6++) { this.a[i6] = i5; i5 <<= 1; if (i5 >= i3) { i5 = (i5 ^ i2) & (i3 - 1); } } for (int i7 = 0; i7 < i3 - 1; i7++) { this.b[this.a[i7]] = i7; } this.c = new GenericGFPoly(this, new int[]{0}); this.d = new GenericGFPoly(this, new int[]{1}); } static int c(int i2, int i3) { return i2 ^ i3; } GenericGFPoly a(int i2, int i3) { if (i2 < 0) { throw new IllegalArgumentException(); } if (i3 == 0) { return this.c; } int[] iArr = new int[i2 + 1]; iArr[0] = i3; return new GenericGFPoly(this, iArr); } GenericGFPoly b() { return this.d; } int c(int i2) { if (i2 != 0) { return this.b[i2]; } throw new IllegalArgumentException(); } GenericGFPoly d() { return this.c; } public String toString() { return "GF(0x" + Integer.toHexString(this.f) + ',' + this.e + ')'; } int b(int i2) { if (i2 != 0) { return this.a[(this.e - this.b[i2]) - 1]; } throw new ArithmeticException(); } public int c() { return this.e; } int b(int i2, int i3) { if (i2 == 0 || i3 == 0) { return 0; } int[] iArr = this.a; int[] iArr2 = this.b; return iArr[(iArr2[i2] + iArr2[i3]) % (this.e - 1)]; } int a(int i2) { return this.a[i2]; } public int a() { return this.g; } }