package o; import com.google.common.base.Ascii; import java.io.IOException; import java.io.InputStream; import net.sf.scuba.smartcards.ISO7816; import net.sf.scuba.smartcards.ISOFileInfo; import o.OBC; /* loaded from: classes.dex */ public final class HCF { private static final MWf[] b; private static final OBC c; private static final int d; /* JADX WARN: Type inference failed for: r5v0, types: [o.XRL, T] */ static { MWf[] mWfArr = {new C8358dIs(), new Iaa(), new gOJ()}; b = mWfArr; OBC obc = new OBC<>(); c = obc; ?? r5 = XRL.Unknown; OBC.IeS ieS = obc.b; if (ieS.b == null) { ieS.b = r5; obc.d(XRL.Jpeg, new byte[]{-1, ISO7816.INS_LOAD_KEY_FILE}); obc.d(XRL.Tiff, "II".getBytes(), new byte[]{ISO7816.INS_PSO, 0}); obc.d(XRL.Tiff, "MM".getBytes(), new byte[]{0, ISO7816.INS_PSO}); obc.d(XRL.Psd, "8BPS".getBytes()); obc.d(XRL.Png, new byte[]{-119, 80, 78, 71, 13, 10, Ascii.SUB, 10, 0, 0, 0, 13, 73, 72, ISO7816.INS_REHABILITATE_CHV, 82}); obc.d(XRL.Bmp, "BM".getBytes()); obc.d(XRL.Bmp, "BA".getBytes()); obc.d(XRL.Bmp, "CI".getBytes()); obc.d(XRL.Bmp, "CP".getBytes()); obc.d(XRL.Bmp, "IC".getBytes()); obc.d(XRL.Bmp, "PT".getBytes()); obc.d(XRL.Gif, "GIF87a".getBytes()); obc.d(XRL.Gif, "GIF89a".getBytes()); obc.d(XRL.Ico, new byte[]{0, 0, 1, 0}); obc.d(XRL.Pcx, new byte[]{10, 0, 1}); obc.d(XRL.Pcx, new byte[]{10, 2, 1}); obc.d(XRL.Pcx, new byte[]{10, 3, 1}); obc.d(XRL.Pcx, new byte[]{10, 5, 1}); obc.d(XRL.Arw, "II".getBytes(), new byte[]{ISO7816.INS_PSO, 0, 8, 0}); obc.d(XRL.Crw, "II".getBytes(), new byte[]{Ascii.SUB, 0, 0, 0}, "HEAPCCDR".getBytes()); obc.d(XRL.Cr2, "II".getBytes(), new byte[]{ISO7816.INS_PSO, 0, 16, 0, 0, 0, 67, 82}); obc.d(XRL.Orf, "IIRO".getBytes(), new byte[]{8, 0}); obc.d(XRL.Orf, "MMOR".getBytes(), new byte[]{0, 0}); obc.d(XRL.Orf, "IIRS".getBytes(), new byte[]{8, 0}); obc.d(XRL.Raf, "FUJIFILMCCD-RAW".getBytes()); obc.d(XRL.Rw2, "II".getBytes(), new byte[]{85, 0}); obc.d(XRL.Eps, "%!PS".getBytes()); obc.d(XRL.Eps, new byte[]{-59, ISO7816.INS_WRITE_BINARY, -45, -58}); obc.d(XRL.Aac, new byte[]{-1, -15}); obc.d(XRL.Aac, new byte[]{-1, -7}); obc.d(XRL.Asf, new byte[]{ISO7816.INS_DECREASE, 38, -78, 117, ISOFileInfo.CHANNEL_SECURITY, 102, -49, 17, -90, -39, 0, -86, 0, ISOFileInfo.FCP_BYTE, -50, 108}); obc.d(XRL.Cfbf, new byte[]{ISO7816.INS_WRITE_BINARY, -49, 17, ISO7816.INS_CREATE_FILE, ISOFileInfo.A1, ISO7816.INS_READ_BINARY2, Ascii.SUB, -31, 0}); obc.d(XRL.Flv, new byte[]{70, 76, 86}); obc.d(XRL.Indd, new byte[]{6, 6, -19, -11, ISO7816.INS_LOAD_KEY_FILE, 29, 70, -27, -67, 49, -17, -25, -2, 116, -73, 29}); obc.d(XRL.Mxf, new byte[]{6, 14, 43, ISO7816.INS_DECREASE_STAMPED, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2}); obc.d(XRL.Qxp, new byte[]{0, 0, 73, 73, 88, 80, 82, 51}); obc.d(XRL.Qxp, new byte[]{0, 0, 77, 77, 88, 80, 82, 51}); obc.d(XRL.Ram, new byte[]{114, 116, 115, ISO7816.INS_MANAGE_CHANNEL, 58, 47, 47}); obc.d(XRL.Rtf, new byte[]{123, 92, 114, 116, 102, 49}); obc.d(XRL.Sit, new byte[]{83, 73, 84, 33, 0}); obc.d(XRL.Sit, new byte[]{83, 116, 117, 102, 102, 73, 116, 32, 40, 99, 41, 49, 57, 57, 55, 45}); obc.d(XRL.Sitx, new byte[]{83, 116, 117, 102, 102, 73, 116, 33}); obc.d(XRL.Swf, "CWS".getBytes()); obc.d(XRL.Swf, "FWS".getBytes()); obc.d(XRL.Swf, "ZWS".getBytes()); obc.d(XRL.Vob, new byte[]{0, 0, 1, -70}); obc.d(XRL.Zip, "PK".getBytes()); int i = obc.e; for (int i2 = 0; i2 < 3; i2++) { MWf mWf = mWfArr[i2]; if (mWf.b() > i) { i = mWf.b(); } } d = i; return; } throw new RuntimeException("Value already set for this trie node"); } public static XRL b(InputStream inputStream) throws IOException { if (!inputStream.markSupported()) { throw new IOException("Stream must support mark/reset"); } int i = d; inputStream.mark(i); byte[] bArr = new byte[i]; int i2 = 0; while (i != 0) { int read = inputStream.read(bArr, i2, i); if (read == -1) { break; } i -= read; i2 += read; } inputStream.reset(); XRL b2 = c.b(bArr, 0, i2); if (b2 == XRL.Unknown) { for (MWf mWf : b) { b2 = mWf.c(bArr); if (b2 != XRL.Unknown) { return b2; } } } return b2; } }