	format	MS COFF
	extrn	___bb_blitz_blitz
	extrn	___bb_linkedlist_linkedlist
	extrn	___bb_max2d_image
	extrn	___bb_max2d_imagefont
	extrn	___bb_polledinput_polledinput
	extrn	__brl_graphics_TGraphics_Delete
	extrn	__brl_graphics_TGraphics_New
	extrn	__brl_graphics_TGraphics__pad
	extrn	_bbArrayNew1D
	extrn	_bbArraySlice
	extrn	_bbCos
	extrn	_bbEmptyArray
	extrn	_bbFloatMax
	extrn	_bbFloatMin
	extrn	_bbFloatToInt
	extrn	_bbFloor
	extrn	_bbGCFree
	extrn	_bbMemClear
	extrn	_bbMemCopy
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectDowncast
	extrn	_bbObjectFree
	extrn	_bbObjectNew
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbSin
	extrn	_brl_graphics_Flip
	extrn	_brl_graphics_GraphicsHeight
	extrn	_brl_graphics_GraphicsWidth
	extrn	_brl_graphics_TGraphics
	extrn	_brl_linkedlist_TList
	extrn	_brl_max2d_TImage
	extrn	_brl_max2d_TImageFont
	extrn	_brl_max2d__max2dDriver
	extrn	_brl_pixmap_AlphaBitsPerPixel
	extrn	_brl_pixmap_MaskPixmap
	extrn	_brl_polledinput_MouseX
	extrn	_brl_polledinput_MouseXSpeed
	extrn	_brl_polledinput_MouseY
	extrn	_brl_polledinput_MouseYSpeed
	extrn	_brl_system_MoveMouse
	public	___bb_max2d_max2d
	public	__brl_max2d_TMax2DGraphics_ClearCurrent
	public	__brl_max2d_TMax2DGraphics_Close
	public	__brl_max2d_TMax2DGraphics_Create
	public	__brl_max2d_TMax2DGraphics_Current
	public	__brl_max2d_TMax2DGraphics_Delete
	public	__brl_max2d_TMax2DGraphics_Driver
	public	__brl_max2d_TMax2DGraphics_GetSettings
	public	__brl_max2d_TMax2DGraphics_MakeCurrent
	public	__brl_max2d_TMax2DGraphics_New
	public	__brl_max2d_TMax2DGraphics_Validate
	public	__brl_max2d_TMax2DGraphics_auto_imageflags
	public	__brl_max2d_TMax2DGraphics_auto_midhandle
	public	__brl_max2d_TMax2DGraphics_default_font
	public	__brl_max2d_TMax2DGraphics_mask_blue
	public	__brl_max2d_TMax2DGraphics_mask_green
	public	__brl_max2d_TMax2DGraphics_mask_red
	public	__brl_max2d_TQuad_Delete
	public	__brl_max2d_TQuad_New
	public	__brl_max2d_TQuad_SetCoords
	public	__brl_max2d_rpoly_Delete
	public	__brl_max2d_rpoly_New
	public	_brl_max2d_AutoImageFlags
	public	_brl_max2d_AutoMidHandle
	public	_brl_max2d_Cls
	public	_brl_max2d_CollideImage
	public	_brl_max2d_CollideRect
	public	_brl_max2d_CreateImage
	public	_brl_max2d_DrawImage
	public	_brl_max2d_DrawImageRect
	public	_brl_max2d_DrawLine
	public	_brl_max2d_DrawOval
	public	_brl_max2d_DrawPixmap
	public	_brl_max2d_DrawPoly
	public	_brl_max2d_DrawRect
	public	_brl_max2d_DrawSubImageRect
	public	_brl_max2d_DrawText
	public	_brl_max2d_GetAlpha
	public	_brl_max2d_GetBlend
	public	_brl_max2d_GetClsColor
	public	_brl_max2d_GetColor
	public	_brl_max2d_GetHandle
	public	_brl_max2d_GetImageFont
	public	_brl_max2d_GetLineWidth
	public	_brl_max2d_GetMaskColor
	public	_brl_max2d_GetOrigin
	public	_brl_max2d_GetRotation
	public	_brl_max2d_GetScale
	public	_brl_max2d_GetViewport
	public	_brl_max2d_GrabImage
	public	_brl_max2d_GrabPixmap
	public	_brl_max2d_ImageHeight
	public	_brl_max2d_ImageWidth
	public	_brl_max2d_ImagesCollide
	public	_brl_max2d_ImagesCollide2
	public	_brl_max2d_LoadAnimImage
	public	_brl_max2d_LoadImage
	public	_brl_max2d_LoadImageFont
	public	_brl_max2d_LockImage
	public	_brl_max2d_MidHandleImage
	public	_brl_max2d_MoveVirtualMouse
	public	_brl_max2d_Plot
	public	_brl_max2d_ResetCollisions
	public	_brl_max2d_SetAlpha
	public	_brl_max2d_SetBlend
	public	_brl_max2d_SetClsColor
	public	_brl_max2d_SetColor
	public	_brl_max2d_SetHandle
	public	_brl_max2d_SetImageFont
	public	_brl_max2d_SetImageHandle
	public	_brl_max2d_SetLineWidth
	public	_brl_max2d_SetMaskColor
	public	_brl_max2d_SetOrigin
	public	_brl_max2d_SetRotation
	public	_brl_max2d_SetScale
	public	_brl_max2d_SetTransform
	public	_brl_max2d_SetViewport
	public	_brl_max2d_SetVirtualResolution
	public	_brl_max2d_TMax2DGraphics
	public	_brl_max2d_TextHeight
	public	_brl_max2d_TextWidth
	public	_brl_max2d_TileImage
	public	_brl_max2d_UnlockImage
	public	_brl_max2d_VirtualMouseX
	public	_brl_max2d_VirtualMouseXSpeed
	public	_brl_max2d_VirtualMouseY
	public	_brl_max2d_VirtualMouseYSpeed
	public	_brl_max2d_VirtualResolutionHeight
	public	_brl_max2d_VirtualResolutionWidth
	section	"code" code
___bb_max2d_max2d:
	push	ebp
	mov	ebp,esp
	cmp	dword [_602],0
	je	_603
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_603:
	mov	dword [_602],1
	call	___bb_blitz_blitz
	call	___bb_polledinput_polledinput
	call	___bb_linkedlist_linkedlist
	call	___bb_max2d_image
	call	___bb_max2d_imagefont
	push	_brl_max2d_TMax2DGraphics
	call	_bbObjectRegisterType
	add	esp,4
	push	_32
	call	_bbObjectRegisterType
	add	esp,4
	push	_74
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,dword [_599]
	and	eax,1
	cmp	eax,0
	jne	_600
	push	32
	push	_596
	call	_bbArrayNew1D
	add	esp,8
	inc	dword [eax+4]
	mov	dword [_597],eax
	or	dword [_599],1
_600:
	mov	eax,0
	jmp	_175
_175:
	mov	esp,ebp
	pop	ebp
	ret
_3:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	mov	eax,dword [_589]
	fld	dword [eax+40]
	sub	esp,8
	fstp	qword [esp]
	call	_bbSin
	add	esp,8
	fstp	dword [ebp-4]
	mov	eax,dword [_589]
	fld	dword [eax+40]
	sub	esp,8
	fstp	qword [esp]
	call	_bbCos
	add	esp,8
	mov	edx,dword [_589]
	fld	st0
	mov	eax,dword [_589]
	fmul	dword [eax+44]
	fstp	dword [edx+52]
	mov	edx,dword [_589]
	fld	dword [ebp-4]
	fchs
	mov	eax,dword [_589]
	fmul	dword [eax+48]
	fstp	dword [edx+56]
	mov	edx,dword [_589]
	fld	dword [ebp-4]
	mov	eax,dword [_589]
	fmul	dword [eax+44]
	fstp	dword [edx+60]
	mov	edx,dword [_589]
	mov	eax,dword [_589]
	fmul	dword [eax+48]
	fstp	dword [edx+64]
	mov	edx,dword [_brl_max2d__max2dDriver]
	mov	eax,dword [_589]
	push	dword [eax+64]
	mov	eax,dword [_589]
	push	dword [eax+60]
	mov	eax,dword [_589]
	push	dword [eax+56]
	mov	eax,dword [_589]
	push	dword [eax+52]
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+92]
	add	esp,20
	mov	eax,dword [_589]
	push	dword [eax+64]
	mov	eax,dword [_589]
	push	dword [eax+60]
	mov	eax,dword [_589]
	push	dword [eax+56]
	mov	eax,dword [_589]
	push	dword [eax+52]
	call	_20
	add	esp,16
	mov	eax,0
	jmp	_177
_177:
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	__brl_graphics_TGraphics_New
	add	esp,4
	mov	dword [ebx],_brl_max2d_TMax2DGraphics
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	dword [ebx+16],0
	fldz
	fstp	dword [ebx+20]
	mov	dword [ebx+24],0
	mov	dword [ebx+28],0
	mov	dword [ebx+32],0
	fldz
	fstp	dword [ebx+36]
	fldz
	fstp	dword [ebx+40]
	fldz
	fstp	dword [ebx+44]
	fldz
	fstp	dword [ebx+48]
	fldz
	fstp	dword [ebx+52]
	fldz
	fstp	dword [ebx+56]
	fldz
	fstp	dword [ebx+60]
	fldz
	fstp	dword [ebx+64]
	mov	dword [ebx+68],0
	mov	dword [ebx+72],0
	mov	dword [ebx+76],0
	mov	dword [ebx+80],0
	fldz
	fstp	dword [ebx+84]
	fldz
	fstp	dword [ebx+88]
	fldz
	fstp	dword [ebx+92]
	fldz
	fstp	dword [ebx+96]
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+100],eax
	mov	dword [ebx+104],0
	fldz
	fstp	dword [ebx+108]
	fldz
	fstp	dword [ebx+112]
	fldz
	fstp	dword [ebx+116]
	fldz
	fstp	dword [ebx+120]
	mov	dword [ebx+124],0
	mov	dword [ebx+128],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+132],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+136],eax
	mov	dword [ebx+140],0
	mov	eax,0
	jmp	_180
_180:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_183:
	mov	eax,dword [ebx+136]
	dec	dword [eax+4]
	jnz	_612
	push	eax
	call	_bbGCFree
	add	esp,4
_612:
	mov	eax,dword [ebx+132]
	dec	dword [eax+4]
	jnz	_614
	push	eax
	call	_bbGCFree
	add	esp,4
_614:
	mov	eax,dword [ebx+100]
	dec	dword [eax+4]
	jnz	_616
	push	eax
	call	_bbGCFree
	add	esp,4
_616:
	mov	dword [ebx],_brl_graphics_TGraphics
	push	ebx
	call	__brl_graphics_TGraphics_Delete
	add	esp,4
	mov	eax,0
	jmp	_610
_610:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Driver:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+136]
	jmp	_186
_186:
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_GetSettings:
	push	ebp
	mov	ebp,esp
	sub	esp,20
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	mov	esi,dword [ebp+12]
	mov	ebx,dword [ebp+16]
	mov	edi,dword [ebp+20]
	mov	dword [ebp-4],0
	mov	dword [ebp-8],0
	mov	dword [ebp-12],0
	mov	dword [ebp-16],0
	mov	dword [ebp-20],0
	mov	eax,dword [eax+132]
	lea	edx,dword [ebp-20]
	push	edx
	lea	edx,dword [ebp-16]
	push	edx
	lea	edx,dword [ebp-12]
	push	edx
	lea	edx,dword [ebp-8]
	push	edx
	lea	edx,dword [ebp-4]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	mov	eax,dword [ebp-4]
	mov	dword [esi],eax
	mov	eax,dword [ebp-8]
	mov	dword [ebx],eax
	mov	eax,dword [ebp-12]
	mov	dword [edi],eax
	mov	edx,dword [ebp-16]
	mov	eax,dword [ebp+24]
	mov	dword [eax],edx
	mov	edx,dword [ebp-20]
	mov	eax,dword [ebp+28]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_194
_194:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Close:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	mov	eax,dword [esi+132]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_623
	mov	eax,0
	jmp	_197
_623:
	mov	eax,dword [esi+132]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,4
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [esi+132]
	dec	dword [eax+4]
	jnz	_628
	push	eax
	call	_bbGCFree
	add	esp,4
_628:
	mov	dword [esi+132],ebx
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [esi+136]
	dec	dword [eax+4]
	jnz	_632
	push	eax
	call	_bbGCFree
	add	esp,4
_632:
	mov	dword [esi+136],ebx
	mov	eax,0
	jmp	_197
_197:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Validate:
	push	ebp
	mov	ebp,esp
	sub	esp,24
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	dword [ebp-4],0
	mov	dword [ebp-8],0
	mov	dword [ebp-12],0
	mov	dword [ebp-16],0
	mov	dword [ebp-20],0
	mov	eax,dword [ebx+132]
	lea	edx,dword [ebp-20]
	push	edx
	lea	edx,dword [ebp-16]
	push	edx
	lea	edx,dword [ebp-12]
	push	edx
	lea	edx,dword [ebp-8]
	push	edx
	lea	edx,dword [ebp-4]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	mov	eax,dword [ebp-4]
	cmp	eax,dword [ebx+124]
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_639
	mov	eax,dword [ebp-8]
	cmp	eax,dword [ebx+128]
	setne	al
	movzx	eax,al
