/* Class145 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jaggl.OpenGL;

public class Class145
{
    int anInt1718;
    Class87_Sub1 aClass87_Sub1_1719;
    static int[] anIntArray1720 = new int[2];
    
    static Class145 method3522(Class87_Sub1 class87_sub1,
			       Class155[] class155s) {
	for (int i = 0; i < class155s.length; i++) {
	    if (class155s[i] == null
		|| ((Class155) class155s[i]).anInt1766 <= 0)
		return null;
	}
	int i = OpenGL.glCreateProgram();
	for (int i_0_ = 0; i_0_ < class155s.length; i_0_++)
	    OpenGL.glAttachShader(i, ((Class155) class155s[i_0_]).anInt1766);
	OpenGL.glLinkProgram(i);
	OpenGL.glGetProgramiv(i, 35714, anIntArray1720, 0);
	if (anIntArray1720[0] == 0) {
	    OpenGL.glGetProgramiv(i, 35716, anIntArray1720, 1);
	    if (anIntArray1720[1] > 1) {
		byte[] is = new byte[anIntArray1720[1]];
		OpenGL.glGetProgramInfoLog(i, anIntArray1720[1],
					   anIntArray1720, 0, is, 0);
		System.out.println(new String(is));
	    }
	    if (anIntArray1720[0] == 0) {
		for (int i_1_ = 0; i_1_ < class155s.length; i_1_++)
		    OpenGL.glDetachShader(i, (((Class155) class155s[i_1_])
					      .anInt1766));
		OpenGL.glDeleteProgram(i);
		return null;
	    }
	}
	return new Class145(class87_sub1, i, class155s);
    }
    
    Class145(Class87_Sub1 class87_sub1, int i, Class155[] class155s) {
	((Class145) this).aClass87_Sub1_1719 = class87_sub1;
	((Class145) this).anInt1718 = i;
    }
    
    public void finalize() throws Throwable {
	((Class145) this).aClass87_Sub1_1719
	    .method15044((long) ((Class145) this).anInt1718);
	super.finalize();
    }
    
    static Class145 method3523(Class87_Sub1 class87_sub1,
			       Class155[] class155s) {
	for (int i = 0; i < class155s.length; i++) {
	    if (class155s[i] == null
		|| ((Class155) class155s[i]).anInt1766 <= 0)
		return null;
	}
	int i = OpenGL.glCreateProgram();
	for (int i_2_ = 0; i_2_ < class155s.length; i_2_++)
	    OpenGL.glAttachShader(i, ((Class155) class155s[i_2_]).anInt1766);
	OpenGL.glLinkProgram(i);
	OpenGL.glGetProgramiv(i, 35714, anIntArray1720, 0);
	if (anIntArray1720[0] == 0) {
	    OpenGL.glGetProgramiv(i, 35716, anIntArray1720, 1);
	    if (anIntArray1720[1] > 1) {
		byte[] is = new byte[anIntArray1720[1]];
		OpenGL.glGetProgramInfoLog(i, anIntArray1720[1],
					   anIntArray1720, 0, is, 0);
		System.out.println(new String(is));
	    }
	    if (anIntArray1720[0] == 0) {
		for (int i_3_ = 0; i_3_ < class155s.length; i_3_++)
		    OpenGL.glDetachShader(i, (((Class155) class155s[i_3_])
					      .anInt1766));
		OpenGL.glDeleteProgram(i);
		return null;
	    }
	}
	return new Class145(class87_sub1, i, class155s);
    }
    
    static Class145 method3524(Class87_Sub1 class87_sub1,
			       Class155[] class155s) {
	for (int i = 0; i < class155s.length; i++) {
	    if (class155s[i] == null
		|| ((Class155) class155s[i]).anInt1766 <= 0)
		return null;
	}
	int i = OpenGL.glCreateProgram();
	for (int i_4_ = 0; i_4_ < class155s.length; i_4_++)
	    OpenGL.glAttachShader(i, ((Class155) class155s[i_4_]).anInt1766);
	OpenGL.glLinkProgram(i);
	OpenGL.glGetProgramiv(i, 35714, anIntArray1720, 0);
	if (anIntArray1720[0] == 0) {
	    OpenGL.glGetProgramiv(i, 35716, anIntArray1720, 1);
	    if (anIntArray1720[1] > 1) {
		byte[] is = new byte[anIntArray1720[1]];
		OpenGL.glGetProgramInfoLog(i, anIntArray1720[1],
					   anIntArray1720, 0, is, 0);
		System.out.println(new String(is));
	    }
	    if (anIntArray1720[0] == 0) {
		for (int i_5_ = 0; i_5_ < class155s.length; i_5_++)
		    OpenGL.glDetachShader(i, (((Class155) class155s[i_5_])
					      .anInt1766));
		OpenGL.glDeleteProgram(i);
		return null;
	    }
	}
	return new Class145(class87_sub1, i, class155s);
    }
    
    void method3525() throws Throwable {
	((Class145) this).aClass87_Sub1_1719
	    .method15044((long) ((Class145) this).anInt1718);
	super.finalize();
    }
}
