// Compilation of CompressTextures3.bas started at 19:41:08 on 08-06-2014
typedef char byte;
typedef unsigned char ubyte;
typedef unsigned short ushort;
typedef int integer;
typedef unsigned int uinteger;
typedef unsigned long ulong;
typedef long long longint;
typedef unsigned long long ulongint;
typedef float single;
typedef struct _string { char *data; int len; int size; } string;
typedef char fixstr;
typedef ushort wchar;
typedef struct _TPAL {
	uinteger PAL[256];
} TPAL;
typedef struct _FB$_OLD_HEADER {
	ushort BPP;
	ushort WIDTH;
	ushort HEIGHT;
} FB$_OLD_HEADER;
typedef struct _FB$IMAGE {
	FB$_OLD_HEADER OLD;
	uinteger TYPE;
	integer BPP;
	uinteger WIDTH;
	uinteger HEIGHT;
	uinteger PITCH;
	ubyte _RESERVED[12];
} FB$IMAGE;
typedef struct _PICTURESTRUCT {
	uinteger PAL[256];
	TPAL TPAL;
	ubyte MUTATEA[256];
	ubyte MUTATEB[256];
	integer BESTDIFF[64][64];
	short BEST_P[64][64];
	FB$IMAGE* PBUFFIN;
	FB$IMAGE* PBUFFOUT;
	FB$IMAGE* PBUFFTEMP;
	integer OLD_SCORE;
	integer NEW_SCORE;
	integer CNT;
	integer FULL_CNT;
	integer IBETTER;
	integer IDONE;
	integer LASTBETTER;
	void* PMUTEX;
	void* PTHREAD;
	double DTIME;
	double LOADTIME;
	string STEXT;
	string SFILE;
} PICTURESTRUCT;
static void _ZN13PICTURESTRUCTC1Ev( PICTURESTRUCT* );
static void _ZN13PICTURESTRUCTaSERS_( PICTURESTRUCT*, PICTURESTRUCT* );
static void _ZN13PICTURESTRUCTC1ERS_( PICTURESTRUCT*, PICTURESTRUCT* );
static void _ZN13PICTURESTRUCTD1Ev( PICTURESTRUCT* );
	typedef struct ___FB_ARRAYDIMTB$ {
		integer ELEMENTS;
		integer LBOUND;
		integer UBOUND;
	} __FB_ARRAYDIMTB$;
	typedef struct _TMP$93 {
		PICTURESTRUCT* DATA;
		PICTURESTRUCT* PTR;
		integer SIZE;
		integer ELEMENT_LEN;
		integer DIMENSIONS;
		__FB_ARRAYDIMTB$ DIMTB[1];
	} TMP$93;
	typedef int FB$TMP$0;
	typedef struct ___FB_ARRAYDESC$ {
		void* DATA;
		void* PTR;
		integer SIZE;
		integer ELEMENT_LEN;
		integer DIMENSIONS;
		__FB_ARRAYDIMTB$ DIMTB[8];
	} __FB_ARRAYDESC$;
static inline integer fb_dtosi ( double value ) {
	volatile integer result;
	__asm__ (
		"fldl %1;"
		"fistpl %0;"
		:"=m" (result)
		:"m" (value)
	);
	return result;
}
integer __attribute__((stdcall)) fb_ArrayClearObj( __FB_ARRAYDESC$*, void*, void*, integer );
void __attribute__((stdcall)) fb_GfxLine( void*, single, single, single, single, uinteger, integer, uinteger, integer );
integer __attribute__((stdcall)) fb_GfxPut( void*, single, single, void*, integer, integer, integer, integer, integer, integer, void*, integer, void*, void* );
integer __attribute__((stdcall)) fb_GfxScreenRes( integer, integer, integer, integer, integer, integer );
integer __attribute__((stdcall)) fb_GfxBload( string*, void*, void* );
integer __attribute__((stdcall)) fb_GfxBsave( string*, void*, uinteger, void* );
void __attribute__((stdcall)) fb_GfxLock( void );
void __attribute__((stdcall)) fb_GfxUnlock( integer, integer );
void __attribute__((stdcall)) fb_GfxSetWindowTitle( string* );
integer __attribute__((stdcall)) fb_Multikey( integer );
void* __attribute__((stdcall)) fb_GfxImageCreate( integer, integer, integer, integer, integer );
void fb_hPutPSet( ubyte*, ubyte*, integer, integer, integer, integer, integer, void*, void* );
void fb_hPutPReset( ubyte*, ubyte*, integer, integer, integer, integer, integer, void*, void* );
void fb_hPutAnd( ubyte*, ubyte*, integer, integer, integer, integer, integer, void*, void* );
#define abs( temp_ppparam$0 ) __builtin_abs( temp_ppparam$0 )
void __attribute__((stdcall)) fb_PrintString( integer, string*, integer );
string* __attribute__((stdcall)) fb_StrInit( void*, integer, void*, integer, integer );
string* __attribute__((stdcall)) fb_StrAssign( void*, integer, void*, integer, integer );
void __attribute__((stdcall)) fb_StrDelete( string* );
string* __attribute__((stdcall)) fb_StrConcat( string*, void*, integer, void*, integer );
string* __attribute__((stdcall)) fb_StrConcatAssign( void*, integer, void*, integer, integer );
string* __attribute__((stdcall)) fb_StrAllocTempDescZEx( char*, integer );
string* __attribute__((stdcall)) fb_IntToStr( integer );
string* __attribute__((stdcall)) fb_StrMid( string*, integer, integer );
integer __attribute__((stdcall)) fb_StrLen( void*, integer );
integer __attribute__((stdcall)) fb_StrInstrRev( string*, string*, integer );
string* __attribute__((stdcall)) fb_HEXEx_i( uinteger, integer );
void __attribute__((stdcall)) fb_End( integer );
string* __attribute__((stdcall)) fb_ExePath( void );
double __attribute__((stdcall)) fb_Timer( void );
void __attribute__((stdcall)) fb_Sleep( integer );
integer __attribute__((stdcall)) fb_SleepEx( integer, integer );
string* __attribute__((stdcall)) fb_DirNext( integer* );
string* __attribute__((stdcall)) fb_Dir( string*, integer, integer* );
typedef void __attribute__((stdcall)) (*tmp$1)( void* );
void* __attribute__((stdcall)) fb_ThreadCreate( tmp$1, void*, integer );
void __attribute__((stdcall)) fb_ThreadWait( void* );
void* __attribute__((stdcall)) fb_MutexCreate( void );
void __attribute__((stdcall)) fb_MutexLock( void* );
void __attribute__((stdcall)) fb_MutexUnlock( void* );
static void fb_ctor__CompressTextures3( void )__attribute__(( constructor )) ;
void* memcpy( void*, void*, uinteger );
integer printf( char*, ... );
integer rand( void );
integer __attribute__((stdcall)) fb_FileExists( char* );
void* __attribute__((stdcall)) GetCurrentProcess( void );
void* __attribute__((stdcall)) GetCurrentThread( void );
integer __attribute__((stdcall)) SetPriorityClass( void*, uinteger );
integer __attribute__((stdcall)) SetThreadPriority( void*, integer );
integer __attribute__((stdcall)) SwitchToThread( void );
integer __attribute__((stdcall)) COMPARE( PICTURESTRUCT* );
void __attribute__((stdcall)) CHECK( PICTURESTRUCT* );
void __attribute__((stdcall)) MUTATE( PICTURESTRUCT* );
uinteger __attribute__((stdcall)) CLOSEST( uinteger, uinteger*, integer );
integer __attribute__((stdcall)) FIND_BEST_P( PICTURESTRUCT*, integer, integer, integer* );
void __attribute__((stdcall)) RENDER( PICTURESTRUCT* );
integer __attribute__((stdcall)) LOADPICTURE( PICTURESTRUCT*, string* );
void __attribute__((stdcall)) EXTRATHREAD( PICTURESTRUCT* );
typedef struct _$fb_RTTI $fb_RTTI$type;
typedef struct _$fb_RTTI {
	void* STDLIBVT;
	char* ID;
	$fb_RTTI$type* PRTTIBASE;
} $fb_RTTI;
extern $fb_RTTI$type __fb_ZTS6Object;
extern double* _HUGE __attribute__((dllimport));
extern integer _daylight __attribute__((dllimport));
extern integer _timezone __attribute__((dllimport));
extern char _tzname[2] __attribute__((dllimport));
typedef struct __IOBUF {
	char* _PTR;
	integer _CNT;
	char* _BASE;
	integer _FLAG;
	integer _FILE;
	integer _CHARBUF;
	integer _BUFSIZ;
	char* _TMPFNAME;
} _IOBUF;
extern _IOBUF _iob[3] __attribute__((dllimport));
extern integer _argc __attribute__((dllimport));
extern byte** _argv __attribute__((dllimport));
extern integer* __mbcur_max __attribute__((dllimport));
extern integer* _sys_nerr __attribute__((dllimport));
extern byte*** sys_errlist __attribute__((dllimport));
extern integer* _fmode __attribute__((dllimport));
extern ushort** _ctype __attribute__((dllimport));
extern ushort** _pctype __attribute__((dllimport));
static integer IHALT$;

integer __attribute__((stdcall)) COMPARE( PICTURESTRUCT* TPIC$ )
{
	integer fb$result$;
	integer DIFF$;
	integer* P1$;
	integer* P2$;
	#define vr$0 ((integer*)(&fb$result$))
	__builtin_memset( vr$0, 0, (integer)4 );
	label$14:;
	#define vr$1 ((integer*)(&DIFF$))
	__builtin_memset( vr$1, 0, (integer)4 );
	#define vr$2 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$3 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$2 + 26112) + (integer)32)))
	#define vr$4 ((integer*)(vr$3))
	P1$ = (vr$4);
	#define vr$5 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$6 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$5 + 26116) + (integer)32)))
	#define vr$7 ((integer*)(vr$6))
	P2$ = (vr$7);
	{
		integer YX$;
		YX$ = ((integer)0);
		label$19:;
		{
			integer C1$;
			integer C2$;
			integer R1$;
			integer G1$;
			integer B1$;
			#define vr$8 ((integer*)(P1$))
			C1$ = (*(integer*)((ubyte *)vr$8));
			#define vr$9 ((integer*)(P2$))
			C2$ = (*(integer*)((ubyte *)vr$9));
			#define vr$10 ((integer)(C1$ >> (integer)16))
			#define vr$11 ((integer)(vr$10 & (integer)255))
			#define vr$12 ((integer)(C2$ >> (integer)16))
			#define vr$13 ((integer)(vr$12 & (integer)255))
			#define vr$14 ((integer)(vr$11 - vr$13))
			integer vr$15 = (integer)(abs( vr$14 ));
			R1$ = (vr$15);
			#define vr$16 ((integer)(C1$ >> (integer)8))
			#define vr$17 ((integer)(vr$16 & (integer)255))
			#define vr$18 ((integer)(C2$ >> (integer)8))
			#define vr$19 ((integer)(vr$18 & (integer)255))
			#define vr$20 ((integer)(vr$17 - vr$19))
			integer vr$21 = (integer)(abs( vr$20 ));
			G1$ = (vr$21);
			#define vr$22 ((integer)(C1$ & (integer)255))
			#define vr$23 ((integer)(C2$ & (integer)255))
			#define vr$24 ((integer)(vr$22 - vr$23))
			integer vr$25 = (integer)(abs( vr$24 ));
			B1$ = (vr$25);
			#define vr$26 ((integer)(DIFF$ + R1$))
			#define vr$27 ((integer)(vr$26 + G1$))
			#define vr$28 ((integer)(vr$27 + B1$))
			DIFF$ = (vr$28);
			#define vr$29 ((integer*)((integer*)((ubyte *)P1$ + (integer)4)))
			P1$ = (vr$29);
			#define vr$30 ((integer*)((integer*)((ubyte *)P2$ + (integer)4)))
			P2$ = (vr$30);
		};
		label$17:;
		#define vr$31 ((integer)(YX$ + (integer)1))
		YX$ = (vr$31);
		label$16:;
		if (YX$ <= (integer)65535) goto label$19;
		label$18:;
	};
	fb$result$ = (DIFF$);
	goto label$15;
	label$15:;
	#define vr$32 ((integer)(fb$result$))
	return vr$32;
}

