/* Class180 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Class180 implements Interface7
{
    Class272 aClass272_2171;
    Class272 aClass272_2172;
    static int anInt2173;
    
    float[] method3917(int i, int i_0_) {
	int[] is = method3918(i, 103559564);
	if (null == is)
	    return null;
	int[] is_1_ = null;
	if (((Class180) this).aClass272_2172.method5260(i, -1635159169)) {
	    byte[] is_2_
		= ((Class180) this).aClass272_2172.method5258(i, 514937924);
	    if (null != is_2_) {
		try {
		    is_1_ = method3923(is_2_, (byte) 3);
		    for (int i_3_ = 0; i_3_ < is_1_.length; i_3_++)
			is_1_[i_3_] = is_1_[i_3_] & 0xfff;
		} catch (IOException ioexception) {
		    /* empty */
		}
	    }
	}
	if (is_1_ == null)
	    is_1_ = new int[is.length];
	float[] fs = new float[4 * is.length];
	int i_4_ = 0;
	for (int i_5_ = 0; i_5_ < is.length; i_5_++) {
	    int i_6_ = is[i_5_];
	    int i_7_ = i_6_ >>> 24;
	    int i_8_ = (i_6_ & 0xff0000) >> 16;
	    int i_9_ = (i_6_ & 0xff00) >> 8;
	    int i_10_ = i_6_ & 0xff;
	    float f = 31.0F * (float) is_1_[i_5_] / 4096.0F + 1.0F;
	    fs[i_4_++] = (float) i_8_ * f / 255.0F;
	    fs[i_4_++] = f * (float) i_9_ / 255.0F;
	    fs[i_4_++] = (float) i_10_ * f / 255.0F;
	    fs[i_4_++] = (float) i_7_ / 255.0F;
	}
	return fs;
    }
    
    public boolean method30(int i, Class518 class518, float f, int i_11_,
			    int i_12_, boolean bool, byte i_13_) {
	boolean bool_14_ = true;
	if (((Class180) this).aClass272_2172.method5260(i, -1635159169))
	    bool_14_
		= ((Class180) this).aClass272_2172.method5325(i, 1975497618);
	bool_14_ &= ((Class180) this).aClass272_2171.method5325(i, 1767195001);
	return bool_14_;
    }
    
    public float[] method44(int i, float f, int i_15_, int i_16_,
			    boolean bool) {
	return method3917(i, -1269936897);
    }
    
    int[] method3918(int i, int i_17_) {
	byte[] is = ((Class180) this).aClass272_2171.method5258(i, 248659154);
	if (is == null)
	    return null;
	int[] is_18_;
	try {
	    int[] is_19_ = method3923(is, (byte) 3);
	    is_18_ = is_19_;
	} catch (IOException ioexception) {
	    return null;
	}
	return is_18_;
    }
    
    int[] method3919(int i) {
	byte[] is = ((Class180) this).aClass272_2171.method5258(i, -147495296);
	if (is == null)
	    return null;
	int[] is_20_;
	try {
	    int[] is_21_ = method3923(is, (byte) 3);
	    is_20_ = is_21_;
	} catch (IOException ioexception) {
	    return null;
	}
	return is_20_;
    }
    
    public void method38() {
	/* empty */
    }
    
    public int[] method34(int i, float f, int i_22_, int i_23_, boolean bool,
			  short i_24_) {
	return method3920(i, 1428135921);
    }
    
    public int[] method32(int i, float f, int i_25_, int i_26_, boolean bool,
			  int i_27_) {
	return method3918(i, -552286190);
    }
    
    public int[] method31(int i, float f, int i_28_, int i_29_, boolean bool) {
	return method3920(i, 360961093);
    }
    
    public int[] method40(int i, float f, int i_30_, int i_31_, boolean bool) {
	return method3918(i, 199386913);
    }
    
    int[] method3920(int i, int i_32_) {
	int[] is = method3918(i, 673126449);
	if (is == null)
	    return null;
	for (int i_33_ = 0; i_33_ < is.length; i_33_++) {
	    if (0 != (is[i_33_] & 0xffffff))
		is[i_33_] = is[i_33_] | ~0xffffff;
	    else
		is[i_33_] = is[i_33_] & 0xffffff;
	}
	return is;
    }
    
    int[] method3921(int i) {
	byte[] is = ((Class180) this).aClass272_2171.method5258(i, -115845488);
	if (is == null)
	    return null;
	int[] is_34_;
	try {
	    int[] is_35_ = method3923(is, (byte) 3);
	    is_34_ = is_35_;
	} catch (IOException ioexception) {
	    return null;
	}
	return is_34_;
    }
    
    float[] method3922(int i) {
	int[] is = method3918(i, 1272313395);
	if (null == is)
	    return null;
	int[] is_36_ = null;
	if (((Class180) this).aClass272_2172.method5260(i, -1635159169)) {
	    byte[] is_37_
		= ((Class180) this).aClass272_2172.method5258(i, 505822723);
	    if (null != is_37_) {
		try {
		    is_36_ = method3923(is_37_, (byte) 3);
		    for (int i_38_ = 0; i_38_ < is_36_.length; i_38_++)
			is_36_[i_38_] = is_36_[i_38_] & 0xfff;
		} catch (IOException ioexception) {
		    /* empty */
		}
	    }
	}
	if (is_36_ == null)
	    is_36_ = new int[is.length];
	float[] fs = new float[4 * is.length];
	int i_39_ = 0;
	for (int i_40_ = 0; i_40_ < is.length; i_40_++) {
	    int i_41_ = is[i_40_];
	    int i_42_ = i_41_ >>> 24;
	    int i_43_ = (i_41_ & 0xff0000) >> 16;
	    int i_44_ = (i_41_ & 0xff00) >> 8;
	    int i_45_ = i_41_ & 0xff;
	    float f = 31.0F * (float) is_36_[i_40_] / 4096.0F + 1.0F;
	    fs[i_39_++] = (float) i_43_ * f / 255.0F;
	    fs[i_39_++] = f * (float) i_44_ / 255.0F;
	    fs[i_39_++] = (float) i_45_ * f / 255.0F;
	    fs[i_39_++] = (float) i_42_ / 255.0F;
	}
	return fs;
    }
    
    public void method36(byte i) {
	/* empty */
    }
    
    public void method35() {
	/* empty */
    }
    
    public void method37() {
	/* empty */
    }
    
    public int[] method39(int i, float f, int i_46_, int i_47_, boolean bool) {
	return method3918(i, 36025914);
    }
    
    int[] method3923(byte[] is, byte i) throws IOException {
	BufferedImage bufferedimage
	    = ImageIO.read(new ByteArrayInputStream(is));
	if (bufferedimage.getType() == 10 || bufferedimage.getType() == 0) {
	    int[] is_48_ = null;
	    is_48_
		= bufferedimage.getRaster().getPixels(0, 0,
						      bufferedimage.getWidth(),
						      bufferedimage
							  .getHeight(),
						      is_48_);
	    int[] is_49_
		= (new int
		   [bufferedimage.getWidth() * bufferedimage.getHeight()]);
	    if (bufferedimage.getType() == 10) {
		for (int i_50_ = 0; i_50_ < is_49_.length; i_50_++)
		    is_49_[i_50_] = -16777216 + (is_48_[i_50_]
						 + ((is_48_[i_50_] << 8)
						    + (is_48_[i_50_] << 16)));
	    } else {
		for (int i_51_ = 0; i_51_ < is_49_.length; i_51_++) {
		    int i_52_ = i_51_ * 2;
		    is_49_[i_51_]
			= ((is_48_[i_52_ + 1] << 24) + is_48_[i_52_]
			   + ((is_48_[i_52_] << 16) + (is_48_[i_52_] << 8)));
		}
	    }
	    return is_49_;
	}
	return bufferedimage.getRGB(0, 0, bufferedimage.getWidth(),
				    bufferedimage.getHeight(), null, 0,
				    bufferedimage.getWidth());
    }
    
    public float[] method33(int i, float f, int i_53_, int i_54_, boolean bool,
			    int i_55_) {
	return method3917(i, -1269936897);
    }
    
    public float[] method41(int i, float f, int i_56_, int i_57_,
			    boolean bool) {
	return method3917(i, -1269936897);
    }
    
    public float[] method42(int i, float f, int i_58_, int i_59_,
			    boolean bool) {
	return method3917(i, -1269936897);
    }
    
    public float[] method45(int i, float f, int i_60_, int i_61_,
			    boolean bool) {
	return method3917(i, -1269936897);
    }
    
    public Class180(Class272 class272, Class272 class272_62_) {
	((Class180) this).aClass272_2171 = class272;
	((Class180) this).aClass272_2172 = class272_62_;
    }
    
    int[] method3924(byte[] is) throws IOException {
	BufferedImage bufferedimage
	    = ImageIO.read(new ByteArrayInputStream(is));
	if (bufferedimage.getType() == 10 || bufferedimage.getType() == 0) {
	    int[] is_63_ = null;
	    is_63_
		= bufferedimage.getRaster().getPixels(0, 0,
						      bufferedimage.getWidth(),
						      bufferedimage
							  .getHeight(),
						      is_63_);
	    int[] is_64_
		= (new int
		   [bufferedimage.getWidth() * bufferedimage.getHeight()]);
	    if (bufferedimage.getType() == 10) {
		for (int i = 0; i < is_64_.length; i++)
		    is_64_[i]
			= -16777216 + (is_63_[i] + ((is_63_[i] << 8)
						    + (is_63_[i] << 16)));
	    } else {
		for (int i = 0; i < is_64_.length; i++) {
		    int i_65_ = i * 2;
		    is_64_[i]
			= ((is_63_[i_65_ + 1] << 24) + is_63_[i_65_]
			   + ((is_63_[i_65_] << 16) + (is_63_[i_65_] << 8)));
		}
	    }
	    return is_64_;
	}
	return bufferedimage.getRGB(0, 0, bufferedimage.getWidth(),
				    bufferedimage.getHeight(), null, 0,
				    bufferedimage.getWidth());
    }
    
    public boolean method43(int i, Class518 class518, float f, int i_66_,
			    int i_67_, boolean bool) {
	boolean bool_68_ = true;
	if (((Class180) this).aClass272_2172.method5260(i, -1635159169))
	    bool_68_
		= ((Class180) this).aClass272_2172.method5325(i, 2019928311);
	bool_68_ &= ((Class180) this).aClass272_2171.method5325(i, 1475383153);
	return bool_68_;
    }
    
    public boolean method46(int i, Class518 class518, float f, int i_69_,
			    int i_70_, boolean bool) {
	boolean bool_71_ = true;
	if (((Class180) this).aClass272_2172.method5260(i, -1635159169))
	    bool_71_
		= ((Class180) this).aClass272_2172.method5325(i, 2036793466);
	bool_71_ &= ((Class180) this).aClass272_2171.method5325(i, 1706902661);
	return bool_71_;
    }
    
    static final void method3925(Class479 class479, int i) {
	((Class479) class479).aLongArray6439[((((Class479) class479).anInt6440
					       += -1775987429) * -2099462893
					      - 1)]
	    = (((Class479) class479).aLongArray6430
	       [(((Class479) class479).anIntArray6456
		 [((Class479) class479).anInt6458 * 1798300503])]);
    }
    
    static final void method3926(Class479 class479, int i) {
	Class243_Sub6 class243_sub6
	    = (Class243_Sub6) (((Class479) class479).anObjectArray6437
			       [(((Class479) class479).anInt6432
				 -= -1049632545) * -611591393]);
	((Class479) class479).anIntArray6435
	    [(((Class479) class479).anInt6442 += -1158629699) * -117934955 - 1]
	    = -666311633 * class243_sub6.anInt8616;
    }
    
    static final void method3927(Class479 class479, byte i) {
	((Class479) class479).anInt6442 -= -1158629699;
	int i_72_ = (((Class479) class479).anIntArray6435
		     [((Class479) class479).anInt6442 * -117934955]);
	((Class479) class479).anIntArray6435
	    [(((Class479) class479).anInt6442 += -1158629699) * -117934955 - 1]
	    = Class99.method2666(i_72_, 1353824553);
    }
    
    static final void method3928(Class479 class479, byte i) {
	String string = (String) (((Class479) class479).anObjectArray6437
				  [(((Class479) class479).anInt6432
				    -= -1049632545) * -611591393]);
	Class194 class194 = Class489.method11175(1749689597);
	Class243_Sub43 class243_sub43
	    = Class529.method11818(Class326.aClass326_4860,
				   class194.aClass432_2312, (short) 255);
	class243_sub43.aClass243_Sub10_Sub1_9988.method14800(0, 1658250999);
	int i_73_
	    = class243_sub43.aClass243_Sub10_Sub1_9988.anInt8688 * 126215893;
	class243_sub43.aClass243_Sub10_Sub1_9988.method14652(string,
							     (byte) -18);
	class243_sub43.aClass243_Sub10_Sub1_9988.method14643
	    (-2030577023 * ((Class479) class479).aClass341_6438.anInt5340,
	     (short) 14047);
	((Class479) class479).aClass341_6438.aClass243_Sub11_Sub9_5341
	    .method17146
	    (class243_sub43.aClass243_Sub10_Sub1_9988,
	     ((Class479) class479).aClass341_6438.anIntArray5342, (byte) -6);
	class243_sub43.aClass243_Sub10_Sub1_9988.method14830
	    ((126215893 * class243_sub43.aClass243_Sub10_Sub1_9988.anInt8688
	      - i_73_),
	     (byte) 26);
	class194.method4175(class243_sub43, (byte) 102);
    }
    
    static final void method3929(Class479 class479, int i) {
	int i_74_ = (((Class479) class479).anIntArray6435
		     [((((Class479) class479).anInt6442 -= -1158629699)
		       * -117934955)]);
	if (i_74_ < 0 || i_74_ > 5 || 2 == i_74_)
	    i_74_ = 3;
	Class292.method5873(i_74_, false, 1809067002);
    }
    
    public static Class304 method3930(Class243_Sub10 class243_sub10, byte i) {
	Class304 class304 = Class281.method5683(class243_sub10, -515246372);
	int i_75_ = class243_sub10.method14843(1450006314);
	int i_76_ = class243_sub10.method14843(1903701259);
	return new Class304_Sub1(class304.aClass306_4546,
				 class304.aClass305_4543,
				 class304.anInt4544 * -237488779,
				 class304.anInt4548 * -206129733,
				 176292697 * class304.anInt4542,
				 687155521 * class304.anInt4547,
				 class304.anInt4545 * -525631281,
				 589668307 * class304.anInt4549,
				 class304.anInt4550 * 1857407213, i_75_,
				 i_76_);
    }
}
