	format	MS COFF
	extrn	_CreateAudioStream_Memory
	extrn	_MaxMod_AddChannelEffect
	extrn	_MaxMod_CloseSound
	extrn	_MaxMod_CloseStream
	extrn	_MaxMod_CreateMemStream
	extrn	_MaxMod_CreateSound
	extrn	_MaxMod_CreateStream
	extrn	_MaxMod_FillScope
	extrn	_MaxMod_FreeChannel
	extrn	_MaxMod_OutputWavFile
	extrn	_MaxMod_SetChannelRateAdjuster
	extrn	_MaxMod_SetGlobalVolume
	extrn	_MaxMod_SetVerbose
	extrn	___bb_audio_audio
	extrn	___bb_bank_bank
	extrn	___bb_blitz_blitz
	extrn	___bb_linkedlist_linkedlist
	extrn	___bb_map_map
	extrn	___bb_standardio_standardio
	extrn	___bb_system_system
	extrn	__brl_audio_TAudioDriver_Delete
	extrn	__brl_audio_TAudioDriver_LoadSound
	extrn	__brl_audio_TAudioDriver_New
	extrn	__brl_audio_TChannel_Delete
	extrn	__brl_audio_TChannel_New
	extrn	__brl_audio_TSound_Delete
	extrn	__brl_audio_TSound_Load
	extrn	__brl_audio_TSound_New
	extrn	_bbEmptyString
	extrn	_bbGCCollect
	extrn	_bbGCFree
	extrn	_bbIncbinLen
	extrn	_bbIncbinPtr
	extrn	_bbMemFree
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectDowncast
	extrn	_bbObjectFree
	extrn	_bbObjectNew
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbStringClass
	extrn	_bbStringCompare
	extrn	_bbStringConcat
	extrn	_bbStringFind
	extrn	_bbStringFromInt
	extrn	_bbStringSplit
	extrn	_bbStringToCString
	extrn	_bbStringToInt
	extrn	_bbStringToLower
	extrn	_bbStringToUpper
	extrn	_brl_audio_ResumeChannel
	extrn	_brl_audio_TAudioDriver
	extrn	_brl_audio_TChannel
	extrn	_brl_audio_TSound
	extrn	_brl_audiosample_BytesPerSample
	extrn	_brl_audiosample_ChannelsPerSample
	extrn	_brl_audiosample_CreateAudioSample
	extrn	_brl_bank_TBank
	extrn	_brl_blitz_NullFunctionError
	extrn	_brl_blitz_NullMethodError
	extrn	_brl_linkedlist_CreateList
	extrn	_brl_map_CreateMap
	extrn	_brl_map_MapInsert
	extrn	_brl_map_MapValueForKey
	extrn	_brl_map_TMap
	extrn	_brl_standardio_Print
	extrn	_brl_system_Notify
	public	___bb_maxmod2_maxmod2
	public	__maxmod2_maxmod2_MaxModLoader_Create
	public	__maxmod2_maxmod2_MaxModLoader_Delete
	public	__maxmod2_maxmod2_MaxModLoader_GetExtensions
	public	__maxmod2_maxmod2_MaxModLoader_List
	public	__maxmod2_maxmod2_MaxModLoader_Load
	public	__maxmod2_maxmod2_MaxModLoader_MMLoader
	public	__maxmod2_maxmod2_MaxModLoader_New
	public	__maxmod2_maxmod2_TCustomMusic_Delete
	public	__maxmod2_maxmod2_TCustomMusic_Loader
	public	__maxmod2_maxmod2_TCustomMusic_New
	public	__maxmod2_maxmod2_TMaxModChannel_Delete
	public	__maxmod2_maxmod2_TMaxModChannel_Lock
	public	__maxmod2_maxmod2_TMaxModChannel_New
	public	__maxmod2_maxmod2_TMaxModChannel_Playing
	public	__maxmod2_maxmod2_TMaxModChannel_SetChannelRateAdjuster
	public	__maxmod2_maxmod2_TMaxModChannel_SetDepth
	public	__maxmod2_maxmod2_TMaxModChannel_SetPan
	public	__maxmod2_maxmod2_TMaxModChannel_SetPaused
	public	__maxmod2_maxmod2_TMaxModChannel_SetRate
	public	__maxmod2_maxmod2_TMaxModChannel_SetVolume
	public	__maxmod2_maxmod2_TMaxModChannel_Stop
	public	__maxmod2_maxmod2_TMaxModChannel_Unlock
	public	__maxmod2_maxmod2_TMaxModDriver_APIs
	public	__maxmod2_maxmod2_TMaxModDriver_Active
	public	__maxmod2_maxmod2_TMaxModDriver_AddAPI
	public	__maxmod2_maxmod2_TMaxModDriver_AllocChannel
	public	__maxmod2_maxmod2_TMaxModDriver_CreateSound
	public	__maxmod2_maxmod2_TMaxModDriver_Delete
	public	__maxmod2_maxmod2_TMaxModDriver_GetAPIName
	public	__maxmod2_maxmod2_TMaxModDriver_GetAPINames
	public	__maxmod2_maxmod2_TMaxModDriver_GetAPIid
	public	__maxmod2_maxmod2_TMaxModDriver_Name
	public	__maxmod2_maxmod2_TMaxModDriver_New
	public	__maxmod2_maxmod2_TMaxModDriver_RemoveAPI
	public	__maxmod2_maxmod2_TMaxModDriver_SetAPI
	public	__maxmod2_maxmod2_TMaxModDriver_SetNamedAPI
	public	__maxmod2_maxmod2_TMaxModDriver_Shutdown
	public	__maxmod2_maxmod2_TMaxModDriver_Startup
	public	__maxmod2_maxmod2_TMaxModDriver_registerAPIs
	public	__maxmod2_maxmod2_TMaxModEffect_Delete
	public	__maxmod2_maxmod2_TMaxModEffect_New
	public	__maxmod2_maxmod2_TMaxModSound_Cue
	public	__maxmod2_maxmod2_TMaxModSound_Delete
	public	__maxmod2_maxmod2_TMaxModSound_New
	public	__maxmod2_maxmod2_TMaxModSound_Play
	public	__maxmod2_maxmod2_TMaxModStreamDriver_AddDriver
	public	__maxmod2_maxmod2_TMaxModStreamDriver_Delete
	public	__maxmod2_maxmod2_TMaxModStreamDriver_Drivers
	public	__maxmod2_maxmod2_TMaxModStreamDriver_New
	public	__maxmod2_maxmod2_TMaxModStreamDriver_SetDriver
	public	__maxmod2_maxmod2_TMusic_Delete
	public	__maxmod2_maxmod2_TMusic_FillBuffer
	public	__maxmod2_maxmod2_TMusic_GetBits
	public	__maxmod2_maxmod2_TMusic_GetChannels
	public	__maxmod2_maxmod2_TMusic_GetFormat
	public	__maxmod2_maxmod2_TMusic_GetLength
	public	__maxmod2_maxmod2_TMusic_GetLoopMode
	public	__maxmod2_maxmod2_TMusic_GetPosition
	public	__maxmod2_maxmod2_TMusic_GetSampleRate
	public	__maxmod2_maxmod2_TMusic_GetStatus
	public	__maxmod2_maxmod2_TMusic_IsSeekable
	public	__maxmod2_maxmod2_TMusic_New
	public	__maxmod2_maxmod2_TMusic_Seek
	public	__maxmod2_maxmod2_TMusic_SetLoopMode
	public	__maxmod2_maxmod2_TMusic_SetStatus
	public	_maxmod2_maxmod2_AddChannelEffect
	public	_maxmod2_maxmod2_ChannelSeek
	public	_maxmod2_maxmod2_ChannelSeekable
	public	_maxmod2_maxmod2_CreateAudioCallbackStream
	public	_maxmod2_maxmod2_CreateMemoryStream
	public	_maxmod2_maxmod2_CueMusic
	public	_maxmod2_maxmod2_GetChannelLength
	public	_maxmod2_maxmod2_GetChannelLoop
	public	_maxmod2_maxmod2_GetChannelPosition
	public	_maxmod2_maxmod2_GetChannelUV
	public	_maxmod2_maxmod2_GetCurrentAudioDriver
	public	_maxmod2_maxmod2_LoadMusic
	public	_maxmod2_maxmod2_LoadTMusic
	public	_maxmod2_maxmod2_MaxModFillScope
	public	_maxmod2_maxmod2_MaxModLoader
	public	_maxmod2_maxmod2_MaxModMainCustomThreadProc
	public	_maxmod2_maxmod2_MaxModVerbose
	public	_maxmod2_maxmod2_MusicExtensions
	public	_maxmod2_maxmod2_OutputWavFile
	public	_maxmod2_maxmod2_PlayMusic
	public	_maxmod2_maxmod2_SetAudioStreamDriver
	public	_maxmod2_maxmod2_SetChannelLoop
	public	_maxmod2_maxmod2_SetChannelLoopPoints
	public	_maxmod2_maxmod2_SetGlobalVolume
	public	_maxmod2_maxmod2_TCustomMusic
	public	_maxmod2_maxmod2_TMaxModChannel
	public	_maxmod2_maxmod2_TMaxModDriver
	public	_maxmod2_maxmod2_TMaxModEffect
	public	_maxmod2_maxmod2_TMaxModSound
	public	_maxmod2_maxmod2_TMaxModStreamDriver
	public	_maxmod2_maxmod2_TMusic
	section	"code" code
