summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/contest.s2608
-rw-r--r--src/contest.c3644
2 files changed, 2722 insertions, 3530 deletions
diff --git a/asm/contest.s b/asm/contest.s
index 5b8083b57..2f363644f 100644
--- a/asm/contest.s
+++ b/asm/contest.s
@@ -5,2614 +5,6 @@
.text
- thumb_func_start sub_80AC2CC
-sub_80AC2CC: @ 80AC2CC
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x8
- lsls r0, 24
- lsrs r0, 24
- mov r8, r0
- ldr r2, _080AC308 @ =gSharedMem + 0x19204
- ldrb r7, [r2, 0x11]
- ldr r1, _080AC30C @ =gTasks
- lsls r0, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r3, 0x8
- ldrsh r0, [r0, r3]
- adds r6, r2, 0
- mov r12, r1
- cmp r0, 0x3B
- bls _080AC2FC
- bl _080AD8CA
-_080AC2FC:
- lsls r0, 2
- ldr r1, _080AC310 @ =_080AC314
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080AC308: .4byte gSharedMem + 0x19204
-_080AC30C: .4byte gTasks
-_080AC310: .4byte _080AC314
- .align 2, 0
-_080AC314:
- .4byte _080AC404
- .4byte _080AC4B4
- .4byte _080AC4D4
- .4byte _080AC534
- .4byte _080AC5E8
- .4byte _080AC638
- .4byte _080AC6F8
- .4byte _080AC730
- .4byte _080AC77C
- .4byte _080AC7F4
- .4byte _080AD750
- .4byte _080AD77C
- .4byte _080AC98C
- .4byte _080AC9C0
- .4byte _080ACEC0
- .4byte _080ACFD4
- .4byte _080AD040
- .4byte _080AD070
- .4byte _080AD168
- .4byte _080AD11A
- .4byte _080AD7B8
- .4byte _080AD868
- .4byte _080AD88C
- .4byte _080AC81E
- .4byte _080AC8CC
- .4byte _080ACAD8
- .4byte _080ACAEE
- .4byte _080ACBB0
- .4byte _080ACBDC
- .4byte _080ACC44
- .4byte _080ACD2A
- .4byte _080AD7E8
- .4byte _080AD840
- .4byte _080AD648
- .4byte _080AD6D8
- .4byte _080AC9EC
- .4byte _080ACA24
- .4byte _080ACA44
- .4byte _080ACA84
- .4byte _080ACC98
- .4byte _080ACD00
- .4byte _080AD1A4
- .4byte _080AD8CA
- .4byte _080AD514
- .4byte _080AD8CA
- .4byte _080ACFA8
- .4byte _080AD0FA
- .4byte _080AC96C
- .4byte _080AC8F8
- .4byte _080AC94C
- .4byte _080ACAAE
- .4byte _080ACDC8
- .4byte _080ACE64
- .4byte _080AD316
- .4byte _080AD3D0
- .4byte _080AD700
- .4byte _080AD71C
- .4byte _080AD53C
- .4byte _080AD5D0
- .4byte _080AD624
-_080AC404:
- bl sub_80B0D7C
- movs r6, 0
- ldr r0, _080AC484 @ =gSharedMem + 0x19204
- adds r1, r0, 0
- adds r1, 0xCC
- ldrb r0, [r0, 0x10]
- mov r4, r8
- lsls r4, 2
- mov r9, r4
- ldrb r5, [r1]
- cmp r0, r5
- beq _080AC42C
- adds r2, r1, 0
- adds r1, r0, 0
-_080AC422:
- adds r6, 0x1
- adds r0, r6, r2
- ldrb r0, [r0]
- cmp r1, r0
- bne _080AC422
-_080AC42C:
- ldr r4, _080AC484 @ =gSharedMem + 0x19204
- strb r6, [r4, 0x11]
- ldrb r7, [r4, 0x11]
- ldr r0, _080AC488 @ =gIsLinkContest
- ldrb r1, [r0]
- movs r5, 0x1
- adds r0, r5, 0
- ands r0, r1
- cmp r0, 0
- beq _080AC498
- ldrb r0, [r4, 0x7]
- movs r1, 0x4
- orrs r0, r1
- strb r0, [r4, 0x7]
- bl sub_80AE074
- lsls r0, 24
- cmp r0, 0
- beq _080AC458
- ldrb r0, [r4, 0x11]
- bl sub_80B114C
-_080AC458:
- ldr r4, _080AC48C @ =sub_80C8C80
- adds r0, r4, 0
- movs r1, 0
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- ldr r2, _080AC490 @ =sub_80AD8DC
- adds r1, r4, 0
- bl SetTaskFuncWithFollowupFunc
- bl sub_80AF860
- ldr r1, _080AC494 @ =gTasks
- mov r0, r9
- add r0, r8
- lsls r0, 3
- adds r0, r1
- strh r5, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC484: .4byte gSharedMem + 0x19204
-_080AC488: .4byte gIsLinkContest
-_080AC48C: .4byte sub_80C8C80
-_080AC490: .4byte sub_80AD8DC
-_080AC494: .4byte gTasks
-_080AC498:
- adds r0, r7, 0
- bl sub_80B114C
- ldr r0, _080AC4B0 @ =gTasks
- mov r1, r9
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x2
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC4B0: .4byte gTasks
-_080AC4B4:
- ldrb r1, [r6, 0x7]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080AC4C2
- bl _080AD8CA
-_080AC4C2:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x2
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AC4D4:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AC508 @ =gSharedMem + 0x19260
- adds r2, r0, r1
- ldrb r1, [r2, 0xC]
- movs r0, 0x6
- ands r0, r1
- cmp r0, 0
- bne _080AC4F6
- ldrb r1, [r2, 0xB]
- movs r0, 0x80
- ands r0, r1
- lsls r0, 24
- lsrs r6, r0, 24
- cmp r6, 0
- beq _080AC50C
-_080AC4F6:
- mov r2, r8
- lsls r0, r2, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x1F
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC508: .4byte gSharedMem + 0x19260
-_080AC50C:
- bl sub_80AF138
- adds r0, r7, 0
- movs r1, 0
- bl sub_80B0CDC
- ldr r0, _080AC530 @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- strh r6, [r1, 0x1C]
- movs r0, 0x3
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC530: .4byte gTasks
-_080AC534:
- mov r4, r8
- lsls r4, 2
- mov r9, r4
- ldr r4, _080AC5C4 @ =gSharedMem + 0x19348
- ldr r1, _080AC5C8 @ =gBattleMonForms
- movs r2, 0
- adds r0, r1, 0x3
-_080AC542:
- strb r2, [r0]
- subs r0, 0x1
- cmp r0, r1
- bge _080AC542
- movs r6, 0x4
- adds r0, r4, 0
- movs r1, 0
- movs r2, 0x14
- bl memset
- ldr r5, _080AC5CC @ =0xfffffebc
- adds r7, r4, r5
- ldrb r0, [r7, 0x11]
- bl sub_80B28F0
- ldr r3, _080AC5D0 @ =gContestMons
- ldrb r2, [r7, 0x11]
- lsls r2, 6
- adds r0, r2, r3
- ldrh r0, [r0]
- adds r1, r3, 0
- adds r1, 0x3C
- adds r1, r2, r1
- ldr r1, [r1]
- adds r3, 0x38
- adds r2, r3
- ldr r2, [r2]
- bl sub_80AE9FC
- lsls r0, 24
- lsrs r5, r0, 24
- ldr r2, _080AC5D4 @ =gSprites
- lsls r0, r5, 4
- adds r0, r5
- lsls r0, 2
- adds r3, r0, r2
- movs r1, 0x78
- strh r1, [r3, 0x24]
- adds r2, 0x1C
- adds r0, r2
- ldr r1, _080AC5D8 @ =sub_80AD8FC
- str r1, [r0]
- ldr r0, _080AC5DC @ =gTasks
- mov r4, r9
- add r4, r8
- lsls r4, 3
- adds r4, r0
- strh r5, [r4, 0xC]
- ldr r1, _080AC5E0 @ =gObjectBankIDs
- ldr r0, _080AC5E4 @ =gBankAttacker
- ldrb r0, [r0]
- adds r0, r1
- strb r5, [r0]
- ldrb r0, [r7, 0x11]
- bl sub_80B09E4
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- bl sub_80B0BC4
- strh r6, [r4, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC5C4: .4byte gSharedMem + 0x19348
-_080AC5C8: .4byte gBattleMonForms
-_080AC5CC: .4byte 0xfffffebc
-_080AC5D0: .4byte gContestMons
-_080AC5D4: .4byte gSprites
-_080AC5D8: .4byte sub_80AD8FC
-_080AC5DC: .4byte gTasks
-_080AC5E0: .4byte gObjectBankIDs
-_080AC5E4: .4byte gBankAttacker
-_080AC5E8:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- mov r3, r12
- adds r2, r0, r3
- ldrb r5, [r2, 0xC]
- ldr r1, _080AC62C @ =gSprites
- lsls r0, r5, 4
- adds r0, r5
- lsls r0, 2
- adds r1, 0x1C
- adds r0, r1
- ldr r1, [r0]
- ldr r0, _080AC630 @ =SpriteCallbackDummy
- cmp r1, r0
- beq _080AC60E
- bl _080AD8CA
-_080AC60E:
- lsls r0, r7, 2
- ldr r1, _080AC634 @ =gSharedMem + 0x19338
- adds r0, r1
- ldrb r1, [r0, 0x2]
- movs r0, 0x2
- ands r0, r1
- cmp r0, 0
- beq _080AC622
- bl _080AD8CA
-_080AC622:
- movs r0, 0x5
- strh r0, [r2, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC62C: .4byte gSprites
-_080AC630: .4byte SpriteCallbackDummy
-_080AC634: .4byte gSharedMem + 0x19338
-_080AC638:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AC660 @ =gSharedMem + 0x19260
- adds r5, r0, r1
- ldrb r1, [r5, 0xC]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _080AC664
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x21
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC660: .4byte gSharedMem + 0x19260
-_080AC664:
- bl sub_80AF138
- ldr r0, _080AC690 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080AC694 @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldrh r1, [r5, 0x6]
- movs r0, 0xB1
- lsls r0, 1
- cmp r1, r0
- bhi _080AC6A0
- ldr r0, _080AC698 @ =gStringVar2
- adds r2, r1, 0
- movs r1, 0xD
- muls r1, r2
- ldr r2, _080AC69C @ =gMoveNames
- adds r1, r2
- bl StringCopy
- b _080AC6B0
- .align 2, 0
-_080AC690: .4byte gStringVar1
-_080AC694: .4byte gContestMons + 0x2
-_080AC698: .4byte gStringVar2
-_080AC69C: .4byte gMoveNames
-_080AC6A0:
- ldr r0, _080AC6E0 @ =gStringVar2
- ldr r2, _080AC6E4 @ =gUnknown_083CC330
- ldrb r1, [r5, 0xA]
- lsls r1, 2
- adds r1, r2
- ldr r1, [r1]
- bl StringCopy
-_080AC6B0:
- ldr r4, _080AC6E8 @ =gStringVar4
- ldr r1, _080AC6EC @ =gUnknown_083CAFD7
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080AC6F0 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AC6F4 @ =gTasks
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x6
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC6E0: .4byte gStringVar2
-_080AC6E4: .4byte gUnknown_083CC330
-_080AC6E8: .4byte gStringVar4
-_080AC6EC: .4byte gUnknown_083CAFD7
-_080AC6F0: .4byte gMenuWindow
-_080AC6F4: .4byte gTasks
-_080AC6F8:
- ldr r0, _080AC724 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AC708
- bl _080AD8CA
-_080AC708:
- ldr r0, _080AC728 @ =gSharedMem + 0x19204
- adds r0, 0x5A
- movs r1, 0
- strb r1, [r0]
- ldr r1, _080AC72C @ =gTasks
- mov r2, r8
- lsls r0, r2, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x7
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC724: .4byte gMenuWindow
-_080AC728: .4byte gSharedMem + 0x19204
-_080AC72C: .4byte gTasks
-_080AC730:
- ldrb r1, [r6, 0x11]
- lsls r0, r1, 3
- subs r0, r1
- lsls r0, 2
- adds r1, r6, 0
- adds r1, 0x5C
- adds r0, r1
- ldrh r0, [r0, 0x6]
- bl sub_80B2760
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- ldrb r0, [r6, 0x11]
- bl sub_80B2790
- ldrb r0, [r6, 0x11]
- bl sub_80B28F0
- adds r0, r4, 0
- bl sub_80B29B4
- adds r0, r4, 0
- bl ExecuteMoveAnim
- ldr r1, _080AC778 @ =gTasks
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x8
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC778: .4byte gTasks
-_080AC77C:
- ldr r0, _080AC7B8 @ =gAnimScriptCallback
- ldr r0, [r0]
- bl _call_via_r0
- ldr r0, _080AC7BC @ =gAnimScriptActive
- ldrb r4, [r0]
- cmp r4, 0
- beq _080AC790
- bl _080AD8CA
-_080AC790:
- adds r0, r7, 0
- bl sub_80B28CC
- ldr r1, _080AC7C0 @ =gSharedMem + 0x19204
- adds r0, r1, 0
- adds r0, 0x5A
- ldrb r0, [r0]
- cmp r0, 0
- beq _080AC7C8
- ldr r0, _080AC7C4 @ =gTasks
- mov r5, r8
- lsls r1, r5, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- strh r4, [r1, 0x1C]
- movs r0, 0x9
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC7B8: .4byte gAnimScriptCallback
-_080AC7BC: .4byte gAnimScriptActive
-_080AC7C0: .4byte gSharedMem + 0x19204
-_080AC7C4: .4byte gTasks
-_080AC7C8:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- adds r1, 0x5C
- adds r0, r1
- ldrb r1, [r0, 0x15]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- bne _080AC7E2
- adds r0, r7, 0
- bl sub_80B03A8
-_080AC7E2:
- bl sub_80B20C4
- ldr r0, _080AC7F0 @ =gTasks
- mov r2, r8
- lsls r1, r2, 2
- b _080AC8E2
- .align 2, 0
-_080AC7F0: .4byte gTasks
-_080AC7F4:
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- mov r4, r12
- adds r2, r0, r4
- ldrh r0, [r2, 0x1C]
- adds r1, r0, 0x1
- strh r1, [r2, 0x1C]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x1E
- bgt _080AC812
- bl _080AD8CA
-_080AC812:
- movs r0, 0
- strh r0, [r2, 0x1C]
- movs r0, 0x7
- strh r0, [r2, 0x8]
- bl _080AD8CA
-_080AC81E:
- mov r5, r8
- lsls r3, r5, 2
- adds r0, r3, r5
- lsls r0, 3
- mov r1, r12
- adds r4, r0, r1
- movs r0, 0
- strh r0, [r4, 0xA]
- lsls r2, r7, 3
- subs r0, r2, r7
- lsls r0, 2
- ldr r1, _080AC858 @ =gSharedMem + 0x19260
- adds r6, r0, r1
- ldrb r0, [r6, 0x13]
- mov r9, r3
- mov r10, r2
- adds r3, r1, 0
- cmp r0, 0xFF
- beq _080AC85C
- adds r1, r0, 0
- adds r0, r7, 0
- bl sub_80B146C
- movs r0, 0xFF
- strb r0, [r6, 0x13]
- movs r0, 0x18
- strh r0, [r4, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC858: .4byte gSharedMem + 0x19260
-_080AC85C:
- ldrb r0, [r6, 0x14]
- cmp r0, 0xFF
- beq _080AC8C4
- movs r6, 0
- cmp r6, r7
- beq _080AC86E
- ldrb r0, [r3, 0x13]
- cmp r0, 0xFF
- bne _080AC886
-_080AC86E:
- adds r6, 0x1
- cmp r6, 0x3
- bgt _080AC886
- cmp r6, r7
- beq _080AC86E
- lsls r0, r6, 3
- subs r0, r6
- lsls r0, 2
- adds r0, r3
- ldrb r0, [r0, 0x13]
- cmp r0, 0xFF
- beq _080AC86E
-_080AC886:
- cmp r6, 0x4
- bne _080AC8B4
- mov r2, r10
- subs r4, r2, r7
- lsls r4, 2
- adds r4, r3
- ldrb r1, [r4, 0x14]
- adds r0, r7, 0
- bl sub_80B146C
- movs r0, 0xFF
- strb r0, [r4, 0x14]
- ldr r1, _080AC8B0 @ =gTasks
- mov r0, r9
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x18
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC8B0: .4byte gTasks
-_080AC8B4:
- mov r0, r9
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x30
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AC8C4:
- movs r0, 0x30
- strh r0, [r4, 0x8]
- bl _080AD8CA
-_080AC8CC:
- ldr r0, _080AC8F0 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AC8DC
- bl _080AD8CA
-_080AC8DC:
- ldr r0, _080AC8F4 @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
-_080AC8E2:
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x17
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC8F0: .4byte gMenuWindow
-_080AC8F4: .4byte gTasks
-_080AC8F8:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AC914 @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r0, [r0, 0x11]
- movs r3, 0x3
- ands r3, r0
- cmp r3, 0x1
- bne _080AC918
- movs r0, 0x5
- bl sub_80B1710
- b _080AC934
- .align 2, 0
-_080AC914: .4byte gSharedMem + 0x19260
-_080AC918:
- cmp r3, 0x2
- bne _080AC924
- movs r0, 0x6
- bl sub_80B1710
- b _080AC934
-_080AC924:
- cmp r3, 0x3
- beq _080AC92E
- mov r4, r8
- lsls r0, r4, 2
- b _080AC95E
-_080AC92E:
- movs r0, 0x7
- bl sub_80B1710
-_080AC934:
- ldr r0, _080AC948 @ =gTasks
- mov r5, r8
- lsls r1, r5, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x31
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC948: .4byte gTasks
-_080AC94C:
- ldrb r1, [r6, 0x6]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _080AC95A
- bl _080AD8CA
-_080AC95A:
- mov r1, r8
- lsls r0, r1, 2
-_080AC95E:
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x2F
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AC96C:
- movs r0, 0x1
- bl sub_80B1FD0
- ldr r0, _080AC988 @ =gTasks
- mov r2, r8
- lsls r1, r2, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0xC
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC988: .4byte gTasks
-_080AC98C:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AC9B8 @ =gSharedMem + 0x19260
- adds r0, r1
- movs r3, 0x2
- ldrsh r1, [r0, r3]
- movs r0, 0
- adds r2, r7, 0
- bl sub_80AFBA0
- ldr r1, _080AC9BC @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0xD
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AC9B8: .4byte gSharedMem + 0x19260
-_080AC9BC: .4byte gTasks
-_080AC9C0:
- ldrb r0, [r6, 0x11]
- lsls r0, 2
- movs r5, 0x9A
- lsls r5, 1
- adds r1, r6, r5
- adds r0, r1
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080AC9DA
- bl _080AD8CA
-_080AC9DA:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x23
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AC9EC:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080ACA1C @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r1, [r0, 0x10]
- movs r0, 0x30
- ands r0, r1
- cmp r0, 0x10
- bne _080ACA06
- movs r0, 0x8
- bl sub_80B1710
-_080ACA06:
- ldr r0, _080ACA20 @ =gTasks
- mov r2, r8
- lsls r1, r2, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x24
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACA1C: .4byte gSharedMem + 0x19260
-_080ACA20: .4byte gTasks
-_080ACA24:
- ldrb r1, [r6, 0x6]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _080ACA32
- bl _080AD8CA
-_080ACA32:
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x25
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080ACA44:
- adds r0, r7, 0
- movs r1, 0x1
- bl sub_80AEE54
- lsls r0, 24
- cmp r0, 0
- beq _080ACA70
- ldr r1, _080ACA6C @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0
- strh r1, [r0, 0x1C]
- movs r1, 0x26
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACA6C: .4byte gTasks
-_080ACA70:
- ldr r0, _080ACA80 @ =gTasks
- mov r5, r8
- lsls r1, r5, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- b _080ACAA6
- .align 2, 0
-_080ACA80: .4byte gTasks
-_080ACA84:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- mov r2, r12
- adds r1, r0, r2
- ldrh r0, [r1, 0x1C]
- adds r0, 0x1
- strh r0, [r1, 0x1C]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x14
- bgt _080ACAA2
- bl _080AD8CA
-_080ACAA2:
- movs r0, 0
- strh r0, [r1, 0x1C]
-_080ACAA6:
- movs r0, 0x32
- strh r0, [r1, 0x8]
- bl _080AD8CA
-_080ACAAE:
- adds r0, r7, 0
- bl sub_80AF038
- lsls r0, 24
- cmp r0, 0
- beq _080ACAC0
- movs r0, 0x63
- bl PlaySE
-_080ACAC0:
- ldr r0, _080ACAD4 @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x19
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACAD4: .4byte gTasks
-_080ACAD8:
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0
- strh r1, [r0, 0xA]
- movs r1, 0x1A
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080ACAEE:
- movs r2, 0
- movs r4, 0
- mov r5, r8
- lsls r1, r5, 2
- adds r0, r1, r5
- lsls r0, 3
- add r0, r12
- movs r3, 0xA
- ldrsh r6, [r0, r3]
- mov r9, r1
- cmp r6, 0x3
- bgt _080ACB58
- ldr r3, _080ACB24 @ =gUnknown_02038696
- ldr r1, _080ACB28 @ =gSharedMem + 0x19260
-_080ACB0A:
- movs r4, 0
- movs r2, 0
- cmp r4, r7
- beq _080ACB2C
- ldrb r0, [r3]
- cmp r0, r6
- bne _080ACB2C
- ldrb r0, [r1, 0x13]
- cmp r0, 0xFF
- beq _080ACB2C
- movs r4, 0x1
- b _080ACB60
- .align 2, 0
-_080ACB24: .4byte gUnknown_02038696
-_080ACB28: .4byte gSharedMem + 0x19260
-_080ACB2C:
- adds r2, 0x1
- cmp r2, 0x3
- bgt _080ACB4E
- cmp r2, r7
- beq _080ACB2C
- adds r0, r2, r3
- ldrb r0, [r0]
- cmp r0, r6
- bne _080ACB2C
- lsls r0, r2, 3
- subs r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r0, [r0, 0x13]
- cmp r0, 0xFF
- beq _080ACB2C
- movs r4, 0x1
-_080ACB4E:
- cmp r4, 0
- bne _080ACB60
- adds r6, 0x1
- cmp r6, 0x3
- ble _080ACB0A
-_080ACB58:
- lsls r0, r4, 24
- asrs r1, r0, 24
- cmp r1, 0
- beq _080ACB98
-_080ACB60:
- mov r5, r9
- add r5, r8
- lsls r5, 3
- add r5, r12
- ldr r0, _080ACB90 @ =gUnknown_02038696
- adds r0, r2, r0
- ldrb r0, [r0]
- strh r0, [r5, 0xA]
- lsls r0, r2, 24
- lsrs r0, 24
- lsls r4, r2, 3
- subs r4, r2
- lsls r4, 2
- ldr r1, _080ACB94 @ =gSharedMem + 0x19260
- adds r4, r1
- ldrb r1, [r4, 0x13]
- bl sub_80B146C
- movs r0, 0xFF
- strb r0, [r4, 0x13]
- movs r0, 0x1B
- strh r0, [r5, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACB90: .4byte gUnknown_02038696
-_080ACB94: .4byte gSharedMem + 0x19260
-_080ACB98:
- mov r0, r9
- add r0, r8
- lsls r0, 3
- add r0, r12
- strh r1, [r0, 0xA]
- strh r1, [r0, 0x1C]
- movs r1, 0x33
- strh r1, [r0, 0x8]
- bl sub_80AF120
- bl _080AD8CA
-_080ACBB0:
- ldr r0, _080ACBD4 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080ACBC0
- bl _080AD8CA
-_080ACBC0:
- ldr r0, _080ACBD8 @ =gTasks
- mov r4, r8
- lsls r1, r4, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x1C
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACBD4: .4byte gMenuWindow
-_080ACBD8: .4byte gTasks
-_080ACBDC:
- movs r6, 0
- mov r5, r8
- lsls r0, r5, 2
- adds r1, r0, r5
- lsls r1, 3
- add r1, r12
- movs r3, 0xA
- ldrsh r2, [r1, r3]
- ldr r1, _080ACC38 @ =gUnknown_02038696
- mov r9, r0
- ldr r3, _080ACC3C @ =gSharedMem + 0x19260
- adds r5, r1, 0
- ldrb r4, [r5]
- cmp r2, r4
- beq _080ACC08
- adds r1, r2, 0
- adds r2, r5, 0
-_080ACBFE:
- adds r6, 0x1
- adds r0, r6, r2
- ldrb r0, [r0]
- cmp r1, r0
- bne _080ACBFE
-_080ACC08:
- lsls r0, r6, 3
- subs r0, r6
- lsls r0, 2
- adds r0, r3
- ldrb r1, [r0, 0xE]
- ldrh r0, [r0, 0x2]
- adds r0, r1
- lsls r0, 16
- asrs r0, 16
- negs r1, r1
- lsls r2, r6, 24
- lsrs r2, 24
- bl sub_80AFBA0
- ldr r1, _080ACC40 @ =gTasks
- mov r0, r9
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x1D
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACC38: .4byte gUnknown_02038696
-_080ACC3C: .4byte gSharedMem + 0x19260
-_080ACC40: .4byte gTasks
-_080ACC44:
- movs r6, 0
- mov r5, r8
- lsls r0, r5, 2
- adds r1, r0, r5
- lsls r1, 3
- add r1, r12
- movs r2, 0xA
- ldrsh r3, [r1, r2]
- ldr r1, _080ACC90 @ =gUnknown_02038696
- mov r9, r0
- ldr r2, _080ACC94 @ =gSharedMem + 0x19338
- adds r5, r1, 0
- ldrb r4, [r5]
- cmp r3, r4
- beq _080ACC6C
-_080ACC62:
- adds r6, 0x1
- adds r0, r6, r1
- ldrb r0, [r0]
- cmp r3, r0
- bne _080ACC62
-_080ACC6C:
- lsls r0, r6, 2
- adds r0, r2
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080ACC7E
- bl _080AD8CA
-_080ACC7E:
- mov r0, r9
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x27
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACC90: .4byte gUnknown_02038696
-_080ACC94: .4byte gSharedMem + 0x19338
-_080ACC98:
- movs r6, 0
- mov r5, r8
- lsls r0, r5, 2
- adds r1, r0, r5
- lsls r1, 3
- add r1, r12
- movs r3, 0xA
- ldrsh r2, [r1, r3]
- ldr r1, _080ACCE8 @ =gUnknown_02038696
- mov r9, r0
- adds r5, r1, 0
- ldrb r4, [r5]
- cmp r2, r4
- beq _080ACCC2
- adds r1, r2, 0
- adds r2, r5, 0
-_080ACCB8:
- adds r6, 0x1
- adds r0, r6, r2
- ldrb r0, [r0]
- cmp r1, r0
- bne _080ACCB8
-_080ACCC2:
- lsls r0, r6, 24
- lsrs r0, 24
- movs r1, 0x1
- bl sub_80AEE54
- lsls r0, 24
- cmp r0, 0
- beq _080ACCF0
- ldr r1, _080ACCEC @ =gTasks
- mov r0, r9
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0
- strh r1, [r0, 0x1C]
- movs r1, 0x28
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACCE8: .4byte gUnknown_02038696
-_080ACCEC: .4byte gTasks
-_080ACCF0:
- ldr r0, _080ACCFC @ =gTasks
- mov r1, r9
- add r1, r8
- lsls r1, 3
- adds r1, r0
- b _080ACD22
- .align 2, 0
-_080ACCFC: .4byte gTasks
-_080ACD00:
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- mov r2, r12
- adds r1, r0, r2
- ldrh r0, [r1, 0x1C]
- adds r0, 0x1
- strh r0, [r1, 0x1C]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x14
- bgt _080ACD1E
- bl _080AD8CA
-_080ACD1E:
- movs r0, 0
- strh r0, [r1, 0x1C]
-_080ACD22:
- movs r0, 0x1E
- strh r0, [r1, 0x8]
- bl _080AD8CA
-_080ACD2A:
- movs r6, 0
- ldr r2, _080ACD78 @ =gUnknown_02038696
- ldrb r3, [r2]
- mov r4, r8
- lsls r1, r4, 2
- adds r0, r1, r4
- lsls r0, 3
- mov r5, r12
- adds r4, r0, r5
- movs r5, 0xA
- ldrsh r0, [r4, r5]
- mov r9, r1
- adds r5, r2, 0
- cmp r3, r0
- beq _080ACD5E
- adds r3, r5, 0
- adds r2, r4, 0
-_080ACD4C:
- adds r6, 0x1
- cmp r6, 0x3
- bgt _080ACD5E
- adds r0, r6, r3
- ldrb r1, [r0]
- movs r4, 0xA
- ldrsh r0, [r2, r4]
- cmp r1, r0
- bne _080ACD4C
-_080ACD5E:
- lsls r4, r6, 24
- lsrs r0, r4, 24
- bl sub_80AF038
- lsls r0, 24
- adds r5, r4, 0
- cmp r0, 0
- beq _080ACD7C
- movs r0, 0x63
- bl PlaySE
- b _080ACD82
- .align 2, 0
-_080ACD78: .4byte gUnknown_02038696
-_080ACD7C:
- movs r0, 0x64
- bl PlaySE
-_080ACD82:
- lsls r0, r6, 3
- subs r0, r6
- lsls r0, 2
- ldr r1, _080ACDC0 @ =gSharedMem + 0x19260
- adds r4, r0, r1
- ldrb r1, [r4, 0x15]
- movs r0, 0x20
- ands r0, r1
- cmp r0, 0
- beq _080ACDA6
- lsrs r0, r5, 24
- bl sub_80B03A8
- ldrb r1, [r4, 0x15]
- movs r0, 0x21
- negs r0, r0
- ands r0, r1
- strb r0, [r4, 0x15]
-_080ACDA6:
- ldr r0, _080ACDC4 @ =gTasks
- mov r1, r9
- add r1, r8
- lsls r1, 3
- adds r1, r0
- ldrh r0, [r1, 0xA]
- adds r0, 0x1
- strh r0, [r1, 0xA]
- movs r0, 0x1A
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACDC0: .4byte gSharedMem + 0x19260
-_080ACDC4: .4byte gTasks
-_080ACDC8:
- mov r5, r8
- lsls r2, r5, 2
- adds r0, r2, r5
- lsls r0, 3
- mov r1, r12
- adds r3, r0, r1
- ldrh r0, [r3, 0x1C]
- adds r1, r0, 0x1
- strh r1, [r3, 0x1C]
- lsls r0, 16
- asrs r0, 16
- mov r9, r2
- cmp r0, 0x9
- bgt _080ACDE8
- bl _080AD8CA
-_080ACDE8:
- movs r0, 0
- strh r0, [r3, 0x1C]
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080ACE48 @ =gSharedMem + 0x19260
- adds r2, r0, r1
- ldrb r1, [r2, 0xC]
- movs r0, 0x6
- ands r0, r1
- cmp r0, 0
- bne _080ACE0A
- ldrb r1, [r2, 0x11]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080ACE36
-_080ACE0A:
- bl sub_80AF138
- ldr r0, _080ACE4C @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080ACE50 @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r4, _080ACE54 @ =gStringVar4
- ldr r1, _080ACE58 @ =gUnknown_083CC103
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080ACE5C @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
-_080ACE36:
- ldr r0, _080ACE60 @ =gTasks
- mov r1, r9
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x34
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACE48: .4byte gSharedMem + 0x19260
-_080ACE4C: .4byte gStringVar1
-_080ACE50: .4byte gContestMons + 0x2
-_080ACE54: .4byte gStringVar4
-_080ACE58: .4byte gUnknown_083CC103
-_080ACE5C: .4byte gMenuWindow
-_080ACE60: .4byte gTasks
-_080ACE64:
- ldr r0, _080ACE9C @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080ACE74
- bl _080AD8CA
-_080ACE74:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080ACEA0 @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r1, [r0, 0x15]
- movs r0, 0x40
- ands r0, r1
- cmp r0, 0
- bne _080ACEA8
- ldr r0, _080ACEA4 @ =gTasks
- mov r2, r8
- lsls r1, r2, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x11
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACE9C: .4byte gMenuWindow
-_080ACEA0: .4byte gSharedMem + 0x19260
-_080ACEA4: .4byte gTasks
-_080ACEA8:
- ldr r0, _080ACEBC @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0xE
- strh r0, [r1, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACEBC: .4byte gTasks
-_080ACEC0:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080ACEE4 @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r4, [r0, 0x16]
- lsls r4, 24
- lsrs r5, r4, 24
- cmp r5, 0
- beq _080ACF48
- bl sub_80AF138
- asrs r0, r4, 24
- cmp r0, 0x1
- bne _080ACEF0
- ldr r0, _080ACEE8 @ =gMenuWindow
- ldr r1, _080ACEEC @ =gUnknown_083CBD79
- b _080ACEF8
- .align 2, 0
-_080ACEE4: .4byte gSharedMem + 0x19260
-_080ACEE8: .4byte gMenuWindow
-_080ACEEC: .4byte gUnknown_083CBD79
-_080ACEF0:
- cmp r0, 0x2
- bne _080ACF10
- ldr r0, _080ACF08 @ =gMenuWindow
- ldr r1, _080ACF0C @ =gUnknown_083CBD9D
-_080ACEF8:
- movs r2, 0xC2
- lsls r2, 2
- movs r3, 0xF
- str r3, [sp]
- movs r3, 0x1
- bl sub_8002EB0
- b _080ACF22
- .align 2, 0
-_080ACF08: .4byte gMenuWindow
-_080ACF0C: .4byte gUnknown_083CBD9D
-_080ACF10:
- ldr r0, _080ACF3C @ =gMenuWindow
- ldr r1, _080ACF40 @ =gUnknown_083CBDC6
- movs r2, 0xC2
- lsls r2, 2
- movs r3, 0xF
- str r3, [sp]
- movs r3, 0x1
- bl sub_8002EB0
-_080ACF22:
- movs r0, 0x3
- bl sub_80B1710
- ldr r1, _080ACF44 @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0
- strh r1, [r0, 0x1C]
- b _080ACF88
- .align 2, 0
-_080ACF3C: .4byte gMenuWindow
-_080ACF40: .4byte gUnknown_083CBDC6
-_080ACF44: .4byte gTasks
-_080ACF48:
- bl sub_80AF138
- ldr r0, _080ACF90 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080ACF94 @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r4, _080ACF98 @ =gStringVar4
- ldr r1, _080ACF9C @ =gUnknown_083CBD52
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080ACFA0 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- movs r0, 0x2
- bl sub_80B1710
- ldr r1, _080ACFA4 @ =gTasks
- mov r2, r8
- lsls r0, r2, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- strh r5, [r0, 0x1C]
-_080ACF88:
- movs r1, 0x2D
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACF90: .4byte gStringVar1
-_080ACF94: .4byte gContestMons + 0x2
-_080ACF98: .4byte gStringVar4
-_080ACF9C: .4byte gUnknown_083CBD52
-_080ACFA0: .4byte gMenuWindow
-_080ACFA4: .4byte gTasks
-_080ACFA8:
- ldrb r1, [r6, 0x6]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _080ACFB6
- bl _080AD8CA
-_080ACFB6:
- ldrb r0, [r6, 0x11]
- bl sub_80B09B0
- ldr r1, _080ACFD0 @ =gTasks
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0xF
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080ACFD0: .4byte gTasks
-_080ACFD4:
- ldr r0, _080AD034 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080ACFE4
- bl _080AD8CA
-_080ACFE4:
- ldr r1, _080AD038 @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r4, r0, r1
- ldrh r0, [r4, 0x1C]
- adds r0, 0x1
- strh r0, [r4, 0x1C]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x32
- bgt _080AD002
- bl _080AD8CA
-_080AD002:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AD03C @ =gSharedMem + 0x19260
- adds r6, r0, r1
- ldrb r1, [r6, 0x15]
- movs r5, 0x10
- adds r0, r5, 0
- ands r0, r1
- cmp r0, 0
- bne _080AD02C
- movs r1, 0x2
- ldrsh r0, [r6, r1]
- ldrb r1, [r6, 0x17]
- adds r2, r7, 0
- bl sub_80AFBA0
- ldrh r0, [r6, 0x2]
- ldrb r2, [r6, 0x17]
- adds r0, r2
- strh r0, [r6, 0x2]
-_080AD02C:
- strh r5, [r4, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AD034: .4byte gMenuWindow
-_080AD038: .4byte gTasks
-_080AD03C: .4byte gSharedMem + 0x19260
-_080AD040:
- lsls r0, r7, 2
- ldr r1, _080AD06C @ =gSharedMem + 0x19338
- adds r0, r1
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0
- beq _080AD058
- bl _080AD8CA
-_080AD058:
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- strh r1, [r0, 0x1C]
- movs r1, 0x11
- strh r1, [r0, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AD06C: .4byte gSharedMem + 0x19338
-_080AD070:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AD0CC @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r1, [r0, 0x15]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _080AD0E8
- bl sub_80AF138
- ldr r0, _080AD0D0 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080AD0D4 @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r4, _080AD0D8 @ =gStringVar4
- ldr r1, _080AD0DC @ =gUnknown_083CC075
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080AD0E0 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r0, _080AD0E4 @ =gTasks
- mov r5, r8
- lsls r4, r5, 2
- add r4, r8
- lsls r4, 3
- adds r4, r0
- movs r0, 0
- strh r0, [r4, 0x1C]
- bl sub_80B1710
- movs r0, 0x2E
- strh r0, [r4, 0x8]
- bl _080AD8CA
- .align 2, 0
-_080AD0CC: .4byte gSharedMem + 0x19260
-_080AD0D0: .4byte gStringVar1
-_080AD0D4: .4byte gContestMons + 0x2
-_080AD0D8: .4byte gStringVar4
-_080AD0DC: .4byte gUnknown_083CC075
-_080AD0E0: .4byte gMenuWindow
-_080AD0E4: .4byte gTasks
-_080AD0E8:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x29
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AD0FA:
- ldrb r1, [r6, 0x6]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _080AD108
- bl _080AD8CA
-_080AD108:
- mov r2, r8
- lsls r0, r2, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x13
- strh r1, [r0, 0x8]
- bl _080AD8CA
-_080AD11A:
- ldr r0, _080AD15C @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD12A
- bl _080AD8CA
-_080AD12A:
- lsls r4, r7, 3
- subs r4, r7
- lsls r4, 2
- ldr r0, _080AD160 @ =gSharedMem + 0x19260
- adds r4, r0
- movs r3, 0x2
- ldrsh r0, [r4, r3]
- ldrb r1, [r4, 0x18]
- negs r1, r1
- adds r2, r7, 0
- bl sub_80AFBA0
- ldrb r1, [r4, 0x18]
- ldrh r0, [r4, 0x2]
- subs r0, r1
- strh r0, [r4, 0x2]
- ldr r1, _080AD164 @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x12
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD15C: .4byte gMenuWindow
-_080AD160: .4byte gSharedMem + 0x19260
-_080AD164: .4byte gTasks
-_080AD168:
- bl sub_80B0D7C
- lsls r0, r7, 2
- ldr r1, _080AD19C @ =gSharedMem + 0x19338
- adds r0, r1
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- lsls r0, 24
- lsrs r6, r0, 24
- cmp r6, 0
- beq _080AD182
- b _080AD8CA
-_080AD182:
- ldr r0, _080AD1A0 @ =gTasks
- mov r5, r8
- lsls r4, r5, 2
- add r4, r8
- lsls r4, 3
- adds r4, r0
- strh r6, [r4, 0x1C]
- bl sub_80AF138
- movs r0, 0x29
- strh r0, [r4, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD19C: .4byte gSharedMem + 0x19338
-_080AD1A0: .4byte gTasks
-_080AD1A4:
- ldr r2, _080AD1CC @ =gSharedMem + 0x19328
- ldrb r1, [r2, 0x1]
- movs r0, 0x1
- ands r0, r1
- adds r1, r2, 0
- cmp r0, 0
- beq _080AD1D0
- ldr r0, [r1]
- lsls r0, 20
- lsrs r0, 29
- cmp r7, r0
- beq _080AD1D0
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- movs r1, 0x39
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD1CC: .4byte gSharedMem + 0x19328
-_080AD1D0:
- ldrb r4, [r1]
- lsls r2, r7, 3
- subs r0, r2, r7
- lsls r0, 2
- subs r1, 0xC8
- adds r5, r0, r1
- ldrb r1, [r5, 0x11]
- movs r0, 0x10
- ands r0, r1
- mov r10, r2
- cmp r0, 0
- beq _080AD204
- movs r4, 0x1
- ldr r0, _080AD1FC @ =gStringVar3
- ldrh r2, [r5, 0x6]
- movs r1, 0xD
- muls r1, r2
- ldr r2, _080AD200 @ =gMoveNames
- adds r1, r2
- bl StringCopy
- b _080AD21E
- .align 2, 0
-_080AD1FC: .4byte gStringVar3
-_080AD200: .4byte gMoveNames
-_080AD204:
- ldr r0, _080AD270 @ =gStringVar3
- ldr r3, _080AD274 @ =gUnknown_083CC2D8
- ldr r2, _080AD278 @ =gContestMoves
- ldrh r1, [r5, 0x6]
- lsls r1, 3
- adds r1, r2
- ldrb r1, [r1, 0x1]
- lsls r1, 29
- lsrs r1, 27
- adds r1, r3
- ldr r1, [r1]
- bl StringCopy
-_080AD21E:
- lsls r0, r4, 24
- cmp r0, 0
- ble _080AD23A
- mov r2, r10
- subs r0, r2, r7
- lsls r0, 2
- ldr r1, _080AD27C @ =gSharedMem + 0x19260
- adds r0, r1
- ldrb r1, [r0, 0x15]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _080AD23A
- movs r4, 0
-_080AD23A:
- bl sub_80AF138
- ldr r0, _080AD280 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080AD284 @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r3, _080AD288 @ =gSharedMem + 0x19204
- ldrb r0, [r3, 0x13]
- lsls r1, r4, 24
- asrs r2, r1, 24
- adds r0, r2, r0
- strb r0, [r3, 0x13]
- lsls r0, 24
- adds r4, r1, 0
- cmp r0, 0
- bge _080AD262
- movs r0, 0
- strb r0, [r3, 0x13]
-_080AD262:
- cmp r2, 0
- bne _080AD290
- ldr r0, _080AD28C @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- b _080AD6EC
- .align 2, 0
-_080AD270: .4byte gStringVar3
-_080AD274: .4byte gUnknown_083CC2D8
-_080AD278: .4byte gContestMoves
-_080AD27C: .4byte gSharedMem + 0x19260
-_080AD280: .4byte gStringVar1
-_080AD284: .4byte gContestMons + 0x2
-_080AD288: .4byte gSharedMem + 0x19204
-_080AD28C: .4byte gTasks
-_080AD290:
- cmp r2, 0
- bge _080AD2A8
- ldr r0, _080AD2A0 @ =gStringVar4
- ldr r1, _080AD2A4 @ =gUnknown_083CC0BC
- bl StringExpandPlaceholders
- b _080AD2D0
- .align 2, 0
-_080AD2A0: .4byte gStringVar4
-_080AD2A4: .4byte gUnknown_083CC0BC
-_080AD2A8:
- cmp r2, 0
- ble _080AD2C8
- movs r0, 0x13
- ldrsb r0, [r3, r0]
- cmp r0, 0x4
- bgt _080AD2C8
- ldr r0, _080AD2C0 @ =gStringVar4
- ldr r1, _080AD2C4 @ =gUnknown_083CC0A0
- bl StringExpandPlaceholders
- b _080AD2D0
- .align 2, 0
-_080AD2C0: .4byte gStringVar4
-_080AD2C4: .4byte gUnknown_083CC0A0
-_080AD2C8:
- ldr r0, _080AD300 @ =gStringVar4
- ldr r1, _080AD304 @ =gUnknown_083CC0E3
- bl StringExpandPlaceholders
-_080AD2D0:
- ldr r0, _080AD308 @ =gMenuWindow
- ldr r1, _080AD300 @ =gStringVar4
- movs r2, 0xC2
- lsls r2, 2
- movs r3, 0xF
- str r3, [sp]
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AD30C @ =gTasks
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- adds r1, r0, r1
- movs r0, 0
- strh r0, [r1, 0x1C]
- strh r0, [r1, 0x1E]
- cmp r4, 0
- bge _080AD310
- movs r0, 0x35
- strh r0, [r1, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD300: .4byte gStringVar4
-_080AD304: .4byte gUnknown_083CC0E3
-_080AD308: .4byte gMenuWindow
-_080AD30C: .4byte gTasks
-_080AD310:
- movs r0, 0x36
- strh r0, [r1, 0x8]
- b _080AD8CA
-_080AD316:
- mov r1, r8
- lsls r0, r1, 2
- add r0, r8
- lsls r0, 3
- mov r2, r12
- adds r4, r0, r2
- movs r3, 0x1C
- ldrsh r2, [r4, r3]
- cmp r2, 0x1
- beq _080AD354
- cmp r2, 0x1
- bgt _080AD334
- cmp r2, 0
- beq _080AD33E
- b _080AD8CA
-_080AD334:
- cmp r2, 0x2
- beq _080AD37C
- cmp r2, 0x3
- beq _080AD3B0
- b _080AD8CA
-_080AD33E:
- movs r0, 0x1
- negs r0, r0
- movs r1, 0x1
- bl sub_80B1EA8
- ldr r0, _080AD350 @ =0x00000187
- bl PlayFanfare
- b _080AD3A8
- .align 2, 0
-_080AD350: .4byte 0x00000187
-_080AD354:
- ldrb r0, [r6, 0x7]
- ands r2, r0
- cmp r2, 0
- beq _080AD35E
- b _080AD8CA
-_080AD35E:
- ldr r0, _080AD378 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD36C
- b _080AD8CA
-_080AD36C:
- movs r0, 0x1
- negs r0, r0
- bl sub_80B1CBC
- b _080AD3A8
- .align 2, 0
-_080AD378: .4byte gMenuWindow
-_080AD37C:
- ldrb r1, [r6, 0x6]
- movs r0, 0x20
- ands r0, r1
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0
- beq _080AD38C
- b _080AD8CA
-_080AD38C:
- ldrh r0, [r4, 0x1E]
- adds r1, r0, 0x1
- strh r1, [r4, 0x1E]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x1D
- bgt _080AD39C
- b _080AD8CA
-_080AD39C:
- strh r2, [r4, 0x1E]
- movs r1, 0x1
- negs r1, r1
- adds r0, r1, 0
- bl sub_80B1EA8
-_080AD3A8:
- ldrh r0, [r4, 0x1C]
- adds r0, 0x1
- strh r0, [r4, 0x1C]
- b _080AD8CA
-_080AD3B0:
- ldr r0, _080AD3CC @ =gPaletteFade
- ldrb r1, [r0, 0x7]
- movs r0, 0x80
- ands r0, r1
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0
- beq _080AD3C2
- b _080AD8CA
-_080AD3C2:
- strh r0, [r4, 0x1C]
- strh r0, [r4, 0x1E]
- movs r0, 0x2B
- strh r0, [r4, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD3CC: .4byte gPaletteFade
-_080AD3D0:
- mov r4, r8
- lsls r1, r4, 2
- adds r0, r1, r4
- lsls r0, 3
- add r0, r12
- movs r5, 0x1C
- ldrsh r0, [r0, r5]
- mov r9, r1
- cmp r0, 0x4
- bls _080AD3E6
- b _080AD8CA
-_080AD3E6:
- lsls r0, 2
- ldr r1, _080AD3F0 @ =_080AD3F4
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_080AD3F0: .4byte _080AD3F4
- .align 2, 0
-_080AD3F4:
- .4byte _080AD408
- .4byte _080AD420
- .4byte _080AD43E
- .4byte _080AD4A0
- .4byte _080AD4EC
-_080AD408:
- ldr r0, _080AD41C @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD416
- b _080AD8CA
-_080AD416:
- movs r0, 0x1
- movs r1, 0x1
- b _080AD4C8
- .align 2, 0
-_080AD41C: .4byte gMenuWindow
-_080AD420:
- ldrb r1, [r6, 0x7]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _080AD42C
- b _080AD8CA
-_080AD42C:
- bl sub_80B1DDC
- movs r0, 0xDF
- bl PlaySE
- movs r0, 0x1
- bl sub_80B1CBC
- b _080AD4CC
-_080AD43E:
- ldrb r1, [r6, 0x6]
- movs r0, 0x20
- ands r0, r1
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0
- beq _080AD44E
- b _080AD8CA
-_080AD44E:
- mov r0, r9
- add r0, r8
- lsls r0, 3
- mov r1, r12
- adds r3, r0, r1
- ldrh r0, [r3, 0x1E]
- adds r1, r0, 0x1
- strh r1, [r3, 0x1E]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x1D
- bgt _080AD468
- b _080AD8CA
-_080AD468:
- strh r2, [r3, 0x1E]
- lsls r4, r7, 3
- subs r4, r7
- lsls r4, 2
- adds r0, r6, 0
- adds r0, 0x5C
- adds r4, r0
- movs r2, 0x2
- ldrsh r0, [r4, r2]
- movs r1, 0x92
- lsls r1, 1
- adds r5, r6, r1
- movs r1, 0x2
- ldrsb r1, [r5, r1]
- adds r2, r7, 0
- str r3, [sp, 0x4]
- bl sub_80AFBA0
- movs r0, 0x2
- ldrsb r0, [r5, r0]
- ldrh r2, [r4, 0x2]
- adds r0, r2
- strh r0, [r4, 0x2]
- ldr r3, [sp, 0x4]
- ldrh r0, [r3, 0x1C]
- adds r0, 0x1
- strh r0, [r3, 0x1C]
- b _080AD8CA
-_080AD4A0:
- lsls r0, r7, 2
- ldr r2, _080AD4E0 @ =gSharedMem + 0x19338
- adds r0, r2
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080AD4B2
- b _080AD8CA
-_080AD4B2:
- ldr r3, _080AD4E4 @ =0xfffffecc
- adds r0, r2, r3
- ldrb r1, [r0, 0x6]
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- beq _080AD4C2
- b _080AD8CA
-_080AD4C2:
- movs r1, 0x1
- negs r1, r1
- movs r0, 0x1
-_080AD4C8:
- bl sub_80B1EA8
-_080AD4CC:
- ldr r0, _080AD4E8 @ =gTasks
- mov r1, r9
- add r1, r8
- lsls r1, 3
- adds r1, r0
- ldrh r0, [r1, 0x1C]
- adds r0, 0x1
- strh r0, [r1, 0x1C]
- b _080AD8CA
- .align 2, 0
-_080AD4E0: .4byte gSharedMem + 0x19338
-_080AD4E4: .4byte 0xfffffecc
-_080AD4E8: .4byte gTasks
-_080AD4EC:
- ldr r0, _080AD510 @ =gPaletteFade
- ldrb r1, [r0, 0x7]
- movs r0, 0x80
- ands r0, r1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0
- beq _080AD4FE
- b _080AD8CA
-_080AD4FE:
- mov r0, r9
- add r0, r8
- lsls r0, 3
- add r0, r12
- strh r1, [r0, 0x1C]
- strh r1, [r0, 0x1E]
- movs r1, 0x2B
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD510: .4byte gPaletteFade
-_080AD514:
- lsls r0, r7, 2
- ldr r1, _080AD534 @ =gSharedMem + 0x19338
- adds r0, r1
- ldrb r1, [r0, 0x2]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _080AD526
- b _080AD8CA
-_080AD526:
- bl sub_80AF138
- ldr r0, _080AD538 @ =gTasks
- mov r4, r8
- lsls r1, r4, 2
- b _080AD6EC
- .align 2, 0
-_080AD534: .4byte gSharedMem + 0x19338
-_080AD538: .4byte gTasks
-_080AD53C:
- bl sub_80AF138
- ldr r0, _080AD5A8 @ =gStringVar3
- ldr r4, _080AD5AC @ =gSharedMem + 0x19328
- ldr r1, [r4]
- lsls r1, 20
- lsrs r1, 29
- lsls r1, 6
- ldr r5, _080AD5B0 @ =gContestMons + 0x2
- adds r1, r5
- bl StringCopy
- ldr r0, _080AD5B4 @ =gStringVar1
- lsls r1, r7, 6
- adds r1, r5
- bl StringCopy
- ldr r0, _080AD5B8 @ =gStringVar2
- lsls r1, r7, 3
- subs r1, r7
- lsls r1, 2
- subs r4, 0xC8
- adds r1, r4
- ldrh r2, [r1, 0x6]
- movs r1, 0xD
- muls r1, r2
- ldr r2, _080AD5BC @ =gMoveNames
- adds r1, r2
- bl StringCopy
- ldr r4, _080AD5C0 @ =gStringVar4
- ldr r1, _080AD5C4 @ =gUnknown_083CC14A
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080AD5C8 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AD5CC @ =gTasks
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x3A
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD5A8: .4byte gStringVar3
-_080AD5AC: .4byte gSharedMem + 0x19328
-_080AD5B0: .4byte gContestMons + 0x2
-_080AD5B4: .4byte gStringVar1
-_080AD5B8: .4byte gStringVar2
-_080AD5BC: .4byte gMoveNames
-_080AD5C0: .4byte gStringVar4
-_080AD5C4: .4byte gUnknown_083CC14A
-_080AD5C8: .4byte gMenuWindow
-_080AD5CC: .4byte gTasks
-_080AD5D0:
- ldr r5, _080AD614 @ =gMenuWindow
- adds r0, r5, 0
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD5E0
- b _080AD8CA
-_080AD5E0:
- bl sub_80AF138
- ldr r4, _080AD618 @ =gStringVar4
- ldr r1, _080AD61C @ =gUnknown_083CC16E
- adds r0, r4, 0
- bl StringExpandPlaceholders
- movs r2, 0xC2
- lsls r2, 2
- movs r0, 0xF
- str r0, [sp]
- adds r0, r5, 0
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AD620 @ =gTasks
- mov r2, r8
- lsls r0, r2, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x3B
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD614: .4byte gMenuWindow
-_080AD618: .4byte gStringVar4
-_080AD61C: .4byte gUnknown_083CC16E
-_080AD620: .4byte gTasks
-_080AD624:
- ldr r0, _080AD640 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD632
- b _080AD8CA
-_080AD632:
- bl sub_80AF138
- ldr r0, _080AD644 @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- b _080AD6EC
- .align 2, 0
-_080AD640: .4byte gMenuWindow
-_080AD644: .4byte gTasks
-_080AD648:
- lsls r0, r7, 3
- subs r0, r7
- lsls r0, 2
- ldr r1, _080AD6B4 @ =gSharedMem + 0x19260
- adds r4, r0, r1
- ldrb r1, [r4, 0x15]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _080AD664
- movs r0, 0x11
- negs r0, r0
- ands r0, r1
- strb r0, [r4, 0x15]
-_080AD664:
- adds r0, r7, 0
- bl sub_80B09B0
- ldr r0, _080AD6B8 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080AD6BC @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r0, _080AD6C0 @ =gStringVar2
- ldrh r2, [r4, 0x6]
- movs r1, 0xD
- muls r1, r2
- ldr r2, _080AD6C4 @ =gMoveNames
- adds r1, r2
- bl StringCopy
- ldr r4, _080AD6C8 @ =gStringVar4
- ldr r1, _080AD6CC @ =gUnknown_083CBF60
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080AD6D0 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AD6D4 @ =gTasks
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x22
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD6B4: .4byte gSharedMem + 0x19260
-_080AD6B8: .4byte gStringVar1
-_080AD6BC: .4byte gContestMons + 0x2
-_080AD6C0: .4byte gStringVar2
-_080AD6C4: .4byte gMoveNames
-_080AD6C8: .4byte gStringVar4
-_080AD6CC: .4byte gUnknown_083CBF60
-_080AD6D0: .4byte gMenuWindow
-_080AD6D4: .4byte gTasks
-_080AD6D8:
- ldr r0, _080AD6F8 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- bne _080AD6E6
- b _080AD8CA
-_080AD6E6:
- ldr r0, _080AD6FC @ =gTasks
- mov r5, r8
- lsls r1, r5, 2
-_080AD6EC:
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x37
- strh r0, [r1, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD6F8: .4byte gMenuWindow
-_080AD6FC: .4byte gTasks
-_080AD700:
- bl sub_80B1BDC
- ldr r0, _080AD718 @ =gTasks
- mov r2, r8
- lsls r1, r2, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x38
- strh r0, [r1, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD718: .4byte gTasks
-_080AD71C:
- ldrb r1, [r6, 0x6]
- movs r0, 0x40
- ands r0, r1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0
- beq _080AD72C
- b _080AD8CA
-_080AD72C:
- movs r0, 0x13
- ldrsb r0, [r6, r0]
- cmp r0, 0x4
- ble _080AD73A
- strb r1, [r6, 0x13]
- bl sub_80B1928
-_080AD73A:
- ldr r0, _080AD74C @ =gTasks
- mov r3, r8
- lsls r1, r3, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0xA
- strh r0, [r1, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD74C: .4byte gTasks
-_080AD750:
- mov r4, r8
- lsls r2, r4, 2
- add r2, r8
- lsls r2, 3
- add r2, r12
- ldrb r5, [r2, 0xC]
- ldr r1, _080AD774 @ =gSprites
- lsls r0, r5, 4
- adds r0, r5
- lsls r0, 2
- adds r1, 0x1C
- adds r0, r1
- ldr r1, _080AD778 @ =sub_80AD92C
- str r1, [r0]
- movs r0, 0xB
- strh r0, [r2, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD774: .4byte gSprites
-_080AD778: .4byte sub_80AD92C
-_080AD77C:
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- mov r1, r12
- adds r4, r0, r1
- ldrb r5, [r4, 0xC]
- ldr r1, _080AD7B4 @ =gSprites
- lsls r0, r5, 4
- adds r0, r5
- lsls r0, 2
- adds r6, r0, r1
- adds r0, r6, 0
- adds r0, 0x3E
- ldrb r0, [r0]
- lsls r0, 29
- cmp r0, 0
- blt _080AD7A2
- b _080AD8CA
-_080AD7A2:
- adds r0, r6, 0
- bl FreeSpriteOamMatrix
- adds r0, r6, 0
- bl DestroySprite
- movs r0, 0x14
- strh r0, [r4, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD7B4: .4byte gSprites
-_080AD7B8:
- movs r6, 0
- mov r2, r8
- lsls r2, 2
- mov r9, r2
-_080AD7C0:
- lsls r0, r6, 24
- lsrs r0, 24
- movs r1, 0x1
- bl sub_80B0CDC
- adds r6, 0x1
- cmp r6, 0x3
- ble _080AD7C0
- ldr r1, _080AD7E4 @ =gTasks
- mov r0, r9
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0
- strh r1, [r0, 0x1C]
- movs r1, 0x15
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD7E4: .4byte gTasks
-_080AD7E8:
- bl sub_80AF138
- ldr r0, _080AD828 @ =gStringVar1
- lsls r1, r7, 6
- ldr r2, _080AD82C @ =gContestMons + 0x2
- adds r1, r2
- bl StringCopy
- ldr r4, _080AD830 @ =gStringVar4
- ldr r1, _080AD834 @ =gUnknown_083CB00D
- adds r0, r4, 0
- bl StringExpandPlaceholders
- ldr r0, _080AD838 @ =gMenuWindow
- movs r2, 0xC2
- lsls r2, 2
- movs r1, 0xF
- str r1, [sp]
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_8002EB0
- ldr r1, _080AD83C @ =gTasks
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- adds r0, r1
- movs r1, 0x20
- strh r1, [r0, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD828: .4byte gStringVar1
-_080AD82C: .4byte gContestMons + 0x2
-_080AD830: .4byte gStringVar4
-_080AD834: .4byte gUnknown_083CB00D
-_080AD838: .4byte gMenuWindow
-_080AD83C: .4byte gTasks
-_080AD840:
- ldr r0, _080AD860 @ =gMenuWindow
- bl sub_80037A0
- lsls r0, 24
- cmp r0, 0
- beq _080AD8CA
- ldr r0, _080AD864 @ =gTasks
- mov r4, r8
- lsls r1, r4, 2
- add r1, r8
- lsls r1, 3
- adds r1, r0
- movs r0, 0x15
- strh r0, [r1, 0x8]
- b _080AD8CA
- .align 2, 0
-_080AD860: .4byte gMenuWindow
-_080AD864: .4byte gTasks
-_080AD868:
- mov r5, r8
- lsls r0, r5, 2
- add r0, r8
- lsls r0, 3
- mov r2, r12
- adds r1, r0, r2
- ldrh r0, [r1, 0x1C]
- adds r0, 0x1
- strh r0, [r1, 0x1C]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x1D
- ble _080AD8CA
- movs r0, 0
- strh r0, [r1, 0x1C]
- movs r0, 0x16
- strh r0, [r1, 0x8]
- b _080AD8CA
-_080AD88C:
- ldrb r0, [r6, 0x10]
- adds r0, 0x1
- movs r1, 0
- strb r0, [r6, 0x10]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x4
- bne _080AD8B8
- mov r3, r8
- lsls r0, r3, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- strh r1, [r0, 0x8]
- strh r1, [r0, 0xA]
- strh r1, [r0, 0xC]
- ldr r1, _080AD8B4 @ =sub_80AD960
- str r1, [r0]
- b _080AD8C4
- .align 2, 0
-_080AD8B4: .4byte sub_80AD960
-_080AD8B8:
- mov r4, r8
- lsls r0, r4, 2
- add r0, r8
- lsls r0, 3
- add r0, r12
- strh r1, [r0, 0x8]
-_080AD8C4:
- movs r0, 0
- bl nullsub_18
-_080AD8CA:
- add sp, 0x8
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80AC2CC
-
thumb_func_start sub_80AD8DC
sub_80AD8DC: @ 80AD8DC
push {lr}
diff --git a/src/contest.c b/src/contest.c
index 06fea7959..e4c68b11a 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -94,7 +94,11 @@ struct UnknownContestStruct1
u8 filler12;
u8 unk13;
u8 unk14;
- u8 unk15;
+ u8 unk15_0:1;
+ u8 unk15_1:3;
+ u8 unk15_4:1;
+ u8 unk15_5:1;
+ u8 unk15_6:1;
u8 unk16;
u8 unk17;
u8 unk18;
@@ -238,7 +242,7 @@ void sub_80B0034(void);
void sub_80B00C8(void);
void nullsub_18();
void sub_80B0324(void);
-void sub_80B03A8();
+void sub_80B03A8(u8);
void sub_80B0518(void);
void sub_80B09B0();
u8 sub_80B09E4();
@@ -362,8 +366,7 @@ void sub_80AB398(void)
memset(&shared19260.unk19260[i], 0, sizeof(shared19260.unk19260[i]));
for (i = 0; i < 4; i++)
{
- shared19260.unk19260[i].unkB_0 = 0;
- //shared19260.unk19260[i].unkB_1 = 0;
+ shared19260.unk19260[i].unkB &= ~3;
shared19260.unk19260[i].unk13 = 0xFF;
shared19260.unk19260[i].unk14 = 0xFF;
}
@@ -381,6 +384,7 @@ void sub_80AB398(void)
sub_80B159C();
}
*/
+
__attribute__((naked))
void sub_80AB398(void)
{
@@ -1263,11 +1267,10 @@ extern const u8 gUnknown_083CC16E[];
extern const u8 *const gUnknown_083CC2D8[];
extern const u8 *const gUnknown_083CC330[];
-#if 0
+#ifdef NONMATCHING
void sub_80AC2CC(u8 taskId)
{
u8 spriteId; // r5
- //register s32 r6 asm("r6");
s32 r6;
u8 r7 = shared19204.unk19215;
@@ -1275,47 +1278,41 @@ void sub_80AC2CC(u8 taskId)
{
case 0:
//_080AC404
+ sub_80B0D7C();
+ // had to write the array index like this to match
+ for (r6 = 0; shared19204.unk19214 != r6[shared19260.unk192D0]; r6++)
+ ;
+ //_080AC42C
+ shared19204.unk19215 = r6;
+ r7 = shared19204.unk19215; // is r7 actually a variable?
+ if (gIsLinkContest & 1)
{
- //s32 r6;
+ u8 taskId2;
- sub_80B0D7C();
- r6 = 0;
- while (shared19204.unk19214 != shared19260.unk192D0[r6])
- r6++;
- //_080AC42C
- shared19204.unk19215 = r6;
- r7 = shared19204.unk19215; // is r7 actually a variable?
- if (gIsLinkContest & 1)
- {
- u8 taskId2;
-
- //shared19204.unk1920B_2 = 1;
- shared19204.unk1920B |= 4;
- if (sub_80AE074() != 0)
- sub_80B114C(shared19204.unk19215);
- taskId2 = CreateTask(sub_80C8C80, 0);
- SetTaskFuncWithFollowupFunc(taskId2, sub_80C8C80, sub_80AD8DC);
- sub_80AF860();
- gTasks[taskId].data[0] = 1;
- }
- //_080AC498
- else
- {
- sub_80B114C(r7);
- gTasks[taskId].data[0] = 2;
- }
+ //shared19204.unk1920B_2 = 1;
+ shared19204.unk1920B |= 4;
+ if (sub_80AE074() != 0)
+ sub_80B114C(shared19204.unk19215);
+ taskId2 = CreateTask(sub_80C8C80, 0);
+ SetTaskFuncWithFollowupFunc(taskId2, sub_80C8C80, sub_80AD8DC);
+ sub_80AF860();
+ gTasks[taskId].data[0] = 1;
+ }
+ //_080AC498
+ else
+ {
+ sub_80B114C(shared19204.unk19215);
+ gTasks[taskId].data[0] = 2;
}
return;
case 1:
- //if (!shared19204.unk1920B_2)
if (!(shared19204.unk1920B & 4))
gTasks[taskId].data[0] = 2;
return;
case 2:
//_080AC4D4
- // Come on, get this part to match!
{
- struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
+ struct UnknownContestStruct1 *s = &shared19260.unk19260[r7]; // r2
if ((s->unkC & 6)
|| (s->unkB & 0x80))
@@ -1333,24 +1330,21 @@ void sub_80AC2CC(u8 taskId)
return;
case 3:
//_080AC534
- {
- s32 i;
-
- for (i = 0; i < 4; i++)
- gBattleMonForms[i] = 0;
- memset(shared19260.unk19348, 0, 20);
- sub_80B28F0(shared19204.unk19215);
- spriteId = sub_80AE9FC(
- gContestMons[shared19204.unk19215].species,
- gContestMons[shared19204.unk19215].unk3C,
- gContestMons[shared19204.unk19215].unk38);
- gSprites[spriteId].pos2.x = 120;
- gSprites[spriteId].callback = sub_80AD8FC;
- gTasks[taskId].data[2] = spriteId;
- gObjectBankIDs[gBankAttacker] = spriteId;
- sub_80B0BC4(sub_80B09E4(shared19204.unk19215), 0);
- gTasks[taskId].data[0] = 4;
- }
+ // r6 optimized out
+ for (r6 = 0; r6 < 4; r6++)
+ gBattleMonForms[r6] = 0;
+ memset(shared19260.unk19348, 0, 20);
+ sub_80B28F0(shared19204.unk19215);
+ spriteId = sub_80AE9FC(
+ gContestMons[shared19204.unk19215].species,
+ gContestMons[shared19204.unk19215].unk3C,
+ gContestMons[shared19204.unk19215].unk38);
+ gSprites[spriteId].pos2.x = 120;
+ gSprites[spriteId].callback = sub_80AD8FC;
+ gTasks[taskId].data[2] = spriteId;
+ gObjectBankIDs[gBankAttacker] = spriteId;
+ sub_80B0BC4(sub_80B09E4(shared19204.unk19215), 0);
+ gTasks[taskId].data[0] = 4;
return;
case 4:
//_080AC5E8
@@ -1423,7 +1417,8 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
- if (!(s->unk15 & 0x10))
+ //if (!(s->unk15 & 0x10))
+ if (!s->unk15_4)
sub_80B03A8(r7);
sub_80B20C4();
gTasks[taskId].data[0] = 23;
@@ -1432,7 +1427,7 @@ void sub_80AC2CC(u8 taskId)
return;
case 9:
//_080AC7F4
- if (++gTasks[taskId].data[10] > 30)
+ if (gTasks[taskId].data[10]++ > 30)
{
gTasks[taskId].data[10] = 0;
gTasks[taskId].data[0] = 7;
@@ -1497,30 +1492,25 @@ void sub_80AC2CC(u8 taskId)
if ((s->unk11 & 3) == 1)
{
sub_80B1710(5);
- asm("");
- gTasks[taskId].data[0] = 49;
}
else if ((s->unk11 & 3) == 2)
{
sub_80B1710(6);
- asm("");
- gTasks[taskId].data[0] = 49;
}
else if ((s->unk11 & 3) == 3)
{
sub_80B1710(7);
- asm("");
- gTasks[taskId].data[0] = 49;
}
else
{
gTasks[taskId].data[0] = 47;
+ return;
}
+ gTasks[taskId].data[0] = 49;
}
return;
case 49:
//_080AC94C
- //if (!shared19204.unk1920A_4)
if (!(shared19204.unk1920A & 0x10))
gTasks[taskId].data[0] = 47;
return;
@@ -1596,10 +1586,10 @@ void sub_80AC2CC(u8 taskId)
return;
case 26:
//_080ACAEE
+ //asm_comment("case26");
{
s8 r4 = 0;
s32 r2 = 0;
- u8 r2_;
for (r6 = gTasks[taskId].data[1]; r6 < 4; r6++)
{
@@ -1607,7 +1597,7 @@ void sub_80AC2CC(u8 taskId)
r4 = 0;
for (r2 = 0; r2 < 4; r2++)
{
- if (r2 != r7 && gUnknown_02038696[0] == r6
+ if (r2 != r7 && gUnknown_02038696[r2] == r6
&& shared19260.unk19260[r2].unk13 != 0xFF)
{
r4 = 1;
@@ -1618,15 +1608,17 @@ void sub_80AC2CC(u8 taskId)
if (r4 != 0)
break;
}
+ r4 = r4; // This makes it shift for some reason
//_080ACB58
- if (r4 != 0)
+ if (r4)
{
//_080ACB60
+ u8 r2_;
struct UnknownContestStruct1 *s;
gTasks[taskId].data[1] = gUnknown_02038696[r2];
r2_ = r2;
- s = &shared19260.unk19260[r2_];
+ s = &shared19260.unk19260[r2];
sub_80B146C(r2_, s->unk13);
s->unk13 = 0xFF;
gTasks[taskId].data[0] = 27;
@@ -1649,15 +1641,13 @@ void sub_80AC2CC(u8 taskId)
case 28:
//_080ACBDC
{
- u8 r1;
+ struct UnknownContestStruct1 *s; // r0
- // check this later
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
+ for (r6 = 0; gTasks[taskId].data[1] != gUnknown_02038696[r6]; r6++)
+ ;
//_080ACC08
- r1 = shared19260.unk19260[r6].unkE;
- sub_80AFBA0(shared19260.unk19260[r6].unk2 + r1, -r1, r6);
+ s = &shared19260.unk19260[r6];
+ sub_80AFBA0(s->unk2 + s->unkE, -s->unkE, r6);
gTasks[taskId].data[0] = 29;
}
return;
@@ -1666,9 +1656,8 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct4 *s;
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
+ for (r6 = 0; gTasks[taskId].data[1] != gUnknown_02038696[r6]; r6++)
+ ;
//_080ACC6C
s = &shared19260.unk19338[r6];
if (!(s->unk2 & 4))
@@ -1677,9 +1666,8 @@ void sub_80AC2CC(u8 taskId)
return;
case 39:
//_080ACC98
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
+ for (r6 = 0; gTasks[taskId].data[1] != gUnknown_02038696[r6]; r6++)
+ ;
if (sub_80AEE54(r6, 1) != 0)
{
gTasks[taskId].data[10] = 0;
@@ -1714,11 +1702,11 @@ void sub_80AC2CC(u8 taskId)
else
PlaySE(SE_C_SYU);
s = &shared19260.unk19260[r6];
- if (s->unk15 & 0x20)
+ //if (s->unk15 & 0x20)
+ if (s->unk15_5)
{
sub_80B03A8(r6);
- // Doesn't match, probably a bitfield
- s->unk15 &= ~0x20;
+ s->unk15_5 = 0;
}
gTasks[taskId].data[1]++;
gTasks[taskId].data[0] = 26;
@@ -1726,7 +1714,7 @@ void sub_80AC2CC(u8 taskId)
return;
case 51:
//_080ACDC8
- if (++gTasks[taskId].data[10] > 9)
+ if (gTasks[taskId].data[10]++ > 9)
{
struct UnknownContestStruct1 *s;
@@ -1750,7 +1738,7 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
- if (!(s->unk15 & 0x40))
+ if (!s->unk15_6)
gTasks[taskId].data[0] = 17;
else
gTasks[taskId].data[0] = 14;
@@ -1760,9 +1748,9 @@ void sub_80AC2CC(u8 taskId)
//_080ACEC0
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
- s32 r4 = s->unk16; // what type is this?
+ s8 r4 = s->unk16; // what type is this?
- if ((u8)r4 != 0)
+ if (s->unk16 != 0)
{
sub_80AF138();
if (r4 == 1)
@@ -1804,7 +1792,9 @@ void sub_80AC2CC(u8 taskId)
{
if (++gTasks[taskId].data[10] > 50)
{
- if (!(shared19260.unk19260[r7].unk15 & 0x10))
+ struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
+ //if (!(shared19260.unk19260[r7].unk15 & 0x10))
+ if (!s->unk15_4)
{
sub_80AFBA0(
shared19260.unk19260[r7].unk2,
@@ -1834,7 +1824,8 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
- if (s->unk15 & 1)
+ //if (s->unk15 & 1)
+ if (s->unk15_0)
{
sub_80AF138();
StringCopy(gStringVar1, gContestMons[r7].nickname);
@@ -1885,12 +1876,12 @@ void sub_80AC2CC(u8 taskId)
return;
case 41:
//_080AD1A4
+ //asm_comment("case41");
{
- struct UnknownContestStruct5 *s5 = &shared19260.unk19328;
+ //struct UnknownContestStruct5_alt *s5_alt = (struct UnknownContestStruct5_alt *)&shared19260.unk19328; // r2
+ struct UnknownContestStruct5 *s5 = (struct UnknownContestStruct5 *)&shared19260.unk19328; // r1
- // WTF is this struct?
- if ((((struct UnknownContestStruct5_alt *)s5)->unk1 & 1)
- && r7 != s5->bits_9)
+ if (s5->bits_8 && r7 != s5->bits_9)
{
gTasks[taskId].data[0] = 57;
}
@@ -1898,7 +1889,8 @@ void sub_80AC2CC(u8 taskId)
else
{
s8 r4 = s5->bits_0;
- struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
+ //struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
+ struct UnknownContestStruct1 *s = ((struct UnknownContestStruct1 *)(((u8 *)s5) - 0xC8)) + r7;
if (s->unk11 & 0x10)
{
@@ -1914,7 +1906,8 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
- if (s->unk15 & 1)
+ //if (s->unk15 & 1)
+ if (s->unk15_0)
r4 = 0;
}
sub_80AF138();
@@ -2008,19 +2001,39 @@ void sub_80AC2CC(u8 taskId)
}
break;
case 2:
+ asm_comment("asdfasdf");
//_080AD43E
if (!(shared19204.unk1920A & 0x20))
{
if (gTasks[taskId].data[11]++ > 29)
{
struct UnknownContestStruct1 *s;
+ struct UnknownContestStruct5 *s5;
+ //register s16 r0 asm("r0");
gTasks[taskId].data[11] = 0;
s = &shared19260.unk19260[r7];
- sub_80AFBA0(s->unk2, shared19260.unk19328.unk2, r7);
- s->unk2 += (s8)shared19260.unk19328.unk2;
+ s5 = &shared19260.unk19328;
+ sub_80AFBA0(s->unk2, s5->unk2, r7);
+ s->unk2 += s5->unk2;
gTasks[taskId].data[10]++;
}
+ /*
+ if (gTasks[taskId].data[11]++ > 29)
+ {
+ struct UnknownContestStruct1 *s;
+ struct UnknownContestStruct5 *s5;
+ register s16 r0 asm("r0");
+
+ gTasks[taskId].data[11] = 0;
+ s = &shared19260.unk19260[r7];
+ r0 = s->unk2;
+ s5 = &shared19260.unk19328;
+ sub_80AFBA0(r0, s5->unk2, r7);
+ s->unk2 += s5->unk2;
+ gTasks[taskId].data[10]++;
+ }
+ */
}
break;
case 3:
@@ -2096,8 +2109,12 @@ void sub_80AC2CC(u8 taskId)
{
struct UnknownContestStruct1 *s = &shared19260.unk19260[r7];
+ /*
if (s->unk15 & 0x10)
s->unk15 &= ~0x10; // probably a bitfield
+ */
+ if (s->unk15_4)
+ s->unk15_4 = 0;
sub_80B09B0(r7);
StringCopy(gStringVar1, gContestMons[r7].nickname);
StringCopy(gStringVar2, gMoveNames[s->unk6]);
@@ -2191,831 +2208,2614 @@ void sub_80AC2CC(u8 taskId)
}
#endif
-/*
+__attribute__((naked))
void sub_80AC2CC(u8 taskId)
{
- u8 spriteId; // r5
- s32 r6;
- u8 r7 = shared19204.unk19215;
-
- switch (gTasks[taskId].data[0])
- {
- case 0:
- //_080AC404
- {
- //s32 r6;
-
- sub_80B0D7C();
- r6 = 0;
- while (shared19204.unk19214 != shared19260.unk192D0[r6])
- r6++;
- //_080AC42C
- shared19204.unk19215 = r6;
- r7 = shared19204.unk19215; // is r7 actually a variable?
- if (gIsLinkContest & 1)
- {
- u8 taskId2;
-
- //shared19204.unk1920B_2 = 1;
- shared19204.unk1920B |= 4;
- if (sub_80AE074() != 0)
- sub_80B114C(shared19204.unk19215);
- taskId2 = CreateTask(sub_80C8C80, 0);
- SetTaskFuncWithFollowupFunc(taskId2, sub_80C8C80, sub_80AD8DC);
- sub_80AF860();
- gTasks[taskId].data[0] = 1;
- }
- //_080AC498
- else
- {
- sub_80B114C(r7);
- gTasks[taskId].data[0] = 2;
- }
- }
- return;
- case 1:
- //if (!shared19204.unk1920B_2)
- if (!(shared19204.unk1920B & 4))
- gTasks[taskId].data[0] = 2;
- return;
- case 2:
- //_080AC4D4
- // Come on, get this part to match!
- if (shared19260.unk19260[r7].unkC_1
- || shared19260.unk19260[r7].unkC_2
- || shared19260.unk19260[r7].unkB_7)
- {
- gTasks[taskId].data[0] = 31;
- }
- else
- {
- sub_80AF138();
- sub_80B0CDC(r7, 0);
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 3;
- }
- return;
- case 3:
- //_080AC534
- {
- s32 i;
-
- for (i = 0; i < 4; i++)
- gBattleMonForms[i] = 0;
- memset(shared19260.unk19348, 0, 20);
- sub_80B28F0(shared19204.unk19215);
- spriteId = sub_80AE9FC(
- gContestMons[shared19204.unk19215].species,
- gContestMons[shared19204.unk19215].unk3C,
- gContestMons[shared19204.unk19215].unk38);
- gSprites[spriteId].pos2.x = 120;
- gSprites[spriteId].callback = sub_80AD8FC;
- gTasks[taskId].data[2] = spriteId;
- gObjectBankIDs[gBankAttacker] = spriteId;
- sub_80B0BC4(sub_80B09E4(shared19204.unk19215), 0);
- gTasks[taskId].data[0] = 4;
- }
- return;
- case 4:
- //_080AC5E8
- spriteId = gTasks[taskId].data[2];
- if (gSprites[spriteId].callback == SpriteCallbackDummy
- // && !shared19260.unk19348[r7].unk2_1)
- && !(shared19260.unk19348[r7].unk2 & 2))
- gTasks[taskId].data[0] = 5;
- return;
- case 5:
- //_080AC638
- if (shared19260.unk19260[r7].unkC_0)
- {
- gTasks[taskId].data[0] = 33;
- }
- //_080AC664
- else
- {
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- if (shared19260.unk19260[r7].unk6 <= 354)
- StringCopy(gStringVar2, gMoveNames[shared19260.unk19260[r7].unk6]);
- else
- StringCopy(gStringVar2, gUnknown_083CC330[shared19260.unk19260[r7].unkA]);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CAFD7);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[0] = 6;
- }
- return;
- case 6:
- //_080AC6F8
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- shared19204.unk1925E = 0;
- gTasks[taskId].data[0] = 7;
- }
- return;
- case 7:
- //_080AC730
- {
- // doesn't match
- u16 r4 = sub_80B2760(shared19260.unk19260[shared19204.unk19215].unk6);
-
- sub_80B2790(shared19204.unk19215);
- sub_80B28F0(shared19204.unk19215);
- sub_80B29B4(r4);
- ExecuteMoveAnim(r4);
- gTasks[taskId].data[0] = 8;
- }
- return;
- case 8:
- //_080AC77C
- gAnimScriptCallback();
- if (!gAnimScriptActive)
- {
- sub_80B28CC(r7);
- if (shared19204.unk1925E != 0)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 9;
- }
- else
- {
- if (!(shared19260.unk19260[r7].unk15 & 0x10))
- sub_80B03A8(r7);
- sub_80B20C4();
- gTasks[taskId].data[0] = 23;
- }
- }
- return;
- case 9:
- //_080AC7F4
- if (++gTasks[taskId].data[10] > 30)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 7;
- }
- return;
- case 23:
- //_080AC81E
- gTasks[taskId].data[1] = 0;
- if (shared19260.unk19260[r7].unk13 != 0xFF)
- {
- sub_80B146C(r7, shared19260.unk19260[r7].unk13);
- shared19260.unk19260[r7].unk13 = 0xFF;
- gTasks[taskId].data[0] = 24;
- }
- //_080AC85C
- else
- {
- if (shared19260.unk19260[r7].unk14 != 0xFF)
- {
- //s32 r6 = 0;
-
- for (r6 = 0; r6 < 4; r6++)
- {
- if (r6 != r7 && shared19260.unk19260[r6].unk13 != 0xFF)
- break;
- }
- //_080AC886
- if (r6 == 4)
- {
- sub_80B146C(r7, shared19260.unk19260[r7].unk14);
- shared19260.unk19260[r7].unk14 = 0xFF;
- gTasks[taskId].data[0] = 24;
- }
- //_080AC8B4
- else
- {
- gTasks[taskId].data[0] = 48;
- }
- }
- //_080AC8C4
- else
- {
- gTasks[taskId].data[0] = 48;
- }
- }
- return;
- case 24:
- //_080AC8CC
- if (sub_80037A0(&gMenuWindow) != 0)
- gTasks[taskId].data[0] = 23;
- return;
- case 48:
- //_080AC8F8
- if ((shared19260.unk19260[r7].unk11 & 3) == 1)
- {
- sub_80B1710(5);
- gTasks[taskId].data[0] = 49;
- }
- else if ((shared19260.unk19260[r7].unk11 & 3) == 2)
- {
- sub_80B1710(6);
- gTasks[taskId].data[0] = 49;
- }
- else if ((shared19260.unk19260[r7].unk11 & 3) == 3)
- {
- sub_80B1710(7);
- gTasks[taskId].data[0] = 49;
- }
- else
- {
- gTasks[taskId].data[0] = 47;
- }
- return;
- case 49:
- //_080AC94C
- //if (!shared19204.unk1920A_4)
- if (!(shared19204.unk1920A & 0x10))
- gTasks[taskId].data[0] = 47;
- return;
- case 47:
- //_080AC96C
- sub_80B1FD0(1);
- gTasks[taskId].data[0] = 12;
- return;
- case 12:
- //_080AC98C
- sub_80AFBA0(0, shared19260.unk19260[r7].unk2, r7);
- gTasks[taskId].data[0] = 13;
- return;
- case 13:
- //_080AC9C0
- if (!(shared19260.unk19338[shared19204.unk19215].unk2 & 4))
- gTasks[taskId].data[0] = 35;
- return;
- case 35:
- //_080AC9EC
- if ((shared19260.unk19260[r7].unk10 & 0x30) == 0x10)
- sub_80B1710(8);
- gTasks[taskId].data[0] = 36;
- return;
- case 36:
- //_080ACA24
- //if (!shared19204.unk1920A_4)
- if (!(shared19204.unk1920A & 0x10))
- gTasks[taskId].data[0] = 37;
- return;
- case 37:
- //_080ACA44
- if (sub_80AEE54(r7, 1) != 0)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 38;
- }
- else
- {
- gTasks[taskId].data[0] = 50;
- }
- return;
- case 38:
- //_080ACA84
- if (++gTasks[taskId].data[10] > 20)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 50;
- }
- return;
- case 50:
- //_080ACAAE
- if (sub_80AF038(r7) != 0)
- PlaySE(SE_C_PASI);
- gTasks[taskId].data[0] = 25;
- return;
- case 25:
- //_080ACAD8
- gTasks[taskId].data[1] = 0;
- gTasks[taskId].data[0] = 26;
- return;
- case 26:
- //_080ACAEE
- {
- s8 r4 = 0;
- s32 r2 = 0;
-
- // Is this variable reused?
- r6 = gTasks[taskId].data[1];
-
- // This part is really weird
- while (r6 < 4)
- {
- r4 = 0;
- r2 = 0;
-
- if (r4 != r7 && gUnknown_02038696[0] == r6
- && shared19260.unk19260[0].unk13 != 0xFF)
- {
- r4 = 1;
- break;
- }
- //_080ACB2C
- while (++r2 < 4)
- {
- if (r2 != r7 && gUnknown_02038696[0] == r6
- && shared19260.unk19260[r2].unk13 != 0xFF)
- {
- r4 = 1;
- break;
- }
- }
- //_080ACB4E
- if (r4 != 0)
- break;
- }
- //_080ACB58
- if (r4 != 0)
- {
- //_080ACB60
- gTasks[taskId].data[1] = gUnknown_02038696[r2];
- sub_80B146C(r2, shared19260.unk19260[r2].unk13);
- shared19260.unk19260[r2].unk13 = 0xFF;
- gTasks[taskId].data[0] = 27;
- }
- //_080ACB98
- else
- {
- gTasks[taskId].data[1] = 0;
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 51;
- sub_80AF120();
- }
- }
- return;
- case 27:
- //_080ACBB0
- if (sub_80037A0(&gMenuWindow) != 0)
- gTasks[taskId].data[0] = 28;
- return;
- case 28:
- //_080ACBDC
- {
- u8 r1;
-
- // check this later
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
- //_080ACC08
- r1 = shared19260.unk19260[r6].unkE;
- sub_80AFBA0(shared19260.unk19260[r6].unk2 + r1, -r1, r6);
- gTasks[taskId].data[0] = 29;
- }
- return;
- case 29:
- //_080ACC44
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
- //_080ACC6C
- if (!(shared19260.unk19338[r6].unk2 & 4))
- gTasks[taskId].data[0] = 39;
- return;
- case 39:
- //_080ACC98
- r6 = 0;
- while (gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
- if (sub_80AEE54(r6, 1) != 0)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 40;
- }
- else
- {
- gTasks[taskId].data[0] = 30;
- }
- return;
- case 40:
- //_080ACD00
- if (++gTasks[taskId].data[10] > 20)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 30;
- }
- return;
- case 30:
- //_080ACD2A
- r6 = 0;
- while (r6 < 4 && gTasks[taskId].data[1] != gUnknown_02038696[r6])
- r6++;
- //_080ACD5E
- if (sub_80AF038(r6) != 0)
- PlaySE(SE_C_PASI);
- else
- PlaySE(SE_C_SYU);
- if (shared19260.unk19260[r6].unk15 & 0x20)
- {
- sub_80B03A8(r6);
- shared19260.unk19260[r6].unk15 &= ~0x20;
- }
- gTasks[taskId].data[1]++;
- gTasks[taskId].data[0] = 26;
- return;
- case 51:
- //_080ACDC8
- if (++gTasks[taskId].data[10] > 9)
- {
- gTasks[taskId].data[10] = 0;
- if (shared19260.unk19260[r7].unkC_1
- || shared19260.unk19260[r7].unkC_2
- || (shared19260.unk19260[r7].unk11 & 4))
- {
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC103);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- }
- //_080ACE36
- gTasks[taskId].data[0] = 52;
- }
- return;
- case 52:
- //_080ACE64
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- if (!(shared19260.unk19260[r7].unk15 & 0x40))
- gTasks[taskId].data[0] = 17;
- else
- gTasks[taskId].data[0] = 14;
- }
- return;
- case 14:
- //_080ACEC0
- {
- s8 r4 = shared19260.unk19260[r7].unk16;
-
- if (r4 != 0)
- {
- sub_80AF138();
- if (r4 == 1)
- sub_8002EB0(&gMenuWindow, gUnknown_083CBD79, 776, 1, 15);
- else if (r4 == 2)
- sub_8002EB0(&gMenuWindow, gUnknown_083CBD9D, 776, 1, 15);
- else
- sub_8002EB0(&gMenuWindow, gUnknown_083CBDC6, 776, 1, 15);
- //_080ACF22
- sub_80B1710(3);
- gTasks[taskId].data[10] = 0;
- }
- //_080ACF48
- else
- {
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CBD52);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- sub_80B1710(2);
- gTasks[taskId].data[10] = 0;
- }
- gTasks[taskId].data[0] = 45; // tail merge?
- }
- return;
- case 45:
- //_080ACFA8
- //if (!shared19204.unk1920A_4)
- if (!(shared19204.unk1920A & 0x10))
- {
- sub_80B09B0(shared19204.unk19215);
- gTasks[taskId].data[0] = 15;
- }
- return;
- case 15:
- //_080ACFD4
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- if (++gTasks[taskId].data[10] > 50)
- {
- if (!(shared19260.unk19260[r7].unk15 & 0x10))
- {
- sub_80AFBA0(
- shared19260.unk19260[r7].unk2,
- shared19260.unk19260[r7].unk17,
- r7);
- shared19260.unk19260[r7].unk2 += shared19260.unk19260[r7].unk17;
- }
- //_080AD02C
- gTasks[taskId].data[0] = 16;
- }
- }
- return;
- case 16:
- //_080AD040
- if (!(shared19260.unk19338[r7].unk2 & 4))
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 17;
- }
- return;
- case 17:
- //_080AD070
- if (shared19260.unk19260[r7].unk15 & 1)
- {
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC075);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[10] = 0;
- sub_80B1710();
- gTasks[taskId].data[0] = 46;
- }
- //_080AD0E8
- else
- {
- gTasks[taskId].data[0] = 41;
- }
- return;
- case 46:
- //_080AD0FA
- //if (!shared19204.unk1920A_4)
- if (!(shared19204.unk1920A & 0x10))
- gTasks[taskId].data[0] = 19;
- return;
- case 19:
- //_080AD11A
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- sub_80AFBA0(
- shared19260.unk19260[r7].unk2,
- -shared19260.unk19260[r7].unk18,
- r7);
- shared19260.unk19260[r7].unk2 -= shared19260.unk19260[r7].unk18;
- gTasks[taskId].data[0] = 18;
- }
- return;
- case 18:
- //_080AD168
- sub_80B0D7C();
- if (!(shared19260.unk19338[r7].unk2 & 4))
- {
- gTasks[taskId].data[10] = 0;
- sub_80AF138();
- gTasks[taskId].data[0] = 41;
- }
- return;
- case 41:
- //_080AD1A4
- if (shared19260.unk19328.bits_8 && r7 != shared19260.unk19328.bits_9)
- {
- gTasks[taskId].data[0] = 57;
- }
- //_080AD1D0
- else
- {
- s8 r4 = shared19260.unk19328.bits_0;
-
- if (shared19260.unk19260[r7].unk11 & 0x10)
- StringCopy(gStringVar3, gMoveNames[shared19260.unk19260[r7].unk6]);
- else
- StringCopy(gStringVar3, gUnknown_083CC2D8[gContestMoves[shared19260.unk19260[r7].unk6].contestCategory]);
- //_080AD21E
- if (r4 > 0 && (shared19260.unk19260[r7].unk15 & 1))
- r4 = 0;
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- shared19204.unk19217 += r4;
- if (shared19204.unk19217 < 0)
- shared19204.unk19217 = 0;
- if (r4 == 0)
- {
- gTasks[taskId].data[0] = 55;
- }
- else
- {
- if (r4 < 0)
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC0BC);
- else if (r4 > 0 && shared19204.unk19217 <= 4)
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC0A0);
- else
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC0E3);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[11] = 0;
- if (r4 <= 0)
- gTasks[taskId].data[0] = 53;
- else
- gTasks[taskId].data[0] = 54;
- }
- }
- return;
- case 53:
- //_080AD316
- switch (gTasks[taskId].data[10])
- {
- case 0:
- sub_80B1EA8(-1, 1);
- PlayFanfare(BGM_ME_ZANNEN);
- gTasks[taskId].data[10]++;
- break;
- case 1:
- //_080AD354
- if (!(shared19204.unk1920B & 1) && sub_80037A0(&gMenuWindow) != 0)
- {
- sub_80B1CBC(-1);
- gTasks[taskId].data[10]++;
- }
- break;
- case 2:
- //_080AD37C
- if (!(shared19204.unk1920A & 0x20))
- {
- if (++gTasks[taskId].data[11] > 29)
- gTasks[taskId].data[10]++;
- }
- break;
- case 3:
- //_080AD3B0
- if (!gPaletteFade.active)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[11] = 0;
- gTasks[taskId].data[0] = 43;
- }
- break;
- }
- return;
- case 54:
- //_080AD3D0
- switch (gTasks[taskId].data[10])
- {
- case 0:
- //_080AD408
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- sub_80B1EA8(0, 1);
- gTasks[taskId].data[10]++;
- }
- break;
- case 1:
- //_080AD420
- if (!(shared19204.unk1920B & 1))
- {
- sub_80B1DDC();
- PlaySE(SE_W227B);
- sub_80B1CBC();
- gTasks[taskId].data[10]++;
- }
- break;
- case 2:
- //_080AD43E
- if (!(shared19204.unk1920A & 0x20))
- {
- if (++gTasks[taskId].data[11] > 29)
- {
- gTasks[taskId].data[11] = 0;
- sub_80AFBA0(shared19260.unk19260[r7].unk2, shared19260.unk19328.unk2, r7);
- shared19260.unk19260[r7].unk2 += shared19260.unk19328.unk2;
- gTasks[taskId].data[10]++;
- }
- }
- break;
- case 3:
- //_080AD4A0
- if (!(shared19260.unk19338[r7].unk2 & 4))
- {
- if (!(shared19204.unk1920A & 0x80))
- {
- sub_80B1EA8(1, -1);
- gTasks[taskId].data[10]++;
- }
- }
- break;
- case 4:
- //_080AD4EC
- if (!gPaletteFade.active)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[11] = 0;
- gTasks[taskId].data[0] = 43;
- }
- break;
- }
- return;
- case 43:
- //_080AD514
- if (!(shared19260.unk19338[r7].unk2 & 4))
- {
- sub_80AF138();
- gTasks[taskId].data[0] = 55;
- }
- return;
- case 57:
- //_080AD53C
- sub_80AF138();
- StringCopy(gStringVar3, gContestMons[shared19260.unk19328.bits_9].nickname);
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringCopy(gStringVar2, gMoveNames[shared19260.unk19260[r7].unk6]);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC14A);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[0] = 58;
- return;
- case 58:
- //_080AD5D0
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- sub_80AF138();
- StringExpandPlaceholders(gStringVar4, gUnknown_083CC16E);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[0] = 59;
- }
- return;
- case 59:
- //_080AD624
- if (sub_80037A0(&gMenuWindow) != 0)
- {
- sub_80AF138();
- gTasks[taskId].data[0] = 55;
- }
- return;
- case 33:
- //_080AD648
- if (shared19260.unk19260[r7].unk15 & 0x10)
- shared19260.unk19260[r7].unk15 &= ~0x10;
- sub_80B09B0(r7);
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringCopy(gStringVar2, gMoveNames[shared19260.unk19260[r7].unk6]);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CBF60);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[0] = 34;
- return;
- case 34:
- //_080AD6D8
- if (sub_80037A0(&gMenuWindow) != 0)
- gTasks[taskId].data[0] = 55;
- return;
- case 55:
- //_080AD700
- sub_80B1BDC();
- gTasks[taskId].data[0] = 56;
- return;
- case 56:
- //_080AD71C
- if (!(shared19204.unk1920A & 0x40))
- {
- if (shared19204.unk19217 > 4)
- {
- shared19204.unk19217 = 0;
- sub_80B1928();
- }
- gTasks[taskId].data[0] = 10;
- }
- return;
- case 10:
- //_080AD750
- spriteId = gTasks[taskId].data[2];
- gSprites[spriteId].callback = sub_80AD92C;
- gTasks[taskId].data[0] = 11;
- return;
- case 11:
- //_080AD77C
- spriteId = gTasks[taskId].data[2];
- if (gSprites[spriteId].invisible)
- {
- FreeSpriteOamMatrix(&gSprites[spriteId]);
- DestroySprite(&gSprites[spriteId]);
- gTasks[taskId].data[0] = 20;
- }
- return;
- case 20:
- //_080AD7B8
- for (r6 = 0; r6 < 4; r6++)
- sub_80B0CDC(r6, 1);
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 21;
- return;
- case 31:
- //_080AD7E8
- sub_80AF138();
- StringCopy(gStringVar1, gContestMons[r7].nickname);
- StringExpandPlaceholders(gStringVar4, gUnknown_083CB00D);
- sub_8002EB0(&gMenuWindow, gStringVar4, 776, 1, 15);
- gTasks[taskId].data[0] = 32;
- return;
- case 32:
- //_080AD840
- if (sub_80037A0(&gMenuWindow) != 0)
- gTasks[taskId].data[0] = 21;
- return;
- case 21:
- //_080AD868
- if (++gTasks[taskId].data[10] > 29)
- {
- gTasks[taskId].data[10] = 0;
- gTasks[taskId].data[0] = 22;
- }
- return;
- case 22:
- //_080AD88C
- if (++shared19204.unk19214 == 4)
- {
- gTasks[taskId].data[0] = 0;
- gTasks[taskId].data[1] = 0;
- gTasks[taskId].data[2] = 0;
- gTasks[taskId].func = sub_80AD960;
- }
- else
- {
- gTasks[taskId].data[0] = 0;
- }
- nullsub_18(0);
- return;
- }
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x8\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ mov r8, r0\n\
+ ldr r2, _080AC308 @ =gSharedMem + 0x19204\n\
+ ldrb r7, [r2, 0x11]\n\
+ ldr r1, _080AC30C @ =gTasks\n\
+ lsls r0, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r3, 0x8\n\
+ ldrsh r0, [r0, r3]\n\
+ adds r6, r2, 0\n\
+ mov r12, r1\n\
+ cmp r0, 0x3B\n\
+ bls _080AC2FC\n\
+ bl _080AD8CA\n\
+_080AC2FC:\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC310 @ =_080AC314\n\
+ adds r0, r1\n\
+ ldr r0, [r0]\n\
+ mov pc, r0\n\
+ .align 2, 0\n\
+_080AC308: .4byte gSharedMem + 0x19204\n\
+_080AC30C: .4byte gTasks\n\
+_080AC310: .4byte _080AC314\n\
+ .align 2, 0\n\
+_080AC314:\n\
+ .4byte _080AC404\n\
+ .4byte _080AC4B4\n\
+ .4byte _080AC4D4\n\
+ .4byte _080AC534\n\
+ .4byte _080AC5E8\n\
+ .4byte _080AC638\n\
+ .4byte _080AC6F8\n\
+ .4byte _080AC730\n\
+ .4byte _080AC77C\n\
+ .4byte _080AC7F4\n\
+ .4byte _080AD750\n\
+ .4byte _080AD77C\n\
+ .4byte _080AC98C\n\
+ .4byte _080AC9C0\n\
+ .4byte _080ACEC0\n\
+ .4byte _080ACFD4\n\
+ .4byte _080AD040\n\
+ .4byte _080AD070\n\
+ .4byte _080AD168\n\
+ .4byte _080AD11A\n\
+ .4byte _080AD7B8\n\
+ .4byte _080AD868\n\
+ .4byte _080AD88C\n\
+ .4byte _080AC81E\n\
+ .4byte _080AC8CC\n\
+ .4byte _080ACAD8\n\
+ .4byte _080ACAEE\n\
+ .4byte _080ACBB0\n\
+ .4byte _080ACBDC\n\
+ .4byte _080ACC44\n\
+ .4byte _080ACD2A\n\
+ .4byte _080AD7E8\n\
+ .4byte _080AD840\n\
+ .4byte _080AD648\n\
+ .4byte _080AD6D8\n\
+ .4byte _080AC9EC\n\
+ .4byte _080ACA24\n\
+ .4byte _080ACA44\n\
+ .4byte _080ACA84\n\
+ .4byte _080ACC98\n\
+ .4byte _080ACD00\n\
+ .4byte _080AD1A4\n\
+ .4byte _080AD8CA\n\
+ .4byte _080AD514\n\
+ .4byte _080AD8CA\n\
+ .4byte _080ACFA8\n\
+ .4byte _080AD0FA\n\
+ .4byte _080AC96C\n\
+ .4byte _080AC8F8\n\
+ .4byte _080AC94C\n\
+ .4byte _080ACAAE\n\
+ .4byte _080ACDC8\n\
+ .4byte _080ACE64\n\
+ .4byte _080AD316\n\
+ .4byte _080AD3D0\n\
+ .4byte _080AD700\n\
+ .4byte _080AD71C\n\
+ .4byte _080AD53C\n\
+ .4byte _080AD5D0\n\
+ .4byte _080AD624\n\
+_080AC404:\n\
+ bl sub_80B0D7C\n\
+ movs r6, 0\n\
+ ldr r0, _080AC484 @ =gSharedMem + 0x19204\n\
+ adds r1, r0, 0\n\
+ adds r1, 0xCC\n\
+ ldrb r0, [r0, 0x10]\n\
+ mov r4, r8\n\
+ lsls r4, 2\n\
+ mov r9, r4\n\
+ ldrb r5, [r1]\n\
+ cmp r0, r5\n\
+ beq _080AC42C\n\
+ adds r2, r1, 0\n\
+ adds r1, r0, 0\n\
+_080AC422:\n\
+ adds r6, 0x1\n\
+ adds r0, r6, r2\n\
+ ldrb r0, [r0]\n\
+ cmp r1, r0\n\
+ bne _080AC422\n\
+_080AC42C:\n\
+ ldr r4, _080AC484 @ =gSharedMem + 0x19204\n\
+ strb r6, [r4, 0x11]\n\
+ ldrb r7, [r4, 0x11]\n\
+ ldr r0, _080AC488 @ =gIsLinkContest\n\
+ ldrb r1, [r0]\n\
+ movs r5, 0x1\n\
+ adds r0, r5, 0\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC498\n\
+ ldrb r0, [r4, 0x7]\n\
+ movs r1, 0x4\n\
+ orrs r0, r1\n\
+ strb r0, [r4, 0x7]\n\
+ bl sub_80AE074\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080AC458\n\
+ ldrb r0, [r4, 0x11]\n\
+ bl sub_80B114C\n\
+_080AC458:\n\
+ ldr r4, _080AC48C @ =sub_80C8C80\n\
+ adds r0, r4, 0\n\
+ movs r1, 0\n\
+ bl CreateTask\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ ldr r2, _080AC490 @ =sub_80AD8DC\n\
+ adds r1, r4, 0\n\
+ bl SetTaskFuncWithFollowupFunc\n\
+ bl sub_80AF860\n\
+ ldr r1, _080AC494 @ =gTasks\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ strh r5, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC484: .4byte gSharedMem + 0x19204\n\
+_080AC488: .4byte gIsLinkContest\n\
+_080AC48C: .4byte sub_80C8C80\n\
+_080AC490: .4byte sub_80AD8DC\n\
+_080AC494: .4byte gTasks\n\
+_080AC498:\n\
+ adds r0, r7, 0\n\
+ bl sub_80B114C\n\
+ ldr r0, _080AC4B0 @ =gTasks\n\
+ mov r1, r9\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x2\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC4B0: .4byte gTasks\n\
+_080AC4B4:\n\
+ ldrb r1, [r6, 0x7]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC4C2\n\
+ bl _080AD8CA\n\
+_080AC4C2:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x2\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC4D4:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC508 @ =gSharedMem + 0x19260\n\
+ adds r2, r0, r1\n\
+ ldrb r1, [r2, 0xC]\n\
+ movs r0, 0x6\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080AC4F6\n\
+ ldrb r1, [r2, 0xB]\n\
+ movs r0, 0x80\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r6, r0, 24\n\
+ cmp r6, 0\n\
+ beq _080AC50C\n\
+_080AC4F6:\n\
+ mov r2, r8\n\
+ lsls r0, r2, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x1F\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC508: .4byte gSharedMem + 0x19260\n\
+_080AC50C:\n\
+ bl sub_80AF138\n\
+ adds r0, r7, 0\n\
+ movs r1, 0\n\
+ bl sub_80B0CDC\n\
+ ldr r0, _080AC530 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ strh r6, [r1, 0x1C]\n\
+ movs r0, 0x3\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC530: .4byte gTasks\n\
+_080AC534:\n\
+ mov r4, r8\n\
+ lsls r4, 2\n\
+ mov r9, r4\n\
+ ldr r4, _080AC5C4 @ =gSharedMem + 0x19348\n\
+ ldr r1, _080AC5C8 @ =gBattleMonForms\n\
+ movs r2, 0\n\
+ adds r0, r1, 0x3\n\
+_080AC542:\n\
+ strb r2, [r0]\n\
+ subs r0, 0x1\n\
+ cmp r0, r1\n\
+ bge _080AC542\n\
+ movs r6, 0x4\n\
+ adds r0, r4, 0\n\
+ movs r1, 0\n\
+ movs r2, 0x14\n\
+ bl memset\n\
+ ldr r5, _080AC5CC @ =0xfffffebc\n\
+ adds r7, r4, r5\n\
+ ldrb r0, [r7, 0x11]\n\
+ bl sub_80B28F0\n\
+ ldr r3, _080AC5D0 @ =gContestMons\n\
+ ldrb r2, [r7, 0x11]\n\
+ lsls r2, 6\n\
+ adds r0, r2, r3\n\
+ ldrh r0, [r0]\n\
+ adds r1, r3, 0\n\
+ adds r1, 0x3C\n\
+ adds r1, r2, r1\n\
+ ldr r1, [r1]\n\
+ adds r3, 0x38\n\
+ adds r2, r3\n\
+ ldr r2, [r2]\n\
+ bl sub_80AE9FC\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+ ldr r2, _080AC5D4 @ =gSprites\n\
+ lsls r0, r5, 4\n\
+ adds r0, r5\n\
+ lsls r0, 2\n\
+ adds r3, r0, r2\n\
+ movs r1, 0x78\n\
+ strh r1, [r3, 0x24]\n\
+ adds r2, 0x1C\n\
+ adds r0, r2\n\
+ ldr r1, _080AC5D8 @ =sub_80AD8FC\n\
+ str r1, [r0]\n\
+ ldr r0, _080AC5DC @ =gTasks\n\
+ mov r4, r9\n\
+ add r4, r8\n\
+ lsls r4, 3\n\
+ adds r4, r0\n\
+ strh r5, [r4, 0xC]\n\
+ ldr r1, _080AC5E0 @ =gObjectBankIDs\n\
+ ldr r0, _080AC5E4 @ =gBankAttacker\n\
+ ldrb r0, [r0]\n\
+ adds r0, r1\n\
+ strb r5, [r0]\n\
+ ldrb r0, [r7, 0x11]\n\
+ bl sub_80B09E4\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ movs r1, 0\n\
+ bl sub_80B0BC4\n\
+ strh r6, [r4, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC5C4: .4byte gSharedMem + 0x19348\n\
+_080AC5C8: .4byte gBattleMonForms\n\
+_080AC5CC: .4byte 0xfffffebc\n\
+_080AC5D0: .4byte gContestMons\n\
+_080AC5D4: .4byte gSprites\n\
+_080AC5D8: .4byte sub_80AD8FC\n\
+_080AC5DC: .4byte gTasks\n\
+_080AC5E0: .4byte gObjectBankIDs\n\
+_080AC5E4: .4byte gBankAttacker\n\
+_080AC5E8:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r3, r12\n\
+ adds r2, r0, r3\n\
+ ldrb r5, [r2, 0xC]\n\
+ ldr r1, _080AC62C @ =gSprites\n\
+ lsls r0, r5, 4\n\
+ adds r0, r5\n\
+ lsls r0, 2\n\
+ adds r1, 0x1C\n\
+ adds r0, r1\n\
+ ldr r1, [r0]\n\
+ ldr r0, _080AC630 @ =SpriteCallbackDummy\n\
+ cmp r1, r0\n\
+ beq _080AC60E\n\
+ bl _080AD8CA\n\
+_080AC60E:\n\
+ lsls r0, r7, 2\n\
+ ldr r1, _080AC634 @ =gSharedMem + 0x19338\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x2\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC622\n\
+ bl _080AD8CA\n\
+_080AC622:\n\
+ movs r0, 0x5\n\
+ strh r0, [r2, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC62C: .4byte gSprites\n\
+_080AC630: .4byte SpriteCallbackDummy\n\
+_080AC634: .4byte gSharedMem + 0x19338\n\
+_080AC638:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC660 @ =gSharedMem + 0x19260\n\
+ adds r5, r0, r1\n\
+ ldrb r1, [r5, 0xC]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC664\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x21\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC660: .4byte gSharedMem + 0x19260\n\
+_080AC664:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AC690 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080AC694 @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldrh r1, [r5, 0x6]\n\
+ movs r0, 0xB1\n\
+ lsls r0, 1\n\
+ cmp r1, r0\n\
+ bhi _080AC6A0\n\
+ ldr r0, _080AC698 @ =gStringVar2\n\
+ adds r2, r1, 0\n\
+ movs r1, 0xD\n\
+ muls r1, r2\n\
+ ldr r2, _080AC69C @ =gMoveNames\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ b _080AC6B0\n\
+ .align 2, 0\n\
+_080AC690: .4byte gStringVar1\n\
+_080AC694: .4byte gContestMons + 0x2\n\
+_080AC698: .4byte gStringVar2\n\
+_080AC69C: .4byte gMoveNames\n\
+_080AC6A0:\n\
+ ldr r0, _080AC6E0 @ =gStringVar2\n\
+ ldr r2, _080AC6E4 @ =gUnknown_083CC330\n\
+ ldrb r1, [r5, 0xA]\n\
+ lsls r1, 2\n\
+ adds r1, r2\n\
+ ldr r1, [r1]\n\
+ bl StringCopy\n\
+_080AC6B0:\n\
+ ldr r4, _080AC6E8 @ =gStringVar4\n\
+ ldr r1, _080AC6EC @ =gUnknown_083CAFD7\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080AC6F0 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AC6F4 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x6\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC6E0: .4byte gStringVar2\n\
+_080AC6E4: .4byte gUnknown_083CC330\n\
+_080AC6E8: .4byte gStringVar4\n\
+_080AC6EC: .4byte gUnknown_083CAFD7\n\
+_080AC6F0: .4byte gMenuWindow\n\
+_080AC6F4: .4byte gTasks\n\
+_080AC6F8:\n\
+ ldr r0, _080AC724 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AC708\n\
+ bl _080AD8CA\n\
+_080AC708:\n\
+ ldr r0, _080AC728 @ =gSharedMem + 0x19204\n\
+ adds r0, 0x5A\n\
+ movs r1, 0\n\
+ strb r1, [r0]\n\
+ ldr r1, _080AC72C @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r0, r2, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x7\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC724: .4byte gMenuWindow\n\
+_080AC728: .4byte gSharedMem + 0x19204\n\
+_080AC72C: .4byte gTasks\n\
+_080AC730:\n\
+ ldrb r1, [r6, 0x11]\n\
+ lsls r0, r1, 3\n\
+ subs r0, r1\n\
+ lsls r0, 2\n\
+ adds r1, r6, 0\n\
+ adds r1, 0x5C\n\
+ adds r0, r1\n\
+ ldrh r0, [r0, 0x6]\n\
+ bl sub_80B2760\n\
+ adds r4, r0, 0\n\
+ lsls r4, 16\n\
+ lsrs r4, 16\n\
+ ldrb r0, [r6, 0x11]\n\
+ bl sub_80B2790\n\
+ ldrb r0, [r6, 0x11]\n\
+ bl sub_80B28F0\n\
+ adds r0, r4, 0\n\
+ bl sub_80B29B4\n\
+ adds r0, r4, 0\n\
+ bl ExecuteMoveAnim\n\
+ ldr r1, _080AC778 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x8\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC778: .4byte gTasks\n\
+_080AC77C:\n\
+ ldr r0, _080AC7B8 @ =gAnimScriptCallback\n\
+ ldr r0, [r0]\n\
+ bl _call_via_r0\n\
+ ldr r0, _080AC7BC @ =gAnimScriptActive\n\
+ ldrb r4, [r0]\n\
+ cmp r4, 0\n\
+ beq _080AC790\n\
+ bl _080AD8CA\n\
+_080AC790:\n\
+ adds r0, r7, 0\n\
+ bl sub_80B28CC\n\
+ ldr r1, _080AC7C0 @ =gSharedMem + 0x19204\n\
+ adds r0, r1, 0\n\
+ adds r0, 0x5A\n\
+ ldrb r0, [r0]\n\
+ cmp r0, 0\n\
+ beq _080AC7C8\n\
+ ldr r0, _080AC7C4 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r1, r5, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ strh r4, [r1, 0x1C]\n\
+ movs r0, 0x9\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC7B8: .4byte gAnimScriptCallback\n\
+_080AC7BC: .4byte gAnimScriptActive\n\
+_080AC7C0: .4byte gSharedMem + 0x19204\n\
+_080AC7C4: .4byte gTasks\n\
+_080AC7C8:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ adds r1, 0x5C\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x15]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080AC7E2\n\
+ adds r0, r7, 0\n\
+ bl sub_80B03A8\n\
+_080AC7E2:\n\
+ bl sub_80B20C4\n\
+ ldr r0, _080AC7F0 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r1, r2, 2\n\
+ b _080AC8E2\n\
+ .align 2, 0\n\
+_080AC7F0: .4byte gTasks\n\
+_080AC7F4:\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r4, r12\n\
+ adds r2, r0, r4\n\
+ ldrh r0, [r2, 0x1C]\n\
+ adds r1, r0, 0x1\n\
+ strh r1, [r2, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x1E\n\
+ bgt _080AC812\n\
+ bl _080AD8CA\n\
+_080AC812:\n\
+ movs r0, 0\n\
+ strh r0, [r2, 0x1C]\n\
+ movs r0, 0x7\n\
+ strh r0, [r2, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC81E:\n\
+ mov r5, r8\n\
+ lsls r3, r5, 2\n\
+ adds r0, r3, r5\n\
+ lsls r0, 3\n\
+ mov r1, r12\n\
+ adds r4, r0, r1\n\
+ movs r0, 0\n\
+ strh r0, [r4, 0xA]\n\
+ lsls r2, r7, 3\n\
+ subs r0, r2, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC858 @ =gSharedMem + 0x19260\n\
+ adds r6, r0, r1\n\
+ ldrb r0, [r6, 0x13]\n\
+ mov r9, r3\n\
+ mov r10, r2\n\
+ adds r3, r1, 0\n\
+ cmp r0, 0xFF\n\
+ beq _080AC85C\n\
+ adds r1, r0, 0\n\
+ adds r0, r7, 0\n\
+ bl sub_80B146C\n\
+ movs r0, 0xFF\n\
+ strb r0, [r6, 0x13]\n\
+ movs r0, 0x18\n\
+ strh r0, [r4, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC858: .4byte gSharedMem + 0x19260\n\
+_080AC85C:\n\
+ ldrb r0, [r6, 0x14]\n\
+ cmp r0, 0xFF\n\
+ beq _080AC8C4\n\
+ movs r6, 0\n\
+ cmp r6, r7\n\
+ beq _080AC86E\n\
+ ldrb r0, [r3, 0x13]\n\
+ cmp r0, 0xFF\n\
+ bne _080AC886\n\
+_080AC86E:\n\
+ adds r6, 0x1\n\
+ cmp r6, 0x3\n\
+ bgt _080AC886\n\
+ cmp r6, r7\n\
+ beq _080AC86E\n\
+ lsls r0, r6, 3\n\
+ subs r0, r6\n\
+ lsls r0, 2\n\
+ adds r0, r3\n\
+ ldrb r0, [r0, 0x13]\n\
+ cmp r0, 0xFF\n\
+ beq _080AC86E\n\
+_080AC886:\n\
+ cmp r6, 0x4\n\
+ bne _080AC8B4\n\
+ mov r2, r10\n\
+ subs r4, r2, r7\n\
+ lsls r4, 2\n\
+ adds r4, r3\n\
+ ldrb r1, [r4, 0x14]\n\
+ adds r0, r7, 0\n\
+ bl sub_80B146C\n\
+ movs r0, 0xFF\n\
+ strb r0, [r4, 0x14]\n\
+ ldr r1, _080AC8B0 @ =gTasks\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x18\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC8B0: .4byte gTasks\n\
+_080AC8B4:\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x30\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC8C4:\n\
+ movs r0, 0x30\n\
+ strh r0, [r4, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC8CC:\n\
+ ldr r0, _080AC8F0 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AC8DC\n\
+ bl _080AD8CA\n\
+_080AC8DC:\n\
+ ldr r0, _080AC8F4 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+_080AC8E2:\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x17\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC8F0: .4byte gMenuWindow\n\
+_080AC8F4: .4byte gTasks\n\
+_080AC8F8:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC914 @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r0, [r0, 0x11]\n\
+ movs r3, 0x3\n\
+ ands r3, r0\n\
+ cmp r3, 0x1\n\
+ bne _080AC918\n\
+ movs r0, 0x5\n\
+ bl sub_80B1710\n\
+ b _080AC934\n\
+ .align 2, 0\n\
+_080AC914: .4byte gSharedMem + 0x19260\n\
+_080AC918:\n\
+ cmp r3, 0x2\n\
+ bne _080AC924\n\
+ movs r0, 0x6\n\
+ bl sub_80B1710\n\
+ b _080AC934\n\
+_080AC924:\n\
+ cmp r3, 0x3\n\
+ beq _080AC92E\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ b _080AC95E\n\
+_080AC92E:\n\
+ movs r0, 0x7\n\
+ bl sub_80B1710\n\
+_080AC934:\n\
+ ldr r0, _080AC948 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r1, r5, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x31\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC948: .4byte gTasks\n\
+_080AC94C:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC95A\n\
+ bl _080AD8CA\n\
+_080AC95A:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+_080AC95E:\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x2F\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC96C:\n\
+ movs r0, 0x1\n\
+ bl sub_80B1FD0\n\
+ ldr r0, _080AC988 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r1, r2, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0xC\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC988: .4byte gTasks\n\
+_080AC98C:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AC9B8 @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ movs r3, 0x2\n\
+ ldrsh r1, [r0, r3]\n\
+ movs r0, 0\n\
+ adds r2, r7, 0\n\
+ bl sub_80AFBA0\n\
+ ldr r1, _080AC9BC @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0xD\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AC9B8: .4byte gSharedMem + 0x19260\n\
+_080AC9BC: .4byte gTasks\n\
+_080AC9C0:\n\
+ ldrb r0, [r6, 0x11]\n\
+ lsls r0, 2\n\
+ movs r5, 0x9A\n\
+ lsls r5, 1\n\
+ adds r1, r6, r5\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AC9DA\n\
+ bl _080AD8CA\n\
+_080AC9DA:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x23\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AC9EC:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080ACA1C @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x10]\n\
+ movs r0, 0x30\n\
+ ands r0, r1\n\
+ cmp r0, 0x10\n\
+ bne _080ACA06\n\
+ movs r0, 0x8\n\
+ bl sub_80B1710\n\
+_080ACA06:\n\
+ ldr r0, _080ACA20 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r1, r2, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x24\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACA1C: .4byte gSharedMem + 0x19260\n\
+_080ACA20: .4byte gTasks\n\
+_080ACA24:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080ACA32\n\
+ bl _080AD8CA\n\
+_080ACA32:\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x25\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080ACA44:\n\
+ adds r0, r7, 0\n\
+ movs r1, 0x1\n\
+ bl sub_80AEE54\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080ACA70\n\
+ ldr r1, _080ACA6C @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0\n\
+ strh r1, [r0, 0x1C]\n\
+ movs r1, 0x26\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACA6C: .4byte gTasks\n\
+_080ACA70:\n\
+ ldr r0, _080ACA80 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r1, r5, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ b _080ACAA6\n\
+ .align 2, 0\n\
+_080ACA80: .4byte gTasks\n\
+_080ACA84:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r2, r12\n\
+ adds r1, r0, r2\n\
+ ldrh r0, [r1, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r1, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x14\n\
+ bgt _080ACAA2\n\
+ bl _080AD8CA\n\
+_080ACAA2:\n\
+ movs r0, 0\n\
+ strh r0, [r1, 0x1C]\n\
+_080ACAA6:\n\
+ movs r0, 0x32\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+_080ACAAE:\n\
+ adds r0, r7, 0\n\
+ bl sub_80AF038\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080ACAC0\n\
+ movs r0, 0x63\n\
+ bl PlaySE\n\
+_080ACAC0:\n\
+ ldr r0, _080ACAD4 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x19\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACAD4: .4byte gTasks\n\
+_080ACAD8:\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0\n\
+ strh r1, [r0, 0xA]\n\
+ movs r1, 0x1A\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080ACAEE:\n\
+ movs r2, 0\n\
+ movs r4, 0\n\
+ mov r5, r8\n\
+ lsls r1, r5, 2\n\
+ adds r0, r1, r5\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r3, 0xA\n\
+ ldrsh r6, [r0, r3]\n\
+ mov r9, r1\n\
+ cmp r6, 0x3\n\
+ bgt _080ACB58\n\
+ ldr r3, _080ACB24 @ =gUnknown_02038696\n\
+ ldr r1, _080ACB28 @ =gSharedMem + 0x19260\n\
+_080ACB0A:\n\
+ movs r4, 0\n\
+ movs r2, 0\n\
+ cmp r4, r7\n\
+ beq _080ACB2C\n\
+ ldrb r0, [r3]\n\
+ cmp r0, r6\n\
+ bne _080ACB2C\n\
+ ldrb r0, [r1, 0x13]\n\
+ cmp r0, 0xFF\n\
+ beq _080ACB2C\n\
+ movs r4, 0x1\n\
+ b _080ACB60\n\
+ .align 2, 0\n\
+_080ACB24: .4byte gUnknown_02038696\n\
+_080ACB28: .4byte gSharedMem + 0x19260\n\
+_080ACB2C:\n\
+ adds r2, 0x1\n\
+ cmp r2, 0x3\n\
+ bgt _080ACB4E\n\
+ cmp r2, r7\n\
+ beq _080ACB2C\n\
+ adds r0, r2, r3\n\
+ ldrb r0, [r0]\n\
+ cmp r0, r6\n\
+ bne _080ACB2C\n\
+ lsls r0, r2, 3\n\
+ subs r0, r2\n\
+ lsls r0, 2\n\
+ adds r0, r1\n\
+ ldrb r0, [r0, 0x13]\n\
+ cmp r0, 0xFF\n\
+ beq _080ACB2C\n\
+ movs r4, 0x1\n\
+_080ACB4E:\n\
+ cmp r4, 0\n\
+ bne _080ACB60\n\
+ adds r6, 0x1\n\
+ cmp r6, 0x3\n\
+ ble _080ACB0A\n\
+_080ACB58:\n\
+ lsls r0, r4, 24\n\
+ asrs r1, r0, 24\n\
+ cmp r1, 0\n\
+ beq _080ACB98\n\
+_080ACB60:\n\
+ mov r5, r9\n\
+ add r5, r8\n\
+ lsls r5, 3\n\
+ add r5, r12\n\
+ ldr r0, _080ACB90 @ =gUnknown_02038696\n\
+ adds r0, r2, r0\n\
+ ldrb r0, [r0]\n\
+ strh r0, [r5, 0xA]\n\
+ lsls r0, r2, 24\n\
+ lsrs r0, 24\n\
+ lsls r4, r2, 3\n\
+ subs r4, r2\n\
+ lsls r4, 2\n\
+ ldr r1, _080ACB94 @ =gSharedMem + 0x19260\n\
+ adds r4, r1\n\
+ ldrb r1, [r4, 0x13]\n\
+ bl sub_80B146C\n\
+ movs r0, 0xFF\n\
+ strb r0, [r4, 0x13]\n\
+ movs r0, 0x1B\n\
+ strh r0, [r5, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACB90: .4byte gUnknown_02038696\n\
+_080ACB94: .4byte gSharedMem + 0x19260\n\
+_080ACB98:\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ strh r1, [r0, 0xA]\n\
+ strh r1, [r0, 0x1C]\n\
+ movs r1, 0x33\n\
+ strh r1, [r0, 0x8]\n\
+ bl sub_80AF120\n\
+ bl _080AD8CA\n\
+_080ACBB0:\n\
+ ldr r0, _080ACBD4 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080ACBC0\n\
+ bl _080AD8CA\n\
+_080ACBC0:\n\
+ ldr r0, _080ACBD8 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r1, r4, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x1C\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACBD4: .4byte gMenuWindow\n\
+_080ACBD8: .4byte gTasks\n\
+_080ACBDC:\n\
+ movs r6, 0\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ adds r1, r0, r5\n\
+ lsls r1, 3\n\
+ add r1, r12\n\
+ movs r3, 0xA\n\
+ ldrsh r2, [r1, r3]\n\
+ ldr r1, _080ACC38 @ =gUnknown_02038696\n\
+ mov r9, r0\n\
+ ldr r3, _080ACC3C @ =gSharedMem + 0x19260\n\
+ adds r5, r1, 0\n\
+ ldrb r4, [r5]\n\
+ cmp r2, r4\n\
+ beq _080ACC08\n\
+ adds r1, r2, 0\n\
+ adds r2, r5, 0\n\
+_080ACBFE:\n\
+ adds r6, 0x1\n\
+ adds r0, r6, r2\n\
+ ldrb r0, [r0]\n\
+ cmp r1, r0\n\
+ bne _080ACBFE\n\
+_080ACC08:\n\
+ lsls r0, r6, 3\n\
+ subs r0, r6\n\
+ lsls r0, 2\n\
+ adds r0, r3\n\
+ ldrb r1, [r0, 0xE]\n\
+ ldrh r0, [r0, 0x2]\n\
+ adds r0, r1\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ negs r1, r1\n\
+ lsls r2, r6, 24\n\
+ lsrs r2, 24\n\
+ bl sub_80AFBA0\n\
+ ldr r1, _080ACC40 @ =gTasks\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x1D\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACC38: .4byte gUnknown_02038696\n\
+_080ACC3C: .4byte gSharedMem + 0x19260\n\
+_080ACC40: .4byte gTasks\n\
+_080ACC44:\n\
+ movs r6, 0\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ adds r1, r0, r5\n\
+ lsls r1, 3\n\
+ add r1, r12\n\
+ movs r2, 0xA\n\
+ ldrsh r3, [r1, r2]\n\
+ ldr r1, _080ACC90 @ =gUnknown_02038696\n\
+ mov r9, r0\n\
+ ldr r2, _080ACC94 @ =gSharedMem + 0x19338\n\
+ adds r5, r1, 0\n\
+ ldrb r4, [r5]\n\
+ cmp r3, r4\n\
+ beq _080ACC6C\n\
+_080ACC62:\n\
+ adds r6, 0x1\n\
+ adds r0, r6, r1\n\
+ ldrb r0, [r0]\n\
+ cmp r3, r0\n\
+ bne _080ACC62\n\
+_080ACC6C:\n\
+ lsls r0, r6, 2\n\
+ adds r0, r2\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080ACC7E\n\
+ bl _080AD8CA\n\
+_080ACC7E:\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x27\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACC90: .4byte gUnknown_02038696\n\
+_080ACC94: .4byte gSharedMem + 0x19338\n\
+_080ACC98:\n\
+ movs r6, 0\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ adds r1, r0, r5\n\
+ lsls r1, 3\n\
+ add r1, r12\n\
+ movs r3, 0xA\n\
+ ldrsh r2, [r1, r3]\n\
+ ldr r1, _080ACCE8 @ =gUnknown_02038696\n\
+ mov r9, r0\n\
+ adds r5, r1, 0\n\
+ ldrb r4, [r5]\n\
+ cmp r2, r4\n\
+ beq _080ACCC2\n\
+ adds r1, r2, 0\n\
+ adds r2, r5, 0\n\
+_080ACCB8:\n\
+ adds r6, 0x1\n\
+ adds r0, r6, r2\n\
+ ldrb r0, [r0]\n\
+ cmp r1, r0\n\
+ bne _080ACCB8\n\
+_080ACCC2:\n\
+ lsls r0, r6, 24\n\
+ lsrs r0, 24\n\
+ movs r1, 0x1\n\
+ bl sub_80AEE54\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080ACCF0\n\
+ ldr r1, _080ACCEC @ =gTasks\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0\n\
+ strh r1, [r0, 0x1C]\n\
+ movs r1, 0x28\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACCE8: .4byte gUnknown_02038696\n\
+_080ACCEC: .4byte gTasks\n\
+_080ACCF0:\n\
+ ldr r0, _080ACCFC @ =gTasks\n\
+ mov r1, r9\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ b _080ACD22\n\
+ .align 2, 0\n\
+_080ACCFC: .4byte gTasks\n\
+_080ACD00:\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r2, r12\n\
+ adds r1, r0, r2\n\
+ ldrh r0, [r1, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r1, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x14\n\
+ bgt _080ACD1E\n\
+ bl _080AD8CA\n\
+_080ACD1E:\n\
+ movs r0, 0\n\
+ strh r0, [r1, 0x1C]\n\
+_080ACD22:\n\
+ movs r0, 0x1E\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+_080ACD2A:\n\
+ movs r6, 0\n\
+ ldr r2, _080ACD78 @ =gUnknown_02038696\n\
+ ldrb r3, [r2]\n\
+ mov r4, r8\n\
+ lsls r1, r4, 2\n\
+ adds r0, r1, r4\n\
+ lsls r0, 3\n\
+ mov r5, r12\n\
+ adds r4, r0, r5\n\
+ movs r5, 0xA\n\
+ ldrsh r0, [r4, r5]\n\
+ mov r9, r1\n\
+ adds r5, r2, 0\n\
+ cmp r3, r0\n\
+ beq _080ACD5E\n\
+ adds r3, r5, 0\n\
+ adds r2, r4, 0\n\
+_080ACD4C:\n\
+ adds r6, 0x1\n\
+ cmp r6, 0x3\n\
+ bgt _080ACD5E\n\
+ adds r0, r6, r3\n\
+ ldrb r1, [r0]\n\
+ movs r4, 0xA\n\
+ ldrsh r0, [r2, r4]\n\
+ cmp r1, r0\n\
+ bne _080ACD4C\n\
+_080ACD5E:\n\
+ lsls r4, r6, 24\n\
+ lsrs r0, r4, 24\n\
+ bl sub_80AF038\n\
+ lsls r0, 24\n\
+ adds r5, r4, 0\n\
+ cmp r0, 0\n\
+ beq _080ACD7C\n\
+ movs r0, 0x63\n\
+ bl PlaySE\n\
+ b _080ACD82\n\
+ .align 2, 0\n\
+_080ACD78: .4byte gUnknown_02038696\n\
+_080ACD7C:\n\
+ movs r0, 0x64\n\
+ bl PlaySE\n\
+_080ACD82:\n\
+ lsls r0, r6, 3\n\
+ subs r0, r6\n\
+ lsls r0, 2\n\
+ ldr r1, _080ACDC0 @ =gSharedMem + 0x19260\n\
+ adds r4, r0, r1\n\
+ ldrb r1, [r4, 0x15]\n\
+ movs r0, 0x20\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080ACDA6\n\
+ lsrs r0, r5, 24\n\
+ bl sub_80B03A8\n\
+ ldrb r1, [r4, 0x15]\n\
+ movs r0, 0x21\n\
+ negs r0, r0\n\
+ ands r0, r1\n\
+ strb r0, [r4, 0x15]\n\
+_080ACDA6:\n\
+ ldr r0, _080ACDC4 @ =gTasks\n\
+ mov r1, r9\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ ldrh r0, [r1, 0xA]\n\
+ adds r0, 0x1\n\
+ strh r0, [r1, 0xA]\n\
+ movs r0, 0x1A\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACDC0: .4byte gSharedMem + 0x19260\n\
+_080ACDC4: .4byte gTasks\n\
+_080ACDC8:\n\
+ mov r5, r8\n\
+ lsls r2, r5, 2\n\
+ adds r0, r2, r5\n\
+ lsls r0, 3\n\
+ mov r1, r12\n\
+ adds r3, r0, r1\n\
+ ldrh r0, [r3, 0x1C]\n\
+ adds r1, r0, 0x1\n\
+ strh r1, [r3, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ mov r9, r2\n\
+ cmp r0, 0x9\n\
+ bgt _080ACDE8\n\
+ bl _080AD8CA\n\
+_080ACDE8:\n\
+ movs r0, 0\n\
+ strh r0, [r3, 0x1C]\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080ACE48 @ =gSharedMem + 0x19260\n\
+ adds r2, r0, r1\n\
+ ldrb r1, [r2, 0xC]\n\
+ movs r0, 0x6\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080ACE0A\n\
+ ldrb r1, [r2, 0x11]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080ACE36\n\
+_080ACE0A:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080ACE4C @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080ACE50 @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080ACE54 @ =gStringVar4\n\
+ ldr r1, _080ACE58 @ =gUnknown_083CC103\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080ACE5C @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+_080ACE36:\n\
+ ldr r0, _080ACE60 @ =gTasks\n\
+ mov r1, r9\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x34\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACE48: .4byte gSharedMem + 0x19260\n\
+_080ACE4C: .4byte gStringVar1\n\
+_080ACE50: .4byte gContestMons + 0x2\n\
+_080ACE54: .4byte gStringVar4\n\
+_080ACE58: .4byte gUnknown_083CC103\n\
+_080ACE5C: .4byte gMenuWindow\n\
+_080ACE60: .4byte gTasks\n\
+_080ACE64:\n\
+ ldr r0, _080ACE9C @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080ACE74\n\
+ bl _080AD8CA\n\
+_080ACE74:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080ACEA0 @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x15]\n\
+ movs r0, 0x40\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080ACEA8\n\
+ ldr r0, _080ACEA4 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r1, r2, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x11\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACE9C: .4byte gMenuWindow\n\
+_080ACEA0: .4byte gSharedMem + 0x19260\n\
+_080ACEA4: .4byte gTasks\n\
+_080ACEA8:\n\
+ ldr r0, _080ACEBC @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0xE\n\
+ strh r0, [r1, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACEBC: .4byte gTasks\n\
+_080ACEC0:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080ACEE4 @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r4, [r0, 0x16]\n\
+ lsls r4, 24\n\
+ lsrs r5, r4, 24\n\
+ cmp r5, 0\n\
+ beq _080ACF48\n\
+ bl sub_80AF138\n\
+ asrs r0, r4, 24\n\
+ cmp r0, 0x1\n\
+ bne _080ACEF0\n\
+ ldr r0, _080ACEE8 @ =gMenuWindow\n\
+ ldr r1, _080ACEEC @ =gUnknown_083CBD79\n\
+ b _080ACEF8\n\
+ .align 2, 0\n\
+_080ACEE4: .4byte gSharedMem + 0x19260\n\
+_080ACEE8: .4byte gMenuWindow\n\
+_080ACEEC: .4byte gUnknown_083CBD79\n\
+_080ACEF0:\n\
+ cmp r0, 0x2\n\
+ bne _080ACF10\n\
+ ldr r0, _080ACF08 @ =gMenuWindow\n\
+ ldr r1, _080ACF0C @ =gUnknown_083CBD9D\n\
+_080ACEF8:\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r3, 0xF\n\
+ str r3, [sp]\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ b _080ACF22\n\
+ .align 2, 0\n\
+_080ACF08: .4byte gMenuWindow\n\
+_080ACF0C: .4byte gUnknown_083CBD9D\n\
+_080ACF10:\n\
+ ldr r0, _080ACF3C @ =gMenuWindow\n\
+ ldr r1, _080ACF40 @ =gUnknown_083CBDC6\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r3, 0xF\n\
+ str r3, [sp]\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+_080ACF22:\n\
+ movs r0, 0x3\n\
+ bl sub_80B1710\n\
+ ldr r1, _080ACF44 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0\n\
+ strh r1, [r0, 0x1C]\n\
+ b _080ACF88\n\
+ .align 2, 0\n\
+_080ACF3C: .4byte gMenuWindow\n\
+_080ACF40: .4byte gUnknown_083CBDC6\n\
+_080ACF44: .4byte gTasks\n\
+_080ACF48:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080ACF90 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080ACF94 @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080ACF98 @ =gStringVar4\n\
+ ldr r1, _080ACF9C @ =gUnknown_083CBD52\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080ACFA0 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ movs r0, 0x2\n\
+ bl sub_80B1710\n\
+ ldr r1, _080ACFA4 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r0, r2, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ strh r5, [r0, 0x1C]\n\
+_080ACF88:\n\
+ movs r1, 0x2D\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACF90: .4byte gStringVar1\n\
+_080ACF94: .4byte gContestMons + 0x2\n\
+_080ACF98: .4byte gStringVar4\n\
+_080ACF9C: .4byte gUnknown_083CBD52\n\
+_080ACFA0: .4byte gMenuWindow\n\
+_080ACFA4: .4byte gTasks\n\
+_080ACFA8:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080ACFB6\n\
+ bl _080AD8CA\n\
+_080ACFB6:\n\
+ ldrb r0, [r6, 0x11]\n\
+ bl sub_80B09B0\n\
+ ldr r1, _080ACFD0 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0xF\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080ACFD0: .4byte gTasks\n\
+_080ACFD4:\n\
+ ldr r0, _080AD034 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080ACFE4\n\
+ bl _080AD8CA\n\
+_080ACFE4:\n\
+ ldr r1, _080AD038 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r4, r0, r1\n\
+ ldrh r0, [r4, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r4, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x32\n\
+ bgt _080AD002\n\
+ bl _080AD8CA\n\
+_080AD002:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AD03C @ =gSharedMem + 0x19260\n\
+ adds r6, r0, r1\n\
+ ldrb r1, [r6, 0x15]\n\
+ movs r5, 0x10\n\
+ adds r0, r5, 0\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _080AD02C\n\
+ movs r1, 0x2\n\
+ ldrsh r0, [r6, r1]\n\
+ ldrb r1, [r6, 0x17]\n\
+ adds r2, r7, 0\n\
+ bl sub_80AFBA0\n\
+ ldrh r0, [r6, 0x2]\n\
+ ldrb r2, [r6, 0x17]\n\
+ adds r0, r2\n\
+ strh r0, [r6, 0x2]\n\
+_080AD02C:\n\
+ strh r5, [r4, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AD034: .4byte gMenuWindow\n\
+_080AD038: .4byte gTasks\n\
+_080AD03C: .4byte gSharedMem + 0x19260\n\
+_080AD040:\n\
+ lsls r0, r7, 2\n\
+ ldr r1, _080AD06C @ =gSharedMem + 0x19338\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r1, r0, 24\n\
+ cmp r1, 0\n\
+ beq _080AD058\n\
+ bl _080AD8CA\n\
+_080AD058:\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ strh r1, [r0, 0x1C]\n\
+ movs r1, 0x11\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AD06C: .4byte gSharedMem + 0x19338\n\
+_080AD070:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AD0CC @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x15]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD0E8\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD0D0 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080AD0D4 @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080AD0D8 @ =gStringVar4\n\
+ ldr r1, _080AD0DC @ =gUnknown_083CC075\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080AD0E0 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r0, _080AD0E4 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r4, r5, 2\n\
+ add r4, r8\n\
+ lsls r4, 3\n\
+ adds r4, r0\n\
+ movs r0, 0\n\
+ strh r0, [r4, 0x1C]\n\
+ bl sub_80B1710\n\
+ movs r0, 0x2E\n\
+ strh r0, [r4, 0x8]\n\
+ bl _080AD8CA\n\
+ .align 2, 0\n\
+_080AD0CC: .4byte gSharedMem + 0x19260\n\
+_080AD0D0: .4byte gStringVar1\n\
+_080AD0D4: .4byte gContestMons + 0x2\n\
+_080AD0D8: .4byte gStringVar4\n\
+_080AD0DC: .4byte gUnknown_083CC075\n\
+_080AD0E0: .4byte gMenuWindow\n\
+_080AD0E4: .4byte gTasks\n\
+_080AD0E8:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x29\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AD0FA:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD108\n\
+ bl _080AD8CA\n\
+_080AD108:\n\
+ mov r2, r8\n\
+ lsls r0, r2, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x13\n\
+ strh r1, [r0, 0x8]\n\
+ bl _080AD8CA\n\
+_080AD11A:\n\
+ ldr r0, _080AD15C @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD12A\n\
+ bl _080AD8CA\n\
+_080AD12A:\n\
+ lsls r4, r7, 3\n\
+ subs r4, r7\n\
+ lsls r4, 2\n\
+ ldr r0, _080AD160 @ =gSharedMem + 0x19260\n\
+ adds r4, r0\n\
+ movs r3, 0x2\n\
+ ldrsh r0, [r4, r3]\n\
+ ldrb r1, [r4, 0x18]\n\
+ negs r1, r1\n\
+ adds r2, r7, 0\n\
+ bl sub_80AFBA0\n\
+ ldrb r1, [r4, 0x18]\n\
+ ldrh r0, [r4, 0x2]\n\
+ subs r0, r1\n\
+ strh r0, [r4, 0x2]\n\
+ ldr r1, _080AD164 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x12\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD15C: .4byte gMenuWindow\n\
+_080AD160: .4byte gSharedMem + 0x19260\n\
+_080AD164: .4byte gTasks\n\
+_080AD168:\n\
+ bl sub_80B0D7C\n\
+ lsls r0, r7, 2\n\
+ ldr r1, _080AD19C @ =gSharedMem + 0x19338\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r6, r0, 24\n\
+ cmp r6, 0\n\
+ beq _080AD182\n\
+ b _080AD8CA\n\
+_080AD182:\n\
+ ldr r0, _080AD1A0 @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r4, r5, 2\n\
+ add r4, r8\n\
+ lsls r4, 3\n\
+ adds r4, r0\n\
+ strh r6, [r4, 0x1C]\n\
+ bl sub_80AF138\n\
+ movs r0, 0x29\n\
+ strh r0, [r4, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD19C: .4byte gSharedMem + 0x19338\n\
+_080AD1A0: .4byte gTasks\n\
+_080AD1A4:\n\
+ ldr r2, _080AD1CC @ =gSharedMem + 0x19328\n\
+ ldrb r1, [r2, 0x1]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ adds r1, r2, 0\n\
+ cmp r0, 0\n\
+ beq _080AD1D0\n\
+ ldr r0, [r1]\n\
+ lsls r0, 20\n\
+ lsrs r0, 29\n\
+ cmp r7, r0\n\
+ beq _080AD1D0\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r1, 0x39\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD1CC: .4byte gSharedMem + 0x19328\n\
+_080AD1D0:\n\
+ ldrb r4, [r1]\n\
+ lsls r2, r7, 3\n\
+ subs r0, r2, r7\n\
+ lsls r0, 2\n\
+ subs r1, 0xC8\n\
+ adds r5, r0, r1\n\
+ ldrb r1, [r5, 0x11]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ mov r10, r2\n\
+ cmp r0, 0\n\
+ beq _080AD204\n\
+ movs r4, 0x1\n\
+ ldr r0, _080AD1FC @ =gStringVar3\n\
+ ldrh r2, [r5, 0x6]\n\
+ movs r1, 0xD\n\
+ muls r1, r2\n\
+ ldr r2, _080AD200 @ =gMoveNames\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ b _080AD21E\n\
+ .align 2, 0\n\
+_080AD1FC: .4byte gStringVar3\n\
+_080AD200: .4byte gMoveNames\n\
+_080AD204:\n\
+ ldr r0, _080AD270 @ =gStringVar3\n\
+ ldr r3, _080AD274 @ =gUnknown_083CC2D8\n\
+ ldr r2, _080AD278 @ =gContestMoves\n\
+ ldrh r1, [r5, 0x6]\n\
+ lsls r1, 3\n\
+ adds r1, r2\n\
+ ldrb r1, [r1, 0x1]\n\
+ lsls r1, 29\n\
+ lsrs r1, 27\n\
+ adds r1, r3\n\
+ ldr r1, [r1]\n\
+ bl StringCopy\n\
+_080AD21E:\n\
+ lsls r0, r4, 24\n\
+ cmp r0, 0\n\
+ ble _080AD23A\n\
+ mov r2, r10\n\
+ subs r0, r2, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AD27C @ =gSharedMem + 0x19260\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x15]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD23A\n\
+ movs r4, 0\n\
+_080AD23A:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD280 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080AD284 @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r3, _080AD288 @ =gSharedMem + 0x19204\n\
+ ldrb r0, [r3, 0x13]\n\
+ lsls r1, r4, 24\n\
+ asrs r2, r1, 24\n\
+ adds r0, r2, r0\n\
+ strb r0, [r3, 0x13]\n\
+ lsls r0, 24\n\
+ adds r4, r1, 0\n\
+ cmp r0, 0\n\
+ bge _080AD262\n\
+ movs r0, 0\n\
+ strb r0, [r3, 0x13]\n\
+_080AD262:\n\
+ cmp r2, 0\n\
+ bne _080AD290\n\
+ ldr r0, _080AD28C @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ b _080AD6EC\n\
+ .align 2, 0\n\
+_080AD270: .4byte gStringVar3\n\
+_080AD274: .4byte gUnknown_083CC2D8\n\
+_080AD278: .4byte gContestMoves\n\
+_080AD27C: .4byte gSharedMem + 0x19260\n\
+_080AD280: .4byte gStringVar1\n\
+_080AD284: .4byte gContestMons + 0x2\n\
+_080AD288: .4byte gSharedMem + 0x19204\n\
+_080AD28C: .4byte gTasks\n\
+_080AD290:\n\
+ cmp r2, 0\n\
+ bge _080AD2A8\n\
+ ldr r0, _080AD2A0 @ =gStringVar4\n\
+ ldr r1, _080AD2A4 @ =gUnknown_083CC0BC\n\
+ bl StringExpandPlaceholders\n\
+ b _080AD2D0\n\
+ .align 2, 0\n\
+_080AD2A0: .4byte gStringVar4\n\
+_080AD2A4: .4byte gUnknown_083CC0BC\n\
+_080AD2A8:\n\
+ cmp r2, 0\n\
+ ble _080AD2C8\n\
+ movs r0, 0x13\n\
+ ldrsb r0, [r3, r0]\n\
+ cmp r0, 0x4\n\
+ bgt _080AD2C8\n\
+ ldr r0, _080AD2C0 @ =gStringVar4\n\
+ ldr r1, _080AD2C4 @ =gUnknown_083CC0A0\n\
+ bl StringExpandPlaceholders\n\
+ b _080AD2D0\n\
+ .align 2, 0\n\
+_080AD2C0: .4byte gStringVar4\n\
+_080AD2C4: .4byte gUnknown_083CC0A0\n\
+_080AD2C8:\n\
+ ldr r0, _080AD300 @ =gStringVar4\n\
+ ldr r1, _080AD304 @ =gUnknown_083CC0E3\n\
+ bl StringExpandPlaceholders\n\
+_080AD2D0:\n\
+ ldr r0, _080AD308 @ =gMenuWindow\n\
+ ldr r1, _080AD300 @ =gStringVar4\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r3, 0xF\n\
+ str r3, [sp]\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AD30C @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r1, r0, r1\n\
+ movs r0, 0\n\
+ strh r0, [r1, 0x1C]\n\
+ strh r0, [r1, 0x1E]\n\
+ cmp r4, 0\n\
+ bge _080AD310\n\
+ movs r0, 0x35\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD300: .4byte gStringVar4\n\
+_080AD304: .4byte gUnknown_083CC0E3\n\
+_080AD308: .4byte gMenuWindow\n\
+_080AD30C: .4byte gTasks\n\
+_080AD310:\n\
+ movs r0, 0x36\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+_080AD316:\n\
+ mov r1, r8\n\
+ lsls r0, r1, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r2, r12\n\
+ adds r4, r0, r2\n\
+ movs r3, 0x1C\n\
+ ldrsh r2, [r4, r3]\n\
+ cmp r2, 0x1\n\
+ beq _080AD354\n\
+ cmp r2, 0x1\n\
+ bgt _080AD334\n\
+ cmp r2, 0\n\
+ beq _080AD33E\n\
+ b _080AD8CA\n\
+_080AD334:\n\
+ cmp r2, 0x2\n\
+ beq _080AD37C\n\
+ cmp r2, 0x3\n\
+ beq _080AD3B0\n\
+ b _080AD8CA\n\
+_080AD33E:\n\
+ movs r0, 0x1\n\
+ negs r0, r0\n\
+ movs r1, 0x1\n\
+ bl sub_80B1EA8\n\
+ ldr r0, _080AD350 @ =0x00000187\n\
+ bl PlayFanfare\n\
+ b _080AD3A8\n\
+ .align 2, 0\n\
+_080AD350: .4byte 0x00000187\n\
+_080AD354:\n\
+ ldrb r0, [r6, 0x7]\n\
+ ands r2, r0\n\
+ cmp r2, 0\n\
+ beq _080AD35E\n\
+ b _080AD8CA\n\
+_080AD35E:\n\
+ ldr r0, _080AD378 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD36C\n\
+ b _080AD8CA\n\
+_080AD36C:\n\
+ movs r0, 0x1\n\
+ negs r0, r0\n\
+ bl sub_80B1CBC\n\
+ b _080AD3A8\n\
+ .align 2, 0\n\
+_080AD378: .4byte gMenuWindow\n\
+_080AD37C:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x20\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ cmp r2, 0\n\
+ beq _080AD38C\n\
+ b _080AD8CA\n\
+_080AD38C:\n\
+ ldrh r0, [r4, 0x1E]\n\
+ adds r1, r0, 0x1\n\
+ strh r1, [r4, 0x1E]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x1D\n\
+ bgt _080AD39C\n\
+ b _080AD8CA\n\
+_080AD39C:\n\
+ strh r2, [r4, 0x1E]\n\
+ movs r1, 0x1\n\
+ negs r1, r1\n\
+ adds r0, r1, 0\n\
+ bl sub_80B1EA8\n\
+_080AD3A8:\n\
+ ldrh r0, [r4, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r4, 0x1C]\n\
+ b _080AD8CA\n\
+_080AD3B0:\n\
+ ldr r0, _080AD3CC @ =gPaletteFade\n\
+ ldrb r1, [r0, 0x7]\n\
+ movs r0, 0x80\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0\n\
+ beq _080AD3C2\n\
+ b _080AD8CA\n\
+_080AD3C2:\n\
+ strh r0, [r4, 0x1C]\n\
+ strh r0, [r4, 0x1E]\n\
+ movs r0, 0x2B\n\
+ strh r0, [r4, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD3CC: .4byte gPaletteFade\n\
+_080AD3D0:\n\
+ mov r4, r8\n\
+ lsls r1, r4, 2\n\
+ adds r0, r1, r4\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ movs r5, 0x1C\n\
+ ldrsh r0, [r0, r5]\n\
+ mov r9, r1\n\
+ cmp r0, 0x4\n\
+ bls _080AD3E6\n\
+ b _080AD8CA\n\
+_080AD3E6:\n\
+ lsls r0, 2\n\
+ ldr r1, _080AD3F0 @ =_080AD3F4\n\
+ adds r0, r1\n\
+ ldr r0, [r0]\n\
+ mov pc, r0\n\
+ .align 2, 0\n\
+_080AD3F0: .4byte _080AD3F4\n\
+ .align 2, 0\n\
+_080AD3F4:\n\
+ .4byte _080AD408\n\
+ .4byte _080AD420\n\
+ .4byte _080AD43E\n\
+ .4byte _080AD4A0\n\
+ .4byte _080AD4EC\n\
+_080AD408:\n\
+ ldr r0, _080AD41C @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD416\n\
+ b _080AD8CA\n\
+_080AD416:\n\
+ movs r0, 0x1\n\
+ movs r1, 0x1\n\
+ b _080AD4C8\n\
+ .align 2, 0\n\
+_080AD41C: .4byte gMenuWindow\n\
+_080AD420:\n\
+ ldrb r1, [r6, 0x7]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD42C\n\
+ b _080AD8CA\n\
+_080AD42C:\n\
+ bl sub_80B1DDC\n\
+ movs r0, 0xDF\n\
+ bl PlaySE\n\
+ movs r0, 0x1\n\
+ bl sub_80B1CBC\n\
+ b _080AD4CC\n\
+_080AD43E:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x20\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ cmp r2, 0\n\
+ beq _080AD44E\n\
+ b _080AD8CA\n\
+_080AD44E:\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r1, r12\n\
+ adds r3, r0, r1\n\
+ ldrh r0, [r3, 0x1E]\n\
+ adds r1, r0, 0x1\n\
+ strh r1, [r3, 0x1E]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x1D\n\
+ bgt _080AD468\n\
+ b _080AD8CA\n\
+_080AD468:\n\
+ strh r2, [r3, 0x1E]\n\
+ lsls r4, r7, 3\n\
+ subs r4, r7\n\
+ lsls r4, 2\n\
+ adds r0, r6, 0\n\
+ adds r0, 0x5C\n\
+ adds r4, r0\n\
+ movs r2, 0x2\n\
+ ldrsh r0, [r4, r2]\n\
+ movs r1, 0x92\n\
+ lsls r1, 1\n\
+ adds r5, r6, r1\n\
+ movs r1, 0x2\n\
+ ldrsb r1, [r5, r1]\n\
+ adds r2, r7, 0\n\
+ str r3, [sp, 0x4]\n\
+ bl sub_80AFBA0\n\
+ movs r0, 0x2\n\
+ ldrsb r0, [r5, r0]\n\
+ ldrh r2, [r4, 0x2]\n\
+ adds r0, r2\n\
+ strh r0, [r4, 0x2]\n\
+ ldr r3, [sp, 0x4]\n\
+ ldrh r0, [r3, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r3, 0x1C]\n\
+ b _080AD8CA\n\
+_080AD4A0:\n\
+ lsls r0, r7, 2\n\
+ ldr r2, _080AD4E0 @ =gSharedMem + 0x19338\n\
+ adds r0, r2\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD4B2\n\
+ b _080AD8CA\n\
+_080AD4B2:\n\
+ ldr r3, _080AD4E4 @ =0xfffffecc\n\
+ adds r0, r2, r3\n\
+ ldrb r1, [r0, 0x6]\n\
+ movs r0, 0x80\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD4C2\n\
+ b _080AD8CA\n\
+_080AD4C2:\n\
+ movs r1, 0x1\n\
+ negs r1, r1\n\
+ movs r0, 0x1\n\
+_080AD4C8:\n\
+ bl sub_80B1EA8\n\
+_080AD4CC:\n\
+ ldr r0, _080AD4E8 @ =gTasks\n\
+ mov r1, r9\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ ldrh r0, [r1, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r1, 0x1C]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD4E0: .4byte gSharedMem + 0x19338\n\
+_080AD4E4: .4byte 0xfffffecc\n\
+_080AD4E8: .4byte gTasks\n\
+_080AD4EC:\n\
+ ldr r0, _080AD510 @ =gPaletteFade\n\
+ ldrb r1, [r0, 0x7]\n\
+ movs r0, 0x80\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r1, r0, 24\n\
+ cmp r1, 0\n\
+ beq _080AD4FE\n\
+ b _080AD8CA\n\
+_080AD4FE:\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ strh r1, [r0, 0x1C]\n\
+ strh r1, [r0, 0x1E]\n\
+ movs r1, 0x2B\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD510: .4byte gPaletteFade\n\
+_080AD514:\n\
+ lsls r0, r7, 2\n\
+ ldr r1, _080AD534 @ =gSharedMem + 0x19338\n\
+ adds r0, r1\n\
+ ldrb r1, [r0, 0x2]\n\
+ movs r0, 0x4\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD526\n\
+ b _080AD8CA\n\
+_080AD526:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD538 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r1, r4, 2\n\
+ b _080AD6EC\n\
+ .align 2, 0\n\
+_080AD534: .4byte gSharedMem + 0x19338\n\
+_080AD538: .4byte gTasks\n\
+_080AD53C:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD5A8 @ =gStringVar3\n\
+ ldr r4, _080AD5AC @ =gSharedMem + 0x19328\n\
+ ldr r1, [r4]\n\
+ lsls r1, 20\n\
+ lsrs r1, 29\n\
+ lsls r1, 6\n\
+ ldr r5, _080AD5B0 @ =gContestMons + 0x2\n\
+ adds r1, r5\n\
+ bl StringCopy\n\
+ ldr r0, _080AD5B4 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ adds r1, r5\n\
+ bl StringCopy\n\
+ ldr r0, _080AD5B8 @ =gStringVar2\n\
+ lsls r1, r7, 3\n\
+ subs r1, r7\n\
+ lsls r1, 2\n\
+ subs r4, 0xC8\n\
+ adds r1, r4\n\
+ ldrh r2, [r1, 0x6]\n\
+ movs r1, 0xD\n\
+ muls r1, r2\n\
+ ldr r2, _080AD5BC @ =gMoveNames\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080AD5C0 @ =gStringVar4\n\
+ ldr r1, _080AD5C4 @ =gUnknown_083CC14A\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080AD5C8 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AD5CC @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x3A\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD5A8: .4byte gStringVar3\n\
+_080AD5AC: .4byte gSharedMem + 0x19328\n\
+_080AD5B0: .4byte gContestMons + 0x2\n\
+_080AD5B4: .4byte gStringVar1\n\
+_080AD5B8: .4byte gStringVar2\n\
+_080AD5BC: .4byte gMoveNames\n\
+_080AD5C0: .4byte gStringVar4\n\
+_080AD5C4: .4byte gUnknown_083CC14A\n\
+_080AD5C8: .4byte gMenuWindow\n\
+_080AD5CC: .4byte gTasks\n\
+_080AD5D0:\n\
+ ldr r5, _080AD614 @ =gMenuWindow\n\
+ adds r0, r5, 0\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD5E0\n\
+ b _080AD8CA\n\
+_080AD5E0:\n\
+ bl sub_80AF138\n\
+ ldr r4, _080AD618 @ =gStringVar4\n\
+ ldr r1, _080AD61C @ =gUnknown_083CC16E\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r0, 0xF\n\
+ str r0, [sp]\n\
+ adds r0, r5, 0\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AD620 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r0, r2, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x3B\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD614: .4byte gMenuWindow\n\
+_080AD618: .4byte gStringVar4\n\
+_080AD61C: .4byte gUnknown_083CC16E\n\
+_080AD620: .4byte gTasks\n\
+_080AD624:\n\
+ ldr r0, _080AD640 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD632\n\
+ b _080AD8CA\n\
+_080AD632:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD644 @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ b _080AD6EC\n\
+ .align 2, 0\n\
+_080AD640: .4byte gMenuWindow\n\
+_080AD644: .4byte gTasks\n\
+_080AD648:\n\
+ lsls r0, r7, 3\n\
+ subs r0, r7\n\
+ lsls r0, 2\n\
+ ldr r1, _080AD6B4 @ =gSharedMem + 0x19260\n\
+ adds r4, r0, r1\n\
+ ldrb r1, [r4, 0x15]\n\
+ movs r0, 0x10\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ beq _080AD664\n\
+ movs r0, 0x11\n\
+ negs r0, r0\n\
+ ands r0, r1\n\
+ strb r0, [r4, 0x15]\n\
+_080AD664:\n\
+ adds r0, r7, 0\n\
+ bl sub_80B09B0\n\
+ ldr r0, _080AD6B8 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080AD6BC @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r0, _080AD6C0 @ =gStringVar2\n\
+ ldrh r2, [r4, 0x6]\n\
+ movs r1, 0xD\n\
+ muls r1, r2\n\
+ ldr r2, _080AD6C4 @ =gMoveNames\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080AD6C8 @ =gStringVar4\n\
+ ldr r1, _080AD6CC @ =gUnknown_083CBF60\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080AD6D0 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AD6D4 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x22\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD6B4: .4byte gSharedMem + 0x19260\n\
+_080AD6B8: .4byte gStringVar1\n\
+_080AD6BC: .4byte gContestMons + 0x2\n\
+_080AD6C0: .4byte gStringVar2\n\
+_080AD6C4: .4byte gMoveNames\n\
+_080AD6C8: .4byte gStringVar4\n\
+_080AD6CC: .4byte gUnknown_083CBF60\n\
+_080AD6D0: .4byte gMenuWindow\n\
+_080AD6D4: .4byte gTasks\n\
+_080AD6D8:\n\
+ ldr r0, _080AD6F8 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080AD6E6\n\
+ b _080AD8CA\n\
+_080AD6E6:\n\
+ ldr r0, _080AD6FC @ =gTasks\n\
+ mov r5, r8\n\
+ lsls r1, r5, 2\n\
+_080AD6EC:\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x37\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD6F8: .4byte gMenuWindow\n\
+_080AD6FC: .4byte gTasks\n\
+_080AD700:\n\
+ bl sub_80B1BDC\n\
+ ldr r0, _080AD718 @ =gTasks\n\
+ mov r2, r8\n\
+ lsls r1, r2, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x38\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD718: .4byte gTasks\n\
+_080AD71C:\n\
+ ldrb r1, [r6, 0x6]\n\
+ movs r0, 0x40\n\
+ ands r0, r1\n\
+ lsls r0, 24\n\
+ lsrs r1, r0, 24\n\
+ cmp r1, 0\n\
+ beq _080AD72C\n\
+ b _080AD8CA\n\
+_080AD72C:\n\
+ movs r0, 0x13\n\
+ ldrsb r0, [r6, r0]\n\
+ cmp r0, 0x4\n\
+ ble _080AD73A\n\
+ strb r1, [r6, 0x13]\n\
+ bl sub_80B1928\n\
+_080AD73A:\n\
+ ldr r0, _080AD74C @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r1, r3, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0xA\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD74C: .4byte gTasks\n\
+_080AD750:\n\
+ mov r4, r8\n\
+ lsls r2, r4, 2\n\
+ add r2, r8\n\
+ lsls r2, 3\n\
+ add r2, r12\n\
+ ldrb r5, [r2, 0xC]\n\
+ ldr r1, _080AD774 @ =gSprites\n\
+ lsls r0, r5, 4\n\
+ adds r0, r5\n\
+ lsls r0, 2\n\
+ adds r1, 0x1C\n\
+ adds r0, r1\n\
+ ldr r1, _080AD778 @ =sub_80AD92C\n\
+ str r1, [r0]\n\
+ movs r0, 0xB\n\
+ strh r0, [r2, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD774: .4byte gSprites\n\
+_080AD778: .4byte sub_80AD92C\n\
+_080AD77C:\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r1, r12\n\
+ adds r4, r0, r1\n\
+ ldrb r5, [r4, 0xC]\n\
+ ldr r1, _080AD7B4 @ =gSprites\n\
+ lsls r0, r5, 4\n\
+ adds r0, r5\n\
+ lsls r0, 2\n\
+ adds r6, r0, r1\n\
+ adds r0, r6, 0\n\
+ adds r0, 0x3E\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 29\n\
+ cmp r0, 0\n\
+ blt _080AD7A2\n\
+ b _080AD8CA\n\
+_080AD7A2:\n\
+ adds r0, r6, 0\n\
+ bl FreeSpriteOamMatrix\n\
+ adds r0, r6, 0\n\
+ bl DestroySprite\n\
+ movs r0, 0x14\n\
+ strh r0, [r4, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD7B4: .4byte gSprites\n\
+_080AD7B8:\n\
+ movs r6, 0\n\
+ mov r2, r8\n\
+ lsls r2, 2\n\
+ mov r9, r2\n\
+_080AD7C0:\n\
+ lsls r0, r6, 24\n\
+ lsrs r0, 24\n\
+ movs r1, 0x1\n\
+ bl sub_80B0CDC\n\
+ adds r6, 0x1\n\
+ cmp r6, 0x3\n\
+ ble _080AD7C0\n\
+ ldr r1, _080AD7E4 @ =gTasks\n\
+ mov r0, r9\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0\n\
+ strh r1, [r0, 0x1C]\n\
+ movs r1, 0x15\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD7E4: .4byte gTasks\n\
+_080AD7E8:\n\
+ bl sub_80AF138\n\
+ ldr r0, _080AD828 @ =gStringVar1\n\
+ lsls r1, r7, 6\n\
+ ldr r2, _080AD82C @ =gContestMons + 0x2\n\
+ adds r1, r2\n\
+ bl StringCopy\n\
+ ldr r4, _080AD830 @ =gStringVar4\n\
+ ldr r1, _080AD834 @ =gUnknown_083CB00D\n\
+ adds r0, r4, 0\n\
+ bl StringExpandPlaceholders\n\
+ ldr r0, _080AD838 @ =gMenuWindow\n\
+ movs r2, 0xC2\n\
+ lsls r2, 2\n\
+ movs r1, 0xF\n\
+ str r1, [sp]\n\
+ adds r1, r4, 0\n\
+ movs r3, 0x1\n\
+ bl sub_8002EB0\n\
+ ldr r1, _080AD83C @ =gTasks\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ movs r1, 0x20\n\
+ strh r1, [r0, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD828: .4byte gStringVar1\n\
+_080AD82C: .4byte gContestMons + 0x2\n\
+_080AD830: .4byte gStringVar4\n\
+_080AD834: .4byte gUnknown_083CB00D\n\
+_080AD838: .4byte gMenuWindow\n\
+_080AD83C: .4byte gTasks\n\
+_080AD840:\n\
+ ldr r0, _080AD860 @ =gMenuWindow\n\
+ bl sub_80037A0\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080AD8CA\n\
+ ldr r0, _080AD864 @ =gTasks\n\
+ mov r4, r8\n\
+ lsls r1, r4, 2\n\
+ add r1, r8\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ movs r0, 0x15\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+ .align 2, 0\n\
+_080AD860: .4byte gMenuWindow\n\
+_080AD864: .4byte gTasks\n\
+_080AD868:\n\
+ mov r5, r8\n\
+ lsls r0, r5, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ mov r2, r12\n\
+ adds r1, r0, r2\n\
+ ldrh r0, [r1, 0x1C]\n\
+ adds r0, 0x1\n\
+ strh r0, [r1, 0x1C]\n\
+ lsls r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x1D\n\
+ ble _080AD8CA\n\
+ movs r0, 0\n\
+ strh r0, [r1, 0x1C]\n\
+ movs r0, 0x16\n\
+ strh r0, [r1, 0x8]\n\
+ b _080AD8CA\n\
+_080AD88C:\n\
+ ldrb r0, [r6, 0x10]\n\
+ adds r0, 0x1\n\
+ movs r1, 0\n\
+ strb r0, [r6, 0x10]\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x4\n\
+ bne _080AD8B8\n\
+ mov r3, r8\n\
+ lsls r0, r3, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ strh r1, [r0, 0x8]\n\
+ strh r1, [r0, 0xA]\n\
+ strh r1, [r0, 0xC]\n\
+ ldr r1, _080AD8B4 @ =sub_80AD960\n\
+ str r1, [r0]\n\
+ b _080AD8C4\n\
+ .align 2, 0\n\
+_080AD8B4: .4byte sub_80AD960\n\
+_080AD8B8:\n\
+ mov r4, r8\n\
+ lsls r0, r4, 2\n\
+ add r0, r8\n\
+ lsls r0, 3\n\
+ add r0, r12\n\
+ strh r1, [r0, 0x8]\n\
+_080AD8C4:\n\
+ movs r0, 0\n\
+ bl nullsub_18\n\
+_080AD8CA:\n\
+ add sp, 0x8\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .syntax divided\n");
}
-*/ \ No newline at end of file
+