package jagex;

/* Class420 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class420 {
	static final int anInt4959 = 3;
	long aLong4960;
	Class675 aClass675_4961;
	long aLong4962 = 3733995183445817621L;
	static final int anInt4963 = 2;
	static final int anInt4964 = 5;
	static final int anInt4965 = 1;
	static final int anInt4966 = 4;
	public static Class20 aClass20_4967;

	public Class420(RSByteBuffer class572_sub15) {
		((Class420) this).aClass675_4961 = new Class675();
		method5131(class572_sub15, 1935471511);
	}

	public void method5126(Class572_Sub10 class572_sub10, int i) {
		if ((((Class420) this).aLong4960 * -952788409284164339L != class572_sub10.hash * 381237825124074065L) || (360981644941472195L * ((Class420) this).aLong4962 != (-7690174135847439505L * ((Class572_Sub10) class572_sub10).aLong9087)))
			throw new RuntimeException("");
		for (Class572_Sub3 class572_sub3 = ((Class572_Sub3) ((Class420) this).aClass675_4961.method7932((byte) 50)); class572_sub3 != null; class572_sub3 = (Class572_Sub3) ((Class420) this).aClass675_4961.method7926(1181995348))
			class572_sub3.method8261(class572_sub10, -1460380477);
		((Class572_Sub10) class572_sub10).aLong9087 += 4924797088330419087L;
	}

	void method5127(RSByteBuffer class572_sub15) {
		((Class420) this).aLong4960 = class572_sub15.method8476((byte) 4) * 7614253519163183557L;
		((Class420) this).aLong4962 = class572_sub15.method8476((byte) 4) * -3733995183445817621L;
		for (int i = class572_sub15.readUnsignedByte(1875659977); 0 != i; i = class572_sub15.readUnsignedByte(1074255012)) {
			Class572_Sub3 class572_sub3;
			if (1 == i)
				class572_sub3 = new Class572_Sub3_Sub5(this);
			else if (4 == i)
				class572_sub3 = new Class572_Sub3_Sub1(this);
			else if (3 == i)
				class572_sub3 = new Class572_Sub3_Sub3(this);
			else if (i == 2)
				class572_sub3 = new Class572_Sub3_Sub2(this);
			else if (5 == i)
				class572_sub3 = new Class572_Sub3_Sub4(this);
			else
				throw new RuntimeException("");
			class572_sub3.method8262(class572_sub15, 882084657);
			((Class420) this).aClass675_4961.method7940(class572_sub3, -1618347909);
		}
	}

	void method5128(RSByteBuffer class572_sub15) {
		((Class420) this).aLong4960 = class572_sub15.method8476((byte) 4) * 7614253519163183557L;
		((Class420) this).aLong4962 = class572_sub15.method8476((byte) 4) * -3733995183445817621L;
		for (int i = class572_sub15.readUnsignedByte(1133957568); 0 != i; i = class572_sub15.readUnsignedByte(86212421)) {
			Class572_Sub3 class572_sub3;
			if (1 == i)
				class572_sub3 = new Class572_Sub3_Sub5(this);
			else if (4 == i)
				class572_sub3 = new Class572_Sub3_Sub1(this);
			else if (3 == i)
				class572_sub3 = new Class572_Sub3_Sub3(this);
			else if (i == 2)
				class572_sub3 = new Class572_Sub3_Sub2(this);
			else if (5 == i)
				class572_sub3 = new Class572_Sub3_Sub4(this);
			else
				throw new RuntimeException("");
			class572_sub3.method8262(class572_sub15, 641469232);
			((Class420) this).aClass675_4961.method7940(class572_sub3, -1966902181);
		}
	}

	void method5129(RSByteBuffer class572_sub15) {
		((Class420) this).aLong4960 = class572_sub15.method8476((byte) 4) * 7614253519163183557L;
		((Class420) this).aLong4962 = class572_sub15.method8476((byte) 4) * -3733995183445817621L;
		for (int i = class572_sub15.readUnsignedByte(1703086555); 0 != i; i = class572_sub15.readUnsignedByte(1762057373)) {
			Class572_Sub3 class572_sub3;
			if (1 == i)
				class572_sub3 = new Class572_Sub3_Sub5(this);
			else if (4 == i)
				class572_sub3 = new Class572_Sub3_Sub1(this);
			else if (3 == i)
				class572_sub3 = new Class572_Sub3_Sub3(this);
			else if (i == 2)
				class572_sub3 = new Class572_Sub3_Sub2(this);
			else if (5 == i)
				class572_sub3 = new Class572_Sub3_Sub4(this);
			else
				throw new RuntimeException("");
			class572_sub3.method8262(class572_sub15, 1523830849);
			((Class420) this).aClass675_4961.method7940(class572_sub3, -1637673016);
		}
	}

	void method5130(RSByteBuffer class572_sub15) {
		((Class420) this).aLong4960 = class572_sub15.method8476((byte) 4) * 7614253519163183557L;
		((Class420) this).aLong4962 = class572_sub15.method8476((byte) 4) * -3733995183445817621L;
		for (int i = class572_sub15.readUnsignedByte(1136605811); 0 != i; i = class572_sub15.readUnsignedByte(59669330)) {
			Class572_Sub3 class572_sub3;
			if (1 == i)
				class572_sub3 = new Class572_Sub3_Sub5(this);
			else if (4 == i)
				class572_sub3 = new Class572_Sub3_Sub1(this);
			else if (3 == i)
				class572_sub3 = new Class572_Sub3_Sub3(this);
			else if (i == 2)
				class572_sub3 = new Class572_Sub3_Sub2(this);
			else if (5 == i)
				class572_sub3 = new Class572_Sub3_Sub4(this);
			else
				throw new RuntimeException("");
			class572_sub3.method8262(class572_sub15, 1492541120);
			((Class420) this).aClass675_4961.method7940(class572_sub3, -1630100203);
		}
	}

	void method5131(RSByteBuffer class572_sub15, int i) {
		((Class420) this).aLong4960 = class572_sub15.method8476((byte) 4) * 7614253519163183557L;
		((Class420) this).aLong4962 = class572_sub15.method8476((byte) 4) * -3733995183445817621L;
		for (int i_0_ = class572_sub15.readUnsignedByte(1838774658); 0 != i_0_; i_0_ = class572_sub15.readUnsignedByte(168750195)) {
			Class572_Sub3 class572_sub3;
			if (1 == i_0_)
				class572_sub3 = new Class572_Sub3_Sub5(this);
			else if (4 == i_0_)
				class572_sub3 = new Class572_Sub3_Sub1(this);
			else if (3 == i_0_)
				class572_sub3 = new Class572_Sub3_Sub3(this);
			else if (i_0_ == 2)
				class572_sub3 = new Class572_Sub3_Sub2(this);
			else if (5 == i_0_)
				class572_sub3 = new Class572_Sub3_Sub4(this);
			else
				throw new RuntimeException("");
			class572_sub3.method8262(class572_sub15, 740135809);
			((Class420) this).aClass675_4961.method7940(class572_sub3, -1984233097);
		}
	}

	static final void method5132(InterfaceDefinitions class73, Class83 class83, Cs2Executor class441, int i) {
		((Cs2Executor) class441).intStackPtr -= -2084135730;
		class73.anInt766 = (((Cs2Executor) class441).intStack[((Cs2Executor) class441).intStackPtr * 1369304407]) * 1353624187;
		class73.anInt767 = ((((Cs2Executor) class441).intStack[((Cs2Executor) class441).intStackPtr * 1369304407 + 1]) * 1313236403);
		Class555.method6575(class73, (short) 16736);
		Class179_Sub1.method9993(class83, class73, 1169530753);
		if (class73.anInt752 * -1285279191 == 0)
			Class496.method5923(class83, class73, false, (byte) 11);
	}

	static final void method5133(Cs2Executor class441, byte i) {
		Class572_Sub12_Sub10 class572_sub12_sub10 = ScriptVarType.method3828(1084921705);
		if (Class572_Sub8.method8393(class572_sub12_sub10, -854601167) == 7) {
			int i_1_ = (int) class572_sub12_sub10.method10331(-852441952);
			if (i_1_ >= 0 && i_1_ <= 1657484935 * Class184.anInt2163) {
				Player class456_sub1_sub2_sub3_sub2 = client.aClass456_Sub1_Sub2_Sub3_Sub2Array8727[i_1_];
				if (class456_sub1_sub2_sub3_sub2 != null) {
					((Cs2Executor) class441).entity = class456_sub1_sub2_sub3_sub2;
					((Cs2Executor) class441).intStack[((((Cs2Executor) class441).intStackPtr += -1042067865) * 1369304407) - 1] = 1;
					return;
				}
			}
		}
		((Cs2Executor) class441).intStack[(((Cs2Executor) class441).intStackPtr += -1042067865) * 1369304407 - 1] = 0;
	}

	static Class634 method5134(ItemDefinitions class631, RSByteBuffer class572_sub15, int i, int i_2_) {
		Class634 class634 = new Class634(class631);
		int i_3_ = class572_sub15.readUnsignedByte(492248974);
		boolean bool = 0 != (i_3_ & 0x1);
		boolean bool_4_ = 0 != (i_3_ & 0x2);
		boolean bool_5_ = 0 != (i_3_ & 0x4);
		boolean bool_6_ = 0 != (i_3_ & 0x8);
		if (bool) {
			if (i <= 1) {
				class634.anIntArray8216[0] = class572_sub15.readUnsignedShort(647518597);
				class634.anIntArray8217[0] = class572_sub15.readUnsignedShort(647518597);
			} else {
				class634.anIntArray8216[0] = class572_sub15.readBigSmart((byte) 73);
				class634.anIntArray8217[0] = class572_sub15.readBigSmart((byte) 118);
			}
			if (1523363687 * ((ItemDefinitions) class631).anInt8132 != -1 || -1581685779 * ((ItemDefinitions) class631).anInt8154 != -1) {
				if (i <= 1) {
					class634.anIntArray8216[1] = class572_sub15.readUnsignedShort(647518597);
					class634.anIntArray8217[1] = class572_sub15.readUnsignedShort(647518597);
				} else {
					class634.anIntArray8216[1] = class572_sub15.readBigSmart((byte) 81);
					class634.anIntArray8217[1] = class572_sub15.readBigSmart((byte) 73);
				}
			}
			if (-1 != 1059235147 * ((ItemDefinitions) class631).anInt8155 || -1 != ((ItemDefinitions) class631).anInt8156 * -2097304909) {
				if (i <= 1) {
					class634.anIntArray8216[2] = class572_sub15.readUnsignedShort(647518597);
					class634.anIntArray8217[2] = class572_sub15.readUnsignedShort(647518597);
				} else {
					class634.anIntArray8216[2] = class572_sub15.readBigSmart((byte) 96);
					class634.anIntArray8217[2] = class572_sub15.readBigSmart((byte) 113);
				}
			}
		}
		if (bool_4_) {
			if (i <= 1) {
				class634.anIntArray8211[0] = class572_sub15.readUnsignedShort(647518597);
				class634.anIntArray8219[0] = class572_sub15.readUnsignedShort(647518597);
			} else {
				class634.anIntArray8211[0] = class572_sub15.readBigSmart((byte) 9);
				class634.anIntArray8219[0] = class572_sub15.readBigSmart((byte) 13);
			}
			if (1748753175 * ((ItemDefinitions) class631).anInt8164 != -1 || -1329940367 * ((ItemDefinitions) class631).anInt8148 != -1) {
				if (i <= 1) {
					class634.anIntArray8211[1] = class572_sub15.readUnsignedShort(647518597);
					class634.anIntArray8219[1] = class572_sub15.readUnsignedShort(647518597);
				} else {
					class634.anIntArray8211[1] = class572_sub15.readBigSmart((byte) 125);
					class634.anIntArray8219[1] = class572_sub15.readBigSmart((byte) 30);
				}
			}
		}
		if (bool_5_) {
			int i_7_ = class572_sub15.readUnsignedShort(647518597);
			int[] is = new int[4];
			is[0] = i_7_ & 0xf;
			is[1] = i_7_ >> 4 & 0xf;
			is[2] = i_7_ >> 8 & 0xf;
			is[3] = i_7_ >> 12 & 0xf;
			for (int i_8_ = 0; i_8_ < 4; i_8_++) {
				if (is[i_8_] != 15)
					class634.aShortArray8220[is[i_8_]] = (short) class572_sub15.readUnsignedShort(647518597);
			}
		}
		if (bool_6_) {
			int i_9_ = class572_sub15.readUnsignedByte(592160516);
			int[] is = new int[2];
			is[0] = i_9_ & 0xf;
			is[1] = i_9_ >> 4 & 0xf;
			for (int i_10_ = 0; i_10_ < 2; i_10_++) {
				if (is[i_10_] != 15)
					class634.aShortArray8221[is[i_10_]] = (short) class572_sub15.readUnsignedShort(647518597);
			}
		}
		return class634;
	}

	static final void method5135(Cs2Executor class441, int i) {
		((Cs2Executor) class441).intStack[(((Cs2Executor) class441).intStackPtr += -1042067865) * 1369304407 - 1] = Class213.aClass572_Sub24_2463.aClass665_Sub11_9219.method8203(1515773199) == 1 ? 1 : 0;
	}

	static void method5136(Cs2Executor class441, int i) {
		((Cs2Executor) class441).intStackPtr -= -2084135730;
		((Cs2Executor) class441).intStack[1369304407 * ((Cs2Executor) class441).intStackPtr] = Class232.method3215((((Cs2Executor) class441).intStack[(((Cs2Executor) class441).intStackPtr * 1369304407)]), (((Cs2Executor) class441).intStack[1 + (((Cs2Executor) class441).intStackPtr * 1369304407)]), -1270647478);
		((Cs2Executor) class441).intStackPtr += -1042067865;
	}
}