_639:
	cmp	eax,0
	je	_641
	mov	eax,dword [ebp-4]
	mov	dword [ebx+124],eax
	mov	eax,dword [ebp-8]
	mov	dword [ebx+128],eax
	mov	eax,dword [ebp-4]
	mov	dword [ebp+-24],eax
	fild	dword [ebp+-24]
	fstp	dword [ebx+108]
	mov	eax,dword [ebp-8]
	mov	dword [ebp+-24],eax
	fild	dword [ebp+-24]
	fstp	dword [ebx+112]
	fld1
	fstp	dword [ebx+116]
	fld1
	fstp	dword [ebx+120]
_641:
	push	dword [ebx+112]
	push	dword [ebx+108]
	call	_brl_max2d_SetVirtualResolution
	add	esp,8
	push	dword [ebx+104]
	call	_brl_max2d_SetBlend
	add	esp,4
	push	dword [ebx+16]
	push	dword [ebx+12]
	push	dword [ebx+8]
	call	_brl_max2d_SetColor
	add	esp,12
	push	dword [ebx+20]
	call	_brl_max2d_SetAlpha
	add	esp,4
	push	dword [ebx+32]
	push	dword [ebx+28]
	push	dword [ebx+24]
	call	_brl_max2d_SetClsColor
	add	esp,12
	push	dword [ebx+36]
	call	_brl_max2d_SetLineWidth
	add	esp,4
	push	dword [ebx+40]
	call	_brl_max2d_SetRotation
	add	esp,4
	push	dword [ebx+48]
	push	dword [ebx+44]
	call	_brl_max2d_SetScale
	add	esp,8
	push	dword [ebx+80]
	push	dword [ebx+76]
	push	dword [ebx+72]
	push	dword [ebx+68]
	call	_brl_max2d_SetViewport
	add	esp,16
	push	dword [ebx+88]
	push	dword [ebx+84]
	call	_brl_max2d_SetOrigin
	add	esp,8
	fld	dword [ebx+96]
	fchs
	sub	esp,4
	fstp	dword [esp]
	fld	dword [ebx+92]
	fchs
	sub	esp,4
	fstp	dword [esp]
	call	_brl_max2d_SetHandle
	add	esp,8
	push	dword [ebx+100]
	call	_brl_max2d_SetImageFont
	add	esp,4
	mov	eax,0
	jmp	_200
_200:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_MakeCurrent:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	ebx,dword [ebp+8]
	inc	dword [ebx+4]
	mov	esi,ebx
	mov	eax,dword [_589]
	dec	dword [eax+4]
	jnz	_645
	push	eax
	call	_bbGCFree
	add	esp,4
_645:
	mov	dword [_589],esi
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,4
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [_brl_max2d__max2dDriver]
	dec	dword [eax+4]
	jnz	_650
	push	eax
	call	_bbGCFree
	add	esp,4
_650:
	mov	dword [_brl_max2d__max2dDriver],esi
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+64]
	add	esp,4
	cmp	dword [ebx+140],0
	je	_652
	mov	eax,0
	jmp	_203
_652:
	call	_brl_max2d_Cls
	push	0
	call	_brl_graphics_Flip
	add	esp,4
	call	_brl_max2d_Cls
	push	0
	call	_brl_graphics_Flip
	add	esp,4
	mov	dword [ebx+140],1
	mov	eax,0
	jmp	_203
_203:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_ClearCurrent:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_589]
	dec	dword [eax+4]
	jnz	_656
	push	eax
	call	_bbGCFree
	add	esp,4
_656:
	mov	dword [_589],ebx
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_brl_max2d__max2dDriver]
	dec	dword [eax+4]
	jnz	_660
	push	eax
	call	_bbGCFree
	add	esp,4
_660:
	mov	dword [_brl_max2d__max2dDriver],ebx
	mov	eax,0
	jmp	_205
_205:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Current:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	jmp	_207
_207:
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TMax2DGraphics_Create:
	push	ebp
	mov	ebp,esp
	sub	esp,24
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	dword [ebp-4],0
	mov	dword [ebp-8],0
	mov	dword [ebp-12],0
	mov	dword [ebp-16],0
	mov	dword [ebp-20],0
	mov	eax,edi
	lea	edx,dword [ebp-20]
	push	edx
	lea	edx,dword [ebp-16]
	push	edx
	lea	edx,dword [ebp-12]
	push	edx
	lea	edx,dword [ebp-8]
	push	edx
	lea	edx,dword [ebp-4]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,24
	mov	eax,dword [__brl_max2d_TMax2DGraphics_default_font]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_667
	call	dword [_brl_max2d_TImageFont+76]
	mov	ebx,eax
	inc	dword [ebx+4]
	mov	eax,dword [__brl_max2d_TMax2DGraphics_default_font]
	dec	dword [eax+4]
	jnz	_671
	push	eax
	call	_bbGCFree
	add	esp,4
_671:
	mov	dword [__brl_max2d_TMax2DGraphics_default_font],ebx
_667:
	push	_brl_max2d_TMax2DGraphics
	call	_bbObjectNew
	add	esp,4
	mov	esi,eax
	mov	eax,dword [ebp-4]
	mov	dword [esi+124],eax
	mov	eax,dword [ebp-8]
	mov	dword [esi+128],eax
	mov	dword [esi+104],1
	mov	dword [esi+8],255
	mov	dword [esi+12],255
	mov	dword [esi+16],255
	fld1
	fstp	dword [esi+20]
	mov	dword [esi+24],0
	mov	dword [esi+28],0
	mov	dword [esi+32],0
	fld1
	fstp	dword [esi+36]
	fldz
	fstp	dword [esi+40]
	fld1
	fstp	dword [esi+44]
	fld1
	fstp	dword [esi+48]
	fld1
	fstp	dword [esi+52]
	fldz
	fstp	dword [esi+56]
	fld1
	fstp	dword [esi+60]
	fldz
	fstp	dword [esi+64]
	mov	dword [esi+68],0
	mov	dword [esi+72],0
	mov	eax,dword [ebp-4]
	mov	dword [esi+76],eax
	mov	eax,dword [ebp-8]
	mov	dword [esi+80],eax
	fldz
	fstp	dword [esi+84]
	fldz
	fstp	dword [esi+88]
	fldz
	fstp	dword [esi+92]
	fldz
	fstp	dword [esi+96]
	mov	eax,dword [__brl_max2d_TMax2DGraphics_default_font]
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+100]
	dec	dword [eax+4]
	jnz	_676
	push	eax
	call	_bbGCFree
	add	esp,4
_676:
	mov	dword [esi+100],ebx
	mov	eax,dword [ebp-4]
	mov	dword [ebp+-24],eax
	fild	dword [ebp+-24]
	fstp	dword [esi+108]
	mov	eax,dword [ebp-8]
	mov	dword [ebp+-24],eax
	fild	dword [ebp+-24]
	fstp	dword [esi+112]
	fld1
	fstp	dword [esi+116]
	fld1
	fstp	dword [esi+120]
	mov	ebx,edi
	inc	dword [ebx+4]
	mov	eax,dword [esi+132]
	dec	dword [eax+4]
	jnz	_680
	push	eax
	call	_bbGCFree
	add	esp,4
_680:
	mov	dword [esi+132],ebx
	mov	ebx,dword [ebp+12]
	inc	dword [ebx+4]
	mov	eax,dword [esi+136]
	dec	dword [eax+4]
	jnz	_684
	push	eax
	call	_bbGCFree
	add	esp,4
_684:
	mov	dword [esi+136],ebx
	mov	dword [esi+140],0
	mov	eax,esi
	jmp	_211
_211:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_Cls:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+100]
	add	esp,4
	mov	eax,0
	jmp	_213
_213:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetClsColor:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	ebx,dword [_589]
	mov	dword [ebx+24],ecx
	mov	ebx,dword [_589]
	mov	dword [ebx+28],edx
	mov	ebx,dword [_589]
	mov	dword [ebx+32],eax
	mov	ebx,dword [_brl_max2d__max2dDriver]
	push	eax
	push	edx
	push	ecx
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+84]
	add	esp,16
	mov	eax,0
	jmp	_218
_218:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetClsColor:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	ecx,dword [_589]
	mov	ecx,dword [ecx+24]
	mov	dword [ebx],ecx
	mov	ecx,dword [_589]
	mov	ecx,dword [ecx+28]
	mov	dword [edx],ecx
	mov	edx,dword [_589]
	mov	edx,dword [edx+32]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_223
_223:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_Plot:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	mov	edx,dword [_brl_max2d__max2dDriver]
	mov	eax,dword [_589]
	fadd	dword [eax+88]
	sub	esp,4
	fstp	dword [esp]
	mov	eax,dword [_589]
	fadd	dword [eax+84]
	sub	esp,4
	fstp	dword [esp]
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+104]
	add	esp,12
	mov	eax,0
	jmp	_227
_227:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawRect:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	fld	dword [ebp+20]
	mov	eax,dword [_brl_max2d__max2dDriver]
	mov	edx,dword [_589]
	fxch	st2
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fxch	st2
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+96]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+92]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	push	dword [edx+96]
	mov	edx,dword [_589]
	push	dword [edx+92]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+112]
	add	esp,28
	mov	eax,0
	jmp	_233
_233:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawLine:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+24]
	mov	eax,dword [_brl_max2d__max2dDriver]
	fld	dword [ebp+12]
	mov	edx,dword [_589]
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	fld	dword [ebp+8]
	mov	edx,dword [_589]
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+96]
	fadd	dword [ebp+20]
	fsub	dword [ebp+12]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+92]
	fadd	dword [ebp+16]
	fsub	dword [ebp+8]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	push	dword [edx+96]
	mov	edx,dword [_589]
	push	dword [edx+92]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+108]
	add	esp,28
	cmp	ebx,0
	jne	_690
	mov	eax,0
	jmp	_240
_690:
	mov	eax,dword [_589]
	fld	dword [eax+92]
	fadd	dword [ebp+16]
	fsub	dword [ebp+8]
	mov	eax,dword [_589]
	fld	dword [eax+96]
	fadd	dword [ebp+20]
	fsub	dword [ebp+12]
	mov	eax,dword [_brl_max2d__max2dDriver]
	fld	st1
	mov	edx,dword [_589]
	fmul	dword [edx+60]
	fld	st1
	mov	edx,dword [_589]
	fmul	dword [edx+64]
	faddp	st1,st0
	fadd	dword [ebp+12]
	mov	edx,dword [_589]
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fxch	st1
	fmul	dword [edx+52]
	mov	edx,dword [_589]
	fxch	st1
	fmul	dword [edx+56]
	faddp	st1,st0
	fadd	dword [ebp+8]
	mov	edx,dword [_589]
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+104]
	add	esp,12
	mov	eax,0
	jmp	_240
_240:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawOval:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	fld	dword [ebp+20]
	mov	eax,dword [_brl_max2d__max2dDriver]
	mov	edx,dword [_589]
	fxch	st2
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fxch	st2
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+96]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	fld	dword [edx+92]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [_589]
	push	dword [edx+96]
	mov	edx,dword [_589]
	push	dword [edx+92]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+116]
	add	esp,28
	mov	eax,0
	jmp	_246
_246:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawPoly:
	push	ebp
	mov	ebp,esp
	mov	edx,dword [ebp+8]
	mov	eax,dword [_brl_max2d__max2dDriver]
	mov	ecx,dword [_589]
	push	dword [ecx+88]
	mov	ecx,dword [_589]
	push	dword [ecx+84]
	mov	ecx,dword [_589]
	push	dword [ecx+96]
	mov	ecx,dword [_589]
	push	dword [ecx+92]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+120]
	add	esp,24
	mov	eax,0
	jmp	_249
_249:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawText:
	push	ebp
	mov	ebp,esp
	mov	edx,dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	mov	eax,dword [_589]
	mov	eax,dword [eax+100]
	mov	ecx,dword [_589]
	push	dword [ecx+64]
	mov	ecx,dword [_589]
	push	dword [ecx+60]
	mov	ecx,dword [_589]
	push	dword [ecx+56]
	mov	ecx,dword [_589]
	push	dword [ecx+52]
	mov	ecx,dword [_589]
	fadd	dword [ecx+88]
	mov	ecx,dword [_589]
	fld	dword [ecx+92]
	mov	ecx,dword [_589]
	fmul	dword [ecx+60]
	faddp	st1,st0
	mov	ecx,dword [_589]
	fld	dword [ecx+96]
	mov	ecx,dword [_589]
	fmul	dword [ecx+64]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	mov	ecx,dword [_589]
	fadd	dword [ecx+84]
	mov	ecx,dword [_589]
	fld	dword [ecx+92]
	mov	ecx,dword [_589]
	fmul	dword [ecx+52]
	faddp	st1,st0
	mov	ecx,dword [_589]
	fld	dword [ecx+96]
	mov	ecx,dword [_589]
	fmul	dword [ecx+56]
	faddp	st1,st0
	sub	esp,4
	fstp	dword [esp]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,32
	mov	eax,0
	jmp	_254
