private final void method1683(AbstractToolkit var_ha, s var_s, int i, byte i_223_,
				  int[][] is, s var_s_224_, s var_s_225_) {
	do {
	    try {
		anInt3111++;
		for (int i_226_ = 0; i_226_ < maximumX;
		     i_226_++) {
		    for (int i_227_ = 0; maximumY > i_227_;
			 i_227_++) {
			if ((DummyOutputstream.anInt101 ^ 0xffffffff) == 0
			    || Class58.method536(i_227_, false, i_226_,
						 DummyOutputstream.anInt101,
						 i)) {
			    byte i_228_
				= overlayShading[i][i_226_][i_227_];
			    byte i_229_
				= overlayRotation[i][i_226_][i_227_];
			    int i_230_
				= (overlayIds[i][i_226_][i_227_]
				   & 0xff);
			    int i_231_ = 0xff & (underlayIds[i]
						 [i_226_][i_227_]);
			    Class277 class277
				= ((i_230_ ^ 0xffffffff) != -1
				   ? aClass268_3119.method2034(-1 + i_230_,
							       false)
				   : null);
			    if ((i_228_ ^ 0xffffffff) == -1
				&& class277 == null)
				i_228_ = (byte) 12;
			    Class22 class22
				= ((i_231_ ^ 0xffffffff) == -1 ? null
				   : aClass183_3120.method1380(true,
							       i_231_ - 1));
			    int i_232_ = 0;
			    int i_233_ = 0;
			    if (i_228_ != 0) {
				i_233_ = (class277 == null ? 0
					  : (Class348_Sub40_Sub18
					     .anIntArray9249[i_228_]));
				i_232_ = (class22 != null
					  ? Class43.anIntArray619[i_228_] : 0);
			    } else if (class277 != null)
				i_233_ = (Class348_Sub40_Sub18.anIntArray9249
					  [i_228_]);
			    else if (class22 != null)
				i_232_ = (Class348_Sub40_Sub18.anIntArray9249
					  [i_228_]);
			    int i_234_ = i_233_ + i_232_;
			    int i_235_ = 0;
			    if ((i_234_ ^ 0xffffffff) != -1) {
				int i_236_
				    = (class277 != null
				       ? ((Class277) class277).anInt3575 : -1);
				int i_237_
				    = (class22 != null
				       ? ((Class22) class22).anInt331 : -1);
				int[] is_238_ = new int[i_234_];
				int[] is_239_ = new int[i_234_];
				int[] is_240_ = new int[i_234_];
				int[] is_241_ = new int[i_234_];
				boolean bool = false;
				boolean bool_242_ = false;
				if (class277 == null
				    || ((((Class277) class277).anInt3563
					 ^ 0xffffffff) == 0
					&& (((Class277) class277).anInt3569
					    == -1)
					&& i_236_ == -1)) {
				    bool_242_ = true;
				    for (int i_243_ = 0; i_243_ < i_233_;
					 i_243_++) {
					is_238_[i_235_] = -1;
					i_235_++;
				    }
				} else {
				    for (int i_244_ = 0;
					 ((i_244_ ^ 0xffffffff)
					  > (i_233_ ^ 0xffffffff));
					 i_244_++) {
					is_240_[i_235_] = i_236_;
					is_241_[i_235_]
					    = ((Class277) class277).anInt3570;
					if ((((Class277) class277).anInt3563
					     ^ 0xffffffff)
					    != 0)
					    is_238_[i_235_]
						= (((Class277) class277)
						   .anInt3563);
					else
					    is_238_[i_235_] = -1;
					if ((((Class277) class277).anInt3569
					     ^ 0xffffffff)
					    == 0)
					    is_239_[i_235_] = -1;
					else {
					    bool = true;
					    is_239_[i_235_]
						= (((Class277) class277)
						   .anInt3569);
					}
					i_235_++;
				    }
				    if (!aBoolean3109
					&& (i ^ 0xffffffff) == -1)
					Class333.method2643
					    (i_226_, i_227_,
					     ((Class277) class277).anInt3559,
					     (((Class277) class277).anInt3558
					      * 8),
					     ((Class277) class277).anInt3574);
				}
				if (!bool)
				    is_239_ = null;
				if (class22 == null) {
				    if (bool_242_)
					continue;
				    for (int i_245_ = 0; i_245_ < i_232_;
					 i_245_++) {
					is_238_[i_235_] = -1;
					i_235_++;
				    }
				} else {
				    for (int i_246_ = 0;
					 ((i_246_ ^ 0xffffffff)
					  > (i_232_ ^ 0xffffffff));
					 i_246_++) {
					is_240_[i_235_] = i_237_;
					is_241_[i_235_]
					    = ((Class22) class22).anInt336;
					is_238_[i_235_] = is[i_226_][i_227_];
					if (is_239_ != null)
					    is_239_[i_235_] = -1;
					i_235_++;
				    }
				}
				int i_247_ = anIntArray3124.length;
				int[] is_248_ = new int[i_247_];
				int[] is_249_ = new int[i_247_];
				int[] is_250_
				    = var_s == null ? null : new int[i_247_];
				int[] is_251_
				    = (var_s != null || var_s_225_ != null
				       ? new int[i_247_] : null);
				for (int i_252_ = 0; i_247_ > i_252_;
				     i_252_++) {
				    int i_253_ = anIntArray3124[i_252_];
				    int i_254_ = anIntArray3128[i_252_];
				    if ((i_229_ ^ 0xffffffff) == -1) {
					is_248_[i_252_] = i_253_;
					is_249_[i_252_] = i_254_;
				    } else if (i_229_ != 1) {
					if ((i_229_ ^ 0xffffffff) != -3) {
					    if ((i_229_ ^ 0xffffffff) == -4) {
						is_248_[i_252_] = 512 - i_254_;
						int i_255_ = i_253_;
						is_249_[i_252_] = i_255_;
					    }
					} else {
					    is_248_[i_252_] = -i_253_ + 512;
					    is_249_[i_252_] = 512 - i_254_;
					}
				    } else {
					is_248_[i_252_] = i_254_;
					int i_256_ = i_253_;
					is_249_[i_252_] = 512 - i_256_;
				    }
				    if (is_250_ != null
					&& (IntergerVarScriptSettingDefinition.aBooleanArrayArray2133
					    [i_228_][i_252_])) {
					int i_257_ = (is_248_[i_252_]
						      + (i_226_ << 764969961));
					int i_258_ = ((i_227_ << 898789289)
						      - -is_249_[i_252_]);
					is_250_[i_252_]
					    = (var_s.method3986(i_257_, i_258_,
								(byte) -101)
					       + -(var_s_224_.method3986
						   (i_257_, i_258_,
						    (byte) -12)));
				    }
				    if (is_251_ != null) {
					if (var_s != null
					    && !(IntergerVarScriptSettingDefinition
						 .aBooleanArrayArray2133
						 [i_228_][i_252_])) {
					    int i_259_
						= (is_248_[i_252_]
						   + (i_226_ << -23550999));
					    int i_260_
						= ((i_227_ << 1912684553)
						   + is_249_[i_252_]);
					    is_251_[i_252_]
						= ((var_s_224_.method3986
						    (i_259_, i_260_,
						     (byte) 87))
						   - (var_s.method3986
						      (i_259_, i_260_,
						       (byte) -90)));
					} else if (var_s_225_ != null
						   && !(Class348_Sub42_Sub1
							.aBooleanArrayArray9495
							[i_228_][i_252_])) {
					    int i_261_
						= (is_248_[i_252_]
						   + (i_226_ << 733290665));
					    int i_262_
						= (is_249_[i_252_]
						   + (i_227_ << -841562263));
					    is_251_[i_252_]
						= ((var_s_225_.method3986
						    (i_261_, i_262_,
						     (byte) -128))
						   + -(var_s_224_.method3986
						       (i_261_, i_262_,
							(byte) -1)));
					}
				    }
				}
				int i_263_
				    = var_s_224_.method3982((byte) -86, i_227_,
							    i_226_);
				int i_264_
				    = var_s_224_.method3982((byte) -86, i_227_,
							    1 + i_226_);
				int i_265_
				    = var_s_224_.method3982((byte) -86,
							    1 + i_227_,
							    i_226_ - -1);
				int i_266_ = var_s_224_.method3982((byte) -86,
								   i_227_ + 1,
								   i_226_);
				boolean bool_267_
				    = NpcDefinition.isElevatedTile(i_226_, i_227_);
				if (bool_267_ && i > 1
				    || !bool_267_ && i > 0) {
				    boolean bool_268_ = true;
				    if (class22 != null
					&& !((Class22) class22).aBoolean334)
					bool_268_ = false;
				    else if (i_231_ == 0
					     && (i_228_ ^ 0xffffffff) != -1)
					bool_268_ = false;
				    else if (i_230_ > 0 && class277 != null
					     && !(((Class277) class277)
						  .aBoolean3561))
					bool_268_ = false;
				    if (bool_268_
					&& ((i_263_ ^ 0xffffffff)
					    == (i_264_ ^ 0xffffffff))
					&& ((i_265_ ^ 0xffffffff)
					    == (i_263_ ^ 0xffffffff))
					&& ((i_266_ ^ 0xffffffff)
					    == (i_263_ ^ 0xffffffff)))
					((MapLoader) this)
					    .aByteArrayArrayArray3108[i]
					    [i_226_][i_227_]
					    = (byte) (Class273.bitOr
						      ((((MapLoader) this)
							.aByteArrayArrayArray3108
							[i][i_226_][i_227_]),
						       4));
				}
				int i_269_ = 0;
				int i_270_ = 0;
				int i_271_ = 0;
				if (aBoolean3109) {
				    i_269_ = Class367_Sub8.method3547(i_226_,
								      i_227_);
				    i_270_ = Class318_Sub1_Sub5
						 .method2483(i_226_, i_227_);
				    i_271_
					= Class199.method1457(i_226_, i_227_);
				}
				var_s_224_.method3978
				    (i_226_, i_227_, is_248_, is_250_, is_249_,
				     is_251_,
				     Class10.anIntArrayArray174[i_228_],
				     Class68.anIntArrayArray1190[i_228_],
				     (Class348_Sub12.anIntArrayArray6740
				      [i_228_]),
				     is_238_, is_239_, is_240_, is_241_,
				     i_269_, i_270_, i_271_, false);
				Class185.method1394(i, i_226_, i_227_);
			    }
			}
		    }
		}
		if (i_223_ >= 115)
		    break;
		maximumX = 57;
	    } catch (RuntimeException runtimeexception) {
		throw Class348_Sub17.method2929
			  (runtimeexception,
			   ("sr.H(" + (var_ha != null ? "{...}" : "null") + ','
			    + (var_s != null ? "{...}" : "null") + ',' + i
			    + ',' + i_223_ + ','
			    + (is != null ? "{...}" : "null") + ','
			    + (var_s_224_ != null ? "{...}" : "null") + ','
			    + (var_s_225_ != null ? "{...}" : "null") + ')'));
	    }
	    break;
	} while (false);
    }