/*
 * Decompiled with CFR 0.152.
 */
import java.io.IOException;
import java.io.InputStream;

public final class of
extends InputStream {
    private static final int[] D;
    private static final int[] E;
    private static final int[] F;
    private static final int[] G;
    private static final short[] H;
    private static final int[] I;
    private static final int[] J;
    private static final int[] K;
    private static final int[] f;
    private static short[] x;
    private static short[] y;
    private short[] A;
    private int B;
    private int C;
    private int L;
    private int M;
    private int N;
    private int O;
    private int P;
    private int Q;
    private byte R;
    private int S;
    private byte[] T;
    private byte[] U;
    private short[] V;
    private int W;
    private byte[] e = new byte[1];
    private boolean g;
    private byte[] h;
    private int i;
    private int j;
    private int k;
    private int l;
    private int m;
    private boolean n;
    private boolean o;
    private int p;
    private int q;
    private int r;
    private byte[] s = new byte[32768];
    private int t;
    private int u;
    private int v;
    private int w;
    private short[] z;
    public InputStream a;
    public byte[] b;
    public int c;
    public boolean d;

    public final synchronized void mark(int n) {
        this.a.mark(n);
    }

    public of(InputStream inputStream) {
        this(inputStream, 512);
    }

    public final int read(byte[] byArray) {
        return this.read(byArray, 0, byArray.length);
    }

    private static final short c(int n) {
        return (short)(H[n & 0xF] << 12 | H[n >> 4 & 0xF] << 8 | H[n >> 8 & 0xF] << 4 | H[n >> 12]);
    }

    private int c() {
        return this.j - this.i + (this.w >> 3);
    }

    private boolean f() {
        return this.m == 12 && this.u == 0;
    }

    public final boolean markSupported() {
        return this.a.markSupported();
    }

    public final void close() {
        this.a.close();
    }

    public final synchronized void reset() {
        this.a.reset();
    }

    private void g() {
        this.v >>= this.w & 7;
        this.w &= 0xFFFFFFF8;
    }

    private final void b(int n) {
        this.v >>>= n;
        this.w -= n;
    }

    private final int a(int n) {
        block3: {
            block2: {
                if (this.w >= n) break block2;
                if (this.i == this.j) break block3;
                this.v |= (this.h[this.i++] & 0xFF | (this.h[this.i++] & 0xFF) << 8) << this.w;
                this.w += 16;
            }
            return this.v & (1 << n) - 1;
        }
        return -1;
    }

    public final int read() {
        if (this.read(this.e, 0, 1) != -1) {
            return this.e[0] & 0xFF;
        }
        return -1;
    }

    public final int available() {
        if (this.f()) {
            return 0;
        }
        return 1;
    }

    private of(InputStream inputStream, int n) {
        this.a = inputStream;
        this.o = true;
        int n2 = !true ? 0 : 2;
        this.m = n2;
        this.q = 0;
        this.k = 0;
        this.j = 0;
        this.i = 0;
        this.w = 0;
        this.v = 0;
        this.t = 0;
        this.u = 0;
        this.z = null;
        this.A = null;
        this.n = false;
        this.W = 1;
        this.c = 0;
        if (n > 0) {
            this.b = new byte[n];
            return;
        }
        throw new IOException("size <= 0");
    }

    public final long skip(long l) {
        if (l >= 0L) {
            long l2;
            long l3;
            byte[] byArray = new byte[512];
            for (l2 = 0L; l2 < l; l2 += l3) {
                l3 = l - l2;
                int n = l3 < (long)byArray.length ? (int)l3 : byArray.length;
                l3 = this.read(byArray, 0, n);
                if (l3 != (long)-1) {
                    continue;
                }
                this.d = true;
                break;
            }
            return l2;
        }
        throw new IOException("negative skip length");
    }

    public static int[] a(int n, String string) {
        int n2 = string.charAt(n);
        int[] nArray = new int[n2];
        ++n;
        int n3 = 0;
        while (true) {
            int n4 = n;
            if (n3 >= n2) break;
            n = n4 + 1;
            nArray[n3] = string.charAt(n4);
            ++n3;
        }
        return nArray;
    }

    static {
        int n;
        int n2;
        f = of.a(91, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        D = of.a(94, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        E = of.a(0, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        F = of.a(126, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        G = of.a(32, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        H = new short[]{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
        byte[] byArray = new byte[288];
        for (n2 = 0; n2 < 144; ++n2) {
            byArray[n2] = 8;
        }
        while (n2 < 256) {
            byArray[n2] = 9;
            ++n2;
        }
        while (n2 < 280) {
            byArray[n2] = 7;
            ++n2;
        }
        while (n2 < 288) {
            byArray[n2] = 8;
            ++n2;
        }
        n2 = 0;
        x = of.a(byArray, 288);
        byArray = new byte[32];
        while ((n = n2) < 32) {
            n2 = n + 1;
            byArray[n] = 5;
        }
        y = of.a(byArray, 32);
        I = of.a(63, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        J = of.a(67, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
        K = of.a(71, "\u001f\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0001\u0002\u0002\u0002\u0002\u0003\u0003\u0003\u0003\u0004\u0004\u0004\u0004\u0005\u0005\u0005\u0005\u0000pp\u001e\u0000\u0000\u0000\u0000\u0001\u0001\u0002\u0002\u0003\u0003\u0004\u0004\u0005\u0005\u0006\u0006\u0007\u0007\b\b\t\t\n\n\u000b\u000b\f\f\r\r\u0003\u0003\u0003\u000b\u0003\u0002\u0003\u0007\u0013\u0010\u0011\u0012\u0000\b\u0007\t\u0006\n\u0005\u000b\u0004\f\u0003\r\u0002\u000e\u0001\u000f\u0002\u001f\u008b\u001f\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\r\u000f\u0011\u0013\u0017\u001b\u001f#+3;CScs\u0083\u00a3\u00c3\u00e3\u0102\u0000\u0000\u001e\u0001\u0002\u0003\u0004\u0005\u0007\t\r\u0011\u0019!1Aa\u0081\u00c1\u0101\u0181\u0201\u0301\u0401\u0601\u0801\u0c01\u1001\u1801\u2001\u3001\u4001\u6001");
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private int a(short[] sArray) {
        int n = this.a(9);
        if (n >= 0) {
            if ((n = sArray[n]) >= 0) {
                this.b(n & 0xF);
                return n >> 4;
            }
            int n2 = -(n >> 4);
            if ((n = this.a(n & 0xF)) < 0) {
                int n3 = this.w;
                n = sArray[this.a(n3) >> 9 | n2];
                if (n3 < (n & 0xF)) return -1;
                this.b(n & 0xF);
                return n >> 4;
            }
            short s = sArray[n2 | n >> 9];
            this.b(s & 0xF);
            return s >> 4;
        }
        n = this.w;
        short s = sArray[this.a(n)];
        if (s < 0 || (s & 0xF) > n) return -1;
        this.b(s & 0xF);
        return s >> 4;
    }

    private static short[] a(byte[] byArray, int n) {
        int n2;
        int n3;
        int[] nArray = new int[16];
        int[] nArray2 = new int[16];
        for (n3 = 0; n3 <= 15; ++n3) {
            nArray[n3] = 0;
        }
        for (n3 = 0; n3 < n; ++n3) {
            byte by2 = byArray[n3];
            nArray[by2] = nArray[by2] + 1;
        }
        int n4 = 0;
        int n5 = 512;
        for (n3 = 1; n3 <= 15; ++n3) {
            nArray2[n3] = n4;
            n4 += nArray[n3] << 16 - n3;
            if (n3 <= 9) continue;
            n5 += (n4 & 0xFFF80) - (nArray2[n3] & 0xFFF80) >> 16 - n3;
        }
        int n6 = 512;
        short[] sArray = new short[n5];
        for (n2 = 15; n2 > 9; --n2) {
            n5 = n4 & 0xFFF80;
            for (n3 = (n4 -= nArray[n2] << 16 - n2) & 0xFFF80; n3 < n5; n3 += 128) {
                sArray[of.c((int)n3)] = (short)(-n6 << 4 | n2);
                n6 += 1 << n2 - 9;
            }
        }
        for (n6 = 0; n6 < n; ++n6) {
            n4 = byArray[n6];
            if (n4 == 0) continue;
            n2 = nArray2[n4];
            n3 = of.c(n2);
            if (n4 > 9) {
                short s = sArray[n3 & 0x1FF];
                n5 = -(s >> 4);
                int n7 = 1 << (s & 0xF);
                do {
                    sArray[n5 | n3 >> 9] = (short)(n6 << 4 | n4);
                } while ((n3 += 1 << n4) < n7);
            } else {
                do {
                    sArray[n3] = (short)(n6 << 4 | n4);
                } while ((n3 += 1 << n4) < 512);
            }
            nArray2[n4] = n2 + (1 << 16 - n4);
        }
        return sArray;
    }

    /*
     * Unable to fully structure code
     */
    public final int read(byte[] var1_1, int var2_2, int var3_3) {
        block97: {
            block103: {
                block96: {
                    block104: {
                        block100: {
                            block101: {
                                block102: {
                                    block99: {
                                        block105: {
                                            block106: {
                                                block107: {
                                                    block108: {
                                                        block94: {
                                                            block109: {
                                                                block110: {
                                                                    block95: {
                                                                        if (this.g) break block105;
                                                                        var4_4 = this.a.read();
                                                                        if (var4_4 < 0) break block106;
                                                                        var5_5 = this.a.read();
                                                                        if (var4_4 != of.f[0] || var5_5 != of.f[1]) break block107;
                                                                        var4_4 = this.a.read();
                                                                        var5_5 = this.a.read();
                                                                        if (var4_4 != 8 || (var5_5 & 224) != 0) break block108;
                                                                        for (var4_4 = 0; var4_4 < 6; ++var4_4) {
                                                                            if (this.a.read() >= 0) {
                                                                                continue;
                                                                            }
                                                                            break block94;
                                                                        }
                                                                        if ((var5_5 & 4) == 0) break block95;
                                                                        var4_4 = this.a.read();
                                                                        if (var4_4 < 0) break block109;
                                                                        var7_6 = this.a.read();
                                                                        if (var7_6 >= 0) {
                                                                            var4_4 += var7_6 << 8;
                                                                            while (true) {
                                                                                var7_6 = var4_4 - 1;
                                                                                if (var4_4 == 0) break block95;
                                                                                if (this.a.read() < 0) break;
                                                                                var4_4 = var7_6;
                                                                            }
                                                                            throw new IOException("Corrupt GZIP header");
                                                                        }
                                                                        break block110;
                                                                    }
                                                                    if ((var5_5 & 8) != 0) {
                                                                        while ((var4_4 = this.a.read()) != 0) {
                                                                            if (var4_4 >= 0) continue;
                                                                            throw new IOException("Corrupt GZIP header");
                                                                        }
                                                                    }
                                                                    if ((var5_5 & 16) != 0) {
                                                                        while ((var4_4 = this.a.read()) != 0) {
                                                                            if (var4_4 >= 0) continue;
                                                                            throw new IOException("Corrupt GZIP header");
                                                                        }
                                                                    }
                                                                    if ((var5_5 & 2) != 0) {
                                                                        for (var4_4 = 0; var4_4 < 2; ++var4_4) {
                                                                            if (this.a.read() >= 0) {
                                                                                continue;
                                                                            }
                                                                            throw new IOException("Corrupt GZIP header");
                                                                        }
                                                                    }
                                                                    this.g = true;
                                                                    break block105;
                                                                }
                                                                throw new IOException("Corrupt GZIP header");
                                                            }
                                                            throw new IOException("Corrupt GZIP header");
                                                        }
                                                        throw new IOException("Corrupt GZIP header");
                                                    }
                                                    throw new IOException("Corrupt GZIP header");
                                                }
                                                throw new IOException("Not in GZIP format");
                                            }
                                            this.d = true;
                                        }
                                        if (this.d) {
                                            return -1;
                                        }
                                        while (true) {
                                            block98: {
                                                block111: {
                                                    if (var3_3 == 0) break block111;
                                                    if (0 > var2_2 || var2_2 > var2_2 + var3_3 || var2_2 + var3_3 > var1_1.length) break block96;
                                                    var7_6 = 0;
                                                    var9_9 = var3_3;
                                                    var10_10 = var2_2;
                                                    do {
                                                        block114: {
                                                            block112: {
                                                                block113: {
                                                                    if (this.m != 11) {
                                                                        var6_7 = this.t;
                                                                        if (var9_9 <= this.u) {
                                                                            var6_7 = this.t - this.u + var9_9 & 32767;
                                                                            var5_5 = var9_9;
                                                                        } else {
                                                                            var5_5 = this.u;
                                                                        }
                                                                        var4_4 = var5_5 - var6_7;
                                                                        if (var4_4 > 0) {
                                                                            System.arraycopy(this.s, 32768 - var4_4, var1_1, var10_10, var4_4);
                                                                            var8_8 = var10_10 + var4_4;
                                                                            var4_4 = var6_7;
                                                                        } else {
                                                                            var4_4 = var5_5;
                                                                            var8_8 = var10_10;
                                                                        }
                                                                        System.arraycopy(this.s, var6_7 - var4_4, var1_1, var8_8, var4_4);
                                                                        this.u -= var5_5;
                                                                        if (this.u < 0) break block97;
                                                                        var8_8 = this.W & 65535;
                                                                        var6_7 = this.W >> 16 & 65535;
                                                                        for (var4_4 = 0; var4_4 < var5_5; ++var4_4) {
                                                                            var8_8 = (var8_8 + var1_1[var4_4]) % 65521;
                                                                            var6_7 = (var6_7 + var8_8) % 65521;
                                                                        }
                                                                        this.W = (var6_7 << 16) + var8_8;
                                                                        this.q += var5_5;
                                                                        var7_6 += var5_5;
                                                                        var10_10 += var5_5;
                                                                        if ((var9_9 -= var5_5) == 0) break block98;
                                                                    }
                                                                    switch (this.m) {
                                                                        case 3: {
                                                                            this.l = this.a(16);
                                                                            if (this.l < 0) break block112;
                                                                            this.b(16);
                                                                            this.m = 4;
                                                                        }
                                                                        case 4: {
                                                                            var4_4 = this.a(16);
                                                                            if (var4_4 < 0) break block113;
                                                                            this.b(16);
                                                                            if (var4_4 != (this.l ^ 65535)) break;
                                                                            this.m = 5;
                                                                        }
                                                                        case 5: {
                                                                            var5_5 = Math.min(Math.min(this.l, 32768 - this.u), this.c());
                                                                            var6_7 = 32768 - this.t;
                                                                            if (var5_5 <= var6_7) ** GOTO lbl120
                                                                            var4_4 = this.b(this.s, this.t, var6_7);
                                                                            if (var4_4 < 0) ** GOTO lbl118
                                                                            if (var4_4 != var6_7) ** GOTO lbl-1000
                                                                            if ((var5_5 = this.b(this.s, 0, var5_5 - var6_7)) < 0) ** GOTO lbl116
                                                                            var4_4 += var5_5;
                                                                            ** GOTO lbl-1000
lbl116:
                                                                            // 1 sources

                                                                            var4_4 = -3;
                                                                            break block114;
lbl118:
                                                                            // 1 sources

                                                                            var4_4 = -3;
                                                                            break block114;
lbl120:
                                                                            // 1 sources

                                                                            var4_4 = this.b(this.s, this.t, var5_5);
                                                                            if (var4_4 < 0) {
                                                                                var4_4 = -3;
                                                                            } else lbl-1000:
                                                                            // 3 sources

                                                                            {
                                                                                this.t = this.t + var4_4 & 32767;
                                                                                this.u += var4_4;
                                                                                this.l -= var4_4;
                                                                                if (this.l != 0) {
                                                                                    var4_4 = this.i != this.j ? 1 : 0;
                                                                                } else {
                                                                                    var4_4 = 1;
                                                                                    this.m = 2;
                                                                                }
                                                                            }
                                                                            break block114;
                                                                        }
                                                                    }
                                                                    var4_4 = -3;
                                                                    break block114;
                                                                }
                                                                var4_4 = 0;
                                                                break block114;
                                                            }
                                                            var4_4 = 0;
                                                            break block114;
                                                            {
                                                                case 6: {
                                                                    block39: while (true) {
                                                                        switch (this.L) {
                                                                            default: {
                                                                                continue block39;
                                                                            }
                                                                            case 0: {
                                                                                this.M = this.a(5);
                                                                                if (this.M < 0) ** GOTO lbl215
                                                                                this.M += 257;
                                                                                this.b(5);
                                                                                this.L = 1;
                                                                            }
                                                                            case 1: {
                                                                                this.N = this.a(5);
                                                                                if (this.N < 0) break block39;
                                                                                ++this.N;
                                                                                this.b(5);
                                                                                this.P = this.M + this.N;
                                                                                this.U = new byte[this.P];
                                                                                this.L = 2;
                                                                            }
                                                                            case 2: {
                                                                                this.O = this.a(4);
                                                                                if (this.O < 0) ** GOTO lbl209
                                                                                this.O += 4;
                                                                                this.b(4);
                                                                                this.T = new byte[19];
                                                                                this.S = 0;
                                                                                this.L = 3;
                                                                            }
                                                                            case 3: {
                                                                                while (this.S < this.O) {
                                                                                    var4_4 = this.a(3);
                                                                                    if (var4_4 >= 0) {
                                                                                        this.b(3);
                                                                                        this.T[of.K[this.S]] = (byte)var4_4;
                                                                                        ++this.S;
                                                                                        continue;
                                                                                    }
                                                                                    ** GOTO lbl217
                                                                                }
                                                                                this.V = of.a(this.T, this.T.length);
                                                                                this.T = null;
                                                                                this.S = 0;
                                                                                this.L = 4;
                                                                            }
                                                                            case 4: {
                                                                                while (((var4_4 = this.a(this.V)) & -16) == 0) {
                                                                                    this.U[this.S++] = this.R = (byte)var4_4;
                                                                                    if (this.S != this.P) continue;
                                                                                    ** GOTO lbl219
                                                                                }
                                                                                if (var4_4 < 0) ** GOTO lbl211
                                                                                if (var4_4 < 17) ** GOTO lbl190
                                                                                this.R = 0;
                                                                                ** GOTO lbl191
lbl190:
                                                                                // 1 sources

                                                                                if (this.S == 0) ** GOTO lbl213
lbl191:
                                                                                // 2 sources

                                                                                this.Q = var4_4 - 16;
                                                                                this.L = 5;
                                                                            }
                                                                            case 5: {
                                                                                var4_4 = of.J[this.Q];
                                                                                var5_5 = this.a(var4_4);
                                                                                if (var5_5 < 0) ** GOTO lbl229
                                                                                this.b(var4_4);
                                                                                var4_4 = var5_5 + of.I[this.Q];
                                                                                if (this.S + var4_4 > this.P) ** GOTO lbl227
                                                                                while (var4_4-- > 0) {
                                                                                    this.U[this.S++] = this.R;
                                                                                }
                                                                                if (this.S != this.P) {
                                                                                    this.L = 4;
                                                                                    continue block39;
                                                                                }
                                                                                ** GOTO lbl219
                                                                            }
                                                                        }
                                                                        break;
                                                                    }
                                                                    var4_4 = 0;
                                                                    ** GOTO lbl230
lbl209:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    ** GOTO lbl230
lbl211:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    ** GOTO lbl230
lbl213:
                                                                    // 1 sources

                                                                    var4_4 = -1;
                                                                    ** GOTO lbl230
lbl215:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    ** GOTO lbl230
lbl217:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    ** GOTO lbl230
lbl219:
                                                                    // 2 sources

                                                                    var11_11 = new byte[this.M];
                                                                    var4_4 = 1;
                                                                    System.arraycopy(this.U, 0, var11_11, 0, this.M);
                                                                    this.z = of.a(var11_11, this.M);
                                                                    var11_11 = new byte[this.N];
                                                                    System.arraycopy(this.U, this.M, var11_11, 0, this.N);
                                                                    this.A = of.a(var11_11, this.N);
                                                                    ** GOTO lbl230
lbl227:
                                                                    // 1 sources

                                                                    var4_4 = -1;
                                                                    ** GOTO lbl230
lbl229:
                                                                    // 1 sources

                                                                    var4_4 = 0;
lbl230:
                                                                    // 9 sources

                                                                    if (var4_4 == 0) ** GOTO lbl236
                                                                    if (var4_4 == -1) ** GOTO lbl234
                                                                    this.m = 7;
                                                                    ** GOTO lbl334
lbl234:
                                                                    // 1 sources

                                                                    var4_4 = -3;
                                                                    break block114;
lbl236:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    break block114;
                                                                }
                                                                case 1: {
                                                                    while (this.r > 0) {
                                                                        var4_4 = this.a(8);
                                                                        if (var4_4 >= 0) {
                                                                            this.b(8);
                                                                            this.p = this.p << 8 | var4_4;
                                                                            this.r -= 8;
                                                                            continue;
                                                                        }
                                                                        ** GOTO lbl249
                                                                    }
                                                                    var4_4 = 0;
                                                                    break block114;
lbl249:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    break block114;
                                                                }
                                                                case 0: {
                                                                    var4_4 = this.a(16);
                                                                    if (var4_4 >= 0) {
                                                                        this.b(16);
                                                                        var4_4 = (var4_4 << 8 | var4_4 >> 8) & 65535;
                                                                        if (var4_4 % 31 == 0) {
                                                                            if ((var4_4 & 3840) == 2048) {
                                                                                if ((var4_4 & 32) == 0) {
                                                                                    this.m = 2;
                                                                                } else {
                                                                                    this.m = 1;
                                                                                    this.r = 32;
                                                                                }
                                                                                var4_4 = 1;
                                                                            } else {
                                                                                var4_4 = -3;
                                                                            }
                                                                        } else {
                                                                            var4_4 = -3;
                                                                        }
                                                                    } else {
                                                                        var4_4 = 0;
                                                                    }
                                                                    break block114;
                                                                }
                                                                case 12: {
                                                                    var4_4 = 0;
                                                                    break block114;
                                                                }
                                                                case 11: {
                                                                    this.g();
                                                                    this.r = 32;
                                                                    while (this.r > 0) {
                                                                        var4_4 = this.a(8);
                                                                        if (var4_4 >= 0) {
                                                                            this.b(8);
                                                                            this.p = this.p << 8 | var4_4;
                                                                            this.r -= 8;
                                                                            continue;
                                                                        }
                                                                        ** GOTO lbl291
                                                                    }
                                                                    if (this.W != this.p) {
                                                                        var4_4 = -3;
                                                                    } else {
                                                                        var4_4 = 0;
                                                                        this.m = 12;
                                                                    }
                                                                    break block114;
lbl291:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    break block114;
                                                                }
                                                                case 2: {
                                                                    if (this.n) ** GOTO lbl327
                                                                    var4_4 = this.a(3);
                                                                    if (var4_4 < 0) ** GOTO lbl325
                                                                    this.b(3);
                                                                    if ((var4_4 & 1) != 0) {
                                                                        this.n = true;
                                                                    }
                                                                    switch (var4_4 >> 1) {
                                                                        case 0: {
                                                                            this.g();
                                                                            this.m = 3;
                                                                            break;
                                                                        }
                                                                        default: {
                                                                            var4_4 = -3;
                                                                            break block114;
                                                                        }
                                                                        case 2: {
                                                                            this.L = 0;
                                                                            this.P = 0;
                                                                            this.O = 0;
                                                                            this.N = 0;
                                                                            this.M = 0;
                                                                            this.Q = 0;
                                                                            this.R = 0;
                                                                            this.S = 0;
                                                                            this.m = 6;
                                                                            break;
                                                                        }
                                                                        case 1: {
                                                                            this.z = of.x;
                                                                            this.A = of.y;
                                                                            this.m = 7;
                                                                        }
                                                                    }
                                                                    var4_4 = 1;
                                                                    break block114;
lbl325:
                                                                    // 1 sources

                                                                    var4_4 = 0;
                                                                    break block114;
lbl327:
                                                                    // 1 sources

                                                                    if (this.o) {
                                                                        this.m = 12;
                                                                        var4_4 = 0;
                                                                    } else {
                                                                        this.m = 11;
                                                                        var4_4 = 1;
                                                                    }
                                                                    break block114;
                                                                }
lbl334:
                                                                // 2 sources

                                                                case 7: 
                                                                case 8: 
                                                                case 9: 
                                                                case 10: {
                                                                    block45: for (var4_4 = 32768 - this.u; var4_4 >= 258; var4_4 -= this.B) {
                                                                        switch (this.m) {
                                                                            case 7: {
                                                                                while (((var5_5 = this.a(this.z)) & -256) == 0) {
                                                                                    if (this.u++ == 32768) ** GOTO lbl401
                                                                                    this.s[this.t++] = (byte)var5_5;
                                                                                    this.t &= 32767;
                                                                                    if (--var4_4 >= 258) continue;
                                                                                    ** GOTO lbl416
                                                                                }
                                                                                if (var5_5 < 0) ** GOTO lbl420
                                                                                if (var5_5 == 256) ** GOTO lbl403
                                                                                if ((var5_5 -= 257) < 0 || var5_5 > 30) ** GOTO lbl399
                                                                                this.B = of.D[var5_5];
                                                                                this.r = of.E[var5_5];
                                                                            }
                                                                            case 8: {
                                                                                if (this.r <= 0) ** GOTO lbl356
                                                                                this.m = 8;
                                                                                var5_5 = this.a(this.r);
                                                                                if (var5_5 < 0) ** GOTO lbl397
                                                                                this.b(this.r);
                                                                                this.B += var5_5;
lbl356:
                                                                                // 2 sources

                                                                                this.m = 9;
                                                                            }
                                                                            case 9: {
                                                                                var5_5 = this.a(this.A);
                                                                                if (var5_5 < 0) break;
                                                                                if (var5_5 < 0 || var5_5 > 29) ** GOTO lbl408
                                                                                this.C = of.F[var5_5];
                                                                                this.r = of.G[var5_5];
                                                                            }
                                                                            case 10: {
                                                                                if (this.r <= 0) ** GOTO lbl370
                                                                                this.m = 10;
                                                                                var5_5 = this.a(this.r);
                                                                                if (var5_5 < 0) ** GOTO lbl410
                                                                                this.b(this.r);
                                                                                this.C += var5_5;
lbl370:
                                                                                // 2 sources

                                                                                if ((this.u += this.B) <= 32768) {
                                                                                    var5_5 = this.t - this.C & 32767;
                                                                                    var6_7 = this.B;
                                                                                    var8_8 = 32768 - this.B;
                                                                                    if (var5_5 <= var8_8 && this.t < var8_8) {
                                                                                        if (var6_7 <= this.C) {
                                                                                            System.arraycopy(this.s, var5_5, this.s, this.t, var6_7);
                                                                                            this.t += var6_7;
                                                                                        } else {
                                                                                            while (var6_7-- > 0) {
                                                                                                this.s[this.t++] = this.s[var5_5];
                                                                                                ++var5_5;
                                                                                            }
                                                                                        }
                                                                                    } else {
                                                                                        while (true) {
                                                                                            var8_8 = var6_7 - 1;
                                                                                            if (var6_7 <= 0) break;
                                                                                            this.s[this.t++] = this.s[var5_5];
                                                                                            this.t &= 32767;
                                                                                            var6_7 = var8_8;
                                                                                            var5_5 = var5_5 + 1 & 32767;
                                                                                        }
                                                                                    }
                                                                                    this.m = 7;
                                                                                    continue block45;
                                                                                }
                                                                                ** GOTO lbl418
                                                                            }
                                                                        }
                                                                        var4_4 = 0;
                                                                        ** GOTO lbl421
lbl397:
                                                                        // 1 sources

                                                                        var4_4 = 0;
                                                                        ** GOTO lbl421
lbl399:
                                                                        // 1 sources

                                                                        var4_4 = -1;
                                                                        ** GOTO lbl421
lbl401:
                                                                        // 1 sources

                                                                        var4_4 = -1;
                                                                        ** GOTO lbl421
lbl403:
                                                                        // 1 sources

                                                                        this.A = null;
                                                                        this.z = null;
                                                                        this.m = 2;
                                                                        var4_4 = 1;
                                                                        ** GOTO lbl421
lbl408:
                                                                        // 1 sources

                                                                        var4_4 = -1;
                                                                        ** GOTO lbl421
lbl410:
                                                                        // 1 sources

                                                                        var4_4 = 0;
                                                                        ** GOTO lbl421
                                                                        var4_4 = -1;
                                                                        ** GOTO lbl421
                                                                    }
                                                                    var4_4 = 1;
                                                                    ** GOTO lbl421
lbl416:
                                                                    // 1 sources

                                                                    var4_4 = 1;
                                                                    ** GOTO lbl421
lbl418:
                                                                    // 1 sources

                                                                    var4_4 = -1;
                                                                    ** GOTO lbl421
lbl420:
                                                                    // 1 sources

                                                                    var4_4 = 0;
lbl421:
                                                                    // 12 sources

                                                                    var4_4 = var4_4 != 0 ? (var4_4 == 1 ? 1 : -3) : 0;
                                                                    break block114;
                                                                }
                                                            }
                                                            var4_4 = -3;
                                                        }
                                                        if (var4_4 < 0) break block99;
                                                    } while (var4_4 == 1 || this.u > 0 && this.m != 11);
                                                    break block98;
                                                }
                                                var7_6 = 0;
                                            }
                                            if (var7_6 > 0) break block100;
                                            var4_4 = this.m == 1 && this.r == 0 ? 1 : 0;
                                            if (var4_4 != 0 || this.f()) break block101;
                                            if (this.i != this.j) continue;
                                            var4_4 = 0;
                                            this.c = this.a.read(this.b, 0, this.b.length);
                                            if (this.c < 0) break block102;
                                            if (this.i < this.j) break;
                                            var5_5 = 0 + this.c;
                                            if (0 <= var5_5 && var5_5 <= this.b.length) {
                                                if ((this.c & 1) != 0) {
                                                    this.v |= (this.b[0] & 255) << this.w;
                                                    var4_4 = 0 + 1;
                                                    this.w += 8;
                                                }
                                                this.h = this.b;
                                                this.i = var4_4;
                                                this.j = var5_5;
                                                this.k += this.c;
                                                continue;
                                            }
                                            break block103;
                                            break;
                                        }
                                        throw new IOException("Internal State Error");
                                    }
                                    throw new IOException("Internal State Error");
                                }
                                throw new IOException("Unexpected end of ZLIB input stream");
                            }
                            var7_6 = -1;
                        }
                        if (this.f()) {
                            var1_1 = new byte[8];
                            var4_4 = this.c();
                            if (var4_4 > 8) {
                                var4_4 = 8;
                            }
                            System.arraycopy(this.b, this.c - this.c(), var1_1, 0, var4_4);
                            for (var5_5 = 8 - var4_4; var5_5 > 0; var5_5 -= var2_2) {
                                var2_2 = this.a.read(var1_1, 8 - var5_5, var5_5);
                                if (var2_2 > 0) {
                                    continue;
                                }
                                break block104;
                            }
                            if ((var1_1[4] & 255 | (var1_1[5] & 255) << 8 | (var1_1[6] & 255) << 16 | var1_1[7] << 24) != this.q) {
                                throw new IOException("Corrupt GZIP trailer");
                            }
                            this.d = true;
                        }
                        return var7_6;
                    }
                    throw new IOException("Corrupt GZIP trailer");
                }
                throw new IOException("Internal State Error");
            }
            throw new IOException("Internal State Error");
        }
        throw new IOException("Internal State Error");
    }

    private int b(byte[] byArray, int n, int n2) {
        if (n2 >= 0 && (this.w & 7) == 0) {
            int n3;
            int n4 = 0;
            while (true) {
                n3 = n;
                if (this.w <= 0 || n2 <= 0) break;
                --n2;
                ++n4;
                n = n3 + 1;
                byArray[n3] = (byte)this.v;
                this.v >>>= 8;
                this.w -= 8;
            }
            if (n2 != 0) {
                n = this.j - this.i;
                if (n2 <= n) {
                    n = n2;
                }
                System.arraycopy(this.h, this.i, byArray, n3, n);
                this.i += n;
                if ((this.i - this.j & 1) != 0) {
                    this.v = this.h[this.i++] & 0xFF;
                    this.w = 8;
                }
                return n4 + n;
            }
            return n4;
        }
        return -1;
    }
}