_254:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawImage:
	push	ebp
	mov	ebp,esp
	sub	esp,20
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	edx,dword [ebp+20]
	fld	dword [ebx+32]
	fchs
	fstp	dword [ebp-8]
	fld	dword [ebp-8]
	mov	eax,dword [ebx+8]
	mov	dword [ebp+-20],eax
	fild	dword [ebp+-20]
	faddp	st1,st0
	fstp	dword [ebp-12]
	fld	dword [ebx+36]
	fchs
	fstp	dword [ebp-4]
	fld	dword [ebp-4]
	mov	eax,dword [ebx+12]
	mov	dword [ebp+-20],eax
	fild	dword [ebp+-20]
	faddp	st1,st0
	fstp	dword [ebp-16]
	push	edx
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,8
	cmp	eax,_bbNullObject
	je	_703
	mov	edx,dword [ebx+12]
	mov	dword [ebp+-20],edx
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [ebx+8]
	mov	dword [ebp+-20],edx
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	push	0
	push	0
	fld	dword [ebp+16]
	mov	edx,dword [_589]
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	fld	dword [ebp+12]
	mov	edx,dword [_589]
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	push	dword [ebp-16]
	push	dword [ebp-12]
	push	dword [ebp-4]
	push	dword [ebp-8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,44
_703:
	mov	eax,0
	jmp	_260
_260:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawImageRect:
	push	ebp
	mov	ebp,esp
	sub	esp,20
	push	ebx
	mov	ebx,dword [ebp+8]
	fld	dword [ebp+20]
	fld	dword [ebp+24]
	mov	eax,dword [ebp+28]
	fld	dword [ebx+32]
	fchs
	fstp	dword [ebp-8]
	fld	dword [ebp-8]
	faddp	st2,st0
	fxch	st1
	fstp	dword [ebp-12]
	fld	dword [ebx+36]
	fchs
	fstp	dword [ebp-4]
	fld	dword [ebp-4]
	faddp	st1,st0
	fstp	dword [ebp-16]
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,8
	cmp	eax,_bbNullObject
	je	_711
	mov	edx,dword [ebx+12]
	mov	dword [ebp+-20],edx
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [ebx+8]
	mov	dword [ebp+-20],edx
	fild	dword [ebp+-20]
	sub	esp,4
	fstp	dword [esp]
	push	0
	push	0
	fld	dword [ebp+16]
	mov	edx,dword [_589]
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	fld	dword [ebp+12]
	mov	edx,dword [_589]
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	push	dword [ebp-16]
	push	dword [ebp-12]
	push	dword [ebp-4]
	push	dword [ebp-8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,44
_711:
	mov	eax,0
	jmp	_268
_268:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawSubImageRect:
	push	ebp
	mov	ebp,esp
	sub	esp,16
	mov	eax,dword [ebp+8]
	fld	dword [ebp+20]
	fld	dword [ebp+24]
	fld	dword [ebp+44]
	fld	dword [ebp+48]
	mov	edx,dword [ebp+52]
	fxch	st1
	fchs
	fmul	st0,st3
	fdiv	dword [ebp+36]
	fstp	dword [ebp-4]
	fld	dword [ebp-4]
	faddp	st3,st0
	fxch	st2
	fstp	dword [ebp-12]
	fxch	st1
	fchs
	fmul	st0,st1
	fdiv	dword [ebp+40]
	fstp	dword [ebp-8]
	fld	dword [ebp-8]
	faddp	st1,st0
	fstp	dword [ebp-16]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,8
	cmp	eax,_bbNullObject
	je	_719
	push	dword [ebp+40]
	push	dword [ebp+36]
	push	dword [ebp+32]
	push	dword [ebp+28]
	fld	dword [ebp+16]
	mov	edx,dword [_589]
	fadd	dword [edx+88]
	sub	esp,4
	fstp	dword [esp]
	fld	dword [ebp+12]
	mov	edx,dword [_589]
	fadd	dword [edx+84]
	sub	esp,4
	fstp	dword [esp]
	push	dword [ebp-16]
	push	dword [ebp-12]
	push	dword [ebp-8]
	push	dword [ebp-4]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,44
_719:
	mov	eax,0
	jmp	_282
_282:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_TileImage:
	push	ebp
	mov	ebp,esp
	sub	esp,60
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	mov	edx,dword [ebp+20]
	mov	eax,ebx
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,8
	mov	dword [ebp-20],eax
	mov	eax,dword [ebp-20]
	cmp	eax,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_723
	mov	eax,0
	jmp	_288
_723:
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	1065353216
	push	0
	push	0
	push	1065353216
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+92]
	add	esp,20
	mov	esi,dword [ebx+8]
	mov	eax,dword [ebx+12]
	mov	dword [ebp-4],eax
	mov	eax,dword [_589]
	mov	eax,dword [eax+68]
	sub	eax,esi
	add	eax,1
	mov	edi,eax
	mov	eax,dword [_589]
	mov	eax,dword [eax+72]
	sub	eax,dword [ebp-4]
	add	eax,1
	mov	dword [ebp-56],eax
	fld	dword [ebp+12]
	mov	eax,dword [_589]
	fadd	dword [eax+84]
	fsub	dword [ebx+32]
	fstp	dword [ebp-40]
	fld	dword [ebp+16]
	mov	eax,dword [_589]
	fadd	dword [eax+88]
	fsub	dword [ebx+36]
	fstp	dword [ebp-44]
	fld	dword [ebp-40]
	fstp	qword [ebp-28]
	fld	dword [ebp-40]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	fld	qword [ebp-28]
	fsubrp	st1,st0
	fstp	qword [ebp-28]
	fld	qword [ebp-28]
	fstp	dword [ebp-12]
	fld	dword [ebp-44]
	fstp	qword [ebp-36]
	fld	dword [ebp-44]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	fld	qword [ebp-36]
	fsubrp	st1,st0
	fstp	qword [ebp-36]
	fld	qword [ebp-36]
	fstp	dword [ebp-16]
	fld	dword [ebp-40]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	mov	dword [ebp+-60],edi
	fild	dword [ebp+-60]
	fsubp	st1,st0
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	dword [ebp-52],eax
	fld	dword [ebp-44]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	mov	eax,dword [ebp-56]
	mov	dword [ebp+-60],eax
	fild	dword [ebp+-60]
	fsubp	st1,st0
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	ebx,eax
	cmp	dword [ebp-52],0
	jl	_735
	mov	eax,dword [ebp-52]
	cdq
	idiv	esi
	mov	eax,edx
	add	eax,edi
	mov	dword [ebp-52],eax
	jmp	_736
_735:
	mov	ecx,esi
	mov	eax,dword [ebp-52]
	neg	eax
	cdq
	idiv	esi
	mov	eax,edx
	sub	ecx,eax
	mov	eax,ecx
	add	eax,edi
	mov	dword [ebp-52],eax
_736:
	cmp	ebx,0
	jl	_737
	mov	eax,ebx
	cdq
	cdq
	idiv	dword [ebp-4]
	mov	eax,edx
	mov	edx,eax
	mov	eax,edx
	add	eax,dword [ebp-56]
	mov	ebx,eax
	jmp	_738
_737:
	mov	ecx,dword [ebp-4]
	mov	eax,ebx
	neg	eax
	cdq
	cdq
	idiv	dword [ebp-4]
	mov	eax,edx
	mov	edx,eax
	mov	eax,edx
	sub	ecx,eax
	add	ecx,dword [ebp-56]
	mov	ebx,ecx
_738:
	mov	eax,dword [_589]
	mov	edx,dword [eax+68]
	mov	eax,dword [_589]
	add	edx,dword [eax+76]
	mov	dword [ebp-8],edx
	mov	eax,dword [_589]
	mov	edx,dword [eax+72]
	mov	eax,dword [_589]
	add	edx,dword [eax+80]
	mov	dword [ebp-48],edx
	mov	edi,ebx
	jmp	_5
_7:
	mov	ebx,dword [ebp-52]
	jmp	_8
_10:
	mov	eax,dword [ebp-20]
	mov	edx,dword [ebp-4]
	mov	dword [ebp+-60],edx
	fild	dword [ebp+-60]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-60],esi
	fild	dword [ebp+-60]
	sub	esp,4
	fstp	dword [esp]
	push	0
	push	0
	mov	dword [ebp+-60],edi
	fild	dword [ebp+-60]
	fadd	dword [ebp-16]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-60],ebx
	fild	dword [ebp+-60]
	fadd	dword [ebp-12]
	sub	esp,4
	fstp	dword [esp]
	mov	edx,dword [ebp-4]
	mov	dword [ebp+-60],edx
	fild	dword [ebp+-60]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-60],esi
	fild	dword [ebp+-60]
	sub	esp,4
	fstp	dword [esp]
	push	0
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,44
	add	ebx,esi
_8:
	cmp	ebx,dword [ebp-8]
	jl	_10
_9:
	add	edi,dword [ebp-4]
_5:
	cmp	edi,dword [ebp-48]
	jl	_7
_6:
	call	_3
	mov	eax,0
	jmp	_288
_288:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetColor:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	ebx,dword [_589]
	mov	dword [ebx+8],ecx
	mov	ebx,dword [_589]
	mov	dword [ebx+12],edx
	mov	ebx,dword [_589]
	mov	dword [ebx+16],eax
	mov	ebx,dword [_brl_max2d__max2dDriver]
	push	eax
	push	edx
	push	ecx
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+80]
	add	esp,16
	mov	eax,0
	jmp	_293
_293:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetColor:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	ecx,dword [_589]
	mov	ecx,dword [ecx+8]
	mov	dword [ebx],ecx
	mov	ecx,dword [_589]
	mov	ecx,dword [ecx+12]
	mov	dword [edx],ecx
	mov	edx,dword [_589]
	mov	edx,dword [edx+16]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_298
_298:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetBlend:
	push	ebp
	mov	ebp,esp
	mov	edx,dword [ebp+8]
	mov	eax,dword [_589]
	mov	dword [eax+104],edx
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,8
	mov	eax,0
	jmp	_301
_301:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetBlend:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	mov	eax,dword [eax+104]
	jmp	_303
_303:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetAlpha:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	mov	eax,dword [_589]
	fst	dword [eax+20]
	mov	eax,dword [_brl_max2d__max2dDriver]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,8
	mov	eax,0
	jmp	_306
_306:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetAlpha:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	fld	dword [eax+20]
	jmp	_308
_308:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetLineWidth:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	mov	eax,dword [_589]
	fst	dword [eax+36]
	mov	eax,dword [_brl_max2d__max2dDriver]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+96]
	add	esp,8
	mov	eax,0
	jmp	_311
_311:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetLineWidth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	fld	dword [eax+36]
	jmp	_313
_313:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetMaskColor:
	push	ebp
	mov	ebp,esp
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	dword [__brl_max2d_TMax2DGraphics_mask_red],ecx
	mov	dword [__brl_max2d_TMax2DGraphics_mask_green],edx
	mov	dword [__brl_max2d_TMax2DGraphics_mask_blue],eax
	mov	eax,0
	jmp	_318
_318:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetMaskColor:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	edx,dword [__brl_max2d_TMax2DGraphics_mask_red]
	mov	dword [ebx],edx
	mov	edx,dword [__brl_max2d_TMax2DGraphics_mask_green]
	mov	dword [ecx],edx
	mov	edx,dword [__brl_max2d_TMax2DGraphics_mask_blue]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_323
_323:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetVirtualResolution:
	push	ebp
	mov	ebp,esp
	sub	esp,12
	push	ebx
	mov	eax,dword [_589]
	fld	dword [ebp+8]
	fstp	dword [eax+108]
	mov	eax,dword [_589]
	fld	dword [ebp+12]
	fstp	dword [eax+112]
	mov	ebx,dword [_589]
	fld	dword [ebp+8]
	fstp	dword [ebp-4]
	call	_brl_graphics_GraphicsWidth
	mov	dword [ebp+-12],eax
	fild	dword [ebp+-12]
	fld	dword [ebp-4]
	fdivrp	st1,st0
	fstp	dword [ebp-4]
	fld	dword [ebp-4]
	fstp	dword [ebx+116]
	mov	ebx,dword [_589]
	fld	dword [ebp+12]
	fstp	dword [ebp-8]
	call	_brl_graphics_GraphicsHeight
	mov	dword [ebp+-12],eax
	fild	dword [ebp+-12]
	fld	dword [ebp-8]
	fdivrp	st1,st0
	fstp	dword [ebp-8]
	fld	dword [ebp-8]
	fstp	dword [ebx+120]
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	dword [ebp+12]
	push	dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+132]
	add	esp,12
	mov	eax,0
	jmp	_327
_327:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualResolutionWidth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	fld	dword [eax+108]
	jmp	_329
_329:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualResolutionHeight:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	fld	dword [eax+112]
	jmp	_331
_331:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualMouseX:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	call	_brl_polledinput_MouseX
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	mov	eax,dword [_589]
	fmul	dword [eax+116]
	jmp	_333
_333:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualMouseY:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	call	_brl_polledinput_MouseY
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	mov	eax,dword [_589]
	fmul	dword [eax+120]
	jmp	_335
_335:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualMouseXSpeed:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	call	_brl_polledinput_MouseXSpeed
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	mov	eax,dword [_589]
	fmul	dword [eax+116]
	jmp	_337
_337:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_VirtualMouseYSpeed:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	call	_brl_polledinput_MouseYSpeed
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	mov	eax,dword [_589]
	fmul	dword [eax+120]
	jmp	_339
_339:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_MoveVirtualMouse:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+12]
	mov	eax,dword [_589]
	fdiv	dword [eax+120]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	push	eax
	fld	dword [ebp+8]
	mov	eax,dword [_589]
	fdiv	dword [eax+116]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	push	eax
	call	_brl_system_MoveMouse
	add	esp,8
	mov	eax,0
	jmp	_343
