;;; Arachnus_FlameAttack ;;;
08024118 (T)  push    r4,r14
0802411A (T)  add     sp,-0Ch
0802411C (T)  ldr     r0,=EnemyOrientation      ;\
0802411E (T)  mov     r12,r0                    ; r12 = $EnemyOrientation
08024120 (T)  ldrh    r0,[r0,16h]               ;} If EnemyAnimation != 3: branch to 802418Ah
08024122 (T)  cmp     r0,3h                     ;|
08024124 (T)  bne     802418Ah                  ;/
08024126 (T)  mov     r1,r12                    ;\
08024128 (T)  ldrb    r0,[r1,1Ch]               ;|
0802412A (T)  cmp     r0,1h                     ;} If EnemyAnimationCounter != 1: branch to 802418Ah
0802412C (T)  bne     802418Ah                  ;/
0802412E (T)  ldrh    r1,[r1]                   ;\
08024130 (T)  mov     r4,40h                    ;|
08024132 (T)  mov     r0,r4                     ;|
08024134 (T)  and     r0,r1                     ;|
08024136 (T)  lsl     r0,r0,10h                 ;} If EnemyOrientation has 40h (facing right):
08024138 (T)  lsr     r1,r0,10h                 ;|
0802413A (T)  cmp     r1,0h                     ;|
0802413C (T)  beq     8024164h                  ;/
0802413E (T)  mov     r0,r12                    ;\
08024140 (T)  ldrb    r2,[r0,1Fh]               ;} r2 parameter = EnemySpritesetGFXSlot
08024142 (T)  add     r0,23h                    ;\
08024144 (T)  ldrb    r3,[r0]                   ;} r3 parameter = EnemySlot
08024146 (T)  mov     r1,r12                    ;\
08024148 (T)  ldrh    r0,[r1,2h]                ;|
0802414A (T)  sub     r0,80h                    ;} sp0 parameter = EnemyYPosition - 80h
0802414C (T)  str     r0,[sp]                   ;/
0802414E (T)  ldrh    r0,[r1,4h]                ;\
08024150 (T)  add     r0,40h                    ;} sp4 parameter = EnemyXPosition + 40h
08024152 (T)  str     r0,[sp,4h]                ;/
08024154 (T)  str     r4,[sp,8h]                ; sp8 parameter = 40h
08024156 (T)  mov     r0,1Ah                    ; r0 parameter = 1Ah (flame projectile)
08024158 (T)  mov     r1,0h                     ; r1 parameter = 0
0802415A (T)  bl      800FAE0h                  ; Execute subroutine Enemy_SpawnNewEnemy
0802415E (T)  b       8024184h
08024160      dd      0030006BCh

08024164 (T)  mov     r4,r12                    ;\ Else (EnemyOrientation hasn't 40h):
08024166 (T)  ldrb    r2,[r4,1Fh]               ;} r2 parameter = EnemySpritesetGFXSlot
08024168 (T)  mov     r0,r12                    ;\
0802416A (T)  add     r0,23h                    ;} r3 parameter = EnemySlot
0802416C (T)  ldrb    r3,[r0]                   ;/
0802416E (T)  ldrh    r0,[r4,2h]                ;\
08024170 (T)  sub     r0,80h                    ;} sp0 parameter = EnemyYPosition - 80h
08024172 (T)  str     r0,[sp]                   ;/
08024174 (T)  ldrh    r0,[r4,4h]                ;\
08024176 (T)  sub     r0,40h                    ;} sp4 parameter = EnemyXPosition - 40h
08024178 (T)  str     r0,[sp,4h]                ;/
0802417A (T)  str     r1,[sp,8h]                ; sp8 parameter = 40h
0802417C (T)  mov     r0,1Ah                    ; r0 parameter = 1Ah (flame projectile)
0802417E (T)  mov     r1,0h                     ; r1 parameter = 0
08024180 (T)  bl      800FAE0h                  ; Execute subroutine Enemy_SpawnNewEnemy

08024184 (T)  mov     r0,0BCh                   ; r0 parameter = 0BCh
08024186 (T)  bl      800270Ch                  ; Execute subroutine 800270Ch (sounds effect related)

0802418A (T)  bl      801196Ch                  ; Execute subroutine Enemy_CheckAnimationLoopNextFrame
0802418E (T)  cmp     r0,0h                     ;\
08024190 (T)  beq     80241A2h                  ;} If returned 0 (more animation): return
08024192 (T)  ldr     r1,=EnemyOrientation      ;\
08024194 (T)  mov     r2,r1                     ;|
08024196 (T)  add     r2,24h                    ;} EnemyPose = 1 (thinking)
08024198 (T)  mov     r0,1h                     ;|
0802419A (T)  strb    r0,[r2]                   ;/
0802419C (T)  add     r1,2Eh                    ;\
0802419E (T)  mov     r0,78h                    ;} EnemyRespawnTimer = 78h
080241A0 (T)  strb    r0,[r1]                   ;/

080241A2 (T)  add     sp,0Ch
080241A4 (T)  pop     r4
080241A6 (T)  pop     r0
080241A8 (T)  bx      r0
080241AA      dw      00000h
080241AC      dd      0030006BCh