void __attribute__((stdcall)) CHECK( PICTURESTRUCT* TPIC$ )
{
	integer* P1$;
	integer* P2$;
	label$20:;
	#define vr$33 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$34 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$33 + 26112) + (integer)32)))
	#define vr$35 ((integer*)(vr$34))
	P1$ = (vr$35);
	#define vr$36 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$37 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$36 + 26116) + (integer)32)))
	#define vr$38 ((integer*)(vr$37))
	P2$ = (vr$38);
	{
		integer YX$;
		YX$ = ((integer)0);
		label$25:;
		{
			#define vr$39 ((integer*)(P1$))
			#define vr$40 ((integer)(*(integer*)((ubyte *)vr$39) & (integer)16777215))
			if (vr$40 != (integer)0) goto label$27;
			{
				#define vr$41 ((integer*)(P2$))
				#define vr$42 ((integer)(*(integer*)((ubyte *)vr$41) & (integer)16777215))
				if (vr$42 == (integer)0) goto label$29;
				{
					string TMP$78$;
					string TMP$79$;
					#define vr$43 ((string*)(&TMP$79$))
					__builtin_memset( vr$43, 0, (integer)12 );
					#define vr$44 ((integer*)(P2$))
					string* vr$45 = (string*)(fb_HEXEx_i( *(integer*)((ubyte *)vr$44), (integer)6 ));
					#define vr$46 ((string*)(&TMP$79$))
					fb_StrAssign( vr$46, (integer)-1, vr$45, (integer)-1, (integer)0 );
					#define vr$47 ((string*)(&TMP$79$))
					#define vr$48 ((char**)(vr$47))
					#define vr$49 ((string*)(&TMP$78$))
					__builtin_memset( vr$49, 0, (integer)12 );
					#define vr$50 ((integer*)(P1$))
					string* vr$51 = (string*)(fb_HEXEx_i( *(integer*)((ubyte *)vr$50), (integer)6 ));
					#define vr$52 ((string*)(&TMP$78$))
					fb_StrAssign( vr$52, (integer)-1, vr$51, (integer)-1, (integer)0 );
					#define vr$53 ((string*)(&TMP$78$))
					#define vr$54 ((char**)(vr$53))
					printf( (char*)"massive trans error %s %s\n", *(char**)((ubyte *)vr$54), *(char**)((ubyte *)vr$48) );
					#define vr$55 ((string*)(&TMP$79$))
					fb_StrDelete( vr$55 );
					#define vr$56 ((string*)(&TMP$78$))
					fb_StrDelete( vr$56 );
					goto label$21;
				};
				label$29:;
				label$28:;
			};
			goto label$26;
			label$27:;
			#define vr$57 ((integer*)(P2$))
			#define vr$58 ((integer)(*(integer*)((ubyte *)vr$57) & (integer)16777215))
			if (vr$58 != (integer)0) goto label$30;
			{
				string TMP$80$;
				string TMP$81$;
				#define vr$59 ((string*)(&TMP$81$))
				__builtin_memset( vr$59, 0, (integer)12 );
				#define vr$60 ((integer*)(P2$))
				string* vr$61 = (string*)(fb_HEXEx_i( *(integer*)((ubyte *)vr$60), (integer)6 ));
				#define vr$62 ((string*)(&TMP$81$))
				fb_StrAssign( vr$62, (integer)-1, vr$61, (integer)-1, (integer)0 );
				#define vr$63 ((string*)(&TMP$81$))
				#define vr$64 ((char**)(vr$63))
				#define vr$65 ((string*)(&TMP$80$))
				__builtin_memset( vr$65, 0, (integer)12 );
				#define vr$66 ((integer*)(P1$))
				string* vr$67 = (string*)(fb_HEXEx_i( *(integer*)((ubyte *)vr$66), (integer)6 ));
				#define vr$68 ((string*)(&TMP$80$))
				fb_StrAssign( vr$68, (integer)-1, vr$67, (integer)-1, (integer)0 );
				#define vr$69 ((string*)(&TMP$80$))
				#define vr$70 ((char**)(vr$69))
				printf( (char*)"massive trans error %s %s\n", *(char**)((ubyte *)vr$70), *(char**)((ubyte *)vr$64) );
				#define vr$71 ((string*)(&TMP$81$))
				fb_StrDelete( vr$71 );
				#define vr$72 ((string*)(&TMP$80$))
				fb_StrDelete( vr$72 );
				goto label$21;
			};
			label$30:;
			label$26:;
			#define vr$73 ((integer*)((integer*)((ubyte *)P1$ + (integer)4)))
			P1$ = (vr$73);
			#define vr$74 ((integer*)((integer*)((ubyte *)P2$ + (integer)4)))
			P2$ = (vr$74);
		};
		label$23:;
		#define vr$75 ((integer)(YX$ + (integer)1))
		YX$ = (vr$75);
		label$22:;
		if (YX$ <= (integer)65535) goto label$25;
		label$24:;
	};
	label$21:;
}

void __attribute__((stdcall)) MUTATE( PICTURESTRUCT* TPIC$ )
{
	integer ZZ$;
	integer IA$;
	label$31:;
	integer vr$76 = (integer)(rand(  ));
	#define vr$77 ((integer)(vr$76 % (integer)3))
	ZZ$ = (vr$77);
	integer vr$78 = (integer)(rand(  ));
	integer vr$79 = (integer)(rand(  ));
	#define vr$80 ((integer)(vr$79 << (integer)15))
	#define vr$81 ((integer)(vr$78 ^ vr$80))
	IA$ = (vr$81);
	{
		integer TMP$82$;
		TMP$82$ = (ZZ$);
		if (TMP$82$ != (integer)0) goto label$34;
		label$35:;
		{
			integer X$;
			integer B$;
			integer V$;
			integer vr$82 = (integer)(rand(  ));
			integer vr$83 = (integer)(rand(  ));
			#define vr$84 ((integer)(vr$83 << (integer)15))
			#define vr$85 ((integer)(vr$82 ^ vr$84))
			#define vr$86 ((integer)(vr$85 % (integer)256))
			X$ = (vr$86);
			#define vr$87 ((integer)(IA$ & (integer)15))
			#define vr$88 ((integer)(IA$ & (integer)112))
			#define vr$89 ((integer)(vr$88 >> (integer)4))
			#define vr$90 ((integer)(vr$87 + vr$89))
			B$ = (vr$90);
			#define vr$91 ((integer)(IA$ & (integer)256))
			#define vr$92 ((integer)(vr$91 >> (integer)8))
			V$ = (vr$92);
			#define vr$93 ((integer)(X$ << (integer)2))
			#define vr$94 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$93)))
			#define vr$95 ((integer)((integer)1 << B$))
			#define vr$96 ((integer)(~(vr$95)))
			#define vr$97 ((uinteger)(*(uinteger*)((ubyte *)vr$94) & vr$96))
			#define vr$98 ((integer)(X$ << (integer)2))
			#define vr$99 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$98)))
			*(uinteger*)((ubyte *)vr$99) = (vr$97);
			#define vr$100 ((integer)(X$ << (integer)2))
			#define vr$101 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$100)))
			#define vr$102 ((integer)(V$ << B$))
			#define vr$103 ((uinteger)(*(uinteger*)((ubyte *)vr$101) | vr$102))
			#define vr$104 ((integer)(X$ << (integer)2))
			#define vr$105 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$104)))
			*(uinteger*)((ubyte *)vr$105) = (vr$103);
			#define vr$106 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
			#define vr$107 ((uinteger)(*(ubyte*)((ubyte *)vr$106 + 1024)))
			#define vr$108 ((uinteger)(vr$107 + (integer)1))
			#define vr$109 ((ubyte)(vr$108))
			#define vr$110 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
			*(ubyte*)((ubyte *)vr$110 + 1024) = (vr$109);
			#define vr$111 ((integer)(X$ << (integer)2))
			#define vr$112 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$111)))
			#define vr$113 ((uinteger)(*(uinteger*)((ubyte *)vr$112) & (integer)16777215))
			if (vr$113 != (integer)0) goto label$37;
			{
				#define vr$114 ((integer)(X$ << (integer)2))
				#define vr$115 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$114)))
				*(uinteger*)((ubyte *)vr$115) = ((uinteger)526344u);
			};
			label$37:;
			label$36:;
		};
		goto label$33;
		label$34:;
		if (TMP$82$ != (integer)1) goto label$38;
		label$39:;
		{
			integer X$;
			integer vr$116 = (integer)(rand(  ));
			integer vr$117 = (integer)(rand(  ));
			#define vr$118 ((integer)(vr$117 << (integer)15))
			#define vr$119 ((integer)(vr$116 ^ vr$118))
			#define vr$120 ((integer)(vr$119 % (integer)256))
			X$ = (vr$120);
			#define vr$121 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
			#define vr$122 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$121 + 26112) + (integer)32)))
			#define vr$123 ((uinteger*)(vr$122))
			integer vr$124 = (integer)(rand(  ));
			integer vr$125 = (integer)(rand(  ));
			#define vr$126 ((integer)(vr$125 << (integer)15))
			#define vr$127 ((integer)(vr$124 ^ vr$126))
			#define vr$128 ((integer)(vr$127 & (integer)65535))
			#define vr$129 ((integer)(vr$128 << (integer)2))
			#define vr$130 ((uinteger*)((uinteger*)((ubyte *)vr$123 + vr$129)))
			#define vr$131 ((integer)(X$ << (integer)2))
			#define vr$132 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$131)))
			*(uinteger*)((ubyte *)vr$132) = (*(uinteger*)((ubyte *)vr$130));
			#define vr$133 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
			#define vr$134 ((uinteger)(*(ubyte*)((ubyte *)vr$133 + 1024)))
			#define vr$135 ((uinteger)(vr$134 + (integer)1))
			#define vr$136 ((ubyte)(vr$135))
			#define vr$137 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
			*(ubyte*)((ubyte *)vr$137 + 1024) = (vr$136);
			#define vr$138 ((integer)(X$ << (integer)2))
			#define vr$139 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$138)))
			#define vr$140 ((uinteger)(*(uinteger*)((ubyte *)vr$139) & (integer)16777215))
			if (vr$140 != (integer)0) goto label$41;
			{
				#define vr$141 ((integer)(X$ << (integer)2))
				#define vr$142 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$141)))
				*(uinteger*)((ubyte *)vr$142) = ((uinteger)526344u);
			};
			label$41:;
			label$40:;
		};
		goto label$33;
		label$38:;
		if (TMP$82$ != (integer)2) goto label$42;
		label$43:;
		{
			integer CNT$;
			integer vr$143 = (integer)(rand(  ));
			#define vr$144 ((integer)(vr$143 % (integer)5))
			#define vr$145 ((integer)(vr$144 + (integer)2))
			CNT$ = (vr$145);
			{
				integer I$;
				integer TMP$83$;
				I$ = ((integer)0);
				#define vr$146 ((integer)(CNT$ + (integer)-1))
				TMP$83$ = (vr$146);
				goto label$44;
				label$47:;
				{
					integer X$;
					integer vr$147 = (integer)(rand(  ));
					integer vr$148 = (integer)(rand(  ));
					#define vr$149 ((integer)(vr$148 << (integer)15))
					#define vr$150 ((integer)(vr$147 ^ vr$149))
					#define vr$151 ((integer)(vr$150 % (integer)256))
					X$ = (vr$151);
					#define vr$152 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
					#define vr$153 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$152 + 26112) + (integer)32)))
					#define vr$154 ((uinteger*)(vr$153))
					integer vr$155 = (integer)(rand(  ));
					integer vr$156 = (integer)(rand(  ));
					#define vr$157 ((integer)(vr$156 << (integer)15))
					#define vr$158 ((integer)(vr$155 ^ vr$157))
					#define vr$159 ((integer)(vr$158 & (integer)65535))
					#define vr$160 ((integer)(vr$159 << (integer)2))
					#define vr$161 ((uinteger*)((uinteger*)((ubyte *)vr$154 + vr$160)))
					#define vr$162 ((integer)(X$ << (integer)2))
					#define vr$163 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$162)))
					*(uinteger*)((ubyte *)vr$163) = (*(uinteger*)((ubyte *)vr$161));
					#define vr$164 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
					#define vr$165 ((uinteger)(*(ubyte*)((ubyte *)vr$164 + 1024)))
					#define vr$166 ((uinteger)(vr$165 + (integer)1))
					#define vr$167 ((ubyte)(vr$166))
					#define vr$168 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + X$)))
					*(ubyte*)((ubyte *)vr$168 + 1024) = (vr$167);
					#define vr$169 ((integer)(X$ << (integer)2))
					#define vr$170 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$169)))
					#define vr$171 ((uinteger)(*(uinteger*)((ubyte *)vr$170) & (integer)16777215))
					if (vr$171 != (integer)0) goto label$49;
					{
						#define vr$172 ((integer)(X$ << (integer)2))
						#define vr$173 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$172)))
						*(uinteger*)((ubyte *)vr$173) = ((uinteger)526344u);
					};
					label$49:;
					label$48:;
				};
				label$45:;
				#define vr$174 ((integer)(I$ + (integer)1))
				I$ = (vr$174);
				label$44:;
				if (I$ <= TMP$83$) goto label$47;
				label$46:;
			};
		};
		label$42:;
		label$33:;
	};
	label$32:;
}

