.gba
.open "zm.gba","BombChain.gba",0x8000000

.org 0x805924C
	bl FreeSpaceA

.org 0x805925A
	bl FreeSpaceB
	
.org 0x8304054	;Crocomire Gfx, unused
FreeSpaceA:
	cmp r0,0h
	beq ReturnA
	ldr r0,=3000079h	;Current clipdata affacting action
	ldrb r0,[r0]
	cmp r0,0Eh	;Check, if Samus started the chain
	bls ReturnA
ReturnB:
	ldr r1,=80592AEh
	mov r15,r1
ReturnA:
	ldr r1,=8059250h
	mov r15,r1
	
FreeSpaceB:
	cmp r0,0h
	bne ReturnD
	ldr r0,=30056BCh	;This value is !=0, if a chain is running (don't know exactly, what this valus is for)
	ldrb r0,[r0]
	cmp r0,0h	;Check, if a chain is still running
	beq ReturnB
ReturnD:
	ldr r1,=805925Eh
	mov r15,r1

.pool
.close