_343:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetViewport:
	push	ebp
	mov	ebp,esp
	sub	esp,12
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	edi,dword [ebp+20]
	mov	eax,dword [_589]
	mov	dword [eax+68],esi
	mov	eax,dword [_589]
	mov	dword [eax+72],ebx
	mov	edx,dword [_589]
	mov	eax,dword [ebp+16]
	mov	dword [edx+76],eax
	mov	eax,dword [_589]
	mov	dword [eax+80],edi
	mov	dword [ebp+-12],esi
	fild	dword [ebp+-12]
	mov	eax,dword [_589]
	fdiv	dword [eax+116]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	dword [ebp-8],eax
	mov	dword [ebp+-12],ebx
	fild	dword [ebp+-12]
	mov	eax,dword [_589]
	fdiv	dword [eax+120]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	dword [ebp-4],eax
	mov	eax,esi
	add	eax,dword [ebp+16]
	mov	dword [ebp+-12],eax
	fild	dword [ebp+-12]
	mov	eax,dword [_589]
	fdiv	dword [eax+116]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	esi,eax
	mov	eax,ebx
	add	eax,edi
	mov	dword [ebp+-12],eax
	fild	dword [ebp+-12]
	mov	eax,dword [_589]
	fdiv	dword [eax+120]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloor
	add	esp,8
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	edx,dword [_brl_max2d__max2dDriver]
	sub	eax,dword [ebp-4]
	push	eax
	mov	eax,esi
	sub	eax,dword [ebp-8]
	push	eax
	push	dword [ebp-4]
	push	dword [ebp-8]
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+88]
	add	esp,20
	mov	eax,0
	jmp	_349
_349:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetViewport:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [ebp+20]
	mov	esi,dword [_589]
	mov	esi,dword [esi+68]
	mov	dword [ebx],esi
	mov	ebx,dword [_589]
	mov	ebx,dword [ebx+72]
	mov	dword [ecx],ebx
	mov	ecx,dword [_589]
	mov	ecx,dword [ecx+76]
	mov	dword [edx],ecx
	mov	edx,dword [_589]
	mov	edx,dword [edx+80]
	mov	dword [eax],edx
	mov	eax,0
	jmp	_355
_355:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetOrigin:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [_589]
	fxch	st1
	fstp	dword [eax+84]
	mov	eax,dword [_589]
	fstp	dword [eax+88]
	mov	eax,0
	jmp	_359
_359:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetOrigin:
	push	ebp
	mov	ebp,esp
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [_589]
	fld	dword [eax+84]
	fstp	dword [ecx]
	mov	eax,dword [_589]
	fld	dword [eax+88]
	fstp	dword [edx]
	mov	eax,0
	jmp	_363
_363:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetHandle:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [_589]
	fxch	st1
	fchs
	fstp	dword [eax+92]
	mov	eax,dword [_589]
	fchs
	fstp	dword [eax+96]
	mov	eax,0
	jmp	_367
_367:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetHandle:
	push	ebp
	mov	ebp,esp
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [_589]
	fld	dword [eax+92]
	fchs
	fstp	dword [ecx]
	mov	eax,dword [_589]
	fld	dword [eax+96]
	fchs
	fstp	dword [edx]
	mov	eax,0
	jmp	_371
_371:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetRotation:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	mov	eax,dword [_589]
	fstp	dword [eax+40]
	call	_3
	mov	eax,0
	jmp	_374
_374:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetRotation:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	fld	dword [eax+40]
	jmp	_376
_376:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetScale:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [_589]
	fxch	st1
	fstp	dword [eax+44]
	mov	eax,dword [_589]
	fstp	dword [eax+48]
	call	_3
	mov	eax,0
	jmp	_380
_380:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetScale:
	push	ebp
	mov	ebp,esp
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [_589]
	fld	dword [eax+44]
	fstp	dword [ecx]
	mov	eax,dword [_589]
	fld	dword [eax+48]
	fstp	dword [edx]
	mov	eax,0
	jmp	_384
_384:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetTransform:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	mov	eax,dword [_589]
	fxch	st2
	fstp	dword [eax+40]
	mov	eax,dword [_589]
	fstp	dword [eax+44]
	mov	eax,dword [_589]
	fstp	dword [eax+48]
	call	_3
	mov	eax,0
	jmp	_389
_389:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_LoadImageFont:
	push	ebp
	mov	ebp,esp
	mov	ecx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	push	eax
	push	edx
	push	ecx
	call	dword [_brl_max2d_TImageFont+72]
	add	esp,12
	jmp	_394
_394:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetImageFont:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_754
	mov	ebx,dword [__brl_max2d_TMax2DGraphics_default_font]
_754:
	inc	dword [ebx+4]
	mov	eax,dword [_589]
	mov	eax,dword [eax+100]
	dec	dword [eax+4]
	jnz	_758
	push	eax
	call	_bbGCFree
	add	esp,4
_758:
	mov	eax,dword [_589]
	mov	dword [eax+100],ebx
	mov	eax,0
	jmp	_397
_397:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GetImageFont:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	mov	eax,dword [eax+100]
	jmp	_399
_399:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_TextWidth:
	push	ebp
	mov	ebp,esp
	sub	esp,12
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	esi,0
	mov	ebx,0
	mov	eax,dword [edi+8]
	mov	dword [ebp-8],eax
	jmp	_761
_13:
	mov	eax,dword [_589]
	mov	eax,dword [eax+100]
	movzx	edx,word [edi+ebx*2+12]
	mov	edx,edx
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
	cmp	eax,0
	jge	_765
	jmp	_11
_765:
	mov	edx,dword [_589]
	mov	edx,dword [edx+100]
	push	eax
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+64]
	add	esp,8
	mov	dword [ebp+-12],esi
	fild	dword [ebp+-12]
	fstp	dword [ebp-4]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	fld	dword [ebp-4]
	faddp	st1,st0
	fstp	dword [ebp-4]
	fld	dword [ebp-4]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	esi,eax
_11:
	add	ebx,1
_761:
	cmp	ebx,dword [ebp-8]
	jl	_13
_12:
	mov	eax,esi
	jmp	_402
_402:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_TextHeight:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [_589]
	mov	eax,dword [eax+100]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	jmp	_405
_405:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_LoadImage:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	edx,dword [ebp+8]
	mov	eax,dword [ebp+12]
	cmp	eax,-1
	jne	_769
	mov	eax,dword [__brl_max2d_TMax2DGraphics_auto_imageflags]
_769:
	push	dword [__brl_max2d_TMax2DGraphics_mask_blue]
	push	dword [__brl_max2d_TMax2DGraphics_mask_green]
	push	dword [__brl_max2d_TMax2DGraphics_mask_red]
	push	eax
	push	edx
	call	dword [_brl_max2d_TImage+68]
	add	esp,20
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_771
	mov	eax,_bbNullObject
	jmp	_409
_771:
	cmp	dword [__brl_max2d_TMax2DGraphics_auto_midhandle],0
	je	_772
	push	ebx
	call	_brl_max2d_MidHandleImage
	add	esp,4
_772:
	mov	eax,ebx
	jmp	_409
_409:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_LoadAnimImage:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	ecx,dword [ebp+16]
	mov	edx,dword [ebp+20]
	mov	edi,dword [ebp+24]
	mov	eax,dword [ebp+28]
	cmp	eax,-1
	jne	_773
	mov	eax,dword [__brl_max2d_TMax2DGraphics_auto_imageflags]
_773:
	push	dword [__brl_max2d_TMax2DGraphics_mask_blue]
	push	dword [__brl_max2d_TMax2DGraphics_mask_green]
	push	dword [__brl_max2d_TMax2DGraphics_mask_red]
	push	eax
	push	edi
	push	edx
	push	ecx
	push	ebx
	push	esi
	call	dword [_brl_max2d_TImage+72]
	add	esp,36
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_775
	mov	eax,_bbNullObject
	jmp	_417
_775:
	cmp	dword [__brl_max2d_TMax2DGraphics_auto_midhandle],0
	je	_776
	push	ebx
	call	_brl_max2d_MidHandleImage
	add	esp,4
_776:
	mov	eax,ebx
	jmp	_417
_417:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_SetImageHandle:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	fxch	st1
	fstp	dword [eax+32]
	fstp	dword [eax+36]
	mov	eax,0
	jmp	_422
_422:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_AutoMidHandle:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	dword [__brl_max2d_TMax2DGraphics_auto_midhandle],eax
	mov	eax,0
	jmp	_425
_425:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_AutoImageFlags:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	cmp	eax,-1
	jne	_777
	mov	eax,0
	jmp	_428
_777:
	mov	dword [__brl_max2d_TMax2DGraphics_auto_imageflags],eax
	mov	eax,0
	jmp	_428
_428:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_MidHandleImage:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	mov	edx,dword [ebp+8]
	mov	eax,dword [edx+8]
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	fmul	dword [_1308]
	fstp	dword [edx+32]
	mov	eax,dword [edx+12]
	mov	dword [ebp+-4],eax
	fild	dword [ebp+-4]
	fmul	dword [_1309]
	fstp	dword [edx+36]
	mov	eax,0
	jmp	_431
_431:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_ImageWidth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	jmp	_434
_434:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_ImageHeight:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+12]
	jmp	_437
_437:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_CreateImage:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [ebp+20]
	cmp	eax,-1
	jne	_778
	mov	eax,dword [__brl_max2d_TMax2DGraphics_auto_imageflags]
_778:
	push	dword [__brl_max2d_TMax2DGraphics_mask_blue]
	push	dword [__brl_max2d_TMax2DGraphics_mask_green]
	push	dword [__brl_max2d_TMax2DGraphics_mask_red]
	or	eax,8
	push	eax
	push	edx
	push	ecx
	push	ebx
	call	dword [_brl_max2d_TImage+64]
	add	esp,28
	mov	ebx,eax
	cmp	dword [__brl_max2d_TMax2DGraphics_auto_midhandle],0
	je	_780
	push	ebx
	call	_brl_max2d_MidHandleImage
	add	esp,4
_780:
	mov	eax,ebx
	jmp	_443
_443:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_LockImage:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	ecx,dword [ebp+16]
	mov	edx,dword [ebp+20]
	push	edx
	push	ecx
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,16
	jmp	_449
_449:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_UnlockImage:
	push	ebp
	mov	ebp,esp
	mov	eax,0
	jmp	_453
_453:
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GrabImage:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	esi,dword [ebp+20]
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	dword [ebx+12]
	push	dword [ebx+8]
	push	edx
	push	ecx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+128]
	add	esp,20
	mov	edx,dword [ebx+16]
	and	edx,1
	cmp	edx,0
	je	_784
	push	dword [__brl_max2d_TMax2DGraphics_mask_blue]
	push	dword [__brl_max2d_TMax2DGraphics_mask_green]
	push	dword [__brl_max2d_TMax2DGraphics_mask_red]
	push	eax
	call	_brl_pixmap_MaskPixmap
	add	esp,16
_784:
	push	eax
	push	esi
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+60]
	add	esp,12
	mov	eax,0
	jmp	_459
_459:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_DrawPixmap:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	edx
	push	ecx
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+124]
	add	esp,16
	mov	eax,0
	jmp	_464
_464:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_GrabPixmap:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	ecx,dword [ebp+16]
	mov	edx,dword [ebp+20]
	mov	eax,dword [_brl_max2d__max2dDriver]
	push	edx
	push	ecx
	push	ebx
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+128]
	add	esp,20
	jmp	_470
_470:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_ImagesCollide:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+12]
	mov	ebx,dword [ebp+16]
	mov	edi,dword [ebp+20]
	push	-2147483648
	call	_brl_max2d_ResetCollisions
	add	esp,4
	push	_bbNullObject
	push	-2147483648
	push	0
	push	edi
	push	ebx
	push	esi
	push	dword [ebp+8]
	call	_brl_max2d_CollideImage
	add	esp,28
	push	_bbNullObject
	push	0
	push	-2147483648
	push	dword [ebp+36]
	push	dword [ebp+32]
	push	dword [ebp+28]
	push	dword [ebp+24]
	call	_brl_max2d_CollideImage
	add	esp,28
	cmp	dword [eax+16],0
	je	_788
	mov	eax,1
	jmp	_480
_788:
	mov	eax,0
	jmp	_480
_480:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_ImagesCollide2:
	push	ebp
	mov	ebp,esp
	sub	esp,12
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	edi,dword [ebp+12]
	fldz
	fstp	dword [ebp-4]
	fldz
	fstp	dword [ebp-8]
	mov	ebx,0
	call	_brl_max2d_GetRotation
	fstp	dword [ebp-12]
	lea	eax,dword [ebp-8]
	push	eax
	lea	eax,dword [ebp-4]
	push	eax
	call	_brl_max2d_GetScale
	add	esp,8
	push	-2147483648
	call	_brl_max2d_ResetCollisions
	add	esp,4
	push	dword [ebp+24]
	call	_brl_max2d_SetRotation
	add	esp,4
	push	dword [ebp+32]
	push	dword [ebp+28]
	call	_brl_max2d_SetScale
	add	esp,8
	push	_bbNullObject
	push	-2147483648
	push	0
	push	dword [ebp+20]
	push	dword [ebp+16]
	push	edi
	push	esi
	call	_brl_max2d_CollideImage
	add	esp,28
	push	dword [ebp+52]
	call	_brl_max2d_SetRotation
	add	esp,4
	push	dword [ebp+60]
	push	dword [ebp+56]
	call	_brl_max2d_SetScale
	add	esp,8
	push	_bbNullObject
	push	0
	push	-2147483648
	push	dword [ebp+48]
	push	dword [ebp+44]
	push	dword [ebp+40]
	push	dword [ebp+36]
	call	_brl_max2d_CollideImage
	add	esp,28
	cmp	dword [eax+16],0
	je	_793
	mov	ebx,1