uinteger __attribute__((stdcall)) CLOSEST( uinteger C$, uinteger* CL$, integer HAS_TRANS$ )
{
	uinteger fb$result$;
	integer BEST_DIFF$;
	uinteger RESULT$;
	#define vr$175 ((uinteger*)(&fb$result$))
	__builtin_memset( vr$175, 0, (integer)4 );
	label$50:;
	BEST_DIFF$ = ((integer)768);
	#define vr$176 ((uinteger)(C$ & (integer)1048575))
	#define vr$177 ((integer)((-(vr$176 == (integer)0))))
	#define vr$178 ((integer)(HAS_TRANS$ & vr$177))
	if (vr$178 == (integer)0) goto label$53;
	{
		fb$result$ = ((uinteger)0u);
		goto label$51;
	};
	label$53:;
	label$52:;
	{
		integer I$;
		integer TMP$84$;
		I$ = ((integer)0);
		#define vr$179 ((integer)(HAS_TRANS$ & (integer)1))
		#define vr$180 ((integer)((integer)3 - vr$179))
		TMP$84$ = (vr$180);
		goto label$54;
		label$57:;
		{
			uinteger C1$;
			uinteger C2$;
			integer DIFF$;
			C1$ = (C$);
			#define vr$181 ((integer)(I$ << (integer)2))
			#define vr$182 ((uinteger*)((uinteger*)((ubyte *)CL$ + vr$181)))
			C2$ = (*(uinteger*)((ubyte *)vr$182));
			#define vr$183 ((uinteger)(C1$ >> (integer)16))
			#define vr$184 ((uinteger)(vr$183 & (integer)255))
			#define vr$185 ((uinteger)(C2$ >> (integer)16))
			#define vr$186 ((uinteger)(vr$185 & (integer)255))
			#define vr$187 ((uinteger)(vr$184 - vr$186))
			integer vr$188 = (integer)(abs( vr$187 ));
			#define vr$189 ((uinteger)(C1$ >> (integer)8))
			#define vr$190 ((uinteger)(vr$189 & (integer)255))
			#define vr$191 ((uinteger)(C2$ >> (integer)8))
			#define vr$192 ((uinteger)(vr$191 & (integer)255))
			#define vr$193 ((uinteger)(vr$190 - vr$192))
			integer vr$194 = (integer)(abs( vr$193 ));
			#define vr$195 ((integer)(vr$188 + vr$194))
			#define vr$196 ((uinteger)(C1$ & (integer)255))
			#define vr$197 ((uinteger)(C2$ & (integer)255))
			#define vr$198 ((uinteger)(vr$196 - vr$197))
			integer vr$199 = (integer)(abs( vr$198 ));
			#define vr$200 ((integer)(vr$195 + vr$199))
			DIFF$ = (vr$200);
			if (DIFF$ >= BEST_DIFF$) goto label$59;
			{
				#define vr$201 ((integer)(I$ << (integer)2))
				#define vr$202 ((uinteger*)((uinteger*)((ubyte *)CL$ + vr$201)))
				RESULT$ = (*(uinteger*)((ubyte *)vr$202));
				BEST_DIFF$ = (DIFF$);
			};
			label$59:;
			label$58:;
		};
		label$55:;
		#define vr$203 ((integer)(I$ + (integer)1))
		I$ = (vr$203);
		label$54:;
		if (I$ <= TMP$84$) goto label$57;
		label$56:;
	};
	fb$result$ = (RESULT$);
	goto label$51;
	label$51:;
	#define vr$204 ((uinteger)(fb$result$))
	return vr$204;
}

integer __attribute__((stdcall)) FIND_BEST_P( PICTURESTRUCT* TPIC$, integer BLOCK_X$, integer BLOCK_Y$, integer* HAS_TRANS$ )
{
	integer fb$result$;
	void* P1$;
	uinteger IPITCH$;
	integer BEST_DIFF$;
	integer BEST_P$;
	#define vr$205 ((integer*)(&fb$result$))
	__builtin_memset( vr$205, 0, (integer)4 );
	label$60:;
	#define vr$206 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$207 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$206 + 26112) + (integer)32)))
	P1$ = (vr$207);
	#define vr$208 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$209 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$208 + 26112)))
	IPITCH$ = (*(uinteger*)((ubyte *)vr$209 + 16));
	#define vr$210 ((integer)(BLOCK_Y$ * IPITCH$))
	#define vr$211 ((integer)(vr$210 << (integer)2))
	#define vr$212 ((void*)((void*)((ubyte *)P1$ + vr$211)))
	P1$ = (vr$212);
	#define vr$213 ((integer*)((integer*)(HAS_TRANS$)))
	*(integer*)((ubyte *)vr$213) = ((integer)0);
	{
		void* P1A$;
		#define vr$214 ((integer)(BLOCK_X$ << (integer)4))
		#define vr$215 ((void*)((void*)((ubyte *)P1$ + vr$214)))
		P1A$ = (vr$215);
		{
			integer Y$;
			Y$ = ((integer)0);
			label$65:;
			{
				{
					integer X$;
					X$ = ((integer)0);
					label$69:;
					{
						uinteger C1$;
						#define vr$216 ((uinteger*)(P1A$))
						#define vr$217 ((integer)(X$ << (integer)2))
						#define vr$218 ((uinteger*)((uinteger*)((ubyte *)vr$216 + vr$217)))
						C1$ = (*(uinteger*)((ubyte *)vr$218));
						#define vr$219 ((uinteger)(C1$ & (integer)16777215))
						if (vr$219 != (integer)0) goto label$71;
						#define vr$220 ((integer*)((integer*)(HAS_TRANS$)))
						*(integer*)((ubyte *)vr$220) = ((integer)1);
						label$71:;
					};
					label$67:;
					#define vr$221 ((integer)(X$ + (integer)1))
					X$ = (vr$221);
					label$66:;
					if (X$ <= (integer)3) goto label$69;
					label$68:;
				};
				#define vr$222 ((integer)(IPITCH$))
				#define vr$223 ((void*)((void*)((ubyte *)P1A$ + vr$222)))
				P1A$ = (vr$223);
			};
			label$63:;
			#define vr$224 ((integer)(Y$ + (integer)1))
			Y$ = (vr$224);
			label$62:;
			if (Y$ <= (integer)3) goto label$65;
			label$64:;
		};
	};
	#define vr$225 ((integer)(BLOCK_X$ << (integer)6))
	#define vr$226 ((integer)(vr$225 + BLOCK_Y$))
	#define vr$227 ((integer)(vr$226 << (integer)2))
	#define vr$228 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$227)))
	BEST_DIFF$ = (*(integer*)((ubyte *)vr$228 + 1536));
	#define vr$229 ((integer)(BLOCK_X$ << (integer)6))
	#define vr$230 ((integer)(vr$229 + BLOCK_Y$))
	#define vr$231 ((integer)(vr$230 << (integer)1))
	#define vr$232 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$231)))
	#define vr$233 ((integer)(*(short*)((ubyte *)vr$232 + 17920)))
	BEST_P$ = (vr$233);
	#define vr$234 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + BEST_P$)))
	#define vr$235 ((ubyte*)(&*(ubyte*)((ubyte *)vr$234 + 1024)))
	#define vr$236 ((uinteger*)(vr$235))
	#define vr$237 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + BEST_P$)))
	#define vr$238 ((ubyte*)(&*(ubyte*)((ubyte *)vr$237 + 1280)))
	#define vr$239 ((uinteger*)(vr$238))
	if (*(uinteger*)((ubyte *)vr$236) == *(uinteger*)((ubyte *)vr$239)) goto label$73;
	{
		BEST_DIFF$ = ((integer)1048576);
		BEST_P$ = ((integer)0);
		{
			integer P$;
			P$ = ((integer)0);
			label$77:;
			{
				integer DIFF$;
				void* P1A$;
				uinteger BACKUP$;
				#define vr$240 ((integer*)(&DIFF$))
				__builtin_memset( vr$240, 0, (integer)4 );
				#define vr$241 ((integer)(BLOCK_X$ << (integer)4))
				#define vr$242 ((void*)((void*)((ubyte *)P1$ + vr$241)))
				P1A$ = (vr$242);
				#define vr$243 ((uinteger*)(&BACKUP$))
				__builtin_memset( vr$243, 0, (integer)4 );
				#define vr$244 ((integer*)((integer*)(HAS_TRANS$)))
				if (*(integer*)((ubyte *)vr$244) == (integer)0) goto label$79;
				{
					#define vr$245 ((integer)(P$ << (integer)2))
					#define vr$246 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$245)))
					BACKUP$ = (*(uinteger*)((ubyte *)vr$246 + 12));
					#define vr$247 ((integer)(P$ << (integer)2))
					#define vr$248 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$247)))
					*(uinteger*)((ubyte *)vr$248 + 12) = ((uinteger)0u);
				};
				label$79:;
				label$78:;
				{
					integer Y$;
					Y$ = ((integer)0);
					label$83:;
					{
						{
							integer X$;
							X$ = ((integer)0);
							label$87:;
							{
								uinteger C1$;
								uinteger C2$;
								#define vr$249 ((uinteger*)(P1A$))
								#define vr$250 ((integer)(X$ << (integer)2))
								#define vr$251 ((uinteger*)((uinteger*)((ubyte *)vr$249 + vr$250)))
								C1$ = (*(uinteger*)((ubyte *)vr$251));
								#define vr$252 ((integer*)((integer*)(HAS_TRANS$)))
								#define vr$253 ((integer)(P$ << (integer)2))
								#define vr$254 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$253)))
								#define vr$255 ((uinteger*)(&*(uinteger*)((ubyte *)vr$254)))
								uinteger vr$256 = (uinteger)(CLOSEST( C1$, vr$255, *(integer*)((ubyte *)vr$252) ));
								C2$ = (vr$256);
								#define vr$257 ((uinteger)(C1$ >> (integer)16))
								#define vr$258 ((uinteger)(vr$257 & (integer)255))
								#define vr$259 ((uinteger)(C2$ >> (integer)16))
								#define vr$260 ((uinteger)(vr$259 & (integer)255))
								#define vr$261 ((uinteger)(vr$258 - vr$260))
								integer vr$262 = (integer)(abs( vr$261 ));
								#define vr$263 ((integer)(DIFF$ + vr$262))
								#define vr$264 ((uinteger)(C1$ >> (integer)8))
								#define vr$265 ((uinteger)(vr$264 & (integer)255))
								#define vr$266 ((uinteger)(C2$ >> (integer)8))
								#define vr$267 ((uinteger)(vr$266 & (integer)255))
								#define vr$268 ((uinteger)(vr$265 - vr$267))
								integer vr$269 = (integer)(abs( vr$268 ));
								#define vr$270 ((integer)(vr$263 + vr$269))
								#define vr$271 ((uinteger)(C1$ & (integer)255))
								#define vr$272 ((uinteger)(C2$ & (integer)255))
								#define vr$273 ((uinteger)(vr$271 - vr$272))
								integer vr$274 = (integer)(abs( vr$273 ));
								#define vr$275 ((integer)(vr$270 + vr$274))
								DIFF$ = (vr$275);
							};
							label$85:;
							#define vr$276 ((integer)(X$ + (integer)1))
							X$ = (vr$276);
							label$84:;
							if (X$ <= (integer)3) goto label$87;
							label$86:;
						};
						#define vr$277 ((integer)(IPITCH$))
						#define vr$278 ((void*)((void*)((ubyte *)P1A$ + vr$277)))
						P1A$ = (vr$278);
					};
					label$81:;
					#define vr$279 ((integer)(Y$ + (integer)1))
					Y$ = (vr$279);
					label$80:;
					if (Y$ <= (integer)3) goto label$83;
					label$82:;
				};
				#define vr$280 ((integer*)((integer*)(HAS_TRANS$)))
				if (*(integer*)((ubyte *)vr$280) == (integer)0) goto label$89;
				#define vr$281 ((integer)(P$ << (integer)2))
				#define vr$282 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$281)))
				*(uinteger*)((ubyte *)vr$282 + 12) = (BACKUP$);
				label$89:;
				if (DIFF$ >= BEST_DIFF$) goto label$91;
				{
					BEST_DIFF$ = (DIFF$);
					BEST_P$ = (P$);
				};
				label$91:;
				label$90:;
			};
			label$75:;
			#define vr$283 ((integer)(P$ + (integer)2))
			P$ = (vr$283);
			label$74:;
			if (P$ <= (integer)253) goto label$77;
			label$76:;
		};
	};
	goto label$72;
	label$73:;
	{
		{
			integer P$;
			P$ = ((integer)0);
			label$95:;
			{
				#define vr$284 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + P$)))
				#define vr$285 ((ubyte*)(&*(ubyte*)((ubyte *)vr$284 + 1024)))
				#define vr$286 ((uinteger*)(vr$285))
				#define vr$287 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + P$)))
				#define vr$288 ((ubyte*)(&*(ubyte*)((ubyte *)vr$287 + 1280)))
				#define vr$289 ((uinteger*)(vr$288))
				if (*(uinteger*)((ubyte *)vr$286) == *(uinteger*)((ubyte *)vr$289)) goto label$97;
				{
					integer DIFF$;
					void* P1A$;
					uinteger BACKUP$;
					#define vr$290 ((integer*)(&DIFF$))
					__builtin_memset( vr$290, 0, (integer)4 );
					#define vr$291 ((integer)(BLOCK_X$ << (integer)4))
					#define vr$292 ((void*)((void*)((ubyte *)P1$ + vr$291)))
					P1A$ = (vr$292);
					#define vr$293 ((uinteger*)(&BACKUP$))
					__builtin_memset( vr$293, 0, (integer)4 );
					#define vr$294 ((integer*)((integer*)(HAS_TRANS$)))
					if (*(integer*)((ubyte *)vr$294) == (integer)0) goto label$99;
					{
						#define vr$295 ((integer)(P$ << (integer)2))
						#define vr$296 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$295)))
						BACKUP$ = (*(uinteger*)((ubyte *)vr$296 + 12));
						#define vr$297 ((integer)(P$ << (integer)2))
						#define vr$298 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$297)))
						*(uinteger*)((ubyte *)vr$298 + 12) = ((uinteger)0u);
					};
					label$99:;
					label$98:;
					{
						integer Y$;
						Y$ = ((integer)0);
						label$103:;
						{
							{
								integer X$;
								X$ = ((integer)0);
								label$107:;
								{
									uinteger C1$;
									uinteger C2$;
									#define vr$299 ((uinteger*)(P1A$))
									#define vr$300 ((integer)(X$ << (integer)2))
									#define vr$301 ((uinteger*)((uinteger*)((ubyte *)vr$299 + vr$300)))
									C1$ = (*(uinteger*)((ubyte *)vr$301));
									#define vr$302 ((integer*)((integer*)(HAS_TRANS$)))
									#define vr$303 ((integer)(P$ << (integer)2))
									#define vr$304 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$303)))
									#define vr$305 ((uinteger*)(&*(uinteger*)((ubyte *)vr$304)))
									uinteger vr$306 = (uinteger)(CLOSEST( C1$, vr$305, *(integer*)((ubyte *)vr$302) ));
									C2$ = (vr$306);
									#define vr$307 ((uinteger)(C1$ >> (integer)16))
									#define vr$308 ((uinteger)(vr$307 & (integer)255))
									#define vr$309 ((uinteger)(C2$ >> (integer)16))
									#define vr$310 ((uinteger)(vr$309 & (integer)255))
									#define vr$311 ((uinteger)(vr$308 - vr$310))
									integer vr$312 = (integer)(abs( vr$311 ));
									#define vr$313 ((integer)(DIFF$ + vr$312))
									#define vr$314 ((uinteger)(C1$ >> (integer)8))
									#define vr$315 ((uinteger)(vr$314 & (integer)255))
									#define vr$316 ((uinteger)(C2$ >> (integer)8))
									#define vr$317 ((uinteger)(vr$316 & (integer)255))
									#define vr$318 ((uinteger)(vr$315 - vr$317))
									integer vr$319 = (integer)(abs( vr$318 ));
									#define vr$320 ((integer)(vr$313 + vr$319))
									#define vr$321 ((uinteger)(C1$ & (integer)255))
									#define vr$322 ((uinteger)(C2$ & (integer)255))
									#define vr$323 ((uinteger)(vr$321 - vr$322))
									integer vr$324 = (integer)(abs( vr$323 ));
									#define vr$325 ((integer)(vr$320 + vr$324))
									DIFF$ = (vr$325);
								};
								label$105:;
								#define vr$326 ((integer)(X$ + (integer)1))
								X$ = (vr$326);
								label$104:;
								if (X$ <= (integer)3) goto label$107;
								label$106:;
							};
							#define vr$327 ((integer)(IPITCH$))
							#define vr$328 ((void*)((void*)((ubyte *)P1A$ + vr$327)))
							P1A$ = (vr$328);
						};
						label$101:;
						#define vr$329 ((integer)(Y$ + (integer)1))
						Y$ = (vr$329);
						label$100:;
						if (Y$ <= (integer)3) goto label$103;
						label$102:;
					};
					#define vr$330 ((integer*)((integer*)(HAS_TRANS$)))
					if (*(integer*)((ubyte *)vr$330) == (integer)0) goto label$109;
					#define vr$331 ((integer)(P$ << (integer)2))
					#define vr$332 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$331)))
					*(uinteger*)((ubyte *)vr$332 + 12) = (BACKUP$);
					label$109:;
					if (DIFF$ >= BEST_DIFF$) goto label$111;
					{
						BEST_DIFF$ = (DIFF$);
						BEST_P$ = (P$);
					};
					label$111:;
					label$110:;
				};
				label$97:;
				label$96:;
			};
			label$93:;
			#define vr$333 ((integer)(P$ + (integer)2))
			P$ = (vr$333);
			label$92:;
			if (P$ <= (integer)253) goto label$95;
			label$94:;
		};
	};
	label$72:;
	#define vr$334 ((integer)(BLOCK_X$ << (integer)6))
	#define vr$335 ((integer)(vr$334 + BLOCK_Y$))
	#define vr$336 ((integer)(vr$335 << (integer)2))
	#define vr$337 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$336)))
	*(integer*)((ubyte *)vr$337 + 1536) = (BEST_DIFF$);
	#define vr$338 ((short)(BEST_P$))
	#define vr$339 ((integer)(BLOCK_X$ << (integer)6))
	#define vr$340 ((integer)(vr$339 + BLOCK_Y$))
	#define vr$341 ((integer)(vr$340 << (integer)1))
	#define vr$342 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$341)))
	*(short*)((ubyte *)vr$342 + 17920) = (vr$338);
	fb$result$ = (BEST_P$);
	goto label$61;
	label$61:;
	#define vr$343 ((integer)(fb$result$))
	return vr$343;
}

