import java.nio.ByteBuffer;
import sun.misc.Unsafe;

public class Class372 {

   int[] anIntArray4643;
   Class349 aClass349_4644;
   Class349 aClass349_4645;
   int anInt4646;
   Interface35 anInterface35_4647;
   float[] aFloatArray4648;
   Interface33[] anInterface33Array4649;
   int[] anIntArray4650;
   int anInt4651;
   Class545_Sub2 aClass545_Sub2_4652;
   Class341 aClass341_4653;
   Interface40 anInterface40_4654;
   int anInt4655;


   void method6514(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, Interface33 var9, int var10) {
      if((var10 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var11 = this.anIntArray4643[0];
         int var12 = this.anIntArray4643[1];
         int var13 = this.anIntArray4643[2];
         int var14 = this.anIntArray4643[3];
         if(var1 <= (float)var13) {
            if(var2 <= (float)var14) {
               if(var3 >= (float)var11) {
                  if(var4 >= (float)var12) {
                     float var15 = var3 - var1;
                     float var16 = var4 - var2;
                     float var17 = var7 - var5;
                     float var18 = var8 - var6;
                     if(var1 < (float)var11) {
                        var5 += ((float)var11 - var1) / var15 * var17;
                        var1 = (float)var11;
                     }

                     if(var2 < (float)var12) {
                        var6 += ((float)var12 - var2) / var16 * var18;
                        var2 = (float)var12;
                     }

                     if(var3 > (float)var13) {
                        var7 -= (var3 - (float)var13) / var15 * var17;
                        var3 = (float)var13;
                     }

                     if(var4 > (float)var14) {
                        var8 -= (var4 - (float)var14) / var16 * var18;
                        var4 = (float)var14;
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var8;
                     this.anInterface33Array4649[this.anInt4655] = var9;
                     this.anIntArray4650[this.anInt4655] = var10;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448) {
                        this.method6516();
                     }

                  }
               }
            }
         }
      }
   }

   void method6515() {
      this.anInterface35_4647.method10();
      this.anInterface40_4654.method10();
      this.anInterface35_4647 = null;
      this.anInterface40_4654 = null;
      this.aClass341_4653 = null;
      this.anInt4655 = 0;
   }

   void method6516() {
      if(this.anInt4655 != 0) {
         this.aClass545_Sub2_4652.method15087();
         this.aClass545_Sub2_4652.method15173(1);
         this.aClass545_Sub2_4652.method15079(this.anInterface40_4654);
         this.aClass545_Sub2_4652.method15078(0, this.anInterface35_4647);
         this.aClass545_Sub2_4652.method14991(this.aClass341_4653);
         Class56 var1 = this.aClass545_Sub2_4652.aClass56_9732;
         Unsafe var2 = this.aClass545_Sub2_4652.anUnsafe9632;
         ByteBuffer var3 = this.aClass545_Sub2_4652.aByteBuffer9763;
         var3.clear();
         int var4 = (this.anInt4655 + this.anInt4651 - 1) / this.anInt4651;
         int var5 = 0;
         int var6 = 0;

         for(int var7 = 0; var7 < var4; ++var7) {
            int var8 = Math.min(this.anInt4651, this.anInt4655 - var5);
            long var9 = this.anInterface35_4647.method214(0, var8 * 96);
            int var11 = var7 * this.anInt4651 + var8;

            int var13;
            for(int var12 = var5; var12 < var11; ++var12) {
               for(var13 = 0; var13 < 4; ++var13) {
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, 0.0F);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putInt(var9, this.anIntArray4650[var12]);
                  var9 += 4L;
               }
            }

            this.anInterface35_4647.method215();
            Interface33 var16 = this.anInterface33Array4649[var5];
            var13 = 1;
            int var14 = 0;

            for(int var15 = var5 + 1; var15 < var11; ++var15) {
               if(var16 == this.anInterface33Array4649[var15]) {
                  ++var13;
               } else {
                  var1.anInterface33_531 = var16;
                  var1.method1266();
                  this.aClass545_Sub2_4652.method15082(this.anInterface40_4654, Class374.aClass374_4670, var14 * 4, var13 * 4, var14 * 6, var13 * 2);
                  var16 = this.anInterface33Array4649[var15];
                  var13 = 1;
                  var14 = var15 - var5;
               }
            }

            var1.anInterface33_531 = var16;
            var1.method1266();
            this.aClass545_Sub2_4652.method15082(this.anInterface40_4654, Class374.aClass374_4670, var14 * 4, var13 * 4, var14 * 6, var13 * 2);
            var5 += this.anInt4651;
         }

         this.anInt4655 = 0;
      }
   }