_793:
	push	dword [ebp-12]
	call	_brl_max2d_SetRotation
	add	esp,4
	push	dword [ebp-8]
	push	dword [ebp-4]
	call	_brl_max2d_SetScale
	add	esp,8
	mov	eax,ebx
	jmp	_496
_496:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_ResetCollisions:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	edi,0
	jmp	_796
_16:
	mov	eax,dword [ebp+8]
	cmp	eax,0
	sete	al
	movzx	eax,al
	cmp	eax,0
	jne	_797
	mov	eax,dword [ebp+8]
	mov	edx,1
	mov	ecx,edi
	shl	edx,cl
	and	eax,edx
_797:
	cmp	eax,0
	je	_799
	mov	eax,dword [_597]
	mov	ebx,dword [eax+edi*4+24]
	cmp	ebx,_bbNullObject
	je	_800
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_804
	push	eax
	call	_bbGCFree
	add	esp,4
_804:
	mov	dword [ebx+16],esi
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_808
	push	eax
	call	_bbGCFree
	add	esp,4
_808:
	mov	dword [ebx+12],esi
	jmp	_17
_19:
	mov	ebx,dword [ebx+8]
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_812
	push	eax
	call	_bbGCFree
	add	esp,4
_812:
	mov	dword [ebx+16],esi
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_816
	push	eax
	call	_bbGCFree
	add	esp,4
_816:
	mov	dword [ebx+12],esi
_17:
	cmp	dword [ebx+8],_bbNullObject
	jne	_19
_18:
	mov	eax,dword [_601]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_820
	push	eax
	call	_bbGCFree
	add	esp,4
_820:
	mov	dword [ebx+8],esi
	mov	eax,dword [_597]
	mov	ebx,dword [eax+edi*4+24]
	inc	dword [ebx+4]
	mov	eax,dword [_601]
	dec	dword [eax+4]
	jnz	_824
	push	eax
	call	_bbGCFree
	add	esp,4
_824:
	mov	dword [_601],ebx
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [_597]
	mov	eax,dword [eax+edi*4+24]
	dec	dword [eax+4]
	jnz	_828
	push	eax
	call	_bbGCFree
	add	esp,4
_828:
	mov	eax,dword [_597]
	mov	dword [eax+edi*4+24],ebx
_800:
_799:
_14:
	add	edi,1
_796:
	cmp	edi,31
	jle	_16
_15:
	mov	eax,0
	jmp	_499
_499:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_CollideImage:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [ebp+20]
	mov	edi,dword [ebp+24]
	mov	esi,dword [ebp+32]
	push	esi
	mov	esi,dword [ebx+12]
	mov	dword [ebp+-4],esi
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	esi,dword [ebx+8]
	mov	dword [ebp+-4],esi
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-4],edx
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-4],ecx
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	push	ebx
	call	_76
	add	esp,28
	push	dword [ebp+28]
	push	edi
	push	eax
	call	_77
	add	esp,12
	jmp	_508
_508:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_max2d_CollideRect:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	mov	ecx,dword [ebp+16]
	mov	edx,dword [ebp+20]
	mov	edi,dword [ebp+24]
	mov	eax,dword [ebp+32]
	push	eax
	mov	dword [ebp+-4],edx
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-4],ecx
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-4],ebx
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	mov	dword [ebp+-4],esi
	fild	dword [ebp+-4]
	sub	esp,4
	fstp	dword [esp]
	push	0
	push	_bbNullObject
	call	_76
	add	esp,28
	push	dword [ebp+28]
	push	edi
	push	eax
	call	_77
	add	esp,12
	jmp	_517
_517:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_20:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	fld	dword [ebp+20]
	fxch	st3
	fstp	dword [_590]
	fxch	st1
	fstp	dword [_591]
	fstp	dword [_592]
	fstp	dword [_593]
	mov	eax,0
	jmp	_523
_523:
	mov	esp,ebp
	pop	ebp
	ret
_21:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	fld	dword [ebp+12]
	fld	dword [ebp+16]
	fld	dword [ebp+20]
	fld	dword [ebp+24]
	fld	dword [ebp+28]
	fxch	st1
	fsub	st0,st3
	fld	st2
	fsubrp	st5,st0
	fmulp	st4,st0
	fxch	st4
	fsubp	st2,st0
	fsubp	st3,st0
	fmulp	st2,st0
	fsubrp	st1,st0
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	jmp	_531
_531:
	mov	esp,ebp
	pop	ebp
	ret
_22:
	push	ebp
	mov	ebp,esp
	sub	esp,16
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	eax,dword [edi+20]
	cdq
	cdq
	idiv	dword [ebp+12]
	mov	dword [ebp-16],eax
	mov	dword [ebp-4],0
	mov	eax,dword [ebp+12]
	mov	dword [ebp-8],2
	mov	esi,2
	mov	edx,dword [ebp-16]
	sub	edx,1
	mov	dword [ebp-12],edx
	jmp	_839
_25:
	mov	edx,eax
	add	edx,dword [ebp+12]
	mov	ebx,edx
	mov	edx,ebx
	add	edx,1
	push	dword [edi+edx*4+24]
	push	dword [edi+ebx*4+24]
	mov	edx,eax
	add	edx,1
	push	dword [edi+edx*4+24]
	push	dword [edi+eax*4+24]
	mov	eax,dword [ebp-4]
	add	eax,1
	push	dword [edi+eax*4+24]
	mov	eax,dword [ebp-4]
	push	dword [edi+eax*4+24]
	call	_21
	add	esp,24
	cmp	eax,0
	jl	_841
	add	dword [ebp-8],1
_841:
	mov	eax,ebx
_23:
	add	esi,1
_839:
	cmp	esi,dword [ebp-12]
	jle	_25
_24:
	mov	eax,dword [ebp-16]
	cmp	dword [ebp-8],eax
	jge	_842
	mov	eax,0
	jmp	_535
_842:
	mov	dword [ebp-4],0
	mov	eax,dword [ebp-16]
	sub	eax,1
	imul	eax,dword [ebp+12]
	jmp	_26
_28:
	mov	esi,0
	mov	edx,dword [ebp+12]
	sub	edx,1
	mov	ebx,edx
	jmp	_843
_31:
	mov	edx,dword [ebp-4]
	add	edx,esi
	fld	dword [edi+edx*4+24]
	mov	ecx,dword [ebp-4]
	add	ecx,esi
	mov	edx,eax
	add	edx,esi
	fld	dword [edi+edx*4+24]
	fstp	dword [edi+ecx*4+24]
	mov	edx,eax
	add	edx,esi
	fstp	dword [edi+edx*4+24]
_29:
	add	esi,1
_843:
	cmp	esi,ebx
	jle	_31
_30:
	mov	edx,dword [ebp+12]
	add	dword [ebp-4],edx
	sub	eax,dword [ebp+12]
_26:
	cmp	dword [ebp-4],eax
	jl	_28
_27:
	mov	eax,0
	jmp	_535
_535:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_rpoly_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_32
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+12],eax
	mov	dword [ebx+16],0
	mov	dword [ebx+20],0
	mov	dword [ebx+24],0
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+28],eax
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+32],eax
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+36],eax
	mov	eax,_bbEmptyArray
	inc	dword [eax+4]
	mov	dword [ebx+40],eax
	mov	dword [ebx+44],0
	mov	dword [ebx+48],0
	mov	dword [ebx+52],0
	mov	dword [ebx+56],0
	mov	eax,0
	jmp	_538
_538:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_rpoly_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_541:
	mov	eax,dword [ebx+40]
	dec	dword [eax+4]
	jnz	_853
	push	eax
	call	_bbGCFree
	add	esp,4
_853:
	mov	eax,dword [ebx+36]
	dec	dword [eax+4]
	jnz	_855
	push	eax
	call	_bbGCFree
	add	esp,4
_855:
	mov	eax,dword [ebx+32]
	dec	dword [eax+4]
	jnz	_857
	push	eax
	call	_bbGCFree
	add	esp,4
_857:
	mov	eax,dword [ebx+28]
	dec	dword [eax+4]
	jnz	_859
	push	eax
	call	_bbGCFree
	add	esp,4
_859:
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_861
	push	eax
	call	_bbGCFree
	add	esp,4
_861:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_863
	push	eax
	call	_bbGCFree
	add	esp,4
_863:
	mov	eax,0
	jmp	_851
_851:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_33:
	push	ebp
	mov	ebp,esp
	sub	esp,60
	push	ebx
	push	esi
	push	edi
	mov	dword [ebp-52],0
	mov	dword [ebp-16],-2147483648
	mov	edi,2147483647
	mov	eax,dword [ebp+8]
	mov	ebx,dword [eax+20]
	push	ebx
	push	_877
	call	_bbArrayNew1D
	add	esp,8
	mov	dword [ebp-48],eax
	mov	dword [ebp-4],0
	mov	dword [ebp-40],ebx
	jmp	_878
_36:
	push	_32
	call	_bbObjectNew
	add	esp,4
	mov	esi,eax
	mov	eax,esi
	inc	dword [eax+4]
	mov	ebx,eax
	mov	edx,dword [ebp-4]
	mov	eax,dword [ebp-48]
	mov	eax,dword [eax+edx*4+24]
	dec	dword [eax+4]
	jnz	_883
	push	eax
	call	_bbGCFree
	add	esp,4
_883:
	mov	edx,dword [ebp-4]
	mov	eax,dword [ebp-48]
	mov	dword [eax+edx*4+24],ebx
	mov	edx,dword [ebp-4]
	mov	eax,dword [ebp+16]
	mov	eax,dword [eax+edx*4+24]
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+8]
	dec	dword [eax+4]
	jnz	_887
	push	eax
	call	_bbGCFree
	add	esp,4
_887:
	mov	dword [esi+8],ebx
	mov	edx,dword [ebp-4]
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+edx*4+24]
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+12]
	dec	dword [eax+4]
	jnz	_891
	push	eax
	call	_bbGCFree
	add	esp,4
_891:
	mov	dword [esi+12],ebx
	mov	edx,dword [ebp-4]
	mov	eax,dword [ebp+12]
	mov	eax,dword [eax+edx*4+24]
	mov	dword [esi+16],eax
	mov	eax,dword [esi+12]
	mov	eax,dword [eax+20]
	cdq
	idiv	dword [esi+16]
	mov	dword [esi+20],eax
	mov	eax,dword [esi+20]
	imul	eax,dword [esi+16]
	mov	dword [esi+24],eax
	push	dword [esi+16]
	push	dword [esi+12]
	call	_22
	add	esp,8
	mov	dword [esi+44],0
	mov	ebx,0
	mov	dword [esi+52],2147483647
	jmp	_37
_39:
	mov	edx,dword [esi+12]
	mov	eax,ebx
	add	eax,1
	fld	dword [edx+eax*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	dword [ebp-20],eax
	mov	eax,dword [esi+52]
	cmp	dword [ebp-20],eax
	jge	_892
	mov	eax,dword [ebp-20]
	mov	dword [esi+52],eax
	mov	dword [esi+44],ebx
_892:
	cmp	dword [ebp-20],edi
	jge	_893
	mov	edi,dword [ebp-20]
_893:
	mov	eax,dword [ebp-16]
	cmp	dword [ebp-20],eax
	jle	_894
	mov	eax,dword [ebp-20]
	mov	dword [ebp-16],eax
_894:
	add	ebx,dword [esi+16]
_37:
	cmp	ebx,dword [esi+24]
	jl	_39
_38:
	mov	eax,dword [esi+44]
	mov	dword [esi+48],eax
_34:
	add	dword [ebp-4],1
_878:
	mov	eax,dword [ebp-40]
	cmp	dword [ebp-4],eax
	jl	_36
_35:
	push	_brl_linkedlist_TList
	call	_bbObjectNew
	add	esp,4
	mov	dword [ebp-36],eax
	mov	dword [ebp-24],0
	mov	dword [ebp-20],edi
	mov	eax,dword [ebp-16]
	sub	eax,1
	mov	dword [ebp-56],eax
	jmp	_895
_42:
	mov	eax,dword [ebp-48]
	mov	dword [ebp-32],eax
	mov	eax,dword [ebp-32]
	add	eax,24
	mov	dword [ebp-28],eax
	mov	edx,dword [ebp-28]
	mov	eax,dword [ebp-32]
	add	edx,dword [eax+16]
	mov	dword [ebp-44],edx
	jmp	_43
_45:
	mov	eax,dword [ebp-28]
	mov	esi,dword [eax]
	add	dword [ebp-28],4
	cmp	esi,_bbNullObject
	je	_43
	cmp	dword [esi+56],2
	jne	_901
	jmp	_43
_901:
	mov	eax,dword [esi+56]
	cmp	eax,0
	sete	al
	movzx	eax,al
	cmp	eax,0
	je	_902
	mov	eax,dword [ebp-20]
	cmp	eax,dword [esi+52]
	setl	al
	movzx	eax,al
_902:
	cmp	eax,0
	je	_904
	jmp	_43
_904:
	mov	eax,dword [esi+12]
	mov	dword [ebp-8],eax
	mov	edx,dword [esi+44]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	cmp	dword [ebp-20],eax
	jl	_905
	mov	ebx,dword [esi+44]
	mov	eax,dword [esi+44]
	sub	eax,dword [esi+16]
	mov	dword [ebp-4],eax
	cmp	dword [ebp-4],0
	jge	_906
	mov	eax,dword [esi+24]
	add	dword [ebp-4],eax
_906:
	jmp	_46
_48:
	mov	edx,dword [ebp-4]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	cmp	eax,dword [ebp-20]
	jle	_907
	jmp	_47
_907:
	mov	ebx,dword [ebp-4]
	mov	eax,dword [esi+16]
	sub	dword [ebp-4],eax
	cmp	dword [ebp-4],0
	jge	_908
	mov	eax,dword [esi+24]
	add	dword [ebp-4],eax
_908:
_46:
	mov	eax,dword [esi+44]
	cmp	dword [ebp-4],eax
	jne	_48
_47:
	mov	edx,dword [ebp-4]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	edi,eax
	mov	edx,ebx
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	sub	edi,eax
	mov	eax,dword [ebp-4]
	cmp	eax,dword [esi+44]
	sete	al
	movzx	eax,al
	cmp	eax,0
	jne	_909
	cmp	edi,0
	setle	al
	movzx	eax,al
_909:
	cmp	eax,0
	je	_911
	mov	eax,dword [ebp-36]
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+116]
	add	esp,8
	sub	dword [ebp-24],1
	mov	dword [esi+56],2
	jmp	_43