void __attribute__((stdcall)) RENDER( PICTURESTRUCT* TPIC$ )
{
	void* P1$;
	void* P2$;
	integer IPITCH$;
	label$112:;
	#define vr$344 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$345 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$344 + 26112) + (integer)32)))
	P1$ = (vr$345);
	#define vr$346 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$347 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$346 + 26116) + (integer)32)))
	P2$ = (vr$347);
	#define vr$348 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	#define vr$349 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$348 + 26112)))
	#define vr$350 ((integer)(*(uinteger*)((ubyte *)vr$349 + 16)))
	IPITCH$ = (vr$350);
	{
		integer Y1$;
		Y1$ = ((integer)0);
		label$117:;
		{
			{
				integer X1$;
				X1$ = ((integer)0);
				label$121:;
				{
					integer HAS_TRANS$;
					integer BEST_P$;
					void* P1A$;
					void* P2A$;
					uinteger BACKUP$;
					#define vr$351 ((integer*)(&HAS_TRANS$))
					__builtin_memset( vr$351, 0, (integer)4 );
					#define vr$352 ((integer*)(&HAS_TRANS$))
					integer vr$353 = (integer)(FIND_BEST_P( (PICTURESTRUCT*)(TPIC$), X1$, Y1$, vr$352 ));
					BEST_P$ = (vr$353);
					#define vr$354 ((integer)(X1$ << (integer)4))
					#define vr$355 ((void*)((void*)((ubyte *)P1$ + vr$354)))
					P1A$ = (vr$355);
					#define vr$356 ((integer)(X1$ << (integer)4))
					#define vr$357 ((void*)((void*)((ubyte *)P2$ + vr$356)))
					P2A$ = (vr$357);
					#define vr$358 ((uinteger*)(&BACKUP$))
					__builtin_memset( vr$358, 0, (integer)4 );
					if (HAS_TRANS$ == (integer)0) goto label$123;
					{
						#define vr$359 ((integer)(BEST_P$ << (integer)2))
						#define vr$360 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$359)))
						BACKUP$ = (*(uinteger*)((ubyte *)vr$360 + 12));
						#define vr$361 ((integer)(BEST_P$ << (integer)2))
						#define vr$362 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$361)))
						*(uinteger*)((ubyte *)vr$362 + 12) = ((uinteger)0u);
					};
					label$123:;
					label$122:;
					{
						integer Y$;
						Y$ = ((integer)0);
						label$127:;
						{
							{
								integer X$;
								X$ = ((integer)0);
								label$131:;
								{
									uinteger C1$;
									#define vr$363 ((uinteger*)(P1A$))
									#define vr$364 ((integer)(X$ << (integer)2))
									#define vr$365 ((uinteger*)((uinteger*)((ubyte *)vr$363 + vr$364)))
									C1$ = (*(uinteger*)((ubyte *)vr$365));
									#define vr$366 ((integer)(BEST_P$ << (integer)2))
									#define vr$367 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$366)))
									#define vr$368 ((uinteger*)(&*(uinteger*)((ubyte *)vr$367)))
									uinteger vr$369 = (uinteger)(CLOSEST( C1$, vr$368, HAS_TRANS$ ));
									#define vr$370 ((uinteger*)(P2A$))
									#define vr$371 ((integer)(X$ << (integer)2))
									#define vr$372 ((uinteger*)((uinteger*)((ubyte *)vr$370 + vr$371)))
									*(uinteger*)((ubyte *)vr$372) = (vr$369);
								};
								label$129:;
								#define vr$373 ((integer)(X$ + (integer)1))
								X$ = (vr$373);
								label$128:;
								if (X$ <= (integer)3) goto label$131;
								label$130:;
							};
							#define vr$374 ((void*)((void*)((ubyte *)P1A$ + IPITCH$)))
							P1A$ = (vr$374);
							#define vr$375 ((void*)((void*)((ubyte *)P2A$ + IPITCH$)))
							P2A$ = (vr$375);
						};
						label$125:;
						#define vr$376 ((integer)(Y$ + (integer)1))
						Y$ = (vr$376);
						label$124:;
						if (Y$ <= (integer)3) goto label$127;
						label$126:;
					};
					if (HAS_TRANS$ == (integer)0) goto label$133;
					{
						#define vr$377 ((integer)(BEST_P$ << (integer)2))
						#define vr$378 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)(PICTURESTRUCT*)(TPIC$) + vr$377)))
						*(uinteger*)((ubyte *)vr$378 + 12) = (BACKUP$);
					};
					label$133:;
					label$132:;
				};
				label$119:;
				#define vr$379 ((integer)(X1$ + (integer)1))
				X1$ = (vr$379);
				label$118:;
				if (X1$ <= (integer)63) goto label$121;
				label$120:;
			};
			#define vr$380 ((integer)(IPITCH$ << (integer)2))
			#define vr$381 ((void*)((void*)((ubyte *)P1$ + vr$380)))
			P1$ = (vr$381);
			#define vr$382 ((integer)(IPITCH$ << (integer)2))
			#define vr$383 ((void*)((void*)((ubyte *)P2$ + vr$382)))
			P2$ = (vr$383);
		};
		label$115:;
		#define vr$384 ((integer)(Y1$ + (integer)1))
		Y1$ = (vr$384);
		label$114:;
		if (Y1$ <= (integer)63) goto label$117;
		label$116:;
	};
	label$113:;
}