___bb_maxmod2_maxmod2:
	push	ebp
	mov	ebp,esp
	cmp	dword [_454],0
	je	_455
	mov	eax,0
	mov	esp,ebp
	pop	ebp
	ret
_455:
	mov	dword [_454],1
	call	___bb_blitz_blitz
	call	___bb_audio_audio
	call	___bb_linkedlist_linkedlist
	call	___bb_map_map
	call	___bb_bank_bank
	call	___bb_system_system
	call	___bb_standardio_standardio
	mov	eax,dword [_448]
	and	eax,1
	cmp	eax,0
	jne	_449
	push	_brl_map_TMap
	call	_bbObjectNew
	add	esp,4
	inc	dword [eax+4]
	mov	dword [__maxmod2_maxmod2_TMaxModStreamDriver_Drivers],eax
	or	dword [_448],1
_449:
	push	_maxmod2_maxmod2_TMaxModStreamDriver
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,dword [_448]
	and	eax,2
	cmp	eax,0
	jne	_451
	call	_brl_map_CreateMap
	inc	dword [eax+4]
	mov	dword [__maxmod2_maxmod2_TMaxModDriver_APIs],eax
	or	dword [_448],2
_451:
	push	_maxmod2_maxmod2_TMaxModDriver
	call	_bbObjectRegisterType
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModSound
	call	_bbObjectRegisterType
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModChannel
	call	_bbObjectRegisterType
	add	esp,4
	push	_maxmod2_maxmod2_TMusic
	call	_bbObjectRegisterType
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModEffect
	call	_bbObjectRegisterType
	add	esp,4
	push	_maxmod2_maxmod2_TCustomMusic
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,dword [_448]
	and	eax,4
	cmp	eax,0
	jne	_453
	call	_brl_linkedlist_CreateList
	inc	dword [eax+4]
	mov	dword [__maxmod2_maxmod2_MaxModLoader_List],eax
	or	dword [_448],4
_453:
	push	_maxmod2_maxmod2_MaxModLoader
	call	_bbObjectRegisterType
	add	esp,4
	mov	eax,0
	jmp	_147
_147:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_MaxModVerbose:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	call	_MaxMod_SetVerbose
	add	esp,4
	mov	eax,0
	jmp	_150
_150:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_MaxModFillScope:
	push	ebp
	mov	ebp,esp
	mov	edx,dword [ebp+8]
	mov	eax,dword [ebp+12]
	push	eax
	push	edx
	call	_MaxMod_FillScope
	add	esp,8
	mov	eax,0
	jmp	_154
_154:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_SetAudioStreamDriver:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	call	dword [_maxmod2_maxmod2_TMaxModStreamDriver+52]
	add	esp,4
	mov	eax,0
	jmp	_157
_157:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModStreamDriver_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMaxModStreamDriver
	mov	eax,0
	jmp	_160
_160:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModStreamDriver_Delete:
	push	ebp
	mov	ebp,esp
_163:
	mov	eax,0
	jmp	_456
_456:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModStreamDriver_AddDriver:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	cmp	esi,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	sete	al
	movzx	eax,al
	cmp	eax,0
	jne	_457
	push	_1
	push	ebx
	call	_bbStringCompare
	add	esp,8
	cmp	eax,0
	sete	al
	movzx	eax,al
_457:
	cmp	eax,0
	je	_459
	mov	eax,0
	jmp	_167
_459:
	push	esi
	push	ebx
	call	_bbStringToLower
	add	esp,4
	push	eax
	push	dword [__maxmod2_maxmod2_TMaxModStreamDriver_Drivers]
	call	_brl_map_MapInsert
	add	esp,12
	mov	eax,0
	jmp	_167
_167:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModStreamDriver_SetDriver:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	_maxmod2_maxmod2_TMaxModDriver
	push	ebx
	call	_bbStringToLower
	add	esp,4
	push	eax
	push	dword [__maxmod2_maxmod2_TMaxModStreamDriver_Drivers]
	call	_brl_map_MapValueForKey
	add	esp,8
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_461
	push	0
	push	_5
	push	ebx
	push	_4
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_brl_system_Notify
	add	esp,8
	mov	eax,0
	jmp	_170
_461:
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	cmp	eax,0
	jne	_463
	push	0
	push	_5
	push	ebx
	push	_6
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_brl_system_Notify
	add	esp,8
	mov	eax,0
	jmp	_170
_463:
	mov	eax,0
	jmp	_170
_170:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_GetCurrentAudioDriver:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_Active]
	jmp	_172
_172:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	__brl_audio_TAudioDriver_New
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMaxModDriver
	mov	dword [ebx+12],0
	mov	eax,_bbEmptyString
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	dword [ebx+20],0
	mov	eax,0
	jmp	_175
_175:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_178:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_467
	push	eax
	call	_bbGCFree
	add	esp,4
_467:
	mov	dword [ebx],_brl_audio_TAudioDriver
	push	ebx
	call	__brl_audio_TAudioDriver_Delete
	add	esp,4
	mov	eax,0
	jmp	_465
_465:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_Name:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+16]
	jmp	_181
_181:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_AddAPI:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	edx,dword [ebp+12]
	mov	eax,dword [ebp+16]
	mov	ebx,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	eax
	push	edx
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+56]
	add	esp,12
	mov	eax,0
	jmp	_186
_186:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_RemoveAPI:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+12]
	mov	ebx,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	eax
	call	_bbStringFromInt
	add	esp,4
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+68]
	add	esp,8
	mov	eax,0
	jmp	_190
_190:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_SetAPI:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	dword [eax+20],edx
	mov	eax,dword [eax+12]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax]
	add	esp,8
	jmp	_194
_194:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_SetNamedAPI:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,ebx
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+88]
	add	esp,8
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+80]
	add	esp,8
	jmp	_198
_198:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_GetAPIid:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	push	dword [ebp+12]
	call	_bbStringToUpper
	add	esp,4
	mov	dword [ebp+12],eax
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,4
	mov	ebx,eax
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	edi,eax
	jmp	_7