_911:
	mov	eax,ebx
	add	eax,dword [esi+16]
	push	eax
	push	ebx
	push	dword [ebp-8]
	push	_94
	call	_bbArraySlice
	add	esp,16
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+28]
	dec	dword [eax+4]
	jnz	_916
	push	eax
	call	_bbGCFree
	add	esp,4
_916:
	mov	dword [esi+28],ebx
	mov	eax,dword [ebp-4]
	add	eax,dword [esi+16]
	push	eax
	push	dword [ebp-4]
	push	dword [ebp-8]
	push	_94
	call	_bbArraySlice
	add	esp,16
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+32]
	dec	dword [eax+4]
	jnz	_920
	push	eax
	call	_bbGCFree
	add	esp,4
_920:
	mov	dword [esi+32],ebx
	mov	ebx,0
	mov	eax,dword [esi+16]
	sub	eax,1
	jmp	_921
_51:
	mov	edx,dword [esi+32]
	mov	ecx,dword [esi+32]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+28]
	fsub	dword [ecx+ebx*4+24]
	mov	dword [ebp+-60],edi
	fild	dword [ebp+-60]
	fdivp	st1,st0
	fstp	dword [edx+ebx*4+24]
	mov	edx,dword [esi+28]
	mov	ecx,dword [esi+28]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+32]
	fld	dword [ecx+ebx*4+24]
	fmul	dword [_1369]
	faddp	st1,st0
	fstp	dword [edx+ebx*4+24]
_49:
	add	ebx,1
_921:
	cmp	ebx,eax
	jle	_51
_50:
	mov	eax,dword [ebp-4]
	mov	dword [esi+44],eax
	cmp	dword [esi+56],0
	jne	_923
	mov	dword [esi+56],1
	mov	eax,dword [ebp-36]
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,8
	add	dword [ebp-24],1
_923:
_905:
	mov	edx,dword [esi+48]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	cmp	dword [ebp-20],eax
	jl	_925
	mov	eax,dword [esi+48]
	add	eax,dword [esi+16]
	cdq
	idiv	dword [esi+24]
	mov	eax,edx
	mov	dword [ebp-4],eax
	mov	ebx,dword [esi+48]
	jmp	_52
_54:
	mov	edx,dword [ebp-4]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	cmp	eax,dword [ebp-20]
	jle	_926
	jmp	_53
_926:
	mov	ebx,dword [ebp-4]
	mov	eax,dword [ebp-4]
	add	eax,dword [esi+16]
	cdq
	idiv	dword [esi+24]
	mov	eax,edx
	mov	dword [ebp-4],eax
_52:
	mov	eax,dword [esi+48]
	cmp	dword [ebp-4],eax
	jne	_54
_53:
	mov	edx,dword [ebp-4]
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	edi,eax
	mov	edx,ebx
	add	edx,1
	mov	eax,dword [ebp-8]
	fld	dword [eax+edx*4+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	sub	edi,eax
	mov	eax,dword [ebp-4]
	cmp	eax,dword [esi+48]
	sete	al
	movzx	eax,al
	cmp	eax,0
	jne	_927
	cmp	edi,0
	setle	al
	movzx	eax,al
_927:
	cmp	eax,0
	je	_929
	mov	eax,dword [ebp-36]
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+116]
	add	esp,8
	sub	dword [ebp-24],1
	mov	dword [esi+56],2
	jmp	_43
_929:
	mov	eax,ebx
	add	eax,dword [esi+16]
	push	eax
	push	ebx
	push	dword [ebp-8]
	push	_94
	call	_bbArraySlice
	add	esp,16
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+36]
	dec	dword [eax+4]
	jnz	_934
	push	eax
	call	_bbGCFree
	add	esp,4
_934:
	mov	dword [esi+36],ebx
	mov	eax,dword [ebp-4]
	add	eax,dword [esi+16]
	push	eax
	push	dword [ebp-4]
	push	dword [ebp-8]
	push	_94
	call	_bbArraySlice
	add	esp,16
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+40]
	dec	dword [eax+4]
	jnz	_938
	push	eax
	call	_bbGCFree
	add	esp,4
_938:
	mov	dword [esi+40],ebx
	mov	ebx,0
	mov	eax,dword [esi+16]
	sub	eax,1
	jmp	_939
_57:
	mov	edx,dword [esi+40]
	mov	ecx,dword [esi+40]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+36]
	fsub	dword [ecx+ebx*4+24]
	mov	dword [ebp+-60],edi
	fild	dword [ebp+-60]
	fdivp	st1,st0
	fstp	dword [edx+ebx*4+24]
	mov	edx,dword [esi+36]
	mov	ecx,dword [esi+36]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+40]
	fld	dword [ecx+ebx*4+24]
	fmul	dword [_1370]
	faddp	st1,st0
	fstp	dword [edx+ebx*4+24]
_55:
	add	ebx,1
_939:
	cmp	ebx,eax
	jle	_57
_56:
	mov	eax,dword [ebp-4]
	mov	dword [esi+48],eax
	cmp	dword [esi+56],0
	jne	_941
	mov	dword [esi+56],1
	mov	eax,dword [ebp-36]
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,8
	add	dword [ebp-24],1
_941:
_925:
_43:
	mov	eax,dword [ebp-44]
	cmp	dword [ebp-28],eax
	jne	_45
_44:
	cmp	dword [ebp-24],0
	je	_943
	push	dword [ebp-20]
	push	dword [ebp-24]
	push	dword [ebp-36]
	call	dword [ebp+20]
	add	esp,12
	mov	dword [ebp-52],eax
	cmp	dword [ebp-52],0
	jge	_944
	mov	eax,dword [ebp-52]
	jmp	_547
_944:
_943:
	mov	edi,dword [ebp-36]
	mov	eax,edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+140]
	add	esp,4
	mov	dword [ebp-12],eax
	jmp	_58
_60:
	mov	eax,dword [ebp-12]
	push	_32
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	cmp	esi,_bbNullObject
	je	_58
	mov	ebx,0
	mov	eax,dword [esi+16]
	sub	eax,1
	jmp	_950
_63:
	mov	edx,dword [esi+28]
	mov	ecx,dword [esi+28]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+32]
	fadd	dword [ecx+ebx*4+24]
	fstp	dword [edx+ebx*4+24]
	mov	edx,dword [esi+36]
	mov	ecx,dword [esi+36]
	fld	dword [ecx+ebx*4+24]
	mov	ecx,dword [esi+40]
	fadd	dword [ecx+ebx*4+24]
	fstp	dword [edx+ebx*4+24]
_61:
	add	ebx,1
_950:
	cmp	ebx,eax
	jle	_63
_62:
_58:
	mov	eax,dword [ebp-12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_60
_59:
_40:
	add	dword [ebp-20],1
_895:
	mov	eax,dword [ebp-56]
	cmp	dword [ebp-20],eax
	jle	_42
_41:
	mov	eax,dword [ebp-52]
	jmp	_547
_547:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_64:
	push	ebp
	mov	ebp,esp
	sub	esp,52
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+12]
	cmp	eax,2
	jge	_971
	mov	eax,0
	jmp	_552
_971:
	mov	eax,dword [ebp+8]
	push	_32
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+108]
	add	esp,8
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	mov	eax,dword [esi+28]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	dword [ebp-48],eax
	mov	eax,dword [esi+36]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	ebx,eax
	mov	eax,dword [ebp+8]
	push	_32
	push	1
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+108]
	add	esp,8
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	mov	eax,dword [esi+28]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	edi,eax
	mov	eax,dword [esi+36]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	cmp	edi,ebx
	jl	_974
	mov	eax,0
	jmp	_552
_974:
	cmp	eax,dword [ebp-48]
	jg	_975
	mov	eax,0
	jmp	_552
_975:
	cmp	edi,dword [ebp-48]
	jle	_976
	mov	dword [ebp-48],edi
_976:
	cmp	eax,ebx
	jge	_977
	mov	ebx,eax
_977:
	mov	eax,ebx
	sub	eax,dword [ebp-48]
	mov	dword [ebp-40],eax
	cmp	dword [ebp-40],0
	jg	_978
	mov	eax,0
	jmp	_552
_978:
	mov	eax,dword [_595]
	mov	eax,dword [eax+20]
	cmp	dword [ebp-40],eax
	jle	_979
	push	dword [ebp-40]
	push	_980
	call	_bbArrayNew1D
	add	esp,8
	mov	ebx,eax
	inc	dword [ebx+4]
	mov	eax,dword [_595]
	dec	dword [eax+4]
	jnz	_984
	push	eax
	call	_bbGCFree
	add	esp,4
_984:
	mov	dword [_595],ebx
_979:
	mov	eax,dword [ebp-40]
	shl	eax,2
	push	eax
	mov	eax,dword [_595]
	lea	eax,byte [eax+24]
	push	eax
	call	_bbMemClear
	add	esp,8
	mov	eax,dword [ebp+8]
	mov	dword [ebp-36],eax
	mov	eax,dword [ebp-36]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+140]
	add	esp,4
	mov	dword [ebp-44],eax
	jmp	_65
_67:
	mov	eax,dword [ebp-44]
	push	_32
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	cmp	esi,_bbNullObject
	je	_65
	mov	ebx,dword [esi+8]
	cmp	ebx,_bbNullObject
	je	_990
	mov	eax,dword [esi+28]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	mov	edi,eax
	mov	eax,dword [esi+36]
	fld	dword [eax+24]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	sub	eax,edi
	cmp	eax,0
	jg	_991
	jmp	_65
_991:
	mov	edx,dword [esi+28]
	fld	dword [edx+8+24]
	fstp	dword [ebp-8]
	mov	edx,dword [esi+28]
	fld	dword [edx+12+24]
	fstp	dword [ebp-4]
	mov	edx,dword [esi+36]
	fld	dword [edx+8+24]
	fsub	dword [ebp-8]
	mov	dword [ebp+-52],eax
	fild	dword [ebp+-52]
	fdivp	st1,st0
	fstp	dword [ebp-16]
	mov	edx,dword [esi+36]
	fld	dword [edx+12+24]
	fsub	dword [ebp-4]
	mov	dword [ebp+-52],eax
	fild	dword [ebp+-52]
	fdivp	st1,st0
	fstp	dword [ebp-20]
	mov	eax,dword [ebp-48]
	sub	eax,edi
	mov	dword [ebp+-52],eax
	fild	dword [ebp+-52]
	fadd	dword [_1401]
	fld	dword [ebp-16]
	fmul	st0,st1
	fld	dword [ebp-8]
	faddp	st1,st0
	fstp	dword [ebp-8]
	fld	dword [ebp-20]
	fmulp	st1,st0
	fld	dword [ebp-4]
	faddp	st1,st0
	fstp	dword [ebp-4]
	mov	eax,dword [ebx+8]
	mov	dword [ebp-32],eax
	mov	eax,dword [ebx+12]
	mov	dword [ebp-24],eax
	mov	eax,dword [ebx+16]
	mov	dword [ebp-28],eax
	mov	eax,dword [ebx+20]
	cdq
	and	edx,3
	add	eax,edx
	sar	eax,2
	mov	edi,eax
	mov	esi,0
	mov	eax,dword [ebp-40]
	mov	dword [ebp-12],eax
	jmp	_992
_70:
	fldz
	fld	dword [ebp-8]
	fucompp
	fnstsw	ax
	sahf
	setae	al
	movzx	eax,al
	cmp	eax,0
	jne	_994
	fld	dword [_1402]
	fstp	dword [ebp-8]
_994:
	fldz
	fld	dword [ebp-4]
	fucompp
	fnstsw	ax
	sahf
	setae	al
	movzx	eax,al
	cmp	eax,0
	jne	_995
	fld	dword [_1403]
	fstp	dword [ebp-4]
_995:
	fld1
	fld	dword [ebp-8]
	fucompp
	fnstsw	ax
	sahf
	setbe	al
	movzx	eax,al
	cmp	eax,0
	jne	_996
	fld	dword [_1404]
	fstp	dword [ebp-8]
_996:
	fld1
	fld	dword [ebp-4]
	fucompp
	fnstsw	ax
	sahf
	setbe	al
	movzx	eax,al
	cmp	eax,0
	jne	_997
	fld	dword [_1405]
	fstp	dword [ebp-4]
