import jaggl.OpenGL;

public class Class100_Sub2 extends Class100 {

   static int[] anIntArray8303 = new int[2];
   static final int anInt8304 = 35632;
   static final int anInt8305 = 13;
   boolean aBool8306;
   int[] anIntArray8307;
   int anInt8308;
   int anInt8309;
   float[] aFloatArray8310;
   float[] aFloatArray8311;
   int anInt8312;
   Class545_Sub2_Sub2 aClass545_Sub2_Sub2_8313;
   static float[] aFloatArray8314 = new float[16];
   float[] aFloatArray8315;
   static final int anInt8316 = 35633;
   Class103_Sub1 aClass103_Sub1_8317;
   float[] aFloatArray8318;
   int[] anIntArray8319;
   String aString8320;
   String aString8321;
   // $FF: synthetic field
   static boolean $assertionsDisabled = !Class100_Sub2.class.desiredAssertionStatus();


   void method1978(Class225_Sub36_Sub1 var1, float var2, float var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(this.aFloatArray8315[var4] != var2 || this.aFloatArray8311[var4] != var3) {
            this.aFloatArray8315[var4] = var2;
            this.aFloatArray8311[var4] = var3;
            if(var1.method15648(-1978453705) != Class122.aClass122_1234) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform2f(var4, var2, var3);
         }

      }
   }

   void method1944(int var1, float[] var2, int var3) {
      OpenGL.glUniform4fv(var1, var3, var2, 0);
   }

   void method1947(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   public boolean method1921() {
      if(this.aBool8306) {
         return true;
      } else {
         this.aClass545_Sub2_Sub2_8313.aClass100_Sub2_10350 = null;
         this.anInt8309 = this.method13232('\u8b31', this.aString8320, this.aString1002);
         this.anInt8312 = this.method13232('\u8b30', this.aString8321, this.aString1003);
         if(this.anInt8309 != 0 && this.anInt8312 != 0) {
            this.anInt8308 = OpenGL.glCreateProgram();
            if(this.anInt8309 != 0) {
               OpenGL.glAttachShader(this.anInt8308, this.anInt8309);
            }

            if(this.anInt8312 != 0) {
               OpenGL.glAttachShader(this.anInt8308, this.anInt8312);
            }

            OpenGL.glLinkProgram(this.anInt8308);
            OpenGL.glGetProgramiv(this.anInt8308, '\u8b82', anIntArray8303, 0);
            if(anIntArray8303[0] == 0) {
               if(this.anInt8309 != 0) {
                  OpenGL.glDetachShader(this.anInt8308, this.anInt8309);
                  OpenGL.glDeleteShader(this.anInt8309);
               }

               if(this.anInt8312 != 0) {
                  OpenGL.glDetachShader(this.anInt8308, this.anInt8312);
                  OpenGL.glDeleteShader(this.anInt8312);
               }

               OpenGL.glDeleteProgram(this.anInt8308);
               return false;
            } else {
               OpenGL.glUseProgram(this.anInt8308);
               int var1 = -1;

               int var2;
               for(var2 = 0; var2 < this.aClass103_Sub1_8317.method2003(-1645526913); ++var2) {
                  if(this.aClass103_Sub1_8317.method2004(var2, -1477772996) == this) {
                     var1 = var2;
                     break;
                  }
               }

               if(var1 == -1) {
                  return false;
               } else {
                  var2 = 0;
                  int var3 = 0;

                  int var4;
                  Class225_Sub36_Sub1 var5;
                  Class122 var6;
                  int var7;
                  for(var4 = 0; var4 < this.aClass103_Sub1_8317.method2034((byte)52); ++var4) {
                     var5 = this.aClass103_Sub1_8317.method2092(var4, -2059641333);
                     if(var5 != null) {
                        var5.method15631(var1);
                        var6 = var5.method15648(1826195384);
                        var7 = ((Class225_Sub36_Sub1_Sub2)var5).anIntArray10667[var1];
                        if(var6 != Class122.aClass122_1233 && var6 != Class122.aClass122_1279 && var6 != Class122.aClass122_1234 && var6 != Class122.aClass122_1235 && var6 != Class122.aClass122_1236) {
                           var3 = Math.max(var7, var3);
                        } else {
                           var2 = Math.max(var7, var2);
                        }
                     }
                  }

                  for(var4 = 0; var4 < this.aClass103_Sub1_8317.method2031(-1363733984); ++var4) {
                     var5 = this.aClass103_Sub1_8317.method2032(var4, (byte)12);
                     if(var5 != null) {
                        var5.method15631(var1);
                        var6 = var5.method15648(-2025312653);
                        var7 = ((Class225_Sub36_Sub1_Sub2)var5).anIntArray10667[var1];
                        if(var6 != Class122.aClass122_1233 && var6 != Class122.aClass122_1279 && var6 != Class122.aClass122_1234 && var6 != Class122.aClass122_1235 && var6 != Class122.aClass122_1236) {
                           var3 = Math.max(var7, var3);
                        } else {
                           var2 = Math.max(var7, var2);
                        }
                     }
                  }

                  this.aFloatArray8315 = new float[var2 + 1];
                  this.aFloatArray8311 = new float[var2 + 1];
                  this.aFloatArray8310 = new float[var2 + 1];
                  this.aFloatArray8318 = new float[var2 + 1];
                  this.anIntArray8319 = new int[var3 + 1];

                  for(var4 = 0; var4 < this.anIntArray8319.length; ++var4) {
                     this.anIntArray8319[var4] = -1;
                  }

                  this.aString8320 = null;
                  this.aString8321 = null;
                  this.aBool8306 = true;
                  return true;
               }
            }
         } else {
            if(this.anInt8309 != 0) {
               OpenGL.glDeleteShader(this.anInt8309);
            }

            if(this.anInt8312 != 0) {
               OpenGL.glDeleteShader(this.anInt8312);
            }

            return false;
         }
      }
   }

   void method1922(Class225_Sub36_Sub1 var1, float var2) {
      int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var3 != -1) {
         if(this.aFloatArray8315[var3] != var2) {
            this.aFloatArray8315[var3] = var2;
            if(var1.method15648(2061460969) != Class122.aClass122_1233 && var1.method15648(357549312) != Class122.aClass122_1279) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform1f(var3, var2);
         }

      }
   }

   void method1967(Class225_Sub36_Sub1 var1, float var2, float var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(this.aFloatArray8315[var4] != var2 || this.aFloatArray8311[var4] != var3) {
            this.aFloatArray8315[var4] = var2;
            this.aFloatArray8311[var4] = var3;
            if(var1.method15648(-58922615) != Class122.aClass122_1234) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform2f(var4, var2, var3);
         }

      }
   }

   void method1924(Class225_Sub36_Sub1 var1, float var2, float var3, float var4) {
      int var5 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var5 != -1) {
         if(this.aFloatArray8315[var5] != var2 || this.aFloatArray8311[var5] != var3 || this.aFloatArray8310[var5] != var4) {
            this.aFloatArray8315[var5] = var2;
            this.aFloatArray8311[var5] = var3;
            this.aFloatArray8310[var5] = var4;
            if(var1.method15648(868971460) != Class122.aClass122_1235) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform3f(var5, var2, var3, var4);
         }

      }
   }

   void method13229() {
      this.method10();
   }

   void method1925(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1964(Class225_Sub36_Sub1 var1, Class317 var2) {
      if(!$assertionsDisabled && var1.method15648(-1758800510) != Class122.aClass122_1277) {
         throw new AssertionError();
      } else {
         int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
         if(var3 != -1) {
            OpenGL.glUniform2fv(var3, 4, var2.method5640(aFloatArray8314), 0);
         }
      }
   }

   void method1976(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1926(Class225_Sub36_Sub1 var1, float[] var2, int var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         OpenGL.glUniform4fv(var4, var3, var2, 0);
      }
   }

   void method1960(int var1, Class317 var2) {
      OpenGL.glUniform3fv(var1, 3, var2.method5721(aFloatArray8314), 0);
   }

   void method1919(int var1, float var2, float var3, float var4, float var5) {
      OpenGL.glUniform4f(var1, var2, var3, var4, var5);
   }

   void method1928(Class225_Sub36_Sub1 var1, int var2, Interface38 var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(var3 == null) {
            var3 = this.aClass545_Sub2_Sub2_8313.anInterface33_9693;
         }

         if(var2 < this.aClass545_Sub2_Sub2_8313.anInt9764) {
            this.aClass545_Sub2_Sub2_8313.method15050(var2);
            this.aClass545_Sub2_Sub2_8313.method15051((Interface38)var3);
         } else {
            OpenGL.glActiveTexture('\u84c0' + var2);
            OpenGL.glBindTexture(((Class275)var3).anInt3194, ((Class275)var3).anInt3187);
         }

         if(this.anIntArray8319[var4] != var2) {
            this.anIntArray8319[var4] = var2;
            OpenGL.glUniform1i(var4, var2);
         }

      }
   }

   void method1932(Class225_Sub36_Sub1 var1, int var2, Interface38 var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(var3 == null) {
            var3 = this.aClass545_Sub2_Sub2_8313.anInterface33_9693;
         }

         if(var2 < this.aClass545_Sub2_Sub2_8313.anInt9764) {
            this.aClass545_Sub2_Sub2_8313.method15050(var2);
            this.aClass545_Sub2_Sub2_8313.method15051((Interface38)var3);
         } else {
            OpenGL.glActiveTexture('\u84c0' + var2);
            OpenGL.glBindTexture(((Class275)var3).anInt3194, ((Class275)var3).anInt3187);
         }

         if(this.anIntArray8319[var4] != var2) {
            this.anIntArray8319[var4] = var2;
            OpenGL.glUniform1i(var4, var2);
         }

      }
   }

   void method1953(Class225_Sub36_Sub1 var1, int var2, Interface38 var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(var3 == null) {
            var3 = this.aClass545_Sub2_Sub2_8313.anInterface33_9693;
         }

         if(var2 < this.aClass545_Sub2_Sub2_8313.anInt9764) {
            this.aClass545_Sub2_Sub2_8313.method15050(var2);
            this.aClass545_Sub2_Sub2_8313.method15051((Interface38)var3);
         } else {
            OpenGL.glActiveTexture('\u84c0' + var2);
            OpenGL.glBindTexture(((Class275)var3).anInt3194, ((Class275)var3).anInt3187);
         }

         if(this.anIntArray8319[var4] != var2) {
            this.anIntArray8319[var4] = var2;
            OpenGL.glUniform1i(var4, var2);
         }

      }
   }

   void method1935(int var1, Class317 var2) {
      OpenGL.glUniform4fv(var1, 4, var2.method5636(aFloatArray8314), 0);
   }

   void method1948(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   public void method10() {
      if(this.anInt8308 != 0) {
         this.aClass545_Sub2_Sub2_8313.method15911(this.anInt8308);
         if(this.anInt8309 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8309);
         }

         if(this.anInt8312 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8312);
         }

         this.anInt8308 = 0;
         this.anInt8309 = 0;
         this.anInt8312 = 0;
      }

   }

   public void finalize() {
      this.method10();
   }

   void method1969(Class225_Sub36_Sub1 var1, float var2, float var3, float var4, float var5) {
      int var6 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var6 != -1) {
         if(this.aFloatArray8315[var6] != var2 || this.aFloatArray8311[var6] != var3 || this.aFloatArray8310[var6] != var4 || this.aFloatArray8318[var6] != var5) {
            this.aFloatArray8315[var6] = var2;
            this.aFloatArray8311[var6] = var3;
            this.aFloatArray8310[var6] = var4;
            this.aFloatArray8318[var6] = var5;
            if(var1.method15648(-778126992) != Class122.aClass122_1236) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform4f(var6, var2, var3, var4, var5);
         }

      }
   }

   void method1929(int var1, Class317 var2) {
      OpenGL.glUniform3fv(var1, 3, var2.method5721(aFloatArray8314), 0);
   }

   public void method9() {
      if(this.anInt8308 != 0) {
         this.aClass545_Sub2_Sub2_8313.method15911(this.anInt8308);
         if(this.anInt8309 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8309);
         }

         if(this.anInt8312 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8312);
         }

         this.anInt8308 = 0;
         this.anInt8309 = 0;
         this.anInt8312 = 0;
      }

   }

   void method13230() {
      this.method10();
   }

   Class100_Sub2(Class545_Sub2_Sub2 var1, Class103_Sub1 var2, Class84 var3) {
      this(var1, var3);
      this.aClass103_Sub1_8317 = var2;
      this.aClass545_Sub2_Sub2_8313 = var1;
   }

   void method13231() {
      this.method10();
   }

   void method1927(Class225_Sub36_Sub1 var1, float var2, float var3, float var4, float var5) {
      int var6 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var6 != -1) {
         if(this.aFloatArray8315[var6] != var2 || this.aFloatArray8311[var6] != var3 || this.aFloatArray8310[var6] != var4 || this.aFloatArray8318[var6] != var5) {
            this.aFloatArray8315[var6] = var2;
            this.aFloatArray8311[var6] = var3;
            this.aFloatArray8310[var6] = var4;
            this.aFloatArray8318[var6] = var5;
            if(var1.method15648(1352686776) != Class122.aClass122_1236) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform4f(var6, var2, var3, var4, var5);
         }

      }
   }

   void method1974(Class225_Sub36_Sub1 var1, float var2) {
      int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var3 != -1) {
         if(this.aFloatArray8315[var3] != var2) {
            this.aFloatArray8315[var3] = var2;
            if(var1.method15648(-1714550591) != Class122.aClass122_1233 && var1.method15648(-548408477) != Class122.aClass122_1279) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform1f(var3, var2);
         }

      }
   }

   void method1940(Class225_Sub36_Sub1 var1, float var2) {
      int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var3 != -1) {
         if(this.aFloatArray8315[var3] != var2) {
            this.aFloatArray8315[var3] = var2;
            if(var1.method15648(-2066514814) != Class122.aClass122_1233 && var1.method15648(-517302667) != Class122.aClass122_1279) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform1f(var3, var2);
         }

      }
   }

   void method1972(Class225_Sub36_Sub1 var1, float var2) {
      int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var3 != -1) {
         if(this.aFloatArray8315[var3] != var2) {
            this.aFloatArray8315[var3] = var2;
            if(var1.method15648(-400303780) != Class122.aClass122_1233 && var1.method15648(-754602078) != Class122.aClass122_1279) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform1f(var3, var2);
         }

      }
   }

   void method1942(Class225_Sub36_Sub1 var1, float var2, float var3, float var4) {
      int var5 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var5 != -1) {
         if(this.aFloatArray8315[var5] != var2 || this.aFloatArray8311[var5] != var3 || this.aFloatArray8310[var5] != var4) {
            this.aFloatArray8315[var5] = var2;
            this.aFloatArray8311[var5] = var3;
            this.aFloatArray8310[var5] = var4;
            if(var1.method15648(352361388) != Class122.aClass122_1235) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform3f(var5, var2, var3, var4);
         }

      }
   }

   void method1943(Class225_Sub36_Sub1 var1, float var2, float var3, float var4) {
      int var5 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var5 != -1) {
         if(this.aFloatArray8315[var5] != var2 || this.aFloatArray8311[var5] != var3 || this.aFloatArray8310[var5] != var4) {
            this.aFloatArray8315[var5] = var2;
            this.aFloatArray8311[var5] = var3;
            this.aFloatArray8310[var5] = var4;
            if(var1.method15648(578214887) != Class122.aClass122_1235) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform3f(var5, var2, var3, var4);
         }

      }
   }

   void method1939(Class225_Sub36_Sub1 var1, float var2, float var3, float var4, float var5) {
      int var6 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var6 != -1) {
         if(this.aFloatArray8315[var6] != var2 || this.aFloatArray8311[var6] != var3 || this.aFloatArray8310[var6] != var4 || this.aFloatArray8318[var6] != var5) {
            this.aFloatArray8315[var6] = var2;
            this.aFloatArray8311[var6] = var3;
            this.aFloatArray8310[var6] = var4;
            this.aFloatArray8318[var6] = var5;
            if(var1.method15648(1995900738) != Class122.aClass122_1236) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform4f(var6, var2, var3, var4, var5);
         }

      }
   }

   void method1945(Class225_Sub36_Sub1 var1, float var2, float var3, float var4, float var5) {
      int var6 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var6 != -1) {
         if(this.aFloatArray8315[var6] != var2 || this.aFloatArray8311[var6] != var3 || this.aFloatArray8310[var6] != var4 || this.aFloatArray8318[var6] != var5) {
            this.aFloatArray8315[var6] = var2;
            this.aFloatArray8311[var6] = var3;
            this.aFloatArray8310[var6] = var4;
            this.aFloatArray8318[var6] = var5;
            if(var1.method15648(198383935) != Class122.aClass122_1236) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform4f(var6, var2, var3, var4, var5);
         }

      }
   }

   void method1970(Class225_Sub36_Sub1 var1, float var2, float var3, float var4, float var5) {
      int var6 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var6 != -1) {
         if(this.aFloatArray8315[var6] != var2 || this.aFloatArray8311[var6] != var3 || this.aFloatArray8310[var6] != var4 || this.aFloatArray8318[var6] != var5) {
            this.aFloatArray8315[var6] = var2;
            this.aFloatArray8311[var6] = var3;
            this.aFloatArray8310[var6] = var4;
            this.aFloatArray8318[var6] = var5;
            if(var1.method15648(45943222) != Class122.aClass122_1236) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform4f(var6, var2, var3, var4, var5);
         }

      }
   }

   Class100_Sub2(Class545_Sub2_Sub2 var1, Class84 var2) {
      this.anInt8308 = 0;
      this.anInt8309 = 0;
      this.anInt8312 = 0;
      this.aBool8306 = false;
      this.anIntArray8307 = new int[13];
      this.aString1004 = var2.aString855;
      StringBuilder var3 = new StringBuilder();
      Class83[] var4;
      int var5;
      Class83 var6;
      if(var2.aString852 != null) {
         this.aString1002 = var2.aString852;
         if(var2.aClass83Array854 != null) {
            var4 = var2.aClass83Array854;

            for(var5 = 0; var5 < var4.length; ++var5) {
               var6 = var4[var5];
               var3.append("#define " + var6.aString850 + " " + var6.aString849 + '\n');
            }
         }

         var3.append(new String(var1.method15902(this.aString1002)));
         this.aString8320 = var3.toString();
      }

      if(var2.aString853 != null) {
         this.aString1003 = var2.aString853;
         var3.setLength(0);
         if(var2.aClass83Array851 != null) {
            var4 = var2.aClass83Array851;

            for(var5 = 0; var5 < var4.length; ++var5) {
               var6 = var4[var5];
               var3.append("#define " + var6.aString850 + " " + var6.aString849 + '\n');
            }
         }

         var3.append(new String(var1.method15902(this.aString1003)));
         this.aString8321 = var3.toString();
      }

      Class492.method8219(this.anIntArray8307, 0, this.anIntArray8307.length, -1);
   }

   void method1923(Class225_Sub36_Sub1 var1, float[] var2, int var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         OpenGL.glUniform4fv(var4, var3, var2, 0);
      }
   }

   void method1957(Class225_Sub36_Sub1 var1, Class317 var2) {
      if(!$assertionsDisabled && var1.method15648(-1600654927) != Class122.aClass122_1277) {
         throw new AssertionError();
      } else {
         int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
         if(var3 != -1) {
            OpenGL.glUniform2fv(var3, 4, var2.method5640(aFloatArray8314), 0);
         }
      }
   }

   void method1950(Class225_Sub36_Sub1 var1, Class317 var2) {
      if(!$assertionsDisabled && var1.method15648(1641525725) != Class122.aClass122_1277) {
         throw new AssertionError();
      } else {
         int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
         if(var3 != -1) {
            OpenGL.glUniform2fv(var3, 4, var2.method5640(aFloatArray8314), 0);
         }
      }
   }

   void method1951(Class225_Sub36_Sub1 var1, int var2, Interface38 var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(var3 == null) {
            var3 = this.aClass545_Sub2_Sub2_8313.anInterface33_9693;
         }

         if(var2 < this.aClass545_Sub2_Sub2_8313.anInt9764) {
            this.aClass545_Sub2_Sub2_8313.method15050(var2);
            this.aClass545_Sub2_Sub2_8313.method15051((Interface38)var3);
         } else {
            OpenGL.glActiveTexture('\u84c0' + var2);
            OpenGL.glBindTexture(((Class275)var3).anInt3194, ((Class275)var3).anInt3187);
         }

         if(this.anIntArray8319[var4] != var2) {
            this.anIntArray8319[var4] = var2;
            OpenGL.glUniform1i(var4, var2);
         }

      }
   }

   void method1952(Class225_Sub36_Sub1 var1, int var2, Interface38 var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(var3 == null) {
            var3 = this.aClass545_Sub2_Sub2_8313.anInterface33_9693;
         }

         if(var2 < this.aClass545_Sub2_Sub2_8313.anInt9764) {
            this.aClass545_Sub2_Sub2_8313.method15050(var2);
            this.aClass545_Sub2_Sub2_8313.method15051((Interface38)var3);
         } else {
            OpenGL.glActiveTexture('\u84c0' + var2);
            OpenGL.glBindTexture(((Class275)var3).anInt3194, ((Class275)var3).anInt3187);
         }

         if(this.anIntArray8319[var4] != var2) {
            this.anIntArray8319[var4] = var2;
            OpenGL.glUniform1i(var4, var2);
         }

      }
   }

   void method1975(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   public void method8() {
      if(this.anInt8308 != 0) {
         this.aClass545_Sub2_Sub2_8313.method15911(this.anInt8308);
         if(this.anInt8309 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8309);
         }

         if(this.anInt8312 != 0) {
            this.aClass545_Sub2_Sub2_8313.method15910((long)this.anInt8312);
         }

         this.anInt8308 = 0;
         this.anInt8309 = 0;
         this.anInt8312 = 0;
      }

   }

   public boolean method1941() {
      if(this.aBool8306) {
         return true;
      } else {
         this.aClass545_Sub2_Sub2_8313.aClass100_Sub2_10350 = null;
         this.anInt8309 = this.method13232('\u8b31', this.aString8320, this.aString1002);
         this.anInt8312 = this.method13232('\u8b30', this.aString8321, this.aString1003);
         if(this.anInt8309 != 0 && this.anInt8312 != 0) {
            this.anInt8308 = OpenGL.glCreateProgram();
            if(this.anInt8309 != 0) {
               OpenGL.glAttachShader(this.anInt8308, this.anInt8309);
            }

            if(this.anInt8312 != 0) {
               OpenGL.glAttachShader(this.anInt8308, this.anInt8312);
            }

            OpenGL.glLinkProgram(this.anInt8308);
            OpenGL.glGetProgramiv(this.anInt8308, '\u8b82', anIntArray8303, 0);
            if(anIntArray8303[0] == 0) {
               if(this.anInt8309 != 0) {
                  OpenGL.glDetachShader(this.anInt8308, this.anInt8309);
                  OpenGL.glDeleteShader(this.anInt8309);
               }

               if(this.anInt8312 != 0) {
                  OpenGL.glDetachShader(this.anInt8308, this.anInt8312);
                  OpenGL.glDeleteShader(this.anInt8312);
               }

               OpenGL.glDeleteProgram(this.anInt8308);
               return false;
            } else {
               OpenGL.glUseProgram(this.anInt8308);
               int var1 = -1;

               int var2;
               for(var2 = 0; var2 < this.aClass103_Sub1_8317.method2003(-181018706); ++var2) {
                  if(this.aClass103_Sub1_8317.method2004(var2, -1994094503) == this) {
                     var1 = var2;
                     break;
                  }
               }

               if(var1 == -1) {
                  return false;
               } else {
                  var2 = 0;
                  int var3 = 0;

                  int var4;
                  Class225_Sub36_Sub1 var5;
                  Class122 var6;
                  int var7;
                  for(var4 = 0; var4 < this.aClass103_Sub1_8317.method2034((byte)-13); ++var4) {
                     var5 = this.aClass103_Sub1_8317.method2092(var4, -1440761066);
                     if(var5 != null) {
                        var5.method15631(var1);
                        var6 = var5.method15648(2030529506);
                        var7 = ((Class225_Sub36_Sub1_Sub2)var5).anIntArray10667[var1];
                        if(var6 != Class122.aClass122_1233 && var6 != Class122.aClass122_1279 && var6 != Class122.aClass122_1234 && var6 != Class122.aClass122_1235 && var6 != Class122.aClass122_1236) {
                           var3 = Math.max(var7, var3);
                        } else {
                           var2 = Math.max(var7, var2);
                        }
                     }
                  }

                  for(var4 = 0; var4 < this.aClass103_Sub1_8317.method2031(-1192853204); ++var4) {
                     var5 = this.aClass103_Sub1_8317.method2032(var4, (byte)12);
                     if(var5 != null) {
                        var5.method15631(var1);
                        var6 = var5.method15648(953033886);
                        var7 = ((Class225_Sub36_Sub1_Sub2)var5).anIntArray10667[var1];
                        if(var6 != Class122.aClass122_1233 && var6 != Class122.aClass122_1279 && var6 != Class122.aClass122_1234 && var6 != Class122.aClass122_1235 && var6 != Class122.aClass122_1236) {
                           var3 = Math.max(var7, var3);
                        } else {
                           var2 = Math.max(var7, var2);
                        }
                     }
                  }

                  this.aFloatArray8315 = new float[var2 + 1];
                  this.aFloatArray8311 = new float[var2 + 1];
                  this.aFloatArray8310 = new float[var2 + 1];
                  this.aFloatArray8318 = new float[var2 + 1];
                  this.anIntArray8319 = new int[var3 + 1];

                  for(var4 = 0; var4 < this.anIntArray8319.length; ++var4) {
                     this.anIntArray8319[var4] = -1;
                  }

                  this.aString8320 = null;
                  this.aString8321 = null;
                  this.aBool8306 = true;
                  return true;
               }
            }
         } else {
            if(this.anInt8309 != 0) {
               OpenGL.glDeleteShader(this.anInt8309);
            }

            if(this.anInt8312 != 0) {
               OpenGL.glDeleteShader(this.anInt8312);
            }

            return false;
         }
      }
   }

   void method1956(int var1, float var2, float var3, float var4, float var5) {
      OpenGL.glUniform4f(var1, var2, var3, var4, var5);
   }

   void method1946(int var1, float[] var2, int var3) {
      OpenGL.glUniform4fv(var1, var3, var2, 0);
   }

   void method1958(int var1, float[] var2, int var3) {
      OpenGL.glUniform4fv(var1, var3, var2, 0);
   }

   int method13232(int var1, String var2, String var3) {
      if(var2 == null) {
         return 0;
      } else {
         int var4 = OpenGL.glCreateShader(var1);
         OpenGL.glShaderSource(var4, var2);
         OpenGL.glCompileShader(var4);
         OpenGL.glGetShaderiv(var4, '\u8b81', anIntArray8303, 0);
         if(anIntArray8303[0] == 0) {
            OpenGL.glDeleteShader(var4);
            var4 = 0;
         }

         return var4;
      }
   }

   void method1959(int var1, float[] var2, int var3) {
      OpenGL.glUniform4fv(var1, var3, var2, 0);
   }

   void method1936(Class225_Sub36_Sub1 var1, float var2, float var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(this.aFloatArray8315[var4] != var2 || this.aFloatArray8311[var4] != var3) {
            this.aFloatArray8315[var4] = var2;
            this.aFloatArray8311[var4] = var3;
            if(var1.method15648(217402181) != Class122.aClass122_1234) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform2f(var4, var2, var3);
         }

      }
   }

   void method1962(int var1, Class317 var2) {
      OpenGL.glUniform3fv(var1, 3, var2.method5721(aFloatArray8314), 0);
   }

   void method1963(int var1, Class317 var2) {
      OpenGL.glUniform3fv(var1, 3, var2.method5721(aFloatArray8314), 0);
   }

   void method1934(Class225_Sub36_Sub1 var1, Class317 var2) {
      if(!$assertionsDisabled && var1.method15648(848943793) != Class122.aClass122_1290) {
         throw new AssertionError();
      } else {
         int var3 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
         if(var3 != -1) {
            OpenGL.glUniform4fv(var3, 4, var2.method5636(aFloatArray8314), 0);
         }
      }
   }

   void method1965(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1966(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1954(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1968(int var1, Class317 var2) {
      OpenGL.glUniform2fv(var1, 4, var2.method5640(aFloatArray8314), 0);
   }

   void method1955(int var1, float var2, float var3, float var4) {
      OpenGL.glUniform3f(var1, var2, var3, var4);
   }

   void method1937(int var1, Class317 var2) {
      OpenGL.glUniform4fv(var1, 4, var2.method5636(aFloatArray8314), 0);
   }

   void method1971(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   void method1931(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   void method1973(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   void method1949(int var1, int var2, Interface38 var3) {
      this.aClass545_Sub2_Sub2_8313.method15050(var2);
      this.aClass545_Sub2_Sub2_8313.method15051(var3);
      OpenGL.glUniform1i(var1, var2);
   }

   void method1933(int var1, Class317 var2) {
      OpenGL.glUniform3fv(var1, 3, var2.method5721(aFloatArray8314), 0);
   }

   void method1977(Class225_Sub36_Sub1 var1, float var2, float var3) {
      int var4 = ((Class225_Sub36_Sub1_Sub2)var1).method16475();
      if(var4 != -1) {
         if(this.aFloatArray8315[var4] != var2 || this.aFloatArray8311[var4] != var3) {
            this.aFloatArray8315[var4] = var2;
            this.aFloatArray8311[var4] = var3;
            if(var1.method15648(1262688343) != Class122.aClass122_1234) {
               throw new IllegalArgumentException_Sub1(var1, "");
            }

            OpenGL.glUniform2f(var4, var2, var3);
         }

      }
   }

   int method13233(int var1, String var2, String var3) {
      if(var2 == null) {
         return 0;
      } else {
         int var4 = OpenGL.glCreateShader(var1);
         OpenGL.glShaderSource(var4, var2);
         OpenGL.glCompileShader(var4);
         OpenGL.glGetShaderiv(var4, '\u8b81', anIntArray8303, 0);
         if(anIntArray8303[0] == 0) {
            OpenGL.glDeleteShader(var4);
            var4 = 0;
         }

         return var4;
      }
   }

   void method1930(int var1, float var2, float var3, float var4) {
      OpenGL.glUniform3f(var1, var2, var3, var4);
   }
}