_9:
	mov	eax,edi
	push	_bbStringClass
	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	_7
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	_bbStringClass
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_482
	mov	eax,_bbEmptyString
_482:
	push	eax
	push	dword [ebp+12]
	call	_bbStringCompare
	add	esp,8
	cmp	eax,0
	jne	_483
	push	esi
	call	_bbStringToInt
	add	esp,4
	jmp	_202
_483:
_7:
	mov	eax,edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_9
_8:
	mov	eax,0
	jmp	_202
_202:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_GetAPIName:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,4
	mov	ebx,eax
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	edi,eax
	jmp	_10
_12:
	mov	eax,edi
	push	_bbStringClass
	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	_10
	push	esi
	call	_bbStringToInt
	add	esp,4
	cmp	eax,dword [ebp+12]
	jne	_491
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	_bbStringClass
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_494
	mov	eax,_bbEmptyString
_494:
	jmp	_206
_491:
_10:
	mov	eax,edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_12
_11:
	mov	eax,_13
	jmp	_206
_206:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_GetAPINames:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	call	_brl_linkedlist_CreateList
	mov	edi,eax
	mov	eax,edi
	push	_13
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,8
	mov	eax,dword [__maxmod2_maxmod2_TMaxModDriver_APIs]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+76]
	add	esp,4
	mov	esi,eax
	mov	eax,esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	ebx,eax
	jmp	_14
_16:
	mov	eax,ebx
	push	_bbStringClass
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	je	_14
	mov	edx,edi
	push	eax
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+68]
	add	esp,8
_14:
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_16
_15:
	mov	eax,edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+144]
	add	esp,4
	jmp	_209
_209:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_registerAPIs:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	_13
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+72]
	add	esp,12
	mov	eax,0
	jmp	_212
_212:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_Startup:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+4]
	add	esp,4
	jmp	_215
_215:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_Shutdown:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+8]
	add	esp,4
	jmp	_218
_218:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_CreateSound:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+12]
	push	_17
	call	_brl_standardio_Print
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModSound
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	mov	edx,dword [_brl_audiosample_ChannelsPerSample]
	mov	eax,dword [esi+20]
	mov	edi,dword [edx+eax*4+24]
	mov	edx,dword [_brl_audiosample_BytesPerSample]
	mov	eax,dword [esi+20]
	mov	ecx,dword [edx+eax*4+24]
	mov	eax,8
	cdq
	idiv	edi
	imul	ecx,eax
	mov	dword [ebp-4],ecx
	mov	edx,dword [esi+12]
	mov	eax,dword [_brl_audiosample_BytesPerSample]
	mov	ecx,dword [esi+20]
	imul	edx,dword [eax+ecx*4+24]
	mov	eax,edx
	push	dword [ebp+16]
	push	dword [esi+8]
	push	eax
	push	dword [esi+16]
	push	dword [ebp-4]
	push	edi
	call	_MaxMod_CreateSound
	add	esp,24
	mov	dword [ebx+12],eax
	mov	eax,dword [ebx+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	inc	dword [esi+4]
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_517
	push	eax
	call	_bbGCFree
	add	esp,4
_517:
	mov	dword [ebx+8],esi
	cmp	dword [ebx+12],0
	je	_518
	mov	eax,ebx
	jmp	_223
_518:
	mov	eax,_bbNullObject
	jmp	_223
_223:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModDriver_AllocChannel:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	esi,dword [ebp+8]
	push	_18
	call	_brl_standardio_Print
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModChannel
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	mov	eax,dword [esi+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+16]
	add	esp,4
	mov	dword [ebx+12],eax
	cmp	dword [ebx+12],0
	je	_521
	mov	eax,ebx
	jmp	_226
_521:
	mov	eax,_bbNullObject
	jmp	_226
_226:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModSound_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	__brl_audio_TSound_New
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMaxModSound
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	dword [ebx+12],0
	mov	eax,0
	jmp	_229
_229:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModSound_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	dword [ebx+12]
	call	_MaxMod_CloseSound
	add	esp,4
	mov	eax,dword [ebx+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
_232:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_526
	push	eax
	call	_bbGCFree
	add	esp,4
_526:
	mov	dword [ebx],_brl_audio_TSound
	push	ebx
	call	__brl_audio_TSound_Delete
	add	esp,4
	mov	eax,0
	jmp	_524
_524:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModSound_Play:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,8
	mov	ebx,eax
	push	ebx
	call	_brl_audio_ResumeChannel
	add	esp,4
	mov	eax,ebx
	jmp	_236
_236:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModSound_Cue:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	edi,dword [ebp+8]
	mov	eax,dword [ebp+12]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	cmp	esi,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_530
	push	_maxmod2_maxmod2_TMaxModChannel
	call	_bbObjectNew
	add	esp,4
	mov	esi,eax
	jmp	_531
_530:
	cmp	dword [esi+8],_bbNullObject
	je	_532
	mov	eax,dword [esi+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
_532:
	cmp	dword [esi+16],_bbNullObject
	je	_534
	mov	eax,dword [esi+16]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
_534:
_531:
	mov	eax,edi
	inc	dword [eax+4]
	mov	ebx,eax
	mov	eax,dword [esi+8]
	dec	dword [eax+4]
	jnz	_539
	push	eax
	call	_bbGCFree
	add	esp,4
_539:
	mov	dword [esi+8],ebx
	mov	eax,dword [edi+12]
	push	dword [esi+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
	mov	dword [esi+12],eax
	mov	eax,dword [edi+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	eax,esi
	jmp	_240
_240:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	__brl_audio_TChannel_New
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMaxModChannel
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	dword [ebx+12],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	eax,0
	jmp	_243
_243:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	cmp	dword [ebx+8],_bbNullObject
	je	_544
	mov	eax,dword [ebx+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
_544:
	cmp	dword [ebx+16],_bbNullObject
	je	_546
	mov	eax,dword [ebx+16]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
_546:
	push	dword [ebx+12]
	call	_MaxMod_FreeChannel
	add	esp,4
_246:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_550
	push	eax
	call	_bbGCFree
	add	esp,4
_550:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_552
	push	eax
	call	_bbGCFree
	add	esp,4
_552:
	mov	dword [ebx],_brl_audio_TChannel
	push	ebx
	call	__brl_audio_TChannel_Delete
	add	esp,4
	mov	eax,0
	jmp	_548
_548:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_Stop:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax]
	add	esp,4
	mov	eax,0
	jmp	_249
_249:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetPaused:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [eax+12]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+4]
	add	esp,8
	mov	eax,0
	jmp	_253
_253:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetVolume:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [eax+12]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+8]
	add	esp,8
	mov	eax,0
	jmp	_257
_257:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetPan:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [eax+12]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+12]
	add	esp,8
	mov	eax,0
	jmp	_261
_261:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetDepth:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [eax+12]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+16]
	add	esp,8
	mov	eax,0
	jmp	_265
_265:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetRate:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	dword [ebp+12]
	mov	eax,dword [eax+12]
	sub	esp,4
	fstp	dword [esp]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+20]
	add	esp,8
	mov	eax,0
	jmp	_269
_269:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_Playing:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+24]
	add	esp,4
	jmp	_272
_272:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_Lock:
	push	ebp
	mov	ebp,esp
	mov	eax,0
	jmp	_275
_275:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_Unlock:
	push	ebp
	mov	ebp,esp
	mov	eax,0
	jmp	_278
_278:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModChannel_SetChannelRateAdjuster:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	fld	qword [ebp+12]
	sub	esp,8
	fstp	qword [esp]
	push	dword [eax+12]
	call	_MaxMod_SetChannelRateAdjuster
	add	esp,12
	mov	eax,0
	jmp	_282
