.gba
.open "zm.gba","PowerBombJump.gba",0x8000000

.org 0x80269F4
	bl FreeSpaceB
	cmp r0,0h
	beq 8026A30h
	nop

.org 0x8026A1C
	mov r0,r7

.org 0x8026A38
	bls 80269DEh

.org 0x80521FA
	cmp r0,0h
	beq 805220Eh
	cmp r0,1h
	beq 80522B0h
	cmp r0,2h
	beq 80522D8h
	cmp r0,3h
	beq 80522D8h
	b 80522FCh
	nop

.org 0x80522F6
	bl FreeSpaceA
	nop
	
.org 0x8043DF0	;Crocomire AI unused
FreeSpaceA:
	push r14
	bl 80576ECh
	strb r5,[r4]
	mov r0,r4
	ldrb r1,[r4,11h]
	cmp r1,3h
	bne NoBallCanon
	bl 8051E14h
	mov r0,0h
	strb r0,[r4]
NoBallCanon:
	bl 8051ECCh
Return:
	pop r0
	bx r0

FreeSpaceB:
	cmp r0,0Eh
	beq NBombs
	cmp r0,0Fh
	bne Return2
PBombs:
	ldrb r0,[r2,11h]
	cmp r0,2h
	bne Return2
	mov r7,3h
	b Return3
NBombs:
	ldrb r0,[r2,11h]
	cmp r0,1h
	bne Return2
	mov r7,4h
	b Return3
Return2:
	mov r0,0h
Return3:
	bx r14

.pool
.close