package o; import org.bouncycastle.crypto.tls.CipherSuite; import org.jmrtd.PassportService; /* loaded from: classes2.dex */ public class Nnt { private static Nnt[] h = {new Nnt(false, 3, 5, 8, 8, 1), new Nnt(false, 5, 7, 10, 10, 1), new Nnt(true, 5, 7, 16, 6, 1), new Nnt(false, 8, 10, 12, 12, 1), new Nnt(true, 10, 11, 14, 6, 2), new Nnt(false, 12, 12, 14, 14, 1), new Nnt(true, 16, 14, 24, 10, 1), new Nnt(false, 18, 14, 16, 16, 1), new Nnt(false, 22, 18, 18, 18, 1), new Nnt(true, 22, 18, 16, 10, 2), new Nnt(false, 30, 20, 20, 20, 1), new Nnt(true, 32, 24, 16, 14, 2), new Nnt(false, 36, 24, 22, 22, 1), new Nnt(false, 44, 28, 24, 24, 1), new Nnt(true, 49, 28, 22, 14, 2), new Nnt(false, 62, 36, 14, 14, 4), new Nnt(false, 86, 42, 16, 16, 4), new Nnt(false, 114, 48, 18, 18, 4), new Nnt(false, CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA, 56, 20, 20, 4), new Nnt(false, CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256, 68, 22, 22, 4), new Nnt(false, 204, 84, 24, 24, 4, 102, 42), new Nnt(false, 280, 112, 14, 14, 16, CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA, 56), new Nnt(false, 368, CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA, 16, 16, 16, 92, 36), new Nnt(false, 456, 192, 18, 18, 16, 114, 48), new Nnt(false, 576, PassportService.DEFAULT_MAX_BLOCKSIZE, 20, 20, 16, CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA, 56), new Nnt(false, 696, 272, 22, 22, 16, CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256, 68), new Nnt(false, 816, 336, 24, 24, 16, 136, 56), new Nnt(false, 1050, 408, 18, 18, 36, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, 68), new Nnt(false, 1304, 496, 20, 20, 36, CipherSuite.TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, 62), new Dng()}; public final int a; final int b; final int c; public final int d; public final int e; private final int f; private final int i; private final boolean j; private Nnt(boolean z, int i, int i2, int i3, int i4, int i5) { this(z, i, i2, i3, i4, i5, i, i2); } /* JADX INFO: Access modifiers changed from: package-private */ public Nnt(boolean z, int i, int i2, int i3, int i4, int i5, int i6, int i7) { this.j = z; this.e = i; this.c = i2; this.a = i3; this.d = i4; this.f = i5; this.i = i6; this.b = i7; } public static Nnt e(int i, xHt xht, OCM ocm, OCM ocm2) { for (Nnt nnt : h) { if (!(xht == xHt.FORCE_SQUARE && nnt.j) && ((xht != xHt.FORCE_RECTANGLE || nnt.j) && ((ocm == null || ((nnt.c() * nnt.a) + (nnt.c() << 1) >= ocm.d && (nnt.d() * nnt.d) + (nnt.d() << 1) >= ocm.a)) && ((ocm2 == null || ((nnt.c() * nnt.a) + (nnt.c() << 1) <= ocm2.d && (nnt.d() * nnt.d) + (nnt.d() << 1) <= ocm2.a)) && i <= nnt.e)))) { return nnt; } } throw new IllegalArgumentException("Can't find a symbol arrangement that matches the message. Data codewords: ".concat(String.valueOf(i))); } public final int c() { int i = this.f; int i2 = 1; if (i != 1) { i2 = 2; if (i != 2 && i != 4) { if (i == 16) { return 4; } if (i == 36) { return 6; } throw new IllegalStateException("Cannot handle this number of data regions"); } } return i2; } public final int d() { int i = this.f; if (i == 1 || i == 2) { return 1; } if (i == 4) { return 2; } if (i == 16) { return 4; } if (i == 36) { return 6; } throw new IllegalStateException("Cannot handle this number of data regions"); } public int a() { return this.e / this.i; } public final String toString() { StringBuilder sb = new StringBuilder(); sb.append(this.j ? "Rectangular Symbol:" : "Square Symbol:"); sb.append(" data region "); sb.append(this.a); sb.append('x'); sb.append(this.d); sb.append(", symbol size "); sb.append((c() * this.a) + (c() << 1)); sb.append('x'); sb.append((d() * this.d) + (d() << 1)); sb.append(", symbol data size "); sb.append(c() * this.a); sb.append('x'); sb.append(d() * this.d); sb.append(", codewords "); sb.append(this.e); sb.append('+'); sb.append(this.c); return sb.toString(); } public int e(int i) { return this.i; } }