_282:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMusic
	mov	dword [ebx+8],0
	mov	dword [ebx+12],0
	mov	eax,_bbNullObject
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	eax,0
	jmp	_285
_285:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_Delete:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
_288:
	mov	eax,dword [eax+16]
	dec	dword [eax+4]
	jnz	_563
	push	eax
	call	_bbGCFree
	add	esp,4
_563:
	mov	eax,0
	jmp	_561
_561:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_FillBuffer:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [eax+8]
	push	edx
	push	ecx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax]
	add	esp,12
	jmp	_293
_293:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_Seek:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	mov	eax,dword [eax+8]
	push	edx
	push	ecx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+4]
	add	esp,12
	jmp	_298
_298:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_IsSeekable:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+44]
	add	esp,4
	jmp	_301
_301:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetLength:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [eax+8]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+8]
	add	esp,8
	jmp	_305
_305:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetStatus:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+16]
	add	esp,4
	jmp	_308
_308:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_SetStatus:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [eax+8]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+20]
	add	esp,8
	mov	eax,0
	jmp	_312
_312:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetPosition:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [eax+8]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+12]
	add	esp,8
	jmp	_316
_316:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetChannels:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+24]
	add	esp,4
	jmp	_319
_319:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetBits:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+28]
	add	esp,4
	jmp	_322
_322:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetSampleRate:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+32]
	add	esp,4
	jmp	_325
_325:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetLoopMode:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	eax,dword [eax+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+36]
	add	esp,4
	jmp	_328
_328:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_SetLoopMode:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	edx,dword [ebp+12]
	mov	eax,dword [eax+8]
	push	edx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+40]
	add	esp,8
	mov	eax,0
	jmp	_332
_332:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMusic_GetFormat:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+80]
	add	esp,4
	cmp	eax,2
	jne	_577
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+84]
	add	esp,4
	cmp	eax,8
	jne	_579
	mov	eax,4
	jmp	_335
_579:
	mov	eax,5
	jmp	_335
_577:
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+84]
	add	esp,4
	cmp	eax,8
	jne	_583
	mov	eax,1
	jmp	_335
_583:
	mov	eax,2
	jmp	_335
_335:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModEffect_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TMaxModEffect
	mov	dword [ebx+8],0
	mov	eax,0
	jmp	_338
_338:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TMaxModEffect_Delete:
	push	ebp
	mov	ebp,esp
_341:
	mov	eax,0
	jmp	_585
_585:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_MaxModMainCustomThreadProc:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	mov	ecx,dword [ebp+12]
	mov	edx,dword [ebp+16]
	push	edx
	push	ecx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,12
	jmp	_346
_346:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_CreateAudioCallbackStream:
	push	ebp
	mov	ebp,esp
	push	0
	push	_19
	call	_brl_system_Notify
	add	esp,8
	mov	eax,_bbNullObject
	jmp	_351
_351:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TCustomMusic_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	__maxmod2_maxmod2_TMusic_New
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_TCustomMusic
	mov	dword [ebx+20],44100
	mov	dword [ebx+24],16
	mov	dword [ebx+28],2
	mov	eax,0
	jmp	_354
_354:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TCustomMusic_Delete:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
_357:
	mov	dword [eax],_maxmod2_maxmod2_TMusic
	push	eax
	call	__maxmod2_maxmod2_TMusic_Delete
	add	esp,4
	mov	eax,0
	jmp	_587
_587:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_TCustomMusic_Loader:
	push	ebp
	mov	ebp,esp
	mov	eax,_bbNullObject
	jmp	_361
_361:
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_MaxModLoader_New:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
	push	ebx
	call	_bbObjectCtor
	add	esp,4
	mov	dword [ebx],_maxmod2_maxmod2_MaxModLoader
	mov	eax,_bbEmptyString
	inc	dword [eax+4]
	mov	dword [ebx+8],eax
	mov	dword [ebx+12],0
	mov	eax,_bbEmptyString
	inc	dword [eax+4]
	mov	dword [ebx+16],eax
	mov	eax,dword [__maxmod2_maxmod2_MaxModLoader_List]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+68]
	add	esp,8
	mov	eax,0
	jmp	_364
_364:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_MaxModLoader_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_367:
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_593
	push	eax
	call	_bbGCFree
	add	esp,4
_593:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_595
	push	eax
	call	_bbGCFree
	add	esp,4
_595:
	mov	eax,0
	jmp	_591
_591:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_MaxModLoader_Create:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	edi,dword [ebp+12]
	push	_maxmod2_maxmod2_MaxModLoader
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	mov	dword [ebx+12],esi
	mov	esi,edi
	inc	dword [esi+4]
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_600
	push	eax
	call	_bbGCFree
	add	esp,4
_600:
	mov	dword [ebx+8],esi
	mov	esi,dword [ebp+16]
	inc	dword [esi+4]
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_604
	push	eax
	call	_bbGCFree
	add	esp,4
_604:
	mov	dword [ebx+16],esi
	mov	eax,_bbNullObject
	jmp	_372
_372:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_MaxModLoader_GetExtensions:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	mov	edi,_bbEmptyString
	cmp	eax,0
	je	_606
	push	_20
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
	mov	esi,dword [__maxmod2_maxmod2_MaxModLoader_List]
	mov	eax,esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+140]
	add	esp,4
	mov	ebx,eax
	jmp	_21
_23:
	mov	eax,ebx
	push	_maxmod2_maxmod2_MaxModLoader
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	je	_21
	push	dword [eax+16]
	call	_bbStringToLower
	add	esp,4
	push	eax
	push	_24
	call	_bbStringConcat
	add	esp,8
	push	eax
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
_21:
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_23
_22:
_606:
	mov	ebx,dword [__maxmod2_maxmod2_MaxModLoader_List]
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+140]
	add	esp,4
	mov	dword [ebp-4],eax
	jmp	_25
_27:
	mov	eax,dword [ebp-4]
	push	_maxmod2_maxmod2_MaxModLoader
	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	_25
	push	_1
	push	edi
	call	_bbStringCompare
	add	esp,8
	cmp	eax,0
	je	_619
	push	_28
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
_619:
	push	dword [esi+16]
	call	_bbStringToLower
	add	esp,4
	push	eax
	push	_29
	push	dword [esi+8]
	call	_bbStringConcat
	add	esp,8
	push	eax
	call	_bbStringConcat
	add	esp,8
	push	eax
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
_25:
	mov	eax,dword [ebp-4]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_27
_26:
	cmp	dword [ebp+12],0
	je	_620
	push	_1
	push	edi
	call	_bbStringCompare
	add	esp,8
	cmp	eax,0
	je	_621
	push	_28
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
_621:
	push	_30
	push	edi
	call	_bbStringConcat
	add	esp,8
	mov	edi,eax
_620:
	mov	eax,edi
	jmp	_376
_376:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__maxmod2_maxmod2_MaxModLoader_Load:
	push	ebp
	mov	ebp,esp
	sub	esp,16
	push	ebx
	push	esi
	push	edi
	push	_bbStringClass
	push	dword [ebp+8]
	call	_bbObjectDowncast
	add	esp,8
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	jne	_624
	mov	ebx,_bbEmptyString