integer __attribute__((stdcall)) LOADPICTURE( PICTURESTRUCT* TPIC$, string* SBITMAP$ )
{
	integer fb$result$;
	PICTURESTRUCT* TMP$85$;
	integer IFILE$;
	ubyte* PPIX$;
	#define vr$385 ((integer*)(&fb$result$))
	__builtin_memset( vr$385, 0, (integer)4 );
	label$134:;
	#define vr$386 ((char**)((string*)(SBITMAP$)))
	integer vr$387 = (integer)(fb_FileExists( *(char**)((ubyte *)vr$386) ));
	if (vr$387 != (integer)0) goto label$137;
	fb$result$ = ((integer)0);
	goto label$135;
	label$137:;
	TMP$85$ = ((PICTURESTRUCT*)(TPIC$));
	string* vr$388 = (string*)(fb_StrAllocTempDescZEx( (char*)"\\", (integer)1 ));
	integer vr$389 = (integer)(fb_StrInstrRev( (string*)(SBITMAP$), vr$388, (integer)-1 ));
	IFILE$ = (vr$389);
	if (IFILE$ != (integer)0) goto label$139;
	string* vr$390 = (string*)(fb_StrAllocTempDescZEx( (char*)"/", (integer)1 ));
	integer vr$391 = (integer)(fb_StrInstrRev( (string*)(SBITMAP$), vr$390, (integer)-1 ));
	IFILE$ = (vr$391);
	label$139:;
	#define vr$392 ((integer)(IFILE$ + (integer)1))
	string* vr$393 = (string*)(fb_StrMid( (string*)(SBITMAP$), vr$392, (integer)-1 ));
	#define vr$394 ((string*)(TMP$85$))
	#define vr$395 ((string*)(&*(string*)((ubyte *)vr$394 + 26188)))
	fb_StrAssign( vr$395, (integer)-1, vr$393, (integer)-1, (integer)0 );
	#define vr$396 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$396 + 26112) != (integer)0) goto label$141;
	void* vr$397 = (void*)(fb_GfxImageCreate( (integer)256, (integer)256, (uinteger)0u, (uinteger)0u, (uinteger)2147483648u ));
	#define vr$398 ((FB$IMAGE**)(TMP$85$))
	*(FB$IMAGE**)((ubyte *)vr$398 + 26112) = (vr$397);
	label$141:;
	#define vr$399 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$399 + 26112) != (integer)0) goto label$143;
	fb$result$ = ((integer)0);
	goto label$135;
	label$143:;
	#define vr$400 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$400 + 26116) != (integer)0) goto label$145;
	void* vr$401 = (void*)(fb_GfxImageCreate( (integer)256, (integer)256, (uinteger)0u, (uinteger)0u, (uinteger)2147483648u ));
	#define vr$402 ((FB$IMAGE**)(TMP$85$))
	*(FB$IMAGE**)((ubyte *)vr$402 + 26116) = (vr$401);
	label$145:;
	#define vr$403 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$403 + 26116) != (integer)0) goto label$147;
	fb$result$ = ((integer)0);
	goto label$135;
	label$147:;
	#define vr$404 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$404 + 26120) != (integer)0) goto label$149;
	void* vr$405 = (void*)(fb_GfxImageCreate( (integer)256, (integer)256, (uinteger)0u, (uinteger)0u, (uinteger)2147483648u ));
	#define vr$406 ((FB$IMAGE**)(TMP$85$))
	*(FB$IMAGE**)((ubyte *)vr$406 + 26120) = (vr$405);
	label$149:;
	#define vr$407 ((FB$IMAGE**)(TMP$85$))
	if (*(FB$IMAGE**)((ubyte *)vr$407 + 26120) != (integer)0) goto label$151;
	fb$result$ = ((integer)0);
	goto label$135;
	label$151:;
	#define vr$408 ((void**)(TMP$85$))
	if (*(void**)((ubyte *)vr$408 + 26152) != (integer)0) goto label$153;
	void* vr$409 = (void*)(fb_MutexCreate(  ));
	#define vr$410 ((void**)(TMP$85$))
	*(void**)((ubyte *)vr$410 + 26152) = (vr$409);
	label$153:;
	#define vr$411 ((void**)(TMP$85$))
	if (*(void**)((ubyte *)vr$411 + 26152) != (integer)0) goto label$155;
	fb$result$ = ((integer)0);
	goto label$135;
	label$155:;
	#define vr$412 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$412 + 26124) = ((integer)50331648);
	#define vr$413 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$413 + 26128) = ((integer)0);
	#define vr$414 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$414 + 26144) = ((integer)0);
	#define vr$415 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$415 + 26132) = ((integer)0);
	#define vr$416 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$416 + 26136) = ((integer)0);
	double vr$417 = (double)(fb_Timer(  ));
	#define vr$418 ((double*)(TMP$85$))
	*(double*)((ubyte *)vr$418 + 26168) = (vr$417);
	#define vr$419 ((integer*)(TMP$85$))
	*(integer*)((ubyte *)vr$419 + 26148) = ((integer)0);
	#define vr$420 ((FB$IMAGE**)((PICTURESTRUCT*)(TPIC$)))
	fb_GfxBload( (string*)(SBITMAP$), *(FB$IMAGE**)((ubyte *)vr$420 + 26112), (void*)0 );
	#define vr$421 ((FB$IMAGE**)(TMP$85$))
	#define vr$422 ((FB$IMAGE*)((FB$IMAGE*)((ubyte *)*(FB$IMAGE**)((ubyte *)vr$421 + 26112) + (integer)32)))
	#define vr$423 ((ubyte*)(vr$422))
	PPIX$ = (vr$423);
	{
		integer CNT$;
		CNT$ = ((integer)0);
		label$159:;
		{
			integer I1$;
			#define vr$424 ((ubyte*)((ubyte*)((ubyte *)PPIX$ + CNT$)))
			#define vr$425 ((integer)(*(ubyte*)((ubyte *)vr$424)))
			#define vr$426 ((ubyte*)((ubyte*)((ubyte *)PPIX$ + CNT$)))
			#define vr$427 ((uinteger)(*(ubyte*)((ubyte *)vr$426)))
			#define vr$428 ((uinteger)(vr$427 & (integer)7))
			#define vr$429 ((integer)(vr$428))
			#define vr$430 ((integer)(vr$425 + vr$429))
			I1$ = (vr$430);
			if (I1$ <= (integer)255) goto label$161;
			I1$ = ((integer)255);
			label$161:;
			#define vr$431 ((integer)(I1$ & (integer)16316664))
			#define vr$432 ((ubyte)(vr$431))
			#define vr$433 ((ubyte*)((ubyte*)((ubyte *)PPIX$ + CNT$)))
			*(ubyte*)((ubyte *)vr$433) = (vr$432);
		};
		label$157:;
		#define vr$434 ((integer)(CNT$ + (integer)1))
		CNT$ = (vr$434);
		label$156:;
		if (CNT$ <= (integer)262143) goto label$159;
		label$158:;
	};
	{
		integer X$;
		X$ = ((integer)0);
		label$165:;
		{
			integer vr$435 = (integer)(rand(  ));
			integer vr$436 = (integer)(rand(  ));
			#define vr$437 ((integer)(vr$436 << (integer)15))
			#define vr$438 ((integer)(vr$435 ^ vr$437))
			#define vr$439 ((integer)(vr$438 & (integer)16316664))
			#define vr$440 ((uinteger)(vr$439))
			#define vr$441 ((integer)(X$ << (integer)2))
			#define vr$442 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + vr$441)))
			*(uinteger*)((ubyte *)vr$442) = (vr$440);
			#define vr$443 ((integer)(X$ << (integer)2))
			#define vr$444 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + vr$443)))
			#define vr$445 ((uinteger)(*(uinteger*)((ubyte *)vr$444) & (integer)16316664))
			if (vr$445 != (integer)0) goto label$167;
			#define vr$446 ((integer)(X$ << (integer)2))
			#define vr$447 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + vr$446)))
			*(uinteger*)((ubyte *)vr$447) = ((uinteger)526344u);
			label$167:;
			#define vr$448 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + X$)))
			*(ubyte*)((ubyte *)vr$448 + 1280) = ((ubyte)255);
			#define vr$449 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + X$)))
			*(ubyte*)((ubyte *)vr$449 + 1024) = ((ubyte)0);
		};
		label$163:;
		#define vr$450 ((integer)(X$ + (integer)1))
		X$ = (vr$450);
		label$162:;
		if (X$ <= (integer)255) goto label$165;
		label$164:;
	};
	{
		integer Y$;
		Y$ = ((integer)0);
		label$171:;
		{
			{
				integer X$;
				X$ = ((integer)0);
				label$175:;
				{
					#define vr$451 ((integer)(X$ << (integer)6))
					#define vr$452 ((integer)(vr$451 + Y$))
					#define vr$453 ((integer)(vr$452 << (integer)2))
					#define vr$454 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + vr$453)))
					*(integer*)((ubyte *)vr$454 + 1536) = ((integer)1048576);
					#define vr$455 ((integer)(X$ << (integer)6))
					#define vr$456 ((integer)(vr$455 + Y$))
					#define vr$457 ((integer)(vr$456 << (integer)1))
					#define vr$458 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$85$ + vr$457)))
					*(short*)((ubyte *)vr$458 + 17920) = ((short)0);
				};
				label$173:;
				#define vr$459 ((integer)(X$ + (integer)1))
				X$ = (vr$459);
				label$172:;
				if (X$ <= (integer)63) goto label$175;
				label$174:;
			};
		};
		label$169:;
		#define vr$460 ((integer)(Y$ + (integer)1))
		Y$ = (vr$460);
		label$168:;
		if (Y$ <= (integer)63) goto label$171;
		label$170:;
	};
	fb$result$ = ((integer)1);
	goto label$135;
	label$135:;
	#define vr$461 ((integer)(fb$result$))
	return vr$461;
}

void __attribute__((stdcall)) EXTRATHREAD( PICTURESTRUCT* PPIC$ )
{
	PICTURESTRUCT* TMP$109$;
	label$181:;
	TMP$109$ = (PPIC$);
	label$183:;
	{
		double DTMR$;
		TPAL OLD_PAL$;
		if (IHALT$ == (integer)0) goto label$187;
		goto label$184;
		label$187:;
		double vr$462 = (double)(fb_Timer(  ));
		DTMR$ = (vr$462);
		SwitchToThread(  );
		#define vr$463 ((TPAL*)(&OLD_PAL$))
		#define vr$464 ((TPAL*)(TMP$109$))
		#define vr$465 ((TPAL*)(&*(TPAL*)((ubyte *)vr$464)))
		__builtin_memcpy( vr$463, vr$465, 1024 );
		MUTATE( PPIC$ );
		#define vr$466 ((FB$IMAGE**)(TMP$109$))
		#define vr$467 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$466 + 26116)))
		#define vr$468 ((FB$IMAGE**)(TMP$109$))
		#define vr$469 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$468 + 26116)))
		#define vr$470 ((uinteger)(*(uinteger*)((ubyte *)vr$467 + 16) * *(uinteger*)((ubyte *)vr$469 + 12)))
		#define vr$471 ((integer)((integer)32 + vr$470))
		#define vr$472 ((FB$IMAGE**)(TMP$109$))
		#define vr$473 ((FB$IMAGE**)(TMP$109$))
		memcpy( *(FB$IMAGE**)((ubyte *)vr$473 + 26120), *(FB$IMAGE**)((ubyte *)vr$472 + 26116), vr$471 );
		RENDER( PPIC$ );
		#define vr$474 ((void**)(TMP$109$))
		fb_MutexLock( *(void**)((ubyte *)vr$474 + 26152) );
		integer vr$475 = (integer)(COMPARE( PPIC$ ));
		#define vr$476 ((integer*)(TMP$109$))
		*(integer*)((ubyte *)vr$476 + 26128) = (vr$475);
		#define vr$477 ((integer*)(TMP$109$))
		#define vr$478 ((integer)(*(integer*)((ubyte *)vr$477 + 26136) + (integer)1))
		#define vr$479 ((integer*)(TMP$109$))
		*(integer*)((ubyte *)vr$479 + 26136) = (vr$478);
		#define vr$480 ((integer*)(TMP$109$))
		#define vr$481 ((integer*)(TMP$109$))
		if (*(integer*)((ubyte *)vr$480 + 26128) > *(integer*)((ubyte *)vr$481 + 26124)) goto label$189;
		{
			{
				integer CNT$;
				CNT$ = ((integer)0);
				label$193:;
				{
					#define vr$482 ((ubyte*)(TMP$109$))
					#define vr$483 ((ubyte*)(&*(ubyte*)((ubyte *)vr$482 + 1024)))
					#define vr$484 ((uinteger*)(vr$483))
					#define vr$485 ((integer)(CNT$ << (integer)2))
					#define vr$486 ((uinteger*)((uinteger*)((ubyte *)vr$484 + vr$485)))
					#define vr$487 ((ubyte*)(TMP$109$))
					#define vr$488 ((ubyte*)(&*(ubyte*)((ubyte *)vr$487 + 1280)))
					#define vr$489 ((uinteger*)(vr$488))
					#define vr$490 ((integer)(CNT$ << (integer)2))
					#define vr$491 ((uinteger*)((uinteger*)((ubyte *)vr$489 + vr$490)))
					*(uinteger*)((ubyte *)vr$491) = (*(uinteger*)((ubyte *)vr$486));
				};
				label$191:;
				#define vr$492 ((integer)(CNT$ + (integer)1))
				CNT$ = (vr$492);
				label$190:;
				if (CNT$ <= (integer)63) goto label$193;
				label$192:;
			};
		};
		label$189:;
		label$188:;
		#define vr$493 ((integer*)(TMP$109$))
		#define vr$494 ((integer*)(TMP$109$))
		if (*(integer*)((ubyte *)vr$493 + 26128) < *(integer*)((ubyte *)vr$494 + 26124)) goto label$195;
		{
			#define vr$495 ((TPAL*)(TMP$109$))
			#define vr$496 ((TPAL*)(&*(TPAL*)((ubyte *)vr$495)))
			#define vr$497 ((TPAL*)(&OLD_PAL$))
			__builtin_memcpy( vr$496, vr$497, 1024 );
			#define vr$498 ((integer*)(TMP$109$))
			#define vr$499 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$499 + 26128) = (*(integer*)((ubyte *)vr$498 + 26124));
			#define vr$500 ((FB$IMAGE**)(TMP$109$))
			#define vr$501 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$500 + 26116)))
			#define vr$502 ((FB$IMAGE**)(TMP$109$))
			#define vr$503 ((uinteger*)(*(FB$IMAGE**)((ubyte *)vr$502 + 26116)))
			#define vr$504 ((uinteger)(*(uinteger*)((ubyte *)vr$501 + 16) * *(uinteger*)((ubyte *)vr$503 + 12)))
			#define vr$505 ((integer)((integer)32 + vr$504))
			#define vr$506 ((FB$IMAGE**)(TMP$109$))
			#define vr$507 ((FB$IMAGE**)(TMP$109$))
			memcpy( *(FB$IMAGE**)((ubyte *)vr$507 + 26116), *(FB$IMAGE**)((ubyte *)vr$506 + 26120), vr$505 );
		};
		goto label$194;
		label$195:;
		{
			#define vr$508 ((integer*)(TMP$109$))
			#define vr$509 ((integer)(*(integer*)((ubyte *)vr$508 + 26132) + (integer)1))
			#define vr$510 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$510 + 26132) = (vr$509);
			#define vr$511 ((integer*)(TMP$109$))
			#define vr$512 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$512 + 26124) = (*(integer*)((ubyte *)vr$511 + 26128));
			#define vr$513 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$513 + 26140) = ((integer)1);
			double vr$514 = (double)(fb_Timer(  ));
			#define vr$515 ((double*)(TMP$109$))
			#define vr$516 ((double)(vr$514 - *(double*)((ubyte *)vr$515 + 26168)))
			integer vr$517 = (integer)(fb_dtosi( vr$516 ));
			#define vr$518 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$518 + 26148) = (vr$517);
		};
		label$194:;
		#define vr$519 ((integer*)(TMP$109$))
		#define vr$520 ((integer)(*(integer*)((ubyte *)vr$519 + 26136) & (integer)15))
		if (vr$520 != (integer)0) goto label$197;
		CHECK( PPIC$ );
		label$197:;
		#define vr$521 ((integer*)(TMP$109$))
		#define vr$522 ((integer*)(TMP$109$))
		#define vr$523 ((integer)(*(integer*)((ubyte *)vr$522 + 26132) * (integer)20))
		if (*(integer*)((ubyte *)vr$521 + 26136) <= vr$523) goto label$199;
		{
			#define vr$524 ((integer*)(TMP$109$))
			*(integer*)((ubyte *)vr$524 + 26144) = ((integer)1);
			#define vr$525 ((void**)(TMP$109$))
			fb_MutexUnlock( *(void**)((ubyte *)vr$525 + 26152) );
			goto label$184;
		};
		label$199:;
		label$198:;
		double vr$526 = (double)(fb_Timer(  ));
		#define vr$527 ((double)(vr$526 - DTMR$))
		#define vr$528 ((double*)(TMP$109$))
		*(double*)((ubyte *)vr$528 + 26160) = (vr$527);
		#define vr$529 ((void**)(TMP$109$))
		fb_MutexUnlock( *(void**)((ubyte *)vr$529 + 26152) );
	};
	label$185:;
	goto label$183;
	label$184:;
	label$182:;
}

