;;; Arachnus_HitWallFromRollAttack ;;;
08023D18 (T)  push    r4-r7,r14
08023D1A (T)  ldr     r3,=EnemyOrientation  ;\
08023D1C (T)  mov     r0,r3                 ;|
08023D1E (T)  add     r0,2Fh                ;} r5 = EnemyAttachedEnemySlot
08023D20 (T)  ldrb    r5,[r0]               ;/
08023D22 (T)  ldr     r2,=EnemySlot0        ;\
08023D24 (T)  lsl     r0,r5,3h              ;|
08023D26 (T)  sub     r0,r0,r5              ;|
08023D28 (T)  lsl     r0,r0,3h              ;|
08023D2A (T)  mov     r1,r2                 ;} r0 = Enemy[EnemyAttachedEnemySlot]GraphicPointer
08023D2C (T)  add     r1,18h                ;|
08023D2E (T)  add     r0,r0,r1              ;|
08023D30 (T)  ldr     r0,[r0]               ;/
08023D32 (T)  mov     r4,r3                 ; r4 = $EnemyOrientation
08023D34 (T)  mov     r7,r2                 ; r7 = EnemySlot0
08023D36 (T)  ldr     r1,=8302CF4h          ;\
08023D38 (T)  mov     r12,r1                ;} r12 = 8302CF4h
08023D3A (T)  cmp     r0,r12                ;\
08023D3C (T)  bne     8023D64h              ;} If Enemy[EnemyAttachedEnemySlot]GraphicPointer == 8302CF4h:
08023D3E (T)  mov     r0,r5                 ; r0 parameter = EnemyAttachedEnemySlot
08023D40 (T)  bl      80119F0h              ; Execute subroutine 80119F0h (Animation related?)
08023D44 (T)  cmp     r0,0h                 ;\
08023D46 (T)  beq     8023E22h              ;} If returned 0: return
08023D48 (T)  mov     r1,r4                 ;\
08023D4A (T)  add     r1,24h                ;|
08023D4C (T)  mov     r0,7h                 ;} Enemy pose = 7h (standing initialisation)
08023D4E (T)  strb    r0,[r1]               ;/
08023D50 (T)  add     r1,0Ah                ;\
08023D52 (T)  mov     r0,0FFh               ;} Enemy respawn timer = FFh
08023D54 (T)  strb    r0,[r1]               ;/
08023D56 (T)  b       8023E22h              ; Return
08023D58      dd      0030006BCh,003000140h,008302CF4h

08023D64 (T)  mov     r6,r4                 ;\ Else (Enemy[EnemyAttachedEnemySlot]GraphicPointer != 8302CF4h):
08023D66 (T)  add     r6,31h                ;} r6 = $Enemy31
08023D68 (T)  ldrb    r1,[r6]               ; r1 = Enemy31
08023D6A (T)  ldr     r2,=82FD0D0h          ; r2 = 82FD0D0h
08023D6C (T)  lsl     r0,r1,1h              ;\
08023D6E (T)  add     r0,r0,r2              ;} r3 = [82FD0D0 + (Enemy31<<1)]
08023D70 (T)  ldrh    r3,[r0]               ;/
08023D72 (T)  ldr     r0,=7FFFh             ;\
08023D74 (T)  cmp     r3,r0                 ;} If r3 == 7FFFh:
08023D76 (T)  bne     8023D8Ch              ;/
08023D78 (T)  sub     r0,r1,1               ;\
08023D7A (T)  lsl     r0,r0,1h              ;|
08023D7C (T)  add     r0,r0,r2              ;} r3 = [82FD0CE + (Enemy31<<1)]
08023D7E (T)  ldrh    r3,[r0]               ;/
08023D80 (T)  b       8023D90h              ;
08023D82      dw      00000h
08023D84      dd      0082FD0D0h,000007FFFh

08023D8C (T)  add     r0,r1,1               ;\ Else (r3 != 7FFFh):
08023D8E (T)  strb    r0,[r6]               ;} ++Enemy31

08023D90 (T)  ldrh    r0,[r4,2h]            ;\
08023D92 (T)  add     r0,r3,r0              ;} EnemyYPosition += r3
08023D94 (T)  strh    r0,[r4,2h]            ;/
08023D96 (T)  lsl     r2,r5,3h              ;\
08023D98 (T)  sub     r1,r2,r5              ;|
08023D9A (T)  lsl     r1,r1,3h              ;|
08023D9C (T)  add     r1,r1,r7              ;} Enemy[EnemyAttachedEnemySlot]YPosition += r3
08023D9E (T)  ldrh    r0,[r1,2h]            ;|
08023DA0 (T)  add     r0,r3,r0              ;|
08023DA2 (T)  strh    r0,[r1,2h]            ;/
08023DA4 (T)  mov     r0,r4                 ;\
08023DA6 (T)  add     r0,31h                ;|
08023DA8 (T)  ldrb    r0,[r0]               ;|
08023DAA (T)  mov     r3,8h                 ;|
08023DAC (T)  mov     r6,r2                 ;}      / 8; Enemy31 <= Bh
08023DAE (T)  cmp     r0,0Bh                ;} r3 = { 4; Bh < Enemy31 <= 14h
08023DB0 (T)  bls     8023DBAh              ;}      \ 0; Enemy31 > 14h
08023DB2 (T)  mov     r3,0h                 ;|
08023DB4 (T)  cmp     r0,14h                ;|
08023DB6 (T)  bhi     8023DBAh              ;|
08023DB8 (T)  mov     r3,4h                 ;/

