.include "asm/macros.inc" .include "constants/constants.inc" .syntax unified .text thumb_func_start sub_80D51AC sub_80D51AC: @ 80D51AC push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 ldr r4, =gBattleAnimArgs ldrb r0, [r4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0xFF bne _080D51D0 adds r0, r5, 0 bl move_anim_task_del b _080D520C .pool _080D51D0: ldr r1, =gSprites lsls r0, r2, 4 adds r0, r2 lsls r0, 2 adds r0, r1 ldrh r1, [r4, 0x2] strh r1, [r0, 0x24] ldrh r1, [r4, 0x4] strh r1, [r0, 0x26] ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r0, r1 strh r2, [r0, 0x8] ldrh r1, [r4, 0x6] strh r1, [r0, 0xA] ldrh r1, [r4, 0x8] strh r1, [r0, 0xC] ldrh r1, [r4, 0x8] strh r1, [r0, 0xE] ldrh r1, [r4, 0x2] strh r1, [r0, 0x10] ldrh r1, [r4, 0x4] strh r1, [r0, 0x12] ldr r1, =sub_80D5220 str r1, [r0] adds r0, r5, 0 bl _call_via_r1 _080D520C: pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D51AC thumb_func_start sub_80D5220 sub_80D5220: @ 80D5220 push {r4-r7,lr} lsls r0, 24 lsrs r4, r0, 24 ldr r1, =gTasks lsls r0, r4, 2 adds r0, r4 lsls r0, 3 adds r3, r0, r1 ldrh r0, [r3, 0xE] movs r2, 0xE ldrsh r5, [r3, r2] adds r7, r1, 0 cmp r5, 0 bne _080D52C6 ldr r2, =gSprites movs r6, 0x8 ldrsh r1, [r3, r6] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r1, r0, r2 movs r6, 0x24 ldrsh r0, [r1, r6] adds r6, r2, 0 cmp r0, 0 bne _080D5264 ldrh r0, [r3, 0x10] strh r0, [r1, 0x24] b _080D5266 .pool _080D5264: strh r5, [r1, 0x24] _080D5266: lsls r2, r4, 2 adds r0, r2, r4 lsls r0, 3 adds r3, r0, r7 movs r0, 0x8 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r1, r0, r6 movs r5, 0x26 ldrsh r0, [r1, r5] cmp r0, 0 bne _080D5286 ldrh r0, [r3, 0x12] b _080D5288 _080D5286: movs r0, 0 _080D5288: strh r0, [r1, 0x26] adds r0, r2, r4 lsls r0, 3 adds r2, r0, r7 ldrh r0, [r2, 0xC] strh r0, [r2, 0xE] ldrh r0, [r2, 0xA] subs r0, 0x1 strh r0, [r2, 0xA] lsls r0, 16 asrs r3, r0, 16 cmp r3, 0 bne _080D52CA movs r0, 0x8 ldrsh r1, [r2, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r6 strh r3, [r0, 0x24] movs r5, 0x8 ldrsh r1, [r2, r5] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r6 strh r3, [r0, 0x26] adds r0, r4, 0 bl move_anim_task_del b _080D52CA _080D52C6: subs r0, 0x1 strh r0, [r3, 0xE] _080D52CA: pop {r4-r7} pop {r0} bx r0 thumb_func_end sub_80D5220 thumb_func_start sub_80D52D0 sub_80D52D0: @ 80D52D0 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 movs r6, 0 ldr r2, =gBattleAnimArgs ldrh r0, [r2] movs r3, 0 ldrsh r1, [r2, r3] cmp r1, 0x3 bgt _080D52FC lsls r0, 24 lsrs r0, 24 bl GetAnimBankSpriteId lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0xFF bne _080D5352 b _080D5356 .pool _080D52FC: cmp r1, 0x8 beq _080D5348 movs r1, 0 ldrsh r0, [r2, r1] cmp r0, 0x5 beq _080D531C cmp r0, 0x5 bgt _080D5312 cmp r0, 0x4 beq _080D5318 b _080D5324 _080D5312: cmp r0, 0x6 beq _080D5320 b _080D5324 _080D5318: movs r0, 0 b _080D5326 _080D531C: movs r0, 0x2 b _080D5326 _080D5320: movs r0, 0x1 b _080D5326 _080D5324: movs r0, 0x3 _080D5326: bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 bl b_side_obj__get_some_boolean lsls r0, 24 cmp r0, 0 bne _080D533C movs r6, 0x1 _080D533C: ldr r0, =gBankSpriteIds adds r0, r4, r0 b _080D5350 .pool _080D5348: ldr r1, =gBankSpriteIds ldr r0, =gAnimationBankAttacker ldrb r0, [r0] adds r0, r1 _080D5350: ldrb r3, [r0] _080D5352: cmp r6, 0 beq _080D5368 _080D5356: adds r0, r5, 0 bl move_anim_task_del b _080D53A6 .pool _080D5368: ldr r1, =gSprites lsls r0, r3, 4 adds r0, r3 lsls r0, 2 adds r0, r1 ldr r2, =gBattleAnimArgs ldrh r1, [r2, 0x2] strh r1, [r0, 0x24] ldrh r1, [r2, 0x4] strh r1, [r0, 0x26] ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r0, r1 strh r3, [r0, 0x8] ldrh r1, [r2, 0x6] strh r1, [r0, 0xA] ldrh r1, [r2, 0x8] strh r1, [r0, 0xC] ldrh r1, [r2, 0x8] strh r1, [r0, 0xE] ldrh r1, [r2, 0x2] strh r1, [r0, 0x10] ldrh r1, [r2, 0x4] strh r1, [r0, 0x12] ldr r1, =sub_80D53BC str r1, [r0] adds r0, r5, 0 bl _call_via_r1 _080D53A6: pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D52D0 thumb_func_start sub_80D53BC sub_80D53BC: @ 80D53BC push {r4-r7,lr} mov r7, r8 push {r7} lsls r0, 24 lsrs r6, r0, 24 ldr r1, =gTasks lsls r0, r6, 2 adds r0, r6 lsls r0, 3 adds r3, r0, r1 ldrh r2, [r3, 0xE] movs r4, 0xE ldrsh r0, [r3, r4] mov r12, r1 cmp r0, 0 bne _080D5474 ldr r2, =gSprites movs r7, 0x8 ldrsh r1, [r3, r7] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r4, r0, r2 movs r0, 0x24 ldrsh r1, [r4, r0] ldrh r5, [r3, 0x10] movs r7, 0x10 ldrsh r0, [r3, r7] adds r7, r2, 0 cmp r1, r0 bne _080D5408 negs r0, r5 strh r0, [r4, 0x24] b _080D540A .pool _080D5408: strh r5, [r4, 0x24] _080D540A: lsls r3, r6, 2 adds r1, r3, r6 lsls r1, 3 add r1, r12 movs r0, 0x8 ldrsh r2, [r1, r0] lsls r0, r2, 4 adds r0, r2 lsls r0, 2 adds r4, r0, r7 movs r0, 0x26 ldrsh r2, [r4, r0] mov r8, r2 ldrh r5, [r1, 0x12] movs r2, 0x12 ldrsh r0, [r1, r2] cmp r8, r0 bne _080D5434 negs r0, r5 strh r0, [r4, 0x26] b _080D5436 _080D5434: strh r5, [r4, 0x26] _080D5436: adds r0, r3, r6 lsls r0, 3 mov r4, r12 adds r3, r0, r4 ldrh r0, [r3, 0xC] strh r0, [r3, 0xE] ldrh r0, [r3, 0xA] subs r0, 0x1 strh r0, [r3, 0xA] lsls r0, 16 asrs r2, r0, 16 cmp r2, 0 bne _080D5478 movs r0, 0x8 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r7 strh r2, [r0, 0x24] movs r4, 0x8 ldrsh r1, [r3, r4] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r7 strh r2, [r0, 0x26] adds r0, r6, 0 bl move_anim_task_del b _080D5478 _080D5474: subs r0, r2, 0x1 strh r0, [r3, 0xE] _080D5478: pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 thumb_func_end sub_80D53BC thumb_func_start sub_80D5484 sub_80D5484: @ 80D5484 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 ldr r4, =gBattleAnimArgs ldrb r0, [r4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0xFF bne _080D54A8 adds r0, r5, 0 bl move_anim_task_del b _080D54F6 .pool _080D54A8: ldr r0, =gSprites lsls r1, r3, 4 adds r1, r3 lsls r1, 2 adds r1, r0 ldrh r0, [r4, 0x2] ldrh r2, [r1, 0x24] adds r0, r2 movs r2, 0 strh r0, [r1, 0x24] ldrh r0, [r4, 0x4] ldrh r6, [r1, 0x26] adds r0, r6 strh r0, [r1, 0x26] ldr r0, =gTasks lsls r1, r5, 2 adds r1, r5 lsls r1, 3 adds r1, r0 strh r3, [r1, 0x8] strh r2, [r1, 0xA] ldrh r0, [r4, 0x6] strh r0, [r1, 0xC] strh r2, [r1, 0xE] ldrh r0, [r4, 0x8] strh r0, [r1, 0x10] movs r2, 0x2 ldrsh r0, [r4, r2] lsls r0, 1 strh r0, [r1, 0x12] movs r6, 0x4 ldrsh r0, [r4, r6] lsls r0, 1 strh r0, [r1, 0x14] ldr r2, =sub_80D5508 str r2, [r1] adds r0, r5, 0 bl _call_via_r2 _080D54F6: pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D5484 thumb_func_start sub_80D5508 sub_80D5508: @ 80D5508 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r4, r0, r1 ldrh r2, [r4, 0xE] movs r3, 0xE ldrsh r0, [r4, r3] adds r6, r1, 0 cmp r0, 0 beq _080D5526 b _080D5638 _080D5526: ldrh r1, [r4, 0xA] movs r0, 0x1 ands r0, r1 cmp r0, 0 beq _080D5568 ldr r2, =gSprites movs r0, 0x8 ldrsh r1, [r4, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r4, 0x12] ldrh r3, [r0, 0x24] adds r1, r3 strh r1, [r0, 0x24] movs r0, 0x8 ldrsh r1, [r4, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r4, 0x14] ldrh r3, [r0, 0x26] adds r1, r3 strh r1, [r0, 0x26] adds r3, r2, 0 b _080D5592 .pool _080D5568: ldr r3, =gSprites movs r0, 0x8 ldrsh r1, [r4, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r3 ldrh r1, [r0, 0x24] ldrh r2, [r4, 0x12] subs r1, r2 strh r1, [r0, 0x24] movs r2, 0x8 ldrsh r1, [r4, r2] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r3 ldrh r1, [r0, 0x26] ldrh r2, [r4, 0x14] subs r1, r2 strh r1, [r0, 0x26] _080D5592: lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r4, r0, r6 ldrh r0, [r4, 0x10] strh r0, [r4, 0xE] ldrh r0, [r4, 0xA] adds r2, r0, 0x1 strh r2, [r4, 0xA] lsls r0, r2, 16 asrs r0, 16 movs r6, 0xC ldrsh r1, [r4, r6] cmp r0, r1 blt _080D563C movs r0, 0x1 ands r2, r0 cmp r2, 0 beq _080D55F8 movs r1, 0x8 ldrsh r0, [r4, r1] lsls r1, r0, 4 adds r1, r0 lsls r1, 2 adds r1, r3 movs r2, 0x12 ldrsh r0, [r4, r2] lsrs r2, r0, 31 adds r0, r2 asrs r0, 1 ldrh r6, [r1, 0x24] adds r0, r6 strh r0, [r1, 0x24] movs r1, 0x8 ldrsh r0, [r4, r1] lsls r1, r0, 4 adds r1, r0 lsls r1, 2 adds r1, r3 movs r2, 0x14 ldrsh r0, [r4, r2] lsrs r2, r0, 31 adds r0, r2 asrs r0, 1 ldrh r3, [r1, 0x26] adds r0, r3 strh r0, [r1, 0x26] b _080D5630 .pool _080D55F8: movs r6, 0x8 ldrsh r0, [r4, r6] lsls r2, r0, 4 adds r2, r0 lsls r2, 2 adds r2, r3 movs r0, 0x12 ldrsh r1, [r4, r0] lsrs r0, r1, 31 adds r1, r0 asrs r1, 1 ldrh r0, [r2, 0x24] subs r0, r1 strh r0, [r2, 0x24] movs r1, 0x8 ldrsh r0, [r4, r1] lsls r2, r0, 4 adds r2, r0 lsls r2, 2 adds r2, r3 movs r3, 0x14 ldrsh r1, [r4, r3] lsrs r0, r1, 31 adds r1, r0 asrs r1, 1 ldrh r0, [r2, 0x26] subs r0, r1 strh r0, [r2, 0x26] _080D5630: adds r0, r5, 0 bl move_anim_task_del b _080D563C _080D5638: subs r0, r2, 0x1 strh r0, [r4, 0xE] _080D563C: pop {r4-r6} pop {r0} bx r0 thumb_func_end sub_80D5508 thumb_func_start sub_80D5644 sub_80D5644: @ 80D5644 push {r4,r5,lr} adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 ldr r5, =gBattleAnimArgs ldrb r0, [r5] bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, =gSprites lsls r1, r0, 4 adds r1, r0 lsls r1, 2 adds r1, r2 ldrh r2, [r5, 0x2] strh r2, [r1, 0x24] ldr r2, =gTasks lsls r1, r4, 2 adds r1, r4 lsls r1, 3 adds r1, r2 strh r0, [r1, 0x8] ldrh r0, [r5, 0x2] strh r0, [r1, 0xA] ldrh r0, [r5, 0x4] strh r0, [r1, 0xC] ldrh r0, [r5, 0x6] strh r0, [r1, 0xE] ldrh r0, [r5, 0x8] strh r0, [r1, 0x10] ldr r2, =sub_80D56A4 str r2, [r1] adds r0, r4, 0 bl _call_via_r2 pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D5644 thumb_func_start sub_80D56A4 sub_80D56A4: @ 80D56A4 push {r4-r7,lr} lsls r0, 24 lsrs r6, r0, 24 ldr r2, =gTasks lsls r0, r6, 2 adds r0, r6 lsls r0, 3 adds r3, r0, r2 ldrb r5, [r3, 0x8] ldrh r4, [r3, 0xA] ldrh r1, [r3, 0x18] adds r0, r1, 0x1 strh r0, [r3, 0x18] movs r7, 0xC ldrsh r0, [r3, r7] lsls r1, 16 asrs r1, 16 mov r12, r2 ldr r7, =gSprites cmp r0, r1 bne _080D56F6 movs r0, 0 strh r0, [r3, 0x18] lsls r0, r5, 4 adds r0, r5 lsls r0, 2 adds r1, r0, r7 ldrh r3, [r1, 0x24] movs r0, 0x24 ldrsh r2, [r1, r0] lsls r0, r4, 16 asrs r0, 16 cmp r2, r0 bne _080D56EE negs r0, r2 lsls r0, 16 lsrs r4, r0, 16 _080D56EE: lsls r0, r4, 16 asrs r0, 16 adds r0, r3 strh r0, [r1, 0x24] _080D56F6: lsls r2, r6, 2 adds r2, r6 lsls r2, 3 add r2, r12 strh r4, [r2, 0xA] ldrh r1, [r2, 0xE] ldrh r0, [r2, 0x1A] adds r1, r0 strh r1, [r2, 0x1A] lsls r0, r5, 4 adds r0, r5 lsls r0, 2 adds r0, r7 lsls r1, 16 asrs r1, 24 strh r1, [r0, 0x26] ldrh r0, [r2, 0x10] subs r0, 0x1 strh r0, [r2, 0x10] lsls r0, 16 cmp r0, 0 bne _080D5728 adds r0, r6, 0 bl move_anim_task_del _080D5728: pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D56A4 thumb_func_start sub_80D5738 sub_80D5738: @ 80D5738 push {r4-r7,lr} mov r7, r8 push {r7} lsls r0, 24 lsrs r5, r0, 24 movs r6, 0x1 ldr r4, =gBattleAnimArgs ldrb r0, [r4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r7, r0, 24 movs r1, 0x8 ldrsh r0, [r4, r1] cmp r0, 0x5 ble _080D575C movs r0, 0x5 strh r0, [r4, 0x8] _080D575C: movs r1, 0 movs r2, 0x8 ldrsh r0, [r4, r2] adds r3, r4, 0 ldr r2, =gTasks mov r12, r2 lsls r4, r5, 2 ldr r2, =sub_80D57B8 mov r8, r2 cmp r1, r0 bge _080D5782 adds r2, r0, 0 _080D5774: lsls r0, r6, 25 lsrs r6, r0, 24 adds r0, r1, 0x1 lsls r0, 24 lsrs r1, r0, 24 cmp r1, r2 blt _080D5774 _080D5782: adds r0, r4, r5 lsls r0, 3 add r0, r12 strh r7, [r0, 0x8] ldrh r1, [r3, 0x2] strh r1, [r0, 0xA] ldrh r1, [r3, 0x4] strh r1, [r0, 0xC] ldrh r1, [r3, 0x6] strh r1, [r0, 0xE] strh r6, [r0, 0x10] mov r1, r8 str r1, [r0] adds r0, r5, 0 bl _call_via_r8 pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D5738 thumb_func_start sub_80D57B8 sub_80D57B8: @ 80D57B8 push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 adds r6, r0, 0 ldr r1, =gTasks lsls r0, r6, 2 adds r0, r6 lsls r0, 3 adds r5, r0, r1 ldrb r4, [r5, 0x8] movs r1, 0x12 ldrsh r0, [r5, r1] movs r2, 0xA ldrsh r1, [r5, r2] bl Sin ldr r2, =gSprites lsls r1, r4, 4 adds r1, r4 lsls r1, 2 adds r4, r1, r2 strh r0, [r4, 0x24] movs r1, 0x12 ldrsh r0, [r5, r1] movs r2, 0xC ldrsh r1, [r5, r2] bl Cos negs r0, r0 strh r0, [r4, 0x26] ldrh r1, [r5, 0xC] adds r0, r1 strh r0, [r4, 0x26] ldrh r0, [r5, 0x10] ldrh r1, [r5, 0x12] adds r0, r1 movs r1, 0xFF ands r0, r1 strh r0, [r5, 0x12] cmp r0, 0 bne _080D5810 ldrh r0, [r5, 0xE] subs r0, 0x1 strh r0, [r5, 0xE] _080D5810: movs r2, 0xE ldrsh r0, [r5, r2] cmp r0, 0 bne _080D5822 strh r0, [r4, 0x24] strh r0, [r4, 0x26] adds r0, r6, 0 bl move_anim_task_del _080D5822: pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D57B8 thumb_func_start sub_80D5830 sub_80D5830: @ 80D5830 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 ldr r0, =gAnimationBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D584C ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 strh r0, [r1, 0x2] _080D584C: adds r0, r4, 0 bl sub_80D5738 pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_80D5830 thumb_func_start sub_80D5860 sub_80D5860: @ 80D5860 push {r4,lr} adds r4, r0, 0 adds r2, r4, 0 adds r2, 0x3E ldrb r0, [r2] movs r1, 0x4 orrs r0, r1 strb r0, [r2] ldr r0, =gAnimationBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5890 ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 b _080D5894 .pool _080D5890: ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] _080D5894: strh r0, [r4, 0x30] ldrh r2, [r1] movs r0, 0 strh r2, [r4, 0x2E] strh r0, [r4, 0x32] ldr r1, =gBankSpriteIds ldr r0, =gAnimationBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] strh r0, [r4, 0x34] strh r2, [r4, 0x36] ldr r1, =sub_80D58D4 adds r0, r4, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A6630 str r0, [r4, 0x1C] pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_80D5860 thumb_func_start sub_80D58D4 sub_80D58D4: @ 80D58D4 push {lr} ldrh r1, [r0, 0x36] strh r1, [r0, 0x2E] ldrh r1, [r0, 0x30] negs r1, r1 strh r1, [r0, 0x30] ldr r1, =sub_80A6630 str r1, [r0, 0x1C] ldr r1, =move_anim_8072740 bl StoreSpriteCallbackInData6 pop {r0} bx r0 .pool thumb_func_end sub_80D58D4 thumb_func_start sub_80D58F8 sub_80D58F8: @ 80D58F8 push {r4,r5,lr} adds r4, r0, 0 adds r2, r4, 0 adds r2, 0x3E ldrb r0, [r2] movs r1, 0x4 orrs r0, r1 strb r0, [r2] ldr r5, =gBattleAnimArgs ldrb r0, [r5, 0x4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldrh r2, [r5] movs r1, 0 strh r2, [r4, 0x2E] strh r1, [r4, 0x30] ldrh r1, [r5, 0x2] strh r1, [r4, 0x32] strh r0, [r4, 0x34] strh r2, [r4, 0x36] ldr r1, =sub_80D5944 adds r0, r4, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A6630 str r0, [r4, 0x1C] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D58F8 thumb_func_start sub_80D5944 sub_80D5944: @ 80D5944 push {lr} ldrh r1, [r0, 0x36] strh r1, [r0, 0x2E] ldrh r1, [r0, 0x32] negs r1, r1 strh r1, [r0, 0x32] ldr r1, =sub_80A6630 str r1, [r0, 0x1C] ldr r1, =move_anim_8072740 bl StoreSpriteCallbackInData6 pop {r0} bx r0 .pool thumb_func_end sub_80D5944 thumb_func_start sub_80D5968 sub_80D5968: @ 80D5968 push {r4-r7,lr} sub sp, 0x4 adds r6, r0, 0 ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D598C ldr r1, =gBankSpriteIds ldr r0, =gAnimationBankAttacker b _080D5990 .pool _080D598C: ldr r1, =gBankSpriteIds ldr r0, =gAnimationBankTarget _080D5990: ldrb r0, [r0] adds r0, r1 ldrb r7, [r0] ldr r5, =gBattleAnimArgs ldrh r0, [r5, 0x4] movs r3, 0 strh r0, [r6, 0x2E] ldr r0, =gSprites lsls r4, r7, 4 adds r4, r7 lsls r4, 2 adds r4, r0 ldrh r0, [r4, 0x24] ldrh r1, [r4, 0x20] adds r0, r1 strh r0, [r6, 0x30] ldrh r0, [r4, 0x20] strh r0, [r6, 0x32] ldrh r0, [r4, 0x26] ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r6, 0x34] ldrh r0, [r4, 0x22] strh r0, [r6, 0x36] adds r0, r6, 0 str r3, [sp] bl sub_80A6E14 ldr r3, [sp] strh r3, [r6, 0x34] strh r3, [r6, 0x36] ldrh r0, [r4, 0x24] strh r0, [r6, 0x38] ldrh r0, [r4, 0x26] strh r0, [r6, 0x3A] adds r2, r6, 0 adds r2, 0x3E ldrb r0, [r2] movs r1, 0x4 orrs r0, r1 strb r0, [r2] movs r1, 0x2 ldrsh r0, [r5, r1] cmp r0, 0x1 bne _080D5A00 strh r3, [r6, 0x32] b _080D5A06 .pool _080D5A00: cmp r0, 0x2 bne _080D5A06 strh r3, [r6, 0x30] _080D5A06: ldr r0, =gBattleAnimArgs ldrh r1, [r0, 0x2] lsls r0, r7, 8 orrs r0, r1 strh r0, [r6, 0x3C] ldr r0, =sub_80D5A24 str r0, [r6, 0x1C] add sp, 0x4 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D5968 thumb_func_start sub_80D5A24 sub_80D5A24: @ 80D5A24 push {r4-r6,lr} adds r2, r0, 0 ldrh r0, [r2, 0x3C] lsls r1, r0, 24 lsrs r4, r1, 24 adds r5, r4, 0 lsls r0, 16 asrs r0, 24 lsls r1, r0, 4 adds r1, r0 lsls r1, 2 ldr r0, =gSprites adds r3, r1, r0 ldrh r0, [r2, 0x2E] movs r6, 0x2E ldrsh r1, [r2, r6] cmp r1, 0 bne _080D5A64 cmp r4, 0x1 bhi _080D5A4E strh r1, [r3, 0x24] _080D5A4E: cmp r5, 0x2 beq _080D5A56 cmp r5, 0 bne _080D5A58 _080D5A56: strh r1, [r3, 0x26] _080D5A58: adds r0, r2, 0 bl move_anim_8072740 b _080D5A8E .pool _080D5A64: subs r0, 0x1 strh r0, [r2, 0x2E] ldrh r1, [r2, 0x30] ldrh r0, [r2, 0x34] adds r1, r0 strh r1, [r2, 0x34] ldrh r0, [r2, 0x32] ldrh r4, [r2, 0x36] adds r0, r4 strh r0, [r2, 0x36] lsls r1, 16 asrs r1, 24 ldrh r6, [r2, 0x38] adds r1, r6 strh r1, [r3, 0x24] ldrh r0, [r2, 0x36] lsls r0, 16 asrs r0, 24 ldrh r2, [r2, 0x3A] adds r0, r2 strh r0, [r3, 0x26] _080D5A8E: pop {r4-r6} pop {r0} bx r0 thumb_func_end sub_80D5A24 thumb_func_start sub_80D5A94 sub_80D5A94: @ 80D5A94 push {r4-r6,lr} adds r5, r0, 0 ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D5AB0 ldr r0, =gAnimationBankAttacker b _080D5AB2 .pool _080D5AB0: ldr r0, =gAnimationBankTarget _080D5AB2: ldrb r2, [r0] ldr r0, =gBankSpriteIds adds r0, r2, r0 ldrb r6, [r0] adds r0, r2, 0 bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5ADC ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 strh r0, [r1, 0x2] movs r2, 0x6 ldrsh r0, [r1, r2] cmp r0, 0x1 bne _080D5ADC ldrh r0, [r1, 0x4] negs r0, r0 strh r0, [r1, 0x4] _080D5ADC: ldr r2, =gBattleAnimArgs ldrh r0, [r2, 0x8] movs r4, 0 strh r0, [r5, 0x2E] ldr r0, =gSprites lsls r1, r6, 4 adds r1, r6 lsls r1, 2 adds r1, r0 ldrh r0, [r1, 0x20] strh r0, [r5, 0x30] ldrh r0, [r2, 0x2] ldrh r3, [r1, 0x20] adds r0, r3 strh r0, [r5, 0x32] ldrh r0, [r1, 0x22] strh r0, [r5, 0x34] ldrh r0, [r2, 0x4] ldrh r1, [r1, 0x22] adds r0, r1 strh r0, [r5, 0x36] adds r0, r5, 0 bl sub_80A6E14 strh r4, [r5, 0x34] strh r4, [r5, 0x36] strh r6, [r5, 0x38] adds r2, r5, 0 adds r2, 0x3E ldrb r0, [r2] movs r1, 0x4 orrs r0, r1 strb r0, [r2] ldr r1, =move_anim_8072740 adds r0, r5, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A6680 str r0, [r5, 0x1C] pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D5A94 thumb_func_start sub_80D5B48 sub_80D5B48: @ 80D5B48 push {r4-r7,lr} adds r6, r0, 0 adds r2, r6, 0 adds r2, 0x3E ldrb r0, [r2] movs r1, 0x4 orrs r0, r1 strb r0, [r2] ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D5B70 ldr r0, =gAnimationBankAttacker b _080D5B72 .pool _080D5B70: ldr r0, =gAnimationBankTarget _080D5B72: ldrb r1, [r0] ldr r0, =gBankSpriteIds adds r0, r1, r0 ldrb r7, [r0] adds r0, r1, 0 bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5B9C ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 strh r0, [r1, 0x2] movs r2, 0x6 ldrsh r0, [r1, r2] cmp r0, 0x1 bne _080D5B9C ldrh r0, [r1, 0x4] negs r0, r0 strh r0, [r1, 0x4] _080D5B9C: ldr r5, =gBattleAnimArgs ldrh r0, [r5, 0x8] strh r0, [r6, 0x2E] ldr r0, =gSprites lsls r4, r7, 4 adds r4, r7 lsls r4, 2 adds r4, r0 ldrh r0, [r4, 0x24] ldrh r1, [r4, 0x20] adds r0, r1 strh r0, [r6, 0x30] ldrh r1, [r5, 0x2] adds r0, r1 strh r0, [r6, 0x32] ldrh r0, [r4, 0x26] ldrh r2, [r4, 0x22] adds r0, r2 strh r0, [r6, 0x34] ldrh r1, [r5, 0x4] adds r0, r1 strh r0, [r6, 0x36] adds r0, r6, 0 bl sub_80A6E14 ldrh r0, [r4, 0x24] lsls r0, 8 strh r0, [r6, 0x34] ldrh r0, [r4, 0x26] lsls r0, 8 strh r0, [r6, 0x36] strh r7, [r6, 0x38] ldrh r0, [r5, 0xA] strh r0, [r6, 0x3A] lsls r0, 16 cmp r0, 0 bne _080D5C04 ldr r1, =move_anim_8072740 adds r0, r6, 0 bl StoreSpriteCallbackInData6 b _080D5C0C .pool _080D5C04: ldr r1, =sub_80D5C20 adds r0, r6, 0 bl StoreSpriteCallbackInData6 _080D5C0C: ldr r0, =sub_80A6680 str r0, [r6, 0x1C] pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D5B48 thumb_func_start sub_80D5C20 sub_80D5C20: @ 80D5C20 push {r4,lr} ldr r4, =gSprites movs r1, 0x38 ldrsh r2, [r0, r1] lsls r1, r2, 4 adds r1, r2 lsls r1, 2 adds r1, r4 movs r3, 0 strh r3, [r1, 0x24] movs r1, 0x38 ldrsh r2, [r0, r1] lsls r1, r2, 4 adds r1, r2 lsls r1, 2 adds r1, r4 strh r3, [r1, 0x26] bl move_anim_8072740 pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_80D5C20 thumb_func_start sub_80D5C50 sub_80D5C50: @ 80D5C50 push {r4-r7,lr} lsls r0, 24 lsrs r6, r0, 24 ldr r5, =gBattleAnimArgs movs r0, 0x6 ldrsh r1, [r5, r0] movs r0, 0x80 lsls r0, 8 bl __divsi3 lsls r0, 16 lsrs r7, r0, 16 ldr r0, =gAnimationBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5C82 ldrh r0, [r5, 0x2] negs r0, r0 strh r0, [r5, 0x2] ldrh r0, [r5, 0xA] negs r0, r0 strh r0, [r5, 0xA] _080D5C82: ldrb r0, [r5] bl GetAnimBankSpriteId ldr r1, =gTasks lsls r4, r6, 2 adds r4, r6 lsls r4, 3 adds r4, r1 lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x8] movs r1, 0x2 ldrsh r0, [r5, r1] lsls r0, 8 movs r2, 0x6 ldrsh r1, [r5, r2] bl __divsi3 strh r0, [r4, 0xA] ldrh r0, [r5, 0x4] strh r0, [r4, 0xC] ldrh r0, [r5, 0x6] strh r0, [r4, 0xE] ldrh r0, [r5, 0x8] strh r0, [r4, 0x10] movs r1, 0xA ldrsh r0, [r5, r1] lsls r0, 8 movs r2, 0xC ldrsh r1, [r5, r2] bl __divsi3 strh r0, [r4, 0x12] ldrh r0, [r5, 0xC] strh r0, [r4, 0x14] strh r7, [r4, 0x16] ldr r0, =sub_80D5CE4 str r0, [r4] pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D5C50 thumb_func_start sub_80D5CE4 sub_80D5CE4: @ 80D5CE4 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 ldr r2, =gTasks lsls r1, r0, 2 adds r1, r0 lsls r1, 3 adds r5, r1, r2 ldrb r1, [r5, 0x8] ldrh r0, [r5, 0xA] ldrh r2, [r5, 0x1E] adds r0, r2 strh r0, [r5, 0x1E] ldr r2, =gSprites lsls r4, r1, 4 adds r4, r1 lsls r4, 2 adds r4, r2 lsls r0, 16 asrs r0, 24 strh r0, [r4, 0x24] ldrh r0, [r5, 0x1C] lsrs r0, 8 movs r2, 0xC ldrsh r1, [r5, r2] bl Sin strh r0, [r4, 0x26] ldrh r0, [r5, 0x16] ldrh r1, [r5, 0x1C] adds r0, r1 strh r0, [r5, 0x1C] ldrh r0, [r5, 0xE] subs r0, 0x1 strh r0, [r5, 0xE] lsls r0, 16 cmp r0, 0 bne _080D5D34 ldr r0, =sub_80D5D48 str r0, [r5] _080D5D34: pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D5CE4 thumb_func_start sub_80D5D48 sub_80D5D48: @ 80D5D48 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 adds r5, r0, 0 ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r4, r0, r1 ldrh r1, [r4, 0x10] movs r2, 0x10 ldrsh r0, [r4, r2] cmp r0, 0 ble _080D5D70 subs r0, r1, 0x1 strh r0, [r4, 0x10] b _080D5DA4 .pool _080D5D70: ldrb r0, [r4, 0x8] ldrh r2, [r4, 0x12] ldrh r1, [r4, 0x20] adds r2, r1 strh r2, [r4, 0x20] ldr r3, =gSprites lsls r1, r0, 4 adds r1, r0 lsls r1, 2 adds r1, r3 lsls r2, 16 asrs r2, 24 ldrh r0, [r4, 0x1E] lsls r0, 16 asrs r0, 24 adds r2, r0 strh r2, [r1, 0x24] ldrh r0, [r4, 0x14] subs r0, 0x1 strh r0, [r4, 0x14] lsls r0, 16 cmp r0, 0 bne _080D5DA4 adds r0, r5, 0 bl move_anim_task_del _080D5DA4: pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D5D48 thumb_func_start sub_80D5DB0 sub_80D5DB0: @ 80D5DB0 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 ldr r1, =gBattleAnimArgs movs r2, 0 ldrsh r0, [r1, r2] cmp r0, 0x2 beq _080D5DDE cmp r0, 0x2 bgt _080D5DD8 cmp r0, 0 blt _080D5E10 ldrb r0, [r1] bl GetAnimBankSpriteId lsls r0, 24 lsrs r2, r0, 24 b _080D5E18 .pool _080D5DD8: cmp r0, 0x3 beq _080D5DE8 b _080D5E10 _080D5DDE: ldr r5, =gAnimationBankAttacker b _080D5DEA .pool _080D5DE8: ldr r5, =gAnimationBankTarget _080D5DEA: ldrb r0, [r5] movs r4, 0x2 eors r0, r4 bl b_side_obj__get_some_boolean lsls r0, 24 cmp r0, 0 beq _080D5E10 ldr r1, =gBankSpriteIds ldrb r0, [r5] eors r0, r4 adds r0, r1 ldrb r2, [r0] b _080D5E18 .pool _080D5E10: adds r0, r6, 0 bl move_anim_task_del b _080D5E58 _080D5E18: ldr r1, =gTasks lsls r4, r6, 2 adds r0, r4, r6 lsls r0, 3 adds r5, r0, r1 strh r2, [r5, 0x8] ldr r0, =gAnimationBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5E44 ldr r0, =gBattleAnimArgs ldrh r0, [r0, 0x2] b _080D5E4A .pool _080D5E44: ldr r0, =gBattleAnimArgs ldrh r0, [r0, 0x2] negs r0, r0 _080D5E4A: strh r0, [r5, 0xA] ldr r0, =gTasks adds r1, r4, r6 lsls r1, 3 adds r1, r0 ldr r0, =sub_80D5E6C str r0, [r1] _080D5E58: pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D5DB0 thumb_func_start sub_80D5E6C sub_80D5E6C: @ 80D5E6C push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 ldr r0, =gTasks lsls r1, r4, 2 adds r1, r4 lsls r1, 3 adds r1, r0 ldrb r2, [r1, 0x8] ldr r3, =gSprites lsls r0, r2, 4 adds r0, r2 lsls r0, 2 adds r0, r3 ldrh r1, [r1, 0xA] ldrh r2, [r0, 0x24] adds r1, r2 strh r1, [r0, 0x24] movs r2, 0x24 ldrsh r1, [r0, r2] movs r2, 0x20 ldrsh r0, [r0, r2] adds r1, r0 adds r1, 0x20 movs r0, 0x98 lsls r0, 1 cmp r1, r0 bls _080D5EAA adds r0, r4, 0 bl move_anim_task_del _080D5EAA: pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_80D5E6C thumb_func_start sub_80D5EB8 sub_80D5EB8: @ 80D5EB8 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 ldr r6, =gAnimationBankAttacker ldrb r0, [r6] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D5ED4 ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 strh r0, [r1, 0x2] _080D5ED4: ldr r4, =gBattleAnimArgs ldrb r0, [r4, 0x8] bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, =gTasks lsls r3, r5, 2 adds r1, r3, r5 lsls r1, 3 adds r2, r1, r2 ldrh r1, [r4] strh r1, [r2, 0x8] ldrh r1, [r4, 0x2] strh r1, [r2, 0xA] ldrh r1, [r4, 0x4] strh r1, [r2, 0xC] ldrh r1, [r4, 0x6] strh r1, [r2, 0xE] strh r0, [r2, 0x10] movs r1, 0x8 ldrsh r0, [r4, r1] cmp r0, 0 bne _080D5F14 ldrb r0, [r6] b _080D5F18 .pool _080D5F14: ldr r0, =gAnimationBankTarget ldrb r0, [r0] _080D5F18: strh r0, [r2, 0x12] ldr r1, =gTasks adds r0, r3, r5 lsls r0, 3 adds r0, r1 movs r1, 0x1 strh r1, [r0, 0x20] ldr r1, =sub_80D5F3C str r1, [r0] pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D5EB8 thumb_func_start sub_80D5F3C sub_80D5F3C: @ 80D5F3C push {r4-r7,lr} mov r7, r9 mov r6, r8 push {r6,r7} lsls r0, 24 lsrs r6, r0, 24 ldr r1, =gTasks lsls r0, r6, 2 adds r0, r6 lsls r0, 3 adds r4, r0, r1 ldrb r7, [r4, 0x10] ldrh r0, [r4, 0xC] ldrh r1, [r4, 0x1C] adds r0, r1 lsls r1, r0, 16 strh r0, [r4, 0x1C] lsrs r1, 24 mov r8, r1 mov r0, r8 movs r2, 0xA ldrsh r1, [r4, r2] bl Sin lsls r0, 16 lsrs r5, r0, 16 mov r9, r5 movs r1, 0x8 ldrsh r0, [r4, r1] cmp r0, 0 bne _080D5F94 ldr r0, =gSprites lsls r2, r7, 4 adds r1, r2, r7 lsls r1, 2 adds r1, r0 strh r5, [r1, 0x24] mov r9, r0 adds r4, r2, 0 b _080D5FDA .pool _080D5F94: ldrb r0, [r4, 0x12] bl GetBankSide lsls r0, 24 cmp r0, 0 bne _080D5FBC ldr r1, =gSprites lsls r2, r7, 4 adds r0, r2, r7 lsls r0, 2 adds r3, r0, r1 lsls r0, r5, 16 asrs r0, 16 mov r9, r1 adds r4, r2, 0 cmp r0, 0 bge _080D5FD8 b _080D5FD6 .pool _080D5FBC: ldr r1, =gSprites lsls r2, r7, 4 adds r0, r2, r7 lsls r0, 2 adds r3, r0, r1 mov r4, r9 lsls r0, r4, 16 asrs r0, 16 mov r9, r1 adds r4, r2, 0 cmp r0, 0 bge _080D5FD6 negs r0, r0 _080D5FD6: negs r0, r0 _080D5FD8: strh r0, [r3, 0x26] _080D5FDA: mov r5, r8 cmp r5, 0x7F bls _080D5FFC ldr r1, =gTasks lsls r2, r6, 2 adds r0, r2, r6 lsls r0, 3 adds r3, r0, r1 movs r5, 0x1E ldrsh r0, [r3, r5] adds r5, r1, 0 cmp r0, 0 bne _080D5FFC movs r1, 0x20 ldrsh r0, [r3, r1] cmp r0, 0x1 beq _080D601E _080D5FFC: mov r2, r8 cmp r2, 0x7E bhi _080D6050 ldr r1, =gTasks lsls r2, r6, 2 adds r0, r2, r6 lsls r0, 3 adds r3, r0, r1 movs r5, 0x1E ldrsh r0, [r3, r5] adds r5, r1, 0 cmp r0, 0x1 bne _080D6050 movs r1, 0x20 ldrsh r0, [r3, r1] cmp r0, 0 bne _080D6050 _080D601E: adds r1, r2, r6 lsls r1, 3 adds r1, r5 ldrh r0, [r1, 0x1E] movs r2, 0x1 eors r0, r2 strh r0, [r1, 0x1E] ldrh r0, [r1, 0x20] eors r0, r2 strh r0, [r1, 0x20] ldrh r0, [r1, 0xE] subs r0, 0x1 strh r0, [r1, 0xE] lsls r0, 16 asrs r3, r0, 16 cmp r3, 0 bne _080D6050 adds r0, r4, r7 lsls r0, 2 add r0, r9 strh r3, [r0, 0x24] strh r3, [r0, 0x26] adds r0, r6, 0 bl move_anim_task_del _080D6050: pop {r3,r4} mov r8, r3 mov r9, r4 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D5F3C thumb_func_start sub_80D6064 sub_80D6064: @ 80D6064 push {r4-r6,lr} adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 ldr r6, =gBattleAnimArgs ldrb r0, [r6, 0x6] bl GetAnimBankSpriteId adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 ldrb r1, [r6, 0x8] adds r0, r5, 0 bl sub_80A7270 ldr r1, =gTasks lsls r0, r4, 2 adds r0, r4 lsls r0, 3 adds r0, r1 ldrh r1, [r6] strh r1, [r0, 0x8] ldrh r1, [r6, 0x2] strh r1, [r0, 0xA] ldrh r1, [r6, 0x4] strh r1, [r0, 0xC] ldrh r1, [r6, 0x4] strh r1, [r0, 0xE] strh r5, [r0, 0x10] movs r1, 0x80 lsls r1, 1 strh r1, [r0, 0x1C] strh r1, [r0, 0x1E] ldr r1, =sub_80D60BC str r1, [r0] pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_80D6064 thumb_func_start sub_80D60BC sub_80D60BC: @ 80D60BC push {r4-r6,lr} lsls r0, 24 lsrs r0, 24 adds r5, r0, 0 ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r4, r0, r1 ldrh r0, [r4, 0x8] ldrh r1, [r4, 0x1C] adds r0, r1 strh r0, [r4, 0x1C] ldrh r0, [r4, 0xA] ldrh r3, [r4, 0x1E] adds r0, r3 strh r0, [r4, 0x1E] ldrb r0, [r4, 0x10] adds r6, r0, 0 movs r0, 0x1C ldrsh r1, [r4, r0] movs r3, 0x1E ldrsh r2, [r4, r3] adds r0, r6, 0 movs r3, 0 bl obj_id_set_rotscale ldrh r0, [r4, 0xC] subs r0, 0x1 strh r0, [r4, 0xC] lsls r0, 16 asrs r1, r0, 16 cmp r1, 0 bne _080D612C ldrh r2, [r4, 0xE] movs r3, 0xE ldrsh r0, [r4, r3] cmp r0, 0 ble _080D6120 ldrh r0, [r4, 0x8] negs r0, r0 strh r0, [r4, 0x8] ldrh r0, [r4, 0xA] negs r0, r0 strh r0, [r4, 0xA] strh r2, [r4, 0xC] strh r1, [r4, 0xE] b _080D612C .pool _080D6120: adds r0, r6, 0 bl sub_80A7344 adds r0, r5, 0 bl move_anim_task_del _080D612C: pop {r4-r6} pop {r0} bx r0 thumb_func_end sub_80D60BC thumb_func_start sub_80D6134 sub_80D6134: @ 80D6134 push {r4-r7,lr} mov r7, r8 push {r7} lsls r0, 24 lsrs r7, r0, 24 ldr r4, =gBattleAnimArgs ldrb r0, [r4, 0x4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 mov r8, r0 movs r1, 0 bl sub_80A7270 ldr r1, =gTasks lsls r0, r7, 2 adds r0, r7 lsls r0, 3 adds r2, r0, r1 movs r1, 0 strh r1, [r2, 0xA] ldrh r0, [r4] strh r0, [r2, 0xC] movs r3, 0x6 ldrsh r0, [r4, r3] cmp r0, 0x1 beq _080D6178 strh r1, [r2, 0xE] b _080D6184 .pool _080D6178: ldrh r0, [r4] ldrh r1, [r4, 0x2] adds r3, r0, 0 muls r3, r1 adds r0, r3, 0 strh r0, [r2, 0xE] _080D6184: ldr r1, =gTasks lsls r4, r7, 2 adds r0, r4, r7 lsls r0, 3 adds r5, r0, r1 ldr r6, =gBattleAnimArgs ldrh r0, [r6, 0x2] strh r0, [r5, 0x10] mov r0, r8 strh r0, [r5, 0x12] ldrh r0, [r6, 0x6] strh r0, [r5, 0x14] bl IsContest lsls r0, 24 mov r8, r4 cmp r0, 0 beq _080D61B8 movs r0, 0x1 strh r0, [r5, 0x16] b _080D61DC .pool _080D61B8: movs r1, 0x4 ldrsh r0, [r6, r1] cmp r0, 0 bne _080D61C8 ldr r0, =gAnimationBankAttacker b _080D61CA .pool _080D61C8: ldr r0, =gAnimationBankTarget _080D61CA: ldrb r0, [r0] bl GetBankSide movs r1, 0 lsls r0, 24 cmp r0, 0 bne _080D61DA movs r1, 0x1 _080D61DA: strh r1, [r5, 0x16] _080D61DC: ldr r0, =gTasks mov r2, r8 adds r1, r2, r7 lsls r1, 3 adds r4, r1, r0 movs r3, 0x16 ldrsh r0, [r4, r3] cmp r0, 0 beq _080D6208 bl IsContest lsls r0, 24 cmp r0, 0 bne _080D6208 movs r1, 0xE ldrsh r0, [r4, r1] negs r0, r0 strh r0, [r4, 0xE] movs r2, 0x10 ldrsh r0, [r4, r2] negs r0, r0 strh r0, [r4, 0x10] _080D6208: ldr r0, =gTasks mov r3, r8 adds r1, r3, r7 lsls r1, 3 adds r1, r0 ldr r0, =sub_80D6308 str r0, [r1] pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D6134 thumb_func_start sub_80D622C sub_80D622C: @ 80D622C push {r4-r7,lr} mov r7, r8 push {r7} lsls r0, 24 lsrs r5, r0, 24 ldr r4, =gBattleAnimArgs ldrb r0, [r4, 0x4] bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 mov r8, r0 movs r1, 0 bl sub_80A7270 ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r0, r1 movs r1, 0 strh r1, [r0, 0xA] ldrh r1, [r4] strh r1, [r0, 0xC] movs r1, 0x4 ldrsh r0, [r4, r1] cmp r0, 0 bne _080D6274 ldr r0, =gAnimationBankAttacker b _080D6276 .pool _080D6274: ldr r0, =gAnimationBankTarget _080D6276: ldrb r0, [r0] bl GetBankSide lsls r0, 24 cmp r0, 0 beq _080D6288 ldrh r0, [r4, 0x2] negs r0, r0 strh r0, [r4, 0x2] _080D6288: ldr r0, =gBattleAnimArgs movs r2, 0x6 ldrsh r1, [r0, r2] adds r6, r0, 0 cmp r1, 0x1 beq _080D62B0 ldr r2, =gTasks lsls r3, r5, 2 adds r0, r3, r5 lsls r0, 3 adds r0, r2 movs r1, 0 strh r1, [r0, 0xE] b _080D62CA .pool _080D62B0: ldr r3, =gTasks lsls r4, r5, 2 adds r0, r4, r5 lsls r0, 3 adds r0, r3 ldrh r2, [r6] ldrh r1, [r6, 0x2] adds r7, r2, 0 muls r7, r1 adds r1, r7, 0 strh r1, [r0, 0xE] adds r2, r3, 0 adds r3, r4, 0 _080D62CA: adds r1, r3, r5 lsls r1, 3 adds r1, r2 ldrh r0, [r6, 0x2] strh r0, [r1, 0x10] mov r0, r8 strh r0, [r1, 0x12] ldrh r0, [r6, 0x6] strh r0, [r1, 0x14] movs r0, 0x1 strh r0, [r1, 0x16] movs r2, 0xE ldrsh r0, [r1, r2] negs r0, r0 strh r0, [r1, 0xE] movs r7, 0x10 ldrsh r0, [r1, r7] negs r0, r0 strh r0, [r1, 0x10] ldr r0, =sub_80D6308 str r0, [r1] pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D622C thumb_func_start sub_80D6308 sub_80D6308: @ 80D6308 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 ldr r1, =gTasks lsls r0, r5, 2 adds r0, r5 lsls r0, 3 adds r4, r0, r1 ldrh r0, [r4, 0x10] ldrh r1, [r4, 0xE] adds r0, r1 strh r0, [r4, 0xE] ldrb r0, [r4, 0x12] movs r2, 0x80 lsls r2, 1 ldrh r3, [r4, 0xE] adds r1, r2, 0 bl obj_id_set_rotscale movs r2, 0x16 ldrsh r0, [r4, r2] cmp r0, 0 beq _080D633C ldrb r0, [r4, 0x12] bl sub_80A73A0 _080D633C: ldrh r0, [r4, 0xA] adds r0, 0x1 strh r0, [r4, 0xA] lsls r0, 16 asrs r0, 16 movs r2, 0xC ldrsh r1, [r4, r2] cmp r0, r1 blt _080D6382 movs r1, 0x14 ldrsh r0, [r4, r1] cmp r0, 0x1 beq _080D6364 cmp r0, 0x1 ble _080D636A cmp r0, 0x2 beq _080D6372 b _080D636A .pool _080D6364: ldrb r0, [r4, 0x12] bl sub_80A7344 _080D636A: adds r0, r5, 0 bl move_anim_task_del b _080D6382 _080D6372: movs r0, 0 strh r0, [r4, 0xA] movs r2, 0x10 ldrsh r0, [r4, r2] negs r0, r0 strh r0, [r4, 0x10] movs r0, 0x1 strh r0, [r4, 0x14] _080D6382: pop {r4,r5} pop {r0} bx r0 thumb_func_end sub_80D6308 thumb_func_start sub_80D6388 sub_80D6388: @ 80D6388 push {r4-r7,lr} mov r7, r8 push {r7} lsls r0, 24 lsrs r7, r0, 24 ldr r0, =gBattleAnimArgs movs r2, 0 ldrsh r1, [r0, r2] mov r8, r0 cmp r1, 0 bne _080D63C0 ldr r4, =gTasks lsls r5, r7, 2 adds r0, r5, r7 lsls r0, 3 adds r6, r0, r4 ldr r0, =gMovePowerMoveAnim ldrh r0, [r0] movs r1, 0xC bl __udivsi3 b _080D63D4 .pool _080D63C0: ldr r4, =gTasks lsls r5, r7, 2 adds r0, r5, r7 lsls r0, 3 adds r6, r0, r4 ldr r0, =gMoveDmgMoveAnim ldr r0, [r0] movs r1, 0xC bl __divsi3 _080D63D4: strh r0, [r6, 0x26] lsls r0, 16 adds r1, r4, 0 cmp r0, 0 bgt _080D63E2 movs r0, 0x1 strh r0, [r6, 0x26] _080D63E2: movs r2, 0x26 ldrsh r0, [r6, r2] cmp r0, 0x10 ble _080D63EE movs r0, 0x10 strh r0, [r6, 0x26] _080D63EE: adds r4, r5, r7 lsls r4, 3 adds r4, r1 movs r0, 0x26 ldrsh r1, [r4, r0] lsrs r0, r1, 31 adds r1, r0 asrs r1, 1 movs r5, 0 strh r1, [r4, 0x24] ldrh r2, [r4, 0x26] movs r0, 0x1 ands r0, r2 adds r1, r0 strh r1, [r4, 0x22] strh r5, [r4, 0x20] mov r1, r8 ldrh r0, [r1, 0x6] strh r0, [r4, 0x1C] ldrh r0, [r1, 0x8] strh r0, [r4, 0x1E] movs r0, 0x1 bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x16] ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r4, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r0, [r0, 0x24] strh r0, [r4, 0x18] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r0, [r0, 0x26] strh r0, [r4, 0x1A] strh r5, [r4, 0x8] mov r1, r8 ldrh r0, [r1, 0x2] strh r0, [r4, 0xA] ldrh r0, [r1, 0x4] strh r0, [r4, 0xC] ldr r0, =sub_80D646C str r0, [r4] pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_80D6388 thumb_func_start sub_80D646C sub_80D646C: @ 80D646C push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 lsls r0, r5, 2 adds r0, r5 lsls r0, 3 ldr r1, =gTasks adds r3, r0, r1 ldrh r0, [r3, 0x8] adds r0, 0x1 strh r0, [r3, 0x8] lsls r0, 16 asrs r0, 16 movs r2, 0xA ldrsh r1, [r3, r2] cmp r0, r1 ble _080D654A movs r0, 0 strh r0, [r3, 0x8] ldrh r0, [r3, 0x20] adds r1, r0, 0x1 movs r0, 0x1 ands r1, r0 strh r1, [r3, 0x20] movs r2, 0x1C ldrsh r0, [r3, r2] cmp r0, 0 beq _080D64DE cmp r1, 0 beq _080D64C8 ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r3, 0x22] ldrh r2, [r3, 0x18] adds r1, r2 b _080D64DC .pool _080D64C8: ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r3, 0x18] ldrh r2, [r3, 0x24] subs r1, r2 _080D64DC: strh r1, [r0, 0x24] _080D64DE: movs r1, 0x1E ldrsh r0, [r3, r1] cmp r0, 0 beq _080D6518 movs r2, 0x20 ldrsh r4, [r3, r2] cmp r4, 0 beq _080D6508 ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r3, 0x26] strh r1, [r0, 0x26] b _080D6518 .pool _080D6508: ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 strh r4, [r0, 0x26] _080D6518: ldrh r0, [r3, 0xC] subs r0, 0x1 strh r0, [r3, 0xC] lsls r0, 16 asrs r4, r0, 16 cmp r4, 0 bne _080D654A ldr r2, =gSprites movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 strh r4, [r0, 0x24] movs r0, 0x16 ldrsh r1, [r3, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 strh r4, [r0, 0x26] adds r0, r5, 0 bl move_anim_task_del _080D654A: pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_80D646C .align 2, 0 @ Don't pad with nop.