__attribute__(( constructor )) static void fb_ctor__CompressTextures3( void )
{
	string SFOLD$;
	string TMP$89$;
	string TMP$91$;
	string SFILE$;
	PICTURESTRUCT TPICS$[2];
	TMP$93 tmp$92$;
	integer TMP$94$;
	PICTURESTRUCT* TMP$95$;
	string TMP$97$;
	string TMP$98$;
	string TMP$104$;
	string TMP$105$;
	label$0:;
	void* vr$530 = (void*)(GetCurrentProcess(  ));
	SetPriorityClass( vr$530, (integer)64 );
	printf( (char*)"Size=%i\n", (integer)26200 );
	fb_GfxScreenRes( (integer)1024, (integer)512, (integer)32, (integer)0, (integer)0, (integer)0 );
	string* vr$531 = (string*)(fb_ExePath(  ));
	#define vr$532 ((string*)(&TMP$89$))
	__builtin_memset( vr$532, 0, (integer)12 );
	#define vr$533 ((string*)(&TMP$89$))
	string* vr$534 = (string*)(fb_StrConcat( vr$533, vr$531, (integer)-1, (char*)"/TexDump2/", (integer)11 ));
	#define vr$535 ((string*)(&SFOLD$))
	fb_StrInit( vr$535, (integer)-1, vr$534, (integer)-1, (integer)0 );
	#define vr$536 ((string*)(&SFOLD$))
	#define vr$537 ((string*)(&TMP$91$))
	__builtin_memset( vr$537, 0, (integer)12 );
	#define vr$538 ((string*)(&TMP$91$))
	string* vr$539 = (string*)(fb_StrConcat( vr$538, vr$536, (integer)-1, (char*)"*.bmp", (integer)6 ));
	string* vr$540 = (string*)(fb_Dir( vr$539, (integer)33, (integer*)0 ));
	#define vr$541 ((string*)(&SFILE$))
	fb_StrInit( vr$541, (integer)-1, vr$540, (integer)-1, (integer)0 );
	#define vr$542 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$)))
	*(PICTURESTRUCT**)(&tmp$92$) = (vr$542);
	#define vr$543 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$)))
	*(PICTURESTRUCT**)((ubyte *)&tmp$92$ + 4) = (vr$543);
	*(integer*)((ubyte *)&tmp$92$ + 8) = ((integer)52400);
	*(integer*)((ubyte *)&tmp$92$ + 12) = ((integer)26200);
	*(integer*)((ubyte *)&tmp$92$ + 16) = ((integer)1);
	*(integer*)((ubyte *)&tmp$92$ + 20) = ((integer)2);
	*(integer*)((ubyte *)&tmp$92$ + 24) = ((integer)0);
	*(integer*)((ubyte *)&tmp$92$ + 28) = ((integer)1);
	#define vr$544 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$)))
	TMP$95$ = (vr$544);
	TMP$94$ = ((integer)0);
	label$176:;
	_ZN13PICTURESTRUCTC1Ev( TMP$95$ );
	#define vr$545 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$95$ + (integer)26200)))
	TMP$95$ = (vr$545);
	#define vr$546 ((integer)(TMP$94$ + (integer)1))
	TMP$94$ = (vr$546);
	if (TMP$94$ != (integer)2) goto label$176;
	#define vr$547 ((string*)(&SFILE$))
	#define vr$548 ((char**)(vr$547))
	printf( (char*)"%s\n", *(char**)((ubyte *)vr$548) );
	#define vr$549 ((string*)(&TMP$98$))
	__builtin_memset( vr$549, 0, (integer)12 );
	#define vr$550 ((string*)(&SFILE$))
	#define vr$551 ((string*)(&SFOLD$))
	#define vr$552 ((string*)(&TMP$97$))
	__builtin_memset( vr$552, 0, (integer)12 );
	#define vr$553 ((string*)(&TMP$97$))
	string* vr$554 = (string*)(fb_StrConcat( vr$553, vr$551, (integer)-1, vr$550, (integer)-1 ));
	#define vr$555 ((string*)(&TMP$98$))
	fb_StrAssign( vr$555, (integer)-1, vr$554, (integer)-1, (integer)0 );
	#define vr$556 ((string*)(&TMP$98$))
	#define vr$557 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$)))
	integer vr$558 = (integer)(LOADPICTURE( vr$557, vr$556 ));
	#define vr$559 ((string*)(&TMP$98$))
	fb_StrDelete( vr$559 );
	if (vr$558 != (integer)0) goto label$178;
	{
		string TMP$101$;
		string TMP$102$;
		string TMP$103$;
		#define vr$560 ((string*)(&SFILE$))
		#define vr$561 ((string*)(&SFOLD$))
		#define vr$562 ((string*)(&TMP$101$))
		__builtin_memset( vr$562, 0, (integer)12 );
		#define vr$563 ((string*)(&TMP$101$))
		string* vr$564 = (string*)(fb_StrConcat( vr$563, (char*)"Failed to load '", (integer)17, vr$561, (integer)-1 ));
		#define vr$565 ((string*)(&TMP$102$))
		__builtin_memset( vr$565, 0, (integer)12 );
		#define vr$566 ((string*)(&TMP$102$))
		string* vr$567 = (string*)(fb_StrConcat( vr$566, vr$564, (integer)-1, vr$560, (integer)-1 ));
		#define vr$568 ((string*)(&TMP$103$))
		__builtin_memset( vr$568, 0, (integer)12 );
		#define vr$569 ((string*)(&TMP$103$))
		string* vr$570 = (string*)(fb_StrConcat( vr$569, vr$567, (integer)-1, (char*)"'", (integer)2 ));
		fb_PrintString( (integer)0, vr$570, (integer)1 );
		fb_Sleep( (integer)-1 );
		fb_End( (integer)0 );
	};
	label$178:;
	label$177:;
	string* vr$571 = (string*)(fb_DirNext( (integer*)0 ));
	#define vr$572 ((string*)(&SFILE$))
	fb_StrAssign( vr$572, (integer)-1, vr$571, (integer)-1, (integer)0 );
	#define vr$573 ((string*)(&TMP$105$))
	__builtin_memset( vr$573, 0, (integer)12 );
	#define vr$574 ((string*)(&SFILE$))
	#define vr$575 ((string*)(&SFOLD$))
	#define vr$576 ((string*)(&TMP$104$))
	__builtin_memset( vr$576, 0, (integer)12 );
	#define vr$577 ((string*)(&TMP$104$))
	string* vr$578 = (string*)(fb_StrConcat( vr$577, vr$575, (integer)-1, vr$574, (integer)-1 ));
	#define vr$579 ((string*)(&TMP$105$))
	fb_StrAssign( vr$579, (integer)-1, vr$578, (integer)-1, (integer)0 );
	#define vr$580 ((string*)(&TMP$105$))
	#define vr$581 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$ + 26200)))
	integer vr$582 = (integer)(LOADPICTURE( vr$581, vr$580 ));
	#define vr$583 ((string*)(&TMP$105$))
	fb_StrDelete( vr$583 );
	if (vr$582 != (integer)0) goto label$180;
	{
		string TMP$106$;
		string TMP$107$;
		string TMP$108$;
		#define vr$584 ((string*)(&SFILE$))
		#define vr$585 ((string*)(&SFOLD$))
		#define vr$586 ((string*)(&TMP$106$))
		__builtin_memset( vr$586, 0, (integer)12 );
		#define vr$587 ((string*)(&TMP$106$))
		string* vr$588 = (string*)(fb_StrConcat( vr$587, (char*)"Failed to load '", (integer)17, vr$585, (integer)-1 ));
		#define vr$589 ((string*)(&TMP$107$))
		__builtin_memset( vr$589, 0, (integer)12 );
		#define vr$590 ((string*)(&TMP$107$))
		string* vr$591 = (string*)(fb_StrConcat( vr$590, vr$588, (integer)-1, vr$584, (integer)-1 ));
		#define vr$592 ((string*)(&TMP$108$))
		__builtin_memset( vr$592, 0, (integer)12 );
		#define vr$593 ((string*)(&TMP$108$))
		string* vr$594 = (string*)(fb_StrConcat( vr$593, vr$591, (integer)-1, (char*)"'", (integer)2 ));
		fb_PrintString( (integer)0, vr$594, (integer)1 );
		fb_Sleep( (integer)-1 );
		fb_End( (integer)0 );
	};
	label$180:;
	label$179:;
	fb_GfxPut( (integer)0, (single)0.0f, (single)0.0f, *(FB$IMAGE**)((ubyte *)&TPICS$ + 26112), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)1, &fb_hPutPSet, (integer)-1, (integer)0, (integer)0 );
	fb_GfxPut( (integer)0, (single)512.0f, (single)0.0f, *(FB$IMAGE**)((ubyte *)&TPICS$ + 52312), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)1, &fb_hPutPSet, (integer)-1, (integer)0, (integer)0 );
	#define vr$595 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$)))
	#define vr$596 ((void*)(vr$595))
	#define vr$597 ((void*)(&EXTRATHREAD))
	void* vr$598 = (void*)(fb_ThreadCreate( vr$597, vr$596, (integer)0 ));
	*(void**)((ubyte *)&TPICS$ + 26156) = (vr$598);
	#define vr$599 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$ + 26200)))
	#define vr$600 ((void*)(vr$599))
	#define vr$601 ((void*)(&EXTRATHREAD))
	void* vr$602 = (void*)(fb_ThreadCreate( vr$601, vr$600, (integer)0 ));
	*(void**)((ubyte *)&TPICS$ + 52356) = (vr$602);
	void* vr$603 = (void*)(GetCurrentThread(  ));
	SetThreadPriority( vr$603, (integer)1 );
	label$200:;
	integer vr$604 = (integer)(fb_Multikey( (FB$TMP$0)1 ));
	if (vr$604 != (integer)0) goto label$201;
	{
		string STEXT$;
		integer ALLDONE$;
		#define vr$605 ((string*)(&STEXT$))
		__builtin_memset( vr$605, 0, (integer)12 );
		#define vr$606 ((integer*)(&ALLDONE$))
		__builtin_memset( vr$606, 0, (integer)4 );
		{
			integer CNT$;
			CNT$ = ((integer)0);
			label$205:;
			{
				PICTURESTRUCT* TMP$110$;
				integer IX$;
				string TMP$126$;
				string TMP$127$;
				string TMP$128$;
				string TMP$129$;
				string TMP$130$;
				string TMP$131$;
				string TMP$132$;
				string TMP$133$;
				string TMP$134$;
				string TMP$135$;
				string TMP$136$;
				string TMP$137$;
				#define vr$607 ((integer)(CNT$ * (integer)26200))
				#define vr$608 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$ + vr$607)))
				TMP$110$ = (vr$608);
				#define vr$609 ((integer*)(TMP$110$))
				if (*(integer*)((ubyte *)vr$609 + 26144) <= (integer)0) goto label$207;
				{
					string TMP$112$;
					string TMP$113$;
					string TMP$115$;
					string TMP$116$;
					#define vr$610 ((void**)(TMP$110$))
					fb_ThreadWait( *(void**)((ubyte *)vr$610 + 26156) );
					#define vr$611 ((void**)(TMP$110$))
					*(void**)((ubyte *)vr$611 + 26156) = ((void*)0);
					#define vr$612 ((string*)(&TMP$113$))
					__builtin_memset( vr$612, 0, (integer)12 );
					#define vr$613 ((string*)(TMP$110$))
					#define vr$614 ((string*)(&*(string*)((ubyte *)vr$613 + 26188)))
					#define vr$615 ((string*)(&SFOLD$))
					#define vr$616 ((string*)(&TMP$112$))
					__builtin_memset( vr$616, 0, (integer)12 );
					#define vr$617 ((string*)(&TMP$112$))
					string* vr$618 = (string*)(fb_StrConcat( vr$617, vr$615, (integer)-1, vr$614, (integer)-1 ));
					#define vr$619 ((string*)(&TMP$113$))
					fb_StrAssign( vr$619, (integer)-1, vr$618, (integer)-1, (integer)0 );
					#define vr$620 ((string*)(&TMP$113$))
					#define vr$621 ((char**)(vr$620))
					printf( (char*)"[%s] done\n", *(char**)((ubyte *)vr$621) );
					#define vr$622 ((string*)(&TMP$113$))
					fb_StrDelete( vr$622 );
					#define vr$623 ((FB$IMAGE**)(TMP$110$))
					#define vr$624 ((string*)(TMP$110$))
					#define vr$625 ((string*)(&*(string*)((ubyte *)vr$624 + 26188)))
					#define vr$626 ((string*)(&SFOLD$))
					#define vr$627 ((string*)(&TMP$115$))
					__builtin_memset( vr$627, 0, (integer)12 );
					#define vr$628 ((string*)(&TMP$115$))
					string* vr$629 = (string*)(fb_StrConcat( vr$628, vr$626, (integer)-1, vr$625, (integer)-1 ));
					#define vr$630 ((string*)(&TMP$116$))
					__builtin_memset( vr$630, 0, (integer)12 );
					#define vr$631 ((string*)(&TMP$116$))
					string* vr$632 = (string*)(fb_StrConcat( vr$631, vr$629, (integer)-1, (char*)".bmp", (integer)5 ));
					fb_GfxBsave( vr$632, *(FB$IMAGE**)((ubyte *)vr$623 + 26116), (uinteger)0u, (void*)0 );
					#define vr$633 ((integer*)(TMP$110$))
					*(integer*)((ubyte *)vr$633 + 26144) = ((integer)-1);
					string* vr$634 = (string*)(fb_DirNext( (integer*)0 ));
					#define vr$635 ((string*)(&SFILE$))
					fb_StrAssign( vr$635, (integer)-1, vr$634, (integer)-1, (integer)0 );
					#define vr$636 ((string*)(&SFILE$))
					integer vr$637 = (integer)(fb_StrLen( vr$636, (integer)-1 ));
					if (vr$637 == (integer)0) goto label$209;
					{
						string TMP$117$;
						string TMP$118$;
						#define vr$638 ((string*)(&TMP$118$))
						__builtin_memset( vr$638, 0, (integer)12 );
						#define vr$639 ((string*)(&SFILE$))
						#define vr$640 ((string*)(&SFOLD$))
						#define vr$641 ((string*)(&TMP$117$))
						__builtin_memset( vr$641, 0, (integer)12 );
						#define vr$642 ((string*)(&TMP$117$))
						string* vr$643 = (string*)(fb_StrConcat( vr$642, vr$640, (integer)-1, vr$639, (integer)-1 ));
						#define vr$644 ((string*)(&TMP$118$))
						fb_StrAssign( vr$644, (integer)-1, vr$643, (integer)-1, (integer)0 );
						#define vr$645 ((string*)(&TMP$118$))
						#define vr$646 ((integer)(CNT$ * (integer)26200))
						#define vr$647 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$ + vr$646)))
						LOADPICTURE( vr$647, vr$645 );
						#define vr$648 ((string*)(&TMP$118$))
						fb_StrDelete( vr$648 );
						#define vr$649 ((integer)(CNT$ * (integer)26200))
						#define vr$650 ((PICTURESTRUCT*)(&*(PICTURESTRUCT*)((ubyte *)TPICS$ + vr$649)))
						#define vr$651 ((void*)(vr$650))
						#define vr$652 ((void*)(&EXTRATHREAD))
						void* vr$653 = (void*)(fb_ThreadCreate( vr$652, vr$651, (integer)0 ));
						#define vr$654 ((void**)(TMP$110$))
						*(void**)((ubyte *)vr$654 + 26156) = (vr$653);
					};
					label$209:;
					label$208:;
				};
				label$207:;
				label$206:;
				#define vr$655 ((integer*)(TMP$110$))
				if (*(integer*)((ubyte *)vr$655 + 26144) != (integer)-1) goto label$211;
				#define vr$656 ((integer)(ALLDONE$ + (integer)1))
				ALLDONE$ = (vr$656);
				label$211:;
				#define vr$657 ((void**)(TMP$110$))
				fb_MutexLock( *(void**)((ubyte *)vr$657 + 26152) );
				#define vr$658 ((integer)(CNT$ << (integer)9))
				IX$ = (vr$658);
				#define vr$659 ((integer*)(TMP$110$))
				if (*(integer*)((ubyte *)vr$659 + 26140) == (integer)0) goto label$213;
				{
					integer ICOLOR$;
					#define vr$660 ((integer*)(TMP$110$))
					*(integer*)((ubyte *)vr$660 + 26140) = ((integer)0);
					fb_GfxLock(  );
					#define vr$661 ((FB$IMAGE**)(TMP$110$))
					#define vr$662 ((single)(IX$))
					fb_GfxPut( (integer)0, vr$662, (single)0.0f, *(FB$IMAGE**)((ubyte *)vr$661 + 26112), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)1, &fb_hPutPSet, (integer)-1, (integer)0, (integer)0 );
					#define vr$663 ((FB$IMAGE**)(TMP$110$))
					#define vr$664 ((integer)(IX$ + (integer)256))
					#define vr$665 ((single)(vr$664))
					fb_GfxPut( (integer)0, vr$665, (single)0.0f, *(FB$IMAGE**)((ubyte *)vr$663 + 26116), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)1, &fb_hPutPSet, (integer)-1, (integer)0, (integer)0 );
					#define vr$666 ((FB$IMAGE**)(TMP$110$))
					#define vr$667 ((single)(IX$))
					fb_GfxPut( (integer)0, vr$667, (single)256.0f, *(FB$IMAGE**)((ubyte *)vr$666 + 26116), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)2, &fb_hPutPReset, (integer)-1, (integer)0, (integer)0 );
					#define vr$668 ((FB$IMAGE**)(TMP$110$))
					#define vr$669 ((single)(IX$))
					fb_GfxPut( (integer)0, vr$669, (single)256.0f, *(FB$IMAGE**)((ubyte *)vr$668 + 26112), (integer)-65536, (integer)-65536, (integer)-65536, (integer)-65536, (integer)0, (integer)3, &fb_hPutAnd, (integer)-1, (integer)0, (integer)0 );
					#define vr$670 ((integer*)(&ICOLOR$))
					__builtin_memset( vr$670, 0, (integer)4 );
					{
						integer IPY$;
						IPY$ = ((integer)256);
						label$217:;
						{
							{
								integer IPX$;
								integer TMP$119$;
								#define vr$671 ((integer)(IX$ + (integer)256))
								IPX$ = (vr$671);
								#define vr$672 ((integer)(IX$ + (integer)511))
								TMP$119$ = (vr$672);
								goto label$218;
								label$221:;
								{
									#define vr$673 ((integer)(ICOLOR$ << (integer)2))
									#define vr$674 ((PICTURESTRUCT*)((PICTURESTRUCT*)((ubyte *)TMP$110$ + vr$673)))
									#define vr$675 ((integer)(IPY$ + (integer)15))
									#define vr$676 ((single)(vr$675))
									#define vr$677 ((integer)(IPX$ + (integer)15))
									#define vr$678 ((single)(vr$677))
									#define vr$679 ((single)(IPY$))
									#define vr$680 ((single)(IPX$))
									fb_GfxLine( (integer)0, vr$680, vr$679, vr$678, vr$676, *(uinteger*)((ubyte *)vr$674), (integer)2, (uinteger)65535u, (integer)0 );
									#define vr$681 ((integer)(ICOLOR$ + (integer)1))
									ICOLOR$ = (vr$681);
								};
								label$219:;
								#define vr$682 ((integer)(IPX$ + (integer)16))
								IPX$ = (vr$682);
								label$218:;
								if (IPX$ <= TMP$119$) goto label$221;
								label$220:;
							};
						};
						label$215:;
						#define vr$683 ((integer)(IPY$ + (integer)16))
						IPY$ = (vr$683);
						label$214:;
						if (IPY$ <= (integer)511) goto label$217;
						label$216:;
					};
					fb_GfxUnlock( (integer)-1, (integer)-1 );
				};
				label$213:;
				label$212:;
				if (CNT$ == (integer)0) goto label$223;
				#define vr$684 ((string*)(&STEXT$))
				fb_StrConcatAssign( vr$684, (integer)-1, (char*)"  ~~~  ", (integer)8, (integer)0 );
				label$223:;
				#define vr$685 ((integer*)(TMP$110$))
				string* vr$686 = (string*)(fb_IntToStr( *(integer*)((ubyte *)vr$685 + 26148) ));
				#define vr$687 ((double*)(TMP$110$))
				#define vr$688 ((double)(*(double*)((ubyte *)vr$687 + 26160) * (double)1000.0))
				integer vr$689 = (integer)(fb_dtosi( vr$688 ));
				string* vr$690 = (string*)(fb_IntToStr( vr$689 ));
				#define vr$691 ((integer*)(TMP$110$))
				string* vr$692 = (string*)(fb_IntToStr( *(integer*)((ubyte *)vr$691 + 26128) ));
				#define vr$693 ((integer*)(TMP$110$))
				string* vr$694 = (string*)(fb_IntToStr( *(integer*)((ubyte *)vr$693 + 26136) ));
				#define vr$695 ((integer*)(TMP$110$))
				string* vr$696 = (string*)(fb_IntToStr( *(integer*)((ubyte *)vr$695 + 26132) ));
				#define vr$697 ((string*)(TMP$110$))
				#define vr$698 ((string*)(&*(string*)((ubyte *)vr$697 + 26188)))
				#define vr$699 ((string*)(&TMP$126$))
				__builtin_memset( vr$699, 0, (integer)12 );
				#define vr$700 ((string*)(&TMP$126$))
				string* vr$701 = (string*)(fb_StrConcat( vr$700, vr$698, (integer)-1, (char*)" - ", (integer)4 ));
				#define vr$702 ((string*)(&TMP$127$))
				__builtin_memset( vr$702, 0, (integer)12 );
				#define vr$703 ((string*)(&TMP$127$))
				string* vr$704 = (string*)(fb_StrConcat( vr$703, vr$701, (integer)-1, vr$696, (integer)-1 ));
				#define vr$705 ((string*)(&TMP$128$))
				__builtin_memset( vr$705, 0, (integer)12 );
				#define vr$706 ((string*)(&TMP$128$))
				string* vr$707 = (string*)(fb_StrConcat( vr$706, vr$704, (integer)-1, (char*)"/", (integer)2 ));
				#define vr$708 ((string*)(&TMP$129$))
				__builtin_memset( vr$708, 0, (integer)12 );
				#define vr$709 ((string*)(&TMP$129$))
				string* vr$710 = (string*)(fb_StrConcat( vr$709, vr$707, (integer)-1, vr$694, (integer)-1 ));
				#define vr$711 ((string*)(&TMP$130$))
				__builtin_memset( vr$711, 0, (integer)12 );
				#define vr$712 ((string*)(&TMP$130$))
				string* vr$713 = (string*)(fb_StrConcat( vr$712, vr$710, (integer)-1, (char*)" = ", (integer)4 ));
				#define vr$714 ((string*)(&TMP$131$))
				__builtin_memset( vr$714, 0, (integer)12 );
				#define vr$715 ((string*)(&TMP$131$))
				string* vr$716 = (string*)(fb_StrConcat( vr$715, vr$713, (integer)-1, vr$692, (integer)-1 ));
				#define vr$717 ((string*)(&TMP$132$))
				__builtin_memset( vr$717, 0, (integer)12 );
				#define vr$718 ((string*)(&TMP$132$))
				string* vr$719 = (string*)(fb_StrConcat( vr$718, vr$716, (integer)-1, (char*)" (", (integer)3 ));
				#define vr$720 ((string*)(&TMP$133$))
				__builtin_memset( vr$720, 0, (integer)12 );
				#define vr$721 ((string*)(&TMP$133$))
				string* vr$722 = (string*)(fb_StrConcat( vr$721, vr$719, (integer)-1, vr$690, (integer)-1 ));
				#define vr$723 ((string*)(&TMP$134$))
				__builtin_memset( vr$723, 0, (integer)12 );
				#define vr$724 ((string*)(&TMP$134$))
				string* vr$725 = (string*)(fb_StrConcat( vr$724, vr$722, (integer)-1, (char*)"ms|", (integer)4 ));
				#define vr$726 ((string*)(&TMP$135$))
				__builtin_memset( vr$726, 0, (integer)12 );
				#define vr$727 ((string*)(&TMP$135$))
				string* vr$728 = (string*)(fb_StrConcat( vr$727, vr$725, (integer)-1, vr$686, (integer)-1 ));
				#define vr$729 ((string*)(&TMP$136$))
				__builtin_memset( vr$729, 0, (integer)12 );
				#define vr$730 ((string*)(&TMP$136$))
				string* vr$731 = (string*)(fb_StrConcat( vr$730, vr$728, (integer)-1, (char*)"s)", (integer)3 ));
				#define vr$732 ((string*)(&STEXT$))
				#define vr$733 ((string*)(&TMP$137$))
				__builtin_memset( vr$733, 0, (integer)12 );
				#define vr$734 ((string*)(&TMP$137$))
				string* vr$735 = (string*)(fb_StrConcat( vr$734, vr$732, (integer)-1, vr$731, (integer)-1 ));
				#define vr$736 ((string*)(&STEXT$))
				fb_StrAssign( vr$736, (integer)-1, vr$735, (integer)-1, (integer)0 );
				#define vr$737 ((void**)(TMP$110$))
				fb_MutexUnlock( *(void**)((ubyte *)vr$737 + 26152) );
			};
			label$203:;
			#define vr$738 ((integer)(CNT$ + (integer)1))
			CNT$ = (vr$738);
			label$202:;
			if (CNT$ <= (integer)1) goto label$205;
			label$204:;
		};
		#define vr$739 ((string*)(&STEXT$))
		fb_GfxSetWindowTitle( vr$739 );
		fb_SleepEx( (integer)200, (integer)1 );
		if (ALLDONE$ <= (integer)1) goto label$225;
		#define vr$740 ((string*)(&STEXT$))
		fb_StrDelete( vr$740 );
		goto label$201;
		label$225:;
		#define vr$741 ((string*)(&STEXT$))
		fb_StrDelete( vr$741 );
	};
	goto label$200;
	label$201:;
	IHALT$ = ((integer)1);
	{
		integer CNT$;
		CNT$ = ((integer)0);
		label$229:;
		{
			#define vr$742 ((integer)(CNT$ * (integer)26200))
			if (*(void**)((ubyte *)&TPICS$ + vr$742 + 26156) == (void*)0) goto label$231;
			{
				#define vr$743 ((integer)(CNT$ * (integer)26200))
				fb_ThreadWait( *(void**)((ubyte *)&TPICS$ + vr$743 + 26156) );
			};
			label$231:;
			label$230:;
		};
		label$227:;
		#define vr$744 ((integer)(CNT$ + (integer)1))
		CNT$ = (vr$744);
		label$226:;
		if (CNT$ <= (integer)1) goto label$229;
		label$228:;
	};
	printf( (char*)"done!\n" );
	fb_Sleep( (integer)-1 );
	#define vr$745 ((__FB_ARRAYDESC$*)(&*(__FB_ARRAYDESC$*)(&tmp$92$)))
	#define vr$746 ((void*)(vr$745))
	fb_ArrayClearObj( vr$746, &_ZN13PICTURESTRUCTC1Ev, &_ZN13PICTURESTRUCTD1Ev, (integer)0 );
	#define vr$747 ((string*)(&SFILE$))
	fb_StrDelete( vr$747 );
	#define vr$748 ((string*)(&SFOLD$))
	fb_StrDelete( vr$748 );
	label$1:;
}