   void method6517(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, Interface33 var9, int var10) {
      if((var10 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var11 = this.anIntArray4643[0];
         int var12 = this.anIntArray4643[1];
         int var13 = this.anIntArray4643[2];
         int var14 = this.anIntArray4643[3];
         if(var1 <= (float)var13) {
            if(var2 <= (float)var14) {
               if(var3 >= (float)var11) {
                  if(var4 >= (float)var12) {
                     float var15 = var3 - var1;
                     float var16 = var4 - var2;
                     float var17 = var7 - var5;
                     float var18 = var8 - var6;
                     if(var1 < (float)var11) {
                        var5 += ((float)var11 - var1) / var15 * var17;
                        var1 = (float)var11;
                     }

                     if(var2 < (float)var12) {
                        var6 += ((float)var12 - var2) / var16 * var18;
                        var2 = (float)var12;
                     }

                     if(var3 > (float)var13) {
                        var7 -= (var3 - (float)var13) / var15 * var17;
                        var3 = (float)var13;
                     }

                     if(var4 > (float)var14) {
                        var8 -= (var4 - (float)var14) / var16 * var18;
                        var4 = (float)var14;
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var8;
                     this.anInterface33Array4649[this.anInt4655] = var9;
                     this.anIntArray4650[this.anInt4655] = var10;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448) {
                        this.method6516();
                     }

                  }
               }
            }
         }
      }
   }

   Class372(Class545_Sub2 var1, int var2) {
      this.aClass349_4644 = Class349.aClass349_4450;
      this.anInt4646 = 128;
      this.anInt4655 = 0;
      this.aFloatArray4648 = new float[this.anInt4646 * 16];
      this.anInterface33Array4649 = new Interface33[this.anInt4646];
      this.anIntArray4650 = new int[this.anInt4646];
      this.anIntArray4643 = new int[4];
      this.aClass545_Sub2_4652 = var1;
      this.anInterface35_4647 = this.aClass545_Sub2_4652.method15237(true);
      this.anInterface35_4647.method220(var2 * 96, 24);
      this.aClass341_4653 = this.aClass545_Sub2_4652.method15076(new Class348[]{new Class348(new Class347[]{Class347.aClass347_4429, Class347.aClass347_4440, Class347.aClass347_4445})});
      this.anInterface40_4654 = this.aClass545_Sub2_4652.method15075(false);
      int var3 = var2 * 6;
      this.anInterface40_4654.method232(var3);
      ByteBuffer var4 = this.aClass545_Sub2_4652.aByteBuffer9763;
      var4.clear();

      for(int var5 = 0; var5 < var2; ++var5) {
         var4.putShort((short)(var5 * 4));
         var4.putShort((short)(var5 * 4 + 2));
         var4.putShort((short)(var5 * 4 + 1));
         var4.putShort((short)(var5 * 4 + 2));
         var4.putShort((short)(var5 * 4 + 3));
         var4.putShort((short)(var5 * 4 + 1));
      }

      this.anInterface40_4654.method217(0, var3 * this.anInterface40_4654.method236().anInt906 * -2107221975, this.aClass545_Sub2_4652.aLong9730);
      this.anInt4651 = var2;
      this.anInt4655 = 0;
   }

   float method6518(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2741();
      float var3 = (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2 * 2.0F - 1.0F;
      return var3;
   }

   float method6519(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2741();
      float var3 = (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2 * 2.0F - 1.0F;
      return var3;
   }

   float method6520(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2742();
      float var3 = (1.0F - (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2) * 2.0F - 1.0F;
      return var3;
   }

   void method6521() {
      if(this.aClass349_4645 != null) {
         this.aClass349_4644 = this.aClass349_4645;
         this.aClass349_4645 = null;
      }

   }

   void method6522() {
      if(this.aClass349_4645 != null) {
         this.aClass349_4644 = this.aClass349_4645;
         this.aClass349_4645 = null;
      }

   }

   Class349 method6523() {
      return this.aClass349_4644;
   }

   void method6524() {
      this.anInterface35_4647.method10();
      this.anInterface40_4654.method10();
      this.anInterface35_4647 = null;
      this.anInterface40_4654 = null;
      this.aClass341_4653 = null;
      this.anInt4655 = 0;
   }

   void method6525() {
      if(this.aClass349_4645 != null) {
         this.aClass349_4644 = this.aClass349_4645;
         this.aClass349_4645 = null;
      }

   }

   void method6526() {
      this.anInterface35_4647.method10();
      this.anInterface40_4654.method10();
      this.anInterface35_4647 = null;
      this.anInterface40_4654 = null;
      this.aClass341_4653 = null;
      this.anInt4655 = 0;
   }

   Class349 method6527() {
      return this.aClass349_4644;
   }

   void method6528(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, Interface33 var9, int var10) {
      if((var10 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var11 = this.anIntArray4643[0];
         int var12 = this.anIntArray4643[1];
         int var13 = this.anIntArray4643[2];
         int var14 = this.anIntArray4643[3];
         if(var1 <= (float)var13) {
            if(var2 <= (float)var14) {
               if(var3 >= (float)var11) {
                  if(var4 >= (float)var12) {
                     float var15 = var3 - var1;
                     float var16 = var4 - var2;
                     float var17 = var7 - var5;
                     float var18 = var8 - var6;
                     if(var1 < (float)var11) {
                        var5 += ((float)var11 - var1) / var15 * var17;
                        var1 = (float)var11;
                     }

                     if(var2 < (float)var12) {
                        var6 += ((float)var12 - var2) / var16 * var18;
                        var2 = (float)var12;
                     }

                     if(var3 > (float)var13) {
                        var7 -= (var3 - (float)var13) / var15 * var17;
                        var3 = (float)var13;
                     }

                     if(var4 > (float)var14) {
                        var8 -= (var4 - (float)var14) / var16 * var18;
                        var4 = (float)var14;
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var8;
                     this.anInterface33Array4649[this.anInt4655] = var9;
                     this.anIntArray4650[this.anInt4655] = var10;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448) {
                        this.method6516();
                     }

                  }
               }
            }
         }
      }
   }

   void method6529(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9, float var10, float var11, float var12, float var13, float var14, float var15, float var16, Interface33 var17, int var18) {
      if((var18 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var19 = this.anIntArray4643[0];
         int var20 = this.anIntArray4643[1];
         int var21 = this.anIntArray4643[2];
         int var22 = this.anIntArray4643[3];
         byte var23 = 0;
         int var24 = (var1 < (float)var19?1:0) + (var3 < (float)var19?1:0) + (var5 < (float)var19?1:0) + (var7 < (float)var19?1:0);
         if(var24 != 4) {
            int var25 = var23 | var24;
            var24 = (var1 > (float)var21?1:0) + (var3 > (float)var21?1:0) + (var5 > (float)var21?1:0) + (var7 > (float)var21?1:0);
            if(var24 != 4) {
               var25 |= var24;
               var24 = (var2 < (float)var20?1:0) + (var4 < (float)var20?1:0) + (var6 < (float)var20?1:0) + (var8 < (float)var20?1:0);
               if(var24 != 4) {
                  var25 |= var24;
                  var24 = (var2 > (float)var22?1:0) + (var4 > (float)var22?1:0) + (var6 > (float)var22?1:0) + (var8 > (float)var22?1:0);
                  if(var24 != 4) {
                     var25 |= var24;
                     if(var25 != 0) {
                        this.method6516();
                        this.aClass545_Sub2_4652.method11462(true);
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     var5 = this.method6519(var5);
                     var6 = this.method6520(var6);
                     var7 = this.method6519(var7);
                     var8 = this.method6520(var8);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var9;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var10;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var11;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var12;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var13;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var14;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var15;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var16;
                     this.anInterface33Array4649[this.anInt4655] = var17;
                     this.anIntArray4650[this.anInt4655] = var18;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448 || var25 > 0) {
                        this.method6516();
                     }

                     if(var25 != 0) {
                        this.aClass545_Sub2_4652.method11462(false);
                        this.aClass545_Sub2_4652.L();
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                  }
               }
            }
         }
      }
   }

   void method6530(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9, float var10, float var11, float var12, float var13, float var14, float var15, float var16, Interface33 var17, int var18) {
      if((var18 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var19 = this.anIntArray4643[0];
         int var20 = this.anIntArray4643[1];
         int var21 = this.anIntArray4643[2];
         int var22 = this.anIntArray4643[3];
         byte var23 = 0;
         int var24 = (var1 < (float)var19?1:0) + (var3 < (float)var19?1:0) + (var5 < (float)var19?1:0) + (var7 < (float)var19?1:0);
         if(var24 != 4) {
            int var25 = var23 | var24;
            var24 = (var1 > (float)var21?1:0) + (var3 > (float)var21?1:0) + (var5 > (float)var21?1:0) + (var7 > (float)var21?1:0);
            if(var24 != 4) {
               var25 |= var24;
               var24 = (var2 < (float)var20?1:0) + (var4 < (float)var20?1:0) + (var6 < (float)var20?1:0) + (var8 < (float)var20?1:0);
               if(var24 != 4) {
                  var25 |= var24;
                  var24 = (var2 > (float)var22?1:0) + (var4 > (float)var22?1:0) + (var6 > (float)var22?1:0) + (var8 > (float)var22?1:0);
                  if(var24 != 4) {
                     var25 |= var24;
                     if(var25 != 0) {
                        this.method6516();
                        this.aClass545_Sub2_4652.method11462(true);
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     var5 = this.method6519(var5);
                     var6 = this.method6520(var6);
                     var7 = this.method6519(var7);
                     var8 = this.method6520(var8);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var9;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var10;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var11;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var12;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var13;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var14;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var15;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var16;
                     this.anInterface33Array4649[this.anInt4655] = var17;
                     this.anIntArray4650[this.anInt4655] = var18;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448 || var25 > 0) {
                        this.method6516();
                     }

                     if(var25 != 0) {
                        this.aClass545_Sub2_4652.method11462(false);
                        this.aClass545_Sub2_4652.L();
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                  }
               }
            }
         }
      }
   }

   void method6531() {
      if(this.anInt4655 == this.anInt4646) {
         this.anInt4646 *= 2;
         float[] var1 = new float[this.anInt4646 * 16];

         for(int var2 = 0; var2 < this.anInt4655 * 16; ++var2) {
            var1[var2] = this.aFloatArray4648[var2];
         }

         this.aFloatArray4648 = var1;
         Interface33[] var5 = new Interface33[this.anInt4646];
         int[] var3 = new int[this.anInt4646];

         for(int var4 = 0; var4 < this.anInt4655; ++var4) {
            var5[var4] = this.anInterface33Array4649[var4];
            var3[var4] = this.anIntArray4650[var4];
         }

         this.anInterface33Array4649 = var5;
         this.anIntArray4650 = var3;
      }

   }

   void method6532() {
      if(this.anInt4655 == this.anInt4646) {
         this.anInt4646 *= 2;
         float[] var1 = new float[this.anInt4646 * 16];

         for(int var2 = 0; var2 < this.anInt4655 * 16; ++var2) {
            var1[var2] = this.aFloatArray4648[var2];
         }

         this.aFloatArray4648 = var1;
         Interface33[] var5 = new Interface33[this.anInt4646];
         int[] var3 = new int[this.anInt4646];

         for(int var4 = 0; var4 < this.anInt4655; ++var4) {
            var5[var4] = this.anInterface33Array4649[var4];
            var3[var4] = this.anIntArray4650[var4];
         }

         this.anInterface33Array4649 = var5;
         this.anIntArray4650 = var3;
      }

   }

   float method6533(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2741();
      float var3 = (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2 * 2.0F - 1.0F;
      return var3;
   }

   float method6534(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2741();
      float var3 = (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2 * 2.0F - 1.0F;
      return var3;
   }

   void method6535(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9, float var10, float var11, float var12, float var13, float var14, float var15, float var16, Interface33 var17, int var18) {
      if((var18 & -16777216) != 0) {
         this.aClass545_Sub2_4652.qa(this.anIntArray4643);
         int var19 = this.anIntArray4643[0];
         int var20 = this.anIntArray4643[1];
         int var21 = this.anIntArray4643[2];
         int var22 = this.anIntArray4643[3];
         byte var23 = 0;
         int var24 = (var1 < (float)var19?1:0) + (var3 < (float)var19?1:0) + (var5 < (float)var19?1:0) + (var7 < (float)var19?1:0);
         if(var24 != 4) {
            int var25 = var23 | var24;
            var24 = (var1 > (float)var21?1:0) + (var3 > (float)var21?1:0) + (var5 > (float)var21?1:0) + (var7 > (float)var21?1:0);
            if(var24 != 4) {
               var25 |= var24;
               var24 = (var2 < (float)var20?1:0) + (var4 < (float)var20?1:0) + (var6 < (float)var20?1:0) + (var8 < (float)var20?1:0);
               if(var24 != 4) {
                  var25 |= var24;
                  var24 = (var2 > (float)var22?1:0) + (var4 > (float)var22?1:0) + (var6 > (float)var22?1:0) + (var8 > (float)var22?1:0);
                  if(var24 != 4) {
                     var25 |= var24;
                     if(var25 != 0) {
                        this.method6516();
                        this.aClass545_Sub2_4652.method11462(true);
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                     this.method6542();
                     var1 = this.method6519(var1);
                     var2 = this.method6520(var2);
                     var3 = this.method6519(var3);
                     var4 = this.method6520(var4);
                     var5 = this.method6519(var5);
                     var6 = this.method6520(var6);
                     var7 = this.method6519(var7);
                     var8 = this.method6520(var8);
                     this.aFloatArray4648[this.anInt4655 * 16 + 0] = var1;
                     this.aFloatArray4648[this.anInt4655 * 16 + 1] = var2;
                     this.aFloatArray4648[this.anInt4655 * 16 + 2] = var9;
                     this.aFloatArray4648[this.anInt4655 * 16 + 3] = var10;
                     this.aFloatArray4648[this.anInt4655 * 16 + 4] = var3;
                     this.aFloatArray4648[this.anInt4655 * 16 + 5] = var4;
                     this.aFloatArray4648[this.anInt4655 * 16 + 6] = var11;
                     this.aFloatArray4648[this.anInt4655 * 16 + 7] = var12;
                     this.aFloatArray4648[this.anInt4655 * 16 + 8] = var5;
                     this.aFloatArray4648[this.anInt4655 * 16 + 9] = var6;
                     this.aFloatArray4648[this.anInt4655 * 16 + 10] = var13;
                     this.aFloatArray4648[this.anInt4655 * 16 + 11] = var14;
                     this.aFloatArray4648[this.anInt4655 * 16 + 12] = var7;
                     this.aFloatArray4648[this.anInt4655 * 16 + 13] = var8;
                     this.aFloatArray4648[this.anInt4655 * 16 + 14] = var15;
                     this.aFloatArray4648[this.anInt4655 * 16 + 15] = var16;
                     this.anInterface33Array4649[this.anInt4655] = var17;
                     this.anIntArray4650[this.anInt4655] = var18;
                     ++this.anInt4655;
                     if(this.aClass349_4644 == Class349.aClass349_4448 || var25 > 0) {
                        this.method6516();
                     }

                     if(var25 != 0) {
                        this.aClass545_Sub2_4652.method11462(false);
                        this.aClass545_Sub2_4652.L();
                        this.aClass545_Sub2_4652.r(var19, var20, var21, var22);
                     }

                  }
               }
            }
         }
      }
   }

   float method6536(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2741();
      float var3 = (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2 * 2.0F - 1.0F;
      return var3;
   }

   float method6537(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2742();
      float var3 = (1.0F - (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2) * 2.0F - 1.0F;
      return var3;
   }

   float method6538(float var1) {
      int var2 = this.aClass545_Sub2_4652.method11482((byte)14).method2742();
      float var3 = (1.0F - (var1 + this.aClass545_Sub2_4652.method14983()) / (float)var2) * 2.0F - 1.0F;
      return var3;
   }

   void method6539() {
      this.aClass349_4645 = this.aClass349_4644;
      this.aClass349_4644 = Class349.aClass349_4449;
   }

   void method6540() {
      if(this.anInt4655 != 0) {
         this.aClass545_Sub2_4652.method15087();
         this.aClass545_Sub2_4652.method15173(1);
         this.aClass545_Sub2_4652.method15079(this.anInterface40_4654);
         this.aClass545_Sub2_4652.method15078(0, this.anInterface35_4647);
         this.aClass545_Sub2_4652.method14991(this.aClass341_4653);
         Class56 var1 = this.aClass545_Sub2_4652.aClass56_9732;
         Unsafe var2 = this.aClass545_Sub2_4652.anUnsafe9632;
         ByteBuffer var3 = this.aClass545_Sub2_4652.aByteBuffer9763;
         var3.clear();
         int var4 = (this.anInt4655 + this.anInt4651 - 1) / this.anInt4651;
         int var5 = 0;
         int var6 = 0;

         for(int var7 = 0; var7 < var4; ++var7) {
            int var8 = Math.min(this.anInt4651, this.anInt4655 - var5);
            long var9 = this.anInterface35_4647.method214(0, var8 * 96);
            int var11 = var7 * this.anInt4651 + var8;

            int var13;
            for(int var12 = var5; var12 < var11; ++var12) {
               for(var13 = 0; var13 < 4; ++var13) {
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, 0.0F);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putFloat(var9, this.aFloatArray4648[var6++]);
                  var9 += 4L;
                  var2.putInt(var9, this.anIntArray4650[var12]);
                  var9 += 4L;
               }
            }

            this.anInterface35_4647.method215();
            Interface33 var16 = this.anInterface33Array4649[var5];
            var13 = 1;
            int var14 = 0;

            for(int var15 = var5 + 1; var15 < var11; ++var15) {
               if(var16 == this.anInterface33Array4649[var15]) {
                  ++var13;
               } else {
                  var1.anInterface33_531 = var16;
                  var1.method1266();
                  this.aClass545_Sub2_4652.method15082(this.anInterface40_4654, Class374.aClass374_4670, var14 * 4, var13 * 4, var14 * 6, var13 * 2);
                  var16 = this.anInterface33Array4649[var15];
                  var13 = 1;
                  var14 = var15 - var5;
               }
            }

            var1.anInterface33_531 = var16;
            var1.method1266();
            this.aClass545_Sub2_4652.method15082(this.anInterface40_4654, Class374.aClass374_4670, var14 * 4, var13 * 4, var14 * 6, var13 * 2);
            var5 += this.anInt4651;
         }

         this.anInt4655 = 0;
      }
   }

   Class349 method6541() {
      return this.aClass349_4644;
   }

   void method6542() {
      if(this.anInt4655 == this.anInt4646) {
         this.anInt4646 *= 2;
         float[] var1 = new float[this.anInt4646 * 16];

         for(int var2 = 0; var2 < this.anInt4655 * 16; ++var2) {
            var1[var2] = this.aFloatArray4648[var2];
         }

         this.aFloatArray4648 = var1;
         Interface33[] var5 = new Interface33[this.anInt4646];
         int[] var3 = new int[this.anInt4646];

         for(int var4 = 0; var4 < this.anInt4655; ++var4) {
            var5[var4] = this.anInterface33Array4649[var4];
            var3[var4] = this.anIntArray4650[var4];
         }

         this.anInterface33Array4649 = var5;
         this.anIntArray4650 = var3;
      }

   }
}