_624:
	push	_brl_bank_TBank
	push	dword [ebp+8]
	call	_bbObjectDowncast
	add	esp,8
	mov	dword [ebp-16],eax
	mov	dword [ebp-12],0
	cmp	dword [ebx+8],0
	je	_628
	push	0
	push	_31
	push	ebx
	call	_bbStringFind
	add	esp,12
	cmp	eax,0
	jl	_629
	push	_32
	push	ebx
	call	_bbStringSplit
	add	esp,8
	mov	ebx,eax
	push	dword [ebx+4+24]
	call	_bbIncbinLen
	add	esp,4
	push	eax
	push	dword [ebx+4+24]
	call	_bbIncbinPtr
	add	esp,4
	push	eax
	call	_MaxMod_CreateMemStream
	add	esp,8
	mov	dword [ebp-12],eax
	jmp	_631
_629:
	push	ebx
	call	_bbStringToCString
	add	esp,4
	mov	esi,eax
	push	esi
	call	_MaxMod_CreateStream
	add	esp,4
	mov	ebx,eax
	push	esi
	call	_bbMemFree
	add	esp,4
	mov	dword [ebp-12],ebx
_631:
	jmp	_634
_628:
	cmp	dword [ebp-16],_bbNullObject
	je	_635
	mov	ebx,dword [ebp-16]
	mov	eax,dword [ebp-16]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,4
	push	eax
	push	ebx
	mov	eax,dword [ebx]
	call	dword [eax+52]
	add	esp,4
	push	eax
	call	_MaxMod_CreateMemStream
	add	esp,8
	mov	dword [ebp-12],eax
	mov	dword [ebp+8],_33
_635:
_634:
	mov	eax,dword [ebp-12]
	cmp	eax,0
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_638
	mov	eax,_bbNullObject
	jmp	_379
_638:
	mov	ebx,dword [__maxmod2_maxmod2_MaxModLoader_List]
	mov	eax,ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+140]
	add	esp,4
	mov	edi,eax
	jmp	_34
_36:
	mov	eax,edi
	push	_maxmod2_maxmod2_MaxModLoader
	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	_34
	mov	edx,dword [ebp-12]
	push	0
	push	0
	lea	eax,dword [ebp-8]
	push	eax
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+16]
	add	esp,16
	cmp	dword [esi+12],0
	je	_646
	mov	eax,dword [esi+12]
	cmp	eax,0
	jne	_648
	mov	eax,_brl_blitz_NullFunctionError
_648:
	mov	dword [__maxmod2_maxmod2_MaxModLoader_MMLoader],eax
	push	_bbStringClass
	push	dword [ebp+8]
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_650
	mov	eax,_bbEmptyString
_650:
	push	eax
	push	dword [ebp-12]
	call	dword [__maxmod2_maxmod2_MaxModLoader_MMLoader]
	add	esp,8
	mov	esi,eax
	cmp	esi,_bbNullObject
	je	_651
	cmp	dword [ebp-16],_bbNullObject
	je	_652
	mov	ebx,dword [ebp-16]
	inc	dword [ebx+4]
	mov	eax,dword [esi+16]
	dec	dword [eax+4]
	jnz	_656
	push	eax
	call	_bbGCFree
	add	esp,4
_656:
	mov	dword [esi+16],ebx
_652:
	mov	eax,esi
	jmp	_379
_651:
_646:
_34:
	mov	eax,edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	cmp	eax,0
	jne	_36
_35:
	push	dword [ebp-12]
	call	_MaxMod_CloseStream
	add	esp,4
	mov	eax,_bbNullObject
	jmp	_379
_379:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_LoadTMusic:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	eax
	call	dword [_maxmod2_maxmod2_MaxModLoader+56]
	add	esp,4
	jmp	_382
_382:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_MusicExtensions:
	push	ebp
	mov	ebp,esp
	mov	edx,dword [ebp+8]
	mov	eax,dword [ebp+12]
	push	eax
	push	edx
	call	dword [_maxmod2_maxmod2_MaxModLoader+52]
	add	esp,8
	jmp	_386
_386:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_LoadMusic:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	push	eax
	call	_maxmod2_maxmod2_LoadTMusic
	add	esp,4
	mov	esi,eax
	cmp	esi,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_658
	mov	ebx,_bbNullObject
	jmp	_389
_658:
	mov	eax,esi
	push	1
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	mov	ebx,eax
	mov	eax,esi
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+64]
	add	esp,8
	mov	dword [ebp-4],eax
	mov	eax,esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+88]
	add	esp,4
	mov	edi,eax
	mov	eax,esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+100]
	add	esp,4
	push	eax
	push	edi
	push	ebx
	call	_brl_audiosample_CreateAudioSample
	add	esp,12
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_668
	mov	ebx,_bbNullObject
	jmp	_389
_668:
	mov	eax,esi
	push	dword [ebp-4]
	push	dword [ebx+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+52]
	add	esp,12
	call	_bbGCCollect
	jmp	_389
_389:
	mov	eax,ebx
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_CueMusic:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	esi,dword [ebp+8]
	mov	edi,dword [ebp+12]
	push	_maxmod2_maxmod2_TMusic
	push	esi
	call	_bbObjectDowncast
	add	esp,8
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_671
	push	esi
	call	_maxmod2_maxmod2_LoadTMusic
	add	esp,4
	mov	ebx,eax
_671:
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_672
	mov	eax,_bbNullObject
	jmp	_393
_672:
	mov	eax,dword [ebx+8]
	push	edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+40]
	add	esp,8
	mov	eax,dword [ebx+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	push	_maxmod2_maxmod2_TMaxModChannel
	call	_bbObjectNew
	add	esp,4
	mov	esi,eax
	mov	eax,dword [ebx+8]
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+60]
	add	esp,8
	mov	dword [esi+12],eax
	mov	eax,dword [esi+12]
	push	edi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+44]
	add	esp,8
	inc	dword [ebx+4]
	mov	eax,dword [esi+16]
	dec	dword [eax+4]
	jnz	_681
	push	eax
	call	_bbGCFree
	add	esp,4
_681:
	mov	dword [esi+16],ebx
	mov	eax,esi
	jmp	_393
_393:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_PlayMusic:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	edx,dword [ebp+8]
	mov	eax,dword [ebp+12]
	push	eax
	push	edx
	call	_maxmod2_maxmod2_CueMusic
	add	esp,8
	mov	ebx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_683
	mov	eax,_bbNullObject
	jmp	_397
_683:
	push	ebx
	call	_brl_audio_ResumeChannel
	add	esp,4
	mov	eax,ebx
	jmp	_397
_397:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_CreateMemoryStream:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	push	edi
	mov	ebx,dword [ebp+8]
	mov	edi,dword [ebp+12]
	push	_maxmod2_maxmod2_TMusic
	push	ebx
	call	_bbObjectDowncast
	add	esp,8
	mov	esi,eax
	cmp	esi,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_685
	push	_bbStringClass
	push	ebx
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_687
	mov	eax,_bbEmptyString
_687:
	push	eax
	call	_maxmod2_maxmod2_LoadTMusic
	add	esp,4
	mov	esi,eax
_685:
	cmp	esi,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_688
	mov	eax,_bbNullObject
	jmp	_401
_688:
	mov	eax,dword [esi+8]
	push	1
	push	0
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+4]
	add	esp,12
	push	_maxmod2_maxmod2_TMaxModChannel
	call	_bbObjectNew
	add	esp,4
	mov	ebx,eax
	push	edi
	push	dword [esi+8]
	call	_CreateAudioStream_Memory
	add	esp,8
	mov	dword [ebx+12],eax
	mov	eax,esi
	inc	dword [eax+4]
	mov	edi,eax
	mov	eax,dword [ebx+16]
	dec	dword [eax+4]
	jnz	_694
	push	eax
	call	_bbGCFree
	add	esp,4
_694:
	mov	dword [ebx+16],edi
	mov	eax,dword [esi+8]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,4
	mov	eax,dword [ebx+12]
	cmp	eax,0
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_696
	mov	eax,_bbNullObject
	jmp	_401
