/* Class387 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.nio.ByteBuffer;

public class Class387
{
    Interface31 anInterface31_5644;
    Interface36 anInterface36_5645;
    Class367 aClass367_5646;
    int anInt5647 = 1600;
    int anInt5648 = 64;
    int anInt5649 = 768;
    int anInt5650 = 64;
    int anInt5651;
    int[] anIntArray5652;
    int[] anIntArray5653;
    Interface36 anInterface36_5654;
    Class249_Sub5_Sub1[][] aClass249_Sub5_Sub1ArrayArray5655;
    int[] anIntArray5656;
    Class249_Sub5_Sub1[][] aClass249_Sub5_Sub1ArrayArray5657;
    int anInt5658;
    static float aFloat5659;
    
    void method7114(Class87_Sub2 class87_sub2, Class104 class104) {
	class87_sub2.method2281(false);
	aFloat5659 = class87_sub2.aFloat9145;
	float f = class87_sub2.aClass276_9230.aFloatArray4141[2];
	float f_0_ = class87_sub2.aClass276_9230.aFloatArray4141[6];
	float f_1_ = class87_sub2.aClass276_9230.aFloatArray4141[10];
	float f_2_ = class87_sub2.aClass276_9230.aFloatArray4141[14];
	int i = 0;
	int i_3_ = 2147483647;
	int i_4_ = 0;
	Class249_Sub5 class249_sub5
	    = class104.aClass426_1244.aClass249_Sub5_6127;
	for (Class249_Sub5 class249_sub5_5_
		 = class249_sub5.aClass249_Sub5_10025;
	     class249_sub5_5_ != class249_sub5;
	     class249_sub5_5_ = class249_sub5_5_.aClass249_Sub5_10025) {
	    Class249_Sub5_Sub1 class249_sub5_sub1
		= (Class249_Sub5_Sub1) class249_sub5_5_;
	    int i_6_
		= (int) (f * (float) (class249_sub5_sub1.anInt10929 >> 12)
			 + f_0_ * (float) (class249_sub5_sub1.anInt10930 >> 12)
			 + f_1_ * (float) (class249_sub5_sub1.anInt10931 >> 12)
			 + f_2_);
	    if (i_6_ > i_4_)
		i_4_ = i_6_;
	    if (i_6_ < i_3_)
		i_3_ = i_6_;
	    ((Class387) this).anIntArray5653[i++] = i_6_;
	}
	int i_7_ = i_4_ - i_3_;
	int i_8_;
	if (i_7_ + 2 > 1600) {
	    i_8_ = (1 + Class94.method2530(i_7_, 1481177278)
		    - ((Class387) this).anInt5651);
	    i_7_ = (i_7_ >> i_8_) + 2;
	} else {
	    i_8_ = 0;
	    i_7_ += 2;
	}
	class87_sub2.method15692(((Class387) this).anInterface31_5644);
	Class373 class373 = ((Class87_Sub2) class87_sub2).aClass373_9159;
	class373.method6960(Class276.aClass276_4142);
	class373.aClass276_5570.method5472();
	class373.anInt5567 = -1;
	boolean bool = class87_sub2.anInt9169 > 0;
	if (bool) {
	    class373.aClass260_5566.method5124(0.0F, 0.0F, 1.0F,
					       -class87_sub2.aFloat9264);
	    class373.aClass275_5569.method5363
		((float) (class87_sub2.anInt9147 >> 16 & 0xff) / 255.0F,
		 (float) (class87_sub2.anInt9147 >> 8 & 0xff) / 255.0F,
		 (float) (class87_sub2.anInt9147 >> 0 & 0xff) / 255.0F);
	    class373.aClass260_5566
		.method5119(((Class87_Sub2) class87_sub2).aClass276_9204);
	    class373.aClass260_5566.method5118(1.0F
					       / (class87_sub2.aFloat9130
						  - class87_sub2.aFloat9264));
	} else {
	    class373.aClass260_5566.method5124(0.0F, 0.0F, 0.0F, 0.0F);
	    class373.aClass275_5569.method5363(0.0F, 0.0F, 0.0F);
	}
	method7122(class87_sub2, class249_sub5, i_7_, i_3_, i_8_, class373,
		   bool);
	if (class87_sub2.aFloat9145 != aFloat5659)
	    class87_sub2.method2311(aFloat5659);
	class87_sub2.method2281(true);
    }
    
    void method7115(Class87_Sub2 class87_sub2) {
	((Class387) this).anInterface36_5654.method226(786336, 24);
    }
    
    void method7116(Class87_Sub2 class87_sub2, Class249_Sub5 class249_sub5,
		    int i, int i_9_, int i_10_, Class373 class373,
		    boolean bool) {
	Class249_Sub5 class249_sub5_11_ = class249_sub5.aClass249_Sub5_10025;
	int i_12_ = 0;
	int i_13_ = -2;
	boolean bool_14_ = true;
	boolean bool_15_ = true;
	while (class249_sub5_11_ != class249_sub5) {
	    ((Class387) this).anInt5658 = 0;
	    for (int i_16_ = 0; i_16_ < i; i_16_++)
		((Class387) this).anIntArray5656[i_16_] = 0;
	    for (int i_17_ = 0; i_17_ < 64; i_17_++)
		((Class387) this).anIntArray5652[i_17_] = 0;
	    for (/**/; class249_sub5_11_ != class249_sub5;
		 class249_sub5_11_ = class249_sub5_11_.aClass249_Sub5_10025) {
		Class249_Sub5_Sub1 class249_sub5_sub1
		    = (Class249_Sub5_Sub1) class249_sub5_11_;
		if (bool_15_) {
		    i_13_ = class249_sub5_sub1.anInt10933;
		    bool_14_ = class249_sub5_sub1.aBool10935;
		    bool_15_ = false;
		}
		if (i_12_ > 0
		    && (i_13_ != class249_sub5_sub1.anInt10933
			|| bool_14_ != class249_sub5_sub1.aBool10935)) {
		    bool_15_ = true;
		    break;
		}
		method7124((((Class387) this).anIntArray5653[i_12_++] - i_9_
			    >> i_10_),
			   class249_sub5_sub1);
	    }
	    class373.anInterface40_5565 = null;
	    if (i_13_ >= 0) {
		Class160 class160
		    = class87_sub2.aClass106_981.method2798(i_13_, -648938266);
		if (class160.anInt1867 * 1599613663 != -1)
		    class373.anInterface40_5565
			= ((Class87_Sub2) class87_sub2).aClass380_9232
			      .method7024(class160);
	    }
	    if (bool_14_ && class87_sub2.aFloat9145 != aFloat5659)
		class87_sub2.method2311(aFloat5659);
	    else if (class87_sub2.aFloat9145 != 1.0F)
		class87_sub2.method2311(1.0F);
	    method7120(class87_sub2, i, bool);
	}
    }
    
    void method7117(Class87_Sub2 class87_sub2, Class104 class104) {
	class87_sub2.method2281(false);
	aFloat5659 = class87_sub2.aFloat9145;
	float f = class87_sub2.aClass276_9230.aFloatArray4141[2];
	float f_18_ = class87_sub2.aClass276_9230.aFloatArray4141[6];
	float f_19_ = class87_sub2.aClass276_9230.aFloatArray4141[10];
	float f_20_ = class87_sub2.aClass276_9230.aFloatArray4141[14];
	int i = 0;
	int i_21_ = 2147483647;
	int i_22_ = 0;
	Class249_Sub5 class249_sub5
	    = class104.aClass426_1244.aClass249_Sub5_6127;
	for (Class249_Sub5 class249_sub5_23_
		 = class249_sub5.aClass249_Sub5_10025;
	     class249_sub5_23_ != class249_sub5;
	     class249_sub5_23_ = class249_sub5_23_.aClass249_Sub5_10025) {
	    Class249_Sub5_Sub1 class249_sub5_sub1
		= (Class249_Sub5_Sub1) class249_sub5_23_;
	    int i_24_
		= (int) (f * (float) (class249_sub5_sub1.anInt10929 >> 12)
			 + f_18_ * (float) (class249_sub5_sub1.anInt10930
					    >> 12)
			 + f_19_ * (float) (class249_sub5_sub1.anInt10931
					    >> 12)
			 + f_20_);
	    if (i_24_ > i_22_)
		i_22_ = i_24_;
	    if (i_24_ < i_21_)
		i_21_ = i_24_;
	    ((Class387) this).anIntArray5653[i++] = i_24_;
	}
	int i_25_ = i_22_ - i_21_;
	int i_26_;
	if (i_25_ + 2 > 1600) {
	    i_26_ = (1 + Class94.method2530(i_25_, 1481177278)
		     - ((Class387) this).anInt5651);
	    i_25_ = (i_25_ >> i_26_) + 2;
	} else {
	    i_26_ = 0;
	    i_25_ += 2;
	}
	class87_sub2.method15692(((Class387) this).anInterface31_5644);
	Class373 class373 = ((Class87_Sub2) class87_sub2).aClass373_9159;
	class373.method6960(Class276.aClass276_4142);
	class373.aClass276_5570.method5472();
	class373.anInt5567 = -1;
	boolean bool = class87_sub2.anInt9169 > 0;
	if (bool) {
	    class373.aClass260_5566.method5124(0.0F, 0.0F, 1.0F,
					       -class87_sub2.aFloat9264);
	    class373.aClass275_5569.method5363
		((float) (class87_sub2.anInt9147 >> 16 & 0xff) / 255.0F,
		 (float) (class87_sub2.anInt9147 >> 8 & 0xff) / 255.0F,
		 (float) (class87_sub2.anInt9147 >> 0 & 0xff) / 255.0F);
	    class373.aClass260_5566
		.method5119(((Class87_Sub2) class87_sub2).aClass276_9204);
	    class373.aClass260_5566.method5118(1.0F
					       / (class87_sub2.aFloat9130
						  - class87_sub2.aFloat9264));
	} else {
	    class373.aClass260_5566.method5124(0.0F, 0.0F, 0.0F, 0.0F);
	    class373.aClass275_5569.method5363(0.0F, 0.0F, 0.0F);
	}
	method7122(class87_sub2, class249_sub5, i_25_, i_21_, i_26_, class373,
		   bool);
	if (class87_sub2.aFloat9145 != aFloat5659)
	    class87_sub2.method2311(aFloat5659);
	class87_sub2.method2281(true);
    }
    
    void method7118(Class87_Sub2 class87_sub2, Class249_Sub5 class249_sub5,
		    int i, int i_27_, int i_28_, Class373 class373,
		    boolean bool) {
	Class249_Sub5 class249_sub5_29_ = class249_sub5.aClass249_Sub5_10025;
	int i_30_ = 0;
	int i_31_ = -2;
	boolean bool_32_ = true;
	boolean bool_33_ = true;
	while (class249_sub5_29_ != class249_sub5) {
	    ((Class387) this).anInt5658 = 0;
	    for (int i_34_ = 0; i_34_ < i; i_34_++)
		((Class387) this).anIntArray5656[i_34_] = 0;
	    for (int i_35_ = 0; i_35_ < 64; i_35_++)
		((Class387) this).anIntArray5652[i_35_] = 0;
	    for (/**/; class249_sub5_29_ != class249_sub5;
		 class249_sub5_29_ = class249_sub5_29_.aClass249_Sub5_10025) {
		Class249_Sub5_Sub1 class249_sub5_sub1
		    = (Class249_Sub5_Sub1) class249_sub5_29_;
		if (bool_33_) {
		    i_31_ = class249_sub5_sub1.anInt10933;
		    bool_32_ = class249_sub5_sub1.aBool10935;
		    bool_33_ = false;
		}
		if (i_30_ > 0
		    && (i_31_ != class249_sub5_sub1.anInt10933
			|| bool_32_ != class249_sub5_sub1.aBool10935)) {
		    bool_33_ = true;
		    break;
		}
		method7124((((Class387) this).anIntArray5653[i_30_++] - i_27_
			    >> i_28_),
			   class249_sub5_sub1);
	    }
	    class373.anInterface40_5565 = null;
	    if (i_31_ >= 0) {
		Class160 class160
		    = class87_sub2.aClass106_981.method2798(i_31_,
							    -1526514906);
		if (class160.anInt1867 * 1599613663 != -1)
		    class373.anInterface40_5565
			= ((Class87_Sub2) class87_sub2).aClass380_9232
			      .method7024(class160);
	    }
	    if (bool_32_ && class87_sub2.aFloat9145 != aFloat5659)
		class87_sub2.method2311(aFloat5659);
	    else if (class87_sub2.aFloat9145 != 1.0F)
		class87_sub2.method2311(1.0F);
	    method7120(class87_sub2, i, bool);
	}
    }
    
    void method7119() {
	((Class387) this).anInterface36_5654.method23();
    }
    
    void method7120(Class87_Sub2 class87_sub2, int i, boolean bool) {
	int i_36_ = 0;
	Class276 class276 = class87_sub2.aClass276_9230;
	float f = class276.aFloatArray4141[0];
	float f_37_ = class276.aFloatArray4141[4];
	float f_38_ = class276.aFloatArray4141[8];
	float f_39_ = class276.aFloatArray4141[1];
	float f_40_ = class276.aFloatArray4141[5];
	float f_41_ = class276.aFloatArray4141[9];
	float f_42_ = f + f_39_;
	float f_43_ = f_37_ + f_40_;
	float f_44_ = f_38_ + f_41_;
	float f_45_ = f - f_39_;
	float f_46_ = f_37_ - f_40_;
	float f_47_ = f_38_ - f_41_;
	float f_48_ = f_39_ - f;
	float f_49_ = f_40_ - f_37_;
	float f_50_ = f_41_ - f_38_;
	float[] fs = new float[3];
	float[] fs_51_ = new float[3];
	class87_sub2.aClass276_9187
	    .method5483(((Class87_Sub2) class87_sub2).aClass276_9155);
	ByteBuffer bytebuffer = class87_sub2.aByteBuffer9139;
	bytebuffer.clear();
	for (int i_52_ = i - 1; i_52_ >= 0; i_52_--) {
	    int i_53_ = (((Class387) this).anIntArray5656[i_52_] > 64 ? 64
			 : ((Class387) this).anIntArray5656[i_52_]);
	    if (i_53_ > 0) {
		for (int i_54_ = i_53_ - 1; i_54_ >= 0; i_54_--) {
		    Class249_Sub5_Sub1 class249_sub5_sub1
			= (((Class387) this).aClass249_Sub5_Sub1ArrayArray5657
			   [i_52_][i_54_]);
		    int i_55_ = class249_sub5_sub1.anInt10928;
		    byte i_56_ = (byte) (i_55_ >> 16);
		    byte i_57_ = (byte) (i_55_ >> 8);
		    byte i_58_ = (byte) i_55_;
		    byte i_59_ = (byte) (i_55_ >>> 24);
		    if (((Class87_Sub2) class87_sub2).anInt9275 == 0) {
			byte i_60_ = i_56_;
			i_56_ = i_58_;
			i_58_ = i_60_;
		    }
		    float f_61_
			= (float) (class249_sub5_sub1.anInt10929 >> 12);
		    float f_62_
			= (float) (class249_sub5_sub1.anInt10930 >> 12);
		    float f_63_
			= (float) (class249_sub5_sub1.anInt10931 >> 12);
		    int i_64_ = class249_sub5_sub1.anInt10926 >> 12;
		    if (class249_sub5_sub1.aShort10934 != 0) {
			((Class87_Sub2) class87_sub2).aClass276_9161.method5546
			    (class249_sub5_sub1.aShort10934, i_64_, i_64_,
			     0.0F, 0.0F, 0.0F);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5537(class87_sub2.aClass276_9187);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5463(1.0F, 0.0F, 0.0F, fs);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5463(0.0F, 1.0F, 0.0F, fs_51_);
			bytebuffer.putFloat(f_61_ - fs[0] - fs_51_[0]);
			bytebuffer.putFloat(f_62_ - fs[1] - fs_51_[1]);
			bytebuffer.putFloat(f_63_ - fs[2] - fs_51_[2]);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_61_ - fs[0] + fs_51_[0]);
			bytebuffer.putFloat(f_62_ - fs[1] + fs_51_[1]);
			bytebuffer.putFloat(f_63_ - fs[2] + fs_51_[2]);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_61_ + fs[0] + fs_51_[0]);
			bytebuffer.putFloat(f_62_ + fs[1] + fs_51_[1]);
			bytebuffer.putFloat(f_63_ + fs[2] + fs_51_[2]);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_61_ + fs[0] - fs_51_[0]);
			bytebuffer.putFloat(f_62_ + fs[1] - fs_51_[1]);
			bytebuffer.putFloat(f_63_ + fs[2] - fs_51_[2]);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(0.0F);
		    } else {
			bytebuffer.putFloat(f_61_ + f_42_ * (float) -i_64_);
			bytebuffer.putFloat(f_62_ + f_43_ * (float) -i_64_);
			bytebuffer.putFloat(f_63_ + f_44_ * (float) -i_64_);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_61_ + f_48_ * (float) i_64_);
			bytebuffer.putFloat(f_62_ + f_49_ * (float) i_64_);
			bytebuffer.putFloat(f_63_ + f_50_ * (float) i_64_);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_61_ + f_42_ * (float) i_64_);
			bytebuffer.putFloat(f_62_ + f_43_ * (float) i_64_);
			bytebuffer.putFloat(f_63_ + f_44_ * (float) i_64_);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_61_ + f_45_ * (float) i_64_);
			bytebuffer.putFloat(f_62_ + f_46_ * (float) i_64_);
			bytebuffer.putFloat(f_63_ + f_47_ * (float) i_64_);
			bytebuffer.put(i_56_);
			bytebuffer.put(i_57_);
			bytebuffer.put(i_58_);
			bytebuffer.put(i_59_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(0.0F);
		    }
		    i_36_++;
		}
		if (((Class387) this).anIntArray5656[i_52_] > 64) {
		    int i_65_
			= ((Class387) this).anIntArray5656[i_52_] - 64 - 1;
		    for (int i_66_
			     = ((Class387) this).anIntArray5652[i_65_] - 1;
			 i_66_ >= 0; i_66_--) {
			Class249_Sub5_Sub1 class249_sub5_sub1
			    = (((Class387) this)
			       .aClass249_Sub5_Sub1ArrayArray5655[i_65_]
			       [i_66_]);
			int i_67_ = class249_sub5_sub1.anInt10928;
			byte i_68_ = (byte) (i_67_ >> 16);
			byte i_69_ = (byte) (i_67_ >> 8);
			byte i_70_ = (byte) i_67_;
			byte i_71_ = (byte) (i_67_ >>> 24);
			float f_72_
			    = (float) (class249_sub5_sub1.anInt10929 >> 12);
			float f_73_
			    = (float) (class249_sub5_sub1.anInt10930 >> 12);
			float f_74_
			    = (float) (class249_sub5_sub1.anInt10931 >> 12);
			int i_75_ = class249_sub5_sub1.anInt10926 >> 12;
			if (((Class87_Sub2) class87_sub2).anInt9275 == 0) {
			    byte i_76_ = i_68_;
			    i_68_ = i_70_;
			    i_70_ = i_76_;
			}
			if (class249_sub5_sub1.aShort10934 != 0) {
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5546
				(class249_sub5_sub1.aShort10934, i_75_, i_75_,
				 0.0F, 0.0F, 0.0F);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5537(class87_sub2.aClass276_9187);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5463(1.0F, 0.0F, 0.0F, fs);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5463(0.0F, 1.0F, 0.0F, fs_51_);
			    bytebuffer.putFloat(f_72_ - fs[0] - fs_51_[0]);
			    bytebuffer.putFloat(f_73_ - fs[1] - fs_51_[1]);
			    bytebuffer.putFloat(f_74_ - fs[2] - fs_51_[2]);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(f_72_ - fs[0] + fs_51_[0]);
			    bytebuffer.putFloat(f_73_ - fs[1] + fs_51_[1]);
			    bytebuffer.putFloat(f_74_ - fs[2] + fs_51_[2]);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_72_ + fs[0] + fs_51_[0]);
			    bytebuffer.putFloat(f_73_ + fs[1] + fs_51_[1]);
			    bytebuffer.putFloat(f_74_ + fs[2] + fs_51_[2]);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_72_ + fs[0] - fs_51_[0]);
			    bytebuffer.putFloat(f_73_ + fs[1] - fs_51_[1]);
			    bytebuffer.putFloat(f_74_ + fs[2] - fs_51_[2]);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(0.0F);
			} else {
			    bytebuffer
				.putFloat(f_72_ + f_42_ * (float) -i_75_);
			    bytebuffer
				.putFloat(f_73_ + f_43_ * (float) -i_75_);
			    bytebuffer
				.putFloat(f_74_ + f_44_ * (float) -i_75_);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(f_72_ + f_48_ * (float) i_75_);
			    bytebuffer.putFloat(f_73_ + f_49_ * (float) i_75_);
			    bytebuffer.putFloat(f_74_ + f_50_ * (float) i_75_);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_72_ + f_42_ * (float) i_75_);
			    bytebuffer.putFloat(f_73_ + f_43_ * (float) i_75_);
			    bytebuffer.putFloat(f_74_ + f_44_ * (float) i_75_);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_72_ + f_45_ * (float) i_75_);
			    bytebuffer.putFloat(f_73_ + f_46_ * (float) i_75_);
			    bytebuffer.putFloat(f_74_ + f_47_ * (float) i_75_);
			    bytebuffer.put(i_68_);
			    bytebuffer.put(i_69_);
			    bytebuffer.put(i_70_);
			    bytebuffer.put(i_71_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(0.0F);
			}
			i_36_++;
		    }
		}
	    }
	}
	((Class387) this).anInterface36_5654
	    .method228(0, bytebuffer.position(), class87_sub2.aLong9140);
	class87_sub2.method15412(0, ((Class387) this).anInterface36_5654);
	class87_sub2.method15412(1, ((Class387) this).anInterface36_5645);
	class87_sub2.method15411(((Class387) this).aClass367_5646);
	Class373 class373 = ((Class87_Sub2) class87_sub2).aClass373_9159;
	class373.method6961(i_36_, bool);
    }
    
    void method7121(Class87_Sub2 class87_sub2) {
	((Class387) this).anInterface36_5654.method226(786336, 24);
    }
    
    void method7122(Class87_Sub2 class87_sub2, Class249_Sub5 class249_sub5,
		    int i, int i_77_, int i_78_, Class373 class373,
		    boolean bool) {
	Class249_Sub5 class249_sub5_79_ = class249_sub5.aClass249_Sub5_10025;
	int i_80_ = 0;
	int i_81_ = -2;
	boolean bool_82_ = true;
	boolean bool_83_ = true;
	while (class249_sub5_79_ != class249_sub5) {
	    ((Class387) this).anInt5658 = 0;
	    for (int i_84_ = 0; i_84_ < i; i_84_++)
		((Class387) this).anIntArray5656[i_84_] = 0;
	    for (int i_85_ = 0; i_85_ < 64; i_85_++)
		((Class387) this).anIntArray5652[i_85_] = 0;
	    for (/**/; class249_sub5_79_ != class249_sub5;
		 class249_sub5_79_ = class249_sub5_79_.aClass249_Sub5_10025) {
		Class249_Sub5_Sub1 class249_sub5_sub1
		    = (Class249_Sub5_Sub1) class249_sub5_79_;
		if (bool_83_) {
		    i_81_ = class249_sub5_sub1.anInt10933;
		    bool_82_ = class249_sub5_sub1.aBool10935;
		    bool_83_ = false;
		}
		if (i_80_ > 0
		    && (i_81_ != class249_sub5_sub1.anInt10933
			|| bool_82_ != class249_sub5_sub1.aBool10935)) {
		    bool_83_ = true;
		    break;
		}
		method7124((((Class387) this).anIntArray5653[i_80_++] - i_77_
			    >> i_78_),
			   class249_sub5_sub1);
	    }
	    class373.anInterface40_5565 = null;
	    if (i_81_ >= 0) {
		Class160 class160
		    = class87_sub2.aClass106_981.method2798(i_81_,
							    -1416234244);
		if (class160.anInt1867 * 1599613663 != -1)
		    class373.anInterface40_5565
			= ((Class87_Sub2) class87_sub2).aClass380_9232
			      .method7024(class160);
	    }
	    if (bool_82_ && class87_sub2.aFloat9145 != aFloat5659)
		class87_sub2.method2311(aFloat5659);
	    else if (class87_sub2.aFloat9145 != 1.0F)
		class87_sub2.method2311(1.0F);
	    method7120(class87_sub2, i, bool);
	}
    }
    
    void method7123(int i, Class249_Sub5_Sub1 class249_sub5_sub1) {
	if (i < 1600) {
	    if (((Class387) this).anIntArray5656[i] < 64)
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5657[i]
		    [((Class387) this).anIntArray5656[i]++]
		    = class249_sub5_sub1;
	    else {
		if (((Class387) this).anIntArray5656[i] == 64) {
		    if (((Class387) this).anInt5658 == 64)
			return;
		    ((Class387) this).anIntArray5656[i]
			+= 1 + ((Class387) this).anInt5658++;
		}
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5655
		    [((Class387) this).anIntArray5656[i] - 64 - 1]
		    [((Class387) this).anIntArray5652
			 [((Class387) this).anIntArray5656[i] - 64 - 1]++]
		    = class249_sub5_sub1;
	    }
	}
    }
    
    void method7124(int i, Class249_Sub5_Sub1 class249_sub5_sub1) {
	if (i < 1600) {
	    if (((Class387) this).anIntArray5656[i] < 64)
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5657[i]
		    [((Class387) this).anIntArray5656[i]++]
		    = class249_sub5_sub1;
	    else {
		if (((Class387) this).anIntArray5656[i] == 64) {
		    if (((Class387) this).anInt5658 == 64)
			return;
		    ((Class387) this).anIntArray5656[i]
			+= 1 + ((Class387) this).anInt5658++;
		}
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5655
		    [((Class387) this).anIntArray5656[i] - 64 - 1]
		    [((Class387) this).anIntArray5652
			 [((Class387) this).anIntArray5656[i] - 64 - 1]++]
		    = class249_sub5_sub1;
	    }
	}
    }
    
    Class387(Class87_Sub2 class87_sub2) {
	((Class387) this).anInt5647 = 1600;
	((Class387) this).anInt5651 = Class94.method2530(1600, 1481177278);
	((Class387) this).anInt5650 = 64;
	((Class387) this).anIntArray5653 = new int[8191];
	((Class387) this).anIntArray5656 = new int[1600];
	((Class387) this).anIntArray5652 = new int[64];
	((Class387) this).aClass249_Sub5_Sub1ArrayArray5657
	    = new Class249_Sub5_Sub1[1600][64];
	((Class387) this).aClass249_Sub5_Sub1ArrayArray5655
	    = new Class249_Sub5_Sub1[64][768];
	((Class387) this).anInt5658 = 0;
	((Class387) this).aClass367_5646
	    = (class87_sub2.method15410
	       (new Class378[]
		{ new Class378(new Class379[] { Class379.aClass379_5607,
						Class379.aClass379_5604,
						Class379.aClass379_5598 }),
		  new Class378(Class379.aClass379_5595) }));
	((Class387) this).anInterface36_5654 = class87_sub2.method15436(true);
	((Class387) this).anInterface36_5645 = class87_sub2.method15436(false);
	((Class387) this).anInterface36_5645.method226(393168, 12);
	((Class387) this).anInterface31_5644 = class87_sub2.method15408(false);
	((Class387) this).anInterface31_5644.method194(49146);
	ByteBuffer bytebuffer = class87_sub2.aByteBuffer9139;
	bytebuffer.clear();
	for (int i = 0; i < 8191; i++) {
	    int i_86_ = i * 4;
	    bytebuffer.putShort((short) i_86_);
	    bytebuffer.putShort((short) (i_86_ + 1));
	    bytebuffer.putShort((short) (i_86_ + 2));
	    bytebuffer.putShort((short) (i_86_ + 2));
	    bytebuffer.putShort((short) (i_86_ + 3));
	    bytebuffer.putShort((short) i_86_);
	}
	((Class387) this).anInterface31_5644
	    .method228(0, bytebuffer.position(), class87_sub2.aLong9140);
	bytebuffer.clear();
	for (int i = 0; i < 8191; i++) {
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(-1.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(-1.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(-1.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(0.0F);
	    bytebuffer.putFloat(-1.0F);
	    bytebuffer.putFloat(0.0F);
	}
	((Class387) this).anInterface36_5645
	    .method228(0, bytebuffer.position(), class87_sub2.aLong9140);
    }
    
    void method7125(int i, Class249_Sub5_Sub1 class249_sub5_sub1) {
	if (i < 1600) {
	    if (((Class387) this).anIntArray5656[i] < 64)
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5657[i]
		    [((Class387) this).anIntArray5656[i]++]
		    = class249_sub5_sub1;
	    else {
		if (((Class387) this).anIntArray5656[i] == 64) {
		    if (((Class387) this).anInt5658 == 64)
			return;
		    ((Class387) this).anIntArray5656[i]
			+= 1 + ((Class387) this).anInt5658++;
		}
		((Class387) this).aClass249_Sub5_Sub1ArrayArray5655
		    [((Class387) this).anIntArray5656[i] - 64 - 1]
		    [((Class387) this).anIntArray5652
			 [((Class387) this).anIntArray5656[i] - 64 - 1]++]
		    = class249_sub5_sub1;
	    }
	}
    }
    
    void method7126(Class87_Sub2 class87_sub2, int i, boolean bool) {
	int i_87_ = 0;
	Class276 class276 = class87_sub2.aClass276_9230;
	float f = class276.aFloatArray4141[0];
	float f_88_ = class276.aFloatArray4141[4];
	float f_89_ = class276.aFloatArray4141[8];
	float f_90_ = class276.aFloatArray4141[1];
	float f_91_ = class276.aFloatArray4141[5];
	float f_92_ = class276.aFloatArray4141[9];
	float f_93_ = f + f_90_;
	float f_94_ = f_88_ + f_91_;
	float f_95_ = f_89_ + f_92_;
	float f_96_ = f - f_90_;
	float f_97_ = f_88_ - f_91_;
	float f_98_ = f_89_ - f_92_;
	float f_99_ = f_90_ - f;
	float f_100_ = f_91_ - f_88_;
	float f_101_ = f_92_ - f_89_;
	float[] fs = new float[3];
	float[] fs_102_ = new float[3];
	class87_sub2.aClass276_9187
	    .method5483(((Class87_Sub2) class87_sub2).aClass276_9155);
	ByteBuffer bytebuffer = class87_sub2.aByteBuffer9139;
	bytebuffer.clear();
	for (int i_103_ = i - 1; i_103_ >= 0; i_103_--) {
	    int i_104_ = (((Class387) this).anIntArray5656[i_103_] > 64 ? 64
			  : ((Class387) this).anIntArray5656[i_103_]);
	    if (i_104_ > 0) {
		for (int i_105_ = i_104_ - 1; i_105_ >= 0; i_105_--) {
		    Class249_Sub5_Sub1 class249_sub5_sub1
			= (((Class387) this).aClass249_Sub5_Sub1ArrayArray5657
			   [i_103_][i_105_]);
		    int i_106_ = class249_sub5_sub1.anInt10928;
		    byte i_107_ = (byte) (i_106_ >> 16);
		    byte i_108_ = (byte) (i_106_ >> 8);
		    byte i_109_ = (byte) i_106_;
		    byte i_110_ = (byte) (i_106_ >>> 24);
		    if (((Class87_Sub2) class87_sub2).anInt9275 == 0) {
			byte i_111_ = i_107_;
			i_107_ = i_109_;
			i_109_ = i_111_;
		    }
		    float f_112_
			= (float) (class249_sub5_sub1.anInt10929 >> 12);
		    float f_113_
			= (float) (class249_sub5_sub1.anInt10930 >> 12);
		    float f_114_
			= (float) (class249_sub5_sub1.anInt10931 >> 12);
		    int i_115_ = class249_sub5_sub1.anInt10926 >> 12;
		    if (class249_sub5_sub1.aShort10934 != 0) {
			((Class87_Sub2) class87_sub2).aClass276_9161.method5546
			    (class249_sub5_sub1.aShort10934, i_115_, i_115_,
			     0.0F, 0.0F, 0.0F);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5537(class87_sub2.aClass276_9187);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5463(1.0F, 0.0F, 0.0F, fs);
			((Class87_Sub2) class87_sub2).aClass276_9161
			    .method5463(0.0F, 1.0F, 0.0F, fs_102_);
			bytebuffer.putFloat(f_112_ - fs[0] - fs_102_[0]);
			bytebuffer.putFloat(f_113_ - fs[1] - fs_102_[1]);
			bytebuffer.putFloat(f_114_ - fs[2] - fs_102_[2]);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_112_ - fs[0] + fs_102_[0]);
			bytebuffer.putFloat(f_113_ - fs[1] + fs_102_[1]);
			bytebuffer.putFloat(f_114_ - fs[2] + fs_102_[2]);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_112_ + fs[0] + fs_102_[0]);
			bytebuffer.putFloat(f_113_ + fs[1] + fs_102_[1]);
			bytebuffer.putFloat(f_114_ + fs[2] + fs_102_[2]);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_112_ + fs[0] - fs_102_[0]);
			bytebuffer.putFloat(f_113_ + fs[1] - fs_102_[1]);
			bytebuffer.putFloat(f_114_ + fs[2] - fs_102_[2]);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(0.0F);
		    } else {
			bytebuffer.putFloat(f_112_ + f_93_ * (float) -i_115_);
			bytebuffer.putFloat(f_113_ + f_94_ * (float) -i_115_);
			bytebuffer.putFloat(f_114_ + f_95_ * (float) -i_115_);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(f_112_ + f_99_ * (float) i_115_);
			bytebuffer.putFloat(f_113_ + f_100_ * (float) i_115_);
			bytebuffer.putFloat(f_114_ + f_101_ * (float) i_115_);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(0.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_112_ + f_93_ * (float) i_115_);
			bytebuffer.putFloat(f_113_ + f_94_ * (float) i_115_);
			bytebuffer.putFloat(f_114_ + f_95_ * (float) i_115_);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(f_112_ + f_96_ * (float) i_115_);
			bytebuffer.putFloat(f_113_ + f_97_ * (float) i_115_);
			bytebuffer.putFloat(f_114_ + f_98_ * (float) i_115_);
			bytebuffer.put(i_107_);
			bytebuffer.put(i_108_);
			bytebuffer.put(i_109_);
			bytebuffer.put(i_110_);
			bytebuffer.putFloat(1.0F);
			bytebuffer.putFloat(0.0F);
		    }
		    i_87_++;
		}
		if (((Class387) this).anIntArray5656[i_103_] > 64) {
		    int i_116_
			= ((Class387) this).anIntArray5656[i_103_] - 64 - 1;
		    for (int i_117_
			     = ((Class387) this).anIntArray5652[i_116_] - 1;
			 i_117_ >= 0; i_117_--) {
			Class249_Sub5_Sub1 class249_sub5_sub1
			    = (((Class387) this)
			       .aClass249_Sub5_Sub1ArrayArray5655[i_116_]
			       [i_117_]);
			int i_118_ = class249_sub5_sub1.anInt10928;
			byte i_119_ = (byte) (i_118_ >> 16);
			byte i_120_ = (byte) (i_118_ >> 8);
			byte i_121_ = (byte) i_118_;
			byte i_122_ = (byte) (i_118_ >>> 24);
			float f_123_
			    = (float) (class249_sub5_sub1.anInt10929 >> 12);
			float f_124_
			    = (float) (class249_sub5_sub1.anInt10930 >> 12);
			float f_125_
			    = (float) (class249_sub5_sub1.anInt10931 >> 12);
			int i_126_ = class249_sub5_sub1.anInt10926 >> 12;
			if (((Class87_Sub2) class87_sub2).anInt9275 == 0) {
			    byte i_127_ = i_119_;
			    i_119_ = i_121_;
			    i_121_ = i_127_;
			}
			if (class249_sub5_sub1.aShort10934 != 0) {
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5546
				(class249_sub5_sub1.aShort10934, i_126_,
				 i_126_, 0.0F, 0.0F, 0.0F);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5537(class87_sub2.aClass276_9187);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5463(1.0F, 0.0F, 0.0F, fs);
			    ((Class87_Sub2) class87_sub2).aClass276_9161
				.method5463(0.0F, 1.0F, 0.0F, fs_102_);
			    bytebuffer.putFloat(f_123_ - fs[0] - fs_102_[0]);
			    bytebuffer.putFloat(f_124_ - fs[1] - fs_102_[1]);
			    bytebuffer.putFloat(f_125_ - fs[2] - fs_102_[2]);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(f_123_ - fs[0] + fs_102_[0]);
			    bytebuffer.putFloat(f_124_ - fs[1] + fs_102_[1]);
			    bytebuffer.putFloat(f_125_ - fs[2] + fs_102_[2]);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_123_ + fs[0] + fs_102_[0]);
			    bytebuffer.putFloat(f_124_ + fs[1] + fs_102_[1]);
			    bytebuffer.putFloat(f_125_ + fs[2] + fs_102_[2]);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(f_123_ + fs[0] - fs_102_[0]);
			    bytebuffer.putFloat(f_124_ + fs[1] - fs_102_[1]);
			    bytebuffer.putFloat(f_125_ + fs[2] - fs_102_[2]);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(0.0F);
			} else {
			    bytebuffer
				.putFloat(f_123_ + f_93_ * (float) -i_126_);
			    bytebuffer
				.putFloat(f_124_ + f_94_ * (float) -i_126_);
			    bytebuffer
				.putFloat(f_125_ + f_95_ * (float) -i_126_);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer
				.putFloat(f_123_ + f_99_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_124_ + f_100_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_125_ + f_101_ * (float) i_126_);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(0.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer
				.putFloat(f_123_ + f_93_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_124_ + f_94_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_125_ + f_95_ * (float) i_126_);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer
				.putFloat(f_123_ + f_96_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_124_ + f_97_ * (float) i_126_);
			    bytebuffer
				.putFloat(f_125_ + f_98_ * (float) i_126_);
			    bytebuffer.put(i_119_);
			    bytebuffer.put(i_120_);
			    bytebuffer.put(i_121_);
			    bytebuffer.put(i_122_);
			    bytebuffer.putFloat(1.0F);
			    bytebuffer.putFloat(0.0F);
			}
			i_87_++;
		    }
		}
	    }
	}
	((Class387) this).anInterface36_5654
	    .method228(0, bytebuffer.position(), class87_sub2.aLong9140);
	class87_sub2.method15412(0, ((Class387) this).anInterface36_5654);
	class87_sub2.method15412(1, ((Class387) this).anInterface36_5645);
	class87_sub2.method15411(((Class387) this).aClass367_5646);
	Class373 class373 = ((Class87_Sub2) class87_sub2).aClass373_9159;
	class373.method6961(i_87_, bool);
    }
}
