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

public class Class171_Sub1_Sub2_Sub2 extends Class171_Sub1_Sub2 {
	int anInt10946;
	Class84_Sub1_Sub1 aClass84_Sub1_Sub1_10947;
	int anInt10948;
	int anInt10949;
	static final int anInt10950 = 16;
	int anInt10951;
	Interface21 anInterface21_10952;
	int anInt10953;
	Interface21[] anInterface21Array10954 = new Interface21[4];

	boolean method249() {
		OpenGL.glBindFramebufferEXT(36160, (((Class171_Sub1_Sub2_Sub2) this).anInt10948));
		for (int i = 0; i < 4; i++) {
			if ((((Class171_Sub1_Sub2_Sub2) this).anInt10953 & 1 << i) != 0)
				method17275(i);
		}
		if ((((Class171_Sub1_Sub2_Sub2) this).anInt10953 & 0x10) != 0)
			method17274();
		((Class171_Sub1_Sub2_Sub2) this).anInt10953 = 0;
		return super.method249();
	}

	void method17271() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}

	public int method3755() {
		return ((Class171_Sub1_Sub2_Sub2) this).anInt10946;
	}

	public void method14732(int i, Interface11 interface11) {
		int i_0_ = 1 << i;
		Interface21 interface21 = (Interface21) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= i_0_;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= i_0_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(1039081769))
			method17275(i);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= i_0_;
	}

	void method17272() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}

	void method17273() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}

	void method17274() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}

	public boolean method14731() {
		int i = OpenGL.glCheckFramebufferStatusEXT(36160);
		if (i != 36053)
			return false;
		return true;
	}

	public void method247() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInt10948 != 0) {
			((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method16563(((Class171_Sub1_Sub2_Sub2) this).anInt10948);
			((Class171_Sub1_Sub2_Sub2) this).anInt10948 = 0;
		}
	}

	boolean method3756() {
		OpenGL.glBindFramebufferEXT(36160, 0);
		return true;
	}

	public void method54() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInt10948 != 0) {
			((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method16563(((Class171_Sub1_Sub2_Sub2) this).anInt10948);
			((Class171_Sub1_Sub2_Sub2) this).anInt10948 = 0;
		}
	}

	Class171_Sub1_Sub2_Sub2(Class84_Sub1_Sub1 class84_sub1_sub1) {
		super((Class84_Sub1) class84_sub1_sub1);
		((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947 = class84_sub1_sub1;
		int[] is = new int[1];
		OpenGL.glGenFramebuffersEXT(1, is, 0);
		((Class171_Sub1_Sub2_Sub2) this).anInt10948 = is[0];
	}

	public void finalize() throws Throwable {
		super.finalize();
		method54();
	}

	public void method14733(Interface7 interface7) {
		Interface21 interface21 = (Interface21) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= 0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= ~0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(1425081600))
			method17274();
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= 0x10;
	}

	public void method14740(int i, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_, boolean bool, boolean bool_6_) {
		if (bool | bool_6_) {
			int i_7_ = ((Class171_Sub1_Sub2_Sub2) this).anInt10946;
			int i_8_ = ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-925396778).method3755();
			int i_9_ = 0;
			if (bool_6_)
				i_9_ |= 0x100;
			if (bool)
				i_9_ |= 0x4000;
			OpenGL.glBindFramebufferEXT(36008, (((Class171_Sub1_Sub2_Sub2) this).anInt10948));
			OpenGL.glBlitFramebufferEXT(i, i_7_ - i_1_ - i_3_, i + i_2_, i_7_ - i_1_, i_4_, i_8_ - i_5_ - i_3_, i_4_ + i_2_, i_8_ - i_5_, i_9_, 9728);
			OpenGL.glBindFramebufferEXT(36008, 0);
		}
	}

	public int method3759() {
		return ((Class171_Sub1_Sub2_Sub2) this).anInt10946;
	}

	public void method14735(Interface7 interface7) {
		Interface21 interface21 = (Interface21) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= 0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= ~0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(1944149292))
			method17274();
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= 0x10;
	}

	public void method14734(Interface7 interface7) {
		Interface21 interface21 = (Interface21) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= 0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= ~0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-1857262490))
			method17274();
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= 0x10;
	}

	public void method14736(Interface7 interface7) {
		Interface21 interface21 = (Interface21) interface7;
		if (interface7 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= 0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= ~0x10;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-892326127))
			method17274();
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= 0x10;
	}

	public boolean method14737() {
		int i = OpenGL.glCheckFramebufferStatusEXT(36160);
		if (i != 36053)
			return false;
		return true;
	}

	public boolean method14730() {
		int i = OpenGL.glCheckFramebufferStatusEXT(36160);
		if (i != 36053)
			return false;
		return true;
	}

	public boolean method14739() {
		int i = OpenGL.glCheckFramebufferStatusEXT(36160);
		if (i != 36053)
			return false;
		return true;
	}

	boolean method18() {
		OpenGL.glBindFramebufferEXT(36160, (((Class171_Sub1_Sub2_Sub2) this).anInt10948));
		for (int i = 0; i < 4; i++) {
			if ((((Class171_Sub1_Sub2_Sub2) this).anInt10953 & 1 << i) != 0)
				method17275(i);
		}
		if ((((Class171_Sub1_Sub2_Sub2) this).anInt10953 & 0x10) != 0)
			method17274();
		((Class171_Sub1_Sub2_Sub2) this).anInt10953 = 0;
		return super.method249();
	}

	boolean method3760() {
		OpenGL.glBindFramebufferEXT(36160, 0);
		return true;
	}

	void method17275(int i) {
		Interface21 interface21 = ((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i];
		if (interface21 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
		else
			interface21.method66(36064 + i);
	}

	public void method14741(int i, int i_10_, int i_11_, int i_12_, int i_13_, int i_14_, boolean bool, boolean bool_15_) {
		if (bool | bool_15_) {
			int i_16_ = ((Class171_Sub1_Sub2_Sub2) this).anInt10946;
			int i_17_ = ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-2026403491).method3755();
			int i_18_ = 0;
			if (bool_15_)
				i_18_ |= 0x100;
			if (bool)
				i_18_ |= 0x4000;
			OpenGL.glBindFramebufferEXT(36008, (((Class171_Sub1_Sub2_Sub2) this).anInt10948));
			OpenGL.glBlitFramebufferEXT(i, i_16_ - i_10_ - i_12_, i + i_11_, i_16_ - i_10_, i_13_, i_17_ - i_14_ - i_12_, i_13_ + i_11_, i_17_ - i_14_, i_18_, 9728);
			OpenGL.glBindFramebufferEXT(36008, 0);
		}
	}

	public int method3754() {
		return ((Class171_Sub1_Sub2_Sub2) this).anInt10949;
	}

	public int method3757() {
		return ((Class171_Sub1_Sub2_Sub2) this).anInt10949;
	}

	public void method250() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInt10948 != 0) {
			((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method16563(((Class171_Sub1_Sub2_Sub2) this).anInt10948);
			((Class171_Sub1_Sub2_Sub2) this).anInt10948 = 0;
		}
	}

	void method17276() throws Throwable {
		super.finalize();
		method54();
	}

	public void method248() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInt10948 != 0) {
			((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method16563(((Class171_Sub1_Sub2_Sub2) this).anInt10948);
			((Class171_Sub1_Sub2_Sub2) this).anInt10948 = 0;
		}
	}

	public void method14742(int i, Interface11 interface11) {
		int i_19_ = 1 << i;
		Interface21 interface21 = (Interface21) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= i_19_;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= i_19_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-158200682))
			method17275(i);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= i_19_;
	}

	public void method14743(int i, Interface11 interface11) {
		int i_20_ = 1 << i;
		Interface21 interface21 = (Interface21) interface11;
		if (interface11 != null) {
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 != 0) {
				if ((((Class171_Sub1_Sub2_Sub2) this).anInt10949 != interface21.method51()) || (((Class171_Sub1_Sub2_Sub2) this).anInt10946 != interface21.method49()))
					throw new RuntimeException();
			} else {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = interface21.method49();
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = interface21.method51();
				method16678();
			}
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 |= i_20_;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = interface21;
		} else {
			((Class171_Sub1_Sub2_Sub2) this).anInt10951 &= i_20_ ^ 0xffffffff;
			((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i] = null;
			if (((Class171_Sub1_Sub2_Sub2) this).anInt10951 == 0) {
				((Class171_Sub1_Sub2_Sub2) this).anInt10946 = 0;
				((Class171_Sub1_Sub2_Sub2) this).anInt10949 = 0;
			}
		}
		if (this == ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(-432197898))
			method17275(i);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInt10953 |= i_20_;
	}

	void method17277(int i) {
		Interface21 interface21 = ((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i];
		if (interface21 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
		else
			interface21.method66(36064 + i);
	}

	void method17278(int i) {
		Interface21 interface21 = ((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i];
		if (interface21 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
		else
			interface21.method66(36064 + i);
	}

	void method17279(int i) {
		Interface21 interface21 = ((Class171_Sub1_Sub2_Sub2) this).anInterface21Array10954[i];
		if (interface21 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36064 + i, 36161, 0);
		else
			interface21.method66(36064 + i);
	}

	void method17280() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}

	void method17281() throws Throwable {
		super.finalize();
		method54();
	}

	public int method3758() {
		return ((Class171_Sub1_Sub2_Sub2) this).anInt10949;
	}

	public void method14738(int i, int i_21_, int i_22_, int i_23_, int i_24_, int i_25_, boolean bool, boolean bool_26_) {
		if (bool | bool_26_) {
			int i_27_ = ((Class171_Sub1_Sub2_Sub2) this).anInt10946;
			int i_28_ = ((Class171_Sub1_Sub2_Sub2) this).aClass84_Sub1_Sub1_10947.method2063(240639198).method3755();
			int i_29_ = 0;
			if (bool_26_)
				i_29_ |= 0x100;
			if (bool)
				i_29_ |= 0x4000;
			OpenGL.glBindFramebufferEXT(36008, (((Class171_Sub1_Sub2_Sub2) this).anInt10948));
			OpenGL.glBlitFramebufferEXT(i, i_27_ - i_21_ - i_23_, i + i_22_, i_27_ - i_21_, i_24_, i_28_ - i_25_ - i_23_, i_24_ + i_22_, i_28_ - i_25_, i_29_, 9728);
			OpenGL.glBindFramebufferEXT(36008, 0);
		}
	}

	void method17282() {
		if (((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952 == null)
			OpenGL.glFramebufferRenderbufferEXT(36160, 36096, 36161, 0);
		else
			((Class171_Sub1_Sub2_Sub2) this).anInterface21_10952.method66(36096);
	}
}