_696:
	mov	eax,ebx
	jmp	_401
_401:
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_GetChannelLength:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_698
	mov	eax,0
	jmp	_405
_698:
	mov	eax,dword [edx+12]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+32]
	add	esp,8
	jmp	_405
_405:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_ChannelSeek:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	esi,dword [ebp+12]
	mov	ebx,dword [ebp+16]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_701
	mov	eax,-1
	jmp	_410
_701:
	mov	eax,dword [edx+12]
	push	ebx
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+36]
	add	esp,12
	jmp	_410
_410:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_ChannelSeekable:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_704
	mov	eax,-1
	jmp	_413
_704:
	mov	eax,dword [edx+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+56]
	add	esp,4
	jmp	_413
_413:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_GetChannelPosition:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_707
	mov	eax,0
	jmp	_417
_707:
	mov	eax,dword [edx+12]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+28]
	add	esp,8
	jmp	_417
_417:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_GetChannelLoop:
	push	ebp
	mov	ebp,esp
	mov	eax,dword [ebp+8]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_710
	mov	eax,0
	jmp	_420
_710:
	mov	eax,dword [edx+12]
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+40]
	add	esp,4
	jmp	_420
_420:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_SetChannelLoop:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_713
	mov	eax,0
	jmp	_424
_713:
	mov	eax,dword [edx+12]
	push	ebx
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+44]
	add	esp,8
	mov	eax,0
	jmp	_424
_424:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_SetChannelLoopPoints:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	esi,dword [ebp+12]
	mov	ebx,dword [ebp+16]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_716
	mov	eax,0
	jmp	_429
_716:
	mov	eax,dword [edx+12]
	push	ebx
	push	esi
	push	eax
	mov	eax,dword [eax]
	call	dword [eax+48]
	add	esp,12
	mov	eax,0
	jmp	_429
_429:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_GetChannelUV:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	esi,dword [ebp+12]
	mov	ebx,dword [ebp+16]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	jne	_719
	mov	eax,0
	jmp	_434
_719:
	mov	edx,dword [edx+12]
	lea	eax,qword [ebx]
	push	eax
	lea	eax,qword [esi]
	push	eax
	push	edx
	mov	eax,dword [edx]
	call	dword [eax+52]
	add	esp,12
	mov	eax,0
	jmp	_434
_434:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_AddChannelEffect:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	eax,dword [ebp+8]
	mov	ebx,dword [ebp+12]
	push	_maxmod2_maxmod2_TMaxModChannel
	push	eax
	call	_bbObjectDowncast
	add	esp,8
	mov	edx,eax
	cmp	edx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	sete	al
	movzx	eax,al
	cmp	eax,0
	jne	_722
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	sete	al
	movzx	eax,al
_722:
	cmp	eax,0
	je	_724
	mov	eax,0
	jmp	_438
_724:
	push	dword [ebx+8]
	push	dword [edx+12]
	call	_MaxMod_AddChannelEffect
	add	esp,8
	mov	eax,1
	jmp	_438
_438:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_SetGlobalVolume:
	push	ebp
	mov	ebp,esp
	fld	qword [ebp+8]
	sub	esp,8
	fstp	qword [esp]
	call	_MaxMod_SetGlobalVolume
	add	esp,8
	mov	eax,0
	jmp	_441
_441:
	mov	esp,ebp
	pop	ebp
	ret
_maxmod2_maxmod2_OutputWavFile:
	push	ebp
	mov	ebp,esp
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	esi,dword [ebp+12]
	push	eax
	call	_maxmod2_maxmod2_LoadTMusic
	add	esp,4
	mov	ebx,eax
	push	_bbStringClass
	push	esi
	call	_bbObjectDowncast
	add	esp,8
	cmp	eax,_bbNullObject
	jne	_727
	mov	eax,_bbEmptyString
_727:
	mov	edx,eax
	cmp	ebx,_bbNullObject
	setne	al
	movzx	eax,al
	cmp	eax,0
	je	_729
	mov	eax,dword [edx+8]
_729:
	cmp	eax,0
	jne	_731
	mov	eax,_bbNullObject
	jmp	_445
_731:
	push	edx
	call	_bbStringToCString
	add	esp,4
	mov	esi,eax
	push	esi
	push	dword [ebx+8]
	call	_MaxMod_OutputWavFile
	add	esp,8
	push	esi
	call	_bbMemFree
	add	esp,4
	mov	eax,_bbNullObject
	jmp	_445
_445:
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_454:
	dd	0
	align	4
_448:
	dd	0
	align	4
__maxmod2_maxmod2_TMaxModStreamDriver_Drivers:
	dd	_bbNullObject
_38:
	db	"TMaxModStreamDriver",0
_39:
	db	"New",0
_40:
	db	"()i",0
_41:
	db	"Delete",0
_42:
	db	"AddDriver",0
_43:
	db	"(:TMaxModDriver,$)i",0
_44:
	db	"SetDriver",0
_45:
	db	"($)i",0
	align	4
_37:
	dd	2
	dd	_38
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	7
	dd	_42
	dd	_43
	dd	48
	dd	7
	dd	_44
	dd	_45
	dd	52
	dd	0
	align	4
_maxmod2_maxmod2_TMaxModStreamDriver:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_37
	dd	8
	dd	__maxmod2_maxmod2_TMaxModStreamDriver_New
	dd	__maxmod2_maxmod2_TMaxModStreamDriver_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_TMaxModStreamDriver_AddDriver
	dd	__maxmod2_maxmod2_TMaxModStreamDriver_SetDriver
	align	4
__maxmod2_maxmod2_TMaxModDriver_Active:
	dd	_bbNullObject
	align	4
__maxmod2_maxmod2_TMaxModDriver_APIs:
	dd	_bbNullObject
_47:
	db	"TMaxModDriver",0
_48:
	db	"_driver",0
_49:
	db	"?IMaxModAudioDriver",0
_50:
	db	"_name",0
_51:
	db	"$",0
_52:
	db	"_currentAPI",0
_53:
	db	"i",0
_54:
	db	"Name",0
_55:
	db	"()$",0
_56:
	db	"AddAPI",0
_57:
	db	"(i,$)i",0
_58:
	db	"RemoveAPI",0
_59:
	db	"(i)i",0
_60:
	db	"SetAPI",0
_61:
	db	"SetNamedAPI",0
_62:
	db	"GetAPIid",0
_63:
	db	"GetAPIName",0
_64:
	db	"(i)$",0
_65:
	db	"GetAPINames",0
_66:
	db	"()[]:Object",0
_67:
	db	"registerAPIs",0
_68:
	db	"Startup",0
_69:
	db	"Shutdown",0
_70:
	db	"CreateSound",0
_71:
	db	"(:TAudioSample,i):TMaxModSound",0
_72:
	db	"AllocChannel",0
_73:
	db	"():TMaxModChannel",0
_74:
	db	"Create",0
_75:
	db	"($):TMaxModDriver",0
	align	4
_46:
	dd	2
	dd	_47
	dd	3
	dd	_48
	dd	_49
	dd	12
	dd	3
	dd	_50
	dd	_51
	dd	16
	dd	3
	dd	_52
	dd	_53
	dd	20
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	6
	dd	_54
	dd	_55
	dd	48
	dd	6
	dd	_56
	dd	_57
	dd	72
	dd	6
	dd	_58
	dd	_59
	dd	76
	dd	6
	dd	_60
	dd	_59
	dd	80
	dd	6
	dd	_61
	dd	_45
	dd	84
	dd	6
	dd	_62
	dd	_45
	dd	88
	dd	6
	dd	_63
	dd	_64
	dd	92
	dd	6
	dd	_65
	dd	_66
	dd	96
	dd	6
	dd	_67
	dd	_40
	dd	100
	dd	6
	dd	_68
	dd	_40
	dd	52
	dd	6
	dd	_69
	dd	_40
	dd	56
	dd	6
	dd	_70
	dd	_71
	dd	60
	dd	6
	dd	_72
	dd	_73
	dd	64
	dd	7
	dd	_74
	dd	_75
	dd	104
	dd	0
	align	4