_997:
	fld	dword [ebp-4]
	mov	eax,dword [ebp-28]
	mov	dword [ebp+-52],eax
	fild	dword [ebp+-52]
	fmulp	st1,st0
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	imul	eax,edi
	mov	ebx,eax
	fld	dword [ebp-8]
	mov	eax,dword [ebp-24]
	mov	dword [ebp+-52],eax
	fild	dword [ebp+-52]
	fmulp	st1,st0
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	add	ebx,eax
	mov	eax,dword [ebp-32]
	mov	eax,dword [eax+ebx*4]
	and	eax,-2147483648
	cmp	eax,0
	je	_998
	mov	edx,dword [_595]
	cmp	dword [edx+esi*4+24],0
	je	_999
	mov	eax,-1
	jmp	_552
_999:
	mov	edx,dword [_595]
	mov	dword [edx+esi*4+24],eax
_998:
	fld	dword [ebp-8]
	fadd	dword [ebp-16]
	fstp	dword [ebp-8]
	fld	dword [ebp-4]
	fadd	dword [ebp-20]
	fstp	dword [ebp-4]
_68:
	add	esi,1
_992:
	cmp	esi,dword [ebp-12]
	jl	_70
_69:
	jmp	_1000
_990:
	mov	esi,0
	mov	edx,dword [ebp-40]
	jmp	_1001
_73:
	mov	eax,dword [_595]
	cmp	dword [eax+esi*4+24],0
	je	_1003
	mov	eax,-1
	jmp	_552
_1003:
	mov	eax,dword [_595]
	mov	dword [eax+esi*4+24],-1
_71:
	add	esi,1
_1001:
	cmp	esi,edx
	jl	_73
_72:
_1000:
_65:
	mov	eax,dword [ebp-44]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_67
_66:
	mov	eax,0
	jmp	_552
_552:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TQuad_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_74
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+12],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	dword [ebx+20],0
	fldz
	fstp	dword [ebx+24]
	fldz
	fstp	dword [ebx+28]
	fldz
	fstp	dword [ebx+32]
	fldz
	fstp	dword [ebx+36]
	push	16
	push	_1007
	call	_bbArrayNew1D
	add	esp,8
	inc	dword [eax+4]
	mov	dword [ebx+40],eax
	mov	eax,0
	jmp	_555
_555:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TQuad_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_558:
	mov	eax,dword [ebx+40]
	dec	dword [eax+4]
	jnz	_1011
	push	eax
	call	_bbGCFree
	add	esp,4
_1011:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_1013
	push	eax
	call	_bbGCFree
	add	esp,4
_1013:
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_1015
	push	eax
	call	_bbGCFree
	add	esp,4
_1015:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_1017
	push	eax
	call	_bbGCFree
	add	esp,4
_1017:
	mov	eax,0
	jmp	_1009
_1009:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_max2d_TQuad_SetCoords:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+12]
	fstp	dword [eax+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+16]
	fstp	dword [eax+4+24]
	mov	eax,dword [ebx+40]
	fldz
	fstp	dword [eax+8+24]
	mov	eax,dword [ebx+40]
	fldz
	fstp	dword [eax+12+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+20]
	fstp	dword [eax+16+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+24]
	fstp	dword [eax+20+24]
	mov	eax,dword [ebx+40]
	fld1
	fstp	dword [eax+24+24]
	mov	eax,dword [ebx+40]
	fldz
	fstp	dword [eax+28+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+28]
	fstp	dword [eax+32+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+32]
	fstp	dword [eax+36+24]
	mov	eax,dword [ebx+40]
	fld1
	fstp	dword [eax+40+24]
	mov	eax,dword [ebx+40]
	fld1
	fstp	dword [eax+44+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+36]
	fstp	dword [eax+48+24]
	mov	eax,dword [ebx+40]
	fld	dword [ebp+40]
	fstp	dword [eax+52+24]
	mov	eax,dword [ebx+40]
	fldz
	fstp	dword [eax+56+24]
	mov	eax,dword [ebx+40]
	fld1
	fstp	dword [eax+60+24]
	fld	dword [ebp+36]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+28]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+20]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+12]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	fstp	dword [ebx+24]
	fld	dword [ebp+40]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+32]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+24]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+16]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMin
	add	esp,16
	fstp	dword [ebx+28]
	fld	dword [ebp+36]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+28]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+20]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+12]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	fstp	dword [ebx+32]
	fld	dword [ebp+40]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+32]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+24]
	sub	esp,8
	fstp	qword [esp]
	fld	dword [ebp+16]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatMax
	add	esp,16
	fstp	dword [ebx+36]
	mov	eax,0
	jmp	_569
_569:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_75:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	fld	dword [eax+32]
	mov	eax,dword [ebp+12]
	fld	dword [eax+24]
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	setb	al
	movzx	eax,al
	cmp	eax,0
	jne	_1018
	mov	eax,dword [ebp+8]
	fld	dword [eax+36]
	mov	eax,dword [ebp+12]
	fld	dword [eax+28]
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	setb	al
	movzx	eax,al
_1018:
	cmp	eax,0
	jne	_1020
	mov	eax,dword [ebp+8]
	fld	dword [eax+24]
	mov	eax,dword [ebp+12]
	fld	dword [eax+32]
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	seta	al
	movzx	eax,al
_1020:
	cmp	eax,0
	jne	_1022
	mov	eax,dword [ebp+8]
	fld	dword [eax+28]
	mov	eax,dword [ebp+12]
	fld	dword [eax+36]
	fxch	st1
	fucompp
	fnstsw	ax
	sahf
	seta	al
	movzx	eax,al
_1022:
	cmp	eax,0
	je	_1024
	mov	eax,0
	jmp	_573
_1024:
	push	2
	push	_1025
	call	_bbArrayNew1D
	add	esp,8
	mov	ebx,eax
	push	2
	push	_1027
	call	_bbArrayNew1D
	add	esp,8
	mov	edi,eax
	push	2
	push	_1029
	call	_bbArrayNew1D
	add	esp,8
	mov	dword [ebp-4],eax
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+40]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+24]
	dec	dword [eax+4]
	jnz	_1034
	push	eax
	call	_bbGCFree
	add	esp,4
_1034:
	mov	dword [ebx+24],esi
	mov	eax,dword [ebp+12]
	mov	eax,dword [eax+40]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+4+24]
	dec	dword [eax+4]
	jnz	_1038
	push	eax
	call	_bbGCFree
	add	esp,4
_1038:
	mov	dword [ebx+4+24],esi
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+16]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [edi+24]
	dec	dword [eax+4]
	jnz	_1042
	push	eax
	call	_bbGCFree
	add	esp,4
_1042:
	mov	dword [edi+24],esi
	mov	eax,dword [ebp+12]
	mov	eax,dword [eax+16]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [edi+4+24]
	dec	dword [eax+4]
	jnz	_1046
	push	eax
	call	_bbGCFree
	add	esp,4
_1046:
	mov	dword [edi+4+24],esi
	mov	eax,dword [ebp-4]
	mov	dword [eax+24],4
	mov	eax,dword [ebp-4]
	mov	dword [eax+4+24],4
	push	_64
	push	edi
	push	dword [ebp-4]
	push	ebx
	call	_33
	add	esp,16
	jmp	_573
_573:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_76:
	push	ebp
	mov	ebp,esp
	sub	esp,36
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	fld	dword [ebp+16]
	fld	dword [ebp+20]
	fld	dword [ebp+24]
	fld	dword [ebp+28]
	fld	dword [_1439]
	fld	dword [_1440]
	cmp	edi,_bbNullObject
	je	_1067
	fstp	st0
	fstp	st0
	fld	dword [edi+32]
	fchs
	fld	dword [edi+36]
	fchs
_1067:
	fld	st1
	faddp	st4,st0
	fld	st0
	faddp	st3,st0
	fxch	st2
	fstp	dword [ebp-4]
	mov	eax,dword [_589]
	fxch	st4
	fadd	dword [eax+84]
	mov	eax,dword [_589]
	fxch	st3
	fadd	dword [eax+88]
	fld	st4
	fmul	dword [_590]
	fld	st2
	fmul	dword [_591]
	faddp	st1,st0
	fadd	st0,st4
	fstp	dword [ebp-36]
	fld	st4
	fmul	dword [_592]
	fld	st2
	fmul	dword [_593]
	faddp	st1,st0
	fadd	st0,st1
	fstp	dword [ebp-32]
	fld	st2
	fmul	dword [_590]
	fld	st2
	fmul	dword [_591]
	faddp	st1,st0
	fadd	st0,st4
	fstp	dword [ebp-28]
	fld	st2
	fmul	dword [_592]
	fxch	st2
	fmul	dword [_593]
	faddp	st2,st0
	fadd	st1,st0
	fxch	st1
	fstp	dword [ebp-24]
	fld	st1
	fmul	dword [_590]
	fld	dword [ebp-4]
	fmul	dword [_591]
	faddp	st1,st0
	fadd	st0,st3
	fstp	dword [ebp-20]
	fxch	st1
	fmul	dword [_592]
	fld	dword [ebp-4]
	fmul	dword [_593]
	faddp	st1,st0
	fadd	st0,st1
	fstp	dword [ebp-16]
	fld	st2
	fmul	dword [_590]
	fld	dword [ebp-4]
	fmul	dword [_591]
	faddp	st1,st0
	faddp	st2,st0
	fxch	st1
	fstp	dword [ebp-12]
	fxch	st1
	fmul	dword [_592]
	fld	dword [ebp-4]
	fmul	dword [_593]
	faddp	st1,st0
	faddp	st1,st0
	fstp	dword [ebp-8]
	cmp	dword [_601],_bbNullObject
	je	_1068
	mov	ebx,dword [_601]
	mov	eax,dword [ebx+8]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [_601]
	dec	dword [eax+4]
	jnz	_1072
	push	eax
	call	_bbGCFree
	add	esp,4
_1072:
	mov	dword [_601],esi
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_1076
	push	eax
	call	_bbGCFree
	add	esp,4
_1076:
	mov	dword [ebx+8],esi
	jmp	_1077
_1068:
	push	_74
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
_1077:
	mov	eax,dword [ebp+32]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_1081
	push	eax
	call	_bbGCFree
	add	esp,4
_1081:
	mov	dword [ebx+12],esi
	cmp	edi,_bbNullObject
	je	_1082
	mov	eax,edi
	push	0
	push	1
	push	dword [ebp+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,16
	mov	esi,eax
	mov	edx,dword [_brl_pixmap_AlphaBitsPerPixel]
	mov	eax,dword [esi+24]
	cmp	dword [edx+eax*4+24],0
	je	_1084
	inc	dword [esi+4]
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_1088
	push	eax
	call	_bbGCFree
	add	esp,4
_1088:
	mov	dword [ebx+16],esi
_1084:
_1082:
	mov	eax,ebx
	push	dword [ebp-8]
	push	dword [ebp-12]
	push	dword [ebp-16]
	push	dword [ebp-20]
	push	dword [ebp-24]
	push	dword [ebp-28]
	push	dword [ebp-32]
	push	dword [ebp-36]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,36
	mov	eax,ebx
	jmp	_582
_582:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_77:
	push	ebp
	mov	ebp,esp
	sub	esp,16
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	mov	dword [ebp-4],_bbEmptyArray
	mov	edi,0
	mov	dword [ebp-8],eax
	mov	dword [ebp-12],0
	jmp	_1096
_80:
	mov	edx,dword [ebp+12]
	mov	eax,1
	mov	ecx,dword [ebp-12]
	shl	eax,cl
	and	edx,eax
	cmp	edx,0
	je	_1097
	mov	edx,dword [_597]
	mov	eax,dword [ebp-12]
	mov	ebx,dword [edx+eax*4+24]
	jmp	_81
_83:
	push	ebx
	push	dword [ebp-8]
	call	_75
	add	esp,8
	cmp	eax,0
	je	_1098
	mov	eax,dword [ebp-4]
	cmp	edi,dword [eax+20]
	jne	_1099
	mov	eax,edi
	add	eax,4
	mov	dword [ebp+-16],eax
	fild	dword [ebp+-16]
	fmul	dword [_1464]
	sub	esp,8
	fstp	qword [esp]
	call	_bbFloatToInt
	add	esp,8
	push	eax
	push	0
	push	dword [ebp-4]
	push	_165
	call	_bbArraySlice
	add	esp,16
	mov	dword [ebp-4],eax
_1099:
	mov	eax,dword [ebx+12]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebp-4]
	mov	eax,dword [eax+edi*4+24]
	dec	dword [eax+4]
	jnz	_1103
	push	eax
	call	_bbGCFree
	add	esp,4
_1103:
	mov	eax,dword [ebp-4]
	mov	dword [eax+edi*4+24],esi
	add	edi,1
_1098:
	mov	ebx,dword [ebx+8]
_81:
	cmp	ebx,_bbNullObject
	jne	_83
_82:
_1097:
_78:
	add	dword [ebp-12],1
_1096:
	cmp	dword [ebp-12],31
	jle	_80
_79:
	mov	dword [ebp-12],0
	jmp	_1104
_86:
	mov	edx,dword [ebp+16]
	mov	eax,1
	mov	ecx,dword [ebp-12]
	shl	eax,cl
	and	edx,eax
	cmp	edx,0
	je	_1105
	cmp	dword [_601],_bbNullObject
	je	_1106
	mov	ebx,dword [_601]
	mov	eax,dword [ebx+8]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [_601]
	dec	dword [eax+4]
	jnz	_1110
	push	eax
	call	_bbGCFree
	add	esp,4
