	format	MS COFF
	extrn	___bb_blitz_blitz
	extrn	___bb_system_system
	extrn	_bbGCFree
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectFree
	extrn	_bbObjectNew
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbTimerStart
	extrn	_bbTimerStop
	extrn	_brl_event_CreateEvent
	extrn	_brl_event_EmitEvent
	extrn	_brl_system_WaitSystem
	public	___bb_timer_timer
	public	__brl_timer_TTimer_Create
	public	__brl_timer_TTimer_Delete
	public	__brl_timer_TTimer_Fire
	public	__brl_timer_TTimer_New
	public	__brl_timer_TTimer_Stop
	public	__brl_timer_TTimer_Ticks
	public	__brl_timer_TTimer_Wait
	public	_brl_timer_CreateTimer
	public	_brl_timer_StopTimer
	public	_brl_timer_TTimer
	public	_brl_timer_TimerTicks
	public	_brl_timer_WaitTimer
	public	_brl_timer__TimerFired
	section	"code" code
___bb_timer_timer:
	push	ebp
	mov	ebp,esp
	cmp	dword [_65],0
	je	_66
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_66:
	mov	dword [_65],1
	call	___bb_blitz_blitz
	call	___bb_system_system
	push	_brl_timer_TTimer
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,0
	jmp	_25
_25:
	mov	esp,ebp
	pop	ebp
	ret
_brl_timer__TimerFired:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,4
	mov	eax,0
	jmp	_28
_28:
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_brl_timer_TTimer
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+20],eax
	mov	dword [ebx+24],0
	mov	eax,0
	jmp	_31
_31:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_34:
	mov	eax,dword [ebx+20]
	dec	dword [eax+4]
	jnz	_72
	push	eax
	call	_bbGCFree
	add	esp,4
_72:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_74
	push	eax
	call	_bbGCFree
	add	esp,4
_74:
	mov	eax,0
	jmp	_70
_70:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Ticks:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	jmp	_37
_37:
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Stop:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	cmp	dword [esi+24],0
	jne	_75
	mov	eax,0
	jmp	_40
_75:
	push	esi
	push	dword [esi+24]
	call	_bbTimerStop
	add	esp,8
	mov	dword [esi+24],0
	mov	ebx,_bbNullObject
	inc	dword [ebx+4]
	mov	eax,dword [esi+20]
	dec	dword [eax+4]
	jnz	_79
	push	eax
	call	_bbGCFree
	add	esp,4
_79:
	mov	dword [esi+20],ebx
	mov	eax,0
	jmp	_40
_40:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Fire:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	cmp	dword [eax+24],0
	jne	_80
	mov	eax,0
	jmp	_43
_80:
	add	dword [eax+8],1
	cmp	dword [eax+20],_bbNullObject
	je	_81
	push	dword [eax+20]
	call	_brl_event_EmitEvent
	add	esp,4
	jmp	_82
_81:
	push	_bbNullObject
	push	0
	push	0
	push	0
	push	dword [eax+8]
	push	eax
	push	2049
	call	_brl_event_CreateEvent
	add	esp,28
	push	eax
	call	_brl_event_EmitEvent
	add	esp,4
_82:
	mov	eax,0
	jmp	_43
_43:
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Wait:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	cmp	dword [ebx+24],0
	jne	_83
	mov	eax,0
	jmp	_46
_83:
_5:
	call	_brl_system_WaitSystem
	mov	eax,dword [ebx+8]
	sub	eax,dword [ebx+12]
_3:
	cmp	eax,0
	je	_5
_4:
	add	dword [ebx+12],eax
	jmp	_46
_46:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__brl_timer_TTimer_Create:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+12]
	push	_brl_timer_TTimer
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	push	ebx
	push	dword [ebp+8]
	call	_bbTimerStart
	add	esp,8
	mov	edi,eax
	cmp	edi,0
	jne	_87
	mov	eax,_bbNullObject
	jmp	_50
_87:
	mov	eax,esi
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+20]
	dec	dword [eax+4]
	jnz	_91
	push	eax
	call	_bbGCFree
	add	esp,4
_91:
	mov	dword [ebx+20],esi
	mov	dword [ebx+24],edi
	mov	eax,ebx
	jmp	_50
_50:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_brl_timer_CreateTimer:
	push	ebp
	mov	ebp,esp
	fld	dword [ebp+8]
	mov	eax,dword [ebp+12]
	push	eax
	sub	esp,4
	fstp	dword [esp]
	call	dword [_brl_timer_TTimer+64]
	add	esp,8
	jmp	_54
_54:
	mov	esp,ebp
	pop	ebp
	ret
_brl_timer_TimerTicks:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	jmp	_57
_57:
	mov	esp,ebp
	pop	ebp
	ret
_brl_timer_WaitTimer:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,4
	jmp	_60
_60:
	mov	esp,ebp
	pop	ebp
	ret
_brl_timer_StopTimer:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	mov	eax,0
	jmp	_63
_63:
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_65:
	dd	0
_7:
	db	"TTimer",0
_8:
	db	"_ticks",0
_9:
	db	"i",0
_10:
	db	"_wticks",0
_11:
	db	"_cycle",0
_12:
	db	":TTimer",0
_13:
	db	"_event",0
_14:
	db	":TEvent",0
_15:
	db	"_handle",0
_16:
	db	"New",0
_17:
	db	"()i",0
_18:
	db	"Delete",0
_19:
	db	"Ticks",0
_20:
	db	"Stop",0
_21:
	db	"Fire",0
_22:
	db	"Wait",0
_23:
	db	"Create",0
_24:
	db	"(f,:TEvent):TTimer",0
	align	4
_6:
	dd	2
	dd	_7
	dd	3
	dd	_8
	dd	_9
	dd	8
	dd	3
	dd	_10
	dd	_9
	dd	12
	dd	3
	dd	_11
	dd	_12
	dd	16
	dd	3
	dd	_13
	dd	_14
	dd	20
	dd	3
	dd	_15
	dd	_9
	dd	24
	dd	6
	dd	_16
	dd	_17
	dd	16
	dd	6
	dd	_18
	dd	_17
	dd	20
	dd	6
	dd	_19
	dd	_17
	dd	48
	dd	6
	dd	_20
	dd	_17
	dd	52
	dd	6
	dd	_21
	dd	_17
	dd	56
	dd	6
	dd	_22
	dd	_17
	dd	60
	dd	7
	dd	_23
	dd	_24
	dd	64
	dd	0
	align	4
_brl_timer_TTimer:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_6
	dd	28
	dd	__brl_timer_TTimer_New
	dd	__brl_timer_TTimer_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__brl_timer_TTimer_Ticks
	dd	__brl_timer_TTimer_Stop
	dd	__brl_timer_TTimer_Fire
	dd	__brl_timer_TTimer_Wait
	dd	__brl_timer_TTimer_Create