static void _ZN13PICTURESTRUCTC1Ev( PICTURESTRUCT* THIS$ )
{
	#define vr$749 ((uinteger*)((PICTURESTRUCT*)(THIS$)))
	#define vr$750 ((uinteger*)(&*(uinteger*)((ubyte *)vr$749)))
	__builtin_memset( vr$750, 0, (integer)1024 );
	#define vr$751 ((ubyte*)((PICTURESTRUCT*)(THIS$)))
	#define vr$752 ((ubyte*)(&*(ubyte*)((ubyte *)vr$751 + 1024)))
	__builtin_memset( vr$752, 0, (integer)256 );
	#define vr$753 ((ubyte*)((PICTURESTRUCT*)(THIS$)))
	#define vr$754 ((ubyte*)(&*(ubyte*)((ubyte *)vr$753 + 1280)))
	__builtin_memset( vr$754, 0, (integer)256 );
	#define vr$755 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$756 ((integer*)(&*(integer*)((ubyte *)vr$755 + 1536)))
	__builtin_memset( vr$756, 0, (integer)16384 );
	#define vr$757 ((short*)((PICTURESTRUCT*)(THIS$)))
	#define vr$758 ((short*)(&*(short*)((ubyte *)vr$757 + 17920)))
	__builtin_memset( vr$758, 0, (integer)8192 );
	#define vr$759 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	#define vr$760 ((FB$IMAGE**)(&*(FB$IMAGE**)((ubyte *)vr$759 + 26112)))
	__builtin_memset( vr$760, 0, (integer)4 );
	#define vr$761 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	#define vr$762 ((FB$IMAGE**)(&*(FB$IMAGE**)((ubyte *)vr$761 + 26116)))
	__builtin_memset( vr$762, 0, (integer)4 );
	#define vr$763 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	#define vr$764 ((FB$IMAGE**)(&*(FB$IMAGE**)((ubyte *)vr$763 + 26120)))
	__builtin_memset( vr$764, 0, (integer)4 );
	#define vr$765 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$766 ((integer*)(&*(integer*)((ubyte *)vr$765 + 26124)))
	__builtin_memset( vr$766, 0, (integer)4 );
	#define vr$767 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$768 ((integer*)(&*(integer*)((ubyte *)vr$767 + 26128)))
	__builtin_memset( vr$768, 0, (integer)4 );
	#define vr$769 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$770 ((integer*)(&*(integer*)((ubyte *)vr$769 + 26132)))
	__builtin_memset( vr$770, 0, (integer)4 );
	#define vr$771 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$772 ((integer*)(&*(integer*)((ubyte *)vr$771 + 26136)))
	__builtin_memset( vr$772, 0, (integer)4 );
	#define vr$773 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$774 ((integer*)(&*(integer*)((ubyte *)vr$773 + 26140)))
	__builtin_memset( vr$774, 0, (integer)4 );
	#define vr$775 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$776 ((integer*)(&*(integer*)((ubyte *)vr$775 + 26144)))
	__builtin_memset( vr$776, 0, (integer)4 );
	#define vr$777 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$778 ((integer*)(&*(integer*)((ubyte *)vr$777 + 26148)))
	__builtin_memset( vr$778, 0, (integer)4 );
	#define vr$779 ((void**)((PICTURESTRUCT*)(THIS$)))
	#define vr$780 ((void**)(&*(void**)((ubyte *)vr$779 + 26152)))
	__builtin_memset( vr$780, 0, (integer)4 );
	#define vr$781 ((void**)((PICTURESTRUCT*)(THIS$)))
	#define vr$782 ((void**)(&*(void**)((ubyte *)vr$781 + 26156)))
	__builtin_memset( vr$782, 0, (integer)4 );
	#define vr$783 ((double*)((PICTURESTRUCT*)(THIS$)))
	#define vr$784 ((double*)(&*(double*)((ubyte *)vr$783 + 26160)))
	__builtin_memset( vr$784, 0, (integer)8 );
	#define vr$785 ((double*)((PICTURESTRUCT*)(THIS$)))
	#define vr$786 ((double*)(&*(double*)((ubyte *)vr$785 + 26168)))
	__builtin_memset( vr$786, 0, (integer)8 );
	#define vr$787 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$788 ((string*)(&*(string*)((ubyte *)vr$787 + 26176)))
	__builtin_memset( vr$788, 0, (integer)12 );
	#define vr$789 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$790 ((string*)(&*(string*)((ubyte *)vr$789 + 26188)))
	__builtin_memset( vr$790, 0, (integer)12 );
	label$2:;
	label$3:;
}

