/* Class523_Sub22 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package com.jagex;

public class Class523_Sub22 extends Class523 {
	public int anInt10522;
	int anInt10523;
	OutgoingPacket aClass408_10524;
	public RSBitBuffer aClass523_Sub34_Sub2_10525;
	static Class523_Sub22[] aClass523_Sub22Array10526 = new Class523_Sub22[300];
	static int anInt10527 = 0;

	public void method16105(int i) {
		if (anInt10527 * 229380129 < aClass523_Sub22Array10526.length)
			aClass523_Sub22Array10526[((anInt10527 += -878218271) * 229380129 - 1)] = this;
	}

	public static Class523_Sub22 method16106(OutgoingPacket class408, Class11 class11) {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -88);
		class523_sub22.aClass408_10524 = class408;
		class523_sub22.anInt10523 = class408.anInt4328 * -66856601;
		if (class523_sub22.anInt10523 * -764738435 == -1)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		else if (-2 == class523_sub22.anInt10523 * -764738435)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(10000);
		else if (class523_sub22.anInt10523 * -764738435 <= 18)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(20);
		else if (class523_sub22.anInt10523 * -764738435 <= 98)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(100);
		else
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18218(class11, -350023776);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18219(820957581 * class523_sub22.aClass408_10524.anInt4327, 1786544784);
		class523_sub22.anInt10522 = 0;
		return class523_sub22;
	}

	public static Class523_Sub22 method16107() {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -10);
		class523_sub22.aClass408_10524 = null;
		class523_sub22.anInt10523 = 0;
		class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(5000);
		return class523_sub22;
	}

	public static Class523_Sub22 method16108(OutgoingPacket class408, Class11 class11) {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -57);
		class523_sub22.aClass408_10524 = class408;
		class523_sub22.anInt10523 = class408.anInt4328 * -66856601;
		if (class523_sub22.anInt10523 * -764738435 == -1)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		else if (-2 == class523_sub22.anInt10523 * -764738435)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(10000);
		else if (class523_sub22.anInt10523 * -764738435 <= 18)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(20);
		else if (class523_sub22.anInt10523 * -764738435 <= 98)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(100);
		else
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18218(class11, 584215851);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18219(820957581 * class523_sub22.aClass408_10524.anInt4327, 1786544784);
		class523_sub22.anInt10522 = 0;
		return class523_sub22;
	}

	public static Class523_Sub22 method16109() {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -60);
		class523_sub22.aClass408_10524 = null;
		class523_sub22.anInt10523 = 0;
		class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(5000);
		return class523_sub22;
	}

	public static Class523_Sub22 method16110(OutgoingPacket class408, Class11 class11) {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -30);
		class523_sub22.aClass408_10524 = class408;
		class523_sub22.anInt10523 = class408.anInt4328 * -66856601;
		if (class523_sub22.anInt10523 * -764738435 == -1)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		else if (-2 == class523_sub22.anInt10523 * -764738435)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(10000);
		else if (class523_sub22.anInt10523 * -764738435 <= 18)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(20);
		else if (class523_sub22.anInt10523 * -764738435 <= 98)
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(100);
		else
			class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(260);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18218(class11, -199235712);
		class523_sub22.aClass523_Sub34_Sub2_10525.method18219(820957581 * class523_sub22.aClass408_10524.anInt4327, 1786544784);
		class523_sub22.anInt10522 = 0;
		return class523_sub22;
	}

	public static Class523_Sub22 method16111() {
		Class523_Sub22 class523_sub22 = Class68.method1462((byte) -50);
		class523_sub22.aClass408_10524 = null;
		class523_sub22.anInt10523 = 0;
		class523_sub22.aClass523_Sub34_Sub2_10525 = new RSBitBuffer(5000);
		return class523_sub22;
	}

	Class523_Sub22() {
		/* empty */
	}

	public void method16112() {
		if (anInt10527 * 229380129 < aClass523_Sub22Array10526.length)
			aClass523_Sub22Array10526[((anInt10527 += -878218271) * 229380129 - 1)] = this;
	}

	public void method16113() {
		if (anInt10527 * 229380129 < aClass523_Sub22Array10526.length)
			aClass523_Sub22Array10526[((anInt10527 += -878218271) * 229380129 - 1)] = this;
	}

	static final void method16114(Class669 class669, int i) {
		class669.anInt8558 -= -34844996;
		int i_0_ = class669.anIntArray8557[class669.anInt8558 * 1357652815];
		int i_1_ = class669.anIntArray8557[1357652815 * class669.anInt8558 + 1];
		int i_2_ = class669.anIntArray8557[2 + 1357652815 * class669.anInt8558];
		int i_3_ = class669.anIntArray8557[1357652815 * class669.anInt8558 + 3];
		i_0_ += i_1_ << 14;
		i_0_ += i_2_ << 28;
		i_0_ += i_3_;
		class669.anIntArray8557[(class669.anInt8558 += 2138772399) * 1357652815 - 1] = i_0_;
	}

	public static final void method16115(boolean bool, int i, int i_4_) {
		Class523_Sub19 class523_sub19 = (bool ? Class673.aClass523_Sub19_8611 : Class675.aClass523_Sub19_8632);
		if (class523_sub19 != null && i >= 0 && i < class523_sub19.anInt10486 * 1969304563) {
			Class338 class338 = class523_sub19.aClass338Array10485[i];
			if (class338.aByte3571 == -1) {
				String string = class338.aString3573;
				RSStream class116 = Class537.method8941(-1892084094);
				Class523_Sub22 class523_sub22 = Class523_Sub18.method16042(OutgoingPacket.aClass408_4270, class116.aClass11_1413, 1370050649);
				class523_sub22.aClass523_Sub34_Sub2_10525.writeByte(3 + Class6.method555(string, (byte) -41), 381619617);
				class523_sub22.aClass523_Sub34_Sub2_10525.writeByte(bool ? 1 : 0, 1677395343);
				class523_sub22.aClass523_Sub34_Sub2_10525.writeShort(i, (byte) -89);
				class523_sub22.aClass523_Sub34_Sub2_10525.method16270(string, (byte) -13);
				class116.method1974(class523_sub22, (byte) 15);
			}
		}
	}
}
