private void method37(int arg0) {
        if (!Client.lowMem) {
            if (Rasterizer.texturePriorities[17] >= arg0) {
                IndexedSprite indexedSprite = Rasterizer.textures[17];
                int k = indexedSprite.width * indexedSprite.height - 1;
                int j1 = indexedSprite.width * anInt945 * 2;
                byte abyte0[] = indexedSprite.pixels;
                byte abyte3[] = aByteArray912;
                for (int i2 = 0; i2 <= k; i2++) {
                    abyte3[i2] = abyte0[i2 - j1 & k];
                }
                indexedSprite.pixels = abyte3;
                aByteArray912 = abyte0;
                Rasterizer.resetTexture(17);
                Client.anInt854++;
                if (Client.anInt854 > 1235) {
                    Client.anInt854 = 0;
                    outputStream.writeOpcode(226);
                    outputStream.writeByte(0);
                    int l2 = outputStream.offset;
                    outputStream.writeShort(58722);
                    outputStream.writeByte(240);
                    outputStream.writeShort((int) (Math.random() * 65536D));
                    outputStream.writeByte((int) (Math.random() * 256D));
                    if ((int) (Math.random() * 2D) == 0) {
                        outputStream.writeShort(51825);
                    }
                    outputStream.writeByte((int) (Math.random() * 256D));
                    outputStream.writeShort((int) (Math.random() * 65536D));
                    outputStream.writeShort(7130);
                    outputStream.writeShort((int) (Math.random() * 65536D));
                    outputStream.writeShort(61657);
                    outputStream.writeSizeByte(outputStream.offset - l2);
                }
            }
            if (Rasterizer.texturePriorities[24] >= arg0) {
                IndexedSprite indexedSprite_1 = Rasterizer.textures[24];
                int l = indexedSprite_1.width * indexedSprite_1.height - 1;
                int k1 = indexedSprite_1.width * anInt945 * 2;
                byte abyte1[] = indexedSprite_1.pixels;
                byte abyte4[] = aByteArray912;
                for (int j2 = 0; j2 <= l; j2++) {
                    abyte4[j2] = abyte1[j2 - k1 & l];
                }
                indexedSprite_1.pixels = abyte4;
                aByteArray912 = abyte1;
                Rasterizer.resetTexture(24);
            }
            if (Rasterizer.texturePriorities[34] >= arg0) {
                IndexedSprite indexedSprite_2 = Rasterizer.textures[34];
                int i1 = indexedSprite_2.width * indexedSprite_2.height - 1;
                int l1 = indexedSprite_2.width * anInt945 * 2;
                byte abyte2[] = indexedSprite_2.pixels;
                byte abyte5[] = aByteArray912;
                for (int k2 = 0; k2 <= i1; k2++) {
                    abyte5[k2] = abyte2[k2 - l1 & i1];
                }
                indexedSprite_2.pixels = abyte5;
                aByteArray912 = abyte2;
                Rasterizer.resetTexture(34);
            }
        }
    }