.include "asm/macros.inc" .include "constants/constants.inc" .syntax unified .text thumb_func_start sub_810A1A8 sub_810A1A8: @ 810A1A8 push {r4,lr} adds r4, r0, 0 ldr r0, =gBattleAnimAttacker ldrb r0, [r0] bl GetBattlerSide lsls r0, 24 cmp r0, 0 beq _0810A1D0 ldr r0, =gBattleAnimArgs ldrh r1, [r4, 0x20] ldrh r2, [r0] subs r1, r2 strh r1, [r4, 0x20] b _0810A1DC .pool _0810A1D0: ldr r1, =gBattleAnimArgs ldrh r0, [r1] ldrh r2, [r4, 0x20] adds r0, r2 strh r0, [r4, 0x20] adds r0, r1, 0 _0810A1DC: ldrh r0, [r0, 0x2] ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] ldr r0, =sub_810A1F8 str r0, [r4, 0x1C] pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810A1A8 thumb_func_start sub_810A1F8 sub_810A1F8: @ 810A1F8 push {lr} adds r2, r0, 0 adds r0, 0x3F ldrb r1, [r0] movs r0, 0x10 ands r0, r1 cmp r0, 0 beq _0810A20E adds r0, r2, 0 bl DestroyAnimSprite _0810A20E: pop {r0} bx r0 thumb_func_end sub_810A1F8 thumb_func_start sub_810A214 sub_810A214: @ 810A214 push {r4,lr} adds r4, r0, 0 ldr r0, =gBattleAnimAttacker ldrb r0, [r0] bl GetBattlerSide lsls r0, 24 cmp r0, 0 beq _0810A23C ldr r0, =gBattleAnimArgs ldrh r1, [r4, 0x20] ldrh r0, [r0] subs r1, r0 strh r1, [r4, 0x20] b _0810A246 .pool _0810A23C: ldr r0, =gBattleAnimArgs ldrh r0, [r0] ldrh r1, [r4, 0x20] adds r0, r1 strh r0, [r4, 0x20] _0810A246: ldr r0, =sub_810A258 str r0, [r4, 0x1C] pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810A214 thumb_func_start sub_810A258 sub_810A258: @ 810A258 push {lr} adds r2, r0, 0 adds r0, 0x3F ldrb r1, [r0] movs r0, 0x20 ands r0, r1 cmp r0, 0 beq _0810A26E adds r0, r2, 0 bl move_anim_8074EE0 _0810A26E: pop {r0} bx r0 thumb_func_end sub_810A258 thumb_func_start sub_810A274 sub_810A274: @ 810A274 push {r4,r5,lr} adds r5, r0, 0 ldr r4, =gBattleAnimTarget ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] ldr r0, =gBattleAnimAttacker ldrb r0, [r0] bl GetBattlerSide lsls r0, 24 cmp r0, 0 beq _0810A2C4 ldr r2, =gBattleAnimArgs ldrh r0, [r5, 0x20] ldrh r1, [r2] subs r0, r1 strh r0, [r5, 0x20] ldrh r0, [r5, 0x22] ldrh r1, [r2, 0x2] subs r0, r1 strh r0, [r5, 0x22] b _0810A2D8 .pool _0810A2C4: ldr r0, =gBattleAnimArgs ldrh r1, [r0] ldrh r2, [r5, 0x20] adds r1, r2 strh r1, [r5, 0x20] ldrh r1, [r0, 0x2] ldrh r2, [r5, 0x22] adds r1, r2 strh r1, [r5, 0x22] adds r2, r0, 0 _0810A2D8: movs r0, 0 strh r0, [r5, 0x2E] ldrh r0, [r2, 0x4] strh r0, [r5, 0x30] ldrh r0, [r2, 0x6] strh r0, [r5, 0x32] ldrh r0, [r2, 0x8] strh r0, [r5, 0x34] ldr r1, =move_anim_8074EE0 adds r0, r5, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A62EC str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810A274 thumb_func_start sub_810A308 sub_810A308: @ 810A308 push {r4-r7,lr} adds r5, r0, 0 ldr r0, =gBattleAnimArgs movs r1, 0x8 ldrsh r0, [r0, r1] cmp r0, 0x1 beq _0810A380 cmp r0, 0x1 bgt _0810A324 cmp r0, 0 beq _0810A32E b _0810A380 .pool _0810A324: cmp r0, 0x2 beq _0810A338 cmp r0, 0x3 beq _0810A35C b _0810A380 _0810A32E: ldr r0, =gBattleAnimAttacker b _0810A382 .pool _0810A338: ldr r4, =gBattleAnimAttacker ldrb r0, [r4] movs r6, 0x2 eors r0, r6 bl IsBattlerSpriteVisible lsls r0, 24 cmp r0, 0 bne _0810A354 ldrb r4, [r4] b _0810A384 .pool _0810A354: ldrb r0, [r4] adds r4, r6, 0 eors r4, r0 b _0810A384 _0810A35C: ldr r0, =gBattleAnimAttacker ldrb r0, [r0] movs r4, 0x2 eors r0, r4 bl IsBattlerSpriteVisible lsls r0, 24 cmp r0, 0 beq _0810A380 ldr r0, =gBattleAnimTarget ldrb r0, [r0] eors r4, r0 b _0810A384 .pool _0810A380: ldr r0, =gBattleAnimTarget _0810A382: ldrb r4, [r0] _0810A384: ldr r0, =gBattleAnimArgs movs r2, 0xA ldrsh r0, [r0, r2] cmp r0, 0 bne _0810A3AC adds r0, r4, 0 movs r1, 0 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] adds r0, r4, 0 movs r1, 0x1 b _0810A3BE .pool _0810A3AC: adds r0, r4, 0 movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] adds r0, r4, 0 movs r1, 0x3 _0810A3BE: bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] ldr r7, =gSineTable ldr r6, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r6, r1] lsls r0, 1 adds r0, r7 movs r2, 0 ldrsh r1, [r0, r2] movs r2, 0x2 ldrsh r0, [r6, r2] muls r0, r1 asrs r0, 8 strh r0, [r5, 0x24] movs r1, 0 ldrsh r0, [r6, r1] adds r0, 0x40 lsls r0, 1 adds r0, r7 movs r2, 0 ldrsh r1, [r0, r2] movs r2, 0x2 ldrsh r0, [r6, r2] muls r0, r1 asrs r0, 8 strh r0, [r5, 0x26] ldrh r1, [r6, 0xC] movs r0, 0x1 ands r0, r1 cmp r0, 0 beq _0810A422 adds r0, r4, 0 bl sub_80A8328 lsls r0, 24 lsrs r0, 24 adds r0, 0x1 movs r1, 0x3 ands r0, r1 lsls r0, 2 ldrb r2, [r5, 0x5] movs r1, 0xD negs r1, r1 ands r1, r2 orrs r1, r0 strb r1, [r5, 0x5] _0810A422: ldrb r2, [r5, 0x3] lsls r2, 26 lsrs r2, 27 movs r0, 0x4 ldrsh r1, [r6, r0] lsls r0, r1, 1 adds r0, r7 ldrh r0, [r0] ldr r3, =gOamMatrices lsls r2, 3 adds r2, r3 adds r1, 0x40 lsls r1, 1 adds r1, r7 ldrh r1, [r1] strh r1, [r2, 0x6] strh r1, [r2] strh r0, [r2, 0x2] lsls r0, 16 asrs r0, 16 negs r0, r0 strh r0, [r2, 0x4] ldrh r0, [r6, 0x6] strh r0, [r5, 0x2E] ldr r0, =sub_810E2C8 str r0, [r5, 0x1C] pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_810A308 thumb_func_start sub_810A46C sub_810A46C: @ 810A46C push {r4-r6,lr} adds r4, r0, 0 movs r1, 0x1 bl sub_80A69CC ldr r5, =gBattleAnimArgs ldrh r0, [r5, 0x6] strh r0, [r4, 0x2E] ldrh r0, [r4, 0x20] strh r0, [r4, 0x30] ldr r6, =gBattleAnimTarget ldrb r0, [r6] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x32] ldrh r0, [r4, 0x22] strh r0, [r4, 0x34] ldrb r0, [r6] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x36] adds r0, r4, 0 bl InitAnimLinearTranslation ldrh r0, [r5, 0x4] strh r0, [r4, 0x38] ldrh r0, [r5, 0xA] strh r0, [r4, 0x3A] ldrh r0, [r5, 0x8] strh r0, [r4, 0x3C] ldrh r2, [r4, 0x4] lsls r1, r2, 22 lsrs r1, 22 movs r3, 0xC ldrsh r0, [r5, r3] lsls r0, 2 adds r1, r0 ldr r3, =0x000003ff adds r0, r3, 0 ands r1, r0 ldr r0, =0xfffffc00 ands r0, r2 orrs r0, r1 strh r0, [r4, 0x4] ldr r1, =sub_810A4F4 str r1, [r4, 0x1C] adds r0, r4, 0 bl _call_via_r1 pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_810A46C thumb_func_start sub_810A4F4 sub_810A4F4: @ 810A4F4 push {r4,lr} adds r4, r0, 0 bl TranslateAnimLinear lsls r0, 24 cmp r0, 0 bne _0810A55E movs r1, 0x3C ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] bl Sin ldrh r1, [r4, 0x24] adds r0, r1 strh r0, [r4, 0x24] movs r2, 0x3C ldrsh r0, [r4, r2] movs r2, 0x38 ldrsh r1, [r4, r2] bl Cos ldrh r1, [r4, 0x26] adds r0, r1 strh r0, [r4, 0x26] ldrh r0, [r4, 0x3A] ldrh r2, [r4, 0x3C] adds r0, r2 movs r1, 0xFF ands r0, r1 strh r0, [r4, 0x3C] movs r1, 0x3C ldrsh r0, [r4, r1] movs r1, 0x3 bl __modsi3 lsls r0, 16 cmp r0, 0 bne _0810A564 adds r3, r4, 0 adds r3, 0x3E ldrb r2, [r3] lsls r0, r2, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r2 orrs r0, r1 strb r0, [r3] b _0810A564 _0810A55E: adds r0, r4, 0 bl DestroyAnimSprite _0810A564: pop {r4} pop {r0} bx r0 thumb_func_end sub_810A4F4 thumb_func_start sub_810A56C sub_810A56C: @ 810A56C push {lr} adds r3, r0, 0 ldrh r0, [r3, 0x38] subs r0, 0x1 strh r0, [r3, 0x38] lsls r0, 16 asrs r0, 16 movs r1, 0x1 negs r1, r1 cmp r0, r1 bne _0810A5A4 movs r0, 0x3E adds r0, r3 mov r12, r0 ldrb r2, [r0] lsls r0, r2, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r2 orrs r0, r1 mov r1, r12 strb r0, [r1] ldrh r0, [r3, 0x36] strh r0, [r3, 0x38] _0810A5A4: ldrh r0, [r3, 0x34] subs r1, r0, 0x1 strh r1, [r3, 0x34] lsls r0, 16 cmp r0, 0 bgt _0810A5B6 adds r0, r3, 0 bl DestroyAnimSprite _0810A5B6: pop {r0} bx r0 thumb_func_end sub_810A56C thumb_func_start sub_810A5BC sub_810A5BC: @ 810A5BC push {r4-r6,lr} adds r6, r0, 0 bl IsContest lsls r0, 24 cmp r0, 0 bne _0810A5D8 ldr r0, =gBattleAnimTarget ldrb r0, [r0] bl GetBattlerSide lsls r0, 24 cmp r0, 0 bne _0810A5E0 _0810A5D8: ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] negs r0, r0 strh r0, [r1, 0x2] _0810A5E0: ldr r5, =gBattleAnimTarget ldrb r0, [r5] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 ldr r4, =gBattleAnimArgs lsrs r0, 24 ldrh r1, [r4, 0x2] adds r0, r1 strh r0, [r6, 0x20] ldrb r0, [r5] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 ldrh r1, [r4, 0x4] adds r0, r1 strh r0, [r6, 0x22] ldrh r0, [r4] strh r0, [r6, 0x34] ldrh r0, [r4, 0x6] strh r0, [r6, 0x36] strh r0, [r6, 0x38] ldr r0, =sub_810A56C str r0, [r6, 0x1C] pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_810A5BC thumb_func_start sub_810A628 sub_810A628: @ 810A628 push {r4-r6,lr} adds r5, r0, 0 ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x6] strh r0, [r5, 0x2E] movs r2, 0xE ldrsh r0, [r1, r2] movs r1, 0x80 lsls r1, 8 ands r0, r1 cmp r0, 0 beq _0810A64C ldr r0, =gBattleAnimTarget b _0810A64E .pool _0810A64C: ldr r0, =gBattleAnimAttacker _0810A64E: ldrb r6, [r0] bl IsContest lsls r0, 24 cmp r0, 0 bne _0810A666 adds r0, r6, 0 bl GetBattlerSide lsls r0, 24 cmp r0, 0 bne _0810A66E _0810A666: ldr r1, =gBattleAnimArgs ldrh r0, [r1] negs r0, r0 strh r0, [r1] _0810A66E: adds r0, r6, 0 movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 ldr r4, =gBattleAnimArgs lsrs r0, 24 ldrh r3, [r4] adds r0, r3 strh r0, [r5, 0x20] adds r0, r6, 0 movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 ldrh r1, [r4, 0x2] adds r0, r1 strh r0, [r5, 0x22] ldrh r1, [r4, 0xE] ldr r0, =0x00007fff ands r0, r1 strh r0, [r5, 0x36] ldrh r0, [r4, 0x4] strh r0, [r5, 0x38] ldrh r0, [r4, 0xA] strh r0, [r5, 0x3A] ldrh r0, [r4, 0x8] strh r0, [r5, 0x3C] ldrh r2, [r5, 0x4] lsls r1, r2, 22 lsrs r1, 22 movs r3, 0xC ldrsh r0, [r4, r3] lsls r0, 2 adds r1, r0 ldr r3, =0x000003ff adds r0, r3, 0 ands r1, r0 ldr r0, =0xfffffc00 ands r0, r2 orrs r0, r1 strh r0, [r5, 0x4] ldr r1, =sub_810A6EC str r1, [r5, 0x1C] adds r0, r5, 0 bl _call_via_r1 pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_810A628 thumb_func_start sub_810A6EC sub_810A6EC: @ 810A6EC push {r4,lr} adds r4, r0, 0 movs r1, 0x3C ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] bl Sin strh r0, [r4, 0x24] movs r1, 0x3C ldrsh r0, [r4, r1] movs r2, 0x38 ldrsh r1, [r4, r2] bl Cos strh r0, [r4, 0x26] ldrh r0, [r4, 0x3A] ldrh r1, [r4, 0x3C] adds r0, r1 movs r1, 0xFF ands r0, r1 strh r0, [r4, 0x3C] movs r2, 0x3C ldrsh r0, [r4, r2] movs r2, 0x36 ldrsh r1, [r4, r2] bl __modsi3 cmp r0, 0 bne _0810A742 adds r3, r4, 0 adds r3, 0x3E ldrb r2, [r3] lsls r0, r2, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r2 orrs r0, r1 strb r0, [r3] _0810A742: ldrh r0, [r4, 0x2E] subs r1, r0, 0x1 strh r1, [r4, 0x2E] lsls r0, 16 cmp r0, 0 bgt _0810A754 adds r0, r4, 0 bl DestroyAnimSprite _0810A754: pop {r4} pop {r0} bx r0 thumb_func_end sub_810A6EC thumb_func_start sub_810A75C sub_810A75C: @ 810A75C push {r4,r5,lr} adds r4, r0, 0 movs r1, 0 bl sub_80A6980 ldrh r2, [r4, 0x4] lsls r1, r2, 22 lsrs r1, 22 ldr r3, =gBattleAnimArgs movs r5, 0x6 ldrsh r0, [r3, r5] lsls r0, 2 adds r1, r0 ldr r5, =0x000003ff adds r0, r5, 0 ands r1, r0 ldr r0, =0xfffffc00 ands r0, r2 orrs r0, r1 strh r0, [r4, 0x4] movs r1, 0x6 ldrsh r0, [r3, r1] cmp r0, 0x1 bne _0810A7A4 ldrb r0, [r4, 0x3] movs r1, 0x3F negs r1, r1 ands r1, r0 movs r0, 0x10 b _0810A7B2 .pool _0810A7A4: cmp r0, 0x2 bne _0810A7B6 ldrb r0, [r4, 0x3] movs r1, 0x3F negs r1, r1 ands r1, r0 movs r0, 0x20 _0810A7B2: orrs r1, r0 strb r1, [r4, 0x3] _0810A7B6: ldr r0, =gBattleAnimArgs ldrh r0, [r0, 0x4] strh r0, [r4, 0x2E] ldr r0, =sub_80A64B0 str r0, [r4, 0x1C] ldr r1, =DestroyAnimSprite adds r0, r4, 0 bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810A75C thumb_func_start sub_810A7DC sub_810A7DC: @ 810A7DC push {r4-r6,lr} adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 ldr r6, =gBattleAnimTarget ldrb r0, [r6] movs r1, 0 bl GetBattlerSpriteCoord ldr r1, =gTasks lsls r4, r5, 2 adds r4, r5 lsls r4, 3 adds r4, r1 lsls r0, 24 ldr r5, =gBattleAnimArgs lsrs r0, 24 ldrh r1, [r5] adds r0, r1 strh r0, [r4, 0x8] ldrb r0, [r6] movs r1, 0x1 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 ldrh r1, [r5, 0x2] adds r0, r1 strh r0, [r4, 0xA] ldrh r0, [r5, 0x4] strh r0, [r4, 0xC] ldr r0, =sub_810A834 str r0, [r4] pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_810A7DC thumb_func_start sub_810A834 sub_810A834: @ 810A834 push {r4-r7,lr} mov r7, r10 mov r6, r9 mov r5, r8 push {r5-r7} sub sp, 0x4 lsls r0, 24 lsrs r0, 24 mov r9, r0 movs r5, 0 movs r7, 0 ldr r1, =gTasks lsls r0, 2 add r0, r9 lsls r0, 3 adds r0, r1 ldrb r2, [r0, 0xC] str r2, [sp] ldrh r4, [r0, 0x8] ldrh r6, [r0, 0xA] movs r3, 0xC ldrsh r0, [r0, r3] mov r10, r1 cmp r0, 0 bne _0810A878 movs r0, 0 mov r8, r0 movs r2, 0x1 movs r1, 0x10 mov r12, r1 b _0810A882 .pool _0810A878: movs r2, 0x10 mov r12, r2 movs r3, 0x8 mov r8, r3 movs r2, 0x4 _0810A882: mov r0, r9 lsls r1, r0, 2 adds r0, r1, r0 lsls r0, 3 add r0, r10 movs r3, 0x1C ldrsh r0, [r0, r3] mov r10, r1 cmp r0, 0xA bhi _0810A978 lsls r0, 2 ldr r1, =_0810A8A4 adds r0, r1 ldr r0, [r0] mov pc, r0 .pool .align 2, 0 _0810A8A4: .4byte _0810A8D0 .4byte _0810A978 .4byte _0810A8E4 .4byte _0810A978 .4byte _0810A904 .4byte _0810A978 .4byte _0810A91A .4byte _0810A978 .4byte _0810A93C .4byte _0810A978 .4byte _0810A970 _0810A8D0: ldr r0, =gUnknown_08595828 lsls r1, r4, 16 asrs r1, 16 lsls r2, r6, 16 asrs r2, 16 mov r4, r12 lsls r3, r4, 16 b _0810A952 .pool _0810A8E4: mov r0, r12 lsls r3, r0, 17 mov r1, r8 adds r0, r1, r2 lsls r0, 16 lsrs r0, 16 mov r8, r0 ldr r0, =gUnknown_08595828 lsls r1, r4, 16 asrs r1, 16 lsls r2, r6, 16 asrs r2, 16 b _0810A952 .pool _0810A904: mov r3, r12 lsls r0, r3, 16 asrs r0, 16 lsls r3, r0, 1 adds r3, r0 lsls r0, r2, 1 add r0, r8 lsls r0, 16 lsrs r0, 16 mov r8, r0 b _0810A946 _0810A91A: mov r0, r12 lsls r3, r0, 18 lsls r0, r2, 1 adds r0, r2 add r0, r8 lsls r0, 16 lsrs r0, 16 mov r8, r0 ldr r0, =gUnknown_08595828 lsls r1, r4, 16 asrs r1, 16 lsls r2, r6, 16 asrs r2, 16 b _0810A952 .pool _0810A93C: mov r1, r12 lsls r0, r1, 16 asrs r0, 16 lsls r3, r0, 2 adds r3, r0 _0810A946: ldr r0, =gUnknown_08595828 lsls r1, r4, 16 asrs r1, 16 lsls r2, r6, 16 asrs r2, 16 lsls r3, 16 _0810A952: asrs r3, 16 adds r2, r3 lsls r2, 16 asrs r2, 16 movs r3, 0x2 bl CreateSprite lsls r0, 24 lsrs r5, r0, 24 adds r0, r7, 0x1 lsls r0, 24 lsrs r7, r0, 24 b _0810A978 .pool _0810A970: mov r0, r9 bl DestroyAnimVisualTask b _0810A9BC _0810A978: cmp r7, 0 beq _0810A9AC ldr r4, =gSprites lsls r3, r5, 4 adds r3, r5 lsls r3, 2 adds r0, r3, r4 ldrh r5, [r0, 0x4] lsls r2, r5, 22 lsrs r2, 22 add r2, r8 ldr r6, =0x000003ff adds r1, r6, 0 ands r2, r1 ldr r1, =0xfffffc00 ands r1, r5 orrs r1, r2 strh r1, [r0, 0x4] mov r1, sp ldrh r1, [r1] strh r1, [r0, 0x2E] adds r4, 0x1C adds r3, r4 ldr r1, [r3] bl _call_via_r1 _0810A9AC: ldr r0, =gTasks mov r1, r10 add r1, r9 lsls r1, 3 adds r1, r0 ldrh r0, [r1, 0x1C] adds r0, 0x1 strh r0, [r1, 0x1C] _0810A9BC: add sp, 0x4 pop {r3-r5} mov r8, r3 mov r9, r4 mov r10, r5 pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_810A834 thumb_func_start sub_810A9DC sub_810A9DC: @ 810A9DC push {lr} adds r3, r0, 0 movs r1, 0x2E ldrsh r0, [r3, r1] cmp r0, 0 bne _0810A9FE ldrb r1, [r3, 0x1] movs r2, 0x3F adds r0, r2, 0 ands r0, r1 movs r1, 0x80 orrs r0, r1 strb r0, [r3, 0x1] ldrb r0, [r3, 0x3] ands r2, r0 strb r2, [r3, 0x3] b _0810AA12 _0810A9FE: ldrb r2, [r3, 0x1] movs r1, 0x3F adds r0, r1, 0 ands r0, r2 strb r0, [r3, 0x1] ldrb r0, [r3, 0x3] ands r1, r0 movs r0, 0x40 orrs r1, r0 strb r1, [r3, 0x3] _0810AA12: ldrh r0, [r3, 0x30] adds r0, 0x1 strh r0, [r3, 0x30] lsls r0, 16 asrs r0, 16 cmp r0, 0xF bne _0810AA26 adds r0, r3, 0 bl DestroySprite _0810AA26: pop {r0} bx r0 thumb_func_end sub_810A9DC thumb_func_start sub_810AA2C sub_810AA2C: @ 810AA2C push {r4-r7,lr} adds r4, r0, 0 ldr r0, =gBattleAnimArgs ldrh r1, [r0] ldrh r2, [r4, 0x20] adds r1, r2 strh r1, [r4, 0x20] ldrh r0, [r0, 0x2] ldrh r3, [r4, 0x22] adds r0, r3 strh r0, [r4, 0x22] ldr r0, =gUnknown_08595840 adds r1, 0x20 lsls r1, 16 asrs r1, 16 movs r7, 0x22 ldrsh r2, [r4, r7] adds r3, r4, 0 adds r3, 0x43 ldrb r3, [r3] bl CreateSprite lsls r0, 24 lsrs r0, 24 ldr r3, =gSprites lsls r2, r0, 4 adds r2, r0 lsls r2, 2 adds r6, r2, r3 ldrh r5, [r6, 0x4] lsls r1, r5, 22 lsrs r1, 22 adds r1, 0x8 ldr r7, =0x000003ff adds r0, r7, 0 ands r1, r0 ldr r0, =0xfffffc00 ands r0, r5 orrs r0, r1 strh r0, [r6, 0x4] ldr r1, =gAnimVisualTaskCount ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] adds r3, 0x1C adds r2, r3 ldr r0, =sub_810AAB0 str r0, [r2] str r0, [r4, 0x1C] pop {r4-r7} pop {r0} bx r0 .pool thumb_func_end sub_810AA2C thumb_func_start sub_810AAB0 sub_810AAB0: @ 810AAB0 push {lr} adds r3, r0, 0 ldrh r0, [r3, 0x2E] adds r0, 0x1 strh r0, [r3, 0x2E] lsls r0, 16 asrs r0, 16 cmp r0, 0x3 bne _0810AAE4 movs r0, 0 strh r0, [r3, 0x2E] movs r0, 0x3E adds r0, r3 mov r12, r0 ldrb r2, [r0] lsls r0, r2, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r2 orrs r0, r1 mov r1, r12 strb r0, [r1] _0810AAE4: ldrh r0, [r3, 0x30] adds r0, 0x1 strh r0, [r3, 0x30] lsls r0, 16 asrs r0, 16 cmp r0, 0x33 bne _0810AAF8 adds r0, r3, 0 bl DestroyAnimSprite _0810AAF8: pop {r0} bx r0 thumb_func_end sub_810AAB0 thumb_func_start sub_810AAFC sub_810AAFC: @ 810AAFC push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 lsls r1, r0, 2 adds r1, r0 lsls r1, 3 ldr r0, =gTasks adds r5, r1, r0 ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _0810AB28 ldr r4, =gBattleAnimAttacker b _0810AB2A .pool _0810AB28: ldr r4, =gBattleAnimTarget _0810AB2A: ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x24] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x26] ldr r2, =gBattleAnimArgs ldrh r0, [r2, 0x2] movs r1, 0 strh r0, [r5, 0x14] strh r1, [r5, 0x16] strh r1, [r5, 0x18] strh r1, [r5, 0x1A] strh r1, [r5, 0x1C] ldrh r0, [r2, 0x6] strh r0, [r5, 0x1E] strh r1, [r5, 0x20] ldrh r0, [r2, 0x4] strh r0, [r5, 0x22] ldr r0, =sub_810AB78 str r0, [r5] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810AAFC thumb_func_start sub_810AB78 sub_810AB78: @ 810AB78 push {r4-r7,lr} lsls r0, 24 lsrs r6, r0, 24 adds r2, r6, 0 lsls r0, r6, 2 adds r0, r6 lsls r0, 3 ldr r1, =gTasks adds r5, r0, r1 movs r1, 0x14 ldrsh r0, [r5, r1] cmp r0, 0 beq _0810AC78 ldrh r0, [r5, 0x20] adds r0, 0x1 movs r7, 0 strh r0, [r5, 0x20] lsls r0, 16 asrs r0, 16 movs r2, 0x22 ldrsh r1, [r5, r2] cmp r0, r1 ble _0810AC86 strh r7, [r5, 0x20] ldr r0, =gUnknown_085958A8 movs r3, 0x24 ldrsh r1, [r5, r3] movs r3, 0x26 ldrsh r2, [r5, r3] movs r3, 0x2 bl CreateSprite lsls r0, 24 lsrs r0, 24 cmp r0, 0x40 beq _0810AC86 lsls r4, r0, 4 adds r4, r0 lsls r4, 2 ldr r0, =gSprites adds r4, r0 ldr r1, =gUnknown_08595858 movs r2, 0x1A ldrsh r0, [r5, r2] lsls r0, 1 adds r0, r1 movs r3, 0 ldrsb r3, [r0, r3] ldrh r0, [r4, 0x20] adds r3, r0 strh r3, [r4, 0x20] movs r2, 0x1A ldrsh r0, [r5, r2] lsls r0, 1 adds r1, 0x1 adds r0, r1 movs r2, 0 ldrsb r2, [r0, r2] ldrh r0, [r4, 0x22] adds r2, r0 strh r2, [r4, 0x22] movs r1, 0x18 ldrsh r0, [r5, r1] lsls r1, r0, 2 adds r1, r0 movs r0, 0x28 subs r0, r1 strh r0, [r4, 0x2E] strh r3, [r4, 0x30] ldrh r0, [r5, 0x24] strh r0, [r4, 0x32] strh r2, [r4, 0x34] ldrh r0, [r5, 0x26] strh r0, [r4, 0x36] strh r6, [r4, 0x38] adds r0, r4, 0 bl InitAnimLinearTranslation ldr r1, =sub_810ACC0 adds r0, r4, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A67D8 str r0, [r4, 0x1C] ldrh r0, [r5, 0x1A] adds r0, 0x1 strh r0, [r5, 0x1A] lsls r0, 16 asrs r0, 16 cmp r0, 0xF ble _0810AC30 strh r7, [r5, 0x1A] _0810AC30: ldrh r0, [r5, 0x1C] adds r0, 0x1 strh r0, [r5, 0x1C] lsls r0, 16 asrs r0, 16 movs r2, 0x1E ldrsh r1, [r5, r2] cmp r0, r1 blt _0810AC52 strh r7, [r5, 0x1C] ldrh r1, [r5, 0x18] movs r3, 0x18 ldrsh r0, [r5, r3] cmp r0, 0x5 bgt _0810AC52 adds r0, r1, 0x1 strh r0, [r5, 0x18] _0810AC52: ldrh r0, [r5, 0x16] adds r0, 0x1 strh r0, [r5, 0x16] ldrh r0, [r5, 0x14] subs r0, 0x1 strh r0, [r5, 0x14] b _0810AC86 .pool _0810AC78: movs r1, 0x16 ldrsh r0, [r5, r1] cmp r0, 0 bne _0810AC86 adds r0, r2, 0 bl DestroyAnimVisualTask _0810AC86: pop {r4-r7} pop {r0} bx r0 thumb_func_end sub_810AB78 thumb_func_start sub_810AC8C sub_810AC8C: @ 810AC8C push {r4,lr} adds r4, r0, 0 bl TranslateAnimLinear lsls r0, 24 cmp r0, 0 beq _0810ACB4 ldr r2, =gTasks movs r0, 0x38 ldrsh r1, [r4, r0] lsls r0, r1, 2 adds r0, r1 lsls r0, 3 adds r0, r2 ldrh r1, [r0, 0x16] subs r1, 0x1 strh r1, [r0, 0x16] adds r0, r4, 0 bl DestroySprite _0810ACB4: pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810AC8C thumb_func_start sub_810ACC0 sub_810ACC0: @ 810ACC0 push {r4,lr} adds r4, r0, 0 movs r1, 0x1 bl StartSpriteAnim ldr r0, =sub_810AC8C str r0, [r4, 0x1C] pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810ACC0 thumb_func_start sub_810ACD8 sub_810ACD8: @ 810ACD8 push {r4,r5,lr} adds r5, r0, 0 ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _0810ACF4 ldr r4, =gBattleAnimAttacker b _0810ACF6 .pool _0810ACF4: ldr r4, =gBattleAnimTarget _0810ACF6: ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] ldr r1, =move_anim_8074EE0 adds r0, r5, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A67BC str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810ACD8 thumb_func_start sub_810AD30 sub_810AD30: @ 810AD30 push {r4,r5,lr} adds r5, r0, 0 ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r0, [r0, r1] cmp r0, 0 bne _0810AD4C ldr r4, =gBattleAnimAttacker b _0810AD4E .pool _0810AD4C: ldr r4, =gBattleAnimTarget _0810AD4E: ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] ldr r1, =gBattleAnimArgs ldrh r0, [r1, 0x2] strh r0, [r5, 0x24] ldrh r0, [r1, 0x4] strh r0, [r5, 0x26] ldr r1, =DestroyAnimSprite adds r0, r5, 0 bl StoreSpriteCallbackInData6 ldr r0, =sub_80A67D8 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810AD30 thumb_func_start sub_810AD98 sub_810AD98: @ 810AD98 push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x1 bl StartSpriteAffineAnim ldr r4, =gBattleAnimAttacker ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] movs r0, 0 bl GetAnimBattlerSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x3A] movs r0, 0x10 strh r0, [r5, 0x3C] ldrb r0, [r4] bl GetBattlerSide lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 bne _0810ADE6 movs r1, 0x3C ldrsh r0, [r5, r1] negs r0, r0 strh r0, [r5, 0x3C] _0810ADE6: ldr r0, =sub_810ADF8 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .pool thumb_func_end sub_810AD98 thumb_func_start sub_810ADF8 sub_810ADF8: @ 810ADF8 push {r4,lr} adds r4, r0, 0 movs r1, 0x2E ldrsh r0, [r4, r1] cmp r0, 0 beq _0810AE0A cmp r0, 0x1 beq _0810AE20 b _0810AE50 _0810AE0A: ldrh r0, [r4, 0x30] adds r0, 0x1 strh r0, [r4, 0x30] lsls r0, 16 asrs r0, 16 cmp r0, 0x28 ble _0810AE50 ldrh r0, [r4, 0x2E] adds r0, 0x1 strh r0, [r4, 0x2E] b _0810AE50 _0810AE20: ldrh r2, [r4, 0x3C] ldrh r1, [r4, 0x20] adds r0, r2, r1 strh r0, [r4, 0x20] ldr r3, =gSprites movs r0, 0x3A ldrsh r1, [r4, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r3 ldrh r1, [r0, 0x24] adds r2, r1 strh r2, [r0, 0x24] ldrh r0, [r4, 0x20] adds r0, 0x50 lsls r0, 16 movs r1, 0xC8 lsls r1, 17 cmp r0, r1 bls _0810AE50 adds r0, r4, 0 bl move_anim_8074EE0 _0810AE50: pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810ADF8 thumb_func_start sub_810AE5C sub_810AE5C: @ 810AE5C push {r4-r6,lr} lsls r0, 24 lsrs r3, r0, 24 lsls r0, r3, 2 adds r0, r3 lsls r0, 3 ldr r1, =gTasks adds r5, r0, r1 movs r1, 0x8 ldrsh r0, [r5, r1] cmp r0, 0x1 beq _0810AEF0 cmp r0, 0x1 bgt _0810AE84 cmp r0, 0 beq _0810AE90 b _0810AFC0 .pool _0810AE84: cmp r0, 0x2 beq _0810AF4C cmp r0, 0x3 bne _0810AE8E b _0810AFA0 _0810AE8E: b _0810AFC0 _0810AE90: movs r0, 0 bl GetAnimBattlerSpriteId lsls r0, 24 lsrs r0, 24 movs r6, 0 strh r0, [r5, 0x26] ldr r4, =gBattleAnimAttacker ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x24] ldrb r0, [r4] bl GetBattlerSide lsls r0, 24 cmp r0, 0 bne _0810AECC ldr r0, =0x0000ffe0 strh r0, [r5, 0x24] movs r0, 0x2 b _0810AED2 .pool _0810AECC: movs r0, 0x20 strh r0, [r5, 0x24] ldr r0, =0x0000fffe _0810AED2: strh r0, [r5, 0x22] ldr r2, =gSprites movs r0, 0x26 ldrsh r1, [r5, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 ldrh r1, [r5, 0x24] strh r1, [r0, 0x24] b _0810AF92 .pool _0810AEF0: ldrh r0, [r5, 0xA] adds r0, 0x1 strh r0, [r5, 0xA] lsls r0, 16 asrs r0, 16 cmp r0, 0x1 ble _0810AFC0 movs r0, 0 strh r0, [r5, 0xA] ldr r4, =gSprites movs r1, 0x26 ldrsh r0, [r5, r1] lsls r2, r0, 4 adds r2, r0 lsls r2, 2 adds r2, r4 adds r2, 0x3E ldrb r3, [r2] lsls r0, r3, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r3 orrs r0, r1 strb r0, [r2] ldrh r1, [r5, 0x24] movs r2, 0x24 ldrsh r0, [r5, r2] cmp r0, 0 beq _0810AF92 ldrh r2, [r5, 0x22] adds r2, r1, r2 strh r2, [r5, 0x24] movs r0, 0x26 ldrsh r1, [r5, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r4 strh r2, [r0, 0x24] b _0810AFC0 .pool _0810AF4C: ldrh r0, [r5, 0xA] adds r0, 0x1 strh r0, [r5, 0xA] lsls r0, 16 asrs r0, 16 cmp r0, 0x1 ble _0810AFC0 movs r0, 0 strh r0, [r5, 0xA] ldr r1, =gSprites movs r2, 0x26 ldrsh r0, [r5, r2] lsls r2, r0, 4 adds r2, r0 lsls r2, 2 adds r2, r1 adds r2, 0x3E ldrb r3, [r2] lsls r0, r3, 29 lsrs r0, 31 movs r1, 0x1 eors r1, r0 lsls r1, 2 movs r0, 0x5 negs r0, r0 ands r0, r3 orrs r0, r1 strb r0, [r2] ldrh r0, [r5, 0xC] adds r0, 0x1 strh r0, [r5, 0xC] lsls r0, 16 asrs r0, 16 cmp r0, 0x8 bne _0810AFC0 _0810AF92: ldrh r0, [r5, 0x8] adds r0, 0x1 strh r0, [r5, 0x8] b _0810AFC0 .pool _0810AFA0: ldr r2, =gSprites movs r0, 0x26 ldrsh r1, [r5, r0] lsls r0, r1, 4 adds r0, r1 lsls r0, 2 adds r0, r2 adds r0, 0x3E ldrb r2, [r0] movs r1, 0x5 negs r1, r1 ands r1, r2 strb r1, [r0] adds r0, r3, 0 bl DestroyAnimVisualTask _0810AFC0: pop {r4-r6} pop {r0} bx r0 .pool thumb_func_end sub_810AE5C thumb_func_start sub_810AFCC sub_810AFCC: @ 810AFCC push {r4-r6,lr} lsls r0, 24 lsrs r4, r0, 24 lsls r0, r4, 2 adds r0, r4 lsls r0, 3 ldr r1, =gTasks adds r5, r0, r1 movs r1, 0x8 ldrsh r0, [r5, r1] cmp r0, 0x1 bne _0810AFE6 b _0810B10C _0810AFE6: cmp r0, 0x1 bgt _0810AFF4 cmp r0, 0 beq _0810AFFC b _0810B14E .pool _0810AFF4: cmp r0, 0x2 bne _0810AFFA b _0810B140 _0810AFFA: b _0810B14E _0810AFFC: ldr r4, =gBattleAnimAttacker ldrb r0, [r4] bl GetBattlerSide lsls r0, 24 movs r2, 0x1 negs r2, r2 adds r1, r2, 0 cmp r0, 0 bne _0810B012 movs r1, 0x1 _0810B012: movs r6, 0 strh r1, [r5, 0xA] ldr r0, =gBattleAnimArgs movs r1, 0 ldrsh r2, [r0, r1] adds r3, r0, 0 cmp r2, 0 beq _0810B048 cmp r2, 0x4 beq _0810B070 ldrh r1, [r3] movs r0, 0x1 ands r0, r1 cmp r0, 0 beq _0810B0A8 movs r0, 0x80 lsls r0, 1 strh r0, [r5, 0xE] ldr r0, =0x0000fff0 b _0810B0B0 .pool _0810B048: ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0xE] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x12] movs r2, 0xA ldrsh r0, [r5, r2] lsls r0, 7 adds r0, 0x78 strh r0, [r5, 0x10] b _0810B0E6 _0810B070: movs r0, 0xA ldrsh r1, [r5, r0] lsls r1, 7 movs r0, 0x78 subs r0, r1 strh r0, [r5, 0xE] ldr r4, =gBattleAnimTarget ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x12] ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 movs r2, 0xA ldrsh r1, [r5, r2] lsls r1, 5 subs r0, r1 strh r0, [r5, 0x10] b _0810B0E6 .pool _0810B0A8: ldr r0, =0x0000fff0 strh r0, [r5, 0xE] movs r0, 0x80 lsls r0, 1 _0810B0B0: strh r0, [r5, 0x10] movs r1, 0xA ldrsh r0, [r5, r1] cmp r0, 0x1 bne _0810B0D0 movs r2, 0 ldrsh r0, [r3, r2] lsls r1, r0, 2 adds r1, r0 lsls r1, 1 movs r0, 0x50 subs r0, r1 strh r0, [r5, 0x12] b _0810B0E6 .pool _0810B0D0: movs r0, 0 ldrsh r1, [r3, r0] lsls r0, r1, 2 adds r0, r1 lsls r0, 1 adds r0, 0x28 strh r0, [r5, 0x12] ldrh r1, [r5, 0xE] ldrh r0, [r5, 0x10] strh r0, [r5, 0xE] strh r1, [r5, 0x10] _0810B0E6: movs r2, 0xE ldrsh r1, [r5, r2] movs r2, 0x10 ldrsh r0, [r5, r2] cmp r1, r0 bge _0810B0FC movs r1, 0 movs r0, 0x1 strh r0, [r5, 0xA] strh r1, [r5, 0x14] b _0810B138 _0810B0FC: ldr r0, =0x0000ffff strh r0, [r5, 0xA] movs r0, 0x3 strh r0, [r5, 0x14] b _0810B138 .pool _0810B10C: ldrh r0, [r5, 0xC] adds r0, 0x1 strh r0, [r5, 0xC] lsls r0, 16 cmp r0, 0 ble _0810B14E movs r0, 0 strh r0, [r5, 0xC] adds r0, r5, 0 adds r1, r4, 0 bl sub_810B154 lsls r0, 24 cmp r0, 0 bne _0810B138 adds r0, r5, 0 adds r1, r4, 0 bl sub_810B154 lsls r0, 24 cmp r0, 0 beq _0810B14E _0810B138: ldrh r0, [r5, 0x8] adds r0, 0x1 strh r0, [r5, 0x8] b _0810B14E _0810B140: movs r1, 0x16 ldrsh r0, [r5, r1] cmp r0, 0 bne _0810B14E adds r0, r4, 0 bl DestroyAnimVisualTask _0810B14E: pop {r4-r6} pop {r0} bx r0 thumb_func_end sub_810AFCC thumb_func_start sub_810B154 sub_810B154: @ 810B154 push {r4,r5,lr} adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 ldr r0, =gUnknown_08595A00 movs r2, 0xE ldrsh r1, [r4, r2] movs r3, 0x12 ldrsh r2, [r4, r3] movs r3, 0x23 bl CreateSprite lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0x40 beq _0810B18A ldr r1, =gSprites lsls r0, r2, 4 adds r0, r2 lsls r0, 2 adds r0, r1 strh r5, [r0, 0x3A] movs r1, 0x7 strh r1, [r0, 0x3C] ldrh r0, [r4, 0x16] adds r0, 0x1 strh r0, [r4, 0x16] _0810B18A: ldrh r1, [r4, 0xA] ldrh r5, [r4, 0x14] adds r0, r1, r5 strh r0, [r4, 0x14] lsls r0, 16 cmp r0, 0 bge _0810B19C movs r0, 0x3 strh r0, [r4, 0x14] _0810B19C: movs r2, 0x14 ldrsh r0, [r4, r2] cmp r0, 0x3 ble _0810B1A8 movs r0, 0 strh r0, [r4, 0x14] _0810B1A8: movs r3, 0xA ldrsh r0, [r4, r3] lsls r0, 4 ldrh r5, [r4, 0xE] adds r2, r0, r5 strh r2, [r4, 0xE] lsls r0, r1, 16 asrs r3, r0, 16 cmp r3, 0x1 bne _0810B1C8 lsls r0, r2, 16 asrs r0, 16 movs r5, 0x10 ldrsh r1, [r4, r5] cmp r0, r1 bge _0810B1DC _0810B1C8: movs r0, 0x1 negs r0, r0 cmp r3, r0 bne _0810B1E8 lsls r0, r2, 16 asrs r0, 16 movs r2, 0x10 ldrsh r1, [r4, r2] cmp r0, r1 bgt _0810B1E8 _0810B1DC: movs r0, 0x1 b _0810B1EA .pool _0810B1E8: movs r0, 0 _0810B1EA: pop {r4,r5} pop {r1} bx r1 thumb_func_end sub_810B154 thumb_func_start sub_810B1F0 sub_810B1F0: @ 810B1F0 push {r4,lr} adds r4, r0, 0 ldrh r0, [r4, 0x2E] adds r0, 0x1 strh r0, [r4, 0x2E] lsls r0, 16 asrs r0, 16 cmp r0, 0xC ble _0810B230 ldr r3, =gTasks movs r0, 0x3C ldrsh r1, [r4, r0] lsls r1, 1 movs r0, 0x3A ldrsh r2, [r4, r0] lsls r0, r2, 2 adds r0, r2 lsls r0, 3 adds r1, r0 adds r3, 0x8 adds r1, r3 ldrh r0, [r1] subs r0, 0x1 strh r0, [r1] ldrb r0, [r4, 0x3] lsls r0, 26 lsrs r0, 27 bl FreeOamMatrix adds r0, r4, 0 bl DestroySprite _0810B230: pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810B1F0 thumb_func_start sub_810B23C sub_810B23C: @ 810B23C push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x2E ldrsh r0, [r5, r1] cmp r0, 0 beq _0810B24E cmp r0, 0x1 beq _0810B280 b _0810B294 _0810B24E: ldr r4, =gBattleAnimAttacker ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x20] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] adds r0, r5, 0 movs r1, 0x2 bl StartSpriteAffineAnim ldrh r0, [r5, 0x2E] adds r0, 0x1 strh r0, [r5, 0x2E] b _0810B294 .pool _0810B280: adds r0, r5, 0 adds r0, 0x3F ldrb r1, [r0] movs r0, 0x20 ands r0, r1 cmp r0, 0 beq _0810B294 adds r0, r5, 0 bl move_anim_8074EE0 _0810B294: pop {r4,r5} pop {r0} bx r0 thumb_func_end sub_810B23C thumb_func_start sub_810B29C sub_810B29C: @ 810B29C push {r4,r5,lr} lsls r0, 24 lsrs r2, r0, 24 lsls r0, r2, 2 adds r0, r2 lsls r0, 3 ldr r1, =gTasks adds r5, r0, r1 movs r1, 0x8 ldrsh r0, [r5, r1] cmp r0, 0x4 bls _0810B2B6 b _0810B428 _0810B2B6: lsls r0, 2 ldr r1, =_0810B2C8 adds r0, r1 ldr r0, [r0] mov pc, r0 .pool .align 2, 0 _0810B2C8: .4byte _0810B2DC .4byte _0810B36C .4byte _0810B3A8 .4byte _0810B404 .4byte _0810B414 _0810B2DC: ldr r4, =gBattleAnimAttacker ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x14] ldrb r0, [r4] movs r1, 0x3 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x16] movs r0, 0x4 strh r0, [r5, 0x18] ldr r0, =gBattleAnimTarget ldrb r0, [r0] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x1C] movs r2, 0x1C ldrsh r0, [r5, r2] movs r2, 0x14 ldrsh r1, [r5, r2] subs r0, r1 movs r1, 0x5 bl __divsi3 strh r0, [r5, 0x1A] movs r0, 0x7 strh r0, [r5, 0x10] ldr r0, =0x0000ffff strh r0, [r5, 0x12] movs r0, 0xC strh r0, [r5, 0x1E] subs r0, 0x4C bl BattleAnimAdjustPanning lsls r0, 24 asrs r0, 24 strh r0, [r5, 0x20] movs r0, 0x3F bl BattleAnimAdjustPanning lsls r0, 24 asrs r0, 24 strh r0, [r5, 0x22] ldrh r0, [r5, 0x20] strh r0, [r5, 0x24] movs r1, 0x22 ldrsh r0, [r5, r1] movs r2, 0x20 ldrsh r1, [r5, r2] subs r0, r1 movs r1, 0x3 bl __divsi3 strh r0, [r5, 0x26] ldrh r0, [r5, 0x8] adds r0, 0x1 b _0810B426 .pool _0810B36C: ldrh r0, [r5, 0xA] adds r0, 0x1 strh r0, [r5, 0xA] lsls r0, 16 cmp r0, 0 ble _0810B39C movs r0, 0 strh r0, [r5, 0xA] adds r0, r5, 0 adds r1, r2, 0 bl sub_810B430 lsls r0, 24 cmp r0, 0 beq _0810B39C movs r1, 0xC ldrsh r0, [r5, r1] cmp r0, 0x5 bne _0810B396 movs r0, 0x3 b _0810B39A _0810B396: ldrh r0, [r5, 0x8] adds r0, 0x1 _0810B39A: strh r0, [r5, 0x8] _0810B39C: ldrh r1, [r5, 0x1E] movs r2, 0x1E ldrsh r0, [r5, r2] cmp r0, 0 beq _0810B428 b _0810B41E _0810B3A8: ldrh r1, [r5, 0x1E] movs r2, 0x1E ldrsh r0, [r5, r2] cmp r0, 0 beq _0810B3B6 subs r0, r1, 0x1 strh r0, [r5, 0x1E] _0810B3B6: ldrh r0, [r5, 0xA] adds r0, 0x1 movs r3, 0 strh r0, [r5, 0xA] lsls r0, 16 asrs r0, 16 cmp r0, 0x4 ble _0810B428 strh r3, [r5, 0xA] ldrh r1, [r5, 0xC] movs r2, 0x1 adds r0, r2, 0 ands r0, r1 cmp r0, 0 beq _0810B3E2 movs r0, 0x4 strh r0, [r5, 0x16] movs r0, 0x44 strh r0, [r5, 0x18] strh r3, [r5, 0x10] strh r2, [r5, 0x12] b _0810B3F2 _0810B3E2: movs r0, 0x44 strh r0, [r5, 0x16] movs r0, 0x4 strh r0, [r5, 0x18] movs r0, 0x7 strh r0, [r5, 0x10] ldr r0, =0x0000ffff strh r0, [r5, 0x12] _0810B3F2: movs r1, 0x1E ldrsh r0, [r5, r1] cmp r0, 0 beq _0810B424 movs r0, 0x4 b _0810B426 .pool _0810B404: movs r1, 0xE ldrsh r0, [r5, r1] cmp r0, 0 bne _0810B428 adds r0, r2, 0 bl DestroyAnimVisualTask b _0810B428 _0810B414: ldrh r1, [r5, 0x1E] movs r2, 0x1E ldrsh r0, [r5, r2] cmp r0, 0 beq _0810B424 _0810B41E: subs r0, r1, 0x1 strh r0, [r5, 0x1E] b _0810B428 _0810B424: movs r0, 0x1 _0810B426: strh r0, [r5, 0x8] _0810B428: pop {r4,r5} pop {r0} bx r0 thumb_func_end sub_810B29C thumb_func_start sub_810B430 sub_810B430: @ 810B430 push {r4-r6,lr} adds r4, r0, 0 lsls r1, 24 lsrs r5, r1, 24 ldr r0, =gUnknown_08595A30 movs r2, 0x14 ldrsh r1, [r4, r2] movs r3, 0x16 ldrsh r2, [r4, r3] movs r3, 0x23 bl CreateSprite lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0x40 beq _0810B49C ldr r1, =gSprites lsls r0, r2, 4 adds r0, r2 lsls r0, 2 adds r3, r0, r1 ldrh r2, [r3, 0x4] lsls r1, r2, 22 lsrs r1, 22 ldrh r6, [r4, 0x10] adds r1, r6 ldr r6, =0x000003ff adds r0, r6, 0 ands r1, r0 ldr r0, =0xfffffc00 ands r0, r2 orrs r0, r1 strh r0, [r3, 0x4] ldrh r0, [r4, 0x12] ldrh r1, [r4, 0x10] adds r0, r1 strh r0, [r4, 0x10] lsls r0, 16 cmp r0, 0 bge _0810B484 movs r0, 0x7 strh r0, [r4, 0x10] _0810B484: movs r2, 0x10 ldrsh r0, [r4, r2] cmp r0, 0x7 ble _0810B490 movs r0, 0 strh r0, [r4, 0x10] _0810B490: strh r5, [r3, 0x3A] movs r0, 0x3 strh r0, [r3, 0x3C] ldrh r0, [r4, 0xE] adds r0, 0x1 strh r0, [r4, 0xE] _0810B49C: movs r3, 0x10 ldrsh r0, [r4, r3] cmp r0, 0 bne _0810B4BE movs r5, 0x12 ldrsh r0, [r4, r5] cmp r0, 0 ble _0810B4BE ldrh r1, [r4, 0x26] ldrh r6, [r4, 0x24] adds r1, r6 strh r1, [r4, 0x24] lsls r1, 24 asrs r1, 24 movs r0, 0x76 bl PlaySE12WithPanning _0810B4BE: movs r0, 0x12 ldrsh r3, [r4, r0] ldrh r2, [r4, 0x16] cmp r3, 0 bge _0810B4D4 lsls r0, r2, 16 asrs r0, 16 movs r5, 0x18 ldrsh r1, [r4, r5] cmp r0, r1 ble _0810B4E4 _0810B4D4: cmp r3, 0 ble _0810B508 lsls r0, r2, 16 asrs r0, 16 movs r6, 0x18 ldrsh r1, [r4, r6] cmp r0, r1 blt _0810B508 _0810B4E4: ldrh r0, [r4, 0xC] adds r0, 0x1 strh r0, [r4, 0xC] ldrh r0, [r4, 0x1A] ldrh r1, [r4, 0x14] adds r0, r1 strh r0, [r4, 0x14] movs r0, 0x1 b _0810B514 .pool _0810B508: movs r3, 0x12 ldrsh r0, [r4, r3] lsls r0, 3 adds r0, r2, r0 strh r0, [r4, 0x16] movs r0, 0 _0810B514: pop {r4-r6} pop {r1} bx r1 thumb_func_end sub_810B430 thumb_func_start sub_810B51C sub_810B51C: @ 810B51C push {r4,lr} adds r4, r0, 0 ldrh r0, [r4, 0x2E] adds r0, 0x1 strh r0, [r4, 0x2E] lsls r0, 16 asrs r0, 16 cmp r0, 0xC ble _0810B552 ldr r3, =gTasks movs r0, 0x3C ldrsh r1, [r4, r0] lsls r1, 1 movs r0, 0x3A ldrsh r2, [r4, r0] lsls r0, r2, 2 adds r0, r2 lsls r0, 3 adds r1, r0 adds r3, 0x8 adds r1, r3 ldrh r0, [r1] subs r0, 0x1 strh r0, [r1] adds r0, r4, 0 bl DestroySprite _0810B552: pop {r4} pop {r0} bx r0 .pool thumb_func_end sub_810B51C thumb_func_start sub_810B55C sub_810B55C: @ 810B55C push {r4,r5,lr} lsls r0, 24 lsrs r2, r0, 24 lsls r0, r2, 2 adds r0, r2 lsls r0, 3 ldr r1, =gTasks adds r5, r0, r1 movs r1, 0x8 ldrsh r0, [r5, r1] cmp r0, 0x1 beq _0810B5D8 cmp r0, 0x1 bgt _0810B584 cmp r0, 0 beq _0810B58A b _0810B60E .pool _0810B584: cmp r0, 0x2 beq _0810B600 b _0810B60E _0810B58A: ldr r0, =gBattleAnimTarget ldrb r0, [r0] movs r1, 0x1 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 adds r0, 0x20 strh r0, [r5, 0x26] strh r0, [r5, 0x24] cmp r0, 0x10 ble _0810B5B4 adds r2, r0, 0 _0810B5A4: adds r1, r2, 0 subs r1, 0x20 adds r2, r1, 0 lsls r0, r1, 16 asrs r0, 16 cmp r0, 0x10 bgt _0810B5A4 strh r1, [r5, 0x24] _0810B5B4: ldr r4, =gBattleAnimTarget ldrb r0, [r4] movs r1, 0x2 bl GetBattlerSpriteCoord lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] ldrb r0, [r4] bl sub_80A82E4 lsls r0, 24 lsrs r0, 24 subs r0, 0x2 strh r0, [r5, 0x20] b _0810B5F8 .pool _0810B5D8: ldrh r0, [r5, 0xA] adds r0, 0x1 strh r0, [r5, 0xA] lsls r0, 16 asrs r0, 16 cmp r0, 0x1 ble _0810B60E movs r0, 0 strh r0, [r5, 0xA] adds r0, r5, 0 adds r1, r2, 0 bl sub_810B614 lsls r0, 24 cmp r0, 0 beq _0810B60E _0810B5F8: ldrh r0, [r5, 0x8] adds r0, 0x1 strh r0, [r5, 0x8] b _0810B60E _0810B600: movs r1, 0x1C ldrsh r0, [r5, r1] cmp r0, 0 bne _0810B60E adds r0, r2, 0 bl DestroyAnimVisualTask _0810B60E: pop {r4,r5} pop {r0} bx r0 thumb_func_end sub_810B55C .align 2, 0