08023DBA (T)  ldrh    r1,[r4]               ;\
08023DBC (T)  mov     r0,40h                ;|
08023DBE (T)  and     r0,r1                 ;} If Arachnus facing right:
08023DC0 (T)  cmp     r0,0h                 ;|
08023DC2 (T)  beq     8023DE0h              ;/
08023DC4 (T)  ldrh    r0,[r4,4h]            ;\
08023DC6 (T)  sub     r0,r0,r3              ;} EnemyXPosition -= r3
08023DC8 (T)  strh    r0,[r4,4h]            ;/
08023DCA (T)  sub     r1,r6,r5              ;\
08023DCC (T)  lsl     r1,r1,3h              ;|
08023DCE (T)  add     r1,r1,r7              ;|
08023DD0 (T)  ldrh    r0,[r1,4h]            ;} Enemy[EnemyAttachedEnemySlot]XPosition -= r3
08023DD2 (T)  sub     r0,r0,r3              ;|
08023DD4 (T)  strh    r0,[r1,4h]            ;/
08023DD6 (T)  add     r1,2Bh                ;\
08023DD8 (T)  lsr     r2,r3,1h              ;|
08023DDA (T)  ldrb    r0,[r1]               ;} r0 = Enemy[EnemyAttachedEnemySlot]2B -= (r3>>1)
08023DDC (T)  sub     r0,r0,r2              ;/
08023DDE (T)  b       8023DFAh              ;

08023DE0 (T)  ldrh    r0,[r4,4h]            ;\ Else (Arachnus facing left):
08023DE2 (T)  add     r0,r3,r0              ;} EnemyXPosition += r3
08023DE4 (T)  strh    r0,[r4,4h]            ;/
08023DE6 (T)  sub     r1,r6,r5              ;\
08023DE8 (T)  lsl     r1,r1,3h              ;|
08023DEA (T)  add     r1,r1,r7              ;|
08023DEC (T)  ldrh    r0,[r1,4h]            ;} Enemy[EnemyAttachedEnemySlot]XPosition += r3
08023DEE (T)  add     r0,r3,r0              ;|
08023DF0 (T)  strh    r0,[r1,4h]            ;/
08023DF2 (T)  add     r1,2Bh                ;\
08023DF4 (T)  lsr     r0,r3,1h              ;|
08023DF6 (T)  ldrb    r2,[r1]               ;} r0 = Enemy[EnemyAttachedEnemySlot]2B += (r3>>1)
08023DF8 (T)  add     r0,r0,r2              ;/

08023DFA (T)  strb    r0,[r1]
08023DFC (T)  mov     r0,r4                 ;\
08023DFE (T)  add     r0,31h                ;|
08023E00 (T)  ldrb    r0,[r0]               ;} If Enemy31 != 22h: return
08023E02 (T)  cmp     r0,22h                ;|
08023E04 (T)  bne     8023E22h              ;/
08023E06 (T)  mov     r0,r12                ; r0 parameter = 8302CF4h
08023E08 (T)  bl      8012304h              ; Execute subroutine Enemy_SetAttachedEnemyGraphics
08023E0C (T)  ldr     r0,=EnemySlot0        ;\
08023E0E (T)  sub     r1,r6,r5              ;|
08023E10 (T)  lsl     r1,r1,3h              ;|
08023E12 (T)  add     r1,r1,r0              ;|
08023E14 (T)  ldrh    r2,[r1]               ;} Enemy[EnemyAttachedEnemySlot]Orientation !|= 0080h
08023E16 (T)  ldr     r0,=0FF7Fh            ;|
08023E18 (T)  and     r0,r2                 ;|
08023E1A (T)  strh    r0,[r1]               ;/
08023E1C (T)  mov     r0,0B5h               ; r0 = B5h
08023E1E (T)  bl      800270Ch              ; Execute subroutine 800270Ch (Sound effect?)

08023E22 (T)  pop     r4-r7
08023E24 (T)  pop     r0
08023E26 (T)  bx      r0
08023E28      dd      003000140h,00000FF7Fh