_maxmod2_maxmod2_TMaxModDriver:
	dd	_brl_audio_TAudioDriver
	dd	_bbObjectFree
	dd	_46
	dd	24
	dd	__maxmod2_maxmod2_TMaxModDriver_New
	dd	__maxmod2_maxmod2_TMaxModDriver_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_TMaxModDriver_Name
	dd	__maxmod2_maxmod2_TMaxModDriver_Startup
	dd	__maxmod2_maxmod2_TMaxModDriver_Shutdown
	dd	__maxmod2_maxmod2_TMaxModDriver_CreateSound
	dd	__maxmod2_maxmod2_TMaxModDriver_AllocChannel
	dd	__brl_audio_TAudioDriver_LoadSound
	dd	__maxmod2_maxmod2_TMaxModDriver_AddAPI
	dd	__maxmod2_maxmod2_TMaxModDriver_RemoveAPI
	dd	__maxmod2_maxmod2_TMaxModDriver_SetAPI
	dd	__maxmod2_maxmod2_TMaxModDriver_SetNamedAPI
	dd	__maxmod2_maxmod2_TMaxModDriver_GetAPIid
	dd	__maxmod2_maxmod2_TMaxModDriver_GetAPIName
	dd	__maxmod2_maxmod2_TMaxModDriver_GetAPINames
	dd	__maxmod2_maxmod2_TMaxModDriver_registerAPIs
	dd	_brl_blitz_NullMethodError
_77:
	db	"TMaxModSound",0
_78:
	db	"_audiosample",0
_79:
	db	":TAudioSample",0
_80:
	db	"_sound",0
_81:
	db	"?IMaxModMusic",0
_82:
	db	"Play",0
_83:
	db	"(:TChannel):TMaxModChannel",0
_84:
	db	"Cue",0
	align	4
_76:
	dd	2
	dd	_77
	dd	3
	dd	_78
	dd	_79
	dd	8
	dd	3
	dd	_80
	dd	_81
	dd	12
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	6
	dd	_82
	dd	_83
	dd	48
	dd	6
	dd	_84
	dd	_83
	dd	52
	dd	0
	align	4
_maxmod2_maxmod2_TMaxModSound:
	dd	_brl_audio_TSound
	dd	_bbObjectFree
	dd	_76
	dd	16
	dd	__maxmod2_maxmod2_TMaxModSound_New
	dd	__maxmod2_maxmod2_TMaxModSound_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_TMaxModSound_Play
	dd	__maxmod2_maxmod2_TMaxModSound_Cue
	dd	__brl_audio_TSound_Load
_86:
	db	"TMaxModChannel",0
_87:
	db	":TMaxModSound",0
_88:
	db	"_channel",0
_89:
	db	"?IMaxModChannel",0
_90:
	db	"_music",0
_91:
	db	":TMusic",0
_92:
	db	"Stop",0
_93:
	db	"SetPaused",0
_94:
	db	"SetVolume",0
_95:
	db	"(f)i",0
_96:
	db	"SetPan",0
_97:
	db	"SetDepth",0
_98:
	db	"SetRate",0
_99:
	db	"Playing",0
_100:
	db	"Lock",0
_101:
	db	"Unlock",0
_102:
	db	"SetChannelRateAdjuster",0
_103:
	db	"(d)i",0
	align	4
_85:
	dd	2
	dd	_86
	dd	3
	dd	_80
	dd	_87
	dd	8
	dd	3
	dd	_88
	dd	_89
	dd	12
	dd	3
	dd	_90
	dd	_91
	dd	16
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	6
	dd	_92
	dd	_40
	dd	48
	dd	6
	dd	_93
	dd	_59
	dd	52
	dd	6
	dd	_94
	dd	_95
	dd	56
	dd	6
	dd	_96
	dd	_95
	dd	60
	dd	6
	dd	_97
	dd	_95
	dd	64
	dd	6
	dd	_98
	dd	_95
	dd	68
	dd	6
	dd	_99
	dd	_40
	dd	72
	dd	6
	dd	_100
	dd	_40
	dd	76
	dd	6
	dd	_101
	dd	_40
	dd	80
	dd	6
	dd	_102
	dd	_103
	dd	84
	dd	0
	align	4
_maxmod2_maxmod2_TMaxModChannel:
	dd	_brl_audio_TChannel
	dd	_bbObjectFree
	dd	_85
	dd	20
	dd	__maxmod2_maxmod2_TMaxModChannel_New
	dd	__maxmod2_maxmod2_TMaxModChannel_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_TMaxModChannel_Stop
	dd	__maxmod2_maxmod2_TMaxModChannel_SetPaused
	dd	__maxmod2_maxmod2_TMaxModChannel_SetVolume
	dd	__maxmod2_maxmod2_TMaxModChannel_SetPan
	dd	__maxmod2_maxmod2_TMaxModChannel_SetDepth
	dd	__maxmod2_maxmod2_TMaxModChannel_SetRate
	dd	__maxmod2_maxmod2_TMaxModChannel_Playing
	dd	__maxmod2_maxmod2_TMaxModChannel_Lock
	dd	__maxmod2_maxmod2_TMaxModChannel_Unlock
	dd	__maxmod2_maxmod2_TMaxModChannel_SetChannelRateAdjuster
_105:
	db	"TMusic",0
_106:
	db	"Music",0
_107:
	db	"Stream",0
_108:
	db	"?IMaxModStream",0
_109:
	db	"Bank",0
_110:
	db	":TBank",0
_111:
	db	"Loader",0
_112:
	db	"(:IMaxModStream,$):TMusic",0
_113:
	db	"FillBuffer",0
_114:
	db	"(*b,i)i",0
_115:
	db	"Seek",0
_116:
	db	"(i,i)i",0
_117:
	db	"IsSeekable",0
_118:
	db	"GetLength",0
_119:
	db	"GetStatus",0
_120:
	db	"SetStatus",0
_121:
	db	"GetPosition",0
_122:
	db	"GetChannels",0
_123:
	db	"GetBits",0
_124:
	db	"GetSampleRate",0
_125:
	db	"GetLoopMode",0
_126:
	db	"SetLoopMode",0
_127:
	db	"GetFormat",0
	align	4
_104:
	dd	2
	dd	_105
	dd	3
	dd	_106
	dd	_81
	dd	8
	dd	3
	dd	_107
	dd	_108
	dd	12
	dd	3
	dd	_109
	dd	_110
	dd	16
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	7
	dd	_111
	dd	_112
	dd	48
	dd	6
	dd	_113
	dd	_114
	dd	52
	dd	6
	dd	_115
	dd	_116
	dd	56
	dd	6
	dd	_117
	dd	_40
	dd	60
	dd	6
	dd	_118
	dd	_59
	dd	64
	dd	6
	dd	_119
	dd	_40
	dd	68
	dd	6
	dd	_120
	dd	_59
	dd	72
	dd	6
	dd	_121
	dd	_59
	dd	76
	dd	6
	dd	_122
	dd	_40
	dd	80
	dd	6
	dd	_123
	dd	_40
	dd	84
	dd	6
	dd	_124
	dd	_40
	dd	88
	dd	6
	dd	_125
	dd	_40
	dd	92
	dd	6
	dd	_126
	dd	_59
	dd	96
	dd	6
	dd	_127
	dd	_40
	dd	100
	dd	0
	align	4