static void _ZN13PICTURESTRUCTaSERS_( PICTURESTRUCT* THIS$, PICTURESTRUCT* __FB_RHS__$ )
{
	integer TMP$64$;
	ubyte* TMP$65$;
	ubyte* TMP$66$;
	integer TMP$67$;
	ubyte* TMP$68$;
	ubyte* TMP$69$;
	integer TMP$70$;
	integer* TMP$71$;
	integer* TMP$72$;
	integer TMP$73$;
	short* TMP$74$;
	short* TMP$75$;
	label$4:;
	#define vr$791 ((uinteger*)((PICTURESTRUCT*)(THIS$)))
	#define vr$792 ((uinteger*)(&*(uinteger*)((ubyte *)vr$791)))
	#define vr$793 ((uinteger*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$794 ((uinteger*)(&*(uinteger*)((ubyte *)vr$793)))
	__builtin_memcpy( vr$792, vr$794, 1024 );
	#define vr$795 ((ubyte*)((PICTURESTRUCT*)(THIS$)))
	#define vr$796 ((ubyte*)(&*(ubyte*)((ubyte *)vr$795 + 1024)))
	TMP$65$ = (vr$796);
	#define vr$797 ((ubyte*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$798 ((ubyte*)(&*(ubyte*)((ubyte *)vr$797 + 1024)))
	TMP$66$ = (vr$798);
	TMP$64$ = ((integer)0);
	label$6:;
	#define vr$799 ((ubyte*)(TMP$66$))
	#define vr$800 ((ubyte*)(TMP$65$))
	*(ubyte*)((ubyte *)vr$800) = (*(ubyte*)((ubyte *)vr$799));
	#define vr$801 ((ubyte*)((ubyte*)((ubyte *)TMP$65$ + (integer)1)))
	TMP$65$ = (vr$801);
	#define vr$802 ((ubyte*)((ubyte*)((ubyte *)TMP$66$ + (integer)1)))
	TMP$66$ = (vr$802);
	#define vr$803 ((integer)(TMP$64$ + (integer)1))
	TMP$64$ = (vr$803);
	if (TMP$64$ != (integer)256) goto label$6;
	#define vr$804 ((ubyte*)((PICTURESTRUCT*)(THIS$)))
	#define vr$805 ((ubyte*)(&*(ubyte*)((ubyte *)vr$804 + 1280)))
	TMP$68$ = (vr$805);
	#define vr$806 ((ubyte*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$807 ((ubyte*)(&*(ubyte*)((ubyte *)vr$806 + 1280)))
	TMP$69$ = (vr$807);
	TMP$67$ = ((integer)0);
	label$7:;
	#define vr$808 ((ubyte*)(TMP$69$))
	#define vr$809 ((ubyte*)(TMP$68$))
	*(ubyte*)((ubyte *)vr$809) = (*(ubyte*)((ubyte *)vr$808));
	#define vr$810 ((ubyte*)((ubyte*)((ubyte *)TMP$68$ + (integer)1)))
	TMP$68$ = (vr$810);
	#define vr$811 ((ubyte*)((ubyte*)((ubyte *)TMP$69$ + (integer)1)))
	TMP$69$ = (vr$811);
	#define vr$812 ((integer)(TMP$67$ + (integer)1))
	TMP$67$ = (vr$812);
	if (TMP$67$ != (integer)256) goto label$7;
	#define vr$813 ((integer*)((PICTURESTRUCT*)(THIS$)))
	#define vr$814 ((integer*)(&*(integer*)((ubyte *)vr$813 + 1536)))
	TMP$71$ = (vr$814);
	#define vr$815 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$816 ((integer*)(&*(integer*)((ubyte *)vr$815 + 1536)))
	TMP$72$ = (vr$816);
	TMP$70$ = ((integer)0);
	label$8:;
	#define vr$817 ((integer*)(TMP$72$))
	#define vr$818 ((integer*)(TMP$71$))
	*(integer*)((ubyte *)vr$818) = (*(integer*)((ubyte *)vr$817));
	#define vr$819 ((integer*)((integer*)((ubyte *)TMP$71$ + (integer)4)))
	TMP$71$ = (vr$819);
	#define vr$820 ((integer*)((integer*)((ubyte *)TMP$72$ + (integer)4)))
	TMP$72$ = (vr$820);
	#define vr$821 ((integer)(TMP$70$ + (integer)1))
	TMP$70$ = (vr$821);
	if (TMP$70$ != (integer)4096) goto label$8;
	#define vr$822 ((short*)((PICTURESTRUCT*)(THIS$)))
	#define vr$823 ((short*)(&*(short*)((ubyte *)vr$822 + 17920)))
	TMP$74$ = (vr$823);
	#define vr$824 ((short*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$825 ((short*)(&*(short*)((ubyte *)vr$824 + 17920)))
	TMP$75$ = (vr$825);
	TMP$73$ = ((integer)0);
	label$9:;
	#define vr$826 ((short*)(TMP$75$))
	#define vr$827 ((short*)(TMP$74$))
	*(short*)((ubyte *)vr$827) = (*(short*)((ubyte *)vr$826));
	#define vr$828 ((short*)((short*)((ubyte *)TMP$74$ + (integer)2)))
	TMP$74$ = (vr$828);
	#define vr$829 ((short*)((short*)((ubyte *)TMP$75$ + (integer)2)))
	TMP$75$ = (vr$829);
	#define vr$830 ((integer)(TMP$73$ + (integer)1))
	TMP$73$ = (vr$830);
	if (TMP$73$ != (integer)4096) goto label$9;
	#define vr$831 ((FB$IMAGE**)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$832 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	*(FB$IMAGE**)((ubyte *)vr$832 + 26112) = (*(FB$IMAGE**)((ubyte *)vr$831 + 26112));
	#define vr$833 ((FB$IMAGE**)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$834 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	*(FB$IMAGE**)((ubyte *)vr$834 + 26116) = (*(FB$IMAGE**)((ubyte *)vr$833 + 26116));
	#define vr$835 ((FB$IMAGE**)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$836 ((FB$IMAGE**)((PICTURESTRUCT*)(THIS$)))
	*(FB$IMAGE**)((ubyte *)vr$836 + 26120) = (*(FB$IMAGE**)((ubyte *)vr$835 + 26120));
	#define vr$837 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$838 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$838 + 26124) = (*(integer*)((ubyte *)vr$837 + 26124));
	#define vr$839 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$840 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$840 + 26128) = (*(integer*)((ubyte *)vr$839 + 26128));
	#define vr$841 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$842 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$842 + 26132) = (*(integer*)((ubyte *)vr$841 + 26132));
	#define vr$843 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$844 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$844 + 26136) = (*(integer*)((ubyte *)vr$843 + 26136));
	#define vr$845 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$846 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$846 + 26140) = (*(integer*)((ubyte *)vr$845 + 26140));
	#define vr$847 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$848 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$848 + 26144) = (*(integer*)((ubyte *)vr$847 + 26144));
	#define vr$849 ((integer*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$850 ((integer*)((PICTURESTRUCT*)(THIS$)))
	*(integer*)((ubyte *)vr$850 + 26148) = (*(integer*)((ubyte *)vr$849 + 26148));
	#define vr$851 ((void**)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$852 ((void**)((PICTURESTRUCT*)(THIS$)))
	*(void**)((ubyte *)vr$852 + 26152) = (*(void**)((ubyte *)vr$851 + 26152));
	#define vr$853 ((void**)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$854 ((void**)((PICTURESTRUCT*)(THIS$)))
	*(void**)((ubyte *)vr$854 + 26156) = (*(void**)((ubyte *)vr$853 + 26156));
	#define vr$855 ((double*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$856 ((double*)((PICTURESTRUCT*)(THIS$)))
	*(double*)((ubyte *)vr$856 + 26160) = (*(double*)((ubyte *)vr$855 + 26160));
	#define vr$857 ((double*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$858 ((double*)((PICTURESTRUCT*)(THIS$)))
	*(double*)((ubyte *)vr$858 + 26168) = (*(double*)((ubyte *)vr$857 + 26168));
	#define vr$859 ((string*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$860 ((string*)(&*(string*)((ubyte *)vr$859 + 26176)))
	#define vr$861 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$862 ((string*)(&*(string*)((ubyte *)vr$861 + 26176)))
	fb_StrAssign( vr$862, (integer)-1, vr$860, (integer)-1, (integer)0 );
	#define vr$863 ((string*)((PICTURESTRUCT*)(__FB_RHS__$)))
	#define vr$864 ((string*)(&*(string*)((ubyte *)vr$863 + 26188)))
	#define vr$865 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$866 ((string*)(&*(string*)((ubyte *)vr$865 + 26188)))
	fb_StrAssign( vr$866, (integer)-1, vr$864, (integer)-1, (integer)0 );
	label$5:;
}

static void _ZN13PICTURESTRUCTD1Ev( PICTURESTRUCT* THIS$ )
{
	label$12:;
	label$13:;
	#define vr$867 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$868 ((string*)(&*(string*)((ubyte *)vr$867 + 26188)))
	fb_StrDelete( vr$868 );
	#define vr$869 ((string*)((PICTURESTRUCT*)(THIS$)))
	#define vr$870 ((string*)(&*(string*)((ubyte *)vr$869 + 26176)))
	fb_StrDelete( vr$870 );
}
// Total compilation time: 0.1108636620414814 seconds. 