_1110:
	mov	dword [_601],esi
	jmp	_1111
_1106:
	push	_74
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
_1111:
	mov	eax,dword [ebp-8]
	mov	eax,dword [eax+12]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_1115
	push	eax
	call	_bbGCFree
	add	esp,4
_1115:
	mov	dword [ebx+12],esi
	mov	eax,dword [ebp-8]
	mov	eax,dword [eax+16]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_1119
	push	eax
	call	_bbGCFree
	add	esp,4
_1119:
	mov	dword [ebx+16],esi
	mov	eax,dword [ebp-8]
	mov	eax,dword [eax+20]
	mov	dword [ebx+20],eax
	push	64
	mov	eax,dword [ebp-8]
	mov	eax,dword [eax+40]
	lea	eax,byte [eax+24]
	push	eax
	mov	eax,dword [ebx+40]
	lea	eax,byte [eax+24]
	push	eax
	call	_bbMemCopy
	add	esp,12
	mov	eax,dword [ebp-8]
	fld	dword [eax+24]
	fstp	dword [ebx+24]
	mov	eax,dword [ebp-8]
	fld	dword [eax+28]
	fstp	dword [ebx+28]
	mov	eax,dword [ebp-8]
	fld	dword [eax+32]
	fstp	dword [ebx+32]
	mov	eax,dword [ebp-8]
	fld	dword [eax+36]
	fstp	dword [ebx+36]
	mov	edx,dword [_597]
	mov	eax,dword [ebp-12]
	mov	eax,dword [edx+eax*4+24]
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_1123
	push	eax
	call	_bbGCFree
	add	esp,4
_1123:
	mov	dword [ebx+8],esi
	inc	dword [ebx+4]
	mov	edx,dword [_597]
	mov	eax,dword [ebp-12]
	mov	eax,dword [edx+eax*4+24]
	dec	dword [eax+4]
	jnz	_1127
	push	eax
	call	_bbGCFree
	add	esp,4
_1127:
	mov	edx,dword [_597]
	mov	eax,dword [ebp-12]
	mov	dword [edx+eax*4+24],ebx
_1105:
_84:
	add	dword [ebp-12],1
_1104:
	cmp	dword [ebp-12],31
	jle	_86
_85:
	cmp	edi,0
	je	_1128
	push	edi
	push	0
	push	dword [ebp-4]
	push	_165
	call	_bbArraySlice
	add	esp,16
	jmp	_587
_1128:
	mov	eax,_bbEmptyArray
	jmp	_587
_587:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_602:
	dd	0
	align	4
__brl_max2d_TMax2DGraphics_default_font:
	dd	_bbNullObject
	align	4
__brl_max2d_TMax2DGraphics_mask_red:
	dd	0
	align	4
__brl_max2d_TMax2DGraphics_mask_green:
	dd	0
	align	4
__brl_max2d_TMax2DGraphics_mask_blue:
	dd	0
	align	4
__brl_max2d_TMax2DGraphics_auto_midhandle:
	dd	0
	align	4
__brl_max2d_TMax2DGraphics_auto_imageflags:
	dd	3
_88:
	db	"TMax2DGraphics",0
_89:
	db	"color_red",0
_90:
	db	"i",0
_91:
	db	"color_green",0
_92:
	db	"color_blue",0
_93:
	db	"color_alpha",0
_94:
	db	"f",0
_95:
	db	"clscolor_red",0
_96:
	db	"clscolor_green",0
_97:
	db	"clscolor_blue",0
_98:
	db	"line_width",0
_99:
	db	"tform_rot",0
_100:
	db	"tform_scale_x",0
_101:
	db	"tform_scale_y",0
_102:
	db	"tform_ix",0
_103:
	db	"tform_iy",0
_104:
	db	"tform_jx",0
_105:
	db	"tform_jy",0
_106:
	db	"viewport_x",0
_107:
	db	"viewport_y",0
_108:
	db	"viewport_w",0
_109:
	db	"viewport_h",0
_110:
	db	"origin_x",0
_111:
	db	"origin_y",0
_112:
	db	"handle_x",0
_113:
	db	"handle_y",0
_114:
	db	"image_font",0
_115:
	db	":TImageFont",0
_116:
	db	"blend_mode",0
_117:
	db	"vres_width",0
_118:
	db	"vres_height",0
_119:
	db	"vres_mousexscale",0
_120:
	db	"vres_mouseyscale",0
_121:
	db	"g_width",0
_122:
	db	"g_height",0
_123:
	db	"_graphics",0
_124:
	db	":TGraphics",0
_125:
	db	"_driver",0
_126:
	db	":TMax2DDriver",0
_127:
	db	"_setup",0
_128:
	db	"New",0
_129:
	db	"()i",0
_130:
	db	"Delete",0
_131:
	db	"Driver",0
_132:
	db	"():TMax2DDriver",0
_133:
	db	"GetSettings",0
_134:
	db	"(*i,*i,*i,*i,*i)i",0
_135:
	db	"Close",0
_136:
	db	"Validate",0
_137:
	db	"MakeCurrent",0
_138:
	db	"ClearCurrent",0
_139:
	db	"Current",0
_140:
	db	"():TMax2DGraphics",0
_141:
	db	"Create",0
_142:
	db	"(:TGraphics,:TMax2DDriver):TMax2DGraphics",0
	align	4
_87:
	dd	2
	dd	_88
	dd	3
	dd	_89
	dd	_90
	dd	8
	dd	3
	dd	_91
	dd	_90
	dd	12
	dd	3
	dd	_92
	dd	_90
	dd	16
	dd	3
	dd	_93
	dd	_94
	dd	20
	dd	3
	dd	_95
	dd	_90
	dd	24
	dd	3
	dd	_96
	dd	_90
	dd	28
	dd	3
	dd	_97
	dd	_90
	dd	32
	dd	3
	dd	_98
	dd	_94
	dd	36
	dd	3
	dd	_99
	dd	_94
	dd	40
	dd	3
	dd	_100
	dd	_94
	dd	44
	dd	3
	dd	_101
	dd	_94
	dd	48
	dd	3
	dd	_102
	dd	_94
	dd	52
	dd	3
	dd	_103
	dd	_94
	dd	56
	dd	3
	dd	_104
	dd	_94
	dd	60
	dd	3
	dd	_105
	dd	_94
	dd	64
	dd	3
	dd	_106
	dd	_90
	dd	68
	dd	3
	dd	_107
	dd	_90
	dd	72
	dd	3
	dd	_108
	dd	_90
	dd	76
	dd	3
	dd	_109
	dd	_90
	dd	80
	dd	3
	dd	_110
	dd	_94
	dd	84
	dd	3
	dd	_111
	dd	_94
	dd	88
	dd	3
	dd	_112
	dd	_94
	dd	92
	dd	3
	dd	_113
	dd	_94
	dd	96
	dd	3
	dd	_114
	dd	_115
	dd	100
	dd	3
	dd	_116
	dd	_90
	dd	104
	dd	3
	dd	_117
	dd	_94
	dd	108
	dd	3
	dd	_118
	dd	_94
	dd	112
	dd	3
	dd	_119
	dd	_94
	dd	116
	dd	3
	dd	_120
	dd	_94
	dd	120
	dd	3
	dd	_121
	dd	_90
	dd	124
	dd	3
	dd	_122
	dd	_90
	dd	128
	dd	3
	dd	_123
	dd	_124
	dd	132
	dd	3
	dd	_125
	dd	_126
	dd	136
	dd	3
	dd	_127
	dd	_90
	dd	140
	dd	6
	dd	_128
	dd	_129
	dd	16
	dd	6
	dd	_130
	dd	_129
	dd	20
	dd	6
	dd	_131
	dd	_132
	dd	52
	dd	6
	dd	_133
	dd	_134
	dd	56
	dd	6
	dd	_135
	dd	_129
	dd	60
	dd	6
	dd	_136
	dd	_129
	dd	64
	dd	6
	dd	_137
	dd	_129
	dd	68
	dd	7
	dd	_138
	dd	_129
	dd	72
	dd	7
	dd	_139
	dd	_140
	dd	76
	dd	7
	dd	_141
	dd	_142
	dd	80
	dd	0
	align	4
_brl_max2d_TMax2DGraphics:
	dd	_brl_graphics_TGraphics
	dd	_bbObjectFree
	dd	_87
	dd	144
	dd	__brl_max2d_TMax2DGraphics_New
	dd	__brl_max2d_TMax2DGraphics_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__brl_graphics_TGraphics__pad
	dd	__brl_max2d_TMax2DGraphics_Driver
	dd	__brl_max2d_TMax2DGraphics_GetSettings
	dd	__brl_max2d_TMax2DGraphics_Close
	dd	__brl_max2d_TMax2DGraphics_Validate
	dd	__brl_max2d_TMax2DGraphics_MakeCurrent
	dd	__brl_max2d_TMax2DGraphics_ClearCurrent
	dd	__brl_max2d_TMax2DGraphics_Current
	dd	__brl_max2d_TMax2DGraphics_Create
_144:
	db	"rpoly",0
_145:
	db	"texture",0
_146:
	db	":TPixmap",0
_147:
	db	"data",0
_148:
	db	"[]f",0
_149:
	db	"channels",0
_150:
	db	"count",0
_151:
	db	"size",0
_152:
	db	"ldat",0
_153:
	db	"ladd",0
_154:
	db	"rdat",0
_155:
	db	"radd",0
_156:
	db	"Left",0
_157:
	db	"Right",0
_158:
	db	"top",0
_159:
	db	"state",0
	align	4
_143:
	dd	2
	dd	_144
	dd	3
	dd	_145
	dd	_146
	dd	8
	dd	3
	dd	_147
	dd	_148
	dd	12
	dd	3
	dd	_149
	dd	_90
	dd	16
	dd	3
	dd	_150
	dd	_90
	dd	20
	dd	3
	dd	_151
	dd	_90
	dd	24
	dd	3
	dd	_152
	dd	_148
	dd	28
	dd	3
	dd	_153
	dd	_148
	dd	32
	dd	3
	dd	_154
	dd	_148
	dd	36
	dd	3
	dd	_155
	dd	_148
	dd	40
	dd	3
	dd	_156
	dd	_90
	dd	44
	dd	3
	dd	_157
	dd	_90
	dd	48
	dd	3
	dd	_158
	dd	_90
	dd	52
	dd	3
	dd	_159
	dd	_90
	dd	56
	dd	6
	dd	_128
	dd	_129
	dd	16
	dd	6
	dd	_130
	dd	_129
	dd	20
	dd	0
	align	4
_32:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_143
	dd	60
	dd	__brl_max2d_rpoly_New
	dd	__brl_max2d_rpoly_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
_161:
	db	"TQuad",0
_162:
	db	"link",0
_163:
	db	":TQuad",0
_164:
	db	"id",0
_165:
	db	":Object",0
_166:
	db	"mask",0
_167:
	db	"frame",0
_168:
	db	"minx",0
_169:
	db	"miny",0
_170:
	db	"maxx",0
_171:
	db	"maxy",0
_172:
	db	"xyuv",0
_173:
	db	"SetCoords",0
_174:
	db	"(f,f,f,f,f,f,f,f)i",0
	align	4
_160:
	dd	2
	dd	_161
	dd	3
	dd	_162
	dd	_163
	dd	8
	dd	3
	dd	_164
	dd	_165
	dd	12
	dd	3
	dd	_166
	dd	_146
	dd	16
	dd	3
	dd	_167
	dd	_90
	dd	20
	dd	3
	dd	_168
	dd	_94
	dd	24
	dd	3
	dd	_169
	dd	_94
	dd	28
	dd	3
	dd	_170
	dd	_94
	dd	32
	dd	3
	dd	_171
	dd	_94
	dd	36
	dd	3
	dd	_172
	dd	_148
	dd	40
	dd	6
	dd	_128
	dd	_129
	dd	16
	dd	6
	dd	_130
	dd	_129
	dd	20
	dd	6
	dd	_173
	dd	_174
	dd	48
	dd	0
	align	4
_74:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_160
	dd	44
	dd	__brl_max2d_TQuad_New
	dd	__brl_max2d_TQuad_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__brl_max2d_TQuad_SetCoords
	align	4
_589:
	dd	_bbNullObject
	align	4
_590:
	dd	0x0
	align	4
_591:
	dd	0x0
	align	4
_592:
	dd	0x0
	align	4
_593:
	dd	0x0
	align	4
_594:
	dd	_bbEmptyArray
	align	4
_595:
	dd	_bbEmptyArray
	align	4
_599:
	dd	0
_596:
	db	":TQuad",0
	align	4
_597:
	dd	_bbEmptyArray
	align	4
_601:
	dd	_bbNullObject
	align	4
_1308:
	dd	0x3f000000
	align	4
_1309:
	dd	0x3f000000
_877:
	db	":rpoly",0
	align	4
_1369:
	dd	0x3f000000
	align	4
_1370:
	dd	0x3f000000
_980:
	db	"i",0
	align	4
_1401:
	dd	0x3f000000
	align	4
_1402:
	dd	0x0
	align	4
_1403:
	dd	0x0
	align	4
_1404:
	dd	0x3f800000
	align	4
_1405:
	dd	0x3f800000
_1007:
	db	"f",0
_1025:
	db	"[]f",0
_1027:
	db	":TPixmap",0
_1029:
	db	"i",0
	align	4
_1439:
	dd	0x0
	align	4
_1440:
	dd	0x0
	align	4
_1464:
	dd	0x3f99999a