_maxmod2_maxmod2_TMusic:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_104
	dd	20
	dd	__maxmod2_maxmod2_TMusic_New
	dd	__maxmod2_maxmod2_TMusic_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_brl_blitz_NullMethodError
	dd	__maxmod2_maxmod2_TMusic_FillBuffer
	dd	__maxmod2_maxmod2_TMusic_Seek
	dd	__maxmod2_maxmod2_TMusic_IsSeekable
	dd	__maxmod2_maxmod2_TMusic_GetLength
	dd	__maxmod2_maxmod2_TMusic_GetStatus
	dd	__maxmod2_maxmod2_TMusic_SetStatus
	dd	__maxmod2_maxmod2_TMusic_GetPosition
	dd	__maxmod2_maxmod2_TMusic_GetChannels
	dd	__maxmod2_maxmod2_TMusic_GetBits
	dd	__maxmod2_maxmod2_TMusic_GetSampleRate
	dd	__maxmod2_maxmod2_TMusic_GetLoopMode
	dd	__maxmod2_maxmod2_TMusic_SetLoopMode
	dd	__maxmod2_maxmod2_TMusic_GetFormat
_129:
	db	"TMaxModEffect",0
_130:
	db	"_effect",0
_131:
	db	"?IMaxModEffect",0
	align	4
_128:
	dd	2
	dd	_129
	dd	3
	dd	_130
	dd	_131
	dd	8
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	0
	align	4
_maxmod2_maxmod2_TMaxModEffect:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_128
	dd	12
	dd	__maxmod2_maxmod2_TMaxModEffect_New
	dd	__maxmod2_maxmod2_TMaxModEffect_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
_133:
	db	"TCustomMusic",0
_134:
	db	"SampleRate",0
_135:
	db	"Bits",0
_136:
	db	"Channels",0
	align	4
_132:
	dd	2
	dd	_133
	dd	3
	dd	_134
	dd	_53
	dd	20
	dd	3
	dd	_135
	dd	_53
	dd	24
	dd	3
	dd	_136
	dd	_53
	dd	28
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	7
	dd	_111
	dd	_112
	dd	48
	dd	6
	dd	_113
	dd	_114
	dd	52
	dd	0
	align	4
_maxmod2_maxmod2_TCustomMusic:
	dd	_maxmod2_maxmod2_TMusic
	dd	_bbObjectFree
	dd	_132
	dd	32
	dd	__maxmod2_maxmod2_TCustomMusic_New
	dd	__maxmod2_maxmod2_TCustomMusic_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_TCustomMusic_Loader
	dd	_brl_blitz_NullMethodError
	dd	__maxmod2_maxmod2_TMusic_Seek
	dd	__maxmod2_maxmod2_TMusic_IsSeekable
	dd	__maxmod2_maxmod2_TMusic_GetLength
	dd	__maxmod2_maxmod2_TMusic_GetStatus
	dd	__maxmod2_maxmod2_TMusic_SetStatus
	dd	__maxmod2_maxmod2_TMusic_GetPosition
	dd	__maxmod2_maxmod2_TMusic_GetChannels
	dd	__maxmod2_maxmod2_TMusic_GetBits
	dd	__maxmod2_maxmod2_TMusic_GetSampleRate
	dd	__maxmod2_maxmod2_TMusic_GetLoopMode
	dd	__maxmod2_maxmod2_TMusic_SetLoopMode
	dd	__maxmod2_maxmod2_TMusic_GetFormat
	align	4
__maxmod2_maxmod2_MaxModLoader_MMLoader:
	dd	_brl_blitz_NullFunctionError
	align	4
__maxmod2_maxmod2_MaxModLoader_List:
	dd	_bbNullObject
_138:
	db	"MaxModLoader",0
_139:
	db	"Func",0
_140:
	db	"*b",0
_141:
	db	"Ext",0
_142:
	db	"(*b,$,$):MaxModLoader",0
_143:
	db	"GetExtensions",0
_144:
	db	"(i,i)$",0
_145:
	db	"Load",0
_146:
	db	"(:Object):TMusic",0
	align	4
_137:
	dd	2
	dd	_138
	dd	3
	dd	_54
	dd	_51
	dd	8
	dd	3
	dd	_139
	dd	_140
	dd	12
	dd	3
	dd	_141
	dd	_51
	dd	16
	dd	6
	dd	_39
	dd	_40
	dd	16
	dd	6
	dd	_41
	dd	_40
	dd	20
	dd	7
	dd	_74
	dd	_142
	dd	48
	dd	7
	dd	_143
	dd	_144
	dd	52
	dd	7
	dd	_145
	dd	_146
	dd	56
	dd	0
	align	4
_maxmod2_maxmod2_MaxModLoader:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_137
	dd	20
	dd	__maxmod2_maxmod2_MaxModLoader_New
	dd	__maxmod2_maxmod2_MaxModLoader_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__maxmod2_maxmod2_MaxModLoader_Create
	dd	__maxmod2_maxmod2_MaxModLoader_GetExtensions
	dd	__maxmod2_maxmod2_MaxModLoader_Load
	align	4
_1:
	dd	_bbStringClass
	dd	2147483647
	dd	0
	align	4
_5:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	34
	align	4
_4:
	dd	_bbStringClass
	dd	2147483647
	dd	37
	dw	85,110,97,98,108,101,32,116,111,32,102,105,110,100,32,109
	dw	97,120,109,111,100,50,32,97,117,100,105,111,32,100,114,105
	dw	118,101,114,32,34
	align	4
_6:
	dd	_bbStringClass
	dd	2147483647
	dd	45
	dw	85,110,97,98,108,101,32,116,111,32,115,116,97,114,116,32
	dw	109,97,120,109,111,100,50,32,97,117,100,105,111,32,115,116
	dw	114,101,97,109,32,100,114,105,118,101,114,32,34
	align	4
_13:
	dd	_bbStringClass
	dd	2147483647
	dd	9
	dw	65,85,84,79,77,65,84,73,67
	align	4
_17:
	dd	_bbStringClass
	dd	2147483647
	dd	18
	dw	67,114,101,97,116,101,32,77,97,120,77,111,100,83,111,117
	dw	110,100
	align	4
_18:
	dd	_bbStringClass
	dd	2147483647
	dd	19
	dw	65,108,108,111,99,32,77,97,120,77,111,100,67,104,97,110
	dw	110,101,108
	align	4
_19:
	dd	_bbStringClass
	dd	2147483647
	dd	64
	dw	67,114,101,97,116,101,65,117,100,105,111,67,97,108,108,98
	dw	97,99,107,83,116,114,101,97,109,32,119,105,108,108,32,111
	dw	110,108,121,32,119,111,114,107,32,105,102,32,116,104,114,101
	dw	97,100,105,110,103,32,105,115,32,101,110,97,98,108,101,100
	align	4
_20:
	dd	_bbStringClass
	dd	2147483647
	dd	14
	dw	65,108,108,32,115,117,112,112,111,114,116,101,100,58
	align	4
_24:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	44
	align	4
_28:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	59
	align	4
_29:
	dd	_bbStringClass
	dd	2147483647
	dd	1
	dw	58
	align	4
_30:
	dd	_bbStringClass
	dd	2147483647
	dd	11
	dw	65,108,108,32,70,105,108,101,115,58,42
	align	4
_31:
	dd	_bbStringClass
	dd	2147483647
	dd	8
	dw	105,110,99,98,105,110,58,58
	align	4
_32:
	dd	_bbStringClass
	dd	2147483647
	dd	2
	dw	58,58
	align	4
_33:
	dd	_bbStringClass
	dd	2147483647
	dd	4
	dw	66,97,110,107
