pmd-red/asm/code_80521D0.s
2020-12-13 00:30:31 +01:00

116340 lines
1.7 MiB

.include "constants/gba_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_80523A8
sub_80523A8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x40
adds r3, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
mov r10, r2
ldr r0, _080523D0
ldr r1, [r0]
adds r2, r0, 0
cmp r1, r3
beq _080523D8
movs r7, 0x1
ldr r1, _080523D4
b _080523DE
.align 2, 0
_080523D0: .4byte gUnknown_202F1E8
_080523D4: .4byte gUnknown_203B434
_080523D8:
ldr r0, _080523F0
ldrb r7, [r0]
adds r1, r0, 0
_080523DE:
movs r0, 0x1
mov r8, r0
str r3, [r2]
movs r0, 0
strb r0, [r1]
movs r1, 0
mov r9, r1
b _080523FA
.align 2, 0
_080523F0: .4byte gUnknown_203B434
_080523F4:
movs r0, 0
bl sub_803E46C
_080523FA:
ldr r6, _0805249C
ldr r2, [r6]
ldr r3, _080524A0
adds r0, r2, r3
movs r3, 0
ldrsh r1, [r0, r3]
adds r1, 0x1
cmp r1, 0xA
bne _0805240E
movs r1, 0
_0805240E:
ldr r3, _080524A4
adds r0, r2, r3
movs r3, 0
ldrsh r0, [r0, r3]
cmp r1, r0
beq _080523F4
ldrb r0, [r4]
cmp r0, 0
beq _080524B0
ldr r5, _080524A0
adds r0, r2, r5
movs r3, 0
ldrsh r1, [r0, r3]
ldr r3, _080524A8
adds r0, r2, r3
adds r0, r1
strb r7, [r0]
adds r0, r4, 0
mov r1, sp
mov r2, sp
adds r2, 0x3E
movs r3, 0x80
bl xxx_format_string
adds r4, r0, 0
ldrb r0, [r4]
cmp r0, 0xD
bne _08052448
adds r4, 0x1
_08052448:
ldrb r0, [r4]
cmp r0, 0xA
bne _08052450
adds r4, 0x1
_08052450:
mov r0, sp
adds r1, r7, 0
mov r2, r8
bl sub_8053210
movs r7, 0
movs r0, 0
mov r8, r0
mov r1, r10
cmp r1, 0
beq _080523FA
movs r2, 0x1
mov r9, r2
ldr r1, [r6]
adds r0, r1, r5
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 6
adds r0, r1
ldr r1, _080524AC
adds r0, r1
mov r1, sp
movs r2, 0x40
bl strncpy
ldr r0, [r6]
adds r1, r0, r5
ldrh r0, [r1]
adds r0, 0x1
strh r0, [r1]
lsls r0, 16
asrs r0, 16
cmp r0, 0xA
bne _080523FA
mov r2, r8
strh r2, [r1]
b _080523FA
.align 2, 0
_0805249C: .4byte gUnknown_203B418
_080524A0: .4byte 0x0001c060
_080524A4: .4byte 0x0001c062
_080524A8: .4byte 0x0001c054
_080524AC: .4byte 0x0001bdd4
_080524B0:
mov r3, r9
cmp r3, 0
beq _080524D4
ldr r0, _080524E4
ldr r2, [r0]
ldr r3, _080524E8
adds r1, r2, r3
movs r0, 0xF0
strh r0, [r1]
ldr r0, _080524EC
adds r2, r0
ldr r0, [r2]
cmp r0, 0
bne _080524D0
movs r0, 0x1
str r0, [r2]
_080524D0:
bl sub_805E804
_080524D4:
add sp, 0x40
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080524E4: .4byte gUnknown_203B418
_080524E8: .4byte 0x0001c064
_080524EC: .4byte 0x0001c06c
thumb_func_end sub_80523A8
thumb_func_start xxx_draw_string_80524F0
xxx_draw_string_80524F0:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x3C
ldr r0, _0805251C
ldr r0, [r0]
ldr r1, _08052520
adds r7, r0, r1
ldr r2, _08052524
adds r5, r0, r2
ldr r1, [r5]
cmp r1, 0x1
beq _08052528
cmp r1, 0x1
bcs _08052510
b _0805267C
_08052510:
cmp r1, 0x2
beq _0805253C
cmp r1, 0x3
bne _0805251A
b _0805265C
_0805251A:
b _0805267C
.align 2, 0
_0805251C: .4byte gUnknown_203B418
_08052520: .4byte 0x0001bdd4
_08052524: .4byte 0x0001c06c
_08052528:
bl sub_800EC74
lsls r0, 24
cmp r0, 0
beq _08052534
b _0805267C
_08052534:
movs r0, 0x3
movs r1, 0
bl sub_803EAF0
_0805253C:
ldr r3, _08052560
adds r0, r7, r3
movs r1, 0
ldrsh r4, [r0, r1]
movs r2, 0xA3
lsls r2, 2
adds r0, r7, r2
movs r3, 0
ldrsh r0, [r0, r3]
cmp r4, r0
bne _08052564
movs r0, 0xA6
lsls r0, 2
adds r1, r7, r0
movs r0, 0
str r0, [r1]
b _0805267C
.align 2, 0
_08052560: .4byte 0x0000028e
_08052564:
lsls r0, r4, 6
adds r5, r7, r0
add r1, sp, 0x4
movs r0, 0x4
strh r0, [r1]
ldr r2, _080525B0
adds r6, r7, r2
ldrh r0, [r6]
strh r0, [r1, 0x2]
movs r3, 0x7
mov r8, r3
str r3, [sp, 0x14]
movs r0, 0
bl sub_80073B8
movs r1, 0xA0
lsls r1, 2
adds r0, r7, r1
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
beq _080525AA
movs r2, 0
ldrsh r0, [r6, r2]
cmp r0, 0x7
ble _080525AA
adds r2, r0, 0
subs r2, 0x1
mov r0, r8
str r0, [sp]
movs r0, 0
movs r1, 0
movs r3, 0xE0
bl sub_80078A4
_080525AA:
adds r6, r4, 0x1
b _080525F2
.align 2, 0
_080525B0: .4byte 0x00000292
_080525B4:
add r1, sp, 0x38
adds r0, r5, 0
bl xxx_get_next_char_from_string
adds r5, r0, 0
ldr r4, [sp, 0x38]
cmp r4, 0x60
bne _080525D0
add r1, sp, 0x4
adds r0, r1, 0
ldrh r0, [r0]
adds r0, 0x6
strh r0, [r1]
b _080525F2
_080525D0:
add r0, sp, 0x4
movs r1, 0
ldrsh r0, [r0, r1]
add r1, sp, 0x4
movs r2, 0x2
ldrsh r1, [r1, r2]
ldr r3, [sp, 0x14]
movs r2, 0
str r2, [sp]
adds r2, r4, 0
bl xxx_call_draw_char
add r2, sp, 0x4
adds r1, r2, 0
ldrh r1, [r1]
adds r1, r0
strh r1, [r2]
_080525F2:
adds r0, r5, 0
add r1, sp, 0x4
bl sub_8009190
adds r5, r0, 0
ldrb r0, [r5]
cmp r0, 0
beq _0805260A
cmp r0, 0xD
beq _0805260A
cmp r0, 0xA
bne _080525B4
_0805260A:
movs r0, 0
bl sub_80073E0
movs r3, 0xA4
lsls r3, 2
adds r1, r7, r3
movs r0, 0xF0
strh r0, [r1]
adds r4, r6, 0
cmp r4, 0xA
bne _08052622
movs r4, 0
_08052622:
ldr r1, _08052654
adds r0, r7, r1
strh r4, [r0]
ldr r2, _08052658
adds r1, r7, r2
ldrh r0, [r1]
adds r0, 0xB
strh r0, [r1]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2F
ble _0805267C
movs r0, 0x25
strh r0, [r1]
movs r3, 0xA5
lsls r3, 2
adds r1, r7, r3
movs r0, 0
strh r0, [r1]
movs r0, 0xA6
lsls r0, 2
adds r1, r7, r0
movs r0, 0x3
str r0, [r1]
b _0805267C
.align 2, 0
_08052654: .4byte 0x0000028e
_08052658: .4byte 0x00000292
_0805265C:
ldr r1, _080526C4
adds r4, r0, r1
ldrh r0, [r4]
adds r0, 0x1
strh r0, [r4]
ldr r0, _080526C8
ldr r1, [r0]
movs r0, 0
bl _call_via_r1
movs r2, 0
ldrsh r0, [r4, r2]
cmp r0, 0xA
ble _0805267C
movs r0, 0x2
str r0, [r5]
_0805267C:
ldr r3, _080526CC
adds r0, r7, r3
ldrb r0, [r0]
cmp r0, 0
bne _080526B8
movs r0, 0xA4
lsls r0, 2
adds r1, r7, r0
ldrh r2, [r1]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0
beq _080526B8
subs r0, r2, 0x1
strh r0, [r1]
lsls r0, 16
asrs r1, r0, 16
cmp r1, 0
bne _080526B8
movs r2, 0xA6
lsls r2, 2
adds r0, r7, r2
str r1, [r0]
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0
bl sub_8052210
_080526B8:
add sp, 0x3C
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080526C4: .4byte 0x0001c068
_080526C8: .4byte gUnknown_203B08C
_080526CC: .4byte 0x0000028a
thumb_func_end xxx_draw_string_80524F0
thumb_func_start sub_80526D0
sub_80526D0:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, _0805272C
ldr r1, [r0]
ldr r0, _08052730
adds r4, r1, r0
ldr r2, _08052734
adds r0, r1, r2
ldr r0, [r0]
cmp r0, 0
bne _080526FA
ldr r3, _08052738
adds r0, r1, r3
subs r2, 0xA
adds r1, r2
movs r3, 0
ldrsh r2, [r0, r3]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r2, r0
beq _08052724
_080526FA:
adds r0, r5, 0
bl sub_803E46C
movs r1, 0xA6
lsls r1, 2
adds r0, r4, r1
ldr r0, [r0]
cmp r0, 0
bne _080526FA
ldr r0, _0805272C
ldr r0, [r0]
ldr r2, _08052738
adds r1, r0, r2
ldr r3, _0805273C
adds r0, r3
movs r2, 0
ldrsh r1, [r1, r2]
movs r3, 0
ldrsh r0, [r0, r3]
cmp r1, r0
bne _080526FA
_08052724:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0805272C: .4byte gUnknown_203B418
_08052730: .4byte 0x0001bdd4
_08052734: .4byte 0x0001c06c
_08052738: .4byte 0x0001c060
_0805273C: .4byte 0x0001c062
thumb_func_end sub_80526D0
thumb_func_start sub_8052740
sub_8052740:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r5, r0, 0
ldr r0, _080527B0
ldr r4, [r0]
ldr r0, _080527B4
adds r7, r4, r0
adds r0, r5, 0
bl sub_80526D0
movs r6, 0
ldr r1, _080527B8
adds r4, r1
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0xB3
ble _080527A4
ldr r2, _080527BC
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0x3
beq _080527A4
adds r4, r2, 0
ldr r0, _080527C0
mov r8, r0
_08052776:
ldrh r0, [r4, 0x2]
mov r1, r8
ands r0, r1
cmp r0, 0
bne _080527A4
adds r0, r5, 0
bl sub_803E46C
adds r6, 0x1
cmp r6, 0xEF
bgt _080527A4
movs r1, 0xA4
lsls r1, 2
adds r0, r7, r1
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0xB3
ble _080527A4
ldrh r1, [r4]
movs r0, 0x3
ands r0, r1
cmp r0, 0x3
bne _08052776
_080527A4:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080527B0: .4byte gUnknown_203B418
_080527B4: .4byte 0x0001bdd4
_080527B8: .4byte 0x0001c064
_080527BC: .4byte gUnknown_20255F0
_080527C0: .4byte 0x0000030f
thumb_func_end sub_8052740
thumb_func_start PrintFieldMessage
PrintFieldMessage:
push {r4-r7,lr}
sub sp, 0x28
adds r4, r0, 0
adds r7, r1, 0
lsls r2, 24
lsrs r6, r2, 24
ldr r0, _08052858
ldrb r0, [r0]
cmp r0, 0
beq _080527DE
movs r0, 0xA
bl sub_8052740
_080527DE:
movs r0, 0x2
movs r1, 0
bl sub_803EAF0
movs r0, 0
bl sub_8052210
movs r5, 0
str r5, [sp, 0x14]
str r5, [sp, 0x18]
ldr r0, _0805285C
ldr r1, [r0]
ldr r2, _08052860
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052844
adds r2, 0x6
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052844
cmp r4, 0
beq _08052844
movs r1, 0
ldrsh r0, [r4, r1]
ldrb r1, [r4, 0x2]
bl sub_808DE10
lsls r0, 24
cmp r0, 0
beq _08052844
movs r2, 0
ldrsh r0, [r4, r2]
bl sub_808DDD0
str r0, [sp, 0x14]
ldr r0, [r0, 0x4]
str r0, [sp, 0x18]
add r1, sp, 0x14
movs r2, 0
movs r0, 0x2
strh r0, [r1, 0x8]
movs r0, 0x9
strh r0, [r1, 0xA]
ldrb r0, [r4, 0x2]
strb r0, [r1, 0xC]
adds r0, r1, 0
strb r2, [r0, 0xD]
strb r2, [r0, 0xE]
adds r5, r0, 0
_08052844:
movs r1, 0
str r1, [sp]
movs r0, 0x3
str r0, [sp, 0x4]
str r1, [sp, 0x8]
str r5, [sp, 0xC]
cmp r6, 0
beq _08052868
ldr r0, _08052864
b _0805286C
.align 2, 0
_08052858: .4byte gUnknown_203B40C
_0805285C: .4byte gUnknown_203B418
_08052860: .4byte 0x0001820a
_08052864: .4byte 0x00000701
_08052868:
movs r0, 0x80
lsls r0, 3
_0805286C:
str r0, [sp, 0x10]
adds r0, r7, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl sub_8014248
ldr r0, _080528D0
ldr r0, [r0]
ldr r1, _080528D4
adds r0, r1
movs r1, 0x1
strb r1, [r0]
add r4, sp, 0x24
_08052888:
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
adds r0, r4, 0
bl sub_80144A4
adds r1, r0, 0
cmp r1, 0
bne _08052888
ldr r0, _080528D0
ldr r0, [r0]
ldr r2, _080528D4
adds r0, r2
strb r1, [r0]
ldr r0, [sp, 0x14]
cmp r0, 0
beq _080528B2
bl CloseFile
_080528B2:
cmp r6, 0
beq _080528E4
bl sub_805E804
bl sub_8040238
ldr r0, _080528D8
ldrb r0, [r0]
cmp r0, 0
beq _080528DC
movs r0, 0
movs r1, 0
bl sub_803EAF0
b _080528E4
.align 2, 0
_080528D0: .4byte gUnknown_203B418
_080528D4: .4byte 0x0001c05f
_080528D8: .4byte gUnknown_202EE01
_080528DC:
movs r0, 0x1
movs r1, 0
bl sub_803EAF0
_080528E4:
movs r0, 0x8
movs r1, 0x9
bl sub_803E708
add sp, 0x28
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end PrintFieldMessage
thumb_func_start sub_80528F4
sub_80528F4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522E8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80528F4
thumb_func_start sub_8052910
sub_8052910:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x14
adds r6, r0, 0
bl sub_8085480
adds r4, r0, 0
bl sub_808548C
adds r5, r0, 0
movs r0, 0
mov r9, r0
cmp r4, 0
beq _0805295C
ldr r4, [r4, 0x70]
ldr r2, _08052950
ldrb r1, [r4, 0xA]
movs r0, 0x64
muls r0, r1
ldr r1, _08052954
adds r0, r1
ldr r1, [r2]
adds r1, r0
ldr r0, _08052958
bl sub_808DA0C
movs r2, 0x4
ldrsh r7, [r4, r2]
b _08052966
.align 2, 0
_08052950: .4byte gUnknown_203B45C
_08052954: .4byte 0x00008df8
_08052958: .4byte gUnknown_202DF98
_0805295C:
movs r7, 0
ldr r0, _08052988
ldr r1, _0805298C
bl strcpy
_08052966:
cmp r5, 0
beq _0805299C
ldr r4, [r5, 0x70]
ldr r2, _08052990
ldrb r1, [r4, 0xA]
movs r0, 0x64
muls r0, r1
ldr r1, _08052994
adds r0, r1
ldr r1, [r2]
adds r1, r0
ldr r0, _08052998
bl sub_808DA0C
movs r2, 0x4
ldrsh r4, [r4, r2]
b _080529A6
.align 2, 0
_08052988: .4byte gUnknown_202DF98
_0805298C: .4byte gUnknown_80F7AF8
_08052990: .4byte gUnknown_203B45C
_08052994: .4byte 0x00008df8
_08052998: .4byte gUnknown_202DFE8
_0805299C:
movs r4, 0
ldr r0, _080529C0
ldr r1, _080529C4
bl strcpy
_080529A6:
movs r0, 0x4
ldrsh r1, [r6, r0]
movs r0, 0xD5
lsls r0, 1
cmp r1, r0
beq _080529F0
cmp r1, r0
bgt _080529C8
subs r0, 0x1
cmp r1, r0
beq _080529D4
b _08052A1C
.align 2, 0
_080529C0: .4byte gUnknown_202DFE8
_080529C4: .4byte gUnknown_80F7AF8
_080529C8:
ldr r0, _080529D0
cmp r1, r0
beq _08052A08
b _08052A1C
.align 2, 0
_080529D0: .4byte 0x000001ab
_080529D4:
adds r4, r7, 0
ldr r0, _080529E4
ldr r1, _080529E8
ldr r2, _080529EC
bl sub_800D158
b _08052A28
.align 2, 0
_080529E4: .4byte gUnknown_202E5D8
_080529E8: .4byte gUnknown_80F7AFC
_080529EC: .4byte gUnknown_202DF98
_080529F0:
ldr r0, _080529FC
ldr r1, _08052A00
ldr r2, _08052A04
bl sub_800D158
b _08052A28
.align 2, 0
_080529FC: .4byte gUnknown_202E5D8
_08052A00: .4byte gUnknown_80F7AFC
_08052A04: .4byte gUnknown_202DFE8
_08052A08:
movs r4, 0
ldr r0, _08052A14
ldr r1, _08052A18
bl strcpy
b _08052A28
.align 2, 0
_08052A14: .4byte gUnknown_202E5D8
_08052A18: .4byte gUnknown_80F7B04
_08052A1C:
movs r1, 0x4
ldrsh r4, [r6, r1]
ldr r0, _08052A48
adds r1, r4, 0
bl sub_808D8E0
_08052A28:
ldrh r0, [r6]
subs r0, 0x2
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bhi _08052A3C
ldr r0, _08052A48
ldr r1, _08052A4C
bl strcpy
_08052A3C:
movs r2, 0x6
ldrsh r0, [r6, r2]
ldr r2, _08052A50
add r7, sp, 0x10
b _08052A8E
.align 2, 0
_08052A48: .4byte gUnknown_202E5D8
_08052A4C: .4byte gUnknown_80F7B04
_08052A50: .4byte gUnknown_203B418
_08052A54:
movs r0, 0x6
ldrsh r1, [r6, r0]
cmp r1, 0x1
bne _08052A78
cmp r4, 0x1
beq _08052A9E
cmp r4, 0x9B
beq _08052A9E
ldr r0, _08052B08
cmp r4, r0
beq _08052A9E
cmp r4, 0x19
beq _08052A9E
cmp r4, 0x4
beq _08052A9E
subs r0, 0x6
cmp r4, r0
beq _08052A9E
_08052A78:
movs r0, 0x8C
lsls r0, 1
cmp r1, r0
bne _08052A88
cmp r4, r1
beq _08052A9E
cmp r4, 0x98
beq _08052A9E
_08052A88:
adds r6, 0xC
movs r1, 0x6
ldrsh r0, [r6, r1]
_08052A8E:
cmp r0, 0
beq _08052A9E
cmp r0, 0x7
bne _08052A54
cmp r4, 0x7
beq _08052A9E
cmp r4, 0x9E
bne _08052A54
_08052A9E:
ldr r1, [r2]
ldr r2, _08052B0C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052B14
adds r2, 0x6
adds r0, r1, r2
ldrb r0, [r0]
mov r8, r0
cmp r0, 0
bne _08052B14
ldrh r0, [r6]
cmp r0, 0x4
beq _08052B14
ldrb r0, [r6, 0x2]
cmp r0, 0x80
beq _08052B14
cmp r4, 0
beq _08052B14
ldrb r0, [r6, 0x3]
bl sub_808CDB0
adds r5, r0, 0
mov r9, sp
adds r0, r4, 0
bl sub_808DDD0
str r0, [sp]
cmp r0, 0
beq _08052B10
ldr r0, [r0, 0x4]
str r0, [sp, 0x4]
mov r1, r8
mov r0, r9
strb r1, [r0, 0xE]
ldrb r0, [r6, 0x2]
mov r2, r9
strb r0, [r2, 0xC]
ldrb r0, [r5, 0x4]
strb r0, [r2, 0xD]
ldrh r0, [r5]
strh r0, [r2, 0x8]
ldrh r0, [r5, 0x2]
strh r0, [r2, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bgt _08052B14
movs r0, 0x2
strh r0, [r2, 0xA]
b _08052B14
.align 2, 0
_08052B08: .4byte 0x0000011b
_08052B0C: .4byte 0x0001820a
_08052B10:
movs r0, 0
mov r9, r0
_08052B14:
movs r0, 0xA
bl sub_8052740
movs r0, 0x2
movs r1, 0
bl sub_803EAF0
movs r0, 0
bl sub_8052210
ldr r0, [r6, 0x8]
ldr r2, _08052B88
ldrh r1, [r6]
lsls r1, 1
adds r1, r2
ldrh r3, [r1]
movs r1, 0
mov r2, r9
bl sub_80141B4
_08052B3C:
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
adds r0, r7, 0
bl sub_80144A4
cmp r0, 0
bne _08052B3C
mov r1, r9
cmp r1, 0
beq _08052B5C
ldr r0, [r1]
bl CloseFile
_08052B5C:
ldrh r0, [r6]
cmp r0, 0x1
beq _08052B72
cmp r0, 0x3
beq _08052B72
bl sub_8040238
movs r0, 0
movs r1, 0
bl sub_803EAF0
_08052B72:
movs r0, 0x8
movs r1, 0x9
bl sub_803E708
add sp, 0x14
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08052B88: .4byte gUnknown_80F7AEA
thumb_func_end sub_8052910
thumb_func_start sub_8052B8C
sub_8052B8C:
push {r4-r7,lr}
sub sp, 0x14
adds r4, r0, 0
adds r6, r1, 0
adds r7, r2, 0
movs r0, 0xA
bl sub_8052740
movs r0, 0x2
movs r1, 0
bl sub_803EAF0
movs r0, 0
bl sub_8052210
movs r5, 0
str r5, [sp]
str r5, [sp, 0x4]
ldr r0, _08052C14
ldr r1, [r0]
ldr r2, _08052C18
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052C02
adds r2, 0x6
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052C02
cmp r4, 0
beq _08052C02
movs r1, 0
ldrsh r0, [r4, r1]
ldrb r1, [r4, 0x2]
bl sub_808DE10
lsls r0, 24
cmp r0, 0
beq _08052C02
movs r2, 0
ldrsh r0, [r4, r2]
bl sub_808DDD0
str r0, [sp]
ldr r0, [r0, 0x4]
str r0, [sp, 0x4]
mov r1, sp
movs r2, 0
movs r0, 0x2
strh r0, [r1, 0x8]
movs r0, 0x9
strh r0, [r1, 0xA]
ldrb r0, [r4, 0x2]
strb r0, [r1, 0xC]
mov r0, sp
strb r2, [r0, 0xD]
strb r2, [r0, 0xE]
mov r5, sp
_08052C02:
cmp r7, 0x1
bne _08052C1C
movs r2, 0xC0
lsls r2, 2
adds r0, r6, 0
adds r1, r5, 0
bl sub_80141E0
b _08052C28
.align 2, 0
_08052C14: .4byte gUnknown_203B418
_08052C18: .4byte 0x0001820a
_08052C1C:
movs r2, 0xC0
lsls r2, 2
adds r0, r6, 0
adds r1, r5, 0
bl sub_8014214
_08052C28:
add r4, sp, 0x10
_08052C2A:
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
adds r0, r4, 0
bl sub_80144A4
cmp r0, 0
bne _08052C2A
ldr r0, [sp]
cmp r0, 0
beq _08052C48
bl CloseFile
_08052C48:
bl sub_8040238
movs r0, 0
movs r1, 0
bl sub_803EAF0
ldr r0, [sp, 0x10]
cmp r0, 0x1
beq _08052C5E
movs r0, 0
b _08052C60
_08052C5E:
movs r0, 0x1
_08052C60:
add sp, 0x14
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8052B8C
thumb_func_start sub_8052C68
sub_8052C68:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x28
adds r4, r0, 0
adds r7, r1, 0
mov r8, r2
lsls r3, 16
lsrs r6, r3, 16
movs r0, 0xA
bl sub_8052740
movs r0, 0x2
movs r1, 0
bl sub_803EAF0
movs r0, 0
bl sub_8052210
movs r5, 0
str r5, [sp, 0x14]
str r5, [sp, 0x18]
ldr r0, _08052D3C
ldr r1, [r0]
ldr r2, _08052D40
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052CE6
adds r2, 0x6
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _08052CE6
cmp r4, 0
beq _08052CE6
movs r1, 0
ldrsh r0, [r4, r1]
ldrb r1, [r4, 0x2]
bl sub_808DE10
lsls r0, 24
cmp r0, 0
beq _08052CE6
movs r2, 0
ldrsh r0, [r4, r2]
bl sub_808DDD0
str r0, [sp, 0x14]
ldr r0, [r0, 0x4]
str r0, [sp, 0x18]
add r1, sp, 0x14
movs r2, 0
movs r0, 0x2
strh r0, [r1, 0x8]
movs r0, 0x9
strh r0, [r1, 0xA]
ldrb r0, [r4, 0x2]
strb r0, [r1, 0xC]
adds r0, r1, 0
strb r2, [r0, 0xD]
strb r2, [r0, 0xE]
adds r5, r0, 0
_08052CE6:
movs r2, 0x1
negs r2, r2
movs r1, 0
str r1, [sp]
movs r0, 0x3
str r0, [sp, 0x4]
str r1, [sp, 0x8]
str r5, [sp, 0xC]
str r6, [sp, 0x10]
adds r0, r7, 0
mov r3, r8
bl sub_8014248
add r4, sp, 0x24
_08052D02:
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
adds r0, r4, 0
bl sub_80144A4
cmp r0, 0
bne _08052D02
ldr r0, [sp, 0x14]
cmp r0, 0
beq _08052D20
bl CloseFile
_08052D20:
bl sub_8040238
movs r0, 0
movs r1, 0
bl sub_803EAF0
ldr r0, [sp, 0x24]
add sp, 0x28
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08052D3C: .4byte gUnknown_203B418
_08052D40: .4byte 0x0001820a
thumb_func_end sub_8052C68
thumb_func_start sub_8052D44
sub_8052D44:
push {r4-r7,lr}
adds r7, r0, 0
adds r4, r1, 0
adds r6, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
beq _08052D70
ldr r0, _08052D6C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r4, 0x70]
ldrh r0, [r0, 0x4]
strh r0, [r7]
b _08052D7A
.align 2, 0
_08052D6C: .4byte gUnknown_202DF98
_08052D70:
ldr r0, _08052D9C
ldr r1, _08052DA0
bl strcpy
strh r5, [r7]
_08052D7A:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _08052DA8
ldr r0, _08052DA4
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r6, 0x70]
ldrh r0, [r0, 0x4]
strh r0, [r7, 0x2]
b _08052DB2
.align 2, 0
_08052D9C: .4byte gUnknown_202DF98
_08052DA0: .4byte gUnknown_80F7AF8
_08052DA4: .4byte gUnknown_202DFE8
_08052DA8:
ldr r0, _08052DB8
ldr r1, _08052DBC
bl strcpy
strh r4, [r7, 0x2]
_08052DB2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08052DB8: .4byte gUnknown_202DFE8
_08052DBC: .4byte gUnknown_80F7AF8
thumb_func_end sub_8052D44
thumb_func_start sub_8052DC0
sub_8052DC0:
push {lr}
bl sub_8045888
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
thumb_func_end sub_8052DC0
thumb_func_start sub_8052DD0
sub_8052DD0:
push {r4-r6,lr}
bl sub_8083600
adds r5, r0, 0
ldr r6, _08052E68
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
beq _08052E46
ldr r6, _08052E6C
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
beq _08052E46
ldr r6, _08052E70
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
beq _08052E46
ldr r0, _08052E74
ldr r0, [r0]
ldr r1, _08052E78
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
bne _08052EB6
ldr r6, _08052E7C
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
beq _08052E46
ldr r6, _08052E80
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
beq _08052E46
ldr r6, _08052E84
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
bne _08052E88
_08052E46:
adds r0, r4, 0
bl sub_8098170
bl sub_8083E28
ldr r4, [r6, 0x4]
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
bl PrintFieldMessage
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522E8
b _08052EB6
.align 2, 0
_08052E68: .4byte gUnknown_80FF020
_08052E6C: .4byte gUnknown_80FF080
_08052E70: .4byte gUnknown_80FF0D8
_08052E74: .4byte gUnknown_203B418
_08052E78: .4byte 0x00000644
_08052E7C: .4byte gUnknown_80FF13C
_08052E80: .4byte gUnknown_80FF1B4
_08052E84: .4byte gUnknown_80FF22C
_08052E88:
ldr r6, _08052EBC
ldr r4, [r6]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
bne _08052EB6
adds r0, r4, 0
bl sub_8098170
bl sub_8083E28
ldr r4, [r6, 0x4]
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
bl PrintFieldMessage
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522E8
_08052EB6:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08052EBC: .4byte gUnknown_80FF290
thumb_func_end sub_8052DD0
thumb_func_start sub_8052EC0
sub_8052EC0:
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
adds r5, r4, 0
adds r0, r4, 0
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
bne _08052EE0
ldr r5, _08052EDC
b _08052F22
.align 2, 0
_08052EDC: .4byte gUnknown_80FF310
_08052EE0:
cmp r4, 0x37
bne _08052EEC
ldr r5, _08052EE8
b _08052F22
.align 2, 0
_08052EE8: .4byte gUnknown_80FF394
_08052EEC:
cmp r4, 0x43
bne _08052EF8
ldr r5, _08052EF4
b _08052F22
.align 2, 0
_08052EF4: .4byte gUnknown_80FF3E8
_08052EF8:
cmp r4, 0x48
bne _08052F04
ldr r5, _08052F00
b _08052F22
.align 2, 0
_08052F00: .4byte gUnknown_80FF440
_08052F04:
cmp r4, 0x7
bne _08052F10
ldr r5, _08052F0C
b _08052F22
.align 2, 0
_08052F0C: .4byte gUnknown_80FF4A0
_08052F10:
cmp r4, 0x42
bne _08052F1C
ldr r5, _08052F18
b _08052F22
.align 2, 0
_08052F18: .4byte gUnknown_80FF518
_08052F1C:
cmp r4, 0x45
bne _08052F4C
ldr r5, _08052F48
_08052F22:
ldr r4, [r5]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
bne _08052F74
adds r0, r4, 0
bl sub_8098170
bl sub_8083E28
ldr r1, [r5, 0x4]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _08052F74
.align 2, 0
_08052F48: .4byte gUnknown_80FF57C
_08052F4C:
cmp r5, 0x69
bne _08052F74
ldr r5, _08052F7C
ldr r4, [r5]
adds r0, r4, 0
bl sub_80981A0
lsls r0, 24
cmp r0, 0
bne _08052F74
adds r0, r4, 0
bl sub_8098170
bl sub_8083E28
ldr r1, [r5, 0x4]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_08052F74:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08052F7C: .4byte gUnknown_80FF5E8
thumb_func_end sub_8052EC0
thumb_func_start sub_8052F80
sub_8052F80:
push {lr}
ldr r0, _08052F9C
ldr r0, [r0]
ldrb r0, [r0, 0xA]
cmp r0, 0
beq _08052FA4
ldr r0, _08052FA0
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _08052FB0
.align 2, 0
_08052F9C: .4byte gUnknown_203B418
_08052FA0: .4byte gUnknown_80FF6F8
_08052FA4:
ldr r0, _08052FB4
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_08052FB0:
pop {r0}
bx r0
.align 2, 0
_08052FB4: .4byte gUnknown_80FF6A4
thumb_func_end sub_8052F80
thumb_func_start sub_8052FB8
sub_8052FB8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
adds r3, r0, 0
movs r0, 0
mov r8, r0
ldr r0, _08053030
movs r2, 0
adds r0, 0x2
movs r1, 0x1C
_08052FD2:
strh r2, [r0]
adds r0, 0x2
subs r1, 0x1
cmp r1, 0
bge _08052FD2
movs r0, 0
str r0, [sp]
movs r1, 0x2
str r1, [sp, 0x4]
str r0, [sp, 0x8]
str r0, [sp, 0xC]
movs r0, 0x30
str r0, [sp, 0x10]
adds r0, r3, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl sub_8014248
movs r1, 0
mov r9, r1
ldr r7, _08053034
ldr r2, _08053038
mov r10, r2
_08053002:
mov r3, r8
cmp r3, 0x3D
bgt _08053040
movs r4, 0x1
add r8, r4
movs r5, 0
mov r1, r8
lsrs r0, r1, 31
adds r6, r1, r0
ldr r4, _0805303C
_08053016:
adds r0, r5, 0
adds r0, 0xF0
adds r1, r4, 0
asrs r2, r6, 1
movs r3, 0
bl SetBGPaletteBufferColorRGB
adds r4, 0x4
adds r5, 0x1
cmp r5, 0x7
ble _08053016
b _080530CA
.align 2, 0
_08053030: .4byte gUnknown_202B038
_08053034: .4byte gUnknown_202F1F0
_08053038: .4byte 0x0000f3ff
_0805303C: .4byte gUnknown_202D038
_08053040:
movs r2, 0x1
add r9, r2
movs r0, 0x8
mov r3, r9
ands r0, r3
cmp r0, 0
beq _080530BE
ldrh r0, [r7]
ldr r4, _080530D8
adds r1, r4, 0
ands r0, r1
ldr r2, _080530DC
adds r1, r2, 0
ands r0, r1
mov r3, r10
ands r0, r3
ldr r4, _080530E0
adds r1, r4, 0
ands r0, r1
ldr r2, _080530E4
adds r1, r2, 0
ands r0, r1
ldr r3, _080530E8
ands r0, r3
movs r4, 0x80
lsls r4, 7
orrs r0, r4
strh r0, [r7]
movs r2, 0xFC
lsls r2, 2
ldrh r0, [r7, 0x4]
movs r3, 0xFC
lsls r3, 8
adds r1, r3, 0
ands r0, r1
orrs r0, r2
movs r4, 0
orrs r0, r4
mov r1, r10
ands r0, r1
movs r2, 0xF
movs r3, 0xF0
lsls r3, 8
ldr r4, _080530EC
adds r1, r4, 0
ands r0, r1
orrs r0, r3
strh r0, [r7, 0x4]
movs r1, 0xF0
lsls r1, 3
ldrh r0, [r7, 0x6]
ands r2, r0
orrs r2, r1
strh r2, [r7, 0x6]
movs r0, 0x70
strh r0, [r7, 0x2]
adds r0, r7, 0
movs r1, 0x80
lsls r1, 1
movs r2, 0
movs r3, 0
bl AddSprite
_080530BE:
ldr r0, _080530F0
ldrh r1, [r0, 0x2]
movs r0, 0x3
ands r0, r1
cmp r0, 0
bne _080530F4
_080530CA:
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
b _08053002
.align 2, 0
_080530D8: .4byte 0x0000feff
_080530DC: .4byte 0x0000fdff
_080530E0: .4byte 0x0000efff
_080530E4: .4byte 0x0000dfff
_080530E8: .4byte 0x00003fff
_080530EC: .4byte 0x00000fff
_080530F0: .4byte gUnknown_20255F0
_080530F4:
mov r0, r8
cmp r0, 0
blt _08053134
ldr r1, _08053178
mov r9, r1
_080530FE:
movs r5, 0
mov r7, r8
subs r7, 0x1
mov r2, r8
lsrs r0, r2, 31
adds r6, r2, r0
mov r4, r9
_0805310C:
adds r0, r5, 0
adds r0, 0xF0
adds r1, r4, 0
asrs r2, r6, 1
movs r3, 0
bl SetBGPaletteBufferColorRGB
adds r4, 0x4
adds r5, 0x1
cmp r5, 0x7
ble _0805310C
bl xxx_draw_string_80144C4
movs r0, 0x9
bl sub_803E46C
mov r8, r7
mov r3, r8
cmp r3, 0
bge _080530FE
_08053134:
movs r0, 0
movs r1, 0x1
movs r2, 0x1
bl sub_800641C
movs r0, 0x9
bl sub_803E46C
bl sub_8040238
movs r5, 0
ldr r4, _08053178
_0805314C:
adds r0, r5, 0
adds r0, 0xF0
adds r1, r4, 0
bl SetBGPaletteBufferColorArray
adds r4, 0x4
adds r5, 0x1
cmp r5, 0x7
ble _0805314C
movs r0, 0x8
movs r1, 0x9
bl sub_803E708
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08053178: .4byte gUnknown_202D038
thumb_func_end sub_8052FB8
thumb_func_start sub_805317C
sub_805317C:
push {lr}
ldr r0, _08053198
ldr r1, [r0]
movs r2, 0xCF
lsls r2, 3
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0x1
beq _0805319C
subs r2, 0x34
adds r0, r1, r2
ldrb r0, [r0]
b _0805319E
.align 2, 0
_08053198: .4byte gUnknown_203B418
_0805319C:
movs r0, 0x3F
_0805319E:
bl GetDungeonName1
pop {r1}
bx r1
thumb_func_end sub_805317C
thumb_func_start sub_80531A8
sub_80531A8:
push {r4-r6,lr}
ldr r2, _080531F0
ldr r1, [r2]
movs r0, 0
strh r0, [r1, 0x16]
movs r0, 0x1
strb r0, [r1, 0xB]
movs r4, 0
movs r3, 0
ldr r5, _080531F4
_080531BC:
ldr r0, [r2]
lsls r1, r4, 6
adds r0, r1
adds r0, r5
strb r3, [r0]
ldr r0, [r2]
adds r0, r1
ldr r6, _080531F8
adds r0, r6
strb r3, [r0]
ldr r0, [r2]
adds r0, r1
adds r6, 0x1
adds r0, r6
strb r3, [r0]
ldr r0, [r2]
adds r0, r1
ldr r1, _080531FC
adds r0, r1
strb r3, [r0]
adds r4, 0x1
cmp r4, 0x13
ble _080531BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080531F0: .4byte gUnknown_203B418
_080531F4: .4byte 0x0001c073
_080531F8: .4byte 0x0001c070
_080531FC: .4byte 0x0001c072
thumb_func_end sub_80531A8
thumb_func_start sub_8053200
sub_8053200:
ldr r0, _0805320C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xB]
bx lr
.align 2, 0
_0805320C: .4byte gUnknown_203B418
thumb_func_end sub_8053200
thumb_func_start sub_8053210
sub_8053210:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
ldr r0, _08053264
mov r12, r0
ldr r3, [r0]
movs r0, 0x16
ldrsh r4, [r3, r0]
lsls r4, 6
ldr r5, _08053268
adds r0, r4, r5
adds r0, r3, r0
adds r7, r0, 0x3
adds r0, 0x3E
mov r8, r0
adds r3, r4
adds r3, r5
movs r0, 0x1
strb r0, [r3]
mov r4, r12
ldr r3, [r4]
movs r4, 0x16
ldrsh r0, [r3, r4]
lsls r0, 6
adds r3, r0
ldr r0, _0805326C
adds r3, r0
strb r1, [r3]
mov r3, r12
ldr r1, [r3]
movs r4, 0x16
ldrsh r0, [r1, r4]
lsls r0, 6
adds r1, r0
ldr r0, _08053270
adds r1, r0
strb r2, [r1]
ldrb r2, [r6]
adds r0, r2, 0
mov r1, r12
b _08053282
.align 2, 0
_08053264: .4byte gUnknown_203B418
_08053268: .4byte 0x0001c070
_0805326C: .4byte 0x0001c071
_08053270: .4byte 0x0001c072
_08053274:
cmp r7, r8
bcs _0805327C
strb r2, [r7]
adds r7, 0x1
_0805327C:
adds r6, 0x1
ldrb r2, [r6]
adds r0, r2, 0
_08053282:
cmp r0, 0
beq _0805328A
cmp r0, 0xD
bne _08053274
_0805328A:
movs r0, 0
strb r0, [r7]
ldr r2, [r1]
ldrh r0, [r2, 0x16]
adds r0, 0x1
strh r0, [r2, 0x16]
lsls r0, 16
asrs r0, 16
cmp r0, 0x13
ble _080532A2
movs r0, 0
strh r0, [r2, 0x16]
_080532A2:
ldr r1, [r1]
movs r0, 0x1
strb r0, [r1, 0xB]
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8053210
thumb_func_start sub_80532B4
sub_80532B4:
push {r4-r6,lr}
sub sp, 0xC
mov r0, sp
bl sub_801317C
movs r0, 0x9
movs r1, 0
bl sub_803EAF0
_080532C6:
movs r0, 0xD
bl sub_803E46C
movs r0, 0
bl sub_8008D8C
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _080532C6
ldr r0, _08053374
str r1, [r0]
ldr r4, _08053378
strb r1, [r4]
bl sub_80533A4
adds r6, r4, 0
_080532E8:
movs r5, 0
strb r5, [r6]
mov r0, sp
movs r1, 0
bl nullsub_34
movs r0, 0
ldr r1, _0805337C
bl sub_8014140
adds r4, r0, 0
bl sub_8053430
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r5, r1, 31
adds r0, r4, 0
bl sub_8053540
lsls r0, 24
cmp r0, 0
beq _0805331A
movs r5, 0x1
_0805331A:
cmp r5, 0
bne _08053324
movs r0, 0xD
bl sub_803E46C
_08053324:
ldrb r1, [r6]
movs r5, 0x1
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _0805333A
movs r0, 0x1
movs r1, 0x8
negs r1, r1
bl sub_805363C
_0805333A:
ldrb r1, [r6]
movs r4, 0x2
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _0805334E
movs r0, 0
movs r1, 0x72
bl sub_805363C
_0805334E:
bl sub_80048C8
lsls r0, 24
cmp r0, 0
bne _080532E8
ldr r0, _08053380
ldrh r1, [r0, 0x2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _0805336C
mov r0, sp
ldrb r0, [r0, 0x2]
cmp r0, 0
beq _08053384
_0805336C:
bl sub_8083D30
b _08053390
.align 2, 0
_08053374: .4byte gUnknown_202F1F8
_08053378: .4byte gUnknown_202F1FC
_0805337C: .4byte gUnknown_8106990
_08053380: .4byte gUnknown_20255F0
_08053384:
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _080532E8
bl sub_8083D08
_08053390:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x1
add sp, 0xC
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80532B4
thumb_func_start sub_80533A4
sub_80533A4:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
ldr r5, _08053428
ldr r0, [r5]
movs r1, 0x16
ldrsh r4, [r0, r1]
movs r6, 0x10
subs r4, 0x8
cmp r4, 0
bge _080533BE
adds r4, 0x14
_080533BE:
movs r0, 0
bl sub_80073B8
mov r8, r5
movs r7, 0x7
_080533C8:
lsls r0, r4, 6
ldr r2, _0805342C
adds r0, r2
mov r2, r8
ldr r1, [r2]
adds r5, r1, r0
ldrb r0, [r5]
cmp r0, 0
beq _08053402
ldrb r0, [r5, 0x1]
cmp r0, 0
beq _080533F0
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0
adds r2, r6, 0
movs r3, 0xE0
bl sub_80078A4
_080533F0:
adds r1, r6, 0x3
adds r2, r5, 0x3
movs r0, 0xD
str r0, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
adds r6, 0xE
_08053402:
adds r4, 0x1
cmp r4, 0x13
ble _0805340A
movs r4, 0
_0805340A:
subs r7, 0x1
cmp r7, 0
bge _080533C8
movs r0, 0
bl sub_80073E0
movs r0, 0
bl sub_8007334
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08053428: .4byte gUnknown_203B418
_0805342C: .4byte 0x0001c070
thumb_func_end sub_80533A4
thumb_func_start sub_8053430
sub_8053430:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
ldr r3, _08053454
ldr r0, [r3]
movs r2, 0x16
ldrsh r1, [r0, r2]
ldr r2, _08053458
ldr r0, [r2]
adds r1, r0
movs r6, 0x2
subs r1, 0x9
cmp r1, 0
bge _0805345E
_0805344C:
adds r1, 0x14
cmp r1, 0
blt _0805344C
b _0805345E
.align 2, 0
_08053454: .4byte gUnknown_203B418
_08053458: .4byte gUnknown_202F1F8
_0805345C:
subs r1, 0x14
_0805345E:
cmp r1, 0x13
bgt _0805345C
ldr r0, [r3]
lsls r1, 6
adds r0, r1
ldr r3, _0805349C
adds r0, r3
ldrb r0, [r0]
adds r4, r1, 0
cmp r0, 0
beq _08053498
ldr r1, [r2]
movs r0, 0xC
negs r0, r0
cmp r1, r0
ble _08053498
ldr r2, _080534A0
ldrb r0, [r2]
movs r1, 0x1
orrs r0, r1
strb r0, [r2]
ldr r0, _080534A4
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _080534A8
cmp r5, 0x1
beq _080534A8
_08053498:
movs r0, 0
b _08053528
.align 2, 0
_0805349C: .4byte 0x0001c070
_080534A0: .4byte gUnknown_202F1FC
_080534A4: .4byte gUnknown_20255F0
_080534A8:
movs r0, 0
bl sub_8083CE0
movs r0, 0
bl sub_80073B8
ldr r0, _08053530
ldr r2, _08053534
adds r1, r4, r2
ldr r0, [r0]
adds r4, r0, r1
ldrb r0, [r4]
cmp r0, 0
beq _080534FA
movs r0, 0x10
str r0, [sp]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0xD0
bl sub_80087EC
ldrb r0, [r4, 0x1]
cmp r0, 0
beq _080534EA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0
adds r2, r6, 0
movs r3, 0xE0
bl sub_80078A4
_080534EA:
adds r1, r6, 0x3
adds r2, r4, 0x3
movs r0, 0xD
str r0, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
_080534FA:
movs r0, 0
bl sub_80073E0
movs r0, 0xD
bl sub_803E46C
ldr r5, _08053538
movs r4, 0x6
_0805350A:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0xD
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0805350A
ldr r1, _0805353C
ldr r0, [r1]
subs r0, 0x1
str r0, [r1]
movs r0, 0x1
_08053528:
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08053530: .4byte gUnknown_203B418
_08053534: .4byte 0x0001c070
_08053538: .4byte gUnknown_203B084
_0805353C: .4byte gUnknown_202F1F8
thumb_func_end sub_8053430
thumb_func_start sub_8053540
sub_8053540:
push {r4,r5,lr}
sub sp, 0x4
adds r3, r0, 0
ldr r0, _08053564
ldr r0, [r0]
movs r1, 0x16
ldrsh r2, [r0, r1]
ldr r1, _08053568
ldr r0, [r1]
adds r4, r2, r0
movs r5, 0x80
cmp r4, 0
bge _0805356E
_0805355A:
adds r4, 0x14
cmp r4, 0
blt _0805355A
b _0805356E
.align 2, 0
_08053564: .4byte gUnknown_203B418
_08053568: .4byte gUnknown_202F1F8
_0805356C:
subs r4, 0x14
_0805356E:
cmp r4, 0x13
bgt _0805356C
ldr r0, [r1]
cmp r0, 0
bge _08053592
ldr r2, _08053598
ldrb r0, [r2]
movs r1, 0x2
orrs r0, r1
strb r0, [r2]
ldr r0, _0805359C
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _080535A0
cmp r3, 0x2
beq _080535A0
_08053592:
movs r0, 0
b _08053622
.align 2, 0
_08053598: .4byte gUnknown_202F1FC
_0805359C: .4byte gUnknown_20255F0
_080535A0:
movs r0, 0
bl sub_8083CE0
movs r0, 0
bl sub_80073B8
ldr r1, _0805362C
lsls r0, r4, 6
ldr r2, _08053630
adds r0, r2
ldr r1, [r1]
adds r4, r1, r0
ldrb r0, [r4]
cmp r0, 0
beq _080535F4
movs r0, 0x10
str r0, [sp]
movs r0, 0
movs r1, 0
adds r2, r5, 0
movs r3, 0x68
bl sub_80087EC
ldrb r0, [r4, 0x1]
cmp r0, 0
beq _080535E4
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0
adds r2, r5, 0
movs r3, 0xE0
bl sub_80078A4
_080535E4:
adds r1, r5, 0x3
adds r2, r4, 0x3
movs r0, 0xD
str r0, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
_080535F4:
movs r0, 0
bl sub_80073E0
movs r0, 0xD
bl sub_803E46C
ldr r5, _08053634
movs r4, 0x6
_08053604:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0xD
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08053604
ldr r1, _08053638
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
movs r0, 0x1
_08053622:
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805362C: .4byte gUnknown_203B418
_08053630: .4byte 0x0001c070
_08053634: .4byte gUnknown_203B080
_08053638: .4byte gUnknown_202F1F8
thumb_func_end sub_8053540
thumb_func_start sub_805363C
sub_805363C:
push {r4-r7,lr}
mov r12, r1
lsls r0, 24
lsrs r2, r0, 24
ldr r7, _080536D0
ldr r0, _080536D4
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _080536C8
ldr r0, _080536D8
ldrh r1, [r0]
ldr r3, _080536DC
ands r3, r1
ldr r1, _080536E0
ands r3, r1
ldr r1, _080536E4
ands r3, r1
ldr r1, _080536E8
ands r3, r1
ldr r1, _080536EC
ands r3, r1
negs r1, r2
orrs r1, r2
asrs r1, 31
movs r2, 0x80
lsls r2, 6
ands r2, r1
ldrh r1, [r0, 0x2]
ldr r4, _080536F0
ands r4, r1
orrs r4, r2
movs r5, 0xF
ldr r2, _080536F4
movs r6, 0x2
ldrsh r1, [r7, r6]
lsls r1, 3
add r1, r12
ands r1, r2
lsls r1, 4
ldrh r2, [r0, 0x6]
ands r5, r2
orrs r5, r1
strh r5, [r0, 0x6]
movs r2, 0
ldrsh r1, [r7, r2]
lsls r1, 3
adds r1, 0x5C
ldr r2, _080536F8
ands r1, r2
movs r2, 0xFE
lsls r2, 8
ands r4, r2
orrs r4, r1
movs r2, 0x80
lsls r2, 7
ldr r1, _080536FC
ands r3, r1
orrs r3, r2
strh r3, [r0]
ands r4, r1
strh r4, [r0, 0x2]
ldr r1, _08053700
strh r1, [r0, 0x4]
movs r1, 0x7F
movs r2, 0
movs r3, 0
bl AddSprite
_080536C8:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080536D0: .4byte gUnknown_2027370
_080536D4: .4byte gUnknown_202EDCC
_080536D8: .4byte gUnknown_202F200
_080536DC: .4byte 0x0000feff
_080536E0: .4byte 0x0000fdff
_080536E4: .4byte 0x0000f3ff
_080536E8: .4byte 0x0000efff
_080536EC: .4byte 0x0000dfff
_080536F0: .4byte 0x0000c1ff
_080536F4: .4byte 0x00000fff
_080536F8: .4byte 0x000001ff
_080536FC: .4byte 0x00003fff
_08053700: .4byte 0x0000f3f0
thumb_func_end sub_805363C
thumb_func_start sub_8053704
sub_8053704:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x48
str r0, [sp, 0x10]
adds r7, r1, 0
mov r8, r2
mov r9, r3
movs r0, 0
str r0, [sp, 0x14]
ldrh r1, [r2, 0x2]
str r1, [sp, 0x18]
bl _08055570
_08053724:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08053734
bl _0805556A
_08053734:
str r7, [sp, 0x1C]
ldr r2, [r5, 0x70]
str r2, [sp, 0x24]
movs r3, 0xAD
lsls r3, 1
adds r0, r2, r3
add r1, sp, 0x20
ldrb r1, [r1]
strb r1, [r0]
ldr r0, [sp, 0x18]
bl sub_8092CD8
lsls r0, 24
cmp r0, 0
beq _080537B4
ldr r6, _080537A4
ldr r0, [r6]
ldr r2, _080537A8
adds r0, r2
ldr r4, [r0]
cmp r4, 0
beq _080537B4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
beq _0805376C
b _08053A1C
_0805376C:
cmp r4, r7
bne _08053772
b _08053A1C
_08053772:
ldr r1, [r4, 0x70]
adds r1, 0x98
ldr r0, [r6]
ldr r3, _080537AC
adds r0, r3
ldr r1, [r1]
ldr r0, [r0]
cmp r1, r0
beq _08053786
b _08053A1C
_08053786:
ldr r0, [sp, 0x24]
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0
beq _08053792
b _08053A1C
_08053792:
ldr r0, _080537B0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r5, r4, 0
b _08053A1C
.align 2, 0
_080537A4: .4byte gUnknown_203B418
_080537A8: .4byte 0x00017b30
_080537AC: .4byte 0x00017b3c
_080537B0: .4byte gUnknown_80FCD28
_080537B4:
adds r0, r7, 0
mov r1, r8
bl sub_8071A1C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x5
bne _08053854
ldr r2, _08053844
ldr r0, [r2]
ldr r1, _08053848
adds r0, r1
ldr r0, [r0]
cmp r0, 0
beq _08053854
adds r4, r0, 0
str r2, [sp, 0x44]
bl sub_80450F8
ldr r2, [sp, 0x44]
cmp r0, 0x1
beq _080537E2
b _08053A1C
_080537E2:
ldr r6, [r4, 0x70]
adds r1, r6, 0
adds r1, 0x98
ldr r0, [r2]
ldr r2, _0805384C
adds r0, r2
ldr r1, [r1]
ldr r0, [r0]
cmp r1, r0
beq _080537F8
b _08053A1C
_080537F8:
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0805380E
b _08053A1C
_0805380E:
ldr r0, [sp, 0x24]
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0
bne _08053822
adds r0, r6, 0
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0
beq _08053828
_08053822:
cmp r5, r4
beq _08053828
b _08053A1C
_08053828:
adds r0, r4, 0
bl sub_8042930
ldr r0, _08053850
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r5, r4, 0
movs r3, 0x1
str r3, [sp, 0x2C]
b _08053A1C
.align 2, 0
_08053844: .4byte gUnknown_203B418
_08053848: .4byte 0x00017b2c
_0805384C: .4byte 0x00017b38
_08053850: .4byte gUnknown_80FCD0C
_08053854:
adds r0, r5, 0
movs r1, 0x2C
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08053864
b _08053A1C
_08053864:
adds r0, r5, 0
movs r1, 0
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _08053874
b _08053A1C
_08053874:
adds r0, r7, 0
mov r1, r8
movs r2, 0
bl sub_807CD64
movs r1, 0xF0
ands r1, r0
cmp r1, 0
beq _08053888
b _08053A1C
_08053888:
ldr r1, [sp, 0x24]
movs r2, 0x9E
lsls r2, 1
adds r0, r1, r2
ldr r0, [r0]
bl sub_8094450
ldr r1, _080538C4
movs r3, 0
ldrsh r1, [r1, r3]
cmp r0, r1
bge _080538A2
b _08053A1C
_080538A2:
ldr r0, [sp, 0x24]
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0
beq _080538AE
b _08053A1C
_080538AE:
ldr r0, [sp, 0x24]
adds r0, 0x46
ldrb r4, [r0]
mov r10, r4
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _080538CC
ldr r0, _080538C8
b _080539FA
.align 2, 0
_080538C4: .4byte gUnknown_80F5006
_080538C8: .4byte gUnknown_80FDD88
_080538CC:
movs r0, 0
str r0, [sp, 0x34]
movs r2, 0x9E
lsls r2, 1
ldr r1, [sp, 0x24]
adds r2, r1, r2
str r2, [sp, 0x3C]
_080538DA:
movs r3, 0x1
add r10, r3
movs r0, 0x7
mov r1, r10
ands r1, r0
mov r10, r1
movs r2, 0x4
ldrsh r0, [r5, r2]
ldr r1, _080539B4
mov r3, r10
lsls r2, r3, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r0, [r0, 0x10]
str r0, [sp, 0x38]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080539DC
ldr r0, [sp, 0x38]
bl sub_80450F8
cmp r0, 0x1
bne _080539DC
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
mov r1, sp
adds r1, 0xC
str r1, [sp, 0x40]
cmp r0, 0
beq _0805397C
movs r6, 0x17
_08053932:
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
movs r0, 0x2
movs r1, 0x43
bl sub_803E708
adds r4, 0x1
movs r2, 0x7
ands r4, r2
subs r6, 0x1
cmp r6, 0
bge _08053932
cmp r4, r10
beq _0805396C
movs r6, 0x7
_08053954:
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
movs r0, 0x2
movs r1, 0x43
bl sub_803E708
adds r4, 0x1
ands r4, r6
cmp r4, r10
bne _08053954
_0805396C:
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
movs r0, 0x2
movs r1, 0x43
bl sub_803E708
_0805397C:
ldr r3, [sp, 0x3C]
ldr r4, [r3]
ldr r0, _080539B8
movs r2, 0
ldrsh r1, [r0, r2]
add r0, sp, 0x8
bl sub_80943A0
ldr r2, [sp, 0x8]
ldr r0, [sp, 0x40]
adds r1, r4, 0
bl sub_80942C0
ldr r0, [sp, 0xC]
ldr r3, [sp, 0x3C]
str r0, [r3]
mov r0, r8
ldrh r1, [r0, 0x2]
ldr r0, _080539BC
cmp r1, r0
bne _080539C4
ldr r0, _080539C0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080539D0
.align 2, 0
_080539B4: .4byte gUnknown_80F4448
_080539B8: .4byte gUnknown_80F5006
_080539BC: .4byte 0x00000163
_080539C0: .4byte gUnknown_80FDDA8
_080539C4:
ldr r0, _080539D8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080539D0:
str r5, [sp, 0x20]
ldr r5, [sp, 0x38]
b _080539E8
.align 2, 0
_080539D8: .4byte gUnknown_80FDD20
_080539DC:
ldr r1, [sp, 0x34]
adds r1, 0x1
str r1, [sp, 0x34]
cmp r1, 0x7
bgt _080539E8
b _080538DA
_080539E8:
ldr r2, [sp, 0x34]
cmp r2, 0x8
bne _08053A1C
mov r3, r8
ldrh r1, [r3, 0x2]
ldr r0, _08053A08
cmp r1, r0
bne _08053A10
ldr r0, _08053A0C
_080539FA:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08053A1C
.align 2, 0
_08053A08: .4byte 0x00000163
_08053A0C: .4byte gUnknown_80FDDAC
_08053A10:
ldr r0, _08053AD8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08053A1C:
ldr r1, _08053ADC
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
ldr r1, _08053AE0
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
ldr r0, [r5, 0x70]
str r0, [sp, 0x24]
movs r6, 0xAD
lsls r6, 1
adds r1, r0, r6
movs r0, 0
strb r0, [r1]
ldr r1, [sp, 0x24]
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08053A4C
movs r2, 0xB6
lsls r2, 1
adds r1, r2
ldr r0, [r7, 0x4]
str r0, [r1]
_08053A4C:
adds r0, r5, 0
bl sub_806A1E8
adds r0, r7, 0
adds r1, r5, 0
bl sub_807A96C
movs r4, 0
adds r0, r7, 0
mov r1, r8
bl sub_80570AC
lsls r0, 24
cmp r0, 0
bne _08053A7E
mov r3, r8
ldrh r1, [r3, 0x2]
adds r0, r7, 0
bl sub_805755C
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
_08053A7E:
ldr r0, [sp, 0x2C]
cmp r0, 0
beq _08053A86
b _08053BAE
_08053A86:
ldr r0, [sp, 0x24]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x5
bne _08053AE8
ldr r0, [sp, 0x18]
bl sub_8092CC0
lsls r0, 24
cmp r0, 0
beq _08053B5C
adds r0, r7, 0
adds r1, r5, 0
bl sub_8055988
lsls r0, 24
cmp r0, 0
beq _08053B5C
ldr r0, _08053AE4
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_8041B48
adds r0, r5, 0
adds r1, r7, 0
bl sub_80559DC
adds r5, r7, 0
ldr r1, [r7, 0x70]
str r1, [sp, 0x24]
adds r0, r1, r6
add r2, sp, 0x2C
ldrb r2, [r2]
strb r2, [r0]
movs r3, 0x1
str r3, [sp, 0x30]
b _08053B5C
.align 2, 0
_08053AD8: .4byte gUnknown_80FDD48
_08053ADC: .4byte gUnknown_202F208
_08053AE0: .4byte gUnknown_202F20C
_08053AE4: .4byte gUnknown_80FC52C
_08053AE8:
cmp r0, 0xB
bne _08053B5C
adds r0, r7, 0
mov r1, r8
movs r2, 0
bl sub_807CD64
lsls r0, 16
asrs r1, r0, 16
ldr r0, _08053C88
ldr r2, [sp, 0x18]
cmp r2, r0
beq _08053B5C
adds r0, 0x32
cmp r2, r0
beq _08053B5C
cmp r4, 0
bne _08053B5C
movs r0, 0xF
ands r0, r1
cmp r0, 0
beq _08053B20
cmp r0, 0x4
beq _08053B20
cmp r0, 0x5
beq _08053B20
cmp r0, 0x2
bne _08053B5C
_08053B20:
adds r0, r7, 0
adds r1, r5, 0
bl sub_8055988
lsls r0, 24
cmp r0, 0
beq _08053B5C
ldr r0, _08053C8C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_8041BA8
adds r0, r5, 0
adds r1, r7, 0
bl sub_80559DC
adds r5, r7, 0
ldr r3, [r7, 0x70]
str r3, [sp, 0x24]
movs r0, 0xAD
lsls r0, 1
adds r1, r3, r0
movs r0, 0
strb r0, [r1]
movs r1, 0x1
str r1, [sp, 0x30]
_08053B5C:
ldr r2, [sp, 0x2C]
cmp r2, 0
bne _08053BAE
ldr r0, [sp, 0x24]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x7
bne _08053BAE
adds r0, r7, 0
mov r1, r8
movs r2, 0
bl sub_807CD64
lsls r0, 16
movs r1, 0xF0
lsls r1, 12
ands r1, r0
asrs r1, 16
cmp r1, 0
beq _08053B90
cmp r1, 0x4
beq _08053B90
cmp r1, 0x5
beq _08053B90
cmp r1, 0x2
bne _08053BAE
_08053B90:
cmp r4, 0
bne _08053BAE
ldr r0, _08053C90
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08053C94
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
movs r3, 0
str r3, [sp, 0x28]
_08053BAE:
adds r0, r5, 0
mov r1, r8
bl sub_80571F0
lsls r0, 24
cmp r0, 0
beq _08053BC0
movs r0, 0
str r0, [sp, 0x28]
_08053BC0:
ldr r1, [sp, 0x28]
cmp r1, 0
beq _08053C4A
adds r0, r5, 0
movs r1, 0x3C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08053BFA
mov r0, r8
bl sub_8092D08
lsls r0, 24
cmp r0, 0
beq _08053BFA
ldr r0, _08053C90
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08053C98
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
movs r2, 0
str r2, [sp, 0x28]
_08053BFA:
ldr r3, [sp, 0x28]
cmp r3, 0
beq _08053C4A
movs r0, 0
ldr r1, [sp, 0x30]
cmp r1, 0
bne _08053C0A
movs r0, 0x1
_08053C0A:
adds r2, r0, 0
mov r3, r8
ldrh r1, [r3, 0x2]
cmp r1, 0x68
beq _08053C20
ldr r0, _08053C9C
cmp r1, r0
beq _08053C20
subs r0, 0x4
cmp r1, r0
bne _08053C22
_08053C20:
movs r2, 0
_08053C22:
str r2, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
movs r3, 0
bl sub_8056B34
lsls r0, 24
cmp r0, 0
bne _08053C3A
movs r0, 0
str r0, [sp, 0x28]
_08053C3A:
ldr r1, [sp, 0x28]
cmp r1, 0
beq _08053C4A
ldr r2, [sp, 0x2C]
cmp r2, 0
beq _08053C4A
movs r3, 0
str r3, [sp, 0x28]
_08053C4A:
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08053C6A
movs r0, 0x4
movs r1, 0x4A
bl sub_803E708
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
movs r3, 0
bl sub_8041168
_08053C6A:
ldr r0, [sp, 0x28]
cmp r0, 0
beq _08053C72
b _08053D72
_08053C72:
ldr r0, [r7, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _08053CA0
movs r1, 0xAB
lsls r1, 1
adds r0, r7, 0
bl sub_80421C0
b _08053CA8
.align 2, 0
_08053C88: .4byte 0x00000163
_08053C8C: .4byte gUnknown_80FC558
_08053C90: .4byte gUnknown_202DFE8
_08053C94: .4byte gUnknown_80FC574
_08053C98: .4byte gUnknown_8100524
_08053C9C: .4byte 0x00000131
_08053CA0:
ldr r1, _08053CC4
adds r0, r7, 0
bl sub_80421C0
_08053CA8:
ldr r0, _08053CC8
ldr r1, [r5, 0x70]
movs r2, 0
bl sub_80708B4
cmp r7, r5
bne _08053CD0
ldr r0, _08053CCC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r7, 0
bl sub_80522F4
b _08053D10
.align 2, 0
_08053CC4: .4byte 0x00000157
_08053CC8: .4byte gUnknown_202DFE8
_08053CCC: .4byte gUnknown_80F9380
_08053CD0:
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _08053CEC
ldr r0, _08053CE8
b _08053CF4
.align 2, 0
_08053CE8: .4byte gUnknown_80F9384
_08053CEC:
ldr r1, [sp, 0x2C]
cmp r1, 0
beq _08053D04
ldr r0, _08053D00
_08053CF4:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08053D10
.align 2, 0
_08053D00: .4byte gUnknown_80F93A4
_08053D04:
ldr r0, _08053D48
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08053D10:
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08053D2A
ldr r0, _08053D4C
movs r3, 0x1
negs r3, r3
adds r1, r5, 0
movs r2, 0x1
bl sub_803ED30
_08053D2A:
ldr r2, [sp, 0x18]
cmp r2, 0xCC
beq _08053D50
cmp r2, 0xCE
bne _08053D60
movs r0, 0x1
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059FC8
b _08053D60
.align 2, 0
_08053D48: .4byte gUnknown_80F9364
_08053D4C: .4byte 0x0000270f
_08053D50:
movs r0, 0x1
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059E54
_08053D60:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08053D6E
bl _080555A2
_08053D6E:
bl _08055568
_08053D72:
ldr r0, [sp, 0x24]
adds r0, 0xFB
ldrb r3, [r0]
mov r10, r3
ldr r2, [sp, 0x24]
ldrb r1, [r2, 0x6]
adds r6, r0, 0
cmp r1, 0
beq _08053DA8
mov r3, r8
ldrh r1, [r3, 0x2]
ldr r0, _08053E88
cmp r1, r0
beq _08053D9E
mov r0, r9
cmp r0, 0
bne _08053D9E
mov r1, r10
cmp r1, 0
bne _08053D9E
movs r0, 0x1
strb r0, [r6]
_08053D9E:
ldr r2, [sp, 0x68]
cmp r2, 0x1
bne _08053DA8
movs r0, 0x2
strb r0, [r6]
_08053DA8:
ldr r3, [sp, 0x24]
movs r0, 0xB2
lsls r0, 1
adds r4, r3, r0
ldrb r0, [r4]
cmp r0, 0xFF
bne _08053DCE
adds r0, r5, 0
movs r1, 0xE3
bl sub_80717A4
lsls r0, 24
cmp r0, 0
beq _08053DCE
adds r0, r5, 0x4
adds r1, r7, 0x4
bl sub_80983D8
strb r0, [r4]
_08053DCE:
ldr r1, [sp, 0x24]
ldr r2, _08053E8C
adds r4, r1, r2
ldrb r0, [r4]
cmp r0, 0xFF
bne _08053DF2
adds r0, r5, 0
movs r1, 0x19
bl sub_80717A4
lsls r0, 24
cmp r0, 0
beq _08053DF2
adds r0, r5, 0x4
adds r1, r7, 0x4
bl sub_80983D8
strb r0, [r4]
_08053DF2:
adds r0, r5, 0
movs r1, 0x39
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08053E4A
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08053E4A
mov r3, r8
ldrh r1, [r3, 0x2]
ldr r0, _08053E88
cmp r1, r0
beq _08053E4A
subs r0, 0x3
cmp r1, r0
beq _08053E4A
mov r0, r9
cmp r0, 0
bne _08053E4A
ldrb r0, [r3, 0x4]
cmp r0, 0
beq _08053E4A
ldrb r1, [r3, 0x1]
movs r4, 0x10
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08053E42
adds r0, r7, 0
bl sub_8042950
_08053E42:
mov r1, r8
ldrb r0, [r1, 0x1]
orrs r0, r4
strb r0, [r1, 0x1]
_08053E4A:
adds r0, r7, 0
mov r1, r8
movs r2, 0
bl sub_807CD64
movs r1, 0xF
ands r1, r0
cmp r1, 0
bne _08053E64
adds r0, r7, 0
adds r1, r5, 0
bl sub_806F450
_08053E64:
ldr r2, [sp, 0x24]
movs r3, 0xAC
lsls r3, 1
adds r0, r2, r3
movs r1, 0x1
strb r1, [r0]
movs r0, 0xCE
lsls r0, 1
ldr r1, [sp, 0x18]
cmp r1, r0
bls _08053E7E
bl _080554C0
_08053E7E:
lsls r0, r1, 2
ldr r1, _08053E90
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08053E88: .4byte 0x00000163
_08053E8C: .4byte 0x00000165
_08053E90: .4byte _08053E94
.align 2, 0
_08053E94:
.4byte _08054520
.4byte _08054DB8
.4byte _08054C18
.4byte _08054888
.4byte _08054878
.4byte _08054D80
.4byte _08054D8E
.4byte _08054FB0
.4byte _08054FE8
.4byte _08054508
.4byte _08054FF6
.4byte _08055270
.4byte _08055190
.4byte _080548C8
.4byte _080552B6
.4byte _08054E1A
.4byte _0805527E
.4byte _080551F2
.4byte _08054508
.4byte _080549C8
.4byte _08054EEC
.4byte _08054968
.4byte _08054EDE
.4byte _0805528C
.4byte _08054B18
.4byte _08055422
.4byte _08054E1A
.4byte _08054AB8
.4byte _08054508
.4byte _0805529A
.4byte _080547A8
.4byte _08055200
.4byte _0805460A
.4byte _08054948
.4byte _08054878
.4byte _0805519E
.4byte _080545AE
.4byte _0805514A
.4byte _08054CD4
.4byte _08054508
.4byte _08055396
.4byte _08054EB4
.4byte _08054A68
.4byte _08054C28
.4byte _08054A58
.4byte _08054E8A
.4byte _080547A8
.4byte _08054DD4
.4byte _080553DC
.4byte _0805504A
.4byte _080554A0
.4byte _08054CD4
.4byte _0805455E
.4byte _0805456E
.4byte _080552D2
.4byte _080549B8
.4byte _08055004
.4byte _0805453E
.4byte _08054F94
.4byte _08054818
.4byte _08054D56
.4byte _08054CE2
.4byte _080547B8
.4byte _08054788
.4byte _08054868
.4byte _08054868
.4byte _08054F16
.4byte _08055112
.4byte _080545AE
.4byte _080545FA
.4byte _08054F94
.4byte _080546D8
.4byte _08054F86
.4byte _08054928
.4byte _0805459E
.4byte _08054D64
.4byte _08054AD8
.4byte _080550DA
.4byte _08054E52
.4byte _08054878
.4byte _08054AD8
.4byte _080545AE
.4byte _080546E8
.4byte _08054ED0
.4byte _08054878
.4byte _080550CC
.4byte _0805462A
.4byte _080545AE
.4byte _08054E28
.4byte _0805462A
.4byte _080545AE
.4byte _08054B78
.4byte _08055120
.4byte _080546E8
.4byte _08054C48
.4byte _08054CC6
.4byte _080551D6
.4byte _08054928
.4byte _08054FA2
.4byte _08054A38
.4byte _08054B58
.4byte _0805457E
.4byte _08055090
.4byte _080547E8
.4byte _08055238
.4byte _08054C18
.4byte _08054A88
.4byte _080546F8
.4byte _08054DF0
.4byte _0805464A
.4byte _08054A78
.4byte _08054878
.4byte _08054B98
.4byte _0805512E
.4byte _080546F8
.4byte _08055414
.4byte _08054AF8
.4byte _08054C78
.4byte _0805452E
.4byte _0805536C
.4byte _08054768
.4byte _080550DA
.4byte _08054DC6
.4byte _080550E8
.4byte _08054858
.4byte _080545FA
.4byte _08054508
.4byte _080547B8
.4byte _08055104
.4byte _08054898
.4byte _08054BF8
.4byte _080545CA
.4byte _08054508
.4byte _08054778
.4byte _08054BE8
.4byte _08054B08
.4byte _08054508
.4byte _080553B2
.4byte _08055388
.4byte _08054798
.4byte _08054AE8
.4byte _08054BD8
.4byte _08054EA6
.4byte _080545FA
.4byte _08054768
.4byte _08054508
.4byte _08054EA6
.4byte _08054738
.4byte _080549F8
.4byte _08054748
.4byte _080545DA
.4byte _08054B48
.4byte _08054838
.4byte _08054FBE
.4byte _08054508
.4byte _080550F6
.4byte _08054FDA
.4byte _0805456E
.4byte _08054508
.4byte _08054A48
.4byte _08055166
.4byte _08054508
.4byte _080546C8
.4byte _08054508
.4byte _08054B38
.4byte _08054C38
.4byte _08054508
.4byte _08054508
.4byte _08054508
.4byte _08054988
.4byte _08054AC8
.4byte _080548C8
.4byte _080550BE
.4byte _08054C58
.4byte _08054508
.4byte _08054508
.4byte _08054508
.4byte _080548B8
.4byte _08054508
.4byte _08054508
.4byte _08054508
.4byte _080549D8
.4byte _08054508
.4byte _080553C0
.4byte _08055468
.4byte _08055246
.4byte _08054A28
.4byte _08054F5C
.4byte _08054758
.4byte _08054508
.4byte _08054508
.4byte _080548C8
.4byte _080548E8
.4byte _08054908
.4byte _080548A8
.4byte _080549B8
.4byte _080548D8
.4byte _08054EC2
.4byte _08054BA8
.4byte _080548D8
.4byte _0805463A
.4byte _08054508
.4byte _08054A28
.4byte _08054AF8
.4byte _0805509E
.4byte _08054FCC
.4byte _08054D28
.4byte _080547D8
.4byte _08054508
.4byte _08054C98
.4byte _08054B28
.4byte _08054508
.4byte _08054DAA
.4byte _08054E98
.4byte _08054CB8
.4byte _08054A08
.4byte _08054AC8
.4byte _08054A98
.4byte _08054C78
.4byte _0805461A
.4byte _080553A4
.4byte _08054788
.4byte _08054508
.4byte _0805520E
.4byte _08054DC6
.4byte _08054E7C
.4byte _08054828
.4byte _08054D0C
.4byte _0805521C
.4byte _08055066
.4byte _0805456E
.4byte _08054878
.4byte _08054C68
.4byte _08054DE2
.4byte _080546F8
.4byte _08054768
.4byte _08055182
.4byte _08054D1A
.4byte _0805458E
.4byte _0805458E
.4byte _08054508
.4byte _08054508
.4byte _0805458E
.4byte _08054918
.4byte _0805469C
.4byte _08055174
.4byte _08054938
.4byte _080545DA
.4byte _08054508
.4byte _08055012
.4byte _08054508
.4byte _080545AE
.4byte _08054F24
.4byte _08054B78
.4byte _080552E0
.4byte _080546D8
.4byte _08055074
.4byte _08055254
.4byte _08054A28
.4byte _08054C08
.4byte _08054508
.4byte _08054778
.4byte _0805456E
.4byte _0805535E
.4byte _080547C8
.4byte _080549A8
.4byte _08055326
.4byte _08054AA8
.4byte _08054958
.4byte _0805530A
.4byte _0805457E
.4byte _08054788
.4byte _08054D3A
.4byte _08054EA6
.4byte _080548C8
.4byte _08054728
.4byte _080547F8
.4byte _08054BB8
.4byte _0805513C
.4byte _0805463A
.4byte _0805463A
.4byte _080548F8
.4byte _080552A8
.4byte _080546B8
.4byte _08054958
.4byte _08054508
.4byte _080553F8
.4byte _08054CB8
.4byte _08054978
.4byte _08054778
.4byte _08054508
.4byte _080545FA
.4byte _0805456E
.4byte _080551C8
.4byte _08054B88
.4byte _08054E0C
.4byte _08054E60
.4byte _08054508
.4byte _08054D72
.4byte _08054928
.4byte _08054508
.4byte _080550B0
.4byte _08054A18
.4byte _08054788
.4byte _08055090
.4byte _080550B0
.4byte _08054508
.4byte _08054DAA
.4byte _08054508
.4byte _08054708
.4byte _080547C8
.4byte _08054508
.4byte _08054508
.4byte _080551E4
.4byte _08054EFA
.4byte _080552D2
.4byte _080551BA
.4byte _08055074
.4byte _08054C38
.4byte _080549E8
.4byte _08054AD8
.4byte _08054508
.4byte _08054508
.4byte _08054508
.4byte _08054D48
.4byte _08054680
.4byte _08054808
.4byte _08055492
.4byte _08055406
.4byte _08054DFE
.4byte _0805544C
.4byte _08054F32
.4byte _08054664
.4byte _080549B8
.4byte _080553EA
.4byte _08054718
.4byte _080545AE
.4byte _08055430
.4byte _08054BC8
.4byte _08054E1A
.4byte _08054CE2
.4byte _08054848
.4byte _08054768
.4byte _08054998
.4byte _0805457E
.4byte _0805457E
.4byte _08054508
.4byte _08054508
.4byte _08054E6E
.4byte _08054FA2
.4byte _08054508
.4byte _08054A88
.4byte _0805454E
.4byte _08054508
.4byte _08054AF8
.4byte _08054512
.4byte _080554C0
.4byte _08054CF0
.4byte _080554C0
.4byte _080554C0
.4byte _08054508
.4byte _0805529A
.4byte _08054508
.4byte _08055158
.4byte _08054CA8
.4byte _08055318
.4byte _08054508
.4byte _08054F24
.4byte _08054958
.4byte _08054F5C
.4byte _080552EE
.4byte _08054B68
.4byte _08054CC6
.4byte _08054F40
.4byte _08055058
.4byte _080552FC
.4byte _08055476
.4byte _08055484
.4byte _080553CE
.4byte _08055326
.4byte _08055090
.4byte _08054E44
.4byte _080548C8
.4byte _08054F08
.4byte _0805543E
.4byte _08055350
.4byte _08054C88
.4byte _08054E36
.4byte _08054F6A
.4byte _08055020
.4byte _08055334
.4byte _080551AC
.4byte _080545EA
.4byte _0805545A
.4byte _08054D9C
.4byte _08055342
.4byte _08055082
.4byte _080554AE
.4byte _08055262
.4byte _0805522A
.4byte _08054F4E
.4byte _08054CFE
.4byte _080554C0
.4byte _0805537A
.4byte _080554C0
.4byte _080554C0
.4byte _080554A0
.4byte _080552C4
.4byte _080554C0
.4byte _08054F78
.4byte _0805502E
.4byte _080554C0
.4byte _0805503C
_08054508:
movs r3, 0x80
lsls r3, 1
mov r2, r9
str r2, [sp]
b _080545B6
_08054512:
mov r3, r9
str r3, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
movs r3, 0x80
b _080545BC
_08054520:
mov r0, r9
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
movs r3, 0
b _080545BC
_0805452E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058F04
bl _080554BA
_0805453E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058270
bl _080554BA
_0805454E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B968
bl _080554BA
_0805455E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805816C
bl _080554BA
_0805456E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80581D0
bl _080554BA
_0805457E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058B3C
bl _080554BA
_0805458E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A568
bl _080554BA
_0805459E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057E1C
bl _080554BA
_080545AE:
movs r3, 0x80
lsls r3, 1
mov r1, r9
str r1, [sp]
_080545B6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
_080545BC:
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
bl _080554C2
_080545CA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80590D4
bl _080554BA
_080545DA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80595EC
bl _080554BA
_080545EA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C138
bl _080554BA
_080545FA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B17C
bl _080554BA
_0805460A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057D20
bl _080554BA
_0805461A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A2E8
bl _080554BA
_0805462A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805889C
bl _080554BA
_0805463A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059E0C
bl _080554BA
_0805464A:
ldr r0, _08054660
ldr r3, [r0]
mov r2, r9
str r2, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_8058C98
bl _080554BA
.align 2, 0
_08054660: .4byte gUnknown_8106A50
_08054664:
ldr r0, _0805467C
ldr r3, [r0]
mov r0, r9
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_8058C98
bl _080554BA
.align 2, 0
_0805467C: .4byte gUnknown_8106A4C
_08054680:
ldr r0, _08054698
ldr r3, [r0]
mov r1, r9
str r1, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_805B3FC
bl _080554BA
.align 2, 0
_08054698: .4byte gUnknown_8106A4C
_0805469C:
ldr r0, _080546B4
ldr r3, [r0]
mov r2, r9
str r2, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_805A5E8
bl _080554BA
.align 2, 0
_080546B4: .4byte gUnknown_8106A4C
_080546B8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B074
bl _080554BA
_080546C8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059928
bl _080554BA
_080546D8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058580
bl _080554BA
_080546E8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058930
bl _080554BA
_080546F8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058C00
bl _080554BA
_08054708:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B324
bl _080554BA
_08054718:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B910
bl _080554BA
_08054728:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AE74
bl _080554BA
_08054738:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059540
bl _080554BA
_08054748:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80595A0
bl _080554BA
_08054758:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059D00
bl _080554BA
_08054768:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058FBC
bl _080554BA
_08054778:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059190
bl _080554BA
_08054788:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058430
bl _080554BA
_08054798:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059424
bl _080554BA
_080547A8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057C88
bl _080554BA
_080547B8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80583D8
bl _080554BA
_080547C8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AC90
bl _080554BA
_080547D8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A0A8
bl _080554BA
_080547E8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058B84
bl _080554BA
_080547F8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AECC
bl _080554BA
_08054808:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B454
bl _080554BA
_08054818:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80582C4
bl _080554BA
_08054828:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A408
bl _080554BA
_08054838:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059714
bl _080554BA
_08054848:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B808
bl _080554BA
_08054858:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059050
bl _080554BA
_08054868:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058478
bl _080554BA
_08054878:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80576F8
bl _080554BA
_08054888:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80576D0
bl _080554BA
_08054898:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059080
bl _080554BA
_080548A8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059D98
bl _080554BA
_080548B8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059AF8
bl _080554BA
_080548C8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059AA8
bl _080554BA
_080548D8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059DA4
bl _080554BA
_080548E8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059D48
bl _080554BA
_080548F8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B028
bl _080554BA
_08054908:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059D58
bl _080554BA
_08054918:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A588
bl _080554BA
_08054928:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058638
bl _080554BA
_08054938:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A688
bl _080554BA
_08054948:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057D7C
bl _080554BA
_08054958:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B0BC
bl _080554BA
_08054968:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057A0C
bl _080554BA
_08054978:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B164
bl _080554BA
_08054988:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059A18
bl _080554BA
_08054998:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B884
bl _080554BA
_080549A8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805ACD8
bl _080554BA
_080549B8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80582D4
bl _080554BA
_080549C8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057954
bl _080554BA
_080549D8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059B94
bl _080554BA
_080549E8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B3B4
bl _080554BA
_080549F8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059588
bl _080554BA
_08054A08:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A2B0
bl _080554BA
_08054A18:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B2FC
bl _080554BA
_08054A28:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059CD8
bl _080554BA
_08054A38:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058A7C
bl _080554BA
_08054A48:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80598CC
bl _080554BA
_08054A58:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057F7C
bl _080554BA
_08054A68:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057ED0
bl _080554BA
_08054A78:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058CEC
bl _080554BA
_08054A88:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058BF0
bl _080554BA
_08054A98:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A2C8
bl _080554BA
_08054AA8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AD34
bl _080554BA
_08054AB8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057C68
bl _080554BA
_08054AC8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059A2C
bl _080554BA
_08054AD8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80586DC
bl _080554BA
_08054AE8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805946C
bl _080554BA
_08054AF8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058E5C
bl _080554BA
_08054B08:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80591E4
bl _080554BA
_08054B18:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057BC4
bl _080554BA
_08054B28:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A210
bl _080554BA
_08054B38:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059988
bl _080554BA
_08054B48:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805968C
bl _080554BA
_08054B58:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058AAC
bl _080554BA
_08054B68:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BE90
bl _080554BA
_08054B78:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80588B8
bl _080554BA
_08054B88:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B214
bl _080554BA
_08054B98:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058D38
bl _080554BA
_08054BA8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059DC4
bl _080554BA
_08054BB8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AF30
bl _080554BA
_08054BC8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B7FC
bl _080554BA
_08054BD8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80594E0
bl _080554BA
_08054BE8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80591D8
bl _080554BA
_08054BF8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80590C8
bl _080554BA
_08054C08:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AB48
bl _080554BA
_08054C18:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805768C
bl _080554BA
_08054C28:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057F24
bl _080554BA
_08054C38:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80599EC
bl _080554BA
_08054C48:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80589D4
bl _080554BA
_08054C58:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059AC4
bl _080554BA
_08054C68:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A4D4
bl _080554BA
_08054C78:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058EE0
bl _080554BA
_08054C88:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BD70
bl _080554BA
_08054C98:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A120
bl _080554BA
_08054CA8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BA50
bl _080554BA
_08054CB8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A2A0
b _080554BA
_08054CC6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058A08
b _080554BA
_08054CD4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805815C
b _080554BA
_08054CE2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805834C
b _080554BA
_08054CF0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805836C
b _080554BA
_08054CFE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C3DC
b _080554BA
_08054D0C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A450
b _080554BA
_08054D1A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A55C
b _080554BA
_08054D28:
movs r0, 0
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059FC8
b _080554BA
_08054D3A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AE3C
b _080554BA
_08054D48:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B3E0
b _080554BA
_08054D56:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80582EC
b _080554BA
_08054D64:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805867C
b _080554BA
_08054D72:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B2E4
b _080554BA
_08054D80:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057720
b _080554BA
_08054D8E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057748
b _080554BA
_08054D9C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C1BC
b _080554BA
_08054DAA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A23C
b _080554BA
_08054DB8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057634
b _080554BA
_08054DC6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A3DC
b _080554BA
_08054DD4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057FF4
b _080554BA
_08054DE2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A4FC
b _080554BA
_08054DF0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058C48
b _080554BA
_08054DFE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B5F4
b _080554BA
_08054E0C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B220
b _080554BA
_08054E1A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80578EC
b _080554BA
_08054E28:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80588A8
b _080554BA
_08054E36:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BD7C
b _080554BA
_08054E44:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BC70
b _080554BA
_08054E52:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80587E8
b _080554BA
_08054E60:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B264
b _080554BA
_08054E6E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B8B0
b _080554BA
_08054E7C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A3FC
b _080554BA
_08054E8A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057FCC
b _080554BA
_08054E98:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A258
b _080554BA
_08054EA6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059528
b _080554BA
_08054EB4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057E6C
b _080554BA
_08054EC2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059DB4
b _080554BA
_08054ED0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058838
b _080554BA
_08054EDE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057A98
b _080554BA
_08054EEC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057974
b _080554BA
_08054EFA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B388
b _080554BA
_08054F08:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BC98
b _080554BA
_08054F16:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80584C0
b _080554BA
_08054F24:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BB74
b _080554BA
_08054F32:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B668
b _080554BA
_08054F40:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BEA0
b _080554BA
_08054F4E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C2AC
b _080554BA
_08054F5C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059CF0
b _080554BA
_08054F6A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BF34
b _080554BA
_08054F78:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C474
b _080554BA
_08054F86:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80585CC
b _080554BA
_08054F94:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80582AC
b _080554BA
_08054FA2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058A54
b _080554BA
_08054FB0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805777C
b _080554BA
_08054FBE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059790
b _080554BA
_08054FCC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059F38
b _080554BA
_08054FDA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805983C
b _080554BA
_08054FE8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057788
b _080554BA
_08054FF6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057824
b _080554BA
_08055004:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805825C
b _080554BA
_08055012:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A6C8
b _080554BA
_08055020:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BF40
b _080554BA
_0805502E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C480
b _080554BA
_0805503C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C48C
b _080554BA
_0805504A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805810C
b _080554BA
_08055058:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BEAC
b _080554BA
_08055066:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A4C0
b _080554BA
_08055074:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AAD0
b _080554BA
_08055082:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C1F8
b _080554BA
_08055090:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B314
b _080554BA
_0805509E:
movs r0, 0
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059E54
b _080554BA
_080550B0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B2F0
b _080554BA
_080550BE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059AB8
b _080554BA
_080550CC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058858
b _080554BA
_080550DA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058770
b _080554BA
_080550E8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059004
b _080554BA
_080550F6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80597F0
b _080554BA
_08055104:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059060
b _080554BA
_08055112:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058548
b _080554BA
_08055120:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80588F4
b _080554BA
_0805512E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058D44
b _080554BA
_0805513C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AFA4
b _080554BA
_0805514A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057E28
b _080554BA
_08055158:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BA44
b _080554BA
_08055166:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805991C
b _080554BA
_08055174:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A640
b _080554BA
_08055182:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A508
b _080554BA
_08055190:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805785C
b _080554BA
_0805519E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057D9C
b _080554BA
_080551AC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C128
b _080554BA
_080551BA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B3A8
b _080554BA
_080551C8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B208
b _080554BA
_080551D6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058A18
b _080554BA
_080551E4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B37C
b _080554BA
_080551F2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057948
b _080554BA
_08055200:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057CD0
b _080554BA
_0805520E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A394
b _080554BA
_0805521C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A464
b _080554BA
_0805522A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C2A0
b _080554BA
_08055238:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058BE0
b _080554BA
_08055246:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059C8C
b _080554BA
_08055254:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AAE0
b _080554BA
_08055262:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C288
b _080554BA
_08055270:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805783C
b _080554BA
_0805527E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80578FC
b _080554BA
_0805528C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057BB4
b _080554BA
_0805529A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B9E8
b _080554BA
_080552A8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B038
b _080554BA
_080552B6:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_80578A4
b _080554BA
_080552C4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C468
b _080554BA
_080552D2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058234
b _080554BA
_080552E0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A85C
b _080554BA
_080552EE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BD88
b _080554BA
_080552FC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BB98
b _080554BA
_0805530A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AD54
b _080554BA
_08055318:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BB64
b _080554BA
_08055326:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AD04
b _080554BA
_08055334:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C080
b _080554BA
_08055342:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C1E4
b _080554BA
_08055350:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BED4
b _080554BA
_0805535E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805AB54
b _080554BA
_0805536C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058F58
b _080554BA
_0805537A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C3F8
b _080554BA
_08055388:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059340
b _080554BA
_08055396:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057E50
b _080554BA
_080553A4:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805A31C
b _080554BA
_080553B2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059290
b _080554BA
_080553C0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059BAC
b _080554BA
_080553CE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BBA8
b _080554BA
_080553DC:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805805C
b _080554BA
_080553EA:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B734
b _080554BA
_080553F8:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B0D0
b _080554BA
_08055406:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B53C
b _080554BA
_08055414:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8058DBC
b _080554BA
_08055422:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8057BEC
b _080554BA
_08055430:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B740
b _080554BA
_0805543E:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BD64
b _080554BA
_0805544C:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B618
b _080554BA
_0805545A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C1B0
b _080554BA
_08055468:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_8059C80
b _080554BA
_08055476:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BEB8
b _080554BA
_08055484:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805BEC8
b _080554BA
_08055492:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805B464
b _080554BA
_080554A0:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C45C
b _080554BA
_080554AE:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
mov r3, r9
bl sub_805C208
_080554BA:
lsls r0, 24
lsrs r4, r0, 24
b _080554C2
_080554C0:
movs r4, 0
_080554C2:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _080555A2
ldr r0, [sp, 0x20]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080554E6
ldr r3, [sp, 0x20]
ldr r0, [r3, 0x70]
adds r0, 0x46
ldrb r1, [r0]
adds r0, r3, 0
bl sub_806CE68
_080554E6:
cmp r4, 0
bne _08055510
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055530
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055530
ldr r1, [sp, 0x24]
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08055530
mov r2, r10
strb r2, [r6]
b _08055530
_08055510:
mov r0, r8
bl sub_8057088
lsls r0, 24
cmp r0, 0
beq _08055530
adds r0, r7, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08055530
ldr r1, _08055614
movs r0, 0x1
strb r0, [r1]
_08055530:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055548
ldr r3, [sp, 0x24]
movs r0, 0xAC
lsls r0, 1
adds r1, r3, r0
movs r0, 0x1
strb r0, [r1]
_08055548:
ldr r1, [sp, 0x18]
cmp r1, 0x89
beq _08055568
adds r0, r7, 0
bl sub_8055DDC
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_8069F9C
adds r0, r7, 0
adds r1, r5, 0
mov r2, r8
bl sub_806A120
_08055568:
ldr r7, [sp, 0x1C]
_0805556A:
ldr r2, [sp, 0x14]
adds r2, 0x1
str r2, [sp, 0x14]
_08055570:
ldr r3, [sp, 0x14]
cmp r3, 0x3F
bgt _080555A2
movs r0, 0
str r0, [sp, 0x20]
lsls r0, r3, 2
ldr r1, [sp, 0x10]
adds r0, r1
ldr r5, [r0]
movs r2, 0x1
str r2, [sp, 0x28]
movs r3, 0
str r3, [sp, 0x2C]
movs r0, 0
str r0, [sp, 0x30]
cmp r5, 0
beq _080555A2
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080555A2
bl _08053724
_080555A2:
bl sub_8044B28
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _08055604
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080555D6
ldr r0, [r7, 0x70]
movs r2, 0xAA
lsls r2, 1
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
beq _080555D6
strb r4, [r1]
adds r0, r7, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_080555D6:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055604
ldr r0, [r7, 0x70]
ldr r3, _08055618
adds r1, r0, r3
ldrb r0, [r1]
cmp r0, 0
beq _08055604
movs r0, 0
strb r0, [r1]
ldr r1, _0805561C
ldr r2, [r1]
str r0, [sp]
str r0, [sp, 0x4]
adds r0, r7, 0
adds r1, r7, 0
movs r3, 0x2
bl sub_8076E20
_08055604:
add sp, 0x48
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08055614: .4byte gUnknown_202F222
_08055618: .4byte 0x00000155
_0805561C: .4byte gUnknown_8106A50
thumb_func_end sub_8053704
thumb_func_start sub_8055620
sub_8055620:
push {r4,lr}
sub sp, 0x4
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08055636
movs r0, 0x1
_08055636:
add sp, 0x4
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8055620
thumb_func_start sub_8055640
sub_8055640:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
adds r6, r0, 0
mov r10, r1
adds r5, r2, 0
mov r9, r3
ldr r7, [sp, 0x44]
adds r1, r5, 0
bl sub_8071A1C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
adds r1, r5, 0
bl sub_8071A44
mov r8, r0
adds r0, r5, 0
bl sub_8092C24
str r0, [sp]
add r0, sp, 0x14
str r0, [sp, 0x4]
mov r0, r9
str r0, [sp, 0x8]
ldrh r0, [r5, 0x2]
str r0, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
adds r0, r6, 0
mov r1, r10
adds r2, r4, 0
mov r3, r8
bl sub_806EAF4
adds r0, r5, 0
adds r1, r7, 0
bl sub_8057600
lsls r0, 16
asrs r0, 16
str r0, [sp]
adds r0, r6, 0
mov r1, r10
adds r2, r5, 0
add r3, sp, 0x14
bl sub_8055728
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8055640
thumb_func_start sub_80556BC
sub_80556BC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x24
adds r6, r0, 0
mov r9, r1
adds r4, r2, 0
adds r5, r3, 0
ldr r7, [sp, 0x40]
lsls r4, 24
lsrs r4, 24
adds r1, r5, 0
bl sub_8071A44
mov r8, r0
adds r0, r5, 0
bl sub_8092C24
str r0, [sp]
add r0, sp, 0x14
str r0, [sp, 0x4]
str r7, [sp, 0x8]
ldrh r0, [r5, 0x2]
str r0, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
adds r0, r6, 0
mov r1, r9
adds r2, r4, 0
mov r3, r8
bl sub_806EAF4
adds r0, r5, 0
ldr r1, [sp, 0x44]
bl sub_8057600
lsls r0, 16
asrs r0, 16
str r0, [sp]
adds r0, r6, 0
mov r1, r9
adds r2, r5, 0
add r3, sp, 0x14
bl sub_8055728
add sp, 0x24
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80556BC
thumb_func_start sub_8055728
sub_8055728:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
mov r8, r3
ldr r0, [sp, 0x30]
lsls r0, 16
asrs r0, 16
mov r9, r0
movs r7, 0x1
str r7, [sp]
adds r0, r6, 0
movs r3, 0x1
bl sub_8056B34
lsls r0, 24
cmp r0, 0
beq _080557C0
movs r0, 0
mov r10, r0
ldrh r1, [r5, 0x2]
movs r0, 0x9D
lsls r0, 1
cmp r1, r0
bne _08055768
movs r1, 0x1
mov r10, r1
_08055768:
adds r0, r4, 0
movs r1, 0x2E
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08055790
ldr r0, _080557AC
ldr r1, [r0]
ldr r0, _080557B0
adds r2, r1, r0
ldr r0, _080557B4
strh r0, [r2]
ldr r2, _080557B8
adds r0, r1, r2
str r4, [r0]
ldr r0, _080557BC
adds r1, r0
ldrh r0, [r4, 0x26]
str r0, [r1]
_08055790:
str r7, [sp]
mov r1, r9
str r1, [sp, 0x4]
str r7, [sp, 0x8]
movs r0, 0
str r0, [sp, 0xC]
adds r0, r6, 0
adds r1, r4, 0
mov r2, r8
mov r3, r10
bl sub_806D010
b _08055826
.align 2, 0
_080557AC: .4byte gUnknown_203B418
_080557B0: .4byte 0x00000662
_080557B4: .4byte 0x000003e7
_080557B8: .4byte 0x00017b34
_080557BC: .4byte 0x00017b40
_080557C0:
ldr r0, _08055808
ldr r1, [r4, 0x70]
movs r2, 0
bl sub_80708B4
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08055814
adds r0, r4, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08055814
ldr r0, _0805580C
movs r3, 0x1
negs r3, r3
adds r1, r4, 0
movs r2, 0x1
bl sub_803ED30
ldr r0, _08055810
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_805232C
adds r0, r6, 0
adds r1, r4, 0
bl sub_8042238
b _08055820
.align 2, 0
_08055808: .4byte gUnknown_202DFE8
_0805580C: .4byte 0x0000270f
_08055810: .4byte gUnknown_80F9688
_08055814:
ldr r0, _08055834
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08055820:
movs r0, 0x1
mov r2, r8
strb r0, [r2, 0xF]
_08055826:
mov r1, r8
ldrb r0, [r1, 0xF]
cmp r0, 0
beq _08055838
movs r0, 0
b _08055854
.align 2, 0
_08055834: .4byte gUnknown_80F9688
_08055838:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055850
ldr r0, [r4, 0x70]
movs r2, 0xAD
lsls r2, 1
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
_08055850:
mov r1, r8
ldr r0, [r1]
_08055854:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8055728
thumb_func_start sub_8055864
sub_8055864:
push {r4-r7,lr}
sub sp, 0x20
adds r4, r0, 0
adds r7, r1, 0
adds r5, r2, 0
adds r6, r3, 0
adds r1, r5, 0
bl sub_8071A1C
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
add r0, sp, 0x10
str r0, [sp]
adds r0, r4, 0
adds r1, r7, 0
adds r3, r6, 0
bl sub_806F2BC
adds r0, r5, 0
ldr r1, [sp, 0x34]
bl sub_8057600
lsls r0, 16
asrs r0, 16
movs r5, 0x1
str r5, [sp]
str r0, [sp, 0x4]
str r5, [sp, 0x8]
movs r0, 0
str r0, [sp, 0xC]
adds r0, r4, 0
adds r1, r7, 0
add r2, sp, 0x10
movs r3, 0
bl sub_806D010
add r0, sp, 0x10
ldrb r0, [r0, 0xF]
cmp r0, 0
beq _080558BA
movs r0, 0
b _080558D2
_080558BA:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080558D0
ldr r0, [r7, 0x70]
movs r1, 0xAD
lsls r1, 1
adds r0, r1
strb r5, [r0]
_080558D0:
ldr r0, [sp, 0x10]
_080558D2:
add sp, 0x20
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8055864
thumb_func_start sub_80558DC
sub_80558DC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
movs r4, 0x1
movs r2, 0
mov r9, r2
ldr r1, [r1, 0x70]
mov r10, r1
bl sub_8092B00
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0x1
beq _08055902
cmp r1, 0x7
bne _08055906
_08055902:
movs r5, 0x1
mov r9, r5
_08055906:
ldr r6, _08055944
mov r8, r6
mov r3, r10
adds r3, 0x5C
ldr r7, _08055948
mov r12, r7
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
str r0, [sp, 0x10]
adds r2, r3, 0
_0805591C:
mov r0, sp
mov r1, r8
ldm r1!, {r5-r7}
stm r0!, {r5-r7}
ldr r1, [r1]
str r1, [r0]
mov r0, r9
cmp r0, 0
beq _0805594C
ldrb r0, [r2]
cmp r0, 0xE
bne _0805594C
mov r0, r10
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _0805594C
movs r0, 0
b _0805595A
.align 2, 0
_08055944: .4byte gUnknown_81069BC
_08055948: .4byte gUnknown_80F522C
_0805594C:
ldrb r0, [r2]
lsls r0, 1
ldr r1, [sp, 0x10]
adds r0, r1
add r0, r12
movs r5, 0
ldrsh r0, [r0, r5]
_0805595A:
lsls r0, 2
add r0, sp
ldr r0, [r0]
muls r4, r0
cmp r4, 0
beq _0805596E
adds r2, 0x1
adds r0, r3, 0x1
cmp r2, r0
ble _0805591C
_0805596E:
adds r0, r4, 0
cmp r0, 0
beq _08055976
movs r0, 0x1
_08055976:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80558DC
thumb_func_start sub_8055988
sub_8055988:
push {r4,lr}
adds r2, r0, 0
adds r4, r1, 0
cmp r2, r4
beq _080559D4
movs r0, 0x4
ldrsh r1, [r2, r0]
movs r3, 0x4
ldrsh r0, [r4, r3]
subs r1, r0
cmp r1, 0
bge _080559A2
negs r1, r1
_080559A2:
cmp r1, 0x1
bgt _080559D4
movs r0, 0x6
ldrsh r1, [r2, r0]
movs r3, 0x6
ldrsh r0, [r4, r3]
subs r1, r0
cmp r1, 0
bge _080559B6
negs r1, r1
_080559B6:
cmp r1, 0x1
bgt _080559D4
adds r0, r4, 0x4
adds r1, r2, 0x4
bl sub_80983D8
adds r1, r0, 0
adds r0, r4, 0
bl sub_8071138
lsls r0, 24
cmp r0, 0
beq _080559D4
movs r0, 0x1
b _080559D6
_080559D4:
movs r0, 0
_080559D6:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8055988
thumb_func_start sub_80559DC
sub_80559DC:
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, [r5, 0x70]
adds r0, r5, 0x4
adds r1, 0x4
bl sub_80983D8
adds r1, r0, 0
movs r2, 0x7
ands r0, r2
adds r4, 0x46
strb r0, [r4]
adds r0, r5, 0
bl sub_806CE68
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80559DC
thumb_func_start sub_8055A00
sub_8055A00:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x34
adds r5, r0, 0
mov r9, r1
str r2, [sp, 0x20]
str r3, [sp, 0x24]
ldr r0, [r5, 0x70]
mov r10, r0
mov r7, r9
cmp r7, 0x3
ble _08055A22
movs r0, 0
b _08055DB4
_08055A22:
movs r0, 0xBC
lsls r0, 1
add r0, r10
movs r1, 0
movs r2, 0
strh r2, [r0]
ldr r0, _08055A4C
add r0, r10
strb r1, [r0]
mov r0, r10
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x1
bne _08055A58
ldr r0, _08055A50
adds r1, r5, 0
bl sub_8045B94
ldr r0, _08055A54
b _08055A8A
.align 2, 0
_08055A4C: .4byte 0x00000159
_08055A50: .4byte gUnknown_202DF98
_08055A54: .4byte gUnknown_80FC714
_08055A58:
cmp r0, 0x7
bne _08055A74
ldr r0, _08055A6C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08055A70
b _08055A8A
.align 2, 0
_08055A6C: .4byte gUnknown_202DF98
_08055A70: .4byte gUnknown_80FC718
_08055A74:
mov r0, r10
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _08055AA0
ldr r0, _08055A98
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08055A9C
_08055A8A:
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
movs r0, 0
b _08055DB4
.align 2, 0
_08055A98: .4byte gUnknown_202DF98
_08055A9C: .4byte gUnknown_80FC6A8
_08055AA0:
ldr r0, _08055B24
strb r1, [r0]
ldr r0, _08055B28
str r2, [r0]
ldr r0, _08055B2C
strb r1, [r0]
adds r0, r7, 0x1
movs r2, 0
movs r6, 0x3
movs r1, 0xC0
lsls r1, 1
add r1, r10
_08055AB8:
strh r2, [r1]
subs r1, 0x2
subs r6, 0x1
cmp r6, 0
bge _08055AB8
movs r6, 0
movs r3, 0x1
adds r7, r0, 0
cmp r7, 0x3
bgt _08055B06
lsls r2, r7, 3
mov r1, r10
adds r0, r1, r2
movs r4, 0x8C
lsls r4, 1
adds r0, r4
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08055B06
movs r0, 0x2
mov r8, r0
adds r0, r2, r4
mov r1, r10
adds r2, r0, r1
_08055AEC:
adds r6, 0x1
cmp r6, 0x3
bgt _08055B06
adds r3, 0x1
adds r2, 0x8
adds r7, 0x1
cmp r7, 0x3
bgt _08055B06
ldrb r1, [r2]
mov r0, r8
ands r0, r1
cmp r0, 0
bne _08055AEC
_08055B06:
movs r0, 0
str r0, [sp, 0x28]
cmp r3, 0x1
ble _08055B12
movs r1, 0x1
str r1, [sp, 0x28]
_08055B12:
mov r7, r9
lsls r0, r7, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
add r0, r10
mov r8, r0
b _08055CB4
.align 2, 0
_08055B24: .4byte gUnknown_202F222
_08055B28: .4byte gUnknown_202F208
_08055B2C: .4byte gUnknown_202F221
_08055B30:
mov r1, r8
ldrh r0, [r1, 0x2]
cmp r0, 0x19
beq _08055B3C
cmp r0, 0xE3
bne _08055B4E
_08055B3C:
adds r0, r5, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
bne _08055B5E
adds r0, r5, 0
movs r1, 0x1
b _08055B52
_08055B4E:
adds r0, r5, 0
movs r1, 0
_08055B52:
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _08055B5E
b _08055CCE
_08055B5E:
ldr r0, _08055B9C
ldrb r0, [r0]
cmp r0, 0
beq _08055B68
b _08055CCE
_08055B68:
ldrb r1, [r6]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08055B74
b _08055C82
_08055B74:
movs r2, 0x1
movs r0, 0
str r0, [sp, 0x2C]
adds r0, r5, 0
adds r1, r6, 0
str r2, [sp, 0x30]
bl sub_80570AC
lsls r0, 24
lsrs r4, r0, 24
ldrb r0, [r6, 0x4]
ldr r2, [sp, 0x30]
cmp r0, 0
beq _08055BA0
cmp r4, 0
bne _08055BBA
movs r1, 0x1
str r1, [sp, 0x2C]
b _08055BBA
.align 2, 0
_08055B9C: .4byte gUnknown_202F221
_08055BA0:
cmp r4, 0
bne _08055BBA
ldr r0, _08055C08
adds r1, r6, 0
movs r2, 0
bl sub_80928C0
ldr r0, _08055C0C
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
movs r2, 0
_08055BBA:
cmp r2, 0
beq _08055C82
ldr r0, _08055C10
ldr r0, [r0]
mov r9, r0
ldr r0, _08055C14
add r0, r10
strb r4, [r0]
ldrh r0, [r6, 0x2]
cmp r0, 0xE5
bne _08055C20
ldr r0, [r6]
ldr r1, [r6, 0x4]
str r0, [sp, 0x8]
str r1, [sp, 0xC]
adds r0, r5, 0
bl sub_8057144
lsls r0, 16
ldr r2, _08055C18
ldr r1, [sp, 0x8]
ands r1, r2
orrs r1, r0
str r1, [sp, 0x8]
ldr r0, _08055C08
add r1, sp, 0x8
movs r2, 0
bl sub_80928C0
ldr r0, _08055C1C
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
ldr r0, [sp, 0x28]
str r0, [sp]
add r1, sp, 0x8
str r1, [sp, 0x4]
b _08055C26
.align 2, 0
_08055C08: .4byte gUnknown_202DE58
_08055C0C: .4byte gUnknown_80F93C8
_08055C10: .4byte gUnknown_202F208
_08055C14: .4byte 0x00000159
_08055C18: .4byte 0x0000ffff
_08055C1C: .4byte gUnknown_80FD2DC
_08055C20:
ldr r0, [sp, 0x28]
str r0, [sp]
str r6, [sp, 0x4]
_08055C26:
adds r0, r5, 0
ldr r1, [sp, 0x20]
ldr r2, [sp, 0x24]
ldr r3, [sp, 0x54]
bl sub_8055FA0
lsls r0, 24
lsrs r0, 24
ldr r1, [sp, 0x2C]
cmp r1, 0
beq _08055C56
cmp r0, 0
beq _08055C56
ldrb r1, [r6, 0x1]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _08055C50
movs r0, 0xFB
ands r0, r1
b _08055C54
_08055C50:
movs r0, 0x8
orrs r0, r1
_08055C54:
strb r0, [r6, 0x1]
_08055C56:
ldr r0, _08055C70
ldr r0, [r0]
cmp r9, r0
bne _08055C82
ldr r0, [sp, 0x24]
cmp r0, 0
bne _08055C78
ldr r0, _08055C74
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08055C82
.align 2, 0
_08055C70: .4byte gUnknown_202F208
_08055C74: .4byte gUnknown_80FC690
_08055C78:
ldr r0, _08055DC4
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08055C82:
movs r0, 0x1
bl sub_804178C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055CCE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08055CCE
movs r1, 0x8
add r8, r1
adds r7, 0x1
cmp r7, 0x3
bgt _08055CCE
mov r0, r8
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08055CCE
_08055CB4:
mov r6, r8
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055CCE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08055CCE
b _08055B30
_08055CCE:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055D54
movs r6, 0
_08055CDC:
lsls r0, r6, 1
movs r1, 0xBD
lsls r1, 1
add r1, r10
adds r1, r0
ldrh r0, [r1]
cmp r0, 0
beq _08055D4E
add r4, sp, 0x10
adds r1, r0, 0
adds r0, r4, 0
bl sub_8092AA8
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08055D48
ldrh r0, [r4, 0x2]
cmp r0, 0xE5
bne _08055D36
ldr r0, [sp, 0x10]
ldr r1, [sp, 0x14]
str r0, [sp, 0x18]
str r1, [sp, 0x1C]
adds r0, r5, 0
bl sub_8057144
lsls r0, 16
ldr r2, _08055DC8
ldr r1, [sp, 0x18]
ands r1, r2
orrs r1, r0
str r1, [sp, 0x18]
add r4, sp, 0x18
ldr r0, _08055DCC
adds r1, r4, 0
movs r2, 0
bl sub_80928C0
ldr r0, _08055DD0
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08055D36:
ldr r1, [sp, 0x28]
str r1, [sp]
str r4, [sp, 0x4]
adds r0, r5, 0
movs r1, 0
ldr r2, [sp, 0x24]
ldr r3, [sp, 0x54]
bl sub_8055FA0
_08055D48:
movs r0, 0x1
bl sub_804178C
_08055D4E:
adds r6, 0x1
cmp r6, 0x3
ble _08055CDC
_08055D54:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055DB2
adds r0, r5, 0
bl sub_8071DA4
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055DB2
ldr r1, _08055DD4
ldrb r0, [r1]
cmp r0, 0
beq _08055DB2
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08055DB2
ldr r4, [r5, 0x70]
ldr r1, _08055DD8
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r3, r0, 0
movs r0, 0
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_8076090
adds r4, 0xFB
ldrb r0, [r4]
cmp r0, 0
bne _08055DB2
movs r0, 0x1
strb r0, [r4]
_08055DB2:
movs r0, 0x1
_08055DB4:
add sp, 0x34
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08055DC4: .4byte gUnknown_80FC6A4
_08055DC8: .4byte 0x0000ffff
_08055DCC: .4byte gUnknown_202DE58
_08055DD0: .4byte gUnknown_80FD2DC
_08055DD4: .4byte gUnknown_202F222
_08055DD8: .4byte gUnknown_80F4E70
thumb_func_end sub_8055A00
thumb_func_start sub_8055DDC
sub_8055DDC:
push {r4-r7,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08055DEC
b _08055F62
_08055DEC:
ldr r6, [r4, 0x70]
movs r7, 0xBC
lsls r7, 1
adds r5, r6, r7
ldrh r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08055E10
ldr r0, _08055F68
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
bl sub_80769CC
_08055E10:
ldrh r1, [r5]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08055E2C
ldr r0, _08055F6C
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
bl sub_80769CC
_08055E2C:
ldrh r1, [r5]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _08055E48
ldr r0, _08055F70
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
bl sub_80769CC
_08055E48:
ldrh r1, [r5]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08055E66
ldr r0, _08055F74
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8077780
_08055E66:
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08055E84
ldr r0, _08055F78
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8077780
_08055E84:
ldrh r1, [r5]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _08055EA2
ldr r0, _08055F7C
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80763F8
_08055EA2:
ldrh r1, [r5]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08055EC0
ldr r0, _08055F80
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80763F8
_08055EC0:
ldrh r1, [r5]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08055EEA
ldr r0, _08055F84
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r1, _08055F88
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8075C58
_08055EEA:
ldrh r1, [r5]
movs r0, 0x80
lsls r0, 1
ands r0, r1
cmp r0, 0
beq _08055F0C
ldr r0, _08055F8C
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
movs r3, 0x1
bl sub_8076210
_08055F0C:
ldrh r1, [r5]
movs r0, 0x80
lsls r0, 2
ands r0, r1
cmp r0, 0
beq _08055F2C
ldr r0, _08055F90
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_807614C
_08055F2C:
adds r5, r6, r7
ldrh r1, [r5]
movs r0, 0x80
lsls r0, 3
ands r0, r1
cmp r0, 0
beq _08055F5E
ldr r0, _08055F94
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08055F98
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
adds r0, r4, 0
bl sub_80428A0
ldr r0, _08055F9C
ldrh r1, [r0]
adds r0, r6, 0
adds r0, 0xFA
strb r1, [r0]
_08055F5E:
movs r0, 0
strh r0, [r5]
_08055F62:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08055F68: .4byte gUnknown_80FEEA4
_08055F6C: .4byte gUnknown_80FEEC8
_08055F70: .4byte gUnknown_80FEEEC
_08055F74: .4byte gUnknown_80FEF0C
_08055F78: .4byte gUnknown_80FEF30
_08055F7C: .4byte gUnknown_80FEF4C
_08055F80: .4byte gUnknown_80FEF50
_08055F84: .4byte gUnknown_80FEF54
_08055F88: .4byte gUnknown_80F4E74
_08055F8C: .4byte gUnknown_80FEF74
_08055F90: .4byte gUnknown_80FEF98
_08055F94: .4byte gUnknown_202DF98
_08055F98: .4byte gUnknown_80FEFD0
_08055F9C: .4byte gUnknown_80F5004
thumb_func_end sub_8055DDC
thumb_func_start sub_8055FA0
sub_8055FA0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x130
adds r5, r0, 0
adds r6, r1, 0
mov r10, r2
str r3, [sp, 0x120]
ldr r7, [sp, 0x154]
movs r0, 0
mov r8, r0
str r0, [sp, 0xC]
movs r0, 0x1
bl sub_804178C
ldrh r1, [r7, 0x2]
movs r0, 0xA5
lsls r0, 1
cmp r1, r0
bne _08056010
movs r0, 0x69
bl sub_8084100
ldr r1, _08056004
str r0, [r1]
add r4, sp, 0x110
ldr r1, _08056008
lsls r0, 3
adds r0, r1
ldrh r1, [r0]
adds r0, r4, 0
bl sub_8092A88
ldrb r1, [r7]
add r0, sp, 0x110
strb r1, [r0]
ldrb r0, [r7, 0x1]
strb r0, [r4, 0x1]
ldr r0, _0805600C
ldr r2, [r0]
mov r1, r10
str r1, [sp]
movs r0, 0x1
str r0, [sp, 0x4]
mov r0, r8
str r0, [sp, 0x8]
b _08056056
.align 2, 0
_08056004: .4byte gUnknown_202F228
_08056008: .4byte gUnknown_80F59C8
_0805600C: .4byte gUnknown_80FECBC
_08056010:
cmp r1, 0x77
bne _08056068
ldr r0, _08056108
ldr r0, [r0]
ldr r1, _0805610C
adds r0, r1
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0
bge _08056026
movs r0, 0
_08056026:
cmp r0, 0x4A
ble _0805602C
movs r0, 0x4A
_0805602C:
add r4, sp, 0x118
ldr r1, _08056110
lsls r0, 3
adds r0, r1
ldrh r1, [r0]
adds r0, r4, 0
bl sub_8092A88
ldrb r1, [r7]
add r0, sp, 0x118
strb r1, [r0]
ldrb r0, [r7, 0x1]
strb r0, [r4, 0x1]
ldr r0, _08056114
ldr r2, [r0]
mov r0, r10
str r0, [sp]
movs r0, 0x1
str r0, [sp, 0x4]
mov r1, r8
str r1, [sp, 0x8]
_08056056:
adds r0, r5, 0
adds r1, r7, 0
add r3, sp, 0xC
bl sub_8056468
movs r0, 0x1
bl sub_804178C
adds r7, r4, 0
_08056068:
movs r2, 0
str r2, [sp, 0x128]
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x1
bl sub_807CD64
movs r4, 0xF0
adds r1, r4, 0
ands r1, r0
cmp r1, 0x50
bne _08056084
movs r0, 0xA
str r0, [sp, 0x128]
_08056084:
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x1
bl sub_807CD64
adds r1, r4, 0
ands r1, r0
cmp r1, 0x80
bne _080560CC
movs r1, 0x1
str r1, [sp, 0x128]
ldrh r0, [r7, 0x2]
cmp r0, 0x97
bne _080560AE
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _080560CC
_080560AE:
ldrh r0, [r7, 0x2]
bl sub_809422C
lsls r0, 24
cmp r0, 0
beq _080560CC
adds r0, r5, 0
adds r1, r7, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
bne _080560CC
movs r2, 0
str r2, [sp, 0x128]
_080560CC:
ldr r0, _08056118
ldr r1, [r5, 0x70]
movs r2, 0
bl sub_80708B4
ldr r0, _0805611C
adds r1, r7, 0
movs r2, 0
bl sub_80928C0
adds r0, r5, 0
adds r1, r7, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _08056124
ldr r0, _08056120
ldr r0, [r0]
mov r8, r0
ldr r0, [r5, 0x70]
adds r0, 0xFF
movs r1, 0
strb r1, [r0]
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x1
bl sub_805744C
b _08056142
.align 2, 0
_08056108: .4byte gUnknown_203B418
_0805610C: .4byte 0x00003a0e
_08056110: .4byte gUnknown_80F5D10
_08056114: .4byte gUnknown_80FECE0
_08056118: .4byte gUnknown_202DF98
_0805611C: .4byte gUnknown_202DE58
_08056120: .4byte gUnknown_80FC72C
_08056124:
mov r0, r10
cmp r0, 0
bne _08056132
ldrh r0, [r7, 0x2]
bl sub_8092CA8
b _08056136
_08056132:
ldr r0, _08056194
ldr r0, [r0]
_08056136:
mov r8, r0
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x1
bl sub_80573CC
_08056142:
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _08056156
cmp r6, 0
beq _08056156
adds r0, r5, 0
adds r1, r7, 0
bl sub_806ACE8
_08056156:
ldr r0, [r5, 0x70]
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0x1
bne _080561A0
ldrh r0, [r7, 0x2]
bl sub_8092CF0
lsls r0, 24
cmp r0, 0
beq _080561A0
ldr r0, _08056198
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
mov r1, r8
bl sub_80522A8
movs r0, 0xA
movs r1, 0x3F
bl sub_803E708
ldr r0, _0805619C
_08056188:
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08056190:
movs r0, 0
b _08056446
.align 2, 0
_08056194: .4byte gUnknown_80F9158
_08056198: .4byte gUnknown_202DF98
_0805619C: .4byte gUnknown_80FC710
_080561A0:
cmp r4, 0
bne _08056214
ldr r0, _080561D4
ldr r1, [r5, 0x70]
movs r2, 0
bl sub_80708B4
mov r1, r10
cmp r1, 0
bne _080561E0
ldr r0, _080561D8
adds r1, r7, 0
movs r2, 0
bl sub_80928C0
adds r0, r5, 0
mov r1, r8
bl sub_80522A8
movs r0, 0xA
movs r1, 0x3F
bl sub_803E708
ldr r0, _080561DC
b _08056188
.align 2, 0
_080561D4: .4byte gUnknown_202DF98
_080561D8: .4byte gUnknown_202DE58
_080561DC: .4byte gUnknown_80FC6D0
_080561E0:
ldr r0, _0805620C
mov r2, r10
lsls r1, r2, 24
lsrs r1, 24
movs r2, 0
bl sub_8090DC4
adds r0, r5, 0
mov r1, r8
bl sub_80522A8
movs r0, 0xA
movs r1, 0x3F
bl sub_803E708
ldr r0, _08056210
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08056190
.align 2, 0
_0805620C: .4byte gUnknown_202DE58
_08056210: .4byte gUnknown_80FC6FC
_08056214:
ldr r0, _0805625C
movs r1, 0
str r1, [r0]
ldr r0, _08056260
str r1, [r0]
ldr r0, _08056264
str r1, [r0]
ldr r0, _08056268
strb r1, [r0]
ldr r0, _0805626C
strb r1, [r0]
ldr r0, _08056270
strb r1, [r0]
ldr r0, _08056274
str r1, [r0]
ldr r0, _08056278
strb r1, [r0]
ldr r0, [sp, 0x150]
cmp r0, 0
beq _0805624C
ldr r0, [r5, 0x70]
ldr r2, _0805627C
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0x3
bhi _0805624C
adds r0, 0x1
strb r0, [r1]
_0805624C:
adds r0, r7, 0
bl sub_8057070
str r0, [sp, 0x124]
movs r0, 0
mov r9, r0
b _080563E4
.align 2, 0
_0805625C: .4byte gUnknown_202F214
_08056260: .4byte gUnknown_202F20C
_08056264: .4byte gUnknown_202F210
_08056268: .4byte gUnknown_202F218
_0805626C: .4byte gUnknown_202F219
_08056270: .4byte gUnknown_202F21A
_08056274: .4byte gUnknown_202F21C
_08056278: .4byte gUnknown_202F220
_0805627C: .4byte 0x00000153
_08056280:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0805628E
b _08056444
_0805628E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0805629A
b _08056444
_0805629A:
ldr r4, [r5, 0x70]
ldr r0, [sp, 0x120]
cmp r0, 0
bne _080562AC
ldrh r0, [r7, 0x2]
cmp r0, 0x19
beq _080562AC
cmp r0, 0xE3
bne _080562BE
_080562AC:
adds r0, r5, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
bne _080562CE
adds r0, r5, 0
movs r1, 0x1
b _080562C2
_080562BE:
adds r0, r5, 0
movs r1, 0
_080562C2:
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _080562CE
b _08056400
_080562CE:
movs r1, 0xA5
lsls r1, 1
adds r0, r4, r1
movs r6, 0
strb r6, [r0]
ldrh r0, [r7, 0x2]
cmp r0, 0x9
bne _080562F4
ldr r4, [r5, 0x70]
movs r0, 0x8
bl sub_8084100
adds r4, 0x46
strb r0, [r4]
adds r0, r5, 0
bl sub_8069DCC
movs r2, 0
str r2, [sp, 0x12C]
_080562F4:
ldr r0, _080563A0
str r6, [r0]
str r6, [sp, 0xC]
ldr r0, [sp, 0x128]
cmp r0, 0x1
bhi _08056324
add r0, sp, 0xC
adds r1, r5, 0
adds r2, r7, 0
bl sub_8056CE8
add r0, sp, 0xC
adds r1, r5, 0
bl sub_80574C4
mov r1, r9
cmp r1, 0
beq _08056324
ldr r2, [sp, 0x12C]
cmp r2, 0
beq _08056324
ldr r0, [sp, 0xC]
cmp r0, 0
beq _08056400
_08056324:
mov r0, r10
str r0, [sp]
movs r0, 0
mov r1, r9
cmp r1, 0
bne _08056332
movs r0, 0x1
_08056332:
str r0, [sp, 0x4]
ldr r2, [sp, 0x128]
str r2, [sp, 0x8]
adds r0, r5, 0
adds r1, r7, 0
mov r2, r8
add r3, sp, 0xC
bl sub_8056468
lsls r0, 24
lsrs r4, r0, 24
movs r0, 0
mov r8, r0
ldr r0, _080563A0
ldr r0, [r0]
cmp r0, 0
beq _08056358
bl sub_806A1E8
_08056358:
ldr r1, [r5, 0x70]
adds r0, r1, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _0805637C
cmp r0, 0x4
beq _0805637C
movs r2, 0xB6
lsls r2, 1
adds r0, r1, r2
mov r2, r8
strh r2, [r0]
movs r2, 0xB7
lsls r2, 1
adds r0, r1, r2
mov r1, r8
strh r1, [r0]
_0805637C:
ldr r1, _080563A4
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
ldr r2, [sp, 0x128]
cmp r2, 0
beq _080563A8
mov r0, r10
str r0, [sp]
ldr r1, [sp, 0x150]
str r1, [sp, 0x4]
adds r0, r5, 0
adds r1, r7, 0
adds r3, r4, 0
bl sub_80566F8
b _080563B8
.align 2, 0
_080563A0: .4byte gUnknown_203B438
_080563A4: .4byte gUnknown_202F214
_080563A8:
ldr r2, [sp, 0x150]
str r2, [sp]
add r0, sp, 0xC
adds r1, r5, 0
adds r2, r7, 0
mov r3, r10
bl sub_8053704
_080563B8:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08056400
adds r0, r5, 0
bl sub_806CF18
ldr r0, [r5, 0x70]
movs r2, 0xA5
lsls r2, 1
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
bne _080563E0
strb r0, [r1]
adds r0, r5, 0
bl sub_8079764
_080563E0:
movs r0, 0x1
add r9, r0
_080563E4:
ldr r1, [sp, 0x124]
cmp r9, r1
bge _08056400
movs r2, 0x1
str r2, [sp, 0x12C]
ldr r0, _08056458
ldrb r0, [r0]
cmp r0, 0
bne _08056400
ldr r0, _0805645C
ldrb r0, [r0]
cmp r0, 0
bne _08056400
b _08056280
_08056400:
ldr r0, _08056460
ldrb r0, [r0]
cmp r0, 0
beq _08056418
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A324
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A6C8
_08056418:
ldr r0, _08056464
ldrb r0, [r0]
cmp r0, 0
beq _08056444
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08056444
ldr r4, [r5, 0x70]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0
bl sub_8077AE4
adds r4, 0xFB
ldrb r0, [r4]
cmp r0, 0
bne _08056444
movs r0, 0x1
strb r0, [r4]
_08056444:
movs r0, 0x1
_08056446:
add sp, 0x130
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08056458: .4byte gUnknown_202F220
_0805645C: .4byte gUnknown_202F221
_08056460: .4byte gUnknown_202F21A
_08056464: .4byte gUnknown_202F219
thumb_func_end sub_8055FA0
thumb_func_start sub_8056468
sub_8056468:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r6, r0, 0
mov r8, r1
mov r9, r2
adds r4, r3, 0
ldr r0, [sp, 0x28]
lsls r0, 24
lsrs r0, 24
str r0, [sp]
movs r0, 0
mov r10, r0
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r7, r1, 31
mov r2, r9
cmp r2, 0
beq _08056518
movs r5, 0
b _080564A6
_080564A2:
adds r4, 0x4
adds r5, 0x1
_080564A6:
cmp r5, 0x40
bgt _080564BC
ldr r0, [r4]
cmp r0, 0
beq _080564BC
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _080564A2
movs r7, 0x1
_080564BC:
cmp r7, 0
beq _080564F2
ldr r0, _080564DC
ldr r1, [r6, 0x70]
movs r2, 0
bl sub_80708B4
ldr r0, [sp, 0x24]
cmp r0, 0
bne _080564E4
ldr r0, _080564E0
mov r1, r8
movs r2, 0
bl sub_80928C0
b _080564F2
.align 2, 0
_080564DC: .4byte gUnknown_202DF98
_080564E0: .4byte gUnknown_202DE58
_080564E4:
ldr r0, _08056508
ldr r2, [sp, 0x24]
lsls r1, r2, 24
lsrs r1, 24
movs r2, 0
bl sub_8090DC4
_080564F2:
mov r0, r8
ldrh r1, [r0, 0x2]
ldr r0, _0805650C
cmp r1, r0
beq _08056510
adds r0, r6, 0
mov r1, r9
bl sub_805239C
b _08056518
.align 2, 0
_08056508: .4byte gUnknown_202DE58
_0805650C: .4byte 0x00000163
_08056510:
adds r0, r6, 0
mov r1, r9
bl sub_80522E8
_08056518:
cmp r7, 0
beq _08056544
ldr r2, [sp]
cmp r2, 0
beq _0805652A
adds r0, r6, 0
mov r1, r8
movs r2, 0x1
b _08056530
_0805652A:
adds r0, r6, 0
mov r1, r8
movs r2, 0
_08056530:
bl sub_8040BB0
lsls r0, 24
lsrs r0, 24
mov r10, r0
adds r0, r6, 0
mov r1, r8
bl sub_8040DA0
b _08056550
_08056544:
ldr r0, [r6, 0x70]
adds r0, 0x46
ldrb r1, [r0]
adds r0, r6, 0
bl sub_806CE68
_08056550:
mov r0, r10
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8056468
thumb_func_start sub_8056564
sub_8056564:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x18
adds r6, r0, 0
adds r5, r1, 0
adds r7, r2, 0
adds r4, r3, 0
ldr r0, [r6, 0x70]
mov r8, r0
ldr r0, _08056680
ldr r0, [r0]
ldr r1, _08056684
adds r0, r1
ldrb r0, [r0]
mov r9, r0
cmp r0, 0
beq _0805658C
b _080566E4
_0805658C:
mov r2, r8
movs r1, 0x4
ldrsh r0, [r2, r1]
bl GetPokemonSize
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
bls _080565A4
cmp r4, 0x1
bne _080565A4
b _080566E4
_080565A4:
ldrh r4, [r7, 0x2]
adds r0, r6, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
movs r2, 0x1
bl sub_80412E0
lsls r0, 16
lsrs r0, 16
bl sub_800ECB8
movs r2, 0x6
ldrsh r4, [r0, r2]
movs r1, 0
ldrsh r0, [r5, r1]
lsls r1, r0, 1
adds r1, r0
lsls r1, 11
movs r0, 0x2
ldrsh r2, [r5, r0]
lsls r0, r2, 1
adds r0, r2
lsls r0, 11
movs r2, 0x80
lsls r2, 5
adds r3, r0, r2
movs r2, 0xC0
lsls r2, 4
adds r0, r1, r2
cmp r0, 0
bge _080565EC
adds r0, 0xFF
_080565EC:
lsls r0, 8
lsrs r0, 16
ldr r1, _08056688
ldr r2, [sp, 0x14]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x14]
adds r0, r3, 0
cmp r0, 0
bge _08056602
adds r0, 0xFF
_08056602:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _0805668C
ands r2, r1
orrs r2, r0
str r2, [sp, 0x14]
cmp r4, 0
beq _080566E4
ldrh r4, [r7, 0x2]
adds r0, r6, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
movs r2, 0x1
bl sub_80412E0
lsls r0, 16
lsrs r0, 16
bl sub_800EF10
bl sub_800EF64
movs r0, 0x5E
bl sub_803E46C
mov r0, r8
movs r1, 0x4
ldrsh r5, [r0, r1]
ldrh r4, [r7, 0x2]
adds r0, r6, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
movs r2, 0x1
bl sub_80412E0
adds r1, r0, 0
lsls r1, 16
lsrs r1, 16
adds r0, r5, 0
bl sub_800E710
adds r2, r0, 0
movs r0, 0x1
negs r0, r0
cmp r2, r0
beq _08056690
add r0, sp, 0x8
adds r1, r6, 0
adds r1, 0x28
lsls r2, 24
lsrs r2, 24
bl sub_800569C
b _08056694
.align 2, 0
_08056680: .4byte gUnknown_203B418
_08056684: .4byte 0x0001820a
_08056688: .4byte 0xffff0000
_0805668C: .4byte 0x0000ffff
_08056690:
mov r2, r9
str r2, [sp, 0x8]
_08056694:
ldrh r4, [r7, 0x2]
adds r0, r6, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
movs r2, 0x1
bl sub_80412E0
mov r1, sp
strh r0, [r1]
mov r2, r8
ldrh r0, [r2, 0x4]
strh r0, [r1, 0x2]
ldr r0, [r6, 0xC]
cmp r0, 0
bge _080566BC
adds r0, 0xFF
_080566BC:
asrs r0, 8
strh r0, [r1, 0x4]
mov r1, sp
ldr r0, [r6, 0x10]
cmp r0, 0
bge _080566CA
adds r0, 0xFF
_080566CA:
asrs r0, 8
strh r0, [r1, 0x6]
mov r0, r8
adds r0, 0x46
ldrb r0, [r0]
str r0, [sp, 0xC]
movs r0, 0
str r0, [sp, 0x10]
add r1, sp, 0x14
mov r0, sp
bl sub_800E308
b _080566E8
_080566E4:
movs r0, 0x1
negs r0, r0
_080566E8:
add sp, 0x18
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8056564
thumb_func_start sub_80566F8
sub_80566F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x54
mov r10, r0
str r1, [sp, 0x1C]
str r2, [sp, 0x20]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0x24]
movs r0, 0
str r0, [sp, 0x34]
movs r7, 0
mov r1, r10
ldr r6, [r1, 0x70]
ldr r2, [sp, 0x1C]
ldrh r0, [r2, 0x2]
bl sub_800ED20
movs r1, 0x2
str r1, [sp, 0x44]
cmp r0, 0x1
beq _08056736
movs r2, 0x6
str r2, [sp, 0x44]
cmp r0, 0x2
bne _08056736
movs r0, 0x3
str r0, [sp, 0x44]
_08056736:
mov r1, r10
ldrh r0, [r1, 0x6]
lsls r0, 16
ldrh r3, [r1, 0x4]
orrs r3, r0
str r3, [sp, 0xC]
ldr r1, _08056814
adds r2, r6, 0
adds r2, 0x46
ldrb r0, [r2]
lsls r0, 2
adds r0, r1
movs r1, 0
ldrsh r6, [r0, r1]
str r6, [sp, 0x28]
movs r1, 0x2
ldrsh r6, [r0, r1]
str r6, [sp, 0x2C]
movs r6, 0
str r6, [sp, 0x30]
mov r8, r2
ldr r0, [sp, 0x20]
cmp r6, r0
bge _080567EC
add r0, sp, 0xC
movs r2, 0
ldrsh r1, [r0, r2]
cmp r1, 0
blt _080567EC
asrs r0, r3, 16
cmp r0, 0
blt _080567EC
cmp r1, 0x37
bgt _080567EC
cmp r0, 0x1F
bgt _080567EC
add r6, sp, 0xC
_08056780:
ldrh r0, [r6]
ldr r1, [sp, 0x28]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r2, _08056818
ands r2, r3
orrs r2, r0
asrs r0, r2, 16
ldr r1, [sp, 0x2C]
adds r0, r1
lsls r0, 16
ldr r1, _0805681C
ands r1, r2
orrs r1, r0
str r1, [sp, 0xC]
adds r7, 0x1
movs r2, 0
ldrsh r0, [r6, r2]
asrs r1, 16
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _080567EC
ldr r0, [r2, 0x10]
cmp r0, 0
beq _080567C6
bl sub_80450F8
cmp r0, 0x1
beq _080567EC
_080567C6:
ldr r0, [sp, 0x30]
adds r0, 0x1
str r0, [sp, 0x30]
ldr r1, [sp, 0x20]
cmp r0, r1
bge _080567EC
movs r0, 0
ldrsh r2, [r6, r0]
cmp r2, 0
blt _080567EC
ldr r0, [sp, 0xC]
asrs r1, r0, 16
adds r3, r0, 0
cmp r1, 0
blt _080567EC
cmp r2, 0x37
bgt _080567EC
cmp r1, 0x1F
ble _08056780
_080567EC:
ldr r2, [sp, 0x1C]
ldrh r1, [r2, 0x2]
mov r0, r10
bl sub_805755C
lsls r0, 24
cmp r0, 0
beq _08056820
mov r0, r10
ldr r1, [sp, 0x1C]
bl sub_80570AC
lsls r0, 24
cmp r0, 0
bne _08056820
movs r6, 0x1
negs r6, r6
str r6, [sp, 0x40]
b _0805682E
.align 2, 0
_08056814: .4byte gUnknown_80F4448
_08056818: .4byte 0xffff0000
_0805681C: .4byte 0x0000ffff
_08056820:
mov r0, r10
add r1, sp, 0xC
ldr r2, [sp, 0x1C]
ldr r3, [sp, 0x20]
bl sub_8056564
str r0, [sp, 0x40]
_0805682E:
mov r0, r10
ldrh r1, [r0, 0x4]
add r0, sp, 0xC
strh r1, [r0]
mov r2, r10
ldrh r1, [r2, 0x6]
strh r1, [r0, 0x2]
ldr r1, _08056874
mov r6, r8
ldrb r0, [r6]
lsls r0, 2
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
str r1, [sp, 0x28]
movs r1, 0x2
ldrsh r6, [r0, r1]
str r6, [sp, 0x2C]
movs r0, 0x18
ldr r1, [sp, 0x44]
bl __divsi3
adds r1, r7, 0
muls r1, r0
ldr r2, [sp, 0x20]
cmp r2, 0x1
ble _08056878
adds r6, r1, 0
adds r6, 0x8
str r6, [sp, 0x38]
cmp r6, 0x3F
ble _0805687C
movs r0, 0x40
str r0, [sp, 0x38]
b _0805687C
.align 2, 0
_08056874: .4byte gUnknown_80F4448
_08056878:
movs r2, 0x20
str r2, [sp, 0x38]
_0805687C:
movs r6, 0
mov r9, r6
movs r0, 0x80
lsls r0, 12
bl __divsi3
str r0, [sp, 0x48]
ldr r1, _0805696C
mov r2, r8
ldrb r0, [r2]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
str r0, [sp, 0x3C]
ldr r0, _08056970
ldr r0, [r0]
ldr r6, _08056974
adds r0, r6
movs r1, 0x1
strb r1, [r0]
movs r0, 0
str r0, [sp, 0x30]
ldr r1, [sp, 0x20]
cmp r0, r1
blt _080568B0
b _08056AB6
_080568B0:
add r0, sp, 0xC
movs r2, 0
ldrsh r1, [r0, r2]
cmp r1, 0
bge _080568BC
b _08056AB6
_080568BC:
ldrh r0, [r0, 0x2]
lsls r0, 16
asrs r0, 16
cmp r0, 0
bge _080568C8
b _08056AB6
_080568C8:
cmp r1, 0x37
ble _080568CE
b _08056AB6
_080568CE:
cmp r0, 0x1F
ble _080568D4
b _08056AB6
_080568D4:
add r7, sp, 0xC
_080568D6:
ldr r6, [sp, 0xC]
ldrh r0, [r7]
ldr r1, [sp, 0x28]
adds r0, r1
strh r0, [r7]
ldrh r0, [r7, 0x2]
ldr r2, [sp, 0x2C]
adds r0, r2
strh r0, [r7, 0x2]
add r0, sp, 0xC
bl sub_803F428
lsls r0, 24
cmp r0, 0
bne _080568F6
b _08056A00
_080568F6:
ldr r0, _08056970
ldr r0, [r0]
ldr r1, _08056978
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08056906
b _08056A00
_08056906:
lsls r1, r6, 16
asrs r1, 16
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r2, 0xC0
lsls r2, 4
adds r4, r0, r2
asrs r1, r6, 16
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r6, 0x80
lsls r6, 5
adds r5, r0, r6
ldr r1, [sp, 0x28]
lsls r0, r1, 8
ldr r6, [sp, 0x44]
adds r2, r6, 0
muls r2, r0
str r2, [sp, 0x4C]
ldr r1, [sp, 0x2C]
lsls r0, r1, 8
adds r2, r6, 0
muls r2, r0
str r2, [sp, 0x50]
movs r6, 0
movs r0, 0x18
ldr r1, [sp, 0x44]
bl __divsi3
mov r8, r0
cmp r6, r8
bge _08056A0E
_0805694A:
ldr r0, [sp, 0x40]
cmp r0, 0
blt _080569D4
ldr r1, [sp, 0x24]
cmp r1, 0
beq _0805697C
mov r0, r9
cmp r0, 0
bge _0805695E
adds r0, 0xFF
_0805695E:
asrs r0, 8
bl sub_8009C7C
ldr r2, [sp, 0x38]
adds r3, r0, 0
muls r3, r2
b _0805697E
.align 2, 0
_0805696C: .4byte gUnknown_81069D4
_08056970: .4byte gUnknown_203B418
_08056974: .4byte 0x0001c05e
_08056978: .4byte 0x0001820a
_0805697C:
movs r3, 0
_0805697E:
adds r0, r4, 0
cmp r4, 0
bge _08056986
adds r0, 0xFF
_08056986:
lsls r0, 8
lsrs r0, 16
ldr r1, _080569F0
ldr r2, [sp, 0x10]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x10]
subs r0, r5, r3
cmp r0, 0
bge _0805699C
adds r0, 0xFF
_0805699C:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _080569F4
ands r2, r1
orrs r2, r0
str r2, [sp, 0x10]
adds r2, r5, 0
cmp r2, 0
bge _080569B2
adds r2, 0xFF
_080569B2:
asrs r2, 8
ldr r0, _080569F8
ldr r0, [r0]
ldr r1, _080569FC
adds r0, r1
movs r1, 0
ldrsh r0, [r0, r1]
subs r2, r0
lsrs r0, r2, 31
adds r2, r0
asrs r2, 1
ldr r0, [sp, 0x3C]
adds r2, r0
ldr r0, [sp, 0x40]
add r1, sp, 0x10
bl sub_800E3AC
_080569D4:
movs r0, 0x30
bl sub_803E46C
ldr r1, [sp, 0x4C]
adds r4, r1
ldr r2, [sp, 0x50]
adds r5, r2
ldr r0, [sp, 0x48]
add r9, r0
adds r6, 0x1
cmp r6, r8
blt _0805694A
b _08056A0E
.align 2, 0
_080569F0: .4byte 0xffff0000
_080569F4: .4byte 0x0000ffff
_080569F8: .4byte gUnknown_203B418
_080569FC: .4byte 0x000181f2
_08056A00:
movs r0, 0x18
ldr r1, [sp, 0x44]
bl __divsi3
ldr r1, [sp, 0x48]
muls r0, r1
add r9, r0
_08056A0E:
movs r2, 0
ldrsh r0, [r7, r2]
movs r6, 0x2
ldrsh r1, [r7, r6]
bl sub_804954C
adds r6, r0, 0
ldrh r1, [r6]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _08056AB6
ldr r0, [r6, 0x10]
cmp r0, 0
beq _08056A8E
bl sub_80450F8
cmp r0, 0x1
bne _08056A8E
ldr r0, [r6, 0x10]
ldr r1, [sp, 0x1C]
bl sub_80571F0
lsls r0, 24
cmp r0, 0
bne _08056A8E
ldr r0, [sp, 0x34]
cmp r0, 0
bgt _08056AB6
movs r4, 0
mov r2, r10
ldr r1, [r2, 0x70]
adds r0, r1, 0
adds r0, 0xBC
ldrb r2, [r0]
cmp r2, 0x2
beq _08056A64
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0x1
beq _08056A64
cmp r2, 0x4
bne _08056A66
_08056A64:
movs r4, 0x1
_08056A66:
mov r0, r10
ldr r1, [sp, 0x1C]
movs r2, 0
bl sub_807CD64
adds r2, r0, 0
lsls r2, 16
asrs r2, 16
ldr r0, [r6, 0x10]
str r0, [sp]
ldr r6, [sp, 0x1C]
str r6, [sp, 0x4]
str r4, [sp, 0x8]
ldr r0, [sp, 0x34]
add r1, sp, 0x14
mov r3, r10
bl sub_8056F80
str r0, [sp, 0x34]
b _08056AB6
_08056A8E:
ldr r0, [sp, 0x30]
adds r0, 0x1
str r0, [sp, 0x30]
ldr r1, [sp, 0x20]
cmp r0, r1
bge _08056AB6
movs r2, 0
ldrsh r1, [r7, r2]
cmp r1, 0
blt _08056AB6
ldrh r0, [r7, 0x2]
lsls r0, 16
asrs r0, 16
cmp r0, 0
blt _08056AB6
cmp r1, 0x37
bgt _08056AB6
cmp r0, 0x1F
bgt _08056AB6
b _080568D6
_08056AB6:
ldr r6, [sp, 0x40]
cmp r6, 0
blt _08056AC2
adds r0, r6, 0
bl sub_800DC14
_08056AC2:
movs r0, 0x1
bl sub_804178C
ldr r0, _08056AF4
ldr r0, [r0]
ldr r1, _08056AF8
adds r0, r1
movs r2, 0
strb r2, [r0]
ldr r6, [sp, 0x34]
cmp r6, 0
ble _08056AFC
lsls r1, r6, 2
add r0, sp, 0x14
adds r1, r0
str r2, [r1]
ldr r1, [sp, 0x78]
str r1, [sp]
mov r1, r10
ldr r2, [sp, 0x1C]
ldr r3, [sp, 0x74]
bl sub_8053704
b _08056B22
.align 2, 0
_08056AF4: .4byte gUnknown_203B418
_08056AF8: .4byte 0x0001c05e
_08056AFC:
ldr r0, [sp, 0x20]
cmp r0, 0x1
bne _08056B22
add r0, sp, 0xC
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _08056B22
movs r0, 0x1
movs r1, 0x4A
bl sub_803E708
mov r0, r10
movs r1, 0
ldr r2, [sp, 0x1C]
add r3, sp, 0xC
bl sub_8041168
_08056B22:
add sp, 0x54
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80566F8
thumb_func_start sub_8056B34
sub_8056B34:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r7, r0, 0
adds r6, r1, 0
mov r8, r2
adds r1, r3, 0
ldr r4, [sp, 0x24]
lsls r4, 24
lsrs r4, 24
mov r0, r8
bl sub_8092BD8
adds r5, r0, 0
movs r0, 0x64
bl sub_8084100
str r0, [sp]
ldr r0, [r7, 0x70]
mov r9, r0
ldr r1, [r6, 0x70]
mov r10, r1
cmp r4, 0
beq _08056B70
cmp r7, r6
bne _08056B70
b _08056CD4
_08056B70:
mov r0, r8
ldrh r1, [r0, 0x2]
ldr r0, _08056CC4
cmp r1, r0
bne _08056B8A
adds r0, r7, 0
movs r1, 0x4
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08056B8A
b _08056CD4
_08056B8A:
mov r0, r9
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0x1
bne _08056B96
b _08056CD4
_08056B96:
cmp r0, 0x2
bne _08056B9C
b _08056CBE
_08056B9C:
cmp r5, 0x64
ble _08056BA2
b _08056CD4
_08056BA2:
adds r0, r6, 0
movs r1, 0x23
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08056BB6
ldr r0, _08056CC8
ldr r0, [r0]
subs r5, r0
_08056BB6:
adds r0, r6, 0
movs r1, 0x5
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08056BCA
ldr r0, _08056CCC
ldr r0, [r0]
subs r5, r0
_08056BCA:
mov r1, r9
movs r0, 0x24
ldrsh r4, [r1, r0]
adds r0, r7, 0
movs r1, 0x33
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08056BE0
adds r4, 0x2
_08056BE0:
mov r1, r8
ldrh r0, [r1, 0x2]
cmp r0, 0x40
bne _08056BFC
adds r0, r7, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x4
beq _08056CD4
cmp r0, 0x1
bne _08056BFC
subs r4, 0x2
_08056BFC:
cmp r4, 0
bge _08056C02
movs r4, 0
_08056C02:
cmp r4, 0x14
ble _08056C08
movs r4, 0x14
_08056C08:
ldr r1, _08056CD0
lsls r0, r4, 2
adds r0, r1
ldr r0, [r0]
cmp r0, 0
bge _08056C16
movs r0, 0
_08056C16:
movs r1, 0xC8
lsls r1, 7
cmp r0, r1
ble _08056C20
adds r0, r1, 0
_08056C20:
muls r5, r0
adds r0, r5, 0
cmp r5, 0
bge _08056C2A
adds r0, 0xFF
_08056C2A:
asrs r5, r0, 8
mov r0, r10
movs r1, 0x26
ldrsh r4, [r0, r1]
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
beq _08056C3C
movs r4, 0xA
_08056C3C:
adds r0, r6, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
bne _08056C5A
adds r0, r6, 0
movs r1, 0x1D
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08056C5A
adds r4, 0x2
_08056C5A:
adds r0, r7, 0
movs r1, 0x30
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08056C86
mov r0, r8
bl sub_8092B00
lsls r0, 24
lsrs r0, 24
bl sub_8092354
movs r1, 0
lsls r0, 24
cmp r0, 0
bne _08056C80
movs r1, 0x1
_08056C80:
cmp r1, 0
bne _08056C86
adds r4, 0x2
_08056C86:
cmp r4, 0
bge _08056C8C
movs r4, 0
_08056C8C:
cmp r4, 0x14
ble _08056C92
movs r4, 0x14
_08056C92:
ldr r0, _08056CD0
lsls r1, r4, 2
adds r0, 0x54
adds r1, r0
ldr r0, [r1]
cmp r0, 0
bge _08056CA2
movs r0, 0
_08056CA2:
movs r1, 0xC8
lsls r1, 7
cmp r0, r1
ble _08056CAC
adds r0, r1, 0
_08056CAC:
muls r5, r0
adds r0, r5, 0
cmp r5, 0
bge _08056CB6
adds r0, 0xFF
_08056CB6:
asrs r5, r0, 8
ldr r0, [sp]
cmp r0, r5
blt _08056CD4
_08056CBE:
movs r0, 0
b _08056CD6
.align 2, 0
_08056CC4: .4byte 0x00000163
_08056CC8: .4byte gUnknown_80F519C
_08056CCC: .4byte gUnknown_80F51A0
_08056CD0: .4byte gUnknown_80F50F4
_08056CD4:
movs r0, 0x1
_08056CD6:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8056B34
thumb_func_start sub_8056CE8
sub_8056CE8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
str r0, [sp, 0x10]
adds r5, r1, 0
mov r8, r2
movs r0, 0
mov r9, r0
movs r3, 0
ldr r1, [r5, 0x70]
adds r0, r1, 0
adds r0, 0xBC
ldrb r2, [r0]
cmp r2, 0x2
beq _08056D18
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0x1
beq _08056D18
cmp r2, 0x4
bne _08056D1A
_08056D18:
movs r3, 0x1
_08056D1A:
mov r10, r3
movs r1, 0
ldr r0, [r5, 0x70]
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _08056D2C
cmp r0, 0x4
bne _08056D2E
_08056D2C:
movs r1, 0x1
_08056D2E:
str r1, [sp, 0x14]
adds r0, r5, 0
movs r1, 0x7
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08056D44
movs r1, 0
str r1, [sp, 0x14]
mov r10, r1
_08056D44:
adds r0, r5, 0
mov r1, r8
movs r2, 0
bl sub_807CD64
lsls r0, 16
asrs r7, r0, 16
movs r0, 0xF
ands r0, r7
cmp r0, 0x4
bne _08056D86
adds r0, r5, 0
mov r1, r8
bl sub_80570AC
lsls r0, 24
lsrs r4, r0, 24
mov r2, r8
ldrh r0, [r2, 0x2]
cmp r0, 0x97
bne _08056D7E
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08056D7E
movs r4, 0x1
_08056D7E:
movs r7, 0x73
cmp r4, 0
beq _08056D86
movs r7, 0
_08056D86:
movs r1, 0xF0
ands r1, r7
cmp r1, 0
bne _08056DA6
adds r0, r5, 0
bl sub_80696A8
cmp r0, 0
bne _08056D9A
b _08056F64
_08056D9A:
str r0, [sp]
mov r0, r8
str r0, [sp, 0x4]
mov r1, r10
str r1, [sp, 0x8]
b _08056F56
_08056DA6:
cmp r1, 0x10
beq _08056DAE
cmp r1, 0x20
bne _08056E34
_08056DAE:
ldr r0, [r5, 0x70]
cmp r1, 0x20
bne _08056DBC
adds r0, 0x46
ldrb r4, [r0]
movs r0, 0x8
b _08056DCA
_08056DBC:
adds r0, 0x46
ldrb r0, [r0]
subs r4, r0, 0x1
movs r0, 0x3
cmp r0, 0
bne _08056DCA
b _08056F64
_08056DCA:
adds r6, r0, 0
_08056DCC:
movs r0, 0x7
ands r4, r0
ldr r0, _08056E28
lsls r3, r4, 2
adds r3, r0
ldrh r0, [r3]
ldrh r2, [r5, 0x4]
adds r0, r2
lsls r0, 16
lsrs r0, 16
ldr r2, _08056E2C
ldr r1, [sp, 0xC]
ands r1, r2
orrs r1, r0
str r1, [sp, 0xC]
ldrh r2, [r3, 0x2]
ldrh r0, [r5, 0x6]
adds r2, r0
lsls r2, 16
ldr r0, _08056E30
ands r1, r0
orrs r1, r2
str r1, [sp, 0xC]
add r0, sp, 0xC
bl sub_804AD0C
cmp r0, 0
beq _08056E1C
str r0, [sp]
mov r1, r8
str r1, [sp, 0x4]
mov r2, r10
str r2, [sp, 0x8]
mov r0, r9
ldr r1, [sp, 0x10]
adds r2, r7, 0
adds r3, r5, 0
bl sub_8056F80
mov r9, r0
_08056E1C:
subs r6, 0x1
adds r4, 0x1
cmp r6, 0
bne _08056DCC
b _08056F64
.align 2, 0
_08056E28: .4byte gUnknown_80F4448
_08056E2C: .4byte 0xffff0000
_08056E30: .4byte 0x0000ffff
_08056E34:
cmp r1, 0x30
bne _08056E9C
movs r6, 0
_08056E3A:
ldr r0, _08056E74
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08056E78
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08056E94
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045A70
lsls r0, 24
cmp r0, 0
beq _08056E94
cmp r4, r5
bne _08056E7C
str r5, [sp]
mov r0, r8
str r0, [sp, 0x4]
ldr r1, [sp, 0x14]
str r1, [sp, 0x8]
b _08056E86
.align 2, 0
_08056E74: .4byte gUnknown_203B418
_08056E78: .4byte 0x000135cc
_08056E7C:
str r4, [sp]
mov r2, r8
str r2, [sp, 0x4]
mov r0, r10
str r0, [sp, 0x8]
_08056E86:
mov r0, r9
ldr r1, [sp, 0x10]
adds r2, r7, 0
adds r3, r5, 0
bl sub_8056F80
mov r9, r0
_08056E94:
adds r6, 0x1
cmp r6, 0x13
ble _08056E3A
b _08056F64
_08056E9C:
cmp r1, 0x40
bne _08056EEA
movs r4, 0
adds r0, r5, 0
bl sub_80696FC
cmp r0, 0
beq _08056ED0
mov r4, r9
str r0, [sp]
mov r1, r8
str r1, [sp, 0x4]
mov r2, r10
str r2, [sp, 0x8]
adds r0, r4, 0
ldr r1, [sp, 0x10]
adds r2, r7, 0
adds r3, r5, 0
bl sub_8056F80
mov r9, r0
mov r1, r9
eors r1, r4
negs r0, r1
orrs r0, r1
lsrs r4, r0, 31
_08056ED0:
cmp r4, 0
bne _08056F64
adds r0, r5, 0
bl sub_806977C
cmp r0, 0
beq _08056F64
str r0, [sp]
mov r0, r8
str r0, [sp, 0x4]
mov r1, r10
str r1, [sp, 0x8]
b _08056F56
_08056EEA:
cmp r1, 0x50
beq _08056F64
cmp r1, 0x80
bne _08056F00
adds r0, r5, 0
bl sub_80696FC
cmp r0, 0
beq _08056F64
str r0, [sp]
b _08056F4E
_08056F00:
cmp r1, 0x60
bne _08056F48
movs r6, 0
_08056F06:
ldr r0, _08056F40
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08056F44
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08056F38
str r4, [sp]
mov r0, r8
str r0, [sp, 0x4]
mov r1, r10
str r1, [sp, 0x8]
mov r0, r9
ldr r1, [sp, 0x10]
adds r2, r7, 0
adds r3, r5, 0
bl sub_8056F80
mov r9, r0
_08056F38:
adds r6, 0x1
cmp r6, 0x13
ble _08056F06
b _08056F64
.align 2, 0
_08056F40: .4byte gUnknown_203B418
_08056F44: .4byte 0x000135cc
_08056F48:
cmp r1, 0x70
bne _08056F64
str r5, [sp]
_08056F4E:
mov r2, r8
str r2, [sp, 0x4]
mov r0, r10
str r0, [sp, 0x8]
_08056F56:
mov r0, r9
ldr r1, [sp, 0x10]
adds r2, r7, 0
adds r3, r5, 0
bl sub_8056F80
mov r9, r0
_08056F64:
mov r1, r9
lsls r0, r1, 2
ldr r2, [sp, 0x10]
adds r0, r2
movs r1, 0
str r1, [r0]
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8056CE8
thumb_func_start sub_8056F80
sub_8056F80:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r5, r0, 0
mov r8, r1
adds r4, r3, 0
ldr r7, [sp, 0x18]
ldr r0, [sp, 0x20]
lsls r2, 16
asrs r2, 16
lsls r0, 24
lsrs r0, 24
mov r12, r0
movs r6, 0
ldr r1, [r7, 0x70]
ldr r3, [sp, 0x1C]
ldrh r0, [r3, 0x2]
cmp r0, 0xFC
bne _08056FAA
cmp r4, r7
beq _08057060
_08056FAA:
ldrb r0, [r1, 0x8]
cmp r0, 0x1
beq _08057060
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x4
beq _08057060
cmp r0, 0x1
beq _08057060
mov r0, r12
cmp r0, 0
bne _0805702C
movs r0, 0xF
ands r0, r2
cmp r0, 0
beq _08056FD0
cmp r0, 0x4
bne _08056FE6
_08056FD0:
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0805702E
b _0805702C
_08056FE6:
cmp r0, 0x1
bne _08056FFE
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0805702E
b _0805702C
_08056FFE:
cmp r0, 0x2
beq _0805702C
cmp r0, 0x5
bne _0805700C
cmp r4, r7
beq _0805702E
b _0805702C
_0805700C:
cmp r0, 0x6
bne _08057028
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0805702E
cmp r4, r7
beq _0805702E
b _0805702C
_08057028:
cmp r0, 0x3
bne _0805702E
_0805702C:
movs r6, 0x1
_0805702E:
adds r0, r7, 0
ldr r1, [sp, 0x1C]
bl sub_80571F0
lsls r0, 24
cmp r0, 0
beq _0805703E
movs r6, 0
_0805703E:
cmp r6, 0
beq _08057060
cmp r5, 0x3F
bgt _08057060
lsls r0, r5, 2
add r0, r8
str r7, [r0]
ldr r0, [r7, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0805705E
ldr r1, _0805706C
ldr r0, [r1]
cmp r0, 0
bne _0805705E
str r7, [r1]
_0805705E:
adds r5, 0x1
_08057060:
adds r0, r5, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805706C: .4byte gUnknown_203B438
thumb_func_end sub_8056F80
thumb_func_start sub_8057070
sub_8057070:
push {lr}
bl sub_8092BA8
cmp r0, 0
bne _08057082
movs r0, 0x2
movs r1, 0x6
bl sub_808411C
_08057082:
pop {r1}
bx r1
thumb_func_end sub_8057070
thumb_func_start sub_8057088
sub_8057088:
push {lr}
ldrh r1, [r0, 0x2]
cmp r1, 0xEE
beq _080570A4
cmp r1, 0xEF
beq _080570A4
cmp r1, 0xF2
beq _080570A4
movs r0, 0x88
lsls r0, 1
cmp r1, r0
beq _080570A4
movs r0, 0
b _080570A6
_080570A4:
movs r0, 0x1
_080570A6:
pop {r1}
bx r1
thumb_func_end sub_8057088
thumb_func_start sub_80570AC
sub_80570AC:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080570C2
b _080570E8
_080570BE:
movs r0, 0x1
b _080570EA
_080570C2:
ldr r0, [r4, 0x70]
movs r3, 0
ldr r2, _080570F0
adds r4, r0, 0
adds r4, 0xC0
_080570CC:
ldrh r1, [r2]
cmp r1, 0
beq _080570E8
ldrh r0, [r5, 0x2]
cmp r0, r1
bne _080570E0
ldrb r0, [r4]
ldrb r1, [r2, 0x2]
cmp r0, r1
beq _080570BE
_080570E0:
adds r2, 0x4
adds r3, 0x1
cmp r3, 0x63
ble _080570CC
_080570E8:
movs r0, 0
_080570EA:
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_080570F0: .4byte gUnknown_81069F4
thumb_func_end sub_80570AC
thumb_func_start sub_80570F4
sub_80570F4:
push {r4-r7,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r7, r1, 24
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805713C
ldr r3, [r4, 0x70]
movs r4, 0
adds r6, r3, 0
adds r6, 0xC0
ldr r2, _08057138
_08057110:
ldrb r1, [r2]
cmp r1, 0
beq _0805713C
ldrb r0, [r6]
adds r5, r3, 0
adds r5, 0xC0
cmp r0, r1
beq _08057132
adds r2, 0x4
adds r4, 0x1
cmp r4, 0x63
ble _08057110
cmp r7, 0
beq _0805713C
ldrb r0, [r5]
cmp r0, 0xB
bne _0805713C
_08057132:
movs r0, 0x1
b _0805713E
.align 2, 0
_08057138: .4byte gUnknown_8106A1C
_0805713C:
movs r0, 0
_0805713E:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80570F4
thumb_func_start sub_8057144
sub_8057144:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x144
mov r9, r0
movs r7, 0
movs r5, 0
_08057154:
ldr r0, _080571D4
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080571D8
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
adds r5, 0x1
mov r8, r5
cmp r0, 0
beq _080571B8
ldr r0, [r4, 0x70]
movs r1, 0x8C
lsls r1, 1
adds r5, r0, r1
adds r4, r5, 0
lsls r0, r7, 2
mov r1, sp
adds r2, r0, r1
movs r6, 0x3
_08057184:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080571AE
ldrh r1, [r4, 0x2]
mov r0, r9
str r2, [sp, 0x140]
bl sub_805755C
lsls r0, 24
ldr r2, [sp, 0x140]
cmp r0, 0
bne _080571AE
ldrh r0, [r4, 0x2]
cmp r0, 0x8A
beq _080571AE
cmp r7, 0x4F
bgt _080571AE
stm r2!, {r5}
adds r7, 0x1
_080571AE:
adds r4, 0x8
adds r5, 0x8
subs r6, 0x1
cmp r6, 0
bge _08057184
_080571B8:
mov r5, r8
cmp r5, 0x13
ble _08057154
cmp r7, 0
beq _080571DC
adds r0, r7, 0
bl sub_8084100
lsls r0, 2
add r0, sp
ldr r0, [r0]
ldrh r0, [r0, 0x2]
b _080571DE
.align 2, 0
_080571D4: .4byte gUnknown_203B418
_080571D8: .4byte 0x000135cc
_080571DC:
ldr r0, _080571EC
_080571DE:
add sp, 0x144
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080571EC: .4byte 0x00000163
thumb_func_end sub_8057144
thumb_func_start sub_80571F0
sub_80571F0:
push {lr}
ldr r0, [r0, 0x70]
adds r2, r0, 0
adds r2, 0xFF
ldrb r2, [r2]
cmp r2, 0x1
bne _08057212
ldrh r1, [r1, 0x2]
cmp r1, 0x88
beq _08057274
cmp r1, 0xA2
beq _08057274
cmp r1, 0x39
beq _08057274
cmp r1, 0x40
beq _08057274
b _08057264
_08057212:
cmp r2, 0x2
bne _08057274
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x9
bne _0805722A
ldrh r1, [r1, 0x2]
cmp r1, 0x20
beq _08057274
cmp r1, 0xDB
bne _08057264
b _08057274
_0805722A:
cmp r0, 0xA
bne _08057264
ldrh r1, [r1, 0x2]
cmp r1, 0x76
beq _08057274
movs r0, 0x94
lsls r0, 1
cmp r1, r0
beq _08057274
cmp r1, 0x77
bne _08057264
ldr r0, _08057268
ldr r0, [r0]
ldr r1, _0805726C
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
cmp r1, 0
bge _08057252
movs r1, 0
_08057252:
cmp r1, 0x4A
ble _08057258
movs r1, 0x4A
_08057258:
ldr r0, _08057270
lsls r1, 3
adds r1, r0
ldrh r0, [r1]
cmp r0, 0x76
beq _08057274
_08057264:
movs r0, 0x1
b _08057276
.align 2, 0
_08057268: .4byte gUnknown_203B418
_0805726C: .4byte 0x00003a0e
_08057270: .4byte gUnknown_80F5D10
_08057274:
movs r0, 0
_08057276:
pop {r1}
bx r1
thumb_func_end sub_80571F0
thumb_func_start sub_805727C
sub_805727C:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
adds r4, r2, 0
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _080572FC
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080572FC
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080572FC
ldr r1, [r5, 0x70]
movs r2, 0xAC
lsls r2, 1
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _080572FC
movs r2, 0xE
ldrsh r0, [r1, r2]
cmp r0, 0
beq _080572FC
cmp r4, 0
beq _080572DE
adds r0, r6, 0
movs r1, 0x26
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080572D2
lsls r0, r4, 1
b _080572D4
_080572D2:
adds r0, r4, 0
_080572D4:
bl sub_8084160
lsls r0, 24
lsrs r4, r0, 24
b _080572E0
_080572DE:
movs r4, 0x1
_080572E0:
cmp r4, 0
beq _08057300
cmp r6, r5
beq _08057300
adds r0, r5, 0
movs r1, 0x4C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08057300
adds r0, r5, 0
bl sub_80429C8
_080572FC:
movs r0, 0
b _08057302
_08057300:
adds r0, r4, 0
_08057302:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805727C
thumb_func_start sub_8057308
sub_8057308:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0805731C
movs r0, 0
b _08057340
_0805731C:
cmp r4, 0
bne _08057324
movs r0, 0x1
b _08057340
_08057324:
adds r0, r5, 0
movs r1, 0x26
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _08057336
adds r0, r4, 0
b _08057338
_08057336:
lsls r0, r4, 1
_08057338:
bl sub_8084160
lsls r0, 24
lsrs r0, 24
_08057340:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8057308
thumb_func_start sub_8057348
sub_8057348:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
lsls r2, 24
lsrs r2, 24
mov r8, r2
ldr r6, [r7, 0x70]
lsls r1, 3
movs r0, 0x8C
lsls r0, 1
adds r1, r0
adds r4, r6, r1
ldrb r1, [r4]
movs r2, 0x1
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _080573BE
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080573BE
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _080573BE
ldrb r1, [r4, 0x1]
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _0805738E
b _080573BE
_0805738A:
movs r0, 0x1
b _080573C0
_0805738E:
movs r5, 0
b _08057394
_08057392:
adds r5, 0x1
_08057394:
cmp r5, 0x3
bgt _080573BE
adds r0, r7, 0
adds r1, r4, 0
mov r2, r8
bl sub_80573CC
lsls r0, 24
cmp r0, 0
bne _0805738A
adds r4, 0x8
movs r1, 0x9C
lsls r1, 1
adds r0, r6, r1
cmp r4, r0
bcs _080573BE
ldrb r1, [r4]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08057392
_080573BE:
movs r0, 0
_080573C0:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8057348
thumb_func_start sub_80573CC
sub_80573CC:
push {r4-r6,lr}
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
ldr r6, [r0, 0x70]
ldrh r1, [r4, 0x2]
ldr r0, _08057430
cmp r1, r0
beq _08057442
ldrb r1, [r4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0805743E
ldrb r1, [r4, 0x1]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0805743E
cmp r2, 0
beq _08057442
ldrb r0, [r4, 0x4]
cmp r0, 0
beq _0805743E
adds r0, r6, 0
adds r0, 0xBC
ldrb r1, [r0]
adds r5, r0, 0
cmp r1, 0x5
bne _08057414
adds r0, r4, 0
bl sub_8092C54
lsls r0, 24
cmp r0, 0
beq _0805743E
_08057414:
ldrb r0, [r5]
cmp r0, 0x6
bne _08057442
ldrh r1, [r4, 0x2]
movs r0, 0xB0
lsls r0, 1
cmp r1, r0
bne _08057434
movs r1, 0x9C
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
b _08057436
.align 2, 0
_08057430: .4byte 0x00000163
_08057434:
ldrb r1, [r4]
_08057436:
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08057442
_0805743E:
movs r0, 0
b _08057444
_08057442:
movs r0, 0x1
_08057444:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80573CC
thumb_func_start sub_805744C
sub_805744C:
push {r4-r6,lr}
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
ldr r6, [r0, 0x70]
ldrh r1, [r4, 0x2]
ldr r0, _080574A8
cmp r1, r0
beq _080574BA
ldrb r1, [r4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _080574B6
ldrb r1, [r4, 0x1]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080574B6
cmp r2, 0
beq _080574BA
adds r0, r6, 0
adds r0, 0xBC
ldrb r1, [r0]
adds r5, r0, 0
cmp r1, 0x5
bne _0805748E
adds r0, r4, 0
bl sub_8092C54
lsls r0, 24
cmp r0, 0
beq _080574B6
_0805748E:
ldrb r0, [r5]
cmp r0, 0x6
bne _080574BA
ldrh r1, [r4, 0x2]
movs r0, 0xB0
lsls r0, 1
cmp r1, r0
bne _080574AC
movs r1, 0x9C
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
b _080574AE
.align 2, 0
_080574A8: .4byte 0x00000163
_080574AC:
ldrb r1, [r4]
_080574AE:
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _080574BA
_080574B6:
movs r0, 0
b _080574BC
_080574BA:
movs r0, 0x1
_080574BC:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805744C
thumb_func_start sub_80574C4
sub_80574C4:
push {r4-r6,lr}
sub sp, 0x104
adds r4, r0, 0
adds r5, r1, 0
movs r3, 0
movs r2, 0
ldr r0, [r4]
cmp r0, 0
beq _08057502
cmp r0, r5
beq _080574EA
_080574DA:
lsls r0, r3, 2
mov r6, sp
adds r1, r6, r0
lsls r0, r2, 2
adds r0, r4
ldr r0, [r0]
str r0, [r1]
adds r3, 0x1
_080574EA:
adds r2, 0x1
cmp r2, 0x40
bgt _08057502
lsls r0, r2, 2
adds r0, r4
ldr r0, [r0]
cmp r0, 0
beq _08057502
cmp r0, r5
beq _080574EA
cmp r3, 0x3F
ble _080574DA
_08057502:
movs r2, 0
ldr r0, [r4]
b _08057524
_08057508:
lsls r0, r3, 2
mov r6, sp
adds r1, r6, r0
lsls r0, r2, 2
adds r0, r4
ldr r0, [r0]
str r0, [r1]
adds r3, 0x1
_08057518:
adds r2, 0x1
cmp r2, 0x40
bgt _08057530
lsls r0, r2, 2
adds r0, r4
ldr r0, [r0]
_08057524:
cmp r0, 0
beq _08057530
cmp r0, r5
bne _08057518
cmp r3, 0x3F
ble _08057508
_08057530:
cmp r3, 0x40
bgt _08057542
movs r1, 0
lsls r0, r3, 2
add r0, sp
_0805753A:
stm r0!, {r1}
adds r3, 0x1
cmp r3, 0x40
ble _0805753A
_08057542:
mov r3, sp
adds r1, r4, 0
movs r2, 0x40
_08057548:
ldm r3!, {r0}
stm r1!, {r0}
subs r2, 0x1
cmp r2, 0
bge _08057548
add sp, 0x104
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80574C4
thumb_func_start sub_805755C
sub_805755C:
push {r4,lr}
lsls r1, 16
lsrs r4, r1, 16
cmp r4, 0x97
bne _08057576
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08057576
movs r0, 0
b _08057580
_08057576:
adds r0, r4, 0
bl sub_809422C
lsls r0, 24
lsrs r0, 24
_08057580:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805755C
thumb_func_start sub_8057588
sub_8057588:
push {r4-r6,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r6, r1, 24
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080575F8
ldr r5, [r4, 0x70]
movs r3, 0
_0805759E:
lsls r0, r3, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r2, r5, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
adds r4, r3, 0x1
cmp r0, 0
beq _080575F2
movs r3, 0x1
ldrb r1, [r2, 0x1]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _080575C8
movs r0, 0xEF
ands r0, r1
strb r0, [r2, 0x1]
movs r3, 0x2
_080575C8:
ldrb r1, [r2, 0x1]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080575F2
movs r0, 0xF7
ands r0, r1
strb r0, [r2, 0x1]
cmp r6, 0
beq _080575F2
cmp r3, 0
beq _080575F2
adds r1, r3, 0
_080575E2:
ldrb r0, [r2, 0x4]
cmp r0, 0
beq _080575EC
subs r0, 0x1
strb r0, [r2, 0x4]
_080575EC:
subs r1, 0x1
cmp r1, 0
bne _080575E2
_080575F2:
adds r3, r4, 0
cmp r3, 0x3
ble _0805759E
_080575F8:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8057588
thumb_func_start sub_8057600
sub_8057600:
push {r4,lr}
ldrh r4, [r0, 0x2]
adds r0, r1, 0
bl sub_8057620
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_8094828
lsls r0, 16
asrs r0, 16
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8057600
thumb_func_start sub_8057620
sub_8057620:
push {lr}
cmp r0, 0
beq _0805762C
lsls r0, 24
lsrs r0, 24
b _0805762E
_0805762C:
movs r0, 0
_0805762E:
pop {r1}
bx r1
thumb_func_end sub_8057620
thumb_func_start sub_8057634
sub_8057634:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08057678
movs r7, 0x1
ldr r0, _08057684
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057678
ldr r0, _08057688
ldr r2, [r0]
str r7, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076F80
_08057678:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057684: .4byte gUnknown_80F4DB4
_08057688: .4byte gUnknown_8106A4C
thumb_func_end sub_8057634
thumb_func_start sub_805768C
sub_805768C:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r3, 0
movs r6, 0
ldr r4, _080576B8
ldr r3, [r4]
adds r3, 0x1
str r3, [r4]
ldr r4, _080576BC
lsls r3, 2
adds r3, r4
ldr r3, [r3]
str r5, [sp]
bl sub_8055640
cmp r0, 0
bne _080576C4
ldr r1, _080576C0
movs r0, 0x1
strb r0, [r1]
b _080576C6
.align 2, 0
_080576B8: .4byte gUnknown_202F21C
_080576BC: .4byte gUnknown_8106A54
_080576C0: .4byte gUnknown_202F220
_080576C4:
movs r6, 0x1
_080576C6:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805768C
thumb_func_start sub_80576D0
sub_80576D0:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _080576F4
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r2, 0x1
adds r0, r5, 0
adds r1, r4, 0
bl sub_8075F34
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_080576F4: .4byte gUnknown_80F4F28
thumb_func_end sub_80576D0
thumb_func_start sub_80576F8
sub_80576F8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _0805771C
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8075C58
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805771C: .4byte gUnknown_80F4E74
thumb_func_end sub_80576F8
thumb_func_start sub_8057720
sub_8057720:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _08057744
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_8075DBC
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08057744: .4byte gUnknown_80F4E78
thumb_func_end sub_8057720
thumb_func_start sub_8057748
sub_8057748:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
ldr r4, _08057778
bl sub_807E580
lsls r0, 24
lsrs r0, 23
adds r0, r4
movs r1, 0
ldrsh r2, [r0, r1]
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_8077C44
movs r0, 0x1
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08057778: .4byte gUnknown_80F502A
thumb_func_end sub_8057748
thumb_func_start sub_805777C
sub_805777C:
push {lr}
bl sub_8079DB8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805777C
thumb_func_start sub_8057788
sub_8057788:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r4, r0, 0
adds r7, r1, 0
adds r6, r2, 0
mov r8, r3
movs r0, 0
mov r9, r0
adds r0, r4, 0
bl sub_8045128
adds r5, r0, 0
bl sub_804AF20
lsls r0, 24
cmp r0, 0
beq _080577BA
ldrh r1, [r5]
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
beq _080577CC
_080577BA:
ldr r0, _080577C8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r7, 0
bl sub_80522F4
b _0805780E
.align 2, 0
_080577C8: .4byte gUnknown_80FD14C
_080577CC:
adds r0, r4, 0
adds r1, r6, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _080577F8
ldr r0, _080577F4
ldr r3, [r0]
mov r0, r8
str r0, [sp]
adds r0, r4, 0
adds r1, r7, 0
adds r2, r6, 0
bl sub_8055640
adds r0, r4, 0
bl sub_8079764
b _0805780A
.align 2, 0
_080577F4: .4byte gUnknown_80F4F68
_080577F8:
ldr r0, _08057820
ldr r0, [r0]
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0xA
adds r3, r6, 0
bl sub_8079618
_0805780A:
movs r0, 0x1
mov r9, r0
_0805780E:
mov r0, r9
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057820: .4byte gUnknown_80FAD4C
thumb_func_end sub_8057788
thumb_func_start sub_8057824
sub_8057824:
push {lr}
ldr r2, _08057838
ldr r2, [r2]
movs r3, 0x1
bl sub_80775DC
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_08057838: .4byte gUnknown_8106A50
thumb_func_end sub_8057824
thumb_func_start sub_805783C
sub_805783C:
push {lr}
sub sp, 0x4
ldr r2, _08057858
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
movs r3, 0x80
bl sub_80772C0
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
.align 2, 0
_08057858: .4byte gUnknown_8106A4C
thumb_func_end sub_805783C
thumb_func_start sub_805785C
sub_805785C:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _08057894
ldr r0, [r0]
ldr r1, _08057898
ldrh r1, [r1]
ldr r2, _0805789C
adds r0, r2
strb r1, [r0]
movs r0, 0x1
movs r1, 0
bl sub_807EAA0
lsls r0, 24
cmp r0, 0
bne _0805788A
ldr r0, _080578A0
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_0805788A:
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08057894: .4byte gUnknown_203B418
_08057898: .4byte gUnknown_80F4F42
_0805789C: .4byte 0x0000e26b
_080578A0: .4byte gUnknown_80FCF74
thumb_func_end sub_805785C
thumb_func_start sub_80578A4
sub_80578A4:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _080578DC
ldr r0, [r0]
ldr r1, _080578E0
ldrh r1, [r1]
ldr r2, _080578E4
adds r0, r2
strb r1, [r0]
movs r0, 0x1
movs r1, 0
bl sub_807EAA0
lsls r0, 24
cmp r0, 0
bne _080578D2
ldr r0, _080578E8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_080578D2:
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_080578DC: .4byte gUnknown_203B418
_080578E0: .4byte gUnknown_80F4F42
_080578E4: .4byte 0x0000e26c
_080578E8: .4byte gUnknown_80FCF80
thumb_func_end sub_80578A4
thumb_func_start sub_80578EC
sub_80578EC:
push {lr}
movs r2, 0x1
movs r3, 0
bl sub_8079F20
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_80578EC
thumb_func_start sub_80578FC
sub_80578FC:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08057938
movs r7, 0x1
ldr r0, _08057944
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057938
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_80779F0
_08057938:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057944: .4byte gUnknown_80F4DB6
thumb_func_end sub_80578FC
thumb_func_start sub_8057948
sub_8057948:
push {lr}
bl sub_8078968
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8057948
thumb_func_start sub_8057954
sub_8057954:
push {lr}
sub sp, 0x4
adds r3, r2, 0
ldr r2, _08057970
ldr r2, [r2]
str r2, [sp]
movs r2, 0xC
bl sub_8079618
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
.align 2, 0
_08057970: .4byte gUnknown_80FAC88
thumb_func_end sub_8057954
thumb_func_start sub_8057974
sub_8057974:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r10, r0
adds r5, r1, 0
adds r7, r2, 0
mov r9, r3
ldr r0, [r5, 0x70]
movs r1, 0xE
ldrsh r0, [r0, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
mov r8, r0
movs r6, 0
add r0, sp, 0x18
strb r6, [r0]
mov r0, r8
cmp r0, 0
beq _080579E8
adds r0, r7, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r7, 0
mov r1, r9
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r6, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r6, [sp, 0x14]
mov r0, r10
adds r1, r5, 0
mov r2, r8
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _080579E4
movs r2, 0x1
_080579E4:
strb r2, [r1]
b _080579F4
_080579E8:
ldr r0, _08057A08
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
_080579F4:
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057A08: .4byte gUnknown_80FD018
thumb_func_end sub_8057974
thumb_func_start sub_8057A0C
sub_8057A0C:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r5, r0, 0
adds r6, r1, 0
ldr r2, [r5, 0x70]
mov r8, r2
ldr r0, [r6, 0x70]
adds r3, r0, 0
movs r1, 0xE
ldrsh r0, [r2, r1]
movs r4, 0xE
ldrsh r1, [r3, r4]
adds r0, r1
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r2, 0xE]
strh r0, [r3, 0xE]
movs r7, 0xE
ldrsh r1, [r2, r7]
ldrh r4, [r2, 0x10]
movs r7, 0x10
ldrsh r0, [r2, r7]
cmp r1, r0
ble _08057A42
strh r4, [r2, 0xE]
_08057A42:
movs r0, 0xE
ldrsh r1, [r3, r0]
ldrh r2, [r3, 0x10]
movs r4, 0x10
ldrsh r0, [r3, r4]
cmp r1, r0
ble _08057A52
strh r2, [r3, 0xE]
_08057A52:
ldr r4, _08057A90
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
mov r1, r8
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _08057A78
movs r0, 0x1
strb r0, [r1]
_08057A78:
ldr r0, _08057A94
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
movs r0, 0x1
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057A90: .4byte gUnknown_202DF98
_08057A94: .4byte gUnknown_80FC7EC
thumb_func_end sub_8057A0C
thumb_func_start sub_8057A98
sub_8057A98:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
mov r10, r0
mov r8, r1
ldr r0, [r1, 0x70]
str r0, [sp, 0x8]
movs r1, 0
str r1, [sp, 0xC]
movs r1, 0x8C
lsls r1, 1
adds r4, r0, r1
adds r5, r4, 0
movs r0, 0x10
mov r9, r0
movs r7, 0x3
_08057ABE:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08057B12
movs r6, 0x20
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08057B04
mov r0, r9
ands r0, r1
cmp r0, 0
beq _08057B12
ldr r0, _08057AFC
adds r1, r5, 0
movs r2, 0
bl sub_80928C0
ldr r0, _08057B00
ldr r2, [r0]
mov r0, r10
mov r1, r8
bl sub_80522F4
ldrb r0, [r4]
orrs r0, r6
strb r0, [r4]
movs r1, 0x1
str r1, [sp, 0xC]
b _08057B12
.align 2, 0
_08057AFC: .4byte gUnknown_202DE58
_08057B00: .4byte gUnknown_80FCFBC
_08057B04:
mov r0, r9
ands r0, r1
cmp r0, 0
bne _08057B12
movs r0, 0xDF
ands r0, r1
strb r0, [r4]
_08057B12:
adds r4, 0x8
adds r5, 0x8
subs r7, 0x1
cmp r7, 0
bge _08057ABE
ldr r0, [sp, 0x8]
movs r1, 0x9C
lsls r1, 1
adds r4, r0, r1
ldrb r1, [r4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08057B6C
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08057B7A
movs r1, 0xB0
lsls r1, 1
mov r0, sp
bl sub_8092A88
ldrb r1, [r4]
movs r0, 0x20
orrs r0, r1
strb r0, [r4]
movs r0, 0x1
str r0, [sp, 0xC]
ldr r0, _08057B64
mov r1, sp
movs r2, 0
bl sub_80928C0
ldr r0, _08057B68
ldr r2, [r0]
mov r0, r10
mov r1, r8
bl sub_80522F4
b _08057B7A
.align 2, 0
_08057B64: .4byte gUnknown_202DE58
_08057B68: .4byte gUnknown_80FCFBC
_08057B6C:
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08057B7A
movs r0, 0xDF
ands r0, r1
strb r0, [r4]
_08057B7A:
ldr r1, [sp, 0xC]
cmp r1, 0
beq _08057B90
ldr r1, [sp, 0x8]
adds r1, 0xC0
ldrb r0, [r1]
cmp r0, 0x1
bne _08057B9C
movs r0, 0
strb r0, [r1]
b _08057B9C
_08057B90:
ldr r0, _08057BB0
ldr r2, [r0]
mov r0, r10
mov r1, r8
bl sub_80522F4
_08057B9C:
ldr r0, [sp, 0xC]
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057BB0: .4byte gUnknown_80FCFE4
thumb_func_end sub_8057A98
thumb_func_start sub_8057BB4
sub_8057BB4:
push {lr}
movs r2, 0x1
movs r3, 0x1
bl sub_80779F0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8057BB4
thumb_func_start sub_8057BC4
sub_8057BC4:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8077AE4
ldr r0, _08057BE8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
movs r3, 0x2
bl sub_8077084
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08057BE8: .4byte gUnknown_8106A4C
thumb_func_end sub_8057BC4
thumb_func_start sub_8057BEC
sub_8057BEC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r4, r0, 0
adds r5, r1, 0
adds r7, r2, 0
adds r6, r3, 0
movs r0, 0
mov r8, r0
adds r0, r4, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
beq _08057C48
movs r3, 0x80
lsls r3, 1
str r6, [sp]
adds r0, r4, 0
adds r1, r5, 0
adds r2, r7, 0
bl sub_8055640
cmp r0, 0
beq _08057C54
movs r1, 0x1
mov r8, r1
ldr r0, _08057C44
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r4, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057C54
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_80776C0
b _08057C54
.align 2, 0
_08057C44: .4byte gUnknown_80F4E0A
_08057C48:
ldr r0, _08057C64
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_08057C54:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057C64: .4byte gUnknown_80FC734
thumb_func_end sub_8057BEC
thumb_func_start sub_8057C68
sub_8057C68:
push {lr}
sub sp, 0x4
ldr r2, _08057C84
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
movs r3, 0x40
bl sub_8077434
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
.align 2, 0
_08057C84: .4byte gUnknown_8106A4C
thumb_func_end sub_8057C68
thumb_func_start sub_8057C88
sub_8057C88:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08057CC2
movs r7, 0x1
ldr r0, _08057CCC
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057CC2
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_08057CC2:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057CCC: .4byte gUnknown_80F4DF6
thumb_func_end sub_8057C88
thumb_func_start sub_8057CD0
sub_8057CD0:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x8
adds r4, r0, 0
adds r6, r1, 0
mov r8, r2
adds r5, r3, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
ldr r1, _08057D18
adds r1, r0, r1
ldrb r2, [r1]
ldr r1, _08057D1C
lsls r0, 2
adds r0, r1
ldr r0, [r0]
str r0, [sp]
str r5, [sp, 0x4]
adds r0, r4, 0
adds r1, r6, 0
mov r3, r8
bl sub_80556BC
cmp r0, 0
beq _08057D0A
movs r0, 0x1
_08057D0A:
add sp, 0x8
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08057D18: .4byte gUnknown_80F51E4
_08057D1C: .4byte gUnknown_80F51EC
thumb_func_end sub_8057CD0
thumb_func_start sub_8057D20
sub_8057D20:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
movs r7, 0
ldr r0, [r4, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
movs r6, 0x80
lsls r6, 1
cmp r0, 0x9
bne _08057D3C
movs r6, 0x80
lsls r6, 2
_08057D3C:
str r3, [sp]
adds r0, r5, 0
adds r1, r4, 0
adds r3, r6, 0
bl sub_8055640
cmp r0, 0
beq _08057D6E
movs r7, 0x1
ldr r0, _08057D78
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r4, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057D6E
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x3B
movs r3, 0
bl sub_80768DC
_08057D6E:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057D78: .4byte gUnknown_80F4E08
thumb_func_end sub_8057D20
thumb_func_start sub_8057D7C
sub_8057D7C:
push {lr}
sub sp, 0x8
ldr r2, _08057D98
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
str r3, [sp, 0x4]
movs r3, 0x2
bl sub_8076F80
movs r0, 0x1
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_08057D98: .4byte gUnknown_8106A50
thumb_func_end sub_8057D7C
thumb_func_start sub_8057D9C
sub_8057D9C:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r4, r1, 0
ldr r0, [r4, 0x70]
movs r5, 0
ldr r1, _08057DF8
mov r8, r1
movs r1, 0x8C
lsls r1, 1
adds r2, r0, r1
movs r0, 0x1
mov r12, r0
movs r7, 0x10
movs r3, 0x3
_08057DBC:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _08057DD4
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08057DD4
movs r0, 0
strb r0, [r2, 0x4]
movs r5, 0x1
_08057DD4:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08057DBC
mov r0, r8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
cmp r5, 0
beq _08057E00
ldr r0, _08057DFC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08057E0C
.align 2, 0
_08057DF8: .4byte gUnknown_202DFE8
_08057DFC: .4byte gUnknown_80FD350
_08057E00:
ldr r0, _08057E18
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08057E0C:
adds r0, r5, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057E18: .4byte gUnknown_80FD370
thumb_func_end sub_8057D9C
thumb_func_start sub_8057E1C
sub_8057E1C:
push {lr}
bl sub_8078348
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8057E1C
thumb_func_start sub_8057E28
sub_8057E28:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _08057E4C
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_807824C
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08057E4C: .4byte gUnknown_80F4EDC
thumb_func_end sub_8057E28
thumb_func_start sub_8057E50
sub_8057E50:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_807A9D8
adds r0, r4, 0
adds r1, r5, 0
bl sub_8079CA0
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8057E50
thumb_func_start sub_8057E6C
sub_8057E6C:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r7, r0, 0
adds r5, r1, 0
adds r6, r2, 0
adds r4, r3, 0
movs r0, 0
mov r8, r0
ldr r1, [r7, 0x70]
mov r9, r1
adds r0, r7, 0
adds r1, r5, 0
bl sub_807A9D8
movs r3, 0x80
lsls r3, 1
str r4, [sp]
adds r0, r7, 0
adds r1, r5, 0
adds r2, r6, 0
bl sub_8055640
cmp r0, 0
beq _08057EBC
movs r0, 0x1
mov r8, r0
adds r0, r7, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08057EBC
ldr r0, _08057ECC
add r0, r9
mov r1, r8
strb r1, [r0]
_08057EBC:
mov r0, r8
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057ECC: .4byte 0x00000155
thumb_func_end sub_8057E6C
thumb_func_start sub_8057ED0
sub_8057ED0:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08057F12
movs r7, 0x1
ldr r0, _08057F1C
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057F12
ldr r0, _08057F20
ldr r2, [r0]
movs r0, 0
str r0, [sp]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x80
bl sub_80772C0
_08057F12:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057F1C: .4byte gUnknown_80F4E04
_08057F20: .4byte gUnknown_8106A4C
thumb_func_end sub_8057ED0
thumb_func_start sub_8057F24
sub_8057F24:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x4
adds r6, r0, 0
mov r8, r1
ldr r5, [r6, 0x70]
movs r0, 0x1
mov r9, r0
movs r4, 0x1
strh r4, [r5, 0xE]
ldr r0, _08057F74
ldr r2, [r0]
str r4, [sp]
adds r0, r6, 0
movs r3, 0x40
bl sub_80772C0
ldr r0, _08057F78
ldr r2, [r0]
str r4, [sp]
adds r0, r6, 0
mov r1, r8
movs r3, 0x40
bl sub_80772C0
movs r0, 0xAA
lsls r0, 1
adds r5, r0
mov r0, r9
strb r0, [r5]
movs r0, 0x1
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08057F74: .4byte gUnknown_8106A4C
_08057F78: .4byte gUnknown_8106A50
thumb_func_end sub_8057F24
thumb_func_start sub_8057F7C
sub_8057F7C:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08057FBA
movs r7, 0x1
ldr r0, _08057FC4
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08057FBA
ldr r0, _08057FC8
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_80775DC
_08057FBA:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08057FC4: .4byte gUnknown_80F4E02
_08057FC8: .4byte gUnknown_8106A4C
thumb_func_end sub_8057F7C
thumb_func_start sub_8057FCC
sub_8057FCC:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8077AE4
ldr r0, _08057FF0
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
movs r3, 0x1
bl sub_8077084
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08057FF0: .4byte gUnknown_8106A50
thumb_func_end sub_8057FCC
thumb_func_start sub_8057FF4
sub_8057FF4:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_807723C
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
beq _08058048
ldr r0, [r4, 0x70]
movs r2, 0xA9
lsls r2, 1
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
bne _08058054
movs r0, 0x1
strb r0, [r1]
ldr r0, _0805802C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
cmp r6, 0x1
bne _08058034
ldr r0, _08058030
b _08058036
.align 2, 0
_0805802C: .4byte gUnknown_202DFE8
_08058030: .4byte gUnknown_80FAE00
_08058034:
ldr r0, _08058044
_08058036:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08058054
.align 2, 0
_08058044: .4byte gUnknown_80FADD8
_08058048:
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8076210
_08058054:
movs r0, 0x1
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8057FF4
thumb_func_start sub_805805C
sub_805805C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r10, r0
mov r9, r1
adds r5, r2, 0
mov r8, r3
ldr r1, [r0, 0x70]
movs r6, 0x1
movs r2, 0
ldr r4, _08058098
movs r3, 0
ldrsh r0, [r4, r3]
cmp r0, 0
blt _080580B0
movs r7, 0xC
ldrsh r3, [r1, r7]
adds r1, r4, 0
ldr r4, _0805809C
_08058088:
movs r7, 0
ldrsh r0, [r1, r7]
cmp r3, r0
bge _080580A0
movs r0, 0x2
ldrsh r6, [r1, r0]
b _080580B0
.align 2, 0
_08058098: .4byte gUnknown_80F55BC
_0805809C: .4byte 0x000003e6
_080580A0:
adds r1, 0x4
adds r2, 0x1
cmp r2, r4
bgt _080580B0
movs r7, 0
ldrsh r0, [r1, r7]
cmp r0, 0
bge _08058088
_080580B0:
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
movs r1, 0
str r1, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r1, [sp, 0x14]
mov r0, r10
mov r1, r9
adds r2, r6, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _080580F4
movs r2, 0x1
_080580F4:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805805C
thumb_func_start sub_805810C
sub_805810C:
push {r4-r7,lr}
adds r6, r0, 0
adds r5, r1, 0
movs r7, 0
ldr r4, [r5, 0x70]
ldr r0, _08058134
movs r2, 0
bl sub_8045B94
adds r4, 0xF4
ldrb r0, [r4]
cmp r0, 0
beq _0805813C
ldr r0, _08058138
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _0805814E
.align 2, 0
_08058134: .4byte gUnknown_202DFE8
_08058138: .4byte gUnknown_80FD2B4
_0805813C:
movs r0, 0x1
strb r0, [r4]
movs r7, 0x1
ldr r0, _08058158
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_0805814E:
adds r0, r7, 0
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058158: .4byte gUnknown_80FD294
thumb_func_end sub_805810C
thumb_func_start sub_805815C
sub_805815C:
push {lr}
movs r2, 0x4
bl sub_80797A0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805815C
thumb_func_start sub_805816C
sub_805816C:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r6, r0, 0
adds r7, r1, 0
adds r5, r2, 0
adds r4, r3, 0
movs r0, 0
mov r8, r0
adds r0, r6, 0
bl sub_807A9D8
movs r3, 0x80
lsls r3, 1
str r4, [sp]
adds r0, r6, 0
adds r1, r7, 0
adds r2, r5, 0
bl sub_8055640
cmp r0, 0
beq _080581BE
movs r1, 0x1
mov r8, r1
ldr r0, _080581CC
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r6, 0
adds r1, r7, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080581BE
adds r0, r6, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0
bl sub_8076210
_080581BE:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080581CC: .4byte gUnknown_80F4DB8
thumb_func_end sub_805816C
thumb_func_start sub_80581D0
sub_80581D0:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r6, r0, 0
adds r7, r1, 0
adds r5, r2, 0
adds r4, r3, 0
movs r0, 0
mov r8, r0
adds r0, r6, 0
bl sub_807A9D8
movs r3, 0x80
lsls r3, 1
str r4, [sp]
adds r0, r6, 0
adds r1, r7, 0
adds r2, r5, 0
bl sub_8055640
cmp r0, 0
beq _08058222
movs r1, 0x1
mov r8, r1
ldr r0, _08058230
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r6, 0
adds r1, r7, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058222
adds r0, r6, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0
bl sub_8076210
_08058222:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058230: .4byte gUnknown_80F4DBA
thumb_func_end sub_80581D0
thumb_func_start sub_8058234
sub_8058234:
push {r4,lr}
adds r3, r0, 0
adds r4, r1, 0
ldrh r1, [r2, 0x2]
ldr r0, _08058258
movs r2, 0x51
cmp r1, r0
bne _08058246
movs r2, 0x7A
_08058246:
adds r0, r3, 0
adds r1, r4, 0
bl sub_8078FDC
movs r0, 0x1
pop {r4}
pop {r1}
bx r1
.align 2, 0
_08058258: .4byte 0x0000013b
thumb_func_end sub_8058234
thumb_func_start sub_805825C
sub_805825C:
push {lr}
ldr r2, _0805826C
ldr r2, [r2]
bl sub_8077540
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805826C: .4byte gUnknown_8106A50
thumb_func_end sub_805825C
thumb_func_start sub_8058270
sub_8058270:
push {r4,r5,lr}
sub sp, 0x4
adds r4, r0, 0
adds r5, r2, 0
adds r2, r3, 0
movs r3, 0x1
ldr r0, [r1, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
subs r0, 0x7
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0805828E
movs r3, 0x2
_0805828E:
lsls r3, 8
str r2, [sp]
adds r0, r4, 0
adds r2, r5, 0
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8058270
thumb_func_start sub_80582AC
sub_80582AC:
push {lr}
ldr r2, _080582C0
ldr r2, [r2]
movs r3, 0x1
bl sub_8077160
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_080582C0: .4byte gUnknown_8106A4C
thumb_func_end sub_80582AC
thumb_func_start sub_80582C4
sub_80582C4:
push {lr}
movs r2, 0x1
bl sub_8077780
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_80582C4
thumb_func_start sub_80582D4
sub_80582D4:
push {lr}
ldr r2, _080582E8
ldr r2, [r2]
movs r3, 0x1
bl sub_8077084
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_080582E8: .4byte gUnknown_8106A4C
thumb_func_end sub_80582D4
thumb_func_start sub_80582EC
sub_80582EC:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r1, 0
adds r4, r2, 0
adds r6, r3, 0
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _08058328
ldr r0, _08058324
ldr r3, [r0]
str r6, [sp]
adds r0, r5, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r5, 0
bl sub_8079764
b _0805833C
.align 2, 0
_08058324: .4byte gUnknown_80F4F50
_08058328:
ldr r0, _08058348
ldr r0, [r0]
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x4
adds r3, r4, 0
bl sub_8079618
movs r4, 0x1
_0805833C:
adds r0, r4, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058348: .4byte gUnknown_80FAC54
thumb_func_end sub_80582EC
thumb_func_start sub_805834C
sub_805834C:
push {lr}
sub sp, 0x4
adds r3, r2, 0
ldr r2, _08058368
ldr r2, [r2]
str r2, [sp]
movs r2, 0x1
bl sub_8079618
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
.align 2, 0
_08058368: .4byte gUnknown_80FAC74
thumb_func_end sub_805834C
thumb_func_start sub_805836C
sub_805836C:
push {r4-r7,lr}
sub sp, 0x1C
adds r6, r0, 0
adds r7, r1, 0
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
ldr r0, [r6, 0x70]
adds r0, 0xA0
ldr r0, [r0]
lsls r4, r0, 1
ldr r0, _080583D0
cmp r4, r0
ble _0805838A
adds r4, r0, 0
_0805838A:
adds r0, r2, 0
bl sub_8092B00
lsls r0, 24
lsrs r0, 24
add r1, sp, 0x18
str r1, [sp]
str r0, [sp, 0x4]
ldr r0, _080583D4
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
adds r0, r6, 0
adds r1, r7, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _080583C0
movs r2, 0x1
_080583C0:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080583D0: .4byte 0x000003e7
_080583D4: .4byte 0x000001ff
thumb_func_end sub_805836C
thumb_func_start sub_80583D8
sub_80583D8:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805841C
movs r7, 0x1
ldr r0, _08058428
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805841C
ldr r0, _0805842C
ldr r2, [r0]
str r7, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076F80
_0805841C:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058428: .4byte gUnknown_80F4DC2
_0805842C: .4byte gUnknown_8106A50
thumb_func_end sub_80583D8
thumb_func_start sub_8058430
sub_8058430:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805846A
movs r7, 0x1
ldr r0, _08058474
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805846A
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_0805846A:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058474: .4byte gUnknown_80F4DEE
thumb_func_end sub_8058430
thumb_func_start sub_8058478
sub_8058478:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080584B2
movs r7, 0x1
ldr r0, _080584BC
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080584B2
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_080584B2:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080584BC: .4byte gUnknown_80F4DE6
thumb_func_end sub_8058478
thumb_func_start sub_80584C0
sub_80584C0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r9, r0
mov r10, r1
adds r6, r2, 0
mov r8, r3
movs r7, 0
add r0, sp, 0x18
strb r7, [r0]
mov r0, r9
ldr r2, [r0, 0x70]
ldr r0, [r1, 0x70]
movs r3, 0xE
ldrsh r1, [r0, r3]
movs r3, 0xE
ldrsh r0, [r2, r3]
subs r5, r1, r0
cmp r5, 0
bge _080584F0
movs r5, 0
_080584F0:
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r7, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r7, [sp, 0x14]
mov r0, r9
mov r1, r10
adds r2, r5, 0
movs r3, 0
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08058532
movs r2, 0x1
_08058532:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80584C0
thumb_func_start sub_8058548
sub_8058548:
push {r4,r5,lr}
sub sp, 0x4
adds r4, r0, 0
movs r5, 0x80
lsls r5, 1
ldr r0, [r4, 0x70]
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0
beq _08058560
ldr r0, _0805857C
ldr r5, [r0]
_08058560:
str r3, [sp]
adds r0, r4, 0
adds r3, r5, 0
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805857C: .4byte gUnknown_80F4F6C
thumb_func_end sub_8058548
thumb_func_start sub_8058580
sub_8058580:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080585BC
movs r7, 0x1
ldr r0, _080585C8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080585BC
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_80779F0
_080585BC:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080585C8: .4byte gUnknown_80F4DD4
thumb_func_end sub_8058580
thumb_func_start sub_80585CC
sub_80585CC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
mov r8, r2
adds r7, r3, 0
movs r6, 0
ldr r0, [r4, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x1
beq _080585EC
cmp r0, 0x3
bne _08058602
_080585EC:
ldr r0, _08058620
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A4C8
movs r6, 0x1
_08058602:
movs r3, 0x80
lsls r3, 1
str r7, [sp]
adds r0, r5, 0
adds r1, r4, 0
mov r2, r8
bl sub_8055640
cmp r0, 0
beq _08058624
movs r0, 0x1
orrs r0, r6
lsls r0, 24
b _08058626
.align 2, 0
_08058620: .4byte gUnknown_80FD104
_08058624:
lsls r0, r6, 24
_08058626:
lsrs r0, 24
adds r6, r0, 0
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80585CC
thumb_func_start sub_8058638
sub_8058638:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058670
movs r7, 0x1
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058670
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_80779F0
_08058670:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8058638
thumb_func_start sub_805867C
sub_805867C:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r1, 0
adds r4, r2, 0
adds r6, r3, 0
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _080586B8
ldr r0, _080586B4
ldr r3, [r0]
str r6, [sp]
adds r0, r5, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r5, 0
bl sub_8079764
b _080586CC
.align 2, 0
_080586B4: .4byte gUnknown_80F4F54
_080586B8:
ldr r0, _080586D8
ldr r0, [r0]
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x5
adds r3, r4, 0
bl sub_8079618
movs r4, 0x1
_080586CC:
adds r0, r4, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080586D8: .4byte gUnknown_80FACA4
thumb_func_end sub_805867C
thumb_func_start sub_80586DC
sub_80586DC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r7, r0, 0
adds r4, r1, 0
adds r6, r2, 0
adds r5, r3, 0
adds r0, r4, 0
movs r1, 0x3A
bl sub_8071824
lsls r0, 24
lsrs r0, 24
mov r8, r0
movs r3, 0x80
lsls r3, 1
str r5, [sp]
adds r0, r7, 0
adds r1, r4, 0
adds r2, r6, 0
bl sub_8055640
adds r4, r0, 0
negs r0, r4
orrs r0, r4
lsrs r5, r0, 31
cmp r5, 0
beq _08058762
adds r0, r7, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08058762
lsrs r0, r4, 31
adds r0, r4, r0
asrs r2, r0, 1
ldr r0, [r7, 0x70]
movs r5, 0x1
cmp r2, 0
bgt _08058734
movs r2, 0x1
_08058734:
adds r1, r0, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _08058740
strb r5, [r1]
_08058740:
mov r0, r8
cmp r0, 0
beq _08058756
movs r3, 0xFD
lsls r3, 1
adds r0, r7, 0
adds r1, r2, 0
movs r2, 0xD
bl sub_806F324
b _08058762
_08058756:
str r5, [sp]
adds r0, r7, 0
adds r1, r7, 0
movs r3, 0
bl sub_8077C44
_08058762:
adds r0, r5, 0
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80586DC
thumb_func_start sub_8058770
sub_8058770:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
mov r12, r2
adds r5, r3, 0
ldr r2, [r4, 0x70]
movs r0, 0x10
ldrsh r3, [r2, r0]
adds r0, r3, 0
cmp r3, 0
bge _0805878A
adds r0, r3, 0x3
_0805878A:
movs r7, 0xE
ldrsh r1, [r2, r7]
asrs r0, 2
cmp r1, r0
bgt _08058798
movs r3, 0
b _080587BE
_08058798:
movs r0, 0xE
ldrsh r1, [r2, r0]
lsrs r0, r3, 31
adds r0, r3, r0
asrs r0, 1
cmp r1, r0
bgt _080587AA
movs r3, 0x1
b _080587BE
_080587AA:
lsls r0, r3, 1
adds r0, r3
cmp r0, 0
bge _080587B4
adds r0, 0x3
_080587B4:
asrs r0, 2
movs r3, 0x3
cmp r1, r0
bgt _080587BE
movs r3, 0x2
_080587BE:
ldr r1, _080587E4
lsls r0, r3, 2
adds r0, r1
ldr r3, [r0]
str r5, [sp]
adds r0, r4, 0
adds r1, r6, 0
mov r2, r12
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080587E4: .4byte gUnknown_80F51A4
thumb_func_end sub_8058770
thumb_func_start sub_80587E8
sub_80587E8:
push {r4-r6,lr}
sub sp, 0x4
adds r6, r0, 0
adds r5, r1, 0
adds r1, r3, 0
ldr r0, [r5, 0x70]
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _0805881A
movs r3, 0x80
lsls r3, 2
str r1, [sp]
adds r0, r6, 0
adds r1, r5, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r6, 0
adds r1, r5, 0
bl sub_807A290
b _0805882E
_0805881A:
movs r3, 0x80
lsls r3, 1
str r1, [sp]
adds r0, r6, 0
adds r1, r5, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
_0805882E:
adds r0, r4, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80587E8
thumb_func_start sub_8058838
sub_8058838:
push {lr}
sub sp, 0x8
ldr r2, _08058854
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
str r3, [sp, 0x4]
movs r3, 0x3
bl sub_8076F80
movs r0, 0x1
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_08058854: .4byte gUnknown_8106A50
thumb_func_end sub_8058838
thumb_func_start sub_8058858
sub_8058858:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x8
adds r6, r0, 0
mov r8, r1
ldr r0, _08058898
ldr r5, [r0]
movs r4, 0x1
str r4, [sp]
str r4, [sp, 0x4]
adds r0, r6, 0
adds r2, r5, 0
movs r3, 0x1
bl sub_8076E20
str r4, [sp]
str r4, [sp, 0x4]
adds r0, r6, 0
mov r1, r8
adds r2, r5, 0
movs r3, 0x1
bl sub_8076F80
movs r0, 0x1
add sp, 0x8
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08058898: .4byte gUnknown_8106A4C
thumb_func_end sub_8058858
thumb_func_start sub_805889C
sub_805889C:
push {lr}
bl sub_80769CC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805889C
thumb_func_start sub_80588A8
sub_80588A8:
push {lr}
movs r2, 0x1
bl sub_8079E34
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_80588A8
thumb_func_start sub_80588B8
sub_80588B8:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
movs r6, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080588E4
movs r6, 0x1
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _080588E4
ldr r0, _080588F0
strb r6, [r0]
_080588E4:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_080588F0: .4byte gUnknown_202F219
thumb_func_end sub_80588B8
thumb_func_start sub_80588F4
sub_80588F4:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x4
adds r6, r0, 0
adds r5, r1, 0
mov r8, r2
adds r4, r3, 0
ldr r0, [r5, 0x70]
movs r1, 0x4
ldrsh r0, [r0, r1]
bl GetLowKickDmg
adds r3, r0, 0
str r4, [sp]
adds r0, r6, 0
adds r1, r5, 0
mov r2, r8
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80588F4
thumb_func_start sub_8058930
sub_8058930:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r7, r0, 0
movs r0, 0
mov r8, r0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r0, r7, 0
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080589B8
movs r2, 0x1
mov r8, r2
ldr r0, _080589C8
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _080589B8
ldr r6, [r7, 0x70]
adds r0, r7, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0x1
bl sub_8077910
ldr r0, _080589CC
ldr r5, [r0]
adds r0, r7, 0
adds r1, r7, 0
adds r2, r5, 0
movs r3, 0x1
bl sub_8077084
ldr r0, _080589D0
ldr r4, [r0]
adds r0, r7, 0
adds r1, r7, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077084
adds r0, r7, 0
adds r1, r7, 0
adds r2, r5, 0
movs r3, 0x1
bl sub_8077160
adds r0, r7, 0
adds r1, r7, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077160
adds r6, 0xFB
ldrb r0, [r6]
cmp r0, 0
bne _080589B8
mov r0, r8
strb r0, [r6]
_080589B8:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080589C8: .4byte gUnknown_80F4DD6
_080589CC: .4byte gUnknown_8106A4C
_080589D0: .4byte gUnknown_8106A50
thumb_func_end sub_8058930
thumb_func_start sub_80589D4
sub_80589D4:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
ldr r4, _08058A04
bl sub_807E580
lsls r0, 24
lsrs r0, 23
adds r0, r4
movs r1, 0
ldrsh r2, [r0, r1]
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_8077C44
movs r0, 0x1
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08058A04: .4byte gUnknown_80F500A
thumb_func_end sub_80589D4
thumb_func_start sub_8058A08
sub_8058A08:
push {lr}
movs r2, 0
movs r3, 0x1
bl sub_8077910
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8058A08
thumb_func_start sub_8058A18
sub_8058A18:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
movs r6, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058A44
movs r6, 0x1
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08058A44
ldr r0, _08058A50
strb r6, [r0]
_08058A44:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08058A50: .4byte gUnknown_202F21A
thumb_func_end sub_8058A18
thumb_func_start sub_8058A54
sub_8058A54:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _08058A78
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_80781DC
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08058A78: .4byte gUnknown_80F4EB8
thumb_func_end sub_8058A54
thumb_func_start sub_8058A7C
sub_8058A7C:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _08058AA4
ldr r2, [r0]
adds r0, r4, 0
movs r3, 0x1
bl sub_8077160
ldr r0, _08058AA8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
movs r3, 0x1
bl sub_8077160
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08058AA4: .4byte gUnknown_8106A4C
_08058AA8: .4byte gUnknown_8106A50
thumb_func_end sub_8058A7C
thumb_func_start sub_8058AAC
sub_8058AAC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
adds r5, r2, 0
adds r7, r3, 0
movs r0, 0
mov r8, r0
adds r0, r4, 0
adds r1, r5, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _08058B14
ldr r0, _08058B0C
ldr r3, [r0]
str r7, [sp]
adds r0, r4, 0
adds r1, r6, 0
adds r2, r5, 0
bl sub_8055640
cmp r0, 0
beq _08058B04
movs r1, 0x1
mov r8, r1
ldr r0, _08058B10
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r4, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058B04
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_08058B04:
adds r0, r4, 0
bl sub_8079764
b _08058B2A
.align 2, 0
_08058B0C: .4byte gUnknown_80F4F4C
_08058B10: .4byte gUnknown_80F4DF4
_08058B14:
ldr r0, _08058B38
ldr r0, [r0]
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x3
adds r3, r5, 0
bl sub_8079618
movs r0, 0x1
mov r8, r0
_08058B2A:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058B38: .4byte gUnknown_80FACC4
thumb_func_end sub_8058AAC
thumb_func_start sub_8058B3C
sub_8058B3C:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058B76
movs r7, 0x1
ldr r0, _08058B80
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058B76
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80767B0
_08058B76:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058B80: .4byte gUnknown_80F4DBC
thumb_func_end sub_8058B3C
thumb_func_start sub_8058B84
sub_8058B84:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
movs r6, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058BCC
movs r6, 0x1
ldr r0, _08058BD8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058BCC
ldr r4, [r5, 0x70]
ldr r0, _08058BDC
ldr r2, [r0]
adds r0, r5, 0
adds r1, r5, 0
movs r3, 0x1
bl sub_8077084
adds r4, 0xFB
ldrb r0, [r4]
cmp r0, 0
bne _08058BCC
strb r6, [r4]
_08058BCC:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08058BD8: .4byte gUnknown_80F4DD0
_08058BDC: .4byte gUnknown_8106A4C
thumb_func_end sub_8058B84
thumb_func_start sub_8058BE0
sub_8058BE0:
push {lr}
adds r1, r0, 0
bl sub_8079C24
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8058BE0
thumb_func_start sub_8058BF0
sub_8058BF0:
push {lr}
movs r2, 0x1
movs r3, 0x1
bl sub_80779F0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8058BF0
thumb_func_start sub_8058C00
sub_8058C00:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058C3A
movs r7, 0x1
ldr r0, _08058C44
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058C3A
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077AE4
_08058C3A:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058C44: .4byte gUnknown_80F4DF8
thumb_func_end sub_8058C00
thumb_func_start sub_8058C48
sub_8058C48:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
adds r7, r2, 0
adds r5, r3, 0
movs r1, 0xC0
lsls r1, 1
movs r0, 0x80
bl sub_808411C
adds r3, r0, 0
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x9]
muls r0, r3
cmp r0, 0
bge _08058C6C
adds r0, 0xFF
_08058C6C:
asrs r3, r0, 8
cmp r3, 0
bge _08058C74
movs r3, 0x1
_08058C74:
cmp r3, 0xC7
ble _08058C7A
movs r3, 0xC7
_08058C7A:
str r5, [sp]
adds r0, r4, 0
adds r1, r6, 0
adds r2, r7, 0
bl sub_8055864
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8058C48
thumb_func_start sub_8058C98
sub_8058C98:
push {r4-r7,lr}
sub sp, 0x8
adds r4, r0, 0
adds r5, r1, 0
adds r7, r3, 0
ldr r0, [sp, 0x1C]
movs r6, 0
movs r3, 0x80
lsls r3, 1
str r0, [sp]
adds r0, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058CDE
movs r6, 0x1
ldr r0, _08058CE8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r4, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058CDE
str r6, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r4, 0
adds r1, r5, 0
adds r2, r7, 0
movs r3, 0x1
bl sub_8076F80
_08058CDE:
adds r0, r6, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058CE8: .4byte gUnknown_80F4DC0
thumb_func_end sub_8058C98
thumb_func_start sub_8058CEC
sub_8058CEC:
push {r4-r6,lr}
sub sp, 0x8
adds r5, r0, 0
movs r6, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058D28
movs r6, 0x1
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08058D28
ldr r0, _08058D34
ldr r2, [r0]
movs r0, 0
str r0, [sp]
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r5, 0
movs r3, 0x2
bl sub_8076E20
_08058D28:
adds r0, r6, 0
add sp, 0x8
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08058D34: .4byte gUnknown_8106A50
thumb_func_end sub_8058CEC
thumb_func_start sub_8058D38
sub_8058D38:
push {lr}
bl sub_8075FCC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8058D38
thumb_func_start sub_8058D44
sub_8058D44:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
mov r12, r2
adds r5, r3, 0
ldr r2, [r4, 0x70]
movs r0, 0x10
ldrsh r3, [r2, r0]
adds r0, r3, 0
cmp r3, 0
bge _08058D5E
adds r0, r3, 0x3
_08058D5E:
movs r7, 0xE
ldrsh r1, [r2, r7]
asrs r0, 2
cmp r1, r0
bgt _08058D6C
movs r3, 0
b _08058D92
_08058D6C:
movs r0, 0xE
ldrsh r1, [r2, r0]
lsrs r0, r3, 31
adds r0, r3, r0
asrs r0, 1
cmp r1, r0
bgt _08058D7E
movs r3, 0x1
b _08058D92
_08058D7E:
lsls r0, r3, 1
adds r0, r3
cmp r0, 0
bge _08058D88
adds r0, 0x3
_08058D88:
asrs r0, 2
movs r3, 0x3
cmp r1, r0
bgt _08058D92
movs r3, 0x2
_08058D92:
ldr r1, _08058DB8
lsls r0, r3, 2
adds r0, r1
ldr r3, [r0]
str r5, [sp]
adds r0, r4, 0
adds r1, r6, 0
mov r2, r12
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058DB8: .4byte gUnknown_80F51B4
thumb_func_end sub_8058D44
thumb_func_start sub_8058DBC
sub_8058DBC:
push {r4-r7,lr}
adds r7, r0, 0
adds r6, r1, 0
ldr r5, [r7, 0x70]
ldr r4, [r6, 0x70]
adds r0, r6, 0
bl nullsub_92
movs r3, 0
_08058DCE:
lsls r2, r3, 1
adds r1, r5, 0
adds r1, 0x1C
adds r1, r2
adds r0, r4, 0
adds r0, 0x1C
adds r0, r2
ldrh r0, [r0]
strh r0, [r1]
adds r1, r5, 0
adds r1, 0x20
adds r1, r2
adds r0, r4, 0
adds r0, 0x20
adds r0, r2
ldrh r0, [r0]
strh r0, [r1]
adds r1, r5, 0
adds r1, 0x24
adds r1, r2
adds r0, r4, 0
adds r0, 0x24
adds r0, r2
ldrh r0, [r0]
strh r0, [r1]
lsls r2, r3, 2
adds r1, r5, 0
adds r1, 0x2C
adds r1, r2
adds r0, r4, 0
adds r0, 0x2C
adds r0, r2
ldr r0, [r0]
str r0, [r1]
adds r1, r5, 0
adds r1, 0x34
adds r1, r2
adds r0, r4, 0
adds r0, 0x34
adds r0, r2
ldr r0, [r0]
str r0, [r1]
adds r3, 0x1
cmp r3, 0x1
ble _08058DCE
ldr r0, _08058E54
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08058E58
ldr r2, [r0]
adds r0, r7, 0
adds r1, r6, 0
bl sub_80522F4
adds r1, r5, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _08058E4C
movs r0, 0x1
strb r0, [r1]
_08058E4C:
movs r0, 0x1
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058E54: .4byte gUnknown_202DF98
_08058E58: .4byte gUnknown_80FBD58
thumb_func_end sub_8058DBC
thumb_func_start sub_8058E5C
sub_8058E5C:
push {r4-r7,lr}
sub sp, 0x18
adds r5, r0, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058ED0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08058ED0
ldr r0, [r5, 0x70]
movs r1, 0x10
ldrsh r2, [r0, r1]
cmp r2, 0
bge _08058E8C
adds r2, 0x7
_08058E8C:
asrs r6, r2, 3
cmp r6, 0
bne _08058E94
movs r6, 0x1
_08058E94:
movs r7, 0x1
adds r0, r5, 0
movs r1, 0x7
bl sub_8071824
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _08058ED0
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _08058ED0
str r4, [sp]
str r4, [sp, 0x4]
ldr r0, _08058EDC
str r0, [sp, 0x8]
movs r0, 0x14
str r0, [sp, 0xC]
str r7, [sp, 0x10]
str r4, [sp, 0x14]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0
bl sub_806F370
_08058ED0:
adds r0, r7, 0
add sp, 0x18
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058EDC: .4byte 0x000001fd
thumb_func_end sub_8058E5C
thumb_func_start sub_8058EE0
sub_8058EE0:
push {lr}
sub sp, 0x4
ldr r2, [r1, 0x70]
movs r3, 0x10
ldrsh r2, [r2, r3]
lsrs r3, r2, 31
adds r2, r3
asrs r2, 1
movs r3, 0x1
str r3, [sp]
movs r3, 0
bl sub_8077C44
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8058EE0
thumb_func_start sub_8058F04
sub_8058F04:
push {r4-r7,lr}
sub sp, 0x4
adds r7, r0, 0
adds r4, r1, 0
mov r12, r2
adds r5, r3, 0
ldr r3, [r4, 0x70]
movs r6, 0x1
ldr r0, _08058F50
ldr r1, [r0]
movs r0, 0xC1
lsls r0, 9
adds r2, r1, r0
movs r0, 0xC
str r0, [r2]
ldr r0, _08058F54
adds r1, r0
movs r0, 0
str r0, [r1]
adds r3, 0xC0
ldrb r0, [r3]
cmp r0, 0xA
bne _08058F34
movs r6, 0x2
_08058F34:
lsls r3, r6, 8
str r5, [sp]
adds r0, r7, 0
adds r1, r4, 0
mov r2, r12
bl sub_8055640
cmp r0, 0
beq _08058F48
movs r0, 0x1
_08058F48:
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058F50: .4byte gUnknown_203B418
_08058F54: .4byte 0x00018204
thumb_func_end sub_8058F04
thumb_func_start sub_8058F58
sub_8058F58:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x8
adds r6, r0, 0
adds r7, r1, 0
mov r8, r3
ldr r0, _08058FB0
ldr r0, [r0]
ldr r1, _08058FB4
adds r0, r1
movs r1, 0
ldrsh r5, [r0, r1]
cmp r5, 0
bge _08058F78
movs r5, 0
_08058F78:
cmp r5, 0x4A
ble _08058F7E
movs r5, 0x4A
_08058F7E:
ldr r4, _08058FB8
lsls r5, 3
adds r0, r5, r4
ldrh r1, [r0]
mov r0, sp
bl sub_8092A88
adds r4, 0x4
adds r5, r4
ldr r4, [r5]
adds r0, r6, 0
adds r1, r7, 0
mov r2, sp
mov r3, r8
bl _call_via_r4
lsls r0, 24
lsrs r0, 24
add sp, 0x8
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08058FB0: .4byte gUnknown_203B418
_08058FB4: .4byte 0x00003a0e
_08058FB8: .4byte gUnknown_80F5D10
thumb_func_end sub_8058F58
thumb_func_start sub_8058FBC
sub_8058FBC:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08058FF6
movs r7, 0x1
ldr r0, _08059000
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08058FF6
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_08058FF6:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059000: .4byte gUnknown_80F4DE4
thumb_func_end sub_8058FBC
thumb_func_start sub_8059004
sub_8059004:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
mov r9, r0
mov r8, r1
adds r5, r2, 0
adds r6, r3, 0
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
adds r1, r6, 0
bl sub_8057600
lsls r0, 16
asrs r0, 16
mov r2, r8
adds r2, 0x4
str r4, [sp]
str r0, [sp, 0x4]
mov r0, r9
mov r1, r8
movs r3, 0x1
bl sub_807DF38
movs r0, 0x1
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8059004
thumb_func_start sub_8059050
sub_8059050:
push {lr}
movs r2, 0x1
bl sub_8077780
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059050
thumb_func_start sub_8059060
sub_8059060:
push {lr}
sub sp, 0x4
adds r3, r2, 0
ldr r2, _0805907C
ldr r2, [r2]
str r2, [sp]
movs r2, 0xB
bl sub_8079618
movs r0, 0x1
add sp, 0x4
pop {r1}
bx r1
.align 2, 0
_0805907C: .4byte gUnknown_80FAD6C
thumb_func_end sub_8059060
thumb_func_start sub_8059080
sub_8059080:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080590BA
movs r7, 0x1
ldr r0, _080590C4
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080590BA
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_080590BA:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080590C4: .4byte gUnknown_80F4DE8
thumb_func_end sub_8059080
thumb_func_start sub_80590C8
sub_80590C8:
push {lr}
bl sub_80798B0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_80590C8
thumb_func_start sub_80590D4
sub_80590D4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x1C
mov r8, r0
adds r6, r1, 0
adds r5, r2, 0
adds r7, r3, 0
movs r0, 0
mov r9, r0
add r0, sp, 0x18
mov r1, r9
strb r1, [r0]
adds r0, r5, 0
bl sub_8092B00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl sub_806F4A4
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r6, 0
movs r1, 0x37
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0805911C
movs r4, 0
_0805911C:
cmp r4, 0
bne _08059134
ldr r0, _08059130
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
b _0805917A
.align 2, 0
_08059130: .4byte gUnknown_80FEB88
_08059134:
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
adds r1, r7, 0
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r2, _0805918C
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
mov r0, r9
str r0, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r0, [sp, 0x14]
mov r0, r8
adds r1, r6, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08059178
movs r2, 0x1
_08059178:
strb r2, [r1]
_0805917A:
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805918C: .4byte 0x0000270f
thumb_func_end sub_80590D4
thumb_func_start sub_8059190
sub_8059190:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080591CA
movs r7, 0x1
ldr r0, _080591D4
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080591CA
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_080591CA:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080591D4: .4byte gUnknown_80F4DEA
thumb_func_end sub_8059190
thumb_func_start sub_80591D8
sub_80591D8:
push {lr}
bl sub_8079834
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_80591D8
thumb_func_start sub_80591E4
sub_80591E4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r7, r0, 0
adds r4, r1, 0
adds r6, r2, 0
adds r5, r3, 0
movs r0, 0
mov r8, r0
adds r0, r4, 0
movs r1, 0x3A
bl sub_8071824
lsls r0, 24
lsrs r0, 24
mov r9, r0
movs r3, 0x80
lsls r3, 1
str r5, [sp]
adds r0, r7, 0
adds r1, r4, 0
adds r2, r6, 0
bl sub_8055640
adds r1, r0, 0
cmp r1, 0
beq _0805927E
lsrs r0, r1, 31
adds r0, r1, r0
asrs r4, r0, 1
cmp r4, 0
bgt _0805922A
movs r4, 0x1
_0805922A:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805927E
ldr r0, [r7, 0x70]
movs r1, 0x1
mov r8, r1
adds r1, r0, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805924A
mov r0, r8
strb r0, [r1]
_0805924A:
adds r0, r7, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _0805927E
mov r1, r9
cmp r1, 0
beq _0805926E
movs r3, 0xFD
lsls r3, 1
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0xD
bl sub_806F324
b _0805927E
_0805926E:
mov r0, r8
str r0, [sp]
adds r0, r7, 0
adds r1, r7, 0
adds r2, r4, 0
movs r3, 0
bl sub_8077C44
_0805927E:
mov r0, r8
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80591E4
thumb_func_start sub_8059290
sub_8059290:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r4, r0, 0
adds r6, r1, 0
ldr r7, [r4, 0x70]
ldr r5, [r6, 0x70]
adds r0, r6, 0
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _080592BA
adds r0, r4, 0
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080592D0
_080592BA:
ldr r0, _080592CC
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
b _0805932E
.align 2, 0
_080592CC: .4byte gUnknown_80FC8C0
_080592D0:
movs r0, 0x5E
adds r0, r5
mov r12, r0
ldrb r3, [r0]
mov r8, r3
adds r1, r5, 0
adds r1, 0x5F
ldrb r2, [r1]
adds r5, r7, 0
adds r5, 0x5E
ldrb r0, [r5]
mov r3, r12
strb r0, [r3]
movs r0, 0x5F
adds r0, r7
mov r12, r0
ldrb r0, [r0]
strb r0, [r1]
mov r3, r8
strb r3, [r5]
mov r0, r12
strb r2, [r0]
ldr r0, _08059338
ldr r0, [r0]
movs r5, 0x1
strb r5, [r0, 0xC]
ldr r0, _0805933C
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_80522F4
adds r1, r7, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805931C
strb r5, [r1]
_0805931C:
adds r0, r4, 0
adds r1, r4, 0
bl sub_806ABAC
adds r0, r4, 0
adds r1, r6, 0
bl sub_806ABAC
movs r0, 0x1
_0805932E:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059338: .4byte gUnknown_203B418
_0805933C: .4byte gUnknown_80FC888
thumb_func_end sub_8059290
thumb_func_start sub_8059340
sub_8059340:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r6, r0, 0
adds r7, r1, 0
adds r5, r2, 0
movs r0, 0
mov r10, r0
ldr r1, [r6, 0x70]
str r1, [sp]
ldr r0, [r7, 0x70]
movs r2, 0
mov r12, r2
movs r4, 0
movs r1, 0x8C
lsls r1, 1
adds r3, r0, r1
adds r1, r0, 0
movs r2, 0x1
mov r9, r2
movs r0, 0x10
mov r8, r0
_08059372:
ldrb r2, [r3]
mov r0, r9
ands r0, r2
cmp r0, 0
beq _08059384
mov r0, r8
ands r0, r2
cmp r0, 0
bne _080593A8
_08059384:
adds r3, 0x8
adds r1, 0x8
adds r4, 0x1
cmp r4, 0x3
ble _08059372
movs r0, 0
cmp r0, 0
bne _080593B2
ldr r0, _080593A4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r7, 0
bl sub_80522F4
movs r0, 0
b _0805940A
.align 2, 0
_080593A4: .4byte gUnknown_80FE3BC
_080593A8:
movs r2, 0x8D
lsls r2, 1
adds r0, r1, r2
ldrh r0, [r0]
mov r12, r0
_080593B2:
mov r0, r12
cmp r0, 0
bne _080593CC
ldr r0, _080593C8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r7, 0
bl sub_80522F4
b _08059408
.align 2, 0
_080593C8: .4byte gUnknown_80FE3BC
_080593CC:
adds r0, r5, 0
mov r1, r12
bl sub_8092A88
ldr r0, _0805941C
adds r1, r5, 0
movs r2, 0
bl sub_80928C0
ldrb r1, [r5, 0x1]
movs r0, 0x4
orrs r0, r1
movs r1, 0x20
orrs r0, r1
strb r0, [r5, 0x1]
ldr r0, _08059420
ldr r2, [r0]
adds r0, r6, 0
adds r1, r7, 0
bl sub_80522F4
ldr r1, [sp]
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _08059404
movs r0, 0x1
strb r0, [r1]
_08059404:
movs r1, 0x1
mov r10, r1
_08059408:
mov r0, r10
_0805940A:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805941C: .4byte gUnknown_202DE58
_08059420: .4byte gUnknown_80FE38C
thumb_func_end sub_8059340
thumb_func_start sub_8059424
sub_8059424:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805945E
movs r7, 0x1
ldr r0, _08059468
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805945E
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_0805945E:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059468: .4byte gUnknown_80F4DF0
thumb_func_end sub_8059424
thumb_func_start sub_805946C
sub_805946C:
push {r4-r6,lr}
sub sp, 0x18
adds r5, r0, 0
movs r6, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080594D2
movs r6, 0x1
adds r0, r5, 0
movs r1, 0x7
bl sub_8071824
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _080594D2
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _080594D2
ldr r0, [r5, 0x70]
movs r1, 0x10
ldrsh r2, [r0, r1]
cmp r2, 0
bge _080594B0
adds r2, 0x7
_080594B0:
asrs r2, 3
cmp r2, 0
bne _080594B8
movs r2, 0x1
_080594B8:
str r4, [sp]
str r4, [sp, 0x4]
ldr r0, _080594DC
str r0, [sp, 0x8]
movs r0, 0x14
str r0, [sp, 0xC]
str r6, [sp, 0x10]
str r4, [sp, 0x14]
adds r0, r5, 0
adds r1, r5, 0
movs r3, 0
bl sub_806F370
_080594D2:
adds r0, r6, 0
add sp, 0x18
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_080594DC: .4byte 0x000001fd
thumb_func_end sub_805946C
thumb_func_start sub_80594E0
sub_80594E0:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _08059518
ldr r0, [r0]
ldr r1, _0805951C
ldrh r1, [r1]
ldr r2, _08059520
adds r0, r2
strb r1, [r0]
movs r0, 0x1
movs r1, 0
bl sub_807EAA0
lsls r0, 24
cmp r0, 0
bne _0805950E
ldr r0, _08059524
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_0805950E:
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08059518: .4byte gUnknown_203B418
_0805951C: .4byte gUnknown_80F4F42
_08059520: .4byte 0x0000e269
_08059524: .4byte gUnknown_80FCF78
thumb_func_end sub_80594E0
thumb_func_start sub_8059528
sub_8059528:
push {lr}
ldr r2, _0805953C
ldr r2, [r2]
movs r3, 0x1
bl sub_80775DC
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805953C: .4byte gUnknown_8106A4C
thumb_func_end sub_8059528
thumb_func_start sub_8059540
sub_8059540:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805957A
movs r7, 0x1
ldr r0, _08059584
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805957A
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80763F8
_0805957A:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059584: .4byte gUnknown_80F4DC4
thumb_func_end sub_8059540
thumb_func_start sub_8059588
sub_8059588:
push {lr}
ldr r2, _0805959C
ldr r2, [r2]
movs r3, 0x1
bl sub_8077084
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805959C: .4byte gUnknown_8106A50
thumb_func_end sub_8059588
thumb_func_start sub_80595A0
sub_80595A0:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080595DC
movs r7, 0x1
ldr r0, _080595E8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080595DC
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_8076210
_080595DC:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080595E8: .4byte gUnknown_80F4DE0
thumb_func_end sub_80595A0
thumb_func_start sub_80595EC
sub_80595EC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x1C
mov r9, r0
adds r6, r1, 0
adds r5, r2, 0
mov r8, r3
movs r7, 0
add r0, sp, 0x18
strb r7, [r0]
adds r0, r5, 0
bl sub_8092B00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl sub_806F4A4
lsls r0, 24
cmp r0, 0
bne _08059630
ldr r0, _0805962C
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
b _08059678
.align 2, 0
_0805962C: .4byte gUnknown_80FEB8C
_08059630:
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r2, _08059688
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r7, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r7, [sp, 0x14]
mov r0, r9
adds r1, r6, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08059672
movs r2, 0x1
_08059672:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
_08059678:
add sp, 0x1C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059688: .4byte 0x0000270f
thumb_func_end sub_80595EC
thumb_func_start sub_805968C
sub_805968C:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r5, r0, 0
mov r8, r1
adds r6, r2, 0
adds r7, r3, 0
bl sub_807E580
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0x1
beq _080596B6
adds r0, r5, 0
adds r1, r6, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _080596EC
_080596B6:
ldr r0, _080596E8
ldr r3, [r0]
cmp r4, 0x2
beq _080596C6
cmp r4, 0x4
beq _080596C6
cmp r4, 0x5
bne _080596CC
_080596C6:
lsrs r0, r3, 31
adds r0, r3, r0
asrs r3, r0, 1
_080596CC:
str r7, [sp]
adds r0, r5, 0
mov r1, r8
adds r2, r6, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r5, 0
bl sub_8079764
b _08059700
.align 2, 0
_080596E8: .4byte gUnknown_80F4F48
_080596EC:
ldr r0, _08059710
ldr r0, [r0]
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x2
adds r3, r6, 0
bl sub_8079618
movs r4, 0x1
_08059700:
adds r0, r4, 0
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059710: .4byte gUnknown_80FACE4
thumb_func_end sub_805968C
thumb_func_start sub_8059714
sub_8059714:
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0x1C
mov r9, r0
mov r10, r1
adds r6, r2, 0
mov r8, r3
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r1, _0805978C
movs r3, 0
ldrsh r2, [r1, r3]
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
mov r0, r9
mov r1, r10
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08059774
movs r2, 0x1
_08059774:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805978C: .4byte gUnknown_80F4F7C
thumb_func_end sub_8059714
thumb_func_start sub_8059790
sub_8059790:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r1, 0
adds r4, r2, 0
adds r6, r3, 0
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _080597CC
ldr r0, _080597C8
ldr r3, [r0]
str r6, [sp]
adds r0, r5, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r5, 0
bl sub_8079764
b _080597E0
.align 2, 0
_080597C8: .4byte gUnknown_80F4F5C
_080597CC:
ldr r0, _080597EC
ldr r0, [r0]
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x7
adds r3, r4, 0
bl sub_8079618
movs r4, 0x1
_080597E0:
adds r0, r4, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080597EC: .4byte gUnknown_80FACFC
thumb_func_end sub_8059790
thumb_func_start sub_80597F0
sub_80597F0:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
mov r9, r0
mov r8, r1
adds r5, r2, 0
adds r6, r3, 0
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
adds r1, r6, 0
bl sub_8057600
lsls r0, 16
asrs r0, 16
mov r2, r8
adds r2, 0x4
str r4, [sp]
str r0, [sp, 0x4]
mov r0, r9
mov r1, r8
movs r3, 0x2
bl sub_807DF38
movs r0, 0x1
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80597F0
thumb_func_start sub_805983C
sub_805983C:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r4, r0, 0
adds r7, r1, 0
adds r5, r2, 0
mov r8, r3
movs r6, 0
bl sub_8045128
bl sub_804AF20
lsls r0, 24
cmp r0, 0
beq _08059870
ldr r0, _0805986C
ldr r2, [r0]
adds r0, r4, 0
adds r1, r7, 0
bl sub_80522F4
b _080598B8
.align 2, 0
_0805986C: .4byte gUnknown_80FD128
_08059870:
adds r0, r4, 0
adds r1, r5, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _080598A4
ldr r0, _080598A0
ldr r3, [r0]
mov r0, r8
str r0, [sp]
adds r0, r4, 0
adds r1, r7, 0
adds r2, r5, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r6, r1, 31
adds r0, r4, 0
bl sub_8079764
b _080598B8
.align 2, 0
_080598A0: .4byte gUnknown_80F4F64
_080598A4:
ldr r0, _080598C8
ldr r0, [r0]
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x9
adds r3, r5, 0
bl sub_8079618
movs r6, 0x1
_080598B8:
adds r0, r6, 0
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080598C8: .4byte gUnknown_80FAD2C
thumb_func_end sub_805983C
thumb_func_start sub_80598CC
sub_80598CC:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805990A
movs r7, 0x1
ldr r0, _08059914
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805990A
ldr r0, _08059918
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_80775DC
_0805990A:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059914: .4byte gUnknown_80F4E00
_08059918: .4byte gUnknown_8106A4C
thumb_func_end sub_80598CC
thumb_func_start sub_805991C
sub_805991C:
push {lr}
bl sub_80787E4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805991C
thumb_func_start sub_8059928
sub_8059928:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
adds r1, r3, 0
movs r3, 0x1
movs r6, 0
ldr r0, [r4, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
subs r0, 0x7
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08059948
movs r3, 0x2
_08059948:
lsls r3, 8
str r1, [sp]
adds r0, r5, 0
adds r1, r4, 0
bl sub_8055640
cmp r0, 0
beq _08059978
movs r6, 0x1
ldr r0, _08059984
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r4, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059978
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
bl sub_80776C0
_08059978:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08059984: .4byte gUnknown_80F4DEC
thumb_func_end sub_8059928
thumb_func_start sub_8059988
sub_8059988:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _080599A8
movs r7, 0x1
ldr r0, _080599E0
strb r7, [r0]
_080599A8:
ldr r0, _080599E0
ldrb r0, [r0]
cmp r0, 0
beq _080599D6
ldr r0, _080599E4
ldr r0, [r0]
cmp r0, 0x2
bne _080599D6
ldr r0, _080599E8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _080599D6
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80763F8
_080599D6:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080599E0: .4byte gUnknown_202F218
_080599E4: .4byte gUnknown_202F214
_080599E8: .4byte gUnknown_80F4DC8
thumb_func_end sub_8059988
thumb_func_start sub_80599EC
sub_80599EC:
push {r4,lr}
sub sp, 0x4
adds r3, r0, 0
ldr r0, [r1, 0x70]
movs r4, 0x10
ldrsh r2, [r0, r4]
cmp r2, 0
bge _080599FE
adds r2, 0x3
_080599FE:
asrs r2, 2
movs r0, 0x1
str r0, [sp]
adds r0, r3, 0
movs r3, 0
bl sub_8077C44
movs r0, 0x1
add sp, 0x4
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_80599EC
thumb_func_start sub_8059A18
sub_8059A18:
push {lr}
ldr r2, _08059A28
ldr r2, [r2]
bl sub_8077540
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_08059A28: .4byte gUnknown_8106A50
thumb_func_end sub_8059A18
thumb_func_start sub_8059A2C
sub_8059A2C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r9, r0
adds r7, r1, 0
adds r6, r2, 0
mov r8, r3
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
mov r1, r9
ldr r0, [r1, 0x70]
ldrb r0, [r0, 0x9]
mov r10, r0
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
mov r0, r9
adds r1, r7, 0
mov r2, r10
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08059A90
movs r2, 0x1
_08059A90:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8059A2C
thumb_func_start sub_8059AA8
sub_8059AA8:
push {lr}
movs r2, 0x1
bl sub_8077AE4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059AA8
thumb_func_start sub_8059AB8
sub_8059AB8:
push {lr}
bl sub_8078758
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059AB8
thumb_func_start sub_8059AC4
sub_8059AC4:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
ldr r4, _08059AF4
bl sub_807E580
lsls r0, 24
lsrs r0, 23
adds r0, r4
movs r1, 0
ldrsh r2, [r0, r1]
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_8077C44
movs r0, 0x1
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08059AF4: .4byte gUnknown_80F501A
thumb_func_end sub_8059AC4
thumb_func_start sub_8059AF8
sub_8059AF8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x1C
mov r9, r0
adds r6, r1, 0
adds r5, r2, 0
mov r8, r3
movs r7, 0
add r0, sp, 0x18
strb r7, [r0]
adds r0, r5, 0
bl sub_8092B00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl sub_806F4A4
lsls r0, 24
cmp r0, 0
bne _08059B3C
ldr r0, _08059B38
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
b _08059B82
.align 2, 0
_08059B38: .4byte gUnknown_80FEB90
_08059B3C:
adds r0, r5, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r2, _08059B90
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r7, [sp, 0xC]
str r7, [sp, 0x10]
str r7, [sp, 0x14]
mov r0, r9
adds r1, r6, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _08059B7C
movs r2, 0x1
_08059B7C:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
_08059B82:
add sp, 0x1C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059B90: .4byte 0x0000270f
thumb_func_end sub_8059AF8
thumb_func_start sub_8059B94
sub_8059B94:
push {lr}
ldr r2, _08059BA8
ldr r2, [r2]
movs r3, 0x2
bl sub_8077084
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_08059BA8: .4byte gUnknown_8106A4C
thumb_func_end sub_8059B94
thumb_func_start sub_8059BAC
sub_8059BAC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
mov r10, r0
adds r5, r1, 0
movs r0, 0
mov r8, r0
ldr r7, [r5, 0x70]
adds r0, r5, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08059BD8
ldr r0, _08059BD4
b _08059C5E
.align 2, 0
_08059BD4: .4byte gPtrForecastPreventsTypeSwitchMessage
_08059BD8:
movs r1, 0x8C
lsls r1, 1
adds r4, r7, r1
mov r9, sp
movs r6, 0x3
_08059BE2:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08059C08
adds r0, r5, 0
adds r1, r4, 0
bl sub_8071A1C
lsls r0, 24
cmp r0, 0
beq _08059C08
mov r0, r9
adds r0, 0x4
mov r9, r0
subs r0, 0x4
stm r0!, {r4}
movs r1, 0x1
add r8, r1
_08059C08:
adds r4, 0x8
subs r6, 0x1
cmp r6, 0
bge _08059BE2
mov r0, r8
cmp r0, 0
beq _08059C5C
bl sub_8084100
lsls r0, 2
mov r1, sp
adds r4, r1, r0
ldr r1, [r4]
adds r0, r5, 0
bl sub_8071A1C
adds r1, r7, 0
adds r1, 0x5C
movs r2, 0
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x5D
strb r2, [r0]
adds r1, 0x9A
movs r0, 0x1
strb r0, [r1]
ldr r0, _08059C54
ldr r1, [r4]
bl sub_80928C0
ldr r0, _08059C58
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
movs r0, 0x1
b _08059C6A
.align 2, 0
_08059C54: .4byte gUnknown_202DE58
_08059C58: .4byte gUnknown_80FE330
_08059C5C:
ldr r0, _08059C7C
_08059C5E:
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
movs r0, 0
_08059C6A:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059C7C: .4byte gUnknown_80FE36C
thumb_func_end sub_8059BAC
thumb_func_start sub_8059C80
sub_8059C80:
push {lr}
bl sub_8079D1C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059C80
thumb_func_start sub_8059C8C
sub_8059C8C:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r6, 0
cmp r5, r4
bne _08059CA8
ldr r0, _08059CA4
ldr r2, [r0]
adds r0, r4, 0
bl sub_80522F4
b _08059CC6
.align 2, 0
_08059CA4: .4byte gUnknown_80FEB60
_08059CA8:
ldr r0, _08059CD0
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8077084
ldr r0, _08059CD4
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8077084
movs r6, 0x1
_08059CC6:
adds r0, r6, 0
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08059CD0: .4byte gUnknown_8106A4C
_08059CD4: .4byte gUnknown_8106A50
thumb_func_end sub_8059C8C
thumb_func_start sub_8059CD8
sub_8059CD8:
push {lr}
ldr r2, _08059CEC
ldr r2, [r2]
movs r3, 0x2
bl sub_8077160
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_08059CEC: .4byte gUnknown_8106A4C
thumb_func_end sub_8059CD8
thumb_func_start sub_8059CF0
sub_8059CF0:
push {lr}
movs r2, 0
movs r3, 0
bl sub_807D148
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059CF0
thumb_func_start sub_8059D00
sub_8059D00:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08059D3A
movs r7, 0x1
ldr r0, _08059D44
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059D3A
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_08059D3A:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059D44: .4byte gUnknown_80F4DE2
thumb_func_end sub_8059D00
thumb_func_start sub_8059D48
sub_8059D48:
push {lr}
movs r2, 0x1
bl sub_8077780
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059D48
thumb_func_start sub_8059D58
sub_8059D58:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08059D8E
movs r7, 0x1
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059D8E
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_08059D8E:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8059D58
thumb_func_start sub_8059D98
sub_8059D98:
push {lr}
bl sub_80769CC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059D98
thumb_func_start sub_8059DA4
sub_8059DA4:
push {lr}
movs r2, 0x1
bl sub_80763F8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059DA4
thumb_func_start sub_8059DB4
sub_8059DB4:
push {lr}
movs r2, 0x1
bl sub_80765E0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8059DB4
thumb_func_start sub_8059DC4
sub_8059DC4:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08059DFE
movs r7, 0x1
ldr r0, _08059E08
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059DFE
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80765E0
_08059DFE:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059E08: .4byte gUnknown_80F4DCA
thumb_func_end sub_8059DC4
thumb_func_start sub_8059E0C
sub_8059E0C:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _08059E46
movs r7, 0x1
ldr r0, _08059E50
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059E46
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80763F8
_08059E46:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059E50: .4byte gUnknown_80F4DBE
thumb_func_end sub_8059E0C
thumb_func_start sub_8059E54
sub_8059E54:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x2C
adds r6, r0, 0
mov r8, r1
adds r7, r2, 0
adds r1, r3, 0
ldr r0, [sp, 0x48]
lsls r0, 24
movs r2, 0
mov r9, r2
cmp r0, 0
bne _08059E8A
movs r3, 0x80
lsls r3, 1
str r1, [sp]
adds r0, r6, 0
mov r1, r8
adds r2, r7, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r1, 31
mov r9, r1
_08059E8A:
mov r0, r9
cmp r0, 0
bne _08059F1A
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071A1C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071A44
adds r5, r0, 0
adds r0, r7, 0
bl sub_8092C24
str r0, [sp]
add r2, sp, 0x18
str r2, [sp, 0x4]
movs r0, 0x80
lsls r0, 1
str r0, [sp, 0x8]
ldrh r0, [r7, 0x2]
str r0, [sp, 0xC]
mov r0, r9
str r0, [sp, 0x10]
adds r0, r6, 0
mov r1, r8
adds r2, r4, 0
adds r3, r5, 0
bl sub_806EAF4
ldr r0, _08059F2C
ldr r1, [r6, 0x70]
movs r2, 0
bl sub_80708B4
ldr r0, _08059F30
ldr r2, [r0]
adds r0, r6, 0
mov r1, r8
bl sub_80522F4
ldr r0, [sp, 0x18]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
str r0, [sp, 0x18]
cmp r0, 0
bne _08059EF6
movs r0, 0x1
str r0, [sp, 0x18]
_08059EF6:
ldr r2, [sp, 0x18]
add r0, sp, 0x28
str r0, [sp]
mov r0, r9
str r0, [sp, 0x4]
ldr r0, _08059F34
str r0, [sp, 0x8]
movs r0, 0x13
str r0, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
mov r0, r9
str r0, [sp, 0x14]
adds r0, r6, 0
adds r1, r6, 0
movs r3, 0
bl sub_806F370
_08059F1A:
mov r0, r9
add sp, 0x2C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059F2C: .4byte gUnknown_202DF98
_08059F30: .4byte gUnknown_80FC7C8
_08059F34: .4byte 0x000001f7
thumb_func_end sub_8059E54
thumb_func_start sub_8059F38
sub_8059F38:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
adds r5, r2, 0
adds r7, r3, 0
movs r0, 0
mov r8, r0
adds r0, r4, 0
adds r1, r5, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _08059FA0
ldr r0, _08059F98
ldr r3, [r0]
str r7, [sp]
adds r0, r4, 0
adds r1, r6, 0
adds r2, r5, 0
bl sub_8055640
cmp r0, 0
beq _08059F90
movs r1, 0x1
mov r8, r1
ldr r0, _08059F9C
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r4, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _08059F90
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_08059F90:
adds r0, r4, 0
bl sub_8079764
b _08059FB6
.align 2, 0
_08059F98: .4byte gUnknown_80F4F60
_08059F9C: .4byte gUnknown_80F4DCC
_08059FA0:
ldr r0, _08059FC4
ldr r0, [r0]
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0x8
adds r3, r5, 0
bl sub_8079618
movs r0, 0x1
mov r8, r0
_08059FB6:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08059FC4: .4byte gUnknown_80FAD10
thumb_func_end sub_8059F38
thumb_func_start sub_8059FC8
sub_8059FC8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x2C
adds r6, r0, 0
mov r8, r1
adds r7, r2, 0
adds r1, r3, 0
ldr r0, [sp, 0x48]
lsls r0, 24
movs r2, 0
mov r9, r2
cmp r0, 0
bne _08059FFE
movs r3, 0x80
lsls r3, 2
str r1, [sp]
adds r0, r6, 0
mov r1, r8
adds r2, r7, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r1, 31
mov r9, r1
_08059FFE:
mov r0, r9
cmp r0, 0
bne _0805A090
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071A1C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071A44
adds r5, r0, 0
adds r0, r7, 0
bl sub_8092C24
str r0, [sp]
add r2, sp, 0x18
str r2, [sp, 0x4]
movs r0, 0x80
lsls r0, 2
str r0, [sp, 0x8]
ldrh r0, [r7, 0x2]
str r0, [sp, 0xC]
mov r0, r9
str r0, [sp, 0x10]
adds r0, r6, 0
mov r1, r8
adds r2, r4, 0
adds r3, r5, 0
bl sub_806EAF4
ldr r0, _0805A0A0
ldr r1, [r6, 0x70]
movs r2, 0
bl sub_80708B4
ldr r0, _0805A0A4
ldr r2, [r0]
adds r0, r6, 0
mov r1, r8
bl sub_80522F4
ldr r0, [sp, 0x18]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
str r0, [sp, 0x18]
cmp r0, 0
bne _0805A06A
movs r0, 0x1
str r0, [sp, 0x18]
_0805A06A:
ldr r2, [sp, 0x18]
add r0, sp, 0x28
str r0, [sp]
mov r0, r9
str r0, [sp, 0x4]
movs r0, 0xFC
lsls r0, 1
str r0, [sp, 0x8]
movs r0, 0x13
str r0, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
mov r0, r9
str r0, [sp, 0x14]
adds r0, r6, 0
adds r1, r6, 0
movs r3, 0
bl sub_806F370
_0805A090:
mov r0, r9
add sp, 0x2C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A0A0: .4byte gUnknown_202DF98
_0805A0A4: .4byte gUnknown_80FC7C8
thumb_func_end sub_8059FC8
thumb_func_start sub_805A0A8
sub_805A0A8:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A114
movs r7, 0x1
ldr r0, _0805A0F8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A114
movs r0, 0x3
bl sub_8084100
cmp r0, 0x1
beq _0805A0FC
cmp r0, 0x1
ble _0805A0EA
cmp r0, 0x2
beq _0805A10A
_0805A0EA:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
b _0805A114
.align 2, 0
_0805A0F8: .4byte gUnknown_80F4DFC
_0805A0FC:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_8076210
b _0805A114
_0805A10A:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80767B0
_0805A114:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805A0A8
thumb_func_start sub_805A120
sub_805A120:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r6, r0, 0
adds r5, r1, 0
movs r0, 0
mov r10, r0
ldr r1, [r6, 0x70]
mov r9, r1
mov r7, r9
ldr r2, [r5, 0x70]
mov r8, r2
mov r0, r8
str r0, [sp]
ldr r4, _0805A16C
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
movs r1, 0x2C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0805A174
ldr r0, _0805A170
b _0805A1B8
.align 2, 0
_0805A16C: .4byte gUnknown_202DF98
_0805A170: .4byte gUnknown_80FCCE4
_0805A174:
adds r0, r5, 0
movs r1, 0x24
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0805A18C
ldr r0, _0805A188
b _0805A1B8
.align 2, 0
_0805A188: .4byte gUnknown_80FD578
_0805A18C:
mov r0, r9
adds r0, 0x60
mov r2, r8
adds r2, 0x60
ldrb r1, [r0]
movs r4, 0x1
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _0805A1A2
mov r10, r4
_0805A1A2:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _0805A1B0
movs r1, 0x1
mov r10, r1
_0805A1B0:
mov r2, r10
cmp r2, 0
beq _0805A1CC
ldr r0, _0805A1C8
_0805A1B8:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0
b _0805A1FC
.align 2, 0
_0805A1C8: .4byte gUnknown_80FC7AC
_0805A1CC:
ldr r0, [r7, 0x60]
ldr r2, [sp]
ldr r1, [r2, 0x60]
str r1, [r7, 0x60]
str r0, [r2, 0x60]
adds r0, r6, 0
bl sub_806A6E8
adds r0, r5, 0
bl sub_806A6E8
adds r1, r7, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805A1EE
strb r4, [r1]
_0805A1EE:
ldr r0, _0805A20C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0x1
_0805A1FC:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A20C: .4byte gUnknown_80FC790
thumb_func_end sub_805A120
thumb_func_start sub_805A210
sub_805A210:
push {r4,r5,lr}
sub sp, 0x4
adds r5, r3, 0
ldr r4, _0805A238
ldr r3, [r4]
adds r3, 0x1
str r3, [r4]
lsls r3, 8
str r5, [sp]
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805A238: .4byte gUnknown_202F210
thumb_func_end sub_805A210
thumb_func_start sub_805A23C
sub_805A23C:
push {lr}
ldrh r0, [r2, 0x2]
cmp r0, 0xD4
bne _0805A24C
movs r0, 0
bl sub_807EA30
b _0805A252
_0805A24C:
movs r0, 0x1
bl sub_807EA30
_0805A252:
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805A23C
thumb_func_start sub_805A258
sub_805A258:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A292
movs r7, 0x1
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A292
ldr r0, _0805A29C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_80775DC
_0805A292:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A29C: .4byte gUnknown_8106A4C
thumb_func_end sub_805A258
thumb_func_start sub_805A2A0
sub_805A2A0:
push {lr}
bl sub_805BA50
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
thumb_func_end sub_805A2A0
thumb_func_start sub_805A2B0
sub_805A2B0:
push {lr}
ldr r2, _0805A2C4
ldr r2, [r2]
movs r3, 0x2
bl sub_8077160
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805A2C4: .4byte gUnknown_8106A50
thumb_func_end sub_805A2B0
thumb_func_start sub_805A2C8
sub_805A2C8:
push {lr}
sub sp, 0x8
ldr r2, _0805A2E4
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
str r3, [sp, 0x4]
bl sub_8076E20
movs r0, 0x1
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_0805A2E4: .4byte gUnknown_8106A4C
thumb_func_end sub_805A2C8
thumb_func_start sub_805A2E8
sub_805A2E8:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
movs r6, 0
ldr r0, [r1, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
movs r4, 0x80
lsls r4, 1
cmp r0, 0x9
bne _0805A302
movs r4, 0x80
lsls r4, 2
_0805A302:
str r3, [sp]
adds r0, r5, 0
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A312
movs r6, 0x1
_0805A312:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805A2E8
thumb_func_start sub_805A31C
sub_805A31C:
push {r4-r7,lr}
adds r5, r0, 0
adds r6, r1, 0
ldr r4, [r5, 0x70]
ldr r7, [r6, 0x70]
adds r0, r6, 0
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0805A348
ldr r0, _0805A344
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
b _0805A386
.align 2, 0
_0805A344: .4byte gUnknown_80FC854
_0805A348:
adds r0, r7, 0
adds r0, 0x5E
ldrb r0, [r0]
adds r1, r4, 0
adds r1, 0x5E
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x5F
ldrb r0, [r0]
adds r1, 0x1
strb r0, [r1]
ldr r0, _0805A38C
ldr r0, [r0]
movs r2, 0x1
strb r2, [r0, 0xC]
adds r1, 0x9C
ldrb r0, [r1]
cmp r0, 0
bne _0805A370
strb r2, [r1]
_0805A370:
ldr r0, _0805A390
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
adds r0, r5, 0
adds r1, r5, 0
bl sub_806ABAC
movs r0, 0x1
_0805A386:
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A38C: .4byte gUnknown_203B418
_0805A390: .4byte gUnknown_80FC81C
thumb_func_end sub_805A31C
thumb_func_start sub_805A394
sub_805A394:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _0805A3CC
ldr r0, [r0]
ldr r1, _0805A3D0
ldrh r1, [r1]
ldr r2, _0805A3D4
adds r0, r2
strb r1, [r0]
movs r0, 0x1
movs r1, 0
bl sub_807EAA0
lsls r0, 24
cmp r0, 0
bne _0805A3C2
ldr r0, _0805A3D8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_0805A3C2:
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805A3CC: .4byte gUnknown_203B418
_0805A3D0: .4byte gUnknown_80F4F42
_0805A3D4: .4byte 0x0000e268
_0805A3D8: .4byte gUnknown_80FCF7C
thumb_func_end sub_805A394
thumb_func_start sub_805A3DC
sub_805A3DC:
push {lr}
sub sp, 0x8
ldr r2, _0805A3F8
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
str r3, [sp, 0x4]
bl sub_8076F80
movs r0, 0x1
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_0805A3F8: .4byte gUnknown_8106A4C
thumb_func_end sub_805A3DC
thumb_func_start sub_805A3FC
sub_805A3FC:
push {lr}
bl sub_807992C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805A3FC
thumb_func_start sub_805A408
sub_805A408:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A442
movs r7, 0x1
ldr r0, _0805A44C
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A442
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
_0805A442:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A44C: .4byte gUnknown_80F4DF2
thumb_func_end sub_805A408
thumb_func_start sub_805A450
sub_805A450:
push {lr}
ldr r2, _0805A460
ldr r2, [r2]
bl sub_80522F4
movs r0, 0
pop {r1}
bx r1
.align 2, 0
_0805A460: .4byte gUnknown_80FC730
thumb_func_end sub_805A450
thumb_func_start sub_805A464
sub_805A464:
push {r4-r7,lr}
sub sp, 0xC
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A4B4
movs r7, 0x1
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _0805A4B4
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _0805A4B4
str r0, [sp, 0x8]
add r0, sp, 0x4
movs r1, 0x69
movs r2, 0x2
bl sub_8045C28
add r3, sp, 0x8
adds r0, r5, 0
adds r1, r6, 0
add r2, sp, 0x4
bl sub_805A7D4
_0805A4B4:
adds r0, r7, 0
add sp, 0xC
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805A464
thumb_func_start sub_805A4C0
sub_805A4C0:
push {lr}
ldr r2, _0805A4D0
ldr r2, [r2]
bl sub_80522F4
movs r0, 0
pop {r1}
bx r1
.align 2, 0
_0805A4D0: .4byte gUnknown_80FC74C
thumb_func_end sub_805A4C0
thumb_func_start sub_805A4D4
sub_805A4D4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _0805A4F8
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_8075E74
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805A4F8: .4byte gUnknown_80F4E94
thumb_func_end sub_805A4D4
thumb_func_start sub_805A4FC
sub_805A4FC:
push {lr}
bl sub_8076AA4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805A4FC
thumb_func_start sub_805A508
sub_805A508:
push {r4,r5,lr}
sub sp, 0x4
adds r5, r0, 0
adds r3, r1, 0
ldr r0, [r3, 0x70]
movs r1, 0x89
lsls r1, 1
adds r4, r0, r1
ldrb r0, [r4]
cmp r0, 0
beq _0805A540
ldr r1, _0805A53C
lsls r0, 2
adds r0, r1
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r3, 0
movs r3, 0
bl sub_8077C44
movs r0, 0
strb r0, [r4]
b _0805A54C
.align 2, 0
_0805A53C: .4byte gUnknown_80F51D4
_0805A540:
ldr r0, _0805A558
ldr r2, [r0]
adds r0, r5, 0
adds r1, r3, 0
bl sub_80522F4
_0805A54C:
movs r0, 0x1
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805A558: .4byte gUnknown_80FC770
thumb_func_end sub_805A508
thumb_func_start sub_805A55C
sub_805A55C:
push {lr}
bl sub_8078594
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805A55C
thumb_func_start sub_805A568
sub_805A568:
push {r4,lr}
sub sp, 0x4
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805A568
thumb_func_start sub_805A588
sub_805A588:
push {r4-r7,lr}
sub sp, 0x8
adds r6, r0, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A5D8
movs r7, 0x1
adds r0, r6, 0
adds r1, r6, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A5D8
ldr r0, _0805A5E4
ldr r5, [r0]
movs r4, 0
str r4, [sp]
str r4, [sp, 0x4]
adds r0, r6, 0
adds r1, r6, 0
adds r2, r5, 0
movs r3, 0x1
bl sub_8076E20
str r4, [sp]
str r4, [sp, 0x4]
adds r0, r6, 0
adds r1, r6, 0
adds r2, r5, 0
movs r3, 0x1
bl sub_8076F80
_0805A5D8:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A5E4: .4byte gUnknown_8106A4C
thumb_func_end sub_805A588
thumb_func_start sub_805A5E8
sub_805A5E8:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r3, 0
ldr r0, [sp, 0x18]
movs r6, 0
movs r3, 0x80
lsls r3, 1
str r0, [sp]
adds r0, r5, 0
bl sub_8055640
cmp r0, 0
beq _0805A632
movs r6, 0x1
ldr r0, _0805A63C
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A632
ldr r4, [r5, 0x70]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r7, 0
movs r3, 0x1
bl sub_8077160
adds r4, 0xFB
ldrb r0, [r4]
cmp r0, 0
bne _0805A632
strb r6, [r4]
_0805A632:
adds r0, r6, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A63C: .4byte gUnknown_80F4DD2
thumb_func_end sub_805A5E8
thumb_func_start sub_805A640
sub_805A640:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
adds r1, r3, 0
ldr r0, [r5, 0x70]
movs r3, 0x89
lsls r3, 1
adds r4, r0, r3
ldrb r0, [r4]
cmp r0, 0
beq _0805A66C
adds r3, r0, 0
lsls r3, 8
str r1, [sp]
adds r0, r5, 0
adds r1, r6, 0
bl sub_8055640
movs r0, 0
strb r0, [r4]
b _0805A678
_0805A66C:
ldr r0, _0805A684
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
_0805A678:
movs r0, 0x1
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805A684: .4byte gUnknown_80FCA3C
thumb_func_end sub_805A640
thumb_func_start sub_805A688
sub_805A688:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805A6BE
movs r7, 0x1
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805A6BE
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077AE4
_0805A6BE:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805A688
thumb_func_start sub_805A6C8
sub_805A6C8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x8
adds r6, r0, 0
adds r5, r1, 0
ldr r0, [r6, 0x70]
mov r9, r0
ldr r7, [r5, 0x70]
mov r8, r7
ldr r4, _0805A708
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
movs r1, 0x2C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0805A710
ldr r0, _0805A70C
b _0805A73A
.align 2, 0
_0805A708: .4byte gUnknown_202DF98
_0805A70C: .4byte gUnknown_80FCCE8
_0805A710:
adds r0, r5, 0
movs r1, 0x24
bl sub_8046CB0
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
beq _0805A728
ldr r0, _0805A724
b _0805A73A
.align 2, 0
_0805A724: .4byte gUnknown_80FD57C
_0805A728:
ldr r0, [r7, 0x60]
str r0, [sp]
mov r0, sp
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0805A74C
ldr r0, _0805A748
_0805A73A:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0
b _0805A7B4
.align 2, 0
_0805A748: .4byte gUnknown_80FD18C
_0805A74C:
mov r0, r8
adds r0, 0x60
strb r2, [r0, 0x2]
strb r2, [r0, 0x1]
strb r2, [r0]
ldr r0, _0805A7C4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
ldr r4, _0805A7C8
mov r3, r9
adds r3, 0x46
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r2, [r0]
ldr r0, _0805A7CC
ldr r1, [sp, 0x4]
ands r1, r0
orrs r1, r2
str r1, [sp, 0x4]
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0, 0x2]
lsls r0, 16
ldr r2, _0805A7D0
ands r1, r2
orrs r1, r0
str r1, [sp, 0x4]
add r3, sp, 0x4
adds r0, r6, 0
adds r1, r5, 0
mov r2, sp
bl sub_805A7D4
adds r1, r5, 0x4
adds r0, r5, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _0805A7B2
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_0805A7B2:
movs r0, 0x1
_0805A7B4:
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805A7C4: .4byte gUnknown_80FD170
_0805A7C8: .4byte gUnknown_80F4448
_0805A7CC: .4byte 0xffff0000
_0805A7D0: .4byte 0x0000ffff
thumb_func_end sub_805A6C8
thumb_func_start sub_805A7D4
sub_805A7D4:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x78
mov r8, r0
adds r4, r1, 0
adds r6, r2, 0
movs r0, 0x3
str r0, [sp, 0x4]
add r0, sp, 0x28
movs r5, 0
strb r5, [r0]
add r1, sp, 0x24
movs r0, 0x1
strb r0, [r1]
mov r0, sp
adds r0, 0x26
strb r5, [r0]
str r6, [sp, 0x74]
add r1, sp, 0x4
ldrh r0, [r3]
ldrh r2, [r4, 0x4]
adds r0, r2
strh r0, [r1, 0x4]
ldrh r0, [r3, 0x2]
ldrh r2, [r4, 0x6]
adds r0, r2
strh r0, [r1, 0x6]
movs r1, 0x4
ldrsh r0, [r4, r1]
lsls r1, r0, 1
adds r1, r0
lsls r1, 3
adds r1, 0x4
lsls r1, 8
movs r2, 0x6
ldrsh r0, [r4, r2]
lsls r2, r0, 1
adds r2, r0
lsls r2, 3
adds r2, 0x4
lsls r2, 8
add r0, sp, 0x4
bl sub_8045394
add r0, sp, 0x4
strh r5, [r0, 0x26]
ldr r0, _0805A858
add r1, sp, 0x4
movs r2, 0
bl sub_8045B94
str r5, [sp]
mov r0, r8
add r1, sp, 0x4
adds r2, r6, 0
movs r3, 0x1
bl sub_804652C
add sp, 0x78
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0805A858: .4byte gUnknown_202DE58
thumb_func_end sub_805A7D4
thumb_func_start sub_805A85C
sub_805A85C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
mov r8, r0
adds r6, r1, 0
mov r10, r2
str r3, [sp, 0x24]
ldr r0, [r6, 0x4]
str r0, [sp, 0x18]
adds r0, r6, 0
movs r1, 0xA
movs r2, 0x8
bl sub_806CDD4
movs r5, 0
_0805A880:
movs r0, 0x3
bl sub_8084100
adds r4, r0, 0
movs r0, 0x3
bl sub_8084100
adds r2, r0, 0
subs r4, 0x1
subs r2, 0x1
cmp r4, 0
bne _0805A89C
cmp r2, 0
beq _0805A8BC
_0805A89C:
ldrh r0, [r6, 0x4]
adds r0, r4
lsls r0, 16
ldrh r1, [r6, 0x6]
adds r1, r2
lsls r1, 16
lsrs r0, 16
orrs r0, r1
str r0, [sp, 0x18]
adds r0, r6, 0
add r1, sp, 0x18
bl sub_80705F0
lsls r0, 24
cmp r0, 0
beq _0805A8C2
_0805A8BC:
adds r5, 0x1
cmp r5, 0x27
ble _0805A880
_0805A8C2:
cmp r5, 0x28
bne _0805A8DC
ldr r0, _0805A8D8
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
b _0805AAB8
.align 2, 0
_0805A8D8: .4byte gUnknown_80FEBDC
_0805A8DC:
add r0, sp, 0x18
movs r2, 0
ldrsh r1, [r0, r2]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r3, 0xC0
lsls r3, 4
adds r0, r3
ldr r1, [r6, 0xC]
subs r0, r1
movs r1, 0xC
bl __divsi3
str r0, [sp, 0x28]
add r0, sp, 0x18
movs r2, 0x2
ldrsh r1, [r0, r2]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r3, 0x80
lsls r3, 5
adds r0, r3
ldr r1, [r6, 0x10]
subs r0, r1
movs r1, 0xC
bl __divsi3
str r0, [sp, 0x2C]
adds r4, r6, 0x4
adds r0, r4, 0
bl sub_803F428
lsls r0, 24
mov r9, r4
cmp r0, 0
bne _0805A934
add r0, sp, 0x18
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _0805A94C
_0805A934:
movs r5, 0xB
_0805A936:
adds r0, r6, 0
ldr r1, [sp, 0x28]
ldr r2, [sp, 0x2C]
bl sub_804539C
movs r0, 0x2C
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _0805A936
_0805A94C:
add r0, sp, 0x18
movs r1, 0
ldrsh r0, [r0, r1]
add r4, sp, 0x18
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8049590
ldr r5, [r0, 0x10]
cmp r5, 0
beq _0805AA4C
adds r0, r5, 0
bl sub_80450F8
adds r7, r0, 0
cmp r7, 0x1
bne _0805A9FE
add r4, sp, 0x1C
ldr r1, _0805AA44
adds r0, r4, 0
bl sub_8092A88
adds r0, r5, 0
adds r1, r4, 0
bl sub_80571F0
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _0805A9B0
mov r0, r10
ldr r1, [sp, 0x24]
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r1, _0805AA48
movs r3, 0
ldrsh r2, [r1, r3]
str r4, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r4, [sp, 0xC]
str r7, [sp, 0x10]
str r4, [sp, 0x14]
mov r0, r8
adds r1, r5, 0
movs r3, 0
bl sub_806F370
_0805A9B0:
bl sub_8044B28
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _0805AAB6
mov r0, r8
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805AAB6
ldr r0, _0805AA48
movs r1, 0
ldrsh r2, [r0, r1]
str r4, [sp]
str r4, [sp, 0x4]
movs r0, 0xFF
lsls r0, 1
str r0, [sp, 0x8]
str r4, [sp, 0xC]
str r4, [sp, 0x10]
str r4, [sp, 0x14]
mov r0, r8
mov r1, r8
movs r3, 0
bl sub_806F370
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0805AAB6
mov r0, r8
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805AAB6
_0805A9FE:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805AAB6
mov r0, r9
bl sub_803F428
lsls r0, 24
cmp r0, 0
bne _0805AA22
add r0, sp, 0x18
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _0805AA5E
_0805AA22:
ldr r2, [sp, 0x28]
negs r7, r2
ldr r3, [sp, 0x2C]
negs r4, r3
movs r5, 0xB
_0805AA2C:
adds r0, r6, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_804539C
movs r0, 0x2C
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _0805AA2C
b _0805AA5E
.align 2, 0
_0805AA44: .4byte 0x00000163
_0805AA48: .4byte gUnknown_80F4F82
_0805AA4C:
add r0, sp, 0x18
movs r2, 0
ldrsh r1, [r0, r2]
movs r3, 0x2
ldrsh r2, [r4, r3]
adds r0, r6, 0
movs r3, 0
bl sub_80694C0
_0805AA5E:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805AAB6
adds r0, r6, 0
movs r1, 0
bl sub_804535C
mov r1, r9
adds r0, r6, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _0805AA8C
mov r0, r8
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_0805AA8C:
ldr r0, [r6, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0805AAA0
mov r0, r9
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0805AAA0:
adds r0, r6, 0
bl sub_806A5B8
ldr r0, _0805AAC8
ldr r0, [r0]
ldr r1, _0805AACC
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8075900
_0805AAB6:
movs r0, 0x1
_0805AAB8:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805AAC8: .4byte gUnknown_203B418
_0805AACC: .4byte 0x00003a08
thumb_func_end sub_805A85C
thumb_func_start sub_805AAD0
sub_805AAD0:
push {lr}
adds r1, r0, 0
bl sub_80782CC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805AAD0
thumb_func_start sub_805AAE0
sub_805AAE0:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
adds r6, r1, 0
ldr r0, [r4, 0x70]
movs r7, 0
movs r1, 0x9E
lsls r1, 1
adds r5, r0, r1
ldr r0, [r5]
bl sub_8094450
cmp r0, 0x1
ble _0805AB20
ldr r0, _0805AB1C
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
movs r3, 0x63
bl sub_8077084
mov r0, sp
movs r1, 0x1
bl sub_80943A0
ldr r0, [sp]
str r0, [r5]
movs r7, 0x1
b _0805AB36
.align 2, 0
_0805AB1C: .4byte gUnknown_8106A4C
_0805AB20:
ldr r0, _0805AB40
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0805AB44
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_80522F4
_0805AB36:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805AB40: .4byte gUnknown_202DF98
_0805AB44: .4byte gUnknown_80FC5CC
thumb_func_end sub_805AAE0
thumb_func_start sub_805AB48
sub_805AB48:
push {lr}
bl sub_8079A24
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805AB48
thumb_func_start sub_805AB54
sub_805AB54:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
bne _0805AB70
b _0805AC86
_0805AB70:
movs r7, 0x1
ldr r0, _0805ABA8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
bne _0805AB88
b _0805AC86
_0805AB88:
ldr r1, _0805ABAC
ldr r0, _0805ABB0
ldr r0, [r0]
ldr r2, _0805ABB4
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x8
bhi _0805AC7C
lsls r0, 2
ldr r1, _0805ABB8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0805ABA8: .4byte gUnknown_80F4E06
_0805ABAC: .4byte gUnknown_80F5978
_0805ABB0: .4byte gUnknown_203B418
_0805ABB4: .4byte 0x00003a0e
_0805ABB8: .4byte _0805ABBC
.align 2, 0
_0805ABBC:
.4byte _0805ABE0
.4byte _0805ABEC
.4byte _0805AC08
.4byte _0805AC16
.4byte _0805AC34
.4byte _0805AC50
.4byte _0805AC64
.4byte _0805AC70
.4byte _0805AC7C
_0805ABE0:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80763F8
b _0805AC86
_0805ABEC:
ldr r1, _0805AC04
adds r0, r6, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_8075C58
b _0805AC86
.align 2, 0
_0805AC04: .4byte gUnknown_80F4E74
_0805AC08:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_80779F0
b _0805AC86
_0805AC16:
ldr r0, _0805AC30
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076E20
b _0805AC86
.align 2, 0
_0805AC30: .4byte gUnknown_8106A4C
_0805AC34:
ldr r0, _0805AC4C
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076F80
b _0805AC86
.align 2, 0
_0805AC4C: .4byte gUnknown_8106A4C
_0805AC50:
ldr r0, _0805AC60
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0
bl sub_80775DC
b _0805AC86
.align 2, 0
_0805AC60: .4byte gUnknown_8106A4C
_0805AC64:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077AE4
b _0805AC86
_0805AC70:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80776C0
b _0805AC86
_0805AC7C:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077780
_0805AC86:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805AB54
thumb_func_start sub_805AC90
sub_805AC90:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805ACCA
movs r7, 0x1
ldr r0, _0805ACD4
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805ACCA
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8077AE4
_0805ACCA:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805ACD4: .4byte gUnknown_80F4DFA
thumb_func_end sub_805AC90
thumb_func_start sub_805ACD8
sub_805ACD8:
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
ldr r0, _0805AD00
ldr r4, [r0]
adds r0, r5, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077084
adds r0, r5, 0
adds r1, r6, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077160
movs r0, 0x1
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805AD00: .4byte gUnknown_8106A4C
thumb_func_end sub_805ACD8
thumb_func_start sub_805AD04
sub_805AD04:
push {r4,r5,lr}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _0805AD30
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r3, r0, 0
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8076090
movs r0, 0x1
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805AD30: .4byte gUnknown_80F4EE0
thumb_func_end sub_805AD04
thumb_func_start sub_805AD34
sub_805AD34:
push {lr}
sub sp, 0x8
ldr r2, _0805AD50
ldr r2, [r2]
movs r3, 0x1
str r3, [sp]
str r3, [sp, 0x4]
movs r3, 0x2
bl sub_8076E20
movs r0, 0x1
add sp, 0x8
pop {r1}
bx r1
.align 2, 0
_0805AD50: .4byte gUnknown_8106A4C
thumb_func_end sub_805AD34
thumb_func_start sub_805AD54
sub_805AD54:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r5, r0, 0
mov r9, r1
movs r0, 0
mov r10, r0
ldr r1, [r5, 0x70]
mov r8, r1
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _0805AD88
ldr r0, _0805AD80
ldr r0, [r0]
ldr r1, _0805AD84
adds r7, r0, r1
movs r0, 0x10
b _0805AD92
.align 2, 0
_0805AD80: .4byte gUnknown_203B418
_0805AD84: .4byte 0x0001358c
_0805AD88:
ldr r0, _0805AD98
ldr r0, [r0]
ldr r1, _0805AD9C
adds r7, r0, r1
movs r0, 0x4
_0805AD92:
str r0, [sp]
movs r6, 0
b _0805AE0E
.align 2, 0
_0805AD98: .4byte gUnknown_203B418
_0805AD9C: .4byte 0x0001357c
_0805ADA0:
lsls r0, r6, 2
adds r0, r7
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805AE0C
cmp r5, r4
beq _0805AE0C
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0805AE0C
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _0805AE0C
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0805ADE2
cmp r0, 0x47
bne _0805ADE6
_0805ADE2:
movs r0, 0x1
b _0805ADE8
_0805ADE6:
movs r0, 0
_0805ADE8:
cmp r0, 0
bne _0805AE0C
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x2
mov r3, r9
adds r3, 0x4
bl sub_807D148
movs r0, 0x1
mov r10, r0
mov r1, r8
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805AE0C
mov r0, r10
strb r0, [r1]
_0805AE0C:
adds r6, 0x1
_0805AE0E:
ldr r1, [sp]
cmp r6, r1
blt _0805ADA0
mov r0, r10
cmp r0, 0
bne _0805AE26
ldr r0, _0805AE38
ldr r2, [r0]
adds r0, r5, 0
mov r1, r9
bl sub_80522F4
_0805AE26:
mov r0, r10
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805AE38: .4byte gUnknown_81004EC
thumb_func_end sub_805AD54
thumb_func_start sub_805AE3C
sub_805AE3C:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
mov r8, r2
adds r4, r3, 0
bl sub_807A9D8
movs r3, 0x80
lsls r3, 2
str r4, [sp]
adds r0, r5, 0
adds r1, r6, 0
mov r2, r8
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805AE3C
thumb_func_start sub_805AE74
sub_805AE74:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805AEB8
movs r7, 0x1
ldr r0, _0805AEC4
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805AEB8
ldr r0, _0805AEC8
ldr r2, [r0]
str r7, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076F80
_0805AEB8:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805AEC4: .4byte gUnknown_80F4DDA
_0805AEC8: .4byte gUnknown_8106A4C
thumb_func_end sub_805AE74
thumb_func_start sub_805AECC
sub_805AECC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r6, r0, 0
adds r7, r1, 0
adds r5, r2, 0
adds r4, r3, 0
movs r0, 0
mov r8, r0
adds r0, r6, 0
bl sub_807A9D8
movs r3, 0x80
lsls r3, 1
str r4, [sp]
adds r0, r6, 0
adds r1, r7, 0
adds r2, r5, 0
bl sub_8055640
cmp r0, 0
beq _0805AF1E
movs r1, 0x1
mov r8, r1
ldr r0, _0805AF2C
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r6, 0
adds r1, r7, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805AF1E
adds r0, r6, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0
bl sub_8076210
_0805AF1E:
mov r0, r8
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805AF2C: .4byte gUnknown_80F4DFE
thumb_func_end sub_805AECC
thumb_func_start sub_805AF30
sub_805AF30:
push {r4-r7,lr}
sub sp, 0x4
adds r7, r0, 0
adds r5, r1, 0
adds r6, r2, 0
adds r4, r3, 0
movs r0, 0x64
bl sub_8084100
adds r1, r0, 0
cmp r0, 0x9
bgt _0805AF54
str r4, [sp]
adds r0, r7, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0x78
b _0805AF92
_0805AF54:
cmp r0, 0x1D
bgt _0805AF78
ldr r0, [r5, 0x70]
movs r1, 0x10
ldrsh r2, [r0, r1]
cmp r2, 0
bge _0805AF64
adds r2, 0x3
_0805AF64:
asrs r2, 2
movs r0, 0x1
str r0, [sp]
adds r0, r7, 0
adds r1, r5, 0
movs r3, 0
bl sub_8077C44
movs r0, 0x1
b _0805AF9C
_0805AF78:
cmp r1, 0x3B
bgt _0805AF88
str r4, [sp]
adds r0, r7, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0x50
b _0805AF92
_0805AF88:
str r4, [sp]
adds r0, r7, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0x28
_0805AF92:
bl sub_8055864
negs r1, r0
orrs r1, r0
lsrs r0, r1, 31
_0805AF9C:
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805AF30
thumb_func_start sub_805AFA4
sub_805AFA4:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r4, r0, 0
adds r5, r1, 0
mov r8, r2
adds r6, r3, 0
bl sub_807A9D8
ldr r3, [r4, 0x70]
movs r0, 0x10
ldrsh r2, [r3, r0]
adds r0, r2, 0
cmp r2, 0
bge _0805AFC6
adds r0, r2, 0x3
_0805AFC6:
movs r7, 0xE
ldrsh r1, [r3, r7]
asrs r0, 2
cmp r1, r0
bgt _0805AFD4
movs r2, 0
b _0805AFFA
_0805AFD4:
movs r0, 0xE
ldrsh r1, [r3, r0]
lsrs r0, r2, 31
adds r0, r2, r0
asrs r0, 1
cmp r1, r0
bgt _0805AFE6
movs r2, 0x1
b _0805AFFA
_0805AFE6:
lsls r0, r2, 1
adds r0, r2
cmp r0, 0
bge _0805AFF0
adds r0, 0x3
_0805AFF0:
asrs r0, 2
movs r2, 0x3
cmp r1, r0
bgt _0805AFFA
movs r2, 0x2
_0805AFFA:
ldr r1, _0805B024
lsls r0, r2, 2
adds r0, r1
ldr r3, [r0]
str r6, [sp]
adds r0, r4, 0
adds r1, r5, 0
mov r2, r8
bl sub_8055640
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B024: .4byte gUnknown_80F51C4
thumb_func_end sub_805AFA4
thumb_func_start sub_805B028
sub_805B028:
push {lr}
movs r2, 0x1
bl sub_8077780
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B028
thumb_func_start sub_805B038
sub_805B038:
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
adds r4, r2, 0
bl sub_80441BC
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _0805B05A
strb r0, [r4, 0x4]
adds r0, r5, 0
adds r1, r6, 0
bl sub_8078E18
movs r0, 0x1
b _0805B068
_0805B05A:
ldr r0, _0805B070
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
movs r0, 0
_0805B068:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805B070: .4byte gUnknown_80FEFF4
thumb_func_end sub_805B038
thumb_func_start sub_805B074
sub_805B074:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805B0AE
movs r7, 0x1
ldr r0, _0805B0B8
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805B0AE
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_80763F8
_0805B0AE:
adds r0, r7, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B0B8: .4byte gUnknown_80F4DC6
thumb_func_end sub_805B074
thumb_func_start sub_805B0BC
sub_805B0BC:
push {lr}
ldr r2, [r0, 0x70]
adds r2, 0x46
ldrb r2, [r2]
bl sub_807CD9C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B0BC
thumb_func_start sub_805B0D0
sub_805B0D0:
push {r4-r7,lr}
adds r7, r0, 0
adds r5, r1, 0
ldr r4, [r5, 0x70]
ldr r1, _0805B134
ldr r0, _0805B138
ldr r0, [r0]
ldr r2, _0805B13C
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r6, [r0]
adds r0, r5, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0805B14C
adds r0, r4, 0
adds r0, 0x5C
strb r6, [r0]
adds r0, 0x1
strb r1, [r0]
adds r1, r4, 0
adds r1, 0xF6
movs r0, 0x1
strb r0, [r1]
ldr r0, _0805B140
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
bl GetUnformattedTypeString
adds r1, r0, 0
ldr r0, _0805B144
bl strcpy
ldr r0, _0805B148
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0x1
b _0805B15A
.align 2, 0
_0805B134: .4byte gUnknown_80F561C
_0805B138: .4byte gUnknown_203B418
_0805B13C: .4byte 0x00003a0e
_0805B140: .4byte gUnknown_202DFE8
_0805B144: .4byte gUnknown_202DE58
_0805B148: .4byte gUnknown_80FEB08
_0805B14C:
ldr r0, _0805B160
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0
_0805B15A:
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B160: .4byte gPtrForecastPreventsTypeSwitchMessage
thumb_func_end sub_805B0D0
thumb_func_start sub_805B164
sub_805B164:
push {lr}
ldr r2, _0805B178
ldr r2, [r2]
movs r3, 0x2
bl sub_8077084
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805B178: .4byte gUnknown_8106A50
thumb_func_end sub_805B164
thumb_func_start sub_805B17C
sub_805B17C:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r4, r0, 0
adds r5, r1, 0
adds r7, r2, 0
mov r8, r3
movs r0, 0
mov r9, r0
ldrh r1, [r7, 0x2]
ldr r0, _0805B1A8
cmp r1, r0
bne _0805B1AC
adds r0, r4, 0
adds r1, r5, 0
bl sub_807A9D8
movs r6, 0x9E
lsls r6, 1
b _0805B1BA
.align 2, 0
_0805B1A8: .4byte 0x00000123
_0805B1AC:
movs r6, 0x75
cmp r1, 0x45
beq _0805B1BA
movs r6, 0xF1
cmp r1, 0x7D
bne _0805B1BA
movs r6, 0x7E
_0805B1BA:
movs r3, 0x80
lsls r3, 1
mov r1, r8
str r1, [sp]
adds r0, r4, 0
adds r1, r5, 0
adds r2, r7, 0
bl sub_8055640
cmp r0, 0
beq _0805B1F4
movs r0, 0x1
mov r9, r0
ldr r0, _0805B204
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r4, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805B1F4
adds r0, r4, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0
bl sub_80768DC
_0805B1F4:
mov r0, r9
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B204: .4byte gUnknown_80F4E08
thumb_func_end sub_805B17C
thumb_func_start sub_805B208
sub_805B208:
push {lr}
bl sub_80788E8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B208
thumb_func_start sub_805B214
sub_805B214:
push {lr}
bl sub_8076B48
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B214
thumb_func_start sub_805B220
sub_805B220:
push {r4-r6,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r6, 0
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x6]
movs r2, 0x1
cmp r0, 0
beq _0805B234
movs r2, 0x2
_0805B234:
adds r0, r4, 0x4
movs r1, 0x13
bl sub_807FCD4
lsls r0, 24
cmp r0, 0
beq _0805B246
movs r6, 0x1
b _0805B252
_0805B246:
ldr r0, _0805B260
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_0805B252:
bl sub_8049ED4
adds r0, r6, 0
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805B260: .4byte gUnknown_80FC5A8
thumb_func_end sub_805B220
thumb_func_start sub_805B264
sub_805B264:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
mov r8, r0
adds r7, r1, 0
mov r9, r2
mov r12, r3
ldr r4, [r7, 0x70]
ldr r0, _0805B2D0
ldr r3, [r0]
movs r6, 0
ldr r0, _0805B2D4
ldr r1, [r0]
movs r0, 0xC1
lsls r0, 9
adds r5, r1, r0
ldr r2, _0805B2D8
lsls r0, r3, 2
adds r0, r2
ldr r0, [r0]
str r0, [r5]
ldr r0, _0805B2DC
adds r1, r0
str r6, [r1]
ldr r0, _0805B2E0
lsls r3, 1
adds r3, r0
movs r0, 0
ldrsh r3, [r3, r0]
adds r4, 0xC0
ldrb r0, [r4]
cmp r0, 0xA
bne _0805B2AC
lsls r3, 1
_0805B2AC:
mov r0, r12
str r0, [sp]
mov r0, r8
adds r1, r7, 0
mov r2, r9
bl sub_8055864
negs r1, r0
orrs r1, r0
lsrs r6, r1, 31
adds r0, r6, 0
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B2D0: .4byte gUnknown_202F224
_0805B2D4: .4byte gUnknown_203B418
_0805B2D8: .4byte gUnknown_8106A8C
_0805B2DC: .4byte 0x00018204
_0805B2E0: .4byte gUnknown_80F4F94
thumb_func_end sub_805B264
thumb_func_start sub_805B2E4
sub_805B2E4:
push {lr}
bl sub_80799A8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B2E4
thumb_func_start sub_805B2F0
sub_805B2F0:
push {lr}
bl sub_8079B1C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B2F0
thumb_func_start sub_805B2FC
sub_805B2FC:
push {lr}
ldr r2, _0805B310
ldr r2, [r2]
movs r3, 0x1
bl sub_8077160
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805B310: .4byte gUnknown_8106A4C
thumb_func_end sub_805B2FC
thumb_func_start sub_805B314
sub_805B314:
push {lr}
movs r2, 0x1
bl sub_80783C4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B314
thumb_func_start sub_805B324
sub_805B324:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805B368
movs r7, 0x1
ldr r0, _0805B374
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805B368
ldr r0, _0805B378
ldr r2, [r0]
str r7, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076E20
_0805B368:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B374: .4byte gUnknown_80F4DD8
_0805B378: .4byte gUnknown_8106A50
thumb_func_end sub_805B324
thumb_func_start sub_805B37C
sub_805B37C:
push {lr}
bl sub_80780E4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B37C
thumb_func_start sub_805B388
sub_805B388:
push {r4,lr}
sub sp, 0x4
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805B39E
movs r0, 0x1
_0805B39E:
add sp, 0x4
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805B388
thumb_func_start sub_805B3A8
sub_805B3A8:
push {lr}
bl sub_8079BA8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B3A8
thumb_func_start sub_805B3B4
sub_805B3B4:
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
ldr r0, _0805B3DC
ldr r4, [r0]
adds r0, r5, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077084
adds r0, r5, 0
adds r1, r6, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077160
movs r0, 0x1
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805B3DC: .4byte gUnknown_8106A50
thumb_func_end sub_805B3B4
thumb_func_start sub_805B3E0
sub_805B3E0:
push {r4,lr}
sub sp, 0x4
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
movs r0, 0x1
add sp, 0x4
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805B3E0
thumb_func_start sub_805B3FC
sub_805B3FC:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r3, 0
ldr r0, [sp, 0x18]
movs r6, 0
movs r3, 0x80
lsls r3, 1
str r0, [sp]
adds r0, r5, 0
bl sub_8055640
cmp r0, 0
beq _0805B446
movs r6, 0x1
ldr r0, _0805B450
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r5, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805B446
ldr r4, [r5, 0x70]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r7, 0
movs r3, 0x1
bl sub_8077084
adds r4, 0xFB
ldrb r0, [r4]
cmp r0, 0
bne _0805B446
strb r6, [r4]
_0805B446:
adds r0, r6, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B450: .4byte gUnknown_80F4DCE
thumb_func_end sub_805B3FC
thumb_func_start sub_805B454
sub_805B454:
push {lr}
movs r2, 0x1
bl sub_807614C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B454
thumb_func_start sub_805B464
sub_805B464:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r6, r0, 0
mov r9, r1
movs r0, 0
str r0, [sp]
ldr r1, [r6, 0x70]
mov r8, r1
mov r1, r9
ldr r0, [r1, 0x70]
movs r5, 0
ldr r1, _0805B50C
mov r10, r1
subs r1, 0x2F
adds r4, r0, r1
movs r7, 0x3
_0805B48C:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805B4D4
ldrh r1, [r4, 0x2]
adds r0, r6, 0
bl sub_805755C
lsls r0, 24
cmp r0, 0
bne _0805B4D4
ldrh r2, [r4, 0x2]
adds r0, r2, 0
cmp r0, r10
beq _0805B4D4
cmp r0, 0xE5
beq _0805B4D4
cmp r0, 0x8A
beq _0805B4D4
cmp r0, 0x28
beq _0805B4D4
cmp r0, 0x11
beq _0805B4D4
ldrb r1, [r4]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _0805B4D4
lsls r1, r5, 1
movs r0, 0xBD
lsls r0, 1
add r0, r8
adds r0, r1
strh r2, [r0]
adds r5, 0x1
_0805B4D4:
adds r4, 0x8
subs r7, 0x1
cmp r7, 0
bge _0805B48C
ldr r0, _0805B510
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
cmp r5, 0
beq _0805B518
mov r1, r8
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805B4F8
movs r0, 0x1
strb r0, [r1]
_0805B4F8:
ldr r0, _0805B514
ldr r2, [r0]
adds r0, r6, 0
mov r1, r9
bl sub_80522F4
movs r0, 0x1
str r0, [sp]
b _0805B524
.align 2, 0
_0805B50C: .4byte 0x00000147
_0805B510: .4byte gUnknown_202DF98
_0805B514: .4byte gUnknown_80FDCE4
_0805B518:
ldr r0, _0805B538
ldr r2, [r0]
adds r0, r6, 0
mov r1, r9
bl sub_80522F4
_0805B524:
ldr r0, [sp]
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B538: .4byte gUnknown_80FDD00
thumb_func_end sub_805B464
thumb_func_start sub_805B53C
sub_805B53C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r10, r0
mov r9, r1
adds r6, r2, 0
mov r8, r3
movs r0, 0
add r1, sp, 0x18
strb r0, [r1]
mov r0, r10
ldr r1, [r0, 0x70]
movs r5, 0x1
movs r2, 0
ldr r4, _0805B580
movs r3, 0
ldrsh r0, [r4, r3]
cmp r0, 0
blt _0805B598
movs r7, 0xC
ldrsh r3, [r1, r7]
adds r1, r4, 0
ldr r4, _0805B584
_0805B570:
movs r7, 0
ldrsh r0, [r1, r7]
cmp r3, r0
bge _0805B588
movs r0, 0x2
ldrsh r5, [r1, r0]
b _0805B598
.align 2, 0
_0805B580: .4byte gUnknown_80F55EC
_0805B584: .4byte 0x000003e6
_0805B588:
adds r1, 0x4
adds r2, 0x1
cmp r2, r4
bgt _0805B598
movs r7, 0
ldrsh r0, [r1, r7]
cmp r0, 0
bge _0805B570
_0805B598:
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
movs r1, 0
str r1, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r1, [sp, 0x14]
mov r0, r10
mov r1, r9
adds r2, r5, 0
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _0805B5DC
movs r2, 0x1
_0805B5DC:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805B53C
thumb_func_start sub_805B5F4
sub_805B5F4:
push {r4,lr}
adds r4, r0, 0
movs r2, 0x1
bl sub_8077F40
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805B60E
movs r0, 0x1
strb r0, [r1]
_0805B60E:
movs r0, 0x1
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805B5F4
thumb_func_start sub_805B618
sub_805B618:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
adds r6, r0, 0
mov r8, r1
mov r9, r3
ldr r0, _0805B660
ldr r4, [r0]
ldr r5, _0805B664
lsls r4, 3
adds r0, r4, r5
ldrh r1, [r0]
mov r0, sp
bl sub_8092A88
adds r5, 0x4
adds r4, r5
ldr r4, [r4]
adds r0, r6, 0
mov r1, r8
mov r2, sp
mov r3, r9
bl _call_via_r4
lsls r0, 24
lsrs r0, 24
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805B660: .4byte gUnknown_202F228
_0805B664: .4byte gUnknown_80F59C8
thumb_func_end sub_805B618
thumb_func_start sub_805B668
sub_805B668:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
adds r7, r2, 0
adds r6, r3, 0
movs r0, 0
mov r8, r0
adds r0, r4, 0
movs r1, 0x3A
bl sub_8071824
lsls r0, 24
lsrs r0, 24
mov r9, r0
adds r0, r4, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
beq _0805B712
movs r3, 0x80
lsls r3, 1
str r6, [sp]
adds r0, r5, 0
adds r1, r4, 0
adds r2, r7, 0
bl sub_8055640
adds r1, r0, 0
cmp r1, 0
beq _0805B71E
movs r0, 0x1
mov r8, r0
lsrs r0, r1, 31
adds r0, r1, r0
asrs r4, r0, 1
cmp r4, 0
bgt _0805B6BE
movs r4, 0x1
_0805B6BE:
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _0805B71E
ldr r0, [r5, 0x70]
adds r1, r0, 0
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805B6DC
mov r0, r8
strb r0, [r1]
_0805B6DC:
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _0805B71E
mov r0, r9
cmp r0, 0
beq _0805B700
movs r3, 0xFD
lsls r3, 1
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0xD
bl sub_806F324
b _0805B71E
_0805B700:
mov r0, r8
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0
bl sub_8077C44
b _0805B71E
_0805B712:
ldr r0, _0805B730
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0805B71E:
mov r0, r8
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B730: .4byte gPtrSleepingTargetOnlyMessage
thumb_func_end sub_805B668
thumb_func_start sub_805B734
sub_805B734:
push {lr}
bl sub_8078678
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B734
thumb_func_start sub_805B740
sub_805B740:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
mov r9, r0
adds r6, r1, 0
ldr r5, [r6, 0x70]
movs r7, 0
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _0805B7C2
movs r4, 0
movs r0, 0x60
adds r0, r5
mov r8, r0
_0805B75E:
lsls r1, r4, 2
ldr r0, _0805B7D4
ldr r0, [r0]
adds r2, r1, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805B790
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0805B790
ldrb r0, [r2, 0x2]
cmp r0, 0x7C
bne _0805B790
ldrb r1, [r2, 0x1]
adds r1, 0x7D
lsls r1, 24
lsrs r1, 24
adds r0, r2, 0
movs r2, 0
bl sub_8090A8C
movs r7, 0x1
_0805B790:
adds r4, 0x1
cmp r4, 0x13
ble _0805B75E
mov r0, r8
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805B7C2
adds r0, r5, 0
adds r0, 0x62
ldrb r0, [r0]
cmp r0, 0x7C
bne _0805B7C2
adds r0, r5, 0
adds r0, 0x61
ldrb r1, [r0]
adds r1, 0x7D
lsls r1, 24
lsrs r1, 24
mov r0, r8
movs r2, 0
bl sub_8090A8C
movs r7, 0x1
_0805B7C2:
cmp r7, 0
beq _0805B7DC
ldr r0, _0805B7D8
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
b _0805B7E8
.align 2, 0
_0805B7D4: .4byte gUnknown_203B460
_0805B7D8: .4byte gUnknown_80FDC9C
_0805B7DC:
ldr r0, _0805B7F8
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
_0805B7E8:
adds r0, r7, 0
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B7F8: .4byte gUnknown_80FDCA0
thumb_func_end sub_805B740
thumb_func_start sub_805B7FC
sub_805B7FC:
push {lr}
bl sub_8079AA0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805B7FC
thumb_func_start sub_805B808
sub_805B808:
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0x1C
mov r9, r0
mov r10, r1
adds r6, r2, 0
mov r8, r3
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r1, _0805B880
movs r3, 0
ldrsh r2, [r1, r3]
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
mov r0, r9
mov r1, r10
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _0805B868
movs r2, 0x1
_0805B868:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805B880: .4byte gUnknown_80F4F7E
thumb_func_end sub_805B808
thumb_func_start sub_805B884
sub_805B884:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
ldr r0, _0805B8AC
ldr r2, [r0]
adds r0, r4, 0
movs r3, 0x1
bl sub_8077084
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
movs r3, 0x1
bl sub_8077910
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805B8AC: .4byte gUnknown_8106A4C
thumb_func_end sub_805B884
thumb_func_start sub_805B8B0
sub_805B8B0:
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
adds r7, r1, 0
adds r4, r2, 0
adds r6, r3, 0
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _0805B8EC
ldr r0, _0805B8E8
ldr r3, [r0]
str r6, [sp]
adds r0, r5, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_8055640
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
adds r0, r5, 0
bl sub_8079764
b _0805B900
.align 2, 0
_0805B8E8: .4byte gUnknown_80F4F58
_0805B8EC:
ldr r0, _0805B90C
ldr r0, [r0]
str r0, [sp]
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x6
adds r3, r4, 0
bl sub_8079618
movs r4, 0x1
_0805B900:
adds r0, r4, 0
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B90C: .4byte gUnknown_80FAFF0
thumb_func_end sub_805B8B0
thumb_func_start sub_805B910
sub_805B910:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
adds r6, r1, 0
movs r7, 0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805B954
movs r7, 0x1
ldr r0, _0805B960
movs r1, 0
ldrsh r2, [r0, r1]
adds r0, r5, 0
adds r1, r6, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805B954
ldr r0, _0805B964
ldr r2, [r0]
str r7, [sp]
movs r0, 0
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r6, 0
movs r3, 0x1
bl sub_8076F80
_0805B954:
adds r0, r7, 0
add sp, 0x8
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805B960: .4byte gUnknown_80F4DDC
_0805B964: .4byte gUnknown_8106A50
thumb_func_end sub_805B910
thumb_func_start sub_805B968
sub_805B968:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x18
adds r5, r0, 0
adds r6, r2, 0
adds r7, r3, 0
movs r0, 0
mov r8, r0
movs r3, 0x80
lsls r3, 1
str r7, [sp]
adds r0, r5, 0
bl sub_8055640
cmp r0, 0
beq _0805B9D8
movs r1, 0x1
mov r8, r1
adds r0, r5, 0
movs r1, 0
bl sub_8057308
lsls r0, 24
cmp r0, 0
beq _0805B9D8
ldr r0, [r5, 0x70]
movs r1, 0x10
ldrsh r2, [r0, r1]
cmp r2, 0
bge _0805B9A8
adds r2, 0x3
_0805B9A8:
asrs r4, r2, 2
cmp r4, 0
bgt _0805B9B0
movs r4, 0x1
_0805B9B0:
adds r0, r6, 0
adds r1, r7, 0
bl sub_8057600
lsls r0, 16
asrs r0, 16
movs r1, 0
str r1, [sp]
str r1, [sp, 0x4]
str r0, [sp, 0x8]
str r1, [sp, 0xC]
mov r0, r8
str r0, [sp, 0x10]
str r1, [sp, 0x14]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0
bl sub_806F370
_0805B9D8:
mov r0, r8
add sp, 0x18
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805B968
thumb_func_start sub_805B9E8
sub_805B9E8:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
movs r6, 0
mov r0, sp
bl sub_8069D18
lsls r0, 24
cmp r0, 0
beq _0805BA08
ldr r0, _0805BA04
b _0805BA18
.align 2, 0
_0805BA04: .4byte gUnknown_80FD430
_0805BA08:
mov r0, sp
bl sub_804AD34
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
beq _0805BA28
ldr r0, _0805BA24
_0805BA18:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _0805BA34
.align 2, 0
_0805BA24: .4byte gUnknown_80FD3F0
_0805BA28:
ldr r0, _0805BA40
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0805BA34:
adds r0, r6, 0
add sp, 0x4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805BA40: .4byte gUnknown_80FD40C
thumb_func_end sub_805B9E8
thumb_func_start sub_805BA44
sub_805BA44:
push {lr}
bl sub_807D3CC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BA44
thumb_func_start sub_805BA50
sub_805BA50:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
adds r6, r0, 0
adds r5, r1, 0
movs r0, 0
mov r9, r0
movs r4, 0x80
lsls r4, 1
str r3, [sp]
adds r0, r6, 0
adds r3, r4, 0
bl sub_8055640
cmp r0, 0
beq _0805BB4C
movs r1, 0x1
mov r9, r1
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0
bl sub_805727C
lsls r0, 24
cmp r0, 0
beq _0805BB4C
ldr r0, [r6, 0x70]
mov r8, r0
mov r10, r8
ldr r7, [r5, 0x70]
str r7, [sp, 0x4]
ldr r4, _0805BAC0
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
movs r1, 0x2C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0805BAC4
movs r0, 0x1
b _0805BB4E
.align 2, 0
_0805BAC0: .4byte gUnknown_202DF98
_0805BAC4:
adds r0, r5, 0
movs r1, 0x24
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0805BADC
ldr r0, _0805BAD8
b _0805BB04
.align 2, 0
_0805BAD8: .4byte gUnknown_80FD574
_0805BADC:
mov r0, r8
adds r0, 0x60
adds r3, r7, 0
adds r3, 0x60
ldrb r0, [r0]
mov r2, r9
ands r2, r0
cmp r2, 0
beq _0805BAF8
ldr r0, _0805BAF4
b _0805BB04
.align 2, 0
_0805BAF4: .4byte gUnknown_80FC654
_0805BAF8:
ldrb r1, [r3]
mov r0, r9
ands r0, r1
cmp r0, 0
bne _0805BB18
ldr r0, _0805BB14
_0805BB04:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
movs r0, 0x1
b _0805BB4E
.align 2, 0
_0805BB14: .4byte gUnknown_80FC678
_0805BB18:
ldr r1, [sp, 0x4]
ldr r0, [r1, 0x60]
mov r1, r10
str r0, [r1, 0x60]
strb r2, [r3, 0x2]
strb r2, [r3, 0x1]
strb r2, [r3]
adds r0, r6, 0
bl sub_806A6E8
adds r0, r5, 0
bl sub_806A6E8
mov r1, r10
adds r1, 0xFB
ldrb r0, [r1]
cmp r0, 0
bne _0805BB40
mov r0, r9
strb r0, [r1]
_0805BB40:
ldr r0, _0805BB60
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_0805BB4C:
mov r0, r9
_0805BB4E:
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805BB60: .4byte gUnknown_80FC614
thumb_func_end sub_805BA50
thumb_func_start sub_805BB64
sub_805BB64:
push {lr}
movs r2, 0xA
bl sub_80797A0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BB64
thumb_func_start sub_805BB74
sub_805BB74:
push {lr}
adds r3, r0, 0
ldr r0, [r3, 0x70]
adds r2, r0, 0
adds r2, 0xFB
ldrb r0, [r2]
cmp r0, 0
bne _0805BB88
movs r0, 0x1
strb r0, [r2]
_0805BB88:
adds r0, r3, 0
movs r2, 0x1
bl sub_807E254
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BB74
thumb_func_start sub_805BB98
sub_805BB98:
push {lr}
movs r2, 0x1
movs r3, 0
bl sub_807D148
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BB98
thumb_func_start sub_805BBA8
sub_805BBA8:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r6, r1, 0
ldr r0, [r6, 0x70]
movs r7, 0
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0805BC30
movs r5, 0
ldr r3, _0805BC44
_0805BBC0:
lsls r1, r5, 2
ldr r0, [r3]
adds r1, r0
ldrb r2, [r1]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _0805BBE8
movs r0, 0x2
ands r0, r2
cmp r0, 0
bne _0805BBE8
movs r0, 0x8
ands r0, r2
cmp r0, 0
beq _0805BBE8
movs r0, 0xF7
ands r0, r2
strb r0, [r1]
movs r7, 0x1
_0805BBE8:
adds r5, 0x1
cmp r5, 0x13
ble _0805BBC0
movs r5, 0
_0805BBF0:
ldr r0, _0805BC48
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0805BC4C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805BC2A
ldr r0, [r4, 0x70]
adds r2, r0, 0
adds r2, 0x60
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805BC2A
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0805BC2A
movs r0, 0xF7
ands r0, r1
strb r0, [r2]
movs r7, 0x1
_0805BC2A:
adds r5, 0x1
cmp r5, 0x3
ble _0805BBF0
_0805BC30:
cmp r7, 0
beq _0805BC54
ldr r0, _0805BC50
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
b _0805BC60
.align 2, 0
_0805BC44: .4byte gUnknown_203B460
_0805BC48: .4byte gUnknown_203B418
_0805BC4C: .4byte 0x0001357c
_0805BC50: .4byte gUnknown_80FC8F0
_0805BC54:
ldr r0, _0805BC6C
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
_0805BC60:
adds r0, r7, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805BC6C: .4byte gUnknown_80FC920
thumb_func_end sub_805BBA8
thumb_func_start sub_805BC70
sub_805BC70:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _0805BC94
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8075C58
movs r0, 0x1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805BC94: .4byte gUnknown_80F4E74
thumb_func_end sub_805BC70
thumb_func_start sub_805BC98
sub_805BC98:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
adds r6, r0, 0
mov r8, r1
mov r10, r2
str r3, [sp, 0x1C]
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
mov r7, sp
adds r7, 0x19
strb r5, [r7]
ldr r0, [r6, 0x70]
mov r9, r0
ldr r0, [r1, 0x70]
movs r1, 0xE
ldrsh r0, [r0, r1]
subs r4, r0, 0x1
cmp r4, 0
bge _0805BCCA
movs r4, 0
_0805BCCA:
mov r0, r10
ldr r1, [sp, 0x1C]
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r2, sp, 0x18
str r2, [sp]
str r5, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
str r5, [sp, 0x10]
str r5, [sp, 0x14]
adds r0, r6, 0
mov r1, r8
adds r2, r4, 0
movs r3, 0
bl sub_806F370
mov r1, r9
movs r2, 0xE
ldrsh r0, [r1, r2]
lsrs r1, r0, 31
adds r0, r1
asrs r4, r0, 1
cmp r4, 0
bge _0805BD02
movs r4, 0
_0805BD02:
mov r0, r10
ldr r1, [sp, 0x1C]
bl sub_8057600
lsls r0, 16
asrs r0, 16
str r7, [sp]
str r5, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
str r5, [sp, 0x10]
str r5, [sp, 0x14]
adds r0, r6, 0
adds r1, r6, 0
adds r2, r4, 0
movs r3, 0
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _0805BD34
movs r2, 0x1
_0805BD34:
strb r2, [r1]
movs r1, 0
ldrb r0, [r7]
cmp r0, 0
bne _0805BD40
movs r1, 0x1
_0805BD40:
strb r1, [r7]
movs r2, 0
add r0, sp, 0x18
ldrb r0, [r0]
cmp r0, 0
bne _0805BD50
cmp r1, 0
beq _0805BD52
_0805BD50:
movs r2, 0x1
_0805BD52:
adds r0, r2, 0
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805BC98
thumb_func_start sub_805BD64
sub_805BD64:
push {lr}
bl sub_8078D8C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BD64
thumb_func_start sub_805BD70
sub_805BD70:
push {lr}
bl sub_8077DDC
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BD70
thumb_func_start sub_805BD7C
sub_805BD7C:
push {lr}
bl sub_8077ED0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BD7C
thumb_func_start sub_805BD88
sub_805BD88:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
mov r10, r0
adds r7, r1, 0
movs r0, 0
str r0, [sp]
ldr r1, [r7, 0x70]
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _0805BE60
mov r9, r1
movs r2, 0x2
ldrsh r5, [r1, r2]
mov r8, r5
ldr r0, _0805BDD0
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
mov r0, r9
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0
beq _0805BDD8
ldr r0, _0805BDD4
ldr r2, [r0]
mov r0, r10
adds r1, r7, 0
bl sub_80522F4
movs r0, 0
b _0805BE78
.align 2, 0
_0805BDD0: .4byte gUnknown_202DF98
_0805BDD4: .4byte gUnknown_80FD450
_0805BDD8:
movs r6, 0
b _0805BDDE
_0805BDDC:
adds r6, 0x1
_0805BDDE:
cmp r6, 0x1D
bgt _0805BE14
movs r0, 0
bl sub_803D970
lsls r0, 16
asrs r5, r0, 16
adds r0, r5, 0
movs r1, 0
bl sub_806AA0C
lsls r0, 24
cmp r0, 0
beq _0805BDDC
cmp r8, r5
beq _0805BDDC
mov r0, r8
bl GetPokemonSize
adds r4, r0, 0
adds r0, r5, 0
bl GetPokemonSize
lsls r4, 24
lsls r0, 24
cmp r4, r0
bne _0805BDDC
_0805BE14:
cmp r6, 0x1E
beq _0805BE22
mov r1, r9
movs r2, 0x2
ldrsh r0, [r1, r2]
cmp r0, r5
bne _0805BE34
_0805BE22:
ldr r0, _0805BE30
ldr r2, [r0]
mov r0, r10
adds r1, r7, 0
bl sub_80522F4
b _0805BE76
.align 2, 0
_0805BE30: .4byte gUnknown_80FD450
_0805BE34:
ldr r0, _0805BE58
adds r1, r5, 0
bl sub_808D908
ldr r0, _0805BE5C
ldr r2, [r0]
mov r0, r10
adds r1, r7, 0
bl sub_80522F4
adds r0, r7, 0
adds r1, r5, 0
bl sub_806BB6C
movs r0, 0x1
str r0, [sp]
b _0805BE76
.align 2, 0
_0805BE58: .4byte gUnknown_202DFE8
_0805BE5C: .4byte gUnknown_80FD434
_0805BE60:
ldr r0, _0805BE88
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0805BE8C
ldr r2, [r0]
mov r0, r10
adds r1, r7, 0
bl sub_80522F4
_0805BE76:
ldr r0, [sp]
_0805BE78:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805BE88: .4byte gUnknown_202DF98
_0805BE8C: .4byte gUnknown_80FD450
thumb_func_end sub_805BD88
thumb_func_start sub_805BE90
sub_805BE90:
push {lr}
movs r2, 0x1
movs r3, 0x1
bl sub_80779F0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BE90
thumb_func_start sub_805BEA0
sub_805BEA0:
push {lr}
bl sub_804002C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BEA0
thumb_func_start sub_805BEAC
sub_805BEAC:
push {lr}
bl sub_8076D10
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BEAC
thumb_func_start sub_805BEB8
sub_805BEB8:
push {lr}
movs r2, 0x8
bl sub_807DA14
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BEB8
thumb_func_start sub_805BEC8
sub_805BEC8:
push {lr}
bl sub_807D510
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BEC8
thumb_func_start sub_805BED4
sub_805BED4:
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r0, _0805BF00
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r5, _0805BF04
ldr r0, [r5]
ldr r1, _0805BF08
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0805BF10
ldr r0, _0805BF0C
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_80522F4
b _0805BF26
.align 2, 0
_0805BF00: .4byte gUnknown_202DF98
_0805BF04: .4byte gUnknown_203B418
_0805BF08: .4byte 0x0000066e
_0805BF0C: .4byte gUnknown_80FD4DC
_0805BF10:
ldr r0, _0805BF30
ldr r2, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_80522F4
ldr r0, [r5]
movs r1, 0x1
strb r1, [r0, 0x4]
ldr r0, [r5]
strb r1, [r0, 0x11]
_0805BF26:
movs r0, 0
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805BF30: .4byte gUnknown_80FD4C4
thumb_func_end sub_805BED4
thumb_func_start sub_805BF34
sub_805BF34:
push {lr}
bl sub_807DB74
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805BF34
thumb_func_start sub_805BF40
sub_805BF40:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
str r0, [sp, 0x4]
str r1, [sp, 0x8]
movs r0, 0
str r0, [sp, 0x10]
adds r0, r1, 0
bl sub_8045128
adds r4, r0, 0
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _0805BF78
ldr r0, _0805BF74
ldr r1, [r0]
ldr r0, [sp, 0x4]
bl sub_80522A8
movs r0, 0
b _0805C06A
.align 2, 0
_0805BF74: .4byte gUnknown_80FD1EC
_0805BF78:
ldrb r0, [r4, 0x9]
cmp r0, 0xFF
bne _0805BFAC
ldr r2, [sp, 0x8]
movs r3, 0x4
ldrsh r1, [r2, r3]
ldr r0, _0805BFA4
ldr r0, [r0]
ldr r4, _0805BFA8
adds r0, r4
ldrb r0, [r0]
subs r2, r1, r0
ldr r3, [sp, 0x8]
movs r4, 0x6
ldrsh r1, [r3, r4]
subs r1, r0
str r1, [sp, 0xC]
adds r1, r2, r0
mov r10, r1
ldr r3, [sp, 0xC]
adds r7, r3, r0
b _0805BFDA
.align 2, 0
_0805BFA4: .4byte gUnknown_203B418
_0805BFA8: .4byte 0x00018209
_0805BFAC:
ldr r2, _0805C050
ldrb r1, [r4, 0x9]
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r4, _0805C054
adds r0, r4
ldr r1, [r2]
adds r1, r0
movs r2, 0x2
ldrsh r0, [r1, r2]
subs r2, r0, 0x1
movs r3, 0x4
ldrsh r0, [r1, r3]
subs r0, 0x1
str r0, [sp, 0xC]
movs r4, 0x6
ldrsh r0, [r1, r4]
adds r0, 0x1
mov r10, r0
movs r3, 0x8
ldrsh r0, [r1, r3]
adds r7, r0, 0x1
_0805BFDA:
adds r6, r2, 0
cmp r6, r10
bgt _0805C034
_0805BFE0:
ldr r5, [sp, 0xC]
adds r4, r6, 0x1
mov r9, r4
cmp r5, r7
bgt _0805C02E
lsls r0, r6, 16
lsrs r0, 16
mov r8, r0
_0805BFF0:
adds r0, r6, 0
adds r1, r5, 0
bl sub_8049590
ldr r4, [r0, 0x14]
cmp r4, 0
beq _0805C028
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x2
bne _0805C028
adds r0, r4, 0
bl sub_8045104
ldrb r0, [r0]
cmp r0, 0x11
beq _0805C028
lsls r0, r5, 16
mov r1, r8
orrs r0, r1
str r0, [sp]
mov r0, sp
movs r1, 0
bl sub_807FE04
movs r2, 0x1
str r2, [sp, 0x10]
_0805C028:
adds r5, 0x1
cmp r5, r7
ble _0805BFF0
_0805C02E:
mov r6, r9
cmp r6, r10
ble _0805BFE0
_0805C034:
ldr r3, [sp, 0x10]
cmp r3, 0
beq _0805C05C
ldr r0, _0805C058
ldr r2, [r0]
ldr r0, [sp, 0x4]
ldr r1, [sp, 0x8]
bl sub_80522F4
bl sub_8040A84
bl sub_8049ED4
b _0805C068
.align 2, 0
_0805C050: .4byte gUnknown_203B418
_0805C054: .4byte 0x000104c4
_0805C058: .4byte gUnknown_80FD1B0
_0805C05C:
ldr r0, _0805C07C
ldr r2, [r0]
ldr r0, [sp, 0x4]
ldr r1, [sp, 0x8]
bl sub_80522F4
_0805C068:
ldr r0, [sp, 0x10]
_0805C06A:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805C07C: .4byte gUnknown_80FD1CC
thumb_func_end sub_805BF40
thumb_func_start sub_805C080
sub_805C080:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r5, r0, 0
mov r9, r1
movs r0, 0
mov r8, r0
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
beq _0805C0AC
ldr r0, _0805C0A4
ldr r0, [r0]
ldr r1, _0805C0A8
adds r0, r1
movs r1, 0x10
b _0805C0BA
.align 2, 0
_0805C0A4: .4byte gUnknown_203B418
_0805C0A8: .4byte 0x0001358c
_0805C0AC:
ldr r0, _0805C11C
ldr r0, [r0]
ldr r1, _0805C120
adds r0, r1
movs r1, 0x4
cmp r1, 0
beq _0805C0FA
_0805C0BA:
adds r6, r0, 0
adds r7, r1, 0
_0805C0BE:
ldr r4, [r6]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805C0F2
cmp r5, r4
beq _0805C0F2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0805C0F2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x2
adds r3, r5, 0x4
bl sub_807D148
movs r0, 0x1
mov r8, r0
_0805C0F2:
adds r6, 0x4
subs r7, 0x1
cmp r7, 0
bne _0805C0BE
_0805C0FA:
mov r1, r8
cmp r1, 0
bne _0805C10C
ldr r0, _0805C124
ldr r2, [r0]
adds r0, r5, 0
mov r1, r9
bl sub_80522F4
_0805C10C:
mov r0, r8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805C11C: .4byte gUnknown_203B418
_0805C120: .4byte 0x0001357c
_0805C124: .4byte gUnknown_81004F0
thumb_func_end sub_805C080
thumb_func_start sub_805C128
sub_805C128:
push {lr}
adds r1, r0, 0
bl sub_807885C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C128
thumb_func_start sub_805C138
sub_805C138:
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0x1C
mov r9, r0
mov r10, r1
adds r6, r2, 0
mov r8, r3
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
ldr r2, _0805C1AC
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
mov r0, r9
mov r1, r10
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _0805C194
movs r2, 0x1
_0805C194:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805C1AC: .4byte 0x0000270f
thumb_func_end sub_805C138
thumb_func_start sub_805C1B0
sub_805C1B0:
push {lr}
bl sub_80790C8
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C1B0
thumb_func_start sub_805C1BC
sub_805C1BC:
push {r4,r5,lr}
sub sp, 0x4
ldr r4, _0805C1E0
movs r5, 0
ldrsh r4, [r4, r5]
str r3, [sp]
adds r3, r4, 0
bl sub_8055864
adds r1, r0, 0
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805C1E0: .4byte gUnknown_80F4F80
thumb_func_end sub_805C1BC
thumb_func_start sub_805C1E4
sub_805C1E4:
push {lr}
ldr r2, _0805C1F4
ldr r2, [r2]
bl sub_80522F4
movs r0, 0
pop {r1}
bx r1
.align 2, 0
_0805C1F4: .4byte gUnknown_80FD454
thumb_func_end sub_805C1E4
thumb_func_start sub_805C1F8
sub_805C1F8:
push {lr}
movs r2, 0x1
bl sub_8077BB4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C1F8
thumb_func_start sub_805C208
sub_805C208:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
adds r7, r0, 0
mov r9, r1
adds r6, r2, 0
mov r8, r3
movs r5, 0
add r0, sp, 0x18
strb r5, [r0]
ldr r0, [r1, 0x70]
movs r1, 0x4
ldrsh r0, [r0, r1]
bl GetSizeOrbDmg
mov r10, r0
adds r0, r6, 0
bl sub_8092B00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
mov r1, r8
bl sub_8057600
lsls r0, 16
asrs r0, 16
add r1, sp, 0x18
str r1, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r5, [sp, 0xC]
movs r0, 0x1
str r0, [sp, 0x10]
str r5, [sp, 0x14]
adds r0, r7, 0
mov r1, r9
mov r2, r10
movs r3, 0x1
bl sub_806F370
add r1, sp, 0x18
movs r2, 0
adds r0, r1, 0
ldrb r0, [r0]
cmp r0, 0
bne _0805C270
movs r2, 0x1
_0805C270:
strb r2, [r1]
add r0, sp, 0x18
ldrb r0, [r0]
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805C208
thumb_func_start sub_805C288
sub_805C288:
push {lr}
ldr r2, _0805C29C
movs r3, 0
ldrsh r2, [r2, r3]
movs r3, 0
bl sub_8078A58
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0805C29C: .4byte gUnknown_80F4FC6
thumb_func_end sub_805C288
thumb_func_start sub_805C2A0
sub_805C2A0:
push {lr}
bl sub_807DC68
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C2A0
thumb_func_start sub_805C2AC
sub_805C2AC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
mov r8, r0
adds r7, r1, 0
movs r0, 0
mov r9, r0
ldr r5, [r7, 0x70]
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _0805C2DC
ldr r0, _0805C2D8
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
movs r0, 0
b _0805C3CA
.align 2, 0
_0805C2D8: .4byte gUnknown_80FD0B8
_0805C2DC:
ldr r4, _0805C3A0
adds r3, r5, 0
adds r3, 0x46
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0]
ldrh r1, [r7, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r2, _0805C3A4
ldr r1, [sp]
ands r1, r2
orrs r1, r0
str r1, [sp]
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0, 0x2]
ldrh r2, [r7, 0x6]
adds r0, r2
lsls r0, 16
ldr r2, _0805C3A8
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r4, sp
mov r0, sp
bl sub_8042A54
mov r0, sp
movs r1, 0
ldrsh r0, [r0, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8049590
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
bne _0805C36C
ldr r0, _0805C3AC
ands r0, r1
movs r1, 0x1
orrs r0, r1
strh r0, [r2]
movs r5, 0x1
negs r5, r5
mov r6, sp
_0805C344:
movs r4, 0x1
negs r4, r4
_0805C348:
movs r1, 0
ldrsh r0, [r6, r1]
adds r0, r4
movs r2, 0x2
ldrsh r1, [r6, r2]
adds r1, r5
bl sub_80498A8
adds r4, 0x1
cmp r4, 0x1
ble _0805C348
adds r5, 0x1
cmp r5, 0x1
ble _0805C344
movs r0, 0x1
mov r9, r0
bl sub_806CF60
_0805C36C:
movs r5, 0
_0805C36E:
movs r4, 0
adds r6, r5, 0x1
_0805C372:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8049BB0
adds r4, 0x1
cmp r4, 0x37
ble _0805C372
adds r5, r6, 0
cmp r5, 0x1F
ble _0805C36E
mov r1, r9
cmp r1, 0
beq _0805C3B4
mov r0, sp
bl sub_8042A64
ldr r0, _0805C3B0
ldr r2, [r0]
mov r0, r8
adds r1, r7, 0
bl sub_80522F4
b _0805C3C0
.align 2, 0
_0805C3A0: .4byte gUnknown_80F4448
_0805C3A4: .4byte 0xffff0000
_0805C3A8: .4byte 0x0000ffff
_0805C3AC: .4byte 0x0000fffc
_0805C3B0: .4byte gUnknown_80FD0B4
_0805C3B4:
ldr r0, _0805C3D8
ldr r2, [r0]
mov r0, r8
adds r1, r7, 0
bl sub_80522F4
_0805C3C0:
bl sub_8040A84
bl sub_8049ED4
mov r0, r9
_0805C3CA:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805C3D8: .4byte gUnknown_80FD0B8
thumb_func_end sub_805C2AC
thumb_func_start sub_805C3DC
sub_805C3DC:
push {lr}
ldr r0, [r1, 0x70]
ldrb r0, [r0, 0x6]
movs r2, 0x1
cmp r0, 0
beq _0805C3EA
movs r2, 0x2
_0805C3EA:
adds r0, r1, 0x4
movs r1, 0x14
bl sub_807FC3C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C3DC
thumb_func_start sub_805C3F8
sub_805C3F8:
push {r4,r5,lr}
sub sp, 0x8
adds r5, r0, 0
adds r4, r1, 0
ldr r0, [r4, 0x4]
str r0, [sp, 0x4]
ldr r0, [r4, 0x70]
adds r0, 0xA4
ldrb r1, [r0]
cmp r1, 0
bne _0805C442
adds r0, r4, 0
adds r0, 0x20
strb r1, [r0]
movs r0, 0
bl sub_803D73C
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
mov r0, sp
movs r2, 0
bl sub_8045C28
add r1, sp, 0x4
adds r0, r5, 0
mov r2, sp
bl sub_80464C8
movs r1, 0x86
lsls r1, 2
adds r0, r4, 0
adds r2, r5, 0
bl sub_8068FE0
movs r0, 0x1
b _0805C450
_0805C442:
ldr r0, _0805C458
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0
_0805C450:
add sp, 0x8
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_0805C458: .4byte gUnknown_80FF678
thumb_func_end sub_805C3F8
thumb_func_start sub_805C45C
sub_805C45C:
push {lr}
bl sub_807F43C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C45C
thumb_func_start sub_805C468
sub_805C468:
push {lr}
bl sub_8078F50
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C468
thumb_func_start sub_805C474
sub_805C474:
push {lr}
bl sub_8077E4C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C474
thumb_func_start sub_805C480
sub_805C480:
push {lr}
bl sub_8079570
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C480
thumb_func_start sub_805C48C
sub_805C48C:
push {lr}
bl sub_80795C4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C48C
thumb_func_start sub_805C498
sub_805C498:
push {r4-r6,lr}
adds r5, r0, 0
ldr r2, [r5, 0x70]
ldrh r0, [r1, 0x2]
subs r1, r0, 0x7
ldr r0, _0805C4B8
cmp r1, r0
bls _0805C4AC
bl _0805CEA8
_0805C4AC:
lsls r0, r1, 2
ldr r1, _0805C4BC
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0805C4B8: .4byte 0x0000018f
_0805C4BC: .4byte _0805C4C0
.align 2, 0
_0805C4C0:
.4byte _0805CDE8
.4byte _0805CCE4
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC70
.4byte _0805CEA8
.4byte _0805CB00
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB0C
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB12
.4byte _0805CEA8
.4byte _0805CB18
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD48
.4byte _0805CEA8
.4byte _0805CB12
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB1E
.4byte _0805CD8A
.4byte _0805CEA8
.4byte _0805CB40
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB46
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB40
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CCA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB4C
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB56
.4byte _0805CB5C
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD50
.4byte _0805CEA8
.4byte _0805CB62
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB72
.4byte _0805CEA8
.4byte _0805CB80
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC94
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC7C
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD90
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CCD8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD64
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB94
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD96
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDF4
.4byte _0805CE00
.4byte _0805CB40
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB1E
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB40
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD20
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDD2
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC88
.4byte _0805CEA8
.4byte _0805CD9C
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CCC2
.4byte _0805CB9A
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CBBA
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CBD0
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CBDA
.4byte _0805CB24
.4byte _0805CB40
.4byte _0805CB8E
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CBE0
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDE8
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDB0
.4byte _0805CEA8
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CBF0
.4byte _0805CEA8
.4byte _0805CC18
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDBC
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC54
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC62
.4byte _0805CB40
.4byte _0805CEA8
.4byte _0805CD50
.4byte _0805CC62
.4byte _0805CEA8
.4byte _0805CD34
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC1E
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC24
.4byte _0805CBDA
.4byte _0805CEA8
.4byte _0805CDCA
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB1E
.4byte _0805CDDC
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC32
.4byte _0805CEA8
.4byte _0805CB46
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CC38
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CB56
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CCB6
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDE8
.4byte _0805CDE8
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDE8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD74
.4byte _0805CEA8
.4byte _0805CD50
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CD06
.4byte _0805CEA8
.4byte _0805CC9A
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CEA8
.4byte _0805CDE8
_0805CB00:
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
b _0805CC5A
_0805CB0C:
adds r0, r2, 0
adds r0, 0xC0
b _0805CDF8
_0805CB12:
adds r0, r2, 0
adds r0, 0xC4
b _0805CCAC
_0805CB18:
adds r0, r2, 0
adds r0, 0xC4
b _0805CB76
_0805CB1E:
movs r1, 0x1C
ldrsh r0, [r2, r1]
b _0805CDD6
_0805CB24:
movs r3, 0x1C
ldrsh r0, [r2, r3]
cmp r0, 0x13
bgt _0805CB6E
movs r1, 0x9E
lsls r1, 1
adds r0, r2, r1
ldr r0, [r0]
bl sub_8094450
cmp r0, 0
ble _0805CB3E
b _0805CEA8
_0805CB3E:
b _0805CB6E
_0805CB40:
movs r3, 0x20
ldrsh r0, [r2, r3]
b _0805CDD6
_0805CB46:
adds r0, r2, 0
adds r0, 0xC0
b _0805CC9E
_0805CB4C:
ldr r0, [r5, 0x70]
movs r2, 0x82
lsls r2, 1
adds r0, r2
b _0805CC4A
_0805CB56:
adds r0, r2, 0
adds r0, 0xDC
b _0805CC9E
_0805CB5C:
movs r3, 0x20
ldrsh r0, [r2, r3]
b _0805CDCE
_0805CB62:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x9
beq _0805CB6E
b _0805CEA8
_0805CB6E:
movs r0, 0
b _0805CEAA
_0805CB72:
adds r0, r2, 0
adds r0, 0xC0
_0805CB76:
ldrb r0, [r0]
cmp r0, 0xB
beq _0805CB7E
b _0805CEA8
_0805CB7E:
b _0805CB6E
_0805CB80:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xE
beq _0805CB8C
b _0805CEA8
_0805CB8C:
b _0805CB6E
_0805CB8E:
adds r0, r2, 0
adds r0, 0xC4
b _0805CDE0
_0805CB94:
movs r3, 0x26
ldrsh r0, [r2, r3]
b _0805CDD6
_0805CB9A:
adds r0, r2, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x5
beq _0805CB6E
movs r1, 0x10
ldrsh r0, [r2, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
movs r3, 0xE
ldrsh r1, [r2, r3]
cmp r0, r1
blt _0805CBB8
b _0805CEA8
_0805CBB8:
b _0805CB6E
_0805CBBA:
movs r0, 0x10
ldrsh r1, [r2, r0]
movs r3, 0xE
ldrsh r0, [r2, r3]
cmp r1, r0
ble _0805CB6E
movs r1, 0x89
lsls r1, 1
adds r0, r2, r1
ldrb r0, [r0]
b _0805CDC4
_0805CBD0:
movs r3, 0x89
lsls r3, 1
adds r0, r2, r3
ldrb r0, [r0]
b _0805CDC4
_0805CBDA:
adds r0, r2, 0
adds r0, 0xDC
b _0805CDE0
_0805CBE0:
movs r1, 0x1C
ldrsh r0, [r2, r1]
cmp r0, 0x13
bgt _0805CBEA
b _0805CEA8
_0805CBEA:
movs r3, 0x20
ldrsh r0, [r2, r3]
b _0805CDD6
_0805CBF0:
ldr r1, _0805CC0C
ldr r0, _0805CC10
ldr r0, [r0]
ldr r2, _0805CC14
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8071858
b _0805CDEC
.align 2, 0
_0805CC0C: .4byte gUnknown_80F561C
_0805CC10: .4byte gUnknown_203B418
_0805CC14: .4byte 0x00003a0e
_0805CC18:
movs r1, 0x1E
ldrsh r0, [r2, r1]
b _0805CDD6
_0805CC1E:
adds r0, r2, 0
adds r0, 0xD0
b _0805CDB4
_0805CC24:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x8
beq _0805CC30
b _0805CEA8
_0805CC30:
b _0805CB6E
_0805CC32:
adds r0, r2, 0
adds r0, 0xC4
b _0805CC9E
_0805CC38:
movs r3, 0x1C
ldrsh r0, [r2, r3]
cmp r0, 0x13
bgt _0805CC42
b _0805CEA8
_0805CC42:
ldr r0, [r5, 0x70]
movs r1, 0x82
lsls r1, 1
adds r0, r1
_0805CC4A:
ldr r0, [r0]
cmp r0, 0x3
bgt _0805CC52
b _0805CEA8
_0805CC52:
b _0805CB6E
_0805CC54:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
_0805CC5A:
cmp r0, 0x5
beq _0805CC60
b _0805CEA8
_0805CC60:
b _0805CB6E
_0805CC62:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x7
beq _0805CC6E
b _0805CEA8
_0805CC6E:
b _0805CB6E
_0805CC70:
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
b _0805CCAE
_0805CC7C:
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
b _0805CDB6
_0805CC88:
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
b _0805CCA0
_0805CC94:
adds r0, r2, 0
adds r0, 0xC4
b _0805CDB4
_0805CC9A:
adds r0, r2, 0
adds r0, 0xE4
_0805CC9E:
ldrb r0, [r0]
_0805CCA0:
cmp r0, 0x1
beq _0805CCA6
b _0805CEA8
_0805CCA6:
b _0805CB6E
_0805CCA8:
adds r0, r2, 0
adds r0, 0xDC
_0805CCAC:
ldrb r0, [r0]
_0805CCAE:
cmp r0, 0x4
beq _0805CCB4
b _0805CEA8
_0805CCB4:
b _0805CB6E
_0805CCB6:
adds r0, r2, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
b _0805CDEE
_0805CCC2:
adds r0, r5, 0
bl sub_8070B48
lsls r0, 24
cmp r0, 0
beq _0805CCD0
b _0805CEA8
_0805CCD0:
adds r0, r5, 0
bl sub_8070A58
b _0805CDC2
_0805CCD8:
adds r0, r5, 0
bl sub_8045128
bl sub_804AF20
b _0805CDEC
_0805CCE4:
adds r0, r5, 0
bl sub_8045128
adds r4, r0, 0
bl sub_804AF20
lsls r0, 24
cmp r0, 0
bne _0805CCF8
b _0805CB6E
_0805CCF8:
ldrh r1, [r4]
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
bne _0805CD04
b _0805CEA8
_0805CD04:
b _0805CB6E
_0805CD06:
adds r0, r5, 0
bl sub_8045128
ldr r0, [r0, 0x14]
cmp r0, 0
bne _0805CD14
b _0805CB6E
_0805CD14:
bl sub_80450F8
cmp r0, 0x2
bne _0805CD1E
b _0805CEA8
_0805CD1E:
b _0805CB6E
_0805CD20:
ldr r0, _0805CD2C
ldr r0, [r0]
ldr r2, _0805CD30
adds r0, r2
ldrb r0, [r0]
b _0805CDEE
.align 2, 0
_0805CD2C: .4byte gUnknown_203B418
_0805CD30: .4byte 0x0000e277
_0805CD34:
ldr r0, _0805CD40
ldr r0, [r0]
ldr r3, _0805CD44
adds r0, r3
ldrb r0, [r0]
b _0805CDEE
.align 2, 0
_0805CD40: .4byte gUnknown_203B418
_0805CD44: .4byte 0x0000e278
_0805CD48:
adds r0, r2, 0
adds r0, 0xF4
ldrb r0, [r0]
b _0805CDEE
_0805CD50:
ldr r0, _0805CD5C
ldr r0, [r0]
ldr r1, _0805CD60
adds r0, r1
ldrb r0, [r0]
b _0805CDEE
.align 2, 0
_0805CD5C: .4byte gUnknown_203B418
_0805CD60: .4byte 0x000037fc
_0805CD64:
movs r3, 0x89
lsls r3, 1
adds r0, r2, r3
ldrb r0, [r0]
cmp r0, 0x2
bhi _0805CD72
b _0805CEA8
_0805CD72:
b _0805CB6E
_0805CD74:
adds r0, r2, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0805CD84
b _0805CEA8
_0805CD84:
movs r0, 0x8
ands r0, r1
b _0805CDC4
_0805CD8A:
movs r1, 0x26
ldrsh r0, [r2, r1]
b _0805CDD6
_0805CD90:
movs r3, 0x1E
ldrsh r0, [r2, r3]
b _0805CDD6
_0805CD96:
movs r1, 0x1C
ldrsh r0, [r2, r1]
b _0805CDD6
_0805CD9C:
ldrb r0, [r2, 0x6]
cmp r0, 0
beq _0805CDA4
b _0805CB6E
_0805CDA4:
adds r0, r2, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x6
bne _0805CEA8
b _0805CB6E
_0805CDB0:
adds r0, r2, 0
adds r0, 0xE4
_0805CDB4:
ldrb r0, [r0]
_0805CDB6:
cmp r0, 0x2
bne _0805CEA8
b _0805CB6E
_0805CDBC:
adds r0, r5, 0x4
bl sub_807FC80
_0805CDC2:
lsls r0, 24
_0805CDC4:
cmp r0, 0
bne _0805CEA8
b _0805CB6E
_0805CDCA:
movs r3, 0x1E
ldrsh r0, [r2, r3]
_0805CDCE:
cmp r0, 0x13
ble _0805CEA8
_0805CDD2:
movs r1, 0x22
ldrsh r0, [r2, r1]
_0805CDD6:
cmp r0, 0x13
ble _0805CEA8
b _0805CB6E
_0805CDDC:
adds r0, r2, 0
adds r0, 0xC8
_0805CDE0:
ldrb r0, [r0]
cmp r0, 0x3
bne _0805CEA8
b _0805CB6E
_0805CDE8:
bl sub_80441BC
_0805CDEC:
lsls r0, 24
_0805CDEE:
cmp r0, 0
beq _0805CEA8
b _0805CB6E
_0805CDF4:
adds r0, r2, 0
adds r0, 0xC4
_0805CDF8:
ldrb r0, [r0]
cmp r0, 0xC
bne _0805CEA8
b _0805CB6E
_0805CE00:
ldrb r0, [r2, 0x6]
cmp r0, 0
beq _0805CE5C
movs r6, 0
_0805CE08:
ldr r0, _0805CE54
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0805CE58
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805CE46
cmp r4, r5
beq _0805CE46
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0805CE46
ldr r1, [r4, 0x70]
movs r3, 0x1C
ldrsh r0, [r1, r3]
cmp r0, 0x13
bgt _0805CE46
movs r2, 0x1E
ldrsh r0, [r1, r2]
cmp r0, 0x13
ble _0805CE4C
_0805CE46:
adds r6, 0x1
cmp r6, 0xF
ble _0805CE08
_0805CE4C:
cmp r6, 0x10
bne _0805CEA8
b _0805CB6E
.align 2, 0
_0805CE54: .4byte gUnknown_203B418
_0805CE58: .4byte 0x0001358c
_0805CE5C:
movs r6, 0
_0805CE5E:
ldr r0, _0805CEB0
ldr r0, [r0]
lsls r1, r6, 2
ldr r3, _0805CEB4
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805CE9C
cmp r4, r5
beq _0805CE9C
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0805CE9C
ldr r1, [r4, 0x70]
movs r2, 0x1C
ldrsh r0, [r1, r2]
cmp r0, 0x13
bgt _0805CE9C
movs r3, 0x1E
ldrsh r0, [r1, r3]
cmp r0, 0x13
ble _0805CEA2
_0805CE9C:
adds r6, 0x1
cmp r6, 0x3
ble _0805CE5E
_0805CEA2:
cmp r6, 0x4
bne _0805CEA8
b _0805CB6E
_0805CEA8:
movs r0, 0x1
_0805CEAA:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0805CEB0: .4byte gUnknown_203B418
_0805CEB4: .4byte 0x0001357c
thumb_func_end sub_805C498
thumb_func_start sub_805CEB8
sub_805CEB8:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r6, r1, 0
adds r7, r2, 0
ldr r5, [r0, 0x70]
ldr r4, [r6, 0x70]
adds r0, r4, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
bne _0805CEE0
adds r0, r7, 0
bl sub_8092C3C
lsls r0, 24
cmp r0, 0
beq _0805CEE0
b _0805D540
_0805CEE0:
ldrh r0, [r7, 0x2]
subs r2, r0, 0x3
ldr r0, _0805CEF8
cmp r2, r0
bls _0805CEEE
bl _0805D802
_0805CEEE:
lsls r0, r2, 2
ldr r1, _0805CEFC
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0805CEF8: .4byte 0x0000017b
_0805CEFC: .4byte _0805CF00
.align 2, 0
_0805CF00:
.4byte _0805D4FA
.4byte _0805D4F0
.4byte _0805D50E
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D516
.4byte _0805D51C
.4byte _0805D802
.4byte _0805D7F6
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D520
.4byte _0805D802
.4byte _0805D802
.4byte _0805D52C
.4byte _0805D532
.4byte _0805D544
.4byte _0805D55A
.4byte _0805D7F6
.4byte _0805D802
.4byte _0805D802
.4byte _0805D566
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D56A
.4byte _0805D4F0
.4byte _0805D570
.4byte _0805D802
.4byte _0805D57E
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D584
.4byte _0805D802
.4byte _0805D7F6
.4byte _0805D802
.4byte _0805D596
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D59C
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5C8
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5D0
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D4F0
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5E2
.4byte _0805D4F0
.4byte _0805D5E8
.4byte _0805D5F8
.4byte _0805D802
.4byte _0805D5FE
.4byte _0805D5F8
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D55A
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D4F0
.4byte _0805D662
.4byte _0805D802
.4byte _0805D802
.4byte _0805D668
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5DC
.4byte _0805D802
.4byte _0805D5C8
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7AC
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D704
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D704
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7F6
.4byte _0805D70A
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7F6
.4byte _0805D5C8
.4byte _0805D802
.4byte _0805D5F8
.4byte _0805D802
.4byte _0805D7E4
.4byte _0805D7DC
.4byte _0805D802
.4byte _0805D7E4
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D716
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D740
.4byte _0805D802
.4byte _0805D802
.4byte _0805D74A
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5DC
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D4F0
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D75C
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D734
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D782
.4byte _0805D740
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D704
.4byte _0805D7F6
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D5C8
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7A0
.4byte _0805D7CA
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D78A
.4byte _0805D59C
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7BE
.4byte _0805D7AC
.4byte _0805D802
.4byte _0805D794
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D55A
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D802
.4byte _0805D782
.4byte _0805D802
.4byte _0805D802
.4byte _0805D7F6
_0805D4F0:
adds r0, r6, 0
bl sub_8070B28
lsls r0, 24
b _0805D7A6
_0805D4FA:
adds r0, r4, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x4
beq _0805D540
adds r0, r6, 0
bl sub_8070B28
lsls r0, 24
b _0805D7A6
_0805D50E:
adds r0, r4, 0
adds r0, 0xA8
ldrb r0, [r0]
b _0805D7F0
_0805D516:
movs r1, 0x26
ldrsh r0, [r4, r1]
b _0805D744
_0805D51C:
ldr r0, [r4, 0x2C]
b _0805D58E
_0805D520:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x6
beq _0805D540
b _0805D7AC
_0805D52C:
movs r3, 0xE
ldrsh r0, [r4, r3]
b _0805D78E
_0805D532:
movs r7, 0xE
ldrsh r1, [r4, r7]
movs r2, 0xE
ldrsh r0, [r5, r2]
cmp r1, r0
ble _0805D540
b _0805D802
_0805D540:
movs r0, 0
b _0805D804
_0805D544:
movs r3, 0x8C
lsls r3, 1
adds r4, r3
adds r0, r4, 0
bl sub_805D810
lsls r0, 24
cmp r0, 0
bne _0805D540
adds r0, r4, 0
b _0805D7B2
_0805D55A:
ldr r0, [r6, 0x70]
movs r7, 0x82
lsls r7, 1
adds r0, r7
ldr r0, [r0]
b _0805D744
_0805D566:
ldr r0, [r4, 0x34]
b _0805D58E
_0805D56A:
movs r1, 0x22
ldrsh r0, [r4, r1]
b _0805D744
_0805D570:
movs r2, 0x8C
lsls r2, 1
adds r0, r4, r2
bl sub_805D850
lsls r0, 24
b _0805D7A6
_0805D57E:
adds r0, r4, 0
adds r0, 0xDC
b _0805D7FA
_0805D584:
ldr r0, [r4, 0x2C]
cmp r0, 0x3E
ble _0805D58C
b _0805D802
_0805D58C:
ldr r0, [r4, 0x30]
_0805D58E:
cmp r0, 0x3E
ble _0805D594
b _0805D802
_0805D594:
b _0805D540
_0805D596:
adds r0, r4, 0
adds r0, 0xAC
b _0805D798
_0805D59C:
adds r0, r4, 0
adds r0, 0x5C
ldrb r0, [r0]
cmp r0, 0xE
beq _0805D5B0
adds r0, r4, 0
adds r0, 0x5D
ldrb r0, [r0]
cmp r0, 0xE
bne _0805D5BC
_0805D5B0:
adds r0, r4, 0
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _0805D5BC
b _0805D802
_0805D5BC:
movs r3, 0x26
ldrsh r0, [r4, r3]
cmp r0, 0xA
ble _0805D5C6
b _0805D802
_0805D5C6:
b _0805D540
_0805D5C8:
adds r0, r4, 0
adds r0, 0xAC
ldrb r0, [r0]
b _0805D7D6
_0805D5D0:
movs r7, 0xE
ldrsh r0, [r4, r7]
movs r2, 0xE
ldrsh r1, [r5, r2]
subs r0, r1
b _0805D744
_0805D5DC:
movs r3, 0x20
ldrsh r0, [r4, r3]
b _0805D744
_0805D5E2:
movs r7, 0x22
ldrsh r0, [r4, r7]
b _0805D744
_0805D5E8:
movs r1, 0x1C
ldrsh r0, [r4, r1]
cmp r0, 0
ble _0805D5F2
b _0805D802
_0805D5F2:
movs r2, 0x20
ldrsh r0, [r4, r2]
b _0805D744
_0805D5F8:
adds r0, r4, 0
adds r0, 0xB0
b _0805D7FA
_0805D5FE:
movs r6, 0
adds r2, r4, 0
adds r2, 0x1C
movs r3, 0x1C
ldrsh r0, [r4, r3]
cmp r0, 0x9
ble _0805D6FC
adds r1, r4, 0
adds r1, 0x20
movs r7, 0x20
ldrsh r0, [r4, r7]
cmp r0, 0x9
ble _0805D6FC
adds r3, r1, 0
movs r5, 0
_0805D61C:
adds r0, r4, 0
adds r0, 0x24
adds r0, r5
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x9
ble _0805D6FC
lsls r1, r6, 2
adds r0, r4, 0
adds r0, 0x2C
adds r0, r1
ldr r0, [r0]
cmp r0, 0xFF
ble _0805D6FC
adds r0, r4, 0
adds r0, 0x34
adds r0, r1
ldr r0, [r0]
cmp r0, 0xFF
ble _0805D6FC
adds r3, 0x2
adds r2, 0x2
adds r5, 0x2
adds r6, 0x1
cmp r6, 0x1
bgt _0805D6FC
movs r7, 0
ldrsh r0, [r2, r7]
cmp r0, 0x9
ble _0805D6FC
movs r1, 0
ldrsh r0, [r3, r1]
cmp r0, 0x9
bgt _0805D61C
b _0805D6FC
_0805D662:
adds r0, r4, 0
adds r0, 0xA8
b _0805D7FA
_0805D668:
movs r6, 0
adds r3, r5, 0
adds r3, 0x1C
adds r2, r4, 0
adds r2, 0x1C
movs r7, 0x1C
ldrsh r1, [r5, r7]
movs r7, 0x1C
ldrsh r0, [r4, r7]
cmp r1, r0
blt _0805D6FC
mov r12, r2
mov r8, r3
movs r3, 0
_0805D684:
adds r1, r5, 0
adds r1, 0x20
adds r1, r3
adds r0, r4, 0
adds r0, 0x20
adds r0, r3
movs r2, 0
ldrsh r1, [r1, r2]
movs r7, 0
ldrsh r0, [r0, r7]
cmp r1, r0
blt _0805D6FC
adds r1, r5, 0
adds r1, 0x24
adds r1, r3
adds r0, r4, 0
adds r0, 0x24
adds r0, r3
movs r2, 0
ldrsh r1, [r1, r2]
movs r7, 0
ldrsh r0, [r0, r7]
cmp r1, r0
blt _0805D6FC
lsls r2, r6, 2
adds r1, r5, 0
adds r1, 0x2C
adds r1, r2
adds r0, r4, 0
adds r0, 0x2C
adds r0, r2
ldr r1, [r1]
ldr r0, [r0]
cmp r1, r0
blt _0805D6FC
adds r1, r5, 0
adds r1, 0x34
adds r1, r2
adds r0, r4, 0
adds r0, 0x34
adds r0, r2
ldr r1, [r1]
ldr r0, [r0]
cmp r1, r0
blt _0805D6FC
movs r0, 0x2
add r12, r0
add r8, r0
adds r3, 0x2
adds r6, 0x1
cmp r6, 0x1
bgt _0805D6FC
mov r2, r8
movs r7, 0
ldrsh r1, [r2, r7]
mov r2, r12
movs r7, 0
ldrsh r0, [r2, r7]
cmp r1, r0
bge _0805D684
_0805D6FC:
cmp r6, 0x2
beq _0805D702
b _0805D802
_0805D702:
b _0805D540
_0805D704:
movs r1, 0x24
ldrsh r0, [r4, r1]
b _0805D744
_0805D70A:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x5
bne _0805D802
b _0805D540
_0805D716:
adds r0, r5, 0
adds r0, 0x60
ldrb r1, [r0]
movs r2, 0x1
adds r0, r2, 0
ands r0, r1
cmp r0, 0
bne _0805D728
b _0805D540
_0805D728:
adds r0, r4, 0
adds r0, 0x60
ldrb r1, [r0]
adds r0, r2, 0
ands r0, r1
b _0805D7B8
_0805D734:
adds r0, r4, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
b _0805D7B8
_0805D740:
movs r2, 0x1C
ldrsh r0, [r4, r2]
_0805D744:
cmp r0, 0
bgt _0805D802
b _0805D540
_0805D74A:
adds r0, r5, 0
adds r0, 0x5E
adds r1, r4, 0
adds r1, 0x5E
ldrh r0, [r0]
ldrh r1, [r1]
cmp r0, r1
bne _0805D802
b _0805D540
_0805D75C:
mov r0, r8
movs r1, 0xE
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0805D770
adds r0, r4, 0
adds r0, 0xC8
b _0805D798
_0805D770:
movs r3, 0x1C
ldrsh r0, [r5, r3]
cmp r0, 0x13
ble _0805D802
movs r7, 0x20
ldrsh r0, [r5, r7]
cmp r0, 0x13
ble _0805D802
b _0805D540
_0805D782:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
b _0805D7F0
_0805D78A:
movs r1, 0xE
ldrsh r0, [r4, r1]
_0805D78E:
cmp r0, 0x1
bgt _0805D802
b _0805D540
_0805D794:
adds r0, r4, 0
adds r0, 0xD0
_0805D798:
ldrb r0, [r0]
cmp r0, 0x1
bne _0805D802
b _0805D540
_0805D7A0:
adds r0, r4, 0
adds r0, 0xFD
ldrb r0, [r0]
_0805D7A6:
cmp r0, 0
beq _0805D802
b _0805D540
_0805D7AC:
movs r2, 0x8C
lsls r2, 1
adds r0, r4, r2
_0805D7B2:
bl sub_805D888
lsls r0, 24
_0805D7B8:
cmp r0, 0
bne _0805D802
b _0805D540
_0805D7BE:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x7
bne _0805D802
b _0805D540
_0805D7CA:
adds r0, r4, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x3
bne _0805D7D6
b _0805D540
_0805D7D6:
cmp r0, 0x4
bne _0805D802
b _0805D540
_0805D7DC:
adds r0, r4, 0
adds r0, 0xAC
ldrb r0, [r0]
b _0805D7F0
_0805D7E4:
adds r0, r4, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x2
bne _0805D7F0
b _0805D540
_0805D7F0:
cmp r0, 0x3
bne _0805D802
b _0805D540
_0805D7F6:
adds r0, r4, 0
adds r0, 0xBC
_0805D7FA:
ldrb r0, [r0]
cmp r0, 0x2
bne _0805D802
b _0805D540
_0805D802:
movs r0, 0x1
_0805D804:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805CEB8
thumb_func_start sub_805D810
sub_805D810:
push {r4-r6,lr}
adds r4, r0, 0
movs r3, 0
movs r6, 0x1
movs r5, 0x20
adds r2, r4, 0
_0805D81C:
ldrb r1, [r2]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0805D82E
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0805D848
_0805D82E:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _0805D81C
adds r0, r4, 0
adds r0, 0x20
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0805D848
movs r0, 0
b _0805D84A
_0805D848:
movs r0, 0x1
_0805D84A:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805D810
thumb_func_start sub_805D850
sub_805D850:
push {r4,r5,lr}
movs r3, 0
movs r5, 0x1
adds r2, r0, 0
movs r4, 0x10
_0805D85A:
ldrb r1, [r2]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _0805D876
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _0805D876
ldrb r0, [r2, 0x4]
cmp r0, 0
bne _0805D876
movs r0, 0x1
b _0805D880
_0805D876:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _0805D85A
movs r0, 0
_0805D880:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_805D850
thumb_func_start sub_805D888
sub_805D888:
push {r4-r6,lr}
adds r4, r0, 0
movs r3, 0
movs r6, 0x1
movs r5, 0x10
adds r2, r4, 0
_0805D894:
ldrb r1, [r2]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0805D8A6
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0805D8C0
_0805D8A6:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _0805D894
adds r0, r4, 0
adds r0, 0x20
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0805D8C0
movs r0, 0
b _0805D8C2
_0805D8C0:
movs r0, 0x1
_0805D8C2:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805D888
thumb_func_start sub_805D8C8
sub_805D8C8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
ldr r4, _0805D90C
ldr r1, [r4]
ldr r0, _0805D910
adds r0, r1, r0
str r0, [sp, 0x10]
movs r2, 0x3
str r2, [sp, 0xC]
movs r5, 0
movs r0, 0
strh r0, [r1, 0x12]
bl sub_8083600
movs r1, 0x1
bl sub_806A2BC
bl sub_8083600
bl sub_80701A4
lsls r0, 24
cmp r0, 0
beq _0805D928
movs r0, 0x3C
movs r1, 0x10
bl sub_803E708
bl _0805E2B0
.align 2, 0
_0805D90C: .4byte gUnknown_203B418
_0805D910: .4byte 0x000181e8
_0805D914:
mov r1, r8
adds r1, 0x44
movs r2, 0
movs r0, 0x2
strh r0, [r1]
mov r0, r8
adds r0, 0x48
strb r2, [r0]
bl _0805E2B0
_0805D928:
ldr r0, [r4]
ldr r3, _0805D9D4
adds r0, r3
strb r5, [r0]
bl sub_8040A78
ldr r1, [r4]
ldrb r0, [r1, 0x1]
cmp r0, 0
beq _0805D976
strb r5, [r1, 0x1]
bl sub_8083600
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
bne _0805D976
movs r0, 0x1
bl sub_8044C10
bl sub_805E804
bl sub_8083600
bl sub_80647F0
bl sub_80048D0
bl sub_8004914
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
beq _0805D976
bl _0805E2B0
_0805D976:
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl sub_806A914
_0805D980:
bl sub_8083600
mov r10, r0
ldr r5, [r0, 0x70]
mov r8, r5
movs r1, 0x2
ldrsh r0, [r5, r1]
bl sub_80978C8
ldr r2, _0805D9D8
ldr r0, [r2]
ldr r3, _0805D9DC
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _0805D9AE
bl sub_805E874
lsls r0, 24
cmp r0, 0
bne _0805D914
bl sub_805E804
_0805D9AE:
ldr r0, _0805D9E0
movs r1, 0
strb r1, [r0]
ldr r0, _0805D9E4
strb r1, [r0]
ldr r5, _0805D9D8
ldr r0, [r5]
movs r1, 0xB8
lsls r1, 3
adds r0, r1
ldr r0, [r0]
cmp r0, 0
bge _0805D9CA
b _0805DAE8
_0805D9CA:
ldr r0, _0805D9E8
ands r6, r0
movs r2, 0x1
orrs r6, r2
b _0805DAEC
.align 2, 0
_0805D9D4: .4byte 0x00000673
_0805D9D8: .4byte gUnknown_203B418
_0805D9DC: .4byte 0x0000066c
_0805D9E0: .4byte gUnknown_202F22D
_0805D9E4: .4byte gUnknown_202F22C
_0805D9E8: .4byte 0xffffff00
_0805D9EC:
movs r0, 0x1
bl sub_8044C50
ldr r3, _0805DA00
ldr r0, [r3]
ldr r5, _0805DA04
adds r0, r5
strb r4, [r0]
b _0805E1AE
.align 2, 0
_0805DA00: .4byte gUnknown_203B418
_0805DA04: .4byte 0x00000673
_0805DA08:
ldr r0, _0805DA14
ldr r1, [r0]
mov r0, r10
bl sub_80522A8
b _0805DBDA
.align 2, 0
_0805DA14: .4byte gUnknown_80FD4B0
_0805DA18:
ldr r0, _0805DA1C
b _0805DCBC
.align 2, 0
_0805DA1C: .4byte gUnknown_80F8A28
_0805DA20:
ldr r0, [sp, 0x1C]
movs r1, 0x17
bl sub_8044C94
b _0805E1AE
_0805DA2A:
ldr r0, _0805DA38
ands r6, r0
movs r3, 0x1
orrs r6, r3
ldr r0, _0805DA3C
ands r6, r0
b _0805DAD6
.align 2, 0
_0805DA38: .4byte 0xffffff00
_0805DA3C: .4byte 0xffff00ff
_0805DA40:
ldr r5, _0805DA58
ldr r0, [r5]
movs r2, 0xB8
lsls r2, 3
adds r0, r2
str r1, [r0]
ldr r0, _0805DA5C
ands r6, r0
movs r3, 0x1
orrs r6, r3
b _0805DAA8
.align 2, 0
_0805DA58: .4byte gUnknown_203B418
_0805DA5C: .4byte 0xffffff00
_0805DA60:
ldr r5, _0805DA78
ldr r0, [r5]
movs r1, 0xB8
lsls r1, 3
adds r0, r1
movs r2, 0x1
str r2, [r0]
ldr r0, _0805DA7C
ands r6, r0
orrs r6, r2
b _0805DAA8
.align 2, 0
_0805DA78: .4byte gUnknown_203B418
_0805DA7C: .4byte 0xffffff00
_0805DA80:
ldr r3, _0805DA98
ldr r0, [r3]
movs r5, 0xB8
lsls r5, 3
adds r0, r5
str r2, [r0]
ldr r0, _0805DA9C
ands r6, r0
movs r0, 0x1
orrs r6, r0
b _0805DAA8
.align 2, 0
_0805DA98: .4byte gUnknown_203B418
_0805DA9C: .4byte 0xffffff00
_0805DAA0:
ldr r0, _0805DAB8
ands r6, r0
movs r1, 0x1
orrs r6, r1
_0805DAA8:
ldr r0, _0805DABC
ands r6, r0
ldr r0, _0805DAC0
ands r6, r0
movs r0, 0x80
lsls r0, 9
orrs r6, r0
b _0805E1AE
.align 2, 0
_0805DAB8: .4byte 0xffffff00
_0805DABC: .4byte 0xffff00ff
_0805DAC0: .4byte 0xff00ffff
_0805DAC4:
ldr r0, _0805DADC
ands r6, r0
movs r2, 0x1
orrs r6, r2
ldr r0, _0805DAE0
ands r6, r0
movs r0, 0x80
lsls r0, 1
orrs r6, r0
_0805DAD6:
ldr r0, _0805DAE4
ands r6, r0
b _0805E1AE
.align 2, 0
_0805DADC: .4byte 0xffffff00
_0805DAE0: .4byte 0xffff00ff
_0805DAE4: .4byte 0xff00ffff
_0805DAE8:
ldr r0, _0805DB3C
ands r6, r0
_0805DAEC:
ldr r0, _0805DB40
ands r6, r0
ldr r0, _0805DB44
ands r6, r0
movs r3, 0
str r3, [sp, 0x8]
movs r0, 0
bl sub_8044C50
ldr r0, _0805DB48
mov r5, sp
ldrb r5, [r5, 0x8]
strb r5, [r0]
ldr r0, _0805DB4C
mov r1, sp
ldrb r1, [r1, 0x8]
strb r1, [r0]
lsls r0, r6, 24
mov r2, r8
adds r2, 0x44
str r2, [sp, 0x1C]
str r0, [sp, 0x14]
ldr r3, [sp, 0x10]
adds r3, 0x32
str r3, [sp, 0x18]
cmp r0, 0
beq _0805DB24
b _0805E1AE
_0805DB24:
ldr r0, _0805DB50
ldrh r1, [r0]
adds r1, 0x1
strh r1, [r0]
ldr r5, [sp, 0x18]
ldrb r0, [r5]
cmp r0, 0
beq _0805DB54
movs r0, 0
str r0, [sp, 0x8]
b _0805DB5A
.align 2, 0
_0805DB3C: .4byte 0xffffff00
_0805DB40: .4byte 0xffff00ff
_0805DB44: .4byte 0xff00ffff
_0805DB48: .4byte gUnknown_202F230
_0805DB4C: .4byte gUnknown_202F231
_0805DB50: .4byte gUnknown_202F22E
_0805DB54:
ldr r1, [sp, 0x8]
adds r1, 0x1
str r1, [sp, 0x8]
_0805DB5A:
ldr r2, [sp, 0xC]
cmp r2, 0
beq _0805DB6E
subs r2, 0x1
str r2, [sp, 0xC]
cmp r2, 0
bne _0805DB6E
movs r0, 0
bl sub_8075680
_0805DB6E:
mov r0, r10
bl sub_805E2C4
movs r7, 0
movs r1, 0
add r0, sp, 0x4
_0805DB7A:
strb r1, [r0]
subs r0, 0x1
cmp r0, sp
bge _0805DB7A
ldr r0, _0805DBEC
ldrh r1, [r0]
movs r4, 0x1
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805DBAA
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0805DBAA
movs r0, 0x9E
lsls r0, 1
add r0, r8
ldr r0, [r0]
bl sub_8094450
cmp r0, 0
beq _0805DBAA
b _0805D9EC
_0805DBAA:
movs r3, 0
mov r9, r3
ldr r4, _0805DBEC
ldrh r1, [r4, 0x2]
movs r5, 0x1
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0805DBBE
b _0805DD02
_0805DBBE:
ldrh r1, [r4]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0805DBF8
movs r0, 0x9E
lsls r0, 1
add r0, r8
ldr r0, [r0]
bl sub_8094450
cmp r0, 0
bne _0805DBDA
b _0805DD02
_0805DBDA:
movs r0, 0x1
bl sub_8044C50
ldr r1, _0805DBF0
ldr r0, [r1]
ldr r2, _0805DBF4
adds r0, r2
strb r5, [r0]
b _0805E1AE
.align 2, 0
_0805DBEC: .4byte gUnknown_20255F0
_0805DBF0: .4byte gUnknown_203B418
_0805DBF4: .4byte 0x00000673
_0805DBF8:
mov r0, r10
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _0805DC08
b _0805DA08
_0805DC08:
ldrh r0, [r4]
movs r3, 0x80
lsls r3, 2
adds r1, r3, 0
ands r0, r1
cmp r0, 0
beq _0805DCE8
movs r4, 0
movs r2, 0x8C
lsls r2, 1
add r2, r8
movs r3, 0x8
_0805DC20:
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805DC32
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0805DC3A
_0805DC32:
adds r2, 0x8
adds r4, 0x1
cmp r4, 0x3
ble _0805DC20
_0805DC3A:
cmp r4, 0x4
bne _0805DC40
b _0805DA18
_0805DC40:
movs r3, 0
movs r5, 0x8C
lsls r5, 1
movs r7, 0x1
mov r2, r8
_0805DC4A:
lsls r0, r3, 3
add r0, r8
adds r0, r5
ldrb r1, [r0]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _0805DC66
movs r1, 0x8E
lsls r1, 1
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
bne _0805DC6E
_0805DC66:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _0805DC4A
_0805DC6E:
cmp r3, 0x4
bne _0805DC74
b _0805DA20
_0805DC74:
movs r7, 0
adds r3, r4, 0
cmp r4, 0x3
bgt _0805DCB6
lsls r0, r4, 3
adds r2, r0, 0
add r2, r8
mov r12, r2
movs r5, 0x8E
lsls r5, 1
adds r0, r5
mov r1, r8
adds r2, r0, r1
movs r5, 0x2
_0805DC90:
ldrb r0, [r2]
cmp r0, 0
bne _0805DCCC
movs r0, 0x8
add r12, r0
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
bgt _0805DCB6
cmp r3, r4
beq _0805DC90
movs r0, 0x8C
lsls r0, 1
add r0, r12
ldrb r1, [r0]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0805DC90
_0805DCB6:
cmp r7, 0
bne _0805DCCC
ldr r0, _0805DCC8
_0805DCBC:
ldr r1, [r0]
mov r0, r10
bl sub_80522A8
b _0805E1AE
.align 2, 0
_0805DCC8: .4byte gUnknown_80F8A4C
_0805DCCC:
ldr r0, [sp, 0x1C]
movs r1, 0x14
bl sub_8044C94
mov r0, r10
bl sub_8045B60
mov r1, r8
adds r1, 0x48
strb r0, [r1]
mov r0, r8
adds r0, 0x50
strb r4, [r0]
b _0805E1AE
_0805DCE8:
mov r0, r10
mov r1, r8
bl sub_805EF60
lsls r0, 24
cmp r0, 0
beq _0805DCF8
b _0805E1AE
_0805DCF8:
ldr r0, [sp, 0x1C]
movs r1, 0x32
bl sub_8044C94
b _0805E1AE
_0805DD02:
ldr r3, _0805DDC8
ldrh r1, [r3, 0x6]
movs r2, 0x2
adds r0, r2, 0
ands r0, r1
lsls r0, 16
lsrs r1, r0, 16
cmp r1, 0
beq _0805DD16
b _0805DA2A
_0805DD16:
mov r0, sp
ldrb r0, [r0, 0x1]
cmp r0, 0
beq _0805DD20
b _0805DA40
_0805DD20:
mov r0, sp
ldrb r0, [r0, 0x2]
cmp r0, 0
beq _0805DD2A
b _0805DA60
_0805DD2A:
mov r0, sp
ldrb r0, [r0, 0x3]
cmp r0, 0
beq _0805DD34
b _0805DA80
_0805DD34:
mov r0, sp
ldrb r0, [r0, 0x4]
cmp r0, 0
beq _0805DD3E
b _0805DAA0
_0805DD3E:
ldr r0, _0805DDCC
ldr r1, [sp, 0x8]
cmp r1, r0
ble _0805DD48
b _0805DAC4
_0805DD48:
ldr r0, _0805DDD0
ldr r0, [r0]
ldrb r4, [r0, 0x9]
cmp r4, 0
bne _0805DD7E
ldrh r1, [r3, 0x2]
adds r0, r2, 0
ands r0, r1
cmp r0, 0
bne _0805DD66
cmp r7, 0
bne _0805DD7E
movs r2, 0
cmp r2, 0
beq _0805DD7E
_0805DD66:
ldr r3, [sp, 0x18]
ldrb r0, [r3]
cmp r0, 0
beq _0805DD7E
bl sub_804AA60
ldr r0, _0805DDD4
strb r4, [r0]
bl sub_80048D0
bl sub_8004914
_0805DD7E:
ldr r2, _0805DDC8
ldrh r0, [r2]
movs r5, 0x80
lsls r5, 2
adds r1, r5, 0
ands r0, r1
cmp r0, 0
beq _0805DDA4
ldrh r1, [r2, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0805DDA4
bl sub_80532B4
bl sub_80048D0
bl sub_8004914
_0805DDA4:
movs r4, 0
ldr r0, _0805DDC8
ldrh r0, [r0]
movs r2, 0x80
lsls r2, 1
adds r1, r2, 0
ands r0, r1
cmp r0, 0
beq _0805DDFA
ldr r1, _0805DDD8
ldrb r0, [r1]
cmp r0, 0
bne _0805DDC2
ldr r0, _0805DDDC
strh r4, [r0]
_0805DDC2:
movs r3, 0x1
strb r3, [r1]
b _0805DDFE
.align 2, 0
_0805DDC8: .4byte gUnknown_20255F0
_0805DDCC: .4byte 0x00000707
_0805DDD0: .4byte gUnknown_203B46C
_0805DDD4: .4byte gUnknown_202F22D
_0805DDD8: .4byte gUnknown_202F22C
_0805DDDC: .4byte gUnknown_202F22E
_0805DDE0:
movs r0, 0xB
bl sub_8044C50
adds r2, r4, 0x1
mov r0, r8
adds r0, 0x48
movs r1, 0
strb r2, [r0]
adds r0, 0x4
strh r1, [r0]
adds r0, 0x2
strh r1, [r0]
b _0805DE92
_0805DDFA:
ldr r0, _0805DEF8
strb r4, [r0]
_0805DDFE:
movs r3, 0
ldr r0, _0805DEFC
ldr r0, [r0]
ldrb r0, [r0, 0x9]
cmp r0, 0
bne _0805DE2C
ldr r2, _0805DF00
ldrh r0, [r2, 0x6]
movs r5, 0x80
lsls r5, 1
adds r1, r5, 0
ands r0, r1
cmp r0, 0
bne _0805DE2A
mov r0, r9
cmp r0, 0
bne _0805DE2A
ldrh r1, [r2, 0x2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0805DE2C
_0805DE2A:
movs r3, 0x1
_0805DE2C:
cmp r3, 0
beq _0805DE54
mov r0, r10
bl sub_805E738
ldr r0, _0805DF04
movs r1, 0x1
strb r1, [r0]
mov r0, r8
adds r0, 0x46
ldrb r0, [r0]
ldr r1, [sp, 0x10]
adds r1, 0x33
strb r0, [r1]
ldr r1, [sp, 0x10]
adds r1, 0x34
movs r0, 0xFF
strb r0, [r1]
bl sub_80048D0
_0805DE54:
ldr r0, _0805DF00
ldr r1, [r0]
ldr r0, _0805DF08
ands r1, r0
cmp r1, r0
bne _0805DE62
movs r4, 0x1
_0805DE62:
mov r0, sp
ldrb r0, [r0]
cmp r0, 0
beq _0805DE6C
movs r4, 0x1
_0805DE6C:
cmp r4, 0
beq _0805DE9C
movs r4, 0
ldr r0, _0805DF0C
ldr r2, [r0]
movs r3, 0x10
_0805DE78:
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805DE8A
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0805DDE0
_0805DE8A:
adds r2, 0x4
adds r4, 0x1
cmp r4, 0x13
ble _0805DE78
_0805DE92:
ldr r2, [sp, 0x1C]
ldrh r0, [r2]
cmp r0, 0
beq _0805DE9C
b _0805E1AE
_0805DE9C:
ldr r5, _0805DF10
ldr r3, [r5]
ldr r1, _0805DF14
adds r0, r3, r1
ldrb r0, [r0]
cmp r0, 0
bne _0805DF82
ldr r0, _0805DEFC
ldr r2, [r0]
ldrb r0, [r2, 0x4]
cmp r0, 0x6
beq _0805DF82
ldr r0, _0805DF00
ldrh r1, [r0, 0x2]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0805DF82
ldrb r4, [r2, 0x4]
ldr r0, _0805DF18
movs r2, 0x1
strb r2, [r0]
ldr r5, _0805DF1C
adds r0, r3, r5
strb r2, [r0]
bl sub_8094C48
lsls r0, 24
cmp r0, 0
bne _0805DEDC
bl sub_8094C88
_0805DEDC:
movs r0, 0x1
bl sub_8052210
bl sub_8040A84
movs r0, 0x1E
bl SetBGOBJEnableFlags
movs r0, 0xA
movs r1, 0x2F
bl sub_803E708
b _0805DF3A
.align 2, 0
_0805DEF8: .4byte gUnknown_202F22C
_0805DEFC: .4byte gUnknown_203B46C
_0805DF00: .4byte gUnknown_20255F0
_0805DF04: .4byte gUnknown_202F22D
_0805DF08: .4byte 0x01000200
_0805DF0C: .4byte gUnknown_203B460
_0805DF10: .4byte gUnknown_203B418
_0805DF14: .4byte 0x0001820a
_0805DF18: .4byte gUnknown_202EE00
_0805DF1C: .4byte 0x00018214
_0805DF20:
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805DF3A
ldr r2, _0805DFA0
movs r1, 0
ldrb r0, [r2]
cmp r0, 0
bne _0805DF34
movs r1, 0x1
_0805DF34:
strb r1, [r2]
bl sub_8040A84
_0805DF3A:
movs r0, 0x2F
bl sub_803E46C
ldr r0, _0805DFA4
ldrh r1, [r0, 0x2]
movs r0, 0x4
ands r0, r1
cmp r0, 0
bne _0805DF54
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0805DF20
_0805DF54:
ldr r1, _0805DFA8
ldr r0, [r1]
ldr r2, _0805DFAC
adds r0, r2
movs r1, 0
strb r1, [r0]
ldr r0, _0805DFB0
ldr r0, [r0]
strb r4, [r0, 0x4]
ldr r0, _0805DFA0
movs r3, 0x1
strb r3, [r0]
bl sub_8040A84
movs r0, 0
bl SetBGOBJEnableFlags
movs r0, 0x2F
bl sub_803E46C
movs r0, 0x2F
bl sub_803E46C
_0805DF82:
ldr r5, _0805DFA8
ldr r0, [r5]
ldr r1, _0805DFB4
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0805DFBC
ldr r0, _0805DFB8
ldrb r0, [r0]
cmp r0, 0
bne _0805DFBC
ldr r0, _0805DFA4
ldrh r2, [r0, 0x2]
adds r1, r2, 0
b _0805DFCC
.align 2, 0
_0805DFA0: .4byte gUnknown_202EE00
_0805DFA4: .4byte gUnknown_20255F0
_0805DFA8: .4byte gUnknown_203B418
_0805DFAC: .4byte 0x00018214
_0805DFB0: .4byte gUnknown_203B46C
_0805DFB4: .4byte 0x0000066d
_0805DFB8: .4byte gUnknown_202F22C
_0805DFBC:
ldr r3, _0805E05C
ldrh r1, [r3]
ldr r2, [sp, 0x18]
ldrb r0, [r2]
adds r2, r1, 0
cmp r0, 0
beq _0805DFCC
ldrh r2, [r3, 0x2]
_0805DFCC:
movs r0, 0xF0
ands r1, r0
ands r2, r0
movs r5, 0x1
negs r5, r5
cmp r1, 0x50
bne _0805DFDC
movs r5, 0x3
_0805DFDC:
cmp r1, 0x60
bne _0805DFE2
movs r5, 0x5
_0805DFE2:
cmp r1, 0x90
bne _0805DFE8
movs r5, 0x1
_0805DFE8:
cmp r1, 0xA0
bne _0805DFEE
movs r5, 0x7
_0805DFEE:
cmp r2, 0x40
bne _0805DFF4
movs r5, 0x4
_0805DFF4:
cmp r2, 0x80
bne _0805DFFA
movs r5, 0
_0805DFFA:
cmp r2, 0x10
bne _0805E000
movs r5, 0x2
_0805E000:
cmp r2, 0x20
bne _0805E006
movs r5, 0x6
_0805E006:
cmp r5, 0
bge _0805E00C
b _0805E1A0
_0805E00C:
ldr r0, _0805E060
ldrb r0, [r0]
cmp r0, 0
beq _0805E020
adds r0, r5, 0
movs r3, 0x1
ands r0, r3
cmp r0, 0
bne _0805E020
b _0805E1A0
_0805E020:
mov r2, r8
adds r2, 0x46
ldrb r1, [r2]
eors r1, r5
negs r0, r1
orrs r0, r1
lsrs r7, r0, 31
movs r1, 0x7
adds r0, r5, 0
ands r0, r1
strb r0, [r2]
ldr r0, _0805E064
ldrb r0, [r0]
cmp r0, 0
beq _0805E068
ldr r0, [sp, 0x10]
adds r0, 0x33
strb r5, [r0]
mov r0, r10
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
mov r0, r10
adds r2, r5, 0
bl sub_806CDD4
b _0805E1A0
.align 2, 0
_0805E05C: .4byte gUnknown_20255F0
_0805E060: .4byte gUnknown_202F22C
_0805E064: .4byte gUnknown_202F22D
_0805E068:
movs r4, 0
movs r3, 0
mov r0, r10
movs r1, 0x1
str r3, [sp, 0x20]
bl sub_805EC4C
lsls r0, 24
ldr r3, [sp, 0x20]
cmp r0, 0
beq _0805E080
b _0805E1AE
_0805E080:
mov r0, r8
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x2
bne _0805E094
ldr r0, _0805E090
b _0805E0BE
.align 2, 0
_0805E090: .4byte gUnknown_80F8A84
_0805E094:
cmp r0, 0x7
bne _0805E0A0
ldr r0, _0805E09C
b _0805E0BE
.align 2, 0
_0805E09C: .4byte gUnknown_80F8A6C
_0805E0A0:
cmp r0, 0x5
bne _0805E0AC
ldr r0, _0805E0A8
b _0805E0BE
.align 2, 0
_0805E0A8: .4byte gUnknown_80F8AB0
_0805E0AC:
cmp r0, 0x3
bne _0805E0B8
ldr r0, _0805E0B4
b _0805E0BE
.align 2, 0
_0805E0B4: .4byte gUnknown_80F8ADC
_0805E0B8:
cmp r0, 0x4
bne _0805E0C2
ldr r0, _0805E128
_0805E0BE:
ldr r3, [r0]
movs r4, 0x1
_0805E0C2:
mov r0, r10
adds r1, r5, 0
str r3, [sp, 0x20]
bl sub_8070D6C
lsls r0, 24
ldr r3, [sp, 0x20]
cmp r0, 0
bne _0805E0D8
movs r0, 0x2
orrs r4, r0
_0805E0D8:
cmp r7, 0
beq _0805E0F4
mov r0, r10
str r3, [sp, 0x20]
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
mov r0, r10
adds r2, r5, 0
bl sub_806CDD4
ldr r3, [sp, 0x20]
_0805E0F4:
movs r7, 0x2
adds r0, r4, 0
ands r0, r7
cmp r0, 0
bne _0805E192
movs r5, 0x1
mov r9, r5
ands r5, r4
cmp r5, 0
beq _0805E134
cmp r3, 0
beq _0805E114
mov r0, r10
adds r1, r3, 0
bl sub_80522A8
_0805E114:
movs r0, 0x1
bl sub_8044C50
ldr r1, _0805E12C
ldr r0, [r1]
ldr r2, _0805E130
adds r0, r2
mov r3, r9
strb r3, [r0]
b _0805E1AE
.align 2, 0
_0805E128: .4byte gUnknown_80F8B0C
_0805E12C: .4byte gUnknown_203B418
_0805E130: .4byte 0x00000673
_0805E134:
movs r0, 0x2
bl sub_8044C50
ldr r0, _0805E17C
ldrh r1, [r0]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _0805E14C
movs r0, 0
cmp r0, 0
beq _0805E188
_0805E14C:
movs r0, 0x9E
lsls r0, 1
add r0, r8
ldr r0, [r0]
bl sub_8094450
cmp r0, 0
beq _0805E188
mov r1, r10
ldr r0, [r1, 0x70]
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _0805E174
ldr r2, _0805E180
ldr r0, [r2]
ldr r3, _0805E184
adds r0, r3
mov r1, r9
strb r1, [r0]
_0805E174:
mov r0, r8
adds r0, 0x48
strb r5, [r0]
b _0805E1AE
.align 2, 0
_0805E17C: .4byte gUnknown_20255F0
_0805E180: .4byte gUnknown_203B418
_0805E184: .4byte 0x0000066c
_0805E188:
mov r0, r8
adds r0, 0x48
movs r2, 0x1
strb r2, [r0]
b _0805E1AE
_0805E192:
movs r3, 0x1
ands r4, r3
cmp r4, 0
beq _0805E1A0
movs r0, 0x23
bl sub_803E724
_0805E1A0:
movs r0, 0xF
bl sub_803E46C
ldr r5, [sp, 0x14]
cmp r5, 0
bne _0805E1AE
b _0805DB24
_0805E1AE:
ldr r1, [sp, 0x18]
ldrb r0, [r1]
cmp r0, 0
beq _0805E1BA
bl sub_804AA60
_0805E1BA:
ldr r4, [sp, 0x1C]
ldrh r0, [r4]
cmp r0, 0x2D
beq _0805E1C6
cmp r0, 0x13
bne _0805E1E0
_0805E1C6:
mov r0, r10
bl sub_8067510
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0805E2B0
movs r0, 0
bl sub_8044C50
bl _0805D980
_0805E1E0:
lsls r0, r6, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0805E222
ldr r2, _0805E210
ldr r0, [r2]
ldr r3, _0805E214
adds r0, r3
strb r1, [r0]
ldrh r0, [r4]
cmp r0, 0
beq _0805E218
mov r0, r10
movs r1, 0
bl sub_8045028
lsls r0, 24
cmp r0, 0
bne _0805E2B0
movs r0, 0xF
bl sub_803E46C
b _0805E2B0
.align 2, 0
_0805E210: .4byte gUnknown_203B418
_0805E214: .4byte 0x0000066d
_0805E218:
movs r0, 0xF
bl sub_803E46C
bl _0805D980
_0805E222:
movs r0, 0xF
bl sub_803E46C
bl sub_8047158
movs r2, 0
lsrs r0, r6, 8
lsls r0, 24
cmp r0, 0
bne _0805E238
movs r2, 0x1
_0805E238:
lsrs r1, r6, 16
lsls r1, 24
lsrs r1, 24
adds r0, r2, 0
bl ShowFieldMenu
bl sub_80048D0
bl sub_8004914
ldr r1, _0805E294
movs r0, 0
strb r0, [r1]
movs r0, 0
ldr r5, [sp, 0x18]
strb r0, [r5]
bl sub_804AA60
bl sub_8044B28
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0805E2B0
ldrh r0, [r4]
cmp r0, 0
beq _0805E29C
cmp r0, 0x2B
bne _0805E27E
ldr r2, _0805E298
ldr r0, [r2]
movs r3, 0x1
strb r3, [r0, 0x4]
ldr r0, [r2]
strb r3, [r0, 0x3]
_0805E27E:
ldr r5, [sp, 0x1C]
ldrh r0, [r5]
cmp r0, 0x2E
bne _0805E2B0
ldr r2, _0805E298
ldr r0, [r2]
movs r3, 0x1
strb r3, [r0, 0x4]
ldr r0, [r2]
strb r1, [r0, 0x3]
b _0805E2B0
.align 2, 0
_0805E294: .4byte gUnknown_202F22D
_0805E298: .4byte gUnknown_203B418
_0805E29C:
movs r0, 0xF
bl sub_803E46C
ldr r5, _0805E2C0
ldr r0, [r5]
ldrb r0, [r0, 0x4]
cmp r0, 0
bne _0805E2B0
bl _0805D980
_0805E2B0:
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0805E2C0: .4byte gUnknown_203B418
thumb_func_end sub_805D8C8
thumb_func_start sub_805E2C4
sub_805E2C4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x28
str r0, [sp, 0x10]
ldr r0, _0805E47C
ldr r1, [r0]
ldr r0, _0805E480
adds r0, r1, r0
str r0, [sp, 0x14]
ldr r0, _0805E484
ldrb r0, [r0]
cmp r0, 0
bne _0805E2E6
b _0805E4C4
_0805E2E6:
movs r1, 0
str r1, [sp, 0x18]
mov r7, sp
ldr r2, _0805E488
mov r10, r2
_0805E2F0:
ldrh r0, [r7]
ldr r3, _0805E48C
adds r1, r3, 0
ands r1, r0
ldr r0, [sp]
mov r4, r10
ands r0, r4
orrs r0, r1
str r0, [sp]
ldrh r1, [r7]
mov r2, r10
ands r2, r0
orrs r2, r1
str r2, [sp]
ldrh r0, [r7]
ldr r5, _0805E490
adds r1, r5, 0
ands r1, r0
mov r0, r10
ands r0, r2
orrs r0, r1
str r0, [sp]
ldrh r2, [r7]
mov r1, r10
ands r1, r0
orrs r1, r2
str r1, [sp]
ldrh r2, [r7]
ldr r0, _0805E494
ands r0, r2
mov r3, r10
ands r3, r1
orrs r3, r0
str r3, [sp]
ldrh r1, [r7]
movs r0, 0x80
lsls r0, 3
orrs r0, r1
movs r6, 0
orrs r0, r6
mov r2, r10
ands r2, r3
orrs r2, r0
str r2, [sp]
ldrh r0, [r7]
ldr r3, _0805E498
adds r1, r3, 0
ands r1, r0
mov r0, r10
ands r0, r2
orrs r0, r1
str r0, [sp]
ldrh r1, [r7]
mov r2, r10
ands r2, r0
orrs r2, r1
str r2, [sp]
ldrh r0, [r7]
ldr r4, _0805E49C
adds r1, r4, 0
ands r1, r0
mov r0, r10
ands r0, r2
orrs r0, r1
str r0, [sp]
ldrh r1, [r7]
mov r2, r10
ands r2, r0
orrs r2, r1
str r2, [sp]
ldrh r1, [r7]
ldr r0, _0805E4A0
ands r0, r1
mov r1, r10
ands r1, r2
orrs r1, r0
str r1, [sp]
ldrh r2, [r7]
mov r0, r10
ands r0, r1
orrs r0, r2
str r0, [sp]
ldr r1, _0805E4A4
ldr r5, [sp, 0x18]
lsls r0, r5, 3
adds r0, r1
mov r12, r0
ldrb r1, [r0, 0x4]
negs r0, r1
orrs r0, r1
asrs r1, r0, 31
movs r0, 0x8
ands r1, r0
mov r6, r12
ldrb r0, [r6, 0x5]
cmp r0, 0
beq _0805E3B4
adds r1, 0x10
_0805E3B4:
movs r0, 0x1F
ands r1, r0
lsls r1, 9
ldrh r3, [r7, 0x2]
ldr r2, _0805E4A8
adds r0, r2, 0
ands r3, r0
orrs r3, r1
ldr r4, _0805E4A0
ands r3, r4
strh r3, [r7, 0x2]
ldr r2, _0805E4AC
ldrh r0, [r7, 0x4]
movs r5, 0xFC
lsls r5, 8
adds r1, r5, 0
ands r0, r1
orrs r0, r2
movs r6, 0
orrs r0, r6
movs r1, 0x80
lsls r1, 4
ldr r2, _0805E494
ands r0, r2
orrs r0, r1
orrs r0, r6
ldr r4, _0805E4B0
mov r9, r4
ands r0, r4
strh r0, [r7, 0x4]
ldrh r4, [r7, 0x6]
ldr r5, _0805E4B4
adds r0, r5, 0
ands r4, r0
ldr r6, _0805E4B8
adds r0, r6, 0
ands r4, r0
strh r4, [r7, 0x6]
mov r0, r12
movs r1, 0
ldrsh r5, [r0, r1]
lsls r2, r5, 2
adds r2, r5
lsls r2, 1
ldr r6, _0805E4BC
mov r8, r6
movs r1, 0
ldrsh r0, [r6, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
movs r6, 0x7
ands r0, r6
muls r0, r5
adds r0, r2
adds r0, 0x74
ldr r1, _0805E4C0
ands r0, r1
movs r2, 0xFE
lsls r2, 8
adds r1, r2, 0
ands r3, r1
orrs r3, r0
strh r3, [r7, 0x2]
mov r5, r12
movs r0, 0x2
ldrsh r3, [r5, r0]
lsls r2, r3, 2
adds r2, r3
lsls r2, 1
mov r1, r8
movs r5, 0
ldrsh r0, [r1, r5]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
ands r0, r6
muls r0, r3
adds r0, r2
adds r0, 0x52
mov r6, r9
ands r0, r6
lsls r0, 4
movs r1, 0xF
ands r4, r1
orrs r4, r0
strh r4, [r7, 0x6]
mov r0, sp
adds r1, 0xF1
movs r2, 0
movs r3, 0
bl AddSprite
ldr r2, [sp, 0x18]
adds r2, 0x1
str r2, [sp, 0x18]
cmp r2, 0x3
bgt _0805E47A
b _0805E2F0
_0805E47A:
b _0805E6AC
.align 2, 0
_0805E47C: .4byte gUnknown_203B418
_0805E480: .4byte 0x000181e8
_0805E484: .4byte gUnknown_202F22C
_0805E488: .4byte 0xffff0000
_0805E48C: .4byte 0x0000feff
_0805E490: .4byte 0x0000fdff
_0805E494: .4byte 0x0000f3ff
_0805E498: .4byte 0x0000efff
_0805E49C: .4byte 0x0000dfff
_0805E4A0: .4byte 0x00003fff
_0805E4A4: .4byte gUnknown_8106AC8
_0805E4A8: .4byte 0x0000c1ff
_0805E4AC: .4byte 0x00000213
_0805E4B0: .4byte 0x00000fff
_0805E4B4: .4byte 0x0000fffe
_0805E4B8: .4byte 0x0000fffd
_0805E4BC: .4byte gUnknown_202F22E
_0805E4C0: .4byte 0x000001ff
_0805E4C4:
ldr r3, _0805E6E4
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
bne _0805E4D0
b _0805E6AC
_0805E4D0:
ldr r4, _0805E6E8
adds r0, r1, r4
ldrb r0, [r0]
str r0, [sp, 0x1C]
cmp r0, 0x7
bls _0805E4DE
b _0805E6AC
_0805E4DE:
ldr r0, _0805E6EC
ldrb r0, [r0]
movs r7, 0x1
cmp r0, 0
beq _0805E4F2
ldr r0, _0805E6F0
ldrb r0, [r0]
cmp r0, 0
beq _0805E4F2
movs r7, 0x3
_0805E4F2:
ldr r5, _0805E6F4
mov r12, r5
ldr r6, [sp, 0x1C]
lsls r5, r6, 1
adds r3, r5, r6
lsls r3, 2
add r3, r12
movs r0, 0
ldrsh r4, [r3, r0]
lsls r1, r4, 2
adds r1, r4
lsls r1, 1
ldr r0, _0805E6F8
movs r6, 0
ldrsh r2, [r0, r6]
lsrs r0, r2, 31
adds r2, r0
asrs r2, 1
movs r0, 0x7
ands r2, r0
adds r0, r4, 0
muls r0, r2
adds r0, r1
adds r0, 0x74
str r0, [sp, 0x20]
movs r1, 0x2
ldrsh r0, [r3, r1]
lsls r1, r0, 2
adds r1, r0
lsls r1, 1
muls r0, r2
adds r0, r1
adds r0, 0x52
mov r10, r0
str r5, [sp, 0x24]
cmp r7, 0
bne _0805E53E
b _0805E6AC
_0805E53E:
add r6, sp, 0x8
ldr r2, _0805E6FC
mov r8, r2
mov r9, r7
_0805E546:
ldrh r0, [r6]
ldr r3, _0805E700
adds r1, r3, 0
ands r1, r0
ldr r0, [sp, 0x8]
mov r4, r8
ands r0, r4
orrs r0, r1
str r0, [sp, 0x8]
ldrh r1, [r6]
mov r2, r8
ands r2, r0
orrs r2, r1
str r2, [sp, 0x8]
ldrh r0, [r6]
ldr r5, _0805E704
adds r1, r5, 0
ands r1, r0
mov r0, r8
ands r0, r2
orrs r0, r1
str r0, [sp, 0x8]
ldrh r2, [r6]
mov r1, r8
ands r1, r0
orrs r1, r2
str r1, [sp, 0x8]
ldrh r2, [r6]
ldr r0, _0805E708
ands r0, r2
mov r3, r8
ands r3, r1
orrs r3, r0
str r3, [sp, 0x8]
ldrh r1, [r6]
movs r0, 0x80
lsls r0, 3
orrs r0, r1
movs r1, 0
orrs r0, r1
mov r2, r8
ands r2, r3
orrs r2, r0
str r2, [sp, 0x8]
ldrh r0, [r6]
ldr r3, _0805E70C
adds r1, r3, 0
ands r1, r0
mov r0, r8
ands r0, r2
orrs r0, r1
str r0, [sp, 0x8]
ldrh r1, [r6]
mov r2, r8
ands r2, r0
orrs r2, r1
str r2, [sp, 0x8]
ldrh r0, [r6]
ldr r4, _0805E710
adds r1, r4, 0
ands r1, r0
mov r0, r8
ands r0, r2
orrs r0, r1
str r0, [sp, 0x8]
ldrh r1, [r6]
mov r2, r8
ands r2, r0
orrs r2, r1
str r2, [sp, 0x8]
ldrh r1, [r6]
ldr r0, _0805E714
ands r0, r1
mov r1, r8
ands r1, r2
orrs r1, r0
str r1, [sp, 0x8]
ldrh r2, [r6]
mov r0, r8
ands r0, r1
orrs r0, r2
str r0, [sp, 0x8]
ldr r5, [sp, 0x24]
ldr r1, [sp, 0x1C]
adds r0, r5, r1
lsls r2, r0, 2
ldr r3, _0805E6F4
adds r7, r2, r3
ldrb r1, [r7, 0x8]
negs r0, r1
orrs r0, r1
asrs r1, r0, 31
movs r0, 0x8
ands r1, r0
ldrb r0, [r7, 0x9]
cmp r0, 0
beq _0805E60A
adds r1, 0x10
_0805E60A:
movs r0, 0x1F
ands r1, r0
lsls r1, 9
ldrh r3, [r6, 0x2]
ldr r4, _0805E718
adds r0, r4, 0
ands r3, r0
orrs r3, r1
ldr r5, _0805E714
ands r3, r5
strh r3, [r6, 0x2]
ldr r1, _0805E71C
adds r0, r2, r1
ldr r2, [r0]
ldr r0, _0805E720
ands r2, r0
ldrh r0, [r6, 0x4]
movs r4, 0xFC
lsls r4, 8
adds r1, r4, 0
ands r0, r1
orrs r0, r2
movs r1, 0x80
lsls r1, 4
ldr r5, _0805E708
ands r0, r5
orrs r0, r1
movs r1, 0
orrs r0, r1
movs r2, 0xF
mov r12, r2
ldr r4, _0805E724
ands r0, r4
strh r0, [r6, 0x4]
ldrh r1, [r6, 0x6]
ldr r5, _0805E728
adds r0, r5, 0
ands r1, r0
ldr r2, _0805E72C
adds r0, r2, 0
ands r1, r0
ldr r0, _0805E730
ldr r5, [sp, 0x20]
ands r0, r5
movs r5, 0xFE
lsls r5, 8
adds r2, r5, 0
ands r3, r2
orrs r3, r0
strh r3, [r6, 0x2]
mov r0, r10
ands r0, r4
lsls r0, 4
mov r2, r12
ands r1, r2
orrs r1, r0
strh r1, [r6, 0x6]
adds r0, r6, 0
movs r1, 0x80
lsls r1, 1
movs r2, 0
movs r3, 0
bl AddSprite
movs r3, 0
ldrsh r0, [r7, r3]
lsls r0, 2
ldr r4, [sp, 0x20]
adds r4, r0
str r4, [sp, 0x20]
movs r5, 0x2
ldrsh r0, [r7, r5]
lsls r0, 2
add r10, r0
movs r0, 0x1
negs r0, r0
add r9, r0
mov r1, r9
cmp r1, 0
beq _0805E6AC
b _0805E546
_0805E6AC:
ldr r4, _0805E734
ldrb r0, [r4]
cmp r0, 0
beq _0805E6D4
ldr r2, [sp, 0x14]
adds r2, 0x34
ldr r3, [sp, 0x14]
adds r3, 0x33
ldrb r1, [r3]
ldrb r0, [r2]
cmp r0, r1
beq _0805E6D4
strb r1, [r2]
ldr r0, [sp, 0x10]
adds r0, 0x4
ldrb r1, [r3]
ldrb r3, [r4]
movs r2, 0
bl sub_804A728
_0805E6D4:
add sp, 0x28
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0805E6E4: .4byte 0x0001821a
_0805E6E8: .4byte 0x0001821b
_0805E6EC: .4byte gUnknown_202F231
_0805E6F0: .4byte gUnknown_202F230
_0805E6F4: .4byte gUnknown_8106AE8
_0805E6F8: .4byte gUnknown_202F22E
_0805E6FC: .4byte 0xffff0000
_0805E700: .4byte 0x0000feff
_0805E704: .4byte 0x0000fdff
_0805E708: .4byte 0x0000f3ff
_0805E70C: .4byte 0x0000efff
_0805E710: .4byte 0x0000dfff
_0805E714: .4byte 0x00003fff
_0805E718: .4byte 0x0000c1ff
_0805E71C: .4byte gUnknown_8106AEC
_0805E720: .4byte 0x000003ff
_0805E724: .4byte 0x00000fff
_0805E728: .4byte 0x0000fffe
_0805E72C: .4byte 0x0000fffd
_0805E730: .4byte 0x000001ff
_0805E734: .4byte gUnknown_202F22D
thumb_func_end sub_805E2C4
thumb_func_start sub_805E738
sub_805E738:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r6, r0, 0
ldr r1, [r6, 0x70]
adds r0, r1, 0
adds r0, 0xE8
ldrb r0, [r0]
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bls _0805E7F6
movs r0, 0
mov r8, r0
adds r1, 0x46
mov r10, r1
_0805E75E:
movs r1, 0
mov r9, r1
mov r3, r10
ldrb r5, [r3]
adds r5, 0x1
movs r7, 0x1
_0805E76A:
movs r0, 0x7
ands r5, r0
movs r1, 0x4
ldrsh r0, [r6, r1]
ldr r1, _0805E7E8
lsls r2, r5, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r6, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x10]
cmp r0, 0
beq _0805E7B8
bl sub_80450F8
cmp r0, 0x1
bne _0805E7B8
ldr r1, [r4, 0x10]
ldr r4, [r1, 0x70]
adds r0, r6, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0805E7B8
mov r0, r8
cmp r0, 0
bne _0805E7C6
ldrb r0, [r4, 0x6]
cmp r0, 0
bne _0805E7C6
_0805E7B8:
adds r7, 0x1
adds r5, 0x1
cmp r7, 0x7
ble _0805E76A
mov r1, r9
cmp r1, 0
beq _0805E7EC
_0805E7C6:
ldr r1, [r6, 0x70]
movs r2, 0x7
adds r0, r5, 0
ands r0, r2
adds r1, 0x46
strb r0, [r1]
adds r0, r6, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
adds r2, r5, 0
bl sub_806CDD4
b _0805E7F6
.align 2, 0
_0805E7E8: .4byte gUnknown_80F4448
_0805E7EC:
movs r3, 0x1
add r8, r3
mov r0, r8
cmp r0, 0
ble _0805E75E
_0805E7F6:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_805E738
thumb_func_start sub_805E804
sub_805E804:
push {r4,r5,lr}
ldr r2, _0805E864
ldr r1, [r2]
ldr r5, _0805E868
adds r3, r1, r5
ldr r4, _0805E86C
adds r1, r4
ldrb r0, [r3]
ldrb r1, [r1]
orrs r0, r1
movs r1, 0
strb r0, [r3]
ldr r0, [r2]
adds r0, r4
strb r1, [r0]
ldr r0, [r2]
adds r0, r5
ldrb r0, [r0]
cmp r0, 0
beq _0805E85C
ldr r0, _0805E870
ldrh r1, [r0]
movs r2, 0x80
lsls r2, 1
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _0805E85C
adds r4, r2, 0
_0805E83E:
movs r0, 0x54
bl sub_803E46C
ldr r0, _0805E864
ldr r0, [r0]
ldr r1, _0805E868
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0805E85C
ldr r0, _0805E870
ldrh r0, [r0]
ands r0, r4
cmp r0, 0
bne _0805E83E
_0805E85C:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0805E864: .4byte gUnknown_203B418
_0805E868: .4byte 0x0000066d
_0805E86C: .4byte 0x0000066c
_0805E870: .4byte gUnknown_20255F0
thumb_func_end sub_805E804
thumb_func_start sub_805E874
sub_805E874:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
ldr r0, _0805E90C
ldr r4, [r0]
bl sub_8083600
mov r9, r0
ldr r0, [r0, 0x70]
adds r0, 0x46
ldrb r0, [r0]
str r0, [sp, 0x18]
mov r0, r9
movs r1, 0x4
ldrsh r0, [r0, r1]
mov r10, r0
mov r2, r9
movs r3, 0x6
ldrsh r2, [r2, r3]
str r2, [sp, 0x1C]
adds r1, r2, 0
bl sub_804954C
adds r5, r0, 0
ldr r1, _0805E910
ldr r2, [sp, 0x18]
lsls r0, r2, 2
adds r0, r1
movs r3, 0
ldrsh r1, [r0, r3]
mov r2, r10
adds r7, r2, r1
movs r3, 0x2
ldrsh r0, [r0, r3]
ldr r1, [sp, 0x1C]
adds r6, r1, r0
ldr r2, _0805E914
adds r4, r2
ldrb r0, [r4]
cmp r0, 0
beq _0805E906
ldr r0, [r5, 0x14]
cmp r0, 0
bne _0805E906
mov r0, r9
mov r1, r10
ldr r2, [sp, 0x1C]
bl sub_805EC2C
lsls r0, 24
cmp r0, 0
bne _0805E906
mov r0, r9
ldr r1, [sp, 0x18]
bl sub_8070F14
lsls r0, 24
cmp r0, 0
beq _0805E906
ldrb r3, [r5, 0x9]
str r3, [sp, 0x20]
cmp r3, 0xFF
bne _0805E918
adds r0, r7, 0
adds r1, r6, 0
bl sub_804954C
ldrb r0, [r0, 0x9]
cmp r0, 0xFF
beq _0805E922
_0805E906:
movs r0, 0
b _0805EC1A
.align 2, 0
_0805E90C: .4byte gUnknown_203B418
_0805E910: .4byte gUnknown_80F4448
_0805E914: .4byte 0x0000066c
_0805E918:
ldrh r1, [r5]
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0805E906
_0805E922:
movs r4, 0x1
negs r4, r4
ldr r7, _0805EA54
movs r5, 0x80
lsls r5, 2
adds r6, r5, 0
_0805E92E:
ldr r0, [sp, 0x18]
adds r1, r0, r4
movs r5, 0x7
ands r1, r5
lsls r1, 2
adds r1, r7
movs r2, 0
ldrsh r0, [r1, r2]
add r0, r10
movs r3, 0x2
ldrsh r1, [r1, r3]
ldr r2, [sp, 0x1C]
adds r1, r2, r1
bl sub_804954C
adds r1, r0, 0
ldr r0, [r1, 0x10]
cmp r0, 0
bne _0805E906
ldrh r0, [r1]
ands r0, r6
cmp r0, 0
bne _0805E906
adds r4, 0x1
cmp r4, 0x1
ble _0805E92E
ldr r4, _0805EA54
ldr r3, [sp, 0x18]
adds r3, 0x3
ands r3, r5
lsls r3, 2
adds r3, r4
movs r1, 0
ldrsh r0, [r3, r1]
add r0, r10
str r0, [sp]
ldr r2, [sp, 0x18]
adds r2, 0x4
ands r2, r5
lsls r2, 2
adds r2, r4
movs r1, 0
ldrsh r0, [r2, r1]
add r0, r10
str r0, [sp, 0x4]
ldr r1, [sp, 0x18]
adds r1, 0x5
ands r1, r5
lsls r1, 2
adds r1, r4
movs r4, 0
ldrsh r0, [r1, r4]
add r0, r10
str r0, [sp, 0x8]
add r4, sp, 0xC
movs r5, 0x2
ldrsh r0, [r3, r5]
ldr r3, [sp, 0x1C]
adds r0, r3, r0
str r0, [sp, 0xC]
movs r5, 0x2
ldrsh r0, [r2, r5]
adds r0, r3, r0
str r0, [r4, 0x4]
movs r2, 0x2
ldrsh r0, [r1, r2]
adds r0, r3, r0
str r0, [r4, 0x8]
movs r3, 0x1
negs r3, r3
mov r8, r3
_0805E9BC:
movs r4, 0x1
negs r4, r4
mov r7, r10
add r7, r8
ldr r6, [sp, 0x1C]
subs r6, 0x1
_0805E9C8:
adds r0, r7, 0
adds r1, r6, 0
bl sub_804954C
adds r5, r0, 0
ldr r0, [r5, 0x14]
cmp r0, 0
beq _0805EA14
movs r2, 0
ldr r0, [sp]
cmp r7, r0
bne _0805E9E6
ldr r0, [sp, 0xC]
cmp r6, r0
beq _0805EA04
_0805E9E6:
adds r2, 0x1
cmp r2, 0x2
bgt _0805EA04
lsls r1, r2, 2
mov r3, sp
adds r0, r3, r1
ldr r0, [r0]
cmp r7, r0
bne _0805E9E6
mov r0, sp
adds r0, r1
adds r0, 0xC
ldr r0, [r0]
cmp r6, r0
bne _0805E9E6
_0805EA04:
cmp r2, 0x3
bne _0805EA14
ldr r0, [r5, 0x14]
bl sub_80450F8
cmp r0, 0x3
bne _0805EA14
b _0805E906
_0805EA14:
movs r0, 0x1
ldr r1, [sp, 0x18]
ands r0, r1
cmp r0, 0
beq _0805EA60
ldr r0, [r5, 0x14]
cmp r0, 0
beq _0805EA94
bl sub_80450F8
cmp r0, 0x2
bne _0805EA94
ldr r0, [r5, 0x14]
bl sub_80450F8
cmp r0, 0x2
bne _0805EA94
ldr r0, [r5, 0x14]
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
beq _0805EA42
b _0805E906
_0805EA42:
ldr r0, _0805EA58
ldr r0, [r0]
ldr r2, _0805EA5C
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _0805EA94
b _0805E906
.align 2, 0
_0805EA54: .4byte gUnknown_80F4448
_0805EA58: .4byte gUnknown_203B418
_0805EA5C: .4byte 0x0001820f
_0805EA60:
mov r3, r8
cmp r3, 0
beq _0805EA6A
cmp r4, 0
bne _0805EA94
_0805EA6A:
ldr r0, [r5, 0x14]
cmp r0, 0
beq _0805EA94
bl sub_80450F8
cmp r0, 0x2
bne _0805EA94
ldr r0, [r5, 0x14]
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
beq _0805EA84
b _0805E906
_0805EA84:
ldr r0, _0805EAA0
ldr r0, [r0]
ldr r1, _0805EAA4
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0805EA94
b _0805E906
_0805EA94:
mov r2, r8
cmp r2, 0
beq _0805EAA8
cmp r4, 0
bne _0805EAD6
b _0805EAAC
.align 2, 0
_0805EAA0: .4byte gUnknown_203B418
_0805EAA4: .4byte 0x0001820f
_0805EAA8:
cmp r4, 0
beq _0805EAD6
_0805EAAC:
ldr r0, [sp, 0x4]
cmp r0, r7
bne _0805EAB8
ldr r0, [sp, 0x10]
cmp r0, r6
beq _0805EAD6
_0805EAB8:
mov r0, r9
adds r1, r7, 0
adds r2, r6, 0
bl sub_805EC2C
lsls r0, 24
cmp r0, 0
bne _0805EAD6
ldr r3, [sp, 0x20]
cmp r3, 0xFF
beq _0805EAD6
ldrb r5, [r5, 0x9]
cmp r3, r5
beq _0805EAD6
b _0805E906
_0805EAD6:
adds r6, 0x1
adds r4, 0x1
cmp r4, 0x1
bgt _0805EAE0
b _0805E9C8
_0805EAE0:
movs r4, 0x1
add r8, r4
mov r5, r8
cmp r5, 0x1
bgt _0805EAEC
b _0805E9BC
_0805EAEC:
movs r0, 0x1
ldr r1, [sp, 0x18]
ands r0, r1
cmp r0, 0
beq _0805EAF8
b _0805EC18
_0805EAF8:
cmp r1, 0
beq _0805EB00
cmp r1, 0x4
bne _0805EB8C
_0805EB00:
mov r4, r10
subs r4, 0x1
ldr r6, [sp, 0x1C]
subs r6, 0x1
mov r0, r9
adds r1, r4, 0
adds r2, r6, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
mov r8, r0
mov r0, r9
adds r1, r4, 0
ldr r2, [sp, 0x1C]
bl sub_805EC2C
lsls r0, 24
lsrs r7, r0, 24
ldr r5, [sp, 0x1C]
adds r5, 0x1
mov r0, r9
adds r1, r4, 0
adds r2, r5, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
adds r2, r6, 0
cmp r7, 0
bne _0805EB4C
mov r3, r8
cmp r3, 0
beq _0805EB46
b _0805E906
_0805EB46:
cmp r7, r0
beq _0805EB4C
b _0805E906
_0805EB4C:
mov r4, r10
adds r4, 0x1
mov r0, r9
adds r1, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
mov r8, r0
mov r0, r9
adds r1, r4, 0
ldr r2, [sp, 0x1C]
bl sub_805EC2C
lsls r0, 24
lsrs r7, r0, 24
mov r0, r9
adds r1, r4, 0
adds r2, r5, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
cmp r7, 0
bne _0805EC18
mov r4, r8
cmp r4, 0
beq _0805EB86
b _0805E906
_0805EB86:
cmp r7, r0
beq _0805EC18
b _0805E906
_0805EB8C:
mov r6, r10
subs r6, 0x1
ldr r4, [sp, 0x1C]
subs r4, 0x1
mov r0, r9
adds r1, r6, 0
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
mov r8, r0
mov r0, r9
mov r1, r10
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r7, r0, 24
mov r5, r10
adds r5, 0x1
mov r0, r9
adds r1, r5, 0
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
adds r1, r6, 0
cmp r7, 0
bne _0805EBD8
mov r2, r8
cmp r2, 0
beq _0805EBD2
b _0805E906
_0805EBD2:
cmp r7, r0
beq _0805EBD8
b _0805E906
_0805EBD8:
ldr r4, [sp, 0x1C]
adds r4, 0x1
mov r0, r9
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
mov r8, r0
mov r0, r9
mov r1, r10
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r7, r0, 24
mov r0, r9
adds r1, r5, 0
adds r2, r4, 0
bl sub_805EC2C
lsls r0, 24
lsrs r0, 24
cmp r7, 0
bne _0805EC18
mov r3, r8
cmp r3, 0
beq _0805EC12
b _0805E906
_0805EC12:
cmp r7, r0
beq _0805EC18
b _0805E906
_0805EC18:
movs r0, 0x1
_0805EC1A:
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_805E874
thumb_func_start sub_805EC2C
sub_805EC2C:
push {lr}
sub sp, 0x4
lsls r1, 16
lsls r2, 16
lsrs r1, 16
orrs r1, r2
str r1, [sp]
mov r1, sp
bl sub_8070564
lsls r0, 24
lsrs r0, 24
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_805EC2C
thumb_func_start sub_805EC4C
sub_805EC4C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r5, r0, 0
lsls r1, 24
lsrs r1, 24
mov r10, r1
ldr r7, [r5, 0x70]
ldr r1, _0805ECC8
adds r0, r7, 0
adds r0, 0x46
ldrb r0, [r0]
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
ldrh r3, [r5, 0x4]
adds r1, r3
lsls r1, 16
ldrh r0, [r0, 0x2]
ldrh r3, [r5, 0x6]
adds r0, r3
lsls r0, 16
lsrs r2, r1, 16
orrs r2, r0
lsls r0, r2, 16
asrs r0, 16
asrs r1, r2, 16
bl sub_804954C
ldr r0, [r0, 0x10]
mov r8, r0
cmp r0, 0
bne _0805EC94
b _0805ED96
_0805EC94:
mov r0, r8
bl sub_80450F8
cmp r0, 0x1
bne _0805ED96
mov r0, r8
ldr r6, [r0, 0x70]
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _0805ECDC
ldrb r0, [r6, 0x8]
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bls _0805ECDC
adds r0, r6, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0805ECC2
cmp r0, 0x47
bne _0805ECCC
_0805ECC2:
movs r0, 0x1
b _0805ECCE
.align 2, 0
_0805ECC8: .4byte gUnknown_80F4448
_0805ECCC:
movs r0, 0
_0805ECCE:
cmp r0, 0
bne _0805ECDC
adds r0, r6, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0805ED96
_0805ECDC:
adds r0, r7, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x2
beq _0805ED96
cmp r0, 0x1
beq _0805ED96
cmp r0, 0x7
beq _0805ED96
cmp r0, 0x5
beq _0805ED96
cmp r0, 0x3
beq _0805ED96
cmp r0, 0x4
beq _0805ED96
adds r0, r6, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x2
beq _0805ED96
cmp r0, 0x1
beq _0805ED96
cmp r0, 0x7
beq _0805ED96
cmp r0, 0x5
beq _0805ED96
cmp r0, 0x3
beq _0805ED96
cmp r0, 0x4
beq _0805ED96
adds r0, r7, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _0805ED96
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _0805ED96
adds r0, r6, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0
beq _0805ED3E
cmp r0, 0x2
beq _0805ED3E
cmp r0, 0x4
bne _0805ED96
_0805ED3E:
adds r0, r7, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0
beq _0805ED50
cmp r0, 0x2
beq _0805ED50
cmp r0, 0x4
bne _0805ED96
_0805ED50:
mov r0, r8
movs r1, 0
bl sub_80570F4
lsls r0, 24
cmp r0, 0
bne _0805ED96
adds r4, r7, 0
adds r4, 0x46
ldrb r1, [r4]
adds r0, r5, 0
bl sub_8070F80
lsls r0, 24
mov r9, r4
cmp r0, 0
beq _0805ED96
mov r1, r10
cmp r1, 0
beq _0805EDA0
adds r1, r5, 0x4
mov r0, r8
bl sub_807049C
lsls r0, 24
cmp r0, 0
beq _0805EDA0
ldr r0, _0805ED9C
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0
bne _0805EDA0
_0805ED96:
movs r0, 0
b _0805EE1E
.align 2, 0
_0805ED9C: .4byte gUnknown_8100208
_0805EDA0:
adds r0, r7, 0
adds r0, 0x44
movs r1, 0x2
bl sub_8044C94
ldr r0, _0805EDC0
ldrh r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0805EDC4
adds r1, r7, 0
adds r1, 0x48
movs r0, 0
b _0805EDCA
.align 2, 0
_0805EDC0: .4byte gUnknown_20255F0
_0805EDC4:
adds r1, r7, 0
adds r1, 0x48
movs r0, 0x1
_0805EDCA:
strb r0, [r1]
ldrh r0, [r7]
movs r2, 0x80
lsls r2, 8
adds r5, r2, 0
movs r4, 0
orrs r0, r5
strh r0, [r7]
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x2
bl sub_8044C94
adds r0, r6, 0
adds r0, 0x48
strb r4, [r0]
mov r3, r9
ldrb r0, [r3]
adds r0, 0x4
movs r1, 0x7
ands r0, r1
adds r1, r6, 0
adds r1, 0x46
strb r0, [r1]
ldrh r0, [r6]
orrs r0, r5
strh r0, [r6]
mov r0, r8
ldrh r1, [r0, 0x4]
movs r2, 0xB6
lsls r2, 1
adds r0, r6, r2
strh r1, [r0]
mov r3, r8
ldrh r0, [r3, 0x6]
adds r2, 0x2
adds r1, r6, r2
strh r0, [r1]
ldr r0, _0805EE2C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xE]
_0805EE1E:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0805EE2C: .4byte gUnknown_203B418
thumb_func_end sub_805EC4C
thumb_func_start sub_805EE30
sub_805EE30:
push {r4-r7,lr}
mov r7, r8
push {r7}
bl sub_8083600
adds r5, r0, 0
cmp r5, 0
bne _0805EE42
b _0805EF52
_0805EE42:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0805EE4E
b _0805EF52
_0805EE4E:
adds r0, r5, 0
bl sub_8045128
adds r4, r0, 0
adds r0, r5, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0805EE82
ldr r0, [r5, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _0805EE82
adds r0, r5, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _0805EE82
adds r0, r5, 0x4
bl sub_804AE84
_0805EE82:
ldrh r1, [r4]
movs r0, 0x80
lsls r0, 2
ands r0, r1
cmp r0, 0
beq _0805EE96
ldr r0, _0805EEB0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x1]
_0805EE96:
ldr r4, [r4, 0x14]
cmp r4, 0
beq _0805EF52
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x5
bhi _0805EF52
lsls r0, 2
ldr r1, _0805EEB4
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0805EEB0: .4byte gUnknown_203B418
_0805EEB4: .4byte _0805EEB8
.align 2, 0
_0805EEB8:
.4byte _0805EF52
.4byte _0805EF52
.4byte _0805EED0
.4byte _0805EF2A
.4byte _0805EF52
.4byte _0805EF52
_0805EED0:
adds r0, r4, 0
bl sub_8045104
adds r6, r0, 0
movs r0, 0
mov r8, r0
movs r7, 0
adds r0, r5, 0
movs r1, 0x13
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0805EF00
adds r1, r4, 0
adds r1, 0x20
ldrb r0, [r1]
cmp r0, 0
bne _0805EF00
movs r0, 0x1
strb r0, [r1]
bl sub_8049ED4
movs r7, 0x1
_0805EF00:
ldrb r0, [r6, 0x1]
cmp r0, 0
beq _0805EF18
cmp r0, 0x1
beq _0805EF52
cmp r0, 0x2
bne _0805EF12
movs r1, 0x1
mov r8, r1
_0805EF12:
mov r0, r8
cmp r0, 0
beq _0805EF52
_0805EF18:
cmp r7, 0
bne _0805EF52
adds r1, r5, 0x4
adds r0, r5, 0
movs r2, 0
movs r3, 0x1
bl sub_807FE9C
b _0805EF52
_0805EF2A:
adds r0, r4, 0
bl sub_8045108
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0805EF44
adds r0, r5, 0x4
movs r1, 0x1
bl sub_8045DB4
b _0805EF52
_0805EF44:
ldr r0, _0805EF5C
ldr r0, [r0]
movs r1, 0xB8
lsls r1, 3
adds r0, r1
movs r1, 0x4
str r1, [r0]
_0805EF52:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0805EF5C: .4byte gUnknown_203B418
thumb_func_end sub_805EE30
thumb_func_start sub_805EF60
sub_805EF60:
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
bl sub_80696A8
adds r4, r0, 0
cmp r4, 0
beq _0805EF9E
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0805EF9E
adds r0, r5, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
beq _0805EF9E
ldr r1, [r4, 0x70]
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _0805EFA2
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _0805EFA2
ldrb r0, [r1, 0x8]
cmp r0, 0x1
beq _0805EFA2
_0805EF9E:
movs r0, 0
b _0805EFAE
_0805EFA2:
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x13
bl sub_8044C94
movs r0, 0x1
_0805EFAE:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_805EF60
thumb_func_start sub_805EFB4
sub_805EFB4:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
lsls r1, 24
lsrs r7, r1, 24
bl sub_8083654
adds r6, r0, 0
cmp r7, 0
beq _0805EFE2
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x4
bne _0805EFE2
adds r0, r6, 0
adds r0, 0x46
ldrb r1, [r0]
adds r1, 0x4
movs r2, 0x7
ands r1, r2
strb r1, [r0]
b _0805F020
_0805EFE2:
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
bne _0805F020
movs r0, 0x8
bl sub_8084100
adds r4, r0, 0
movs r5, 0
_0805EFF6:
cmp r7, 0
bne _0805F008
mov r0, r8
adds r1, r4, 0
bl sub_8070D6C
lsls r0, 24
cmp r0, 0
beq _0805F014
_0805F008:
movs r0, 0x7
ands r4, r0
adds r0, r6, 0
adds r0, 0x46
strb r4, [r0]
b _0805F020
_0805F014:
adds r4, 0x1
movs r0, 0x7
ands r4, r0
adds r5, 0x1
cmp r5, 0x7
ble _0805EFF6
_0805F020:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_805EFB4
thumb_func_start sub_805F02C
sub_805F02C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
ldr r5, _0805F058
ldr r0, [r5]
adds r0, 0xBC
ldr r7, [r0]
bl sub_8083600
mov r9, r0
ldr r0, [r7, 0x70]
mov r8, r0
mov r1, r9
ldr r4, [r1, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0805F060
ldr r0, _0805F05C
b _0805F08E
.align 2, 0
_0805F058: .4byte gUnknown_203B418
_0805F05C: .4byte gUnknown_80F9BD8
_0805F060:
movs r0, 0x2
bl sub_8047084
lsls r0, 24
cmp r0, 0
bne _0805F076
bl sub_807EF48
lsls r0, 24
cmp r0, 0
beq _0805F080
_0805F076:
ldr r0, _0805F07C
b _0805F08E
.align 2, 0
_0805F07C: .4byte gUnknown_80F9C08
_0805F080:
ldr r2, [r5]
ldr r3, _0805F098
adds r0, r2, r3
ldrb r1, [r0]
cmp r1, 0
beq _0805F0A0
ldr r0, _0805F09C
_0805F08E:
ldr r1, [r0]
adds r0, r7, 0
bl sub_805239C
b _0805F184
.align 2, 0
_0805F098: .4byte 0x0000066e
_0805F09C: .4byte gUnknown_80F9C2C
_0805F0A0:
ldr r5, _0805F114
adds r0, r2, r5
strb r1, [r0]
movs r0, 0x1
mov r2, r8
strb r0, [r2, 0x7]
strb r1, [r4, 0x7]
movs r6, 0
movs r3, 0x44
add r3, r8
mov r10, r3
adds r5, r4, 0
adds r5, 0x44
str r5, [sp]
adds r2, 0x64
str r2, [sp, 0x4]
adds r4, 0x64
str r4, [sp, 0x8]
ldr r3, _0805F118
movs r2, 0x1
_0805F0C8:
movs r0, 0x64
muls r0, r6
ldr r1, _0805F11C
adds r0, r1
ldr r1, [r3]
adds r4, r1, r0
movs r5, 0
ldrb r1, [r4]
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _0805F12A
movs r1, 0xA
ldrsh r0, [r4, r1]
str r2, [sp, 0xC]
str r3, [sp, 0x10]
bl sub_806A538
lsls r0, 24
ldr r2, [sp, 0xC]
ldr r3, [sp, 0x10]
cmp r0, 0
bne _0805F102
movs r5, 0xA
ldrsh r1, [r4, r5]
movs r0, 0x58
muls r1, r0
ldr r0, [r3]
adds r5, r0, r1
_0805F102:
mov r0, r8
ldrb r0, [r0, 0xA]
cmp r6, r0
bne _0805F120
strb r2, [r4, 0x2]
cmp r5, 0
beq _0805F12A
strb r2, [r5, 0x2]
b _0805F12A
.align 2, 0
_0805F114: .4byte 0x00000679
_0805F118: .4byte gUnknown_203B45C
_0805F11C: .4byte 0x00008df8
_0805F120:
movs r0, 0
strb r0, [r4, 0x2]
cmp r5, 0
beq _0805F12A
strb r0, [r5, 0x2]
_0805F12A:
adds r6, 0x1
cmp r6, 0x3
ble _0805F0C8
ldr r0, _0805F194
movs r4, 0
str r4, [r0]
mov r1, r10
ldr r0, [sp]
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
adds r0, r7, 0
bl sub_803F508
mov r0, r9
bl sub_8041AD0
bl sub_8083600
bl sub_8041AE0
ldr r0, _0805F198
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0805F19C
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
movs r0, 0
bl sub_807EC28
ldr r0, [sp, 0x4]
strb r4, [r0]
ldr r1, [sp, 0x8]
strb r4, [r1]
mov r0, r9
bl sub_806A6E8
adds r0, r7, 0
bl sub_806A6E8
_0805F184:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0805F194: .4byte gUnknown_203B450
_0805F198: .4byte gUnknown_202DF98
_0805F19C: .4byte gUnknown_80F9BB0
thumb_func_end sub_805F02C
thumb_func_start sub_805F1A0
sub_805F1A0:
push {lr}
bl sub_8083654
adds r0, 0x44
pop {r1}
bx r1
thumb_func_end sub_805F1A0
thumb_func_start sub_805F1AC
sub_805F1AC:
push {lr}
bl sub_8083654
adds r0, 0x44
ldrh r0, [r0]
pop {r1}
bx r1
thumb_func_end sub_805F1AC
thumb_func_start ShowFieldMenu
ShowFieldMenu:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
lsls r0, 24
lsls r1, 24
lsrs r2, r1, 24
lsrs r0, 24
str r0, [sp, 0xC]
ldr r0, _0805F208
ldr r1, [r0]
movs r0, 0xB8
lsls r0, 3
adds r1, r0
ldr r3, [r1]
mov r10, r3
movs r0, 0
str r0, [sp, 0x10]
mvns r0, r3
lsrs r0, 31
str r0, [sp, 0x14]
movs r0, 0x1
negs r0, r0
str r0, [r1]
cmp r3, 0
blt _0805F1F8
mov r1, r10
str r1, [sp, 0x10]
_0805F1F8:
cmp r2, 0
beq _0805F23C
ldr r0, _0805F20C
movs r1, 0x80
lsls r1, 1
bl sub_800C074
b _0805F240
.align 2, 0
_0805F208: .4byte gUnknown_203B418
_0805F20C: .4byte 0x00000137
_0805F210:
bl sub_8083600
movs r1, 0x1
bl sub_806675C
b _0805F226
_0805F21C:
bl sub_8083600
movs r1, 0x1
bl sub_806684C
_0805F226:
movs r0, 0x1
bl sub_8044C10
movs r0, 0x50
movs r1, 0x4D
bl sub_803E708
movs r0, 0
bl sub_8052210
b _0805F92A
_0805F23C:
bl sub_8083D44
_0805F240:
mov r2, r10
cmp r2, 0
bge _0805F2FA
movs r0, 0x1
bl sub_8044C10
ldr r0, _0805F388
movs r1, 0x1
negs r1, r1
str r1, [r0]
ldr r0, [sp, 0xC]
bl DrawFieldMenu
bl sub_8083600
movs r1, 0
bl sub_806A2BC
ldr r4, _0805F38C
ldr r5, _0805F390
adds r6, r4, 0
adds r6, 0x2A
_0805F26C:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1D
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _0805F290
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_0805F290:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0805F2A8
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_0805F2A8:
ldrh r1, [r5, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0805F2BC
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _0805F2D0
_0805F2BC:
ldr r0, _0805F394
movs r3, 0x18
ldrsh r1, [r4, r3]
adds r1, 0x1
adds r1, r0
ldrb r0, [r1]
cmp r0, 0x7
beq _0805F3A8
bl sub_8083D30
_0805F2D0:
ldrh r1, [r5, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0805F2E0
ldrb r0, [r6]
cmp r0, 0
beq _0805F26C
_0805F2E0:
bl sub_8083D30
movs r0, 0x1
negs r0, r0
_0805F2E8:
str r0, [sp, 0x10]
ldr r0, _0805F38C
bl AddMenuCursorSprite
movs r0, 0x1D
bl sub_803E46C
movs r1, 0x1
str r1, [sp, 0xC]
_0805F2FA:
ldr r2, [sp, 0x10]
mov r10, r2
cmp r2, 0x1
beq _0805F304
b _0805F428
_0805F304:
movs r0, 0x1
bl sub_8044C10
ldr r1, _0805F398
ldr r0, [sp, 0x4]
ands r0, r1
ldr r1, _0805F39C
ands r0, r1
movs r1, 0x80
lsls r1, 1
orrs r0, r1
ldr r1, _0805F3A0
ands r0, r1
ldr r1, _0805F3A4
ands r0, r1
str r0, [sp, 0x4]
bl sub_8083600
add r1, sp, 0x4
bl sub_805FD74
lsls r0, 24
cmp r0, 0
beq _0805F33A
movs r3, 0x1
negs r3, r3
mov r10, r3
_0805F33A:
add r0, sp, 0x4
bl sub_805FD3C
lsls r0, 24
cmp r0, 0
beq _0805F35C
bl sub_8083600
add r1, sp, 0x4
bl sub_805FD74
lsls r0, 24
cmp r0, 0
beq _0805F35C
movs r0, 0x1
bl sub_8044C10
_0805F35C:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0xC
bne _0805F3B2
bl sub_8083600
movs r1, 0
movs r2, 0xC
bl sub_8044D90
ldrb r2, [r0]
movs r1, 0x4
orrs r1, r2
strb r1, [r0]
bl sub_805F1A0
bl sub_8060D24
b _0805F412
.align 2, 0
_0805F388: .4byte gUnknown_202F260
_0805F38C: .4byte gUnknown_202EE10
_0805F390: .4byte gUnknown_20255F0
_0805F394: .4byte gUnknown_202749A
_0805F398: .4byte 0xffffff00
_0805F39C: .4byte 0xffff00ff
_0805F3A0: .4byte 0xff00ffff
_0805F3A4: .4byte 0x00ffffff
_0805F3A8:
bl sub_8083D08
movs r1, 0x18
ldrsh r0, [r4, r1]
b _0805F2E8
_0805F3B2:
cmp r0, 0x35
bne _0805F3D0
bl sub_8083600
movs r1, 0
movs r2, 0xD
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048A68
b _0805F40A
_0805F3D0:
cmp r0, 0x10
bne _0805F3EE
bl sub_8083600
movs r1, 0
movs r2, 0xE
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048950
b _0805F40A
_0805F3EE:
cmp r0, 0x2C
bne _0805F41A
bl sub_8083600
movs r1, 0
movs r2, 0xF
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048B9C
_0805F40A:
lsls r0, 24
cmp r0, 0
beq _0805F412
b _0805F72C
_0805F412:
movs r0, 0x1
bl sub_8044C10
b _0805F72C
_0805F41A:
cmp r0, 0x3C
bne _0805F420
b _0805F210
_0805F420:
cmp r0, 0x3D
bne _0805F426
b _0805F21C
_0805F426:
b _0805F72C
_0805F428:
ldr r2, [sp, 0x10]
cmp r2, 0x2
beq _0805F430
b _0805F52E
_0805F430:
movs r0, 0x1
bl sub_8044C10
bl sub_8083600
bl sub_8060E38
lsls r0, 24
cmp r0, 0
beq _0805F44A
movs r3, 0x1
negs r3, r3
mov r10, r3
_0805F44A:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1B
bne _0805F45E
bl sub_805F1A0
movs r1, 0
b _0805F4B2
_0805F45E:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1C
bne _0805F474
bl sub_805F1A0
bl sub_806752C
b _0805F4B6
_0805F474:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x34
bne _0805F48A
bl sub_805F1A0
bl sub_8067768
b _0805F4B6
_0805F48A:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1A
bne _0805F4A0
bl sub_805F1A0
bl sub_80615E8
b _0805F4B6
_0805F4A0:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x30
bne _0805F4BE
bl sub_805F1A0
movs r1, 0x1
_0805F4B2:
bl sub_8061A38
_0805F4B6:
movs r0, 0x1
bl sub_8044C10
b _0805F72C
_0805F4BE:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x19
beq _0805F4CC
b _0805F72C
_0805F4CC:
bl sub_805F1A0
bl sub_8062D8C
movs r6, 0
movs r4, 0
_0805F4D8:
ldr r0, _0805F518
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _0805F51C
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805F526
bl sub_805F1A0
ldrb r0, [r0, 0x4]
cmp r4, r0
bne _0805F524
ldr r0, _0805F520
str r6, [r0]
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
bne _0805F50C
b _0805F72C
_0805F50C:
adds r0, r5, 0
movs r1, 0
bl sub_806A2BC
b _0805F72C
.align 2, 0
_0805F518: .4byte gUnknown_203B418
_0805F51C: .4byte 0x0001357c
_0805F520: .4byte gUnknown_202F260
_0805F524:
adds r6, 0x1
_0805F526:
adds r4, 0x1
cmp r4, 0x3
ble _0805F4D8
b _0805F72C
_0805F52E:
ldr r3, [sp, 0x10]
cmp r3, 0
beq _0805F536
b _0805F73A
_0805F536:
movs r7, 0
movs r0, 0x1
bl sub_8044C10
movs r5, 0
b _0805F544
_0805F542:
adds r5, 0x1
_0805F544:
cmp r5, 0x3
bgt _0805F56C
ldr r0, _0805F600
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0805F604
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805F542
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0805F542
adds r7, r5, 0
_0805F56C:
movs r0, 0
bl sub_8044C10
_0805F572:
movs r6, 0
mov r9, r6
mov r8, r6
movs r5, 0
_0805F57A:
ldr r0, _0805F600
ldr r0, [r0]
lsls r1, r5, 2
ldr r3, _0805F604
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _0805F5A0
cmp r5, r7
bne _0805F59C
mov r9, r8
adds r6, r4, 0
_0805F59C:
movs r0, 0x1
add r8, r0
_0805F5A0:
adds r5, 0x1
cmp r5, 0x3
ble _0805F57A
cmp r6, 0
bne _0805F5B0
bl sub_8083600
adds r6, r0, 0
_0805F5B0:
adds r0, r6, 0
movs r1, 0
bl sub_806A2BC
adds r0, r6, 0x4
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
bl sub_8083654
adds r0, 0x48
strb r7, [r0]
movs r0, 0
bl sub_8044C10
mov r1, r8
str r1, [sp]
adds r0, r6, 0
movs r1, 0
movs r2, 0x1
mov r3, r9
bl sub_8062F90
lsls r0, 24
cmp r0, 0
beq _0805F5EE
movs r2, 0x1
negs r2, r2
mov r10, r2
_0805F5EE:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x6
bne _0805F63C
adds r4, r7, 0
movs r5, 0
b _0805F60A
.align 2, 0
_0805F600: .4byte gUnknown_203B418
_0805F604: .4byte 0x0001357c
_0805F608:
adds r5, 0x1
_0805F60A:
cmp r5, 0x3
bgt _0805F676
adds r7, 0x1
cmp r7, 0x3
ble _0805F616
movs r7, 0
_0805F616:
ldr r0, _0805F634
ldr r0, [r0]
lsls r1, r7, 2
ldr r3, _0805F638
adds r0, r3
adds r0, r1
ldr r6, [r0]
adds r0, r6, 0
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _0805F608
b _0805F676
.align 2, 0
_0805F634: .4byte gUnknown_203B418
_0805F638: .4byte 0x0001357c
_0805F63C:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x7
bne _0805F694
adds r4, r7, 0
movs r5, 0
b _0805F650
_0805F64E:
adds r5, 0x1
_0805F650:
cmp r5, 0x3
bgt _0805F676
subs r7, 0x1
cmp r7, 0
bge _0805F65C
movs r7, 0x3
_0805F65C:
ldr r0, _0805F68C
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _0805F690
adds r0, r2
adds r0, r1
ldr r6, [r0]
adds r0, r6, 0
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _0805F64E
_0805F676:
bl sub_8083654
adds r0, 0x48
strb r7, [r0]
cmp r4, r7
bne _0805F684
b _0805F572
_0805F684:
movs r0, 0
bl sub_8083CE0
b _0805F572
.align 2, 0
_0805F68C: .4byte gUnknown_203B418
_0805F690: .4byte 0x0001357c
_0805F694:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1D
bne _0805F6AA
bl sub_805F1A0
bl sub_80637E8
b _0805F56C
_0805F6AA:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1E
beq _0805F6C2
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x33
bne _0805F6CE
_0805F6C2:
bl sub_805F1A0
movs r1, 0
bl sub_8063A70
b _0805F56C
_0805F6CE:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1F
bne _0805F6E4
bl sub_805F1A0
bl sub_8063B54
b _0805F56C
_0805F6E4:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x20
bne _0805F6FA
bl sub_805F1A0
bl sub_8063BB4
b _0805F56C
_0805F6FA:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x21
bne _0805F712
bl sub_805F1A0
movs r1, 0
bl sub_8063CF0
b _0805F56C
_0805F712:
bl sub_8083600
movs r1, 0
bl sub_806A2BC
bl sub_8083600
adds r0, 0x4
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
_0805F72C:
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
beq _0805F738
b _0805F92A
_0805F738:
b _0805F904
_0805F73A:
ldr r3, [sp, 0x10]
cmp r3, 0x4
beq _0805F742
b _0805F8E0
_0805F742:
bl sub_8083600
movs r1, 0x4
ldrsh r2, [r0, r1]
movs r3, 0x6
ldrsh r1, [r0, r3]
adds r0, r2, 0
bl sub_804954C
ldr r4, [r0, 0x14]
cmp r4, 0
bne _0805F75C
b _0805F88C
_0805F75C:
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x3
beq _0805F768
b _0805F872
_0805F768:
movs r0, 0x1
bl sub_8044C10
ldr r1, _0805F7F0
ldr r0, [sp, 0x8]
ands r0, r1
ldr r1, _0805F7F4
ands r0, r1
movs r1, 0x80
lsls r1, 1
orrs r0, r1
ldr r1, _0805F7F8
ands r0, r1
movs r1, 0x80
lsls r1, 9
orrs r0, r1
ldr r1, _0805F7FC
ands r0, r1
adds r1, 0x1
orrs r0, r1
str r0, [sp, 0x8]
bl sub_8083600
add r4, sp, 0x8
adds r1, r4, 0
bl sub_805FD74
lsls r0, 24
adds r0, r4, 0
bl sub_805FD3C
lsls r0, 24
cmp r0, 0
beq _0805F7C2
bl sub_8083600
adds r1, r4, 0
bl sub_805FD74
lsls r0, 24
cmp r0, 0
beq _0805F7C2
movs r0, 0x1
bl sub_8044C10
_0805F7C2:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
adds r1, r0, 0
cmp r0, 0xC
bne _0805F800
bl sub_8083600
movs r1, 0
movs r2, 0x10
bl sub_8044D90
ldrb r2, [r0]
movs r1, 0x4
orrs r1, r2
strb r1, [r0]
bl sub_805F1A0
bl sub_8060D24
b _0805F840
.align 2, 0
_0805F7F0: .4byte 0xffffff00
_0805F7F4: .4byte 0xffff00ff
_0805F7F8: .4byte 0xff00ffff
_0805F7FC: .4byte 0x00ffffff
_0805F800:
cmp r0, 0x35
bne _0805F81E
bl sub_8083600
movs r1, 0
movs r2, 0x11
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048A68
b _0805F83A
_0805F81E:
cmp r0, 0x10
bne _0805F848
bl sub_8083600
movs r1, 0
movs r2, 0x12
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048950
_0805F83A:
lsls r0, 24
cmp r0, 0
bne _0805F8A8
_0805F840:
movs r0, 0x1
bl sub_8044C10
b _0805F8A8
_0805F848:
cmp r1, 0x2C
bne _0805F8A8
bl sub_8083600
movs r1, 0
movs r2, 0x13
bl sub_8044D90
adds r4, r0, 0
bl sub_8083600
adds r1, r4, 0
bl sub_8048B9C
lsls r0, 24
cmp r0, 0
bne _0805F8A8
movs r0, 0x1
bl sub_8044C10
b _0805F8A8
_0805F872:
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x2
bne _0805F8CE
movs r0, 0x1
bl sub_8044C10
bl sub_8083600
bl sub_80643AC
b _0805F8A8
_0805F88C:
ldrh r0, [r0]
movs r2, 0x80
lsls r2, 2
adds r1, r2, 0
ands r0, r1
cmp r0, 0
beq _0805F8B4
movs r0, 0x1
bl sub_8044C10
bl sub_8083600
bl sub_80647F0
_0805F8A8:
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
bne _0805F92A
b _0805F8CE
_0805F8B4:
bl sub_8083600
adds r1, r0, 0
ldr r0, _0805F8D8
movs r2, 0
bl sub_8045B94
ldr r0, _0805F8DC
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0805F8CE:
movs r3, 0x1
negs r3, r3
mov r10, r3
b _0805F904
.align 2, 0
_0805F8D8: .4byte gUnknown_202DF98
_0805F8DC: .4byte gUnknown_80FDE18
_0805F8E0:
ldr r0, [sp, 0x10]
cmp r0, 0x3
bne _0805F904
bl sub_8064BE0
ldr r0, _0805F91C
ldr r0, [r0]
ldrb r0, [r0, 0x4]
cmp r0, 0
bne _0805F92A
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
bne _0805F92A
movs r1, 0x1
negs r1, r1
mov r10, r1
_0805F904:
ldr r2, [sp, 0x10]
cmp r2, 0
blt _0805F92A
ldr r3, [sp, 0x14]
cmp r3, 0
bne _0805F920
bl sub_80048D0
bl sub_8004914
b _0805F240
.align 2, 0
_0805F91C: .4byte gUnknown_203B418
_0805F920:
bl sub_8083600
movs r1, 0
bl sub_806A2BC
_0805F92A:
movs r0, 0
movs r1, 0
bl sub_803EAF0
bl sub_80048D0
bl sub_8004914
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end ShowFieldMenu
thumb_func_start DrawFieldMenu
DrawFieldMenu:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x10
lsls r0, 24
lsrs r5, r0, 24
ldr r4, _0805F994
movs r0, 0
strh r0, [r4, 0x18]
movs r1, 0x5
strh r1, [r4, 0x1A]
strh r1, [r4, 0x1C]
strh r0, [r4, 0x1E]
strh r0, [r4, 0x4]
movs r1, 0x2
strh r1, [r4, 0x6]
strh r0, [r4, 0xC]
strh r0, [r4, 0xE]
str r0, [r4]
strh r0, [r4, 0x14]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
adds r0, r4, 0
movs r1, 0x38
bl sub_80137B0
cmp r5, 0
beq _0805F998
movs r0, 0x7
movs r1, 0
bl sub_803EAF0
b _0805F9A0
.align 2, 0
_0805F994: .4byte gUnknown_202EE10
_0805F998:
movs r0, 0x6
movs r1, 0
bl sub_803EAF0
_0805F9A0:
movs r0, 0
bl sub_80073B8
bl sub_8083600
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _0805F9CC
ldr r0, _0805F9C8
movs r2, 0x2
strb r2, [r0, 0x1]
strb r2, [r0, 0x2]
strb r2, [r0, 0x3]
movs r1, 0x7
strb r1, [r0, 0x4]
strb r2, [r0, 0x5]
b _0805F9DA
.align 2, 0
_0805F9C8: .4byte gUnknown_202749A
_0805F9CC:
ldr r1, _0805FBA0
movs r0, 0x7
strb r0, [r1, 0x1]
strb r0, [r1, 0x2]
strb r0, [r1, 0x3]
strb r0, [r1, 0x4]
strb r0, [r1, 0x5]
_0805F9DA:
ldr r4, _0805FBA4
adds r0, r4, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
ldr r0, _0805FBA8
ldr r2, [r0]
movs r6, 0
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
adds r0, r4, 0
movs r1, 0x1
bl sub_8013800
adds r1, r0, 0
ldr r0, _0805FBAC
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
adds r0, r4, 0
movs r1, 0x2
bl sub_8013800
adds r1, r0, 0
ldr r0, _0805FBB0
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
adds r0, r4, 0
movs r1, 0x3
bl sub_8013800
adds r1, r0, 0
ldr r0, _0805FBB4
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
adds r0, r4, 0
movs r1, 0x4
bl sub_8013800
adds r1, r0, 0
ldr r0, _0805FBB8
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl xxx_call_draw_string
movs r0, 0
bl sub_80073E0
cmp r5, 0
bne _0805FA62
b _0805FB92
_0805FA62:
bl sub_8083600
ldr r7, [r0, 0x70]
bl sub_805317C
adds r5, r0, 0
bl sub_8008ED0
movs r4, 0x88
subs r4, r0
lsrs r0, r4, 31
adds r4, r0
asrs r4, 1
movs r0, 0x1
bl sub_80073B8
str r6, [sp]
adds r0, r4, 0
movs r1, 0x2
adds r2, r5, 0
movs r3, 0x1
bl xxx_call_draw_string
movs r0, 0x1
bl sub_80073E0
movs r0, 0x2
bl sub_80073B8
ldr r0, _0805FBBC
ldr r0, [r0]
add r2, sp, 0x8
add r3, sp, 0xC
add r1, sp, 0x4
bl DeconstructPlayTime
movs r1, 0x9E
lsls r1, 1
adds r0, r7, r1
ldr r0, [r0]
bl sub_8094450
ldr r4, _0805FBC0
str r0, [r4]
movs r2, 0xA0
lsls r2, 1
adds r0, r7, r2
ldr r0, [r0]
bl sub_8094450
str r0, [r4, 0x4]
ldr r0, _0805FBC4
ldr r2, [r0]
str r6, [sp]
movs r0, 0x73
movs r1, 0
movs r3, 0x2
bl sub_8014FF0
ldr r0, _0805FBC8
ldr r0, [r0]
movs r1, 0x98
lsls r1, 2
adds r0, r1
ldr r0, [r0]
str r0, [r4]
ldr r0, _0805FBCC
ldr r2, [r0]
str r6, [sp]
movs r0, 0x73
movs r1, 0xC
movs r3, 0x2
bl sub_8014FF0
ldr r5, _0805FBD0
movs r0, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_807EA18
ldr r0, _0805FBD4
ldr r2, [r0]
str r6, [sp]
movs r0, 0x73
movs r1, 0x18
movs r3, 0x2
bl sub_8014FF0
ldr r0, [sp, 0x4]
str r0, [r4]
ldr r0, [sp, 0x8]
str r0, [r4, 0x4]
ldr r0, [sp, 0xC]
str r0, [r4, 0x8]
ldr r0, _0805FBD8
ldr r2, [r0]
str r6, [sp]
movs r0, 0x73
movs r1, 0x24
movs r3, 0x2
bl sub_8014FF0
movs r7, 0
mov r8, r4
_0805FB3A:
ldr r0, _0805FBDC
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0805FBE0
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0805FB86
ldr r4, [r5, 0x70]
ldr r0, _0805FBD0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
movs r1, 0xE
ldrsh r0, [r4, r1]
mov r2, r8
str r0, [r2]
movs r1, 0x10
ldrsh r0, [r4, r1]
str r0, [r2, 0x4]
ldr r0, _0805FBE4
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x4
adds r1, r7, 0
movs r3, 0x2
bl sub_8014FF0
adds r7, 0xC
cmp r7, 0x2F
bgt _0805FB8C
_0805FB86:
adds r6, 0x1
cmp r6, 0x3
ble _0805FB3A
_0805FB8C:
movs r0, 0x2
bl sub_80073E0
_0805FB92:
add sp, 0x10
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0805FBA0: .4byte gUnknown_202749A
_0805FBA4: .4byte gUnknown_202EE10
_0805FBA8: .4byte gUnknown_80FE988
_0805FBAC: .4byte gUnknown_80FE998
_0805FBB0: .4byte gUnknown_80FE9A8
_0805FBB4: .4byte gUnknown_80FE9B8
_0805FBB8: .4byte gUnknown_80FE9C8
_0805FBBC: .4byte gUnknown_203B47C
_0805FBC0: .4byte gUnknown_202DE30
_0805FBC4: .4byte gUnknown_80F9174
_0805FBC8: .4byte gUnknown_203B460
_0805FBCC: .4byte gUnknown_80F9190
_0805FBD0: .4byte gUnknown_202DF98
_0805FBD4: .4byte gUnknown_80F91A8
_0805FBD8: .4byte gUnknown_80F91C8
_0805FBDC: .4byte gUnknown_203B418
_0805FBE0: .4byte 0x0001357c
_0805FBE4: .4byte gUnknown_80F91E0
thumb_func_end DrawFieldMenu
thumb_func_start sub_805FBE8
sub_805FBE8:
push {r4,r5,lr}
adds r5, r0, 0
movs r0, 0x8
adds r1, r5, 0
bl sub_803EAF0
_0805FBF4:
movs r0, 0xE
bl sub_803E46C
bl xxx_draw_string_80144C4
bl sub_8016080
adds r4, r0, 0
cmp r4, 0
beq _0805FBF4
bl sub_80160D8
movs r0, 0xE
bl sub_803E46C
movs r0, 0
movs r1, 0
bl sub_803EAF0
cmp r4, 0x3
bne _0805FC28
ldrb r0, [r5]
cmp r0, 0
beq _0805FC28
movs r0, 0x1
b _0805FC2A
_0805FC28:
movs r0, 0
_0805FC2A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_805FBE8
thumb_func_start sub_805FC30
sub_805FC30:
push {r4-r6,lr}
sub sp, 0x78
adds r4, r0, 0
adds r6, r1, 0
add r5, sp, 0x4
adds r0, r5, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r3, 0x3
str r3, [sp, 0x8]
str r3, [sp, 0x20]
movs r2, 0
movs r0, 0x16
strh r0, [r5, 0x20]
movs r1, 0x4
strh r1, [r5, 0x22]
movs r0, 0x6
strh r0, [r5, 0x24]
strh r1, [r5, 0x26]
strh r1, [r5, 0x28]
str r3, [sp, 0x38]
str r3, [sp, 0x50]
add r0, sp, 0x4
ldm r4!, {r1,r3,r5}
stm r0!, {r1,r3,r5}
ldm r4!, {r1,r3,r5}
stm r0!, {r1,r3,r5}
add r1, sp, 0x4
movs r0, 0x80
strb r0, [r1]
ldr r4, _0805FD30
strh r2, [r4, 0x18]
ldr r5, _0805FD34
ldr r0, [r5]
strh r0, [r4, 0x1C]
strh r0, [r4, 0x1A]
strh r2, [r4, 0x1E]
strh r2, [r4, 0x20]
strh r2, [r4, 0x4]
strh r2, [r4, 0x6]
movs r0, 0x1
str r0, [r4]
strh r2, [r4, 0xC]
strh r2, [r4, 0xE]
ldr r0, [r4, 0x8]
str r0, [r4, 0x14]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
add r0, sp, 0x4
strh r6, [r0, 0x20]
adds r1, r0, 0
movs r0, 0x1C
subs r0, r6
strh r0, [r1, 0x24]
movs r1, 0x1C
ldrsh r0, [r4, r1]
movs r1, 0
bl sub_80095E4
add r2, sp, 0x4
adds r1, r2, 0
strh r0, [r1, 0x28]
strh r0, [r2, 0x26]
adds r0, r1, 0
movs r1, 0
bl sub_803ECB4
add r0, sp, 0x4
movs r2, 0x26
ldrsh r1, [r0, r2]
lsls r1, 3
adds r0, r4, 0
bl sub_80137B0
movs r0, 0x1
bl sub_80073B8
movs r6, 0
ldr r0, [r5]
cmp r6, r0
bge _0805FD20
add r5, sp, 0x64
_0805FCDC:
adds r0, r6, 0
bl sub_8044F3C
lsls r0, 24
movs r4, 0x2
cmp r0, 0
beq _0805FCEC
movs r4, 0x7
_0805FCEC:
adds r0, r6, 0
bl sub_8044EC8
adds r3, r0, 0
adds r0, r5, 0
ldr r1, _0805FD38
adds r2, r4, 0
bl sub_800D158
ldr r0, _0805FD30
adds r1, r6, 0
bl sub_8013800
adds r1, r0, 0
movs r0, 0
str r0, [sp]
movs r0, 0x8
adds r2, r5, 0
movs r3, 0x1
bl xxx_call_draw_string
adds r6, 0x1
ldr r0, _0805FD34
ldr r0, [r0]
cmp r6, r0
blt _0805FCDC
_0805FD20:
movs r0, 0x1
bl sub_80073E0
add sp, 0x78
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0805FD30: .4byte gUnknown_202EE10
_0805FD34: .4byte gUnknown_202EE6C
_0805FD38: .4byte gUnknown_8106B50
thumb_func_end sub_805FC30
thumb_func_start sub_805FD3C
sub_805FD3C:
push {r4,lr}
adds r4, r0, 0
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
adds r2, r0, 0
movs r1, 0
strb r1, [r4]
strb r1, [r4, 0x1]
strb r1, [r4, 0x2]
strb r1, [r4, 0x3]
cmp r2, 0xA
bne _0805FD5E
movs r0, 0x1
strb r0, [r4]
strb r0, [r4, 0x3]
_0805FD5E:
cmp r2, 0x3E
bne _0805FD6A
movs r0, 0x1
strb r0, [r4]
strb r1, [r4, 0x1]
strb r0, [r4, 0x3]
_0805FD6A:
ldrb r0, [r4]
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_805FD3C
thumb_func_start sub_805FD74
sub_805FD74:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xE4
mov r10, r0
adds r7, r1, 0
movs r0, 0
mov r9, r0
movs r1, 0x1
str r1, [sp, 0xD0]
movs r2, 0
str r2, [sp, 0xD4]
movs r5, 0
str r5, [sp, 0xD8]
str r0, [sp, 0xDC]
mov r1, r10
ldr r1, [r1, 0x70]
str r1, [sp, 0xE0]
add r4, sp, 0x68
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x6C]
add r0, sp, 0x70
movs r6, 0
movs r1, 0x2
strh r1, [r0]
strh r1, [r0, 0x2]
add r1, sp, 0x74
movs r0, 0x12
strh r0, [r1]
mov r0, sp
adds r0, 0x76
movs r1, 0x10
strh r1, [r0]
add r0, sp, 0x78
strh r1, [r0]
add r5, sp, 0xC8
str r5, [sp, 0x7C]
movs r1, 0x3
str r1, [sp, 0x84]
add r0, sp, 0x98
str r1, [r0, 0x4]
add r0, sp, 0xB0
str r1, [r0, 0x4]
add r0, sp, 0x8
adds r1, r4, 0
movs r2, 0x60
bl memcpy
ldr r0, _0805FE40
strb r6, [r0]
mov r2, r9
strh r2, [r0, 0x4]
strh r2, [r0, 0x6]
cmp r7, 0
beq _0805FE18
ldrb r1, [r7]
negs r0, r1
orrs r0, r1
lsrs r0, 31
str r0, [sp, 0xD8]
ldrb r1, [r7, 0x1]
negs r0, r1
orrs r0, r1
lsrs r0, 31
str r0, [sp, 0xD0]
ldrb r1, [r7, 0x2]
negs r0, r1
orrs r0, r1
lsrs r0, 31
str r0, [sp, 0xD4]
ldrb r1, [r7, 0x3]
negs r0, r1
orrs r0, r1
lsrs r0, 31
str r0, [sp, 0xDC]
_0805FE18:
ldr r0, _0805FE44
mov r5, r10
str r5, [sp]
ldr r1, [sp, 0xD4]
ldr r2, [sp, 0xD0]
ldr r3, [sp, 0xDC]
bl sub_8060D64
ldr r1, _0805FE48
str r0, [r1]
cmp r0, 0
bne _0805FEA6
ldr r0, _0805FE4C
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
movs r0, 0x1
b _080603BE
.align 2, 0
_0805FE40: .4byte gUnknown_202F238
_0805FE44: .4byte gUnknown_202F248
_0805FE48: .4byte gUnknown_202F258
_0805FE4C: .4byte gUnknown_80F8B24
_0805FE50:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x1
mov r9, r0
b _0806039C
_0805FE5E:
ldr r0, [sp, 0xE0]
adds r0, 0x44
movs r1, 0xC
bl sub_8044C94
ldr r0, _0805FE78
ldr r1, [r0, 0x4]
ldr r0, [r0]
ldr r2, [sp, 0xE0]
str r0, [r2, 0x48]
str r1, [r2, 0x4C]
b _0805FE88
.align 2, 0
_0805FE78: .4byte gUnknown_202F238
_0805FE7C:
ldr r0, _0805FE98
ldr r1, [r0, 0x4]
ldr r0, [r0]
ldr r2, [sp, 0xE0]
str r0, [r2, 0x50]
str r1, [r2, 0x54]
_0805FE88:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r5, 0
mov r9, r5
b _0806039C
.align 2, 0
_0805FE98: .4byte gUnknown_202F238
_0805FE9C:
ldr r1, [r1]
ldr r0, [sp, 0xE0]
adds r0, 0x50
strb r1, [r0]
b _0806033C
_0805FEA6:
movs r1, 0
mov r8, r1
ldr r0, _0805FFA8
mov r2, r9
str r2, [r0]
_0805FEB0:
movs r5, 0
mov r9, r5
movs r4, 0
ldr r6, _0805FFAC
_0805FEB8:
lsls r1, r4, 2
ldr r0, [r6]
adds r2, r0, r1
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805FEEC
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0805FEEC
movs r0, 0xFB
ands r0, r1
strb r0, [r2]
adds r0, r4, 0
movs r1, 0xA
bl __divsi3
mov r8, r0
adds r0, r4, 0
movs r1, 0xA
bl __modsi3
ldr r1, _0805FFA8
str r0, [r1]
_0805FEEC:
adds r4, 0x1
cmp r4, 0x13
ble _0805FEB8
movs r6, 0
_0805FEF4:
ldr r0, _0805FFB0
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0805FFB4
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
adds r5, r6, 0x1
mov r12, r5
cmp r0, 0
beq _0805FF66
ldr r0, [r4, 0x70]
adds r2, r0, 0
adds r2, 0x60
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0805FF66
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0805FF66
movs r0, 0xFB
ands r0, r1
strb r0, [r2]
movs r4, 0
ldr r0, _0805FFB8
ldr r1, [r0]
adds r5, r0, 0
ldr r7, _0805FFA8
cmp r4, r1
bge _0805FF62
ldr r0, _0805FFBC
movs r2, 0
ldrsh r1, [r0, r2]
adds r3, r0, 0
adds r2, r6, 0x4
cmp r1, r2
beq _0805FF60
_0805FF4C:
adds r4, 0x1
ldr r0, [r5]
cmp r4, r0
bge _0805FF62
lsls r0, r4, 1
adds r0, r3
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, r2
bne _0805FF4C
_0805FF60:
mov r8, r4
_0805FF62:
movs r0, 0
str r0, [r7]
_0805FF66:
mov r6, r12
cmp r6, 0x3
ble _0805FEF4
add r2, sp, 0x8
str r2, [sp]
add r5, sp, 0xC8
str r5, [sp, 0x4]
mov r0, r8
mov r1, r10
ldr r2, [sp, 0xD8]
ldr r3, [sp, 0xD4]
bl sub_80603D8
ldr r1, _0805FFBC
ldr r0, _0805FFC0
movs r2, 0x1E
ldrsh r0, [r0, r2]
lsls r0, 1
adds r0, r1
movs r5, 0
ldrsh r2, [r0, r5]
cmp r2, 0x3
ble _0805FFE6
ldr r0, _0805FFB0
ldr r1, [r0]
subs r0, r2, 0x4
lsls r0, 2
ldr r2, _0805FFB4
adds r1, r2
adds r1, r0
ldr r4, [r1]
b _0805FFE8
.align 2, 0
_0805FFA8: .4byte gUnknown_202F240
_0805FFAC: .4byte gUnknown_203B460
_0805FFB0: .4byte gUnknown_203B418
_0805FFB4: .4byte 0x0001357c
_0805FFB8: .4byte gUnknown_202F258
_0805FFBC: .4byte gUnknown_202F248
_0805FFC0: .4byte gUnknown_202EE10
_0805FFC4:
bl sub_8083D44
mov r0, r10
adds r0, 0x4
bl sub_8060890
movs r5, 0x3
mov r9, r5
b _08060200
_0805FFD6:
bl sub_8083D08
ldr r0, [sp, 0xE0]
adds r0, 0x44
bl sub_8060CE8
movs r0, 0
b _080602F0
_0805FFE6:
mov r4, r10
_0805FFE8:
adds r0, r4, 0
movs r1, 0
bl sub_806A2BC
adds r0, r4, 0x4
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
ldr r6, _08060050
adds r7, r6, 0
adds r7, 0x2B
_08060002:
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x14
bl sub_803E46C
ldr r1, [sp, 0xD4]
cmp r1, 0
beq _08060016
b _080601F4
_08060016:
ldr r4, _08060054
ldr r0, [r4]
cmp r0, 0x1
ble _0806008C
ldr r0, _08060058
ldrh r1, [r0, 0x2]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08060034
adds r0, r6, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
beq _0806005C
_08060034:
movs r0, 0
bl sub_8083CE0
movs r2, 0x1
negs r2, r2
add r8, r2
mov r5, r8
cmp r5, 0
bge _0806007E
ldr r0, [r4]
subs r0, 0x1
mov r8, r0
b _0806007E
.align 2, 0
_08060050: .4byte gUnknown_202EE10
_08060054: .4byte gUnknown_202F258
_08060058: .4byte gUnknown_20255F0
_0806005C:
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0806006A
ldrb r0, [r7]
cmp r0, 0
beq _0806008C
_0806006A:
movs r0, 0
bl sub_8083CE0
movs r2, 0x1
add r8, r2
ldr r0, [r4]
cmp r8, r0
bne _0806007E
movs r5, 0
mov r8, r5
_0806007E:
ldr r0, [sp, 0xD4]
ldr r1, _08060088
str r0, [r1]
b _08060200
.align 2, 0
_08060088: .4byte gUnknown_202F240
_0806008C:
ldr r0, _08060134
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _080600B2
mov r0, r8
bl sub_8060860
lsls r0, 24
cmp r0, 0
beq _080600B2
movs r0, 0x1
bl sub_8083CE0
ldr r0, _08060138
movs r1, 0x1
bl sub_80136E0
_080600B2:
ldr r0, _08060134
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _080600D8
mov r0, r8
bl sub_8060860
lsls r0, 24
cmp r0, 0
beq _080600D8
movs r0, 0x1
bl sub_8083CE0
ldr r0, _08060138
movs r1, 0x1
bl sub_8013744
_080600D8:
ldr r0, _08060134
ldrh r2, [r0, 0x2]
movs r1, 0x4
ands r1, r2
adds r2, r0, 0
cmp r1, 0
beq _080601A0
ldr r4, _0806013C
mov r5, r8
lsls r0, r5, 1
adds r0, r4
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x1
bgt _080601A0
movs r7, 0x1
movs r0, 0x99
lsls r0, 1
bl sub_8083E38
bl sub_8047158
bl sub_80912C8
movs r0, 0
ldr r2, _08060140
str r0, [r2]
mov r5, r10
str r5, [sp]
add r0, sp, 0x68
ldr r1, [sp, 0xD4]
ldr r2, [sp, 0xD0]
ldr r3, [sp, 0xDC]
bl sub_8060D64
adds r3, r0, 0
ldr r0, _08060144
ldr r0, [r0]
cmp r0, r3
bne _08060164
movs r6, 0
cmp r6, r3
bge _0806015E
add r2, sp, 0x68
b _08060152
.align 2, 0
_08060134: .4byte gUnknown_20255F0
_08060138: .4byte gUnknown_202EE10
_0806013C: .4byte gUnknown_202F248
_08060140: .4byte gUnknown_202F240
_08060144: .4byte gUnknown_202F258
_08060148:
adds r4, 0x2
adds r2, 0x2
adds r6, 0x1
cmp r6, r3
bge _0806015E
_08060152:
movs r0, 0
ldrsh r1, [r2, r0]
movs r5, 0
ldrsh r0, [r4, r5]
cmp r1, r0
beq _08060148
_0806015E:
cmp r6, r3
bne _08060164
movs r7, 0
_08060164:
cmp r7, 0
beq _08060200
movs r0, 0
mov r8, r0
ldr r1, _08060194
str r0, [r1]
ldr r0, _08060198
str r3, [r0]
movs r6, 0
adds r5, r0, 0
cmp r6, r3
bge _08060200
adds r3, r5, 0
add r1, sp, 0x68
ldr r2, _0806019C
_08060182:
ldrh r0, [r1]
strh r0, [r2]
adds r1, 0x2
adds r2, 0x2
adds r6, 0x1
ldr r0, [r3]
cmp r6, r0
blt _08060182
b _08060200
.align 2, 0
_08060194: .4byte gUnknown_202F240
_08060198: .4byte gUnknown_202F258
_0806019C: .4byte gUnknown_202F248
_080601A0:
ldrh r1, [r2, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080601B6
ldr r2, _080601C8
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _080601CC
_080601B6:
bl sub_8083D08
mov r0, r10
adds r0, 0x4
bl sub_8060890
movs r2, 0x1
mov r9, r2
b _08060200
.align 2, 0
_080601C8: .4byte gUnknown_202EE10
_080601CC:
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080601D6
b _0805FFC4
_080601D6:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080601EA
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _080601EA
b _08060002
_080601EA:
bl sub_8083D30
movs r5, 0x2
mov r9, r5
b _08060200
_080601F4:
mov r0, r10
adds r0, 0x4
bl sub_8060890
movs r0, 0x1
mov r9, r0
_08060200:
ldr r4, _0806034C
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x14
bl sub_803E46C
ldr r1, _08060350
movs r2, 0x1E
ldrsh r0, [r4, r2]
lsls r0, 1
adds r0, r1
movs r5, 0
ldrsh r0, [r0, r5]
cmp r0, 0x1
bgt _08060232
ldr r0, _08060354
ldr r0, [r0]
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08060232
movs r0, 0x2
mov r9, r0
_08060232:
mov r1, r9
cmp r1, 0x2
bne _0806023A
b _0805FE50
_0806023A:
cmp r1, 0
bne _08060240
b _0805FEB0
_08060240:
cmp r1, 0x3
bne _08060246
b _0805FE5E
_08060246:
ldr r4, _0806034C
movs r2, 0x18
ldrsh r0, [r4, r2]
ldr r5, _08060358
str r0, [r5]
ldr r0, [sp, 0xD8]
cmp r0, 0
beq _08060258
b _0805FE7C
_08060258:
mov r0, r10
bl sub_8060900
movs r2, 0x1E
ldrsh r1, [r4, r2]
add r0, sp, 0xC8
bl sub_8060800
add r0, sp, 0x8
movs r1, 0x16
bl sub_805FC30
ldr r6, _0806035C
adds r7, r4, 0
adds r7, 0x2A
_08060276:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x14
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _0806029A
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_0806029A:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _080602B2
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_080602B2:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080602C6
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _080602DA
_080602C6:
movs r5, 0x18
ldrsh r0, [r4, r5]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _080602D6
b _0805FFD6
_080602D6:
bl sub_8083D30
_080602DA:
ldrh r1, [r6, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080602EA
ldrb r0, [r7]
cmp r0, 0
beq _08060276
_080602EA:
bl sub_8083D30
movs r0, 0x1
_080602F0:
mov r9, r0
ldr r0, _0806034C
bl AddMenuCursorSprite
movs r0, 0x14
bl sub_803E46C
ldr r0, _08060360
ldr r0, [r0]
ldr r1, _08060364
adds r0, r1
movs r1, 0
strb r1, [r0]
mov r2, r9
cmp r2, 0x1
bne _08060318
ldr r5, [sp, 0xD4]
cmp r5, 0
bne _08060318
b _0805FEB0
_08060318:
ldr r0, [sp, 0xE0]
adds r0, 0x44
ldrh r1, [r0]
adds r0, r1, 0
subs r0, 0x37
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bls _08060330
adds r0, r1, 0
cmp r0, 0x3E
bne _0806036C
_08060330:
ldr r0, _08060368
ldrb r0, [r0]
subs r0, 0x90
ldr r1, [sp, 0xE0]
adds r1, 0x48
strb r0, [r1]
_0806033C:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0
mov r9, r0
b _0806039C
.align 2, 0
_0806034C: .4byte gUnknown_202EE10
_08060350: .4byte gUnknown_202F248
_08060354: .4byte gUnknown_203B460
_08060358: .4byte gUnknown_202F240
_0806035C: .4byte gUnknown_20255F0
_08060360: .4byte gUnknown_203B418
_08060364: .4byte 0x00018212
_08060368: .4byte gUnknown_202F238
_0806036C:
cmp r0, 0x36
bne _08060390
add r0, sp, 0xCC
movs r1, 0x2
bl sub_8062978
add r1, sp, 0xCC
cmp r0, 0
beq _08060380
b _0805FE9C
_08060380:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x1
bl sub_8044C10
b _0805FEB0
_08060390:
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r1, 0
mov r9, r1
_0806039C:
ldr r0, _080603D0
ldr r0, [r0]
ldr r2, _080603D4
adds r0, r2
movs r1, 0
strb r1, [r0]
movs r0, 0x2
movs r1, 0x61
bl sub_803E708
bl sub_804AA60
movs r0, 0x2
movs r1, 0x61
bl sub_803E708
mov r0, r9
_080603BE:
add sp, 0xE4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080603D0: .4byte gUnknown_203B418
_080603D4: .4byte 0x00018212
thumb_func_end sub_805FD74
thumb_func_start sub_80603D8
sub_80603D8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x78
adds r7, r0, 0
mov r9, r1
ldr r6, [sp, 0x98]
ldr r0, [sp, 0x9C]
mov r8, r0
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x6C]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0x70]
add r1, sp, 0x4
ldr r0, _08060478
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
mov r0, r9
ldr r0, [r0, 0x70]
str r0, [sp, 0x74]
mov r0, r8
adds r1, r7, 0
bl sub_8060800
mov r10, r0
ldr r5, _0806047C
ldr r0, _08060480
ldr r0, [r0]
movs r4, 0
movs r1, 0
strh r0, [r5, 0x18]
strh r1, [r5, 0x1A]
strh r7, [r5, 0x1E]
ldr r0, _08060484
ldr r0, [r0]
strh r0, [r5, 0x20]
strh r1, [r5, 0x4]
str r1, [r5]
strh r1, [r5, 0x14]
adds r0, r5, 0
adds r0, 0x28
bl sub_801317C
ldr r3, _08060488
ldr r0, [r3]
ldr r2, _0806048C
adds r0, r2
strb r4, [r0]
ldr r1, _08060490
lsls r0, r7, 1
adds r0, r1
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x2
beq _08060494
cmp r0, 0x2
bgt _080604AA
cmp r0, 0
blt _080604AA
movs r1, 0x10
strh r1, [r6, 0x10]
strh r1, [r6, 0xE]
movs r0, 0xC
mov r4, r8
strb r0, [r4, 0x2]
strh r1, [r5, 0x6]
movs r0, 0xA
strh r0, [r5, 0x1C]
ldr r0, [r3]
adds r0, r2
movs r1, 0x1
strb r1, [r0]
b _080604C0
.align 2, 0
_08060478: .4byte gUnknown_8106B6C
_0806047C: .4byte gUnknown_202EE10
_08060480: .4byte gUnknown_202F240
_08060484: .4byte gUnknown_202F258
_08060488: .4byte gUnknown_203B418
_0806048C: .4byte 0x00018212
_08060490: .4byte gUnknown_202F248
_08060494:
movs r0, 0x4
strh r0, [r6, 0x10]
strh r0, [r6, 0xE]
movs r0, 0x6
mov r1, r8
strb r0, [r1, 0x2]
movs r0, 0x12
strh r0, [r5, 0x6]
movs r0, 0x1
strh r0, [r5, 0x1C]
b _080604C0
_080604AA:
movs r0, 0x4
strh r0, [r6, 0x10]
strh r0, [r6, 0xE]
movs r0, 0xC
mov r2, r8
strb r0, [r2, 0x2]
ldr r1, _080604DC
movs r0, 0x12
strh r0, [r1, 0x6]
movs r0, 0x1
strh r0, [r1, 0x1C]
_080604C0:
ldr r3, [sp, 0x6C]
cmp r3, 0
beq _080604E0
ldr r1, _080604DC
ldrh r0, [r1, 0xC]
adds r0, 0x40
strh r0, [r1, 0xC]
movs r0, 0xA
strh r0, [r6, 0x8]
adds r1, r6, 0
adds r1, 0x18
add r0, sp, 0x4
b _080604EC
.align 2, 0
_080604DC: .4byte gUnknown_202EE10
_080604E0:
movs r0, 0x2
strh r0, [r6, 0x8]
adds r1, r6, 0
adds r1, 0x18
adds r0, r6, 0
adds r0, 0x48
_080604EC:
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
adds r0, r6, 0
movs r1, 0x1
bl sub_803ECB4
ldr r1, _0806054C
ldr r5, _08060550
movs r4, 0
ldrsh r0, [r1, r4]
adds r0, 0x10
lsls r0, 3
movs r2, 0
mov r8, r2
strh r0, [r5, 0xC]
movs r3, 0x2
ldrsh r0, [r1, r3]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r5, 0xE]
adds r0, r5, 0
movs r1, 0x70
bl sub_80137B0
movs r0, 0
bl sub_80073B8
mov r4, r10
subs r0, r7, r4
lsls r0, 3
adds r6, r0, 0
adds r6, 0xC
ldr r0, _08060554
lsls r1, r7, 1
adds r0, r1, r0
movs r2, 0
ldrsh r0, [r0, r2]
adds r2, r1, 0
cmp r0, 0x1
beq _080605CC
cmp r0, 0x1
bgt _08060558
cmp r0, 0
beq _08060564
b _08060718
.align 2, 0
_0806054C: .4byte gUnknown_2027370
_08060550: .4byte gUnknown_202EE10
_08060554: .4byte gUnknown_202F248
_08060558:
cmp r0, 0x2
beq _0806063C
cmp r0, 0x3
bne _08060562
b _080606B0
_08060562:
b _08060718
_08060564:
ldr r0, _080605C0
ldr r2, [r0]
mov r3, r8
str r3, [sp]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8014FF0
movs r4, 0
adds r6, r5, 0
movs r7, 0
add r5, sp, 0x1C
_0806057E:
lsls r1, r4, 2
ldr r0, _080605C4
ldr r0, [r0]
adds r2, r1, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08060592
b _08060794
_08060592:
ldrh r0, [r6, 0x1A]
adds r0, 0x1
strh r0, [r6, 0x1A]
adds r0, r5, 0
adds r1, r2, 0
ldr r2, _080605C8
bl sub_8090E14
adds r0, r6, 0
adds r1, r4, 0
bl sub_8013800
adds r1, r0, 0
str r7, [sp]
movs r0, 0x8
adds r2, r5, 0
movs r3, 0
bl sub_8014FF0
adds r4, 0x1
cmp r4, 0x9
ble _0806057E
b _08060794
.align 2, 0
_080605C0: .4byte gUnknown_80FE90C
_080605C4: .4byte gUnknown_203B460
_080605C8: .4byte gUnknown_8106B60
_080605CC:
ldr r0, _08060630
ldr r2, [r0]
mov r4, r8
str r4, [sp]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8014FF0
movs r4, 0
adds r6, r5, 0
movs r7, 0
add r5, sp, 0x1C
_080605E6:
lsls r3, r4, 2
ldr r0, _08060634
ldr r2, [r0]
adds r0, r3, r2
adds r0, 0x28
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080605FC
b _08060794
_080605FC:
ldrh r0, [r6, 0x1A]
adds r0, 0x1
strh r0, [r6, 0x1A]
adds r1, r3, 0
adds r1, 0x28
adds r1, r2, r1
adds r0, r5, 0
ldr r2, _08060638
bl sub_8090E14
adds r0, r6, 0
adds r1, r4, 0
bl sub_8013800
adds r1, r0, 0
str r7, [sp]
movs r0, 0x8
adds r2, r5, 0
movs r3, 0
bl sub_8014FF0
adds r4, 0x1
cmp r4, 0x9
ble _080605E6
b _08060794
.align 2, 0
_08060630: .4byte gUnknown_80FE920
_08060634: .4byte gUnknown_203B460
_08060638: .4byte gUnknown_8106B60
_0806063C:
mov r1, r9
movs r2, 0x4
ldrsh r0, [r1, r2]
movs r3, 0x6
ldrsh r1, [r1, r3]
bl sub_804954C
ldr r0, [r0, 0x14]
bl sub_8045108
adds r7, r0, 0
ldr r0, _080606A8
ldr r2, [r0]
mov r4, r8
str r4, [sp]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060698
ldrh r0, [r5, 0x1A]
adds r0, 0x1
strh r0, [r5, 0x1A]
add r4, sp, 0x1C
ldr r2, _080606AC
adds r0, r4, 0
adds r1, r7, 0
bl sub_8090E14
adds r0, r5, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
mov r0, r8
str r0, [sp]
movs r0, 0x8
adds r2, r4, 0
movs r3, 0
bl sub_8014FF0
_08060698:
ldr r1, [sp, 0x70]
cmp r1, 0
beq _08060794
mov r2, r8
strh r2, [r5, 0xA]
strh r2, [r5, 0x8]
b _08060794
.align 2, 0
_080606A8: .4byte gUnknown_80FE92C
_080606AC: .4byte gUnknown_8106B60
_080606B0:
mov r3, r9
ldr r0, [r3, 0x70]
adds r7, r0, 0
adds r7, 0x60
ldr r0, _0806070C
ldr r1, [sp, 0x74]
movs r2, 0
bl sub_80708B4
ldr r0, _08060710
ldr r2, [r0]
mov r4, r8
str r4, [sp]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060794
ldrh r0, [r5, 0x1A]
adds r0, 0x1
strh r0, [r5, 0x1A]
add r4, sp, 0x1C
ldr r2, _08060714
adds r0, r4, 0
adds r1, r7, 0
bl sub_8090E14
adds r0, r5, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
mov r0, r8
str r0, [sp]
movs r0, 0x8
adds r2, r4, 0
movs r3, 0
bl sub_8014FF0
b _08060794
.align 2, 0
_0806070C: .4byte gUnknown_202DF98
_08060710: .4byte gUnknown_80FE940
_08060714: .4byte gUnknown_8106B60
_08060718:
ldr r0, _080607E0
ldr r1, [r0]
ldr r0, _080607E4
adds r0, r2, r0
movs r2, 0
ldrsh r0, [r0, r2]
subs r0, 0x4
lsls r0, 2
ldr r3, _080607E8
adds r1, r3
adds r1, r0
ldr r4, [r1]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08060794
ldr r1, [r4, 0x70]
adds r7, r1, 0
adds r7, 0x60
ldr r0, _080607EC
movs r2, 0
bl sub_80708B4
ldr r0, _080607F0
ldr r2, [r0]
movs r4, 0
mov r8, r4
str r4, [sp]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060794
ldr r4, _080607F4
ldrh r0, [r4, 0x1A]
adds r0, 0x1
strh r0, [r4, 0x1A]
add r5, sp, 0x1C
ldr r2, _080607F8
adds r0, r5, 0
adds r1, r7, 0
bl sub_8090E14
adds r0, r4, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
mov r0, r8
str r0, [sp]
movs r0, 0x8
adds r2, r5, 0
movs r3, 0
bl sub_8014FF0
_08060794:
ldr r2, _080607F4
movs r3, 0x18
ldrsh r1, [r2, r3]
movs r4, 0x1A
ldrsh r0, [r2, r4]
cmp r1, r0
blt _080607A6
movs r0, 0
strh r0, [r2, 0x18]
_080607A6:
movs r0, 0
bl sub_80073E0
ldr r0, [sp, 0x6C]
cmp r0, 0
beq _080607D0
movs r0, 0x1
bl sub_80073B8
ldr r0, _080607FC
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x4
movs r1, 0x2
movs r3, 0x1
bl sub_8014FF0
movs r0, 0x1
bl sub_80073E0
_080607D0:
add sp, 0x78
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080607E0: .4byte gUnknown_203B418
_080607E4: .4byte gUnknown_202F248
_080607E8: .4byte 0x0001357c
_080607EC: .4byte gUnknown_202DF98
_080607F0: .4byte gUnknown_80FE940
_080607F4: .4byte gUnknown_202EE10
_080607F8: .4byte gUnknown_8106B60
_080607FC: .4byte gUnknown_80FE94C
thumb_func_end sub_80603D8
thumb_func_start sub_8060800
sub_8060800:
push {r4-r7,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r1, 0
ldr r0, _0806083C
ldr r2, [r0]
mov r12, r0
ldr r6, _08060840
cmp r1, r2
bge _08060828
adds r3, r6, 0
_08060816:
movs r7, 0
ldrsh r0, [r3, r7]
cmp r0, 0x1
bgt _08060820
adds r1, 0x1
_08060820:
adds r3, 0x2
subs r2, 0x1
cmp r2, 0
bne _08060816
_08060828:
lsls r0, r4, 1
adds r0, r6
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0x1
bgt _08060844
adds r3, r4, 0
adds r2, r1, 0
movs r1, 0
b _0806084C
.align 2, 0
_0806083C: .4byte gUnknown_202F258
_08060840: .4byte gUnknown_202F248
_08060844:
subs r3, r4, r1
mov r7, r12
ldr r0, [r7]
subs r2, r0, r1
_0806084C:
cmp r5, 0
beq _08060858
movs r0, 0
strb r2, [r5]
strb r3, [r5, 0x1]
strb r0, [r5, 0x3]
_08060858:
adds r0, r1, 0
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8060800
thumb_func_start sub_8060860
sub_8060860:
push {lr}
adds r1, r0, 0
ldr r0, _08060880
movs r2, 0x1A
ldrsh r0, [r0, r2]
cmp r0, 0x1
ble _0806087C
ldr r0, _08060884
lsls r1, 1
adds r1, r0
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0x1
ble _08060888
_0806087C:
movs r0, 0
b _0806088A
.align 2, 0
_08060880: .4byte gUnknown_202EE10
_08060884: .4byte gUnknown_202F248
_08060888:
movs r0, 0x1
_0806088A:
pop {r1}
bx r1
thumb_func_end sub_8060860
thumb_func_start sub_8060890
sub_8060890:
push {r4,lr}
adds r3, r0, 0
ldr r1, _080608B4
ldr r2, _080608B8
movs r4, 0x1E
ldrsh r0, [r2, r4]
lsls r0, 1
adds r0, r1
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x1
beq _080608D0
cmp r0, 0x1
bgt _080608BC
cmp r0, 0
beq _080608C2
b _080608E8
.align 2, 0
_080608B4: .4byte gUnknown_202F248
_080608B8: .4byte gUnknown_202EE10
_080608BC:
cmp r0, 0x2
beq _080608DC
b _080608E8
_080608C2:
ldr r1, _080608CC
ldrb r0, [r2, 0x18]
adds r0, 0x1
b _080608EC
.align 2, 0
_080608CC: .4byte gUnknown_202F238
_080608D0:
ldr r1, _080608D8
ldrb r0, [r2, 0x18]
adds r0, 0xB
b _080608EC
.align 2, 0
_080608D8: .4byte gUnknown_202F238
_080608DC:
ldr r1, _080608E4
movs r0, 0x80
b _080608EC
.align 2, 0
_080608E4: .4byte gUnknown_202F238
_080608E8:
ldr r1, _080608FC
subs r0, 0x74
_080608EC:
strb r0, [r1]
ldrh r0, [r3]
strh r0, [r1, 0x4]
ldrh r0, [r3, 0x2]
strh r0, [r1, 0x6]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080608FC: .4byte gUnknown_202F238
thumb_func_end sub_8060890
thumb_func_start sub_8060900
sub_8060900:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r9, r0
ldr r4, _08060964
adds r1, r4, 0
movs r2, 0xA
bl sub_8044CC8
adds r7, r0, 0
mov r0, r9
ldr r0, [r0, 0x70]
mov r10, r0
ldr r1, _08060968
movs r0, 0
str r0, [r1]
ldrb r0, [r4]
cmp r0, 0x8F
bls _0806092C
b _08060BD0
_0806092C:
cmp r0, 0x80
bne _080609B0
ldrb r1, [r7, 0x2]
movs r0, 0x9
bl sub_8044F5C
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x6
beq _08060992
movs r2, 0
ldr r0, _0806096C
ldr r0, [r0]
ldr r1, _08060970
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08060978
ldr r0, _08060974
ldr r0, [r0]
adds r0, 0x4C
ldrb r0, [r0]
movs r2, 0x1
ands r2, r0
b _08060988
.align 2, 0
_08060964: .4byte gUnknown_202F238
_08060968: .4byte gUnknown_202EE6C
_0806096C: .4byte gUnknown_203B418
_08060970: .4byte 0x0000065b
_08060974: .4byte gUnknown_203B460
_08060978:
mov r0, r10
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060988
movs r2, 0x1
_08060988:
cmp r2, 0
beq _08060992
movs r0, 0x9
bl sub_8044FF0
_08060992:
ldr r0, _08060A20
ldrb r0, [r0]
cmp r0, 0x80
bne _080609B0
ldr r0, _08060A24
ldr r0, [r0]
ldr r2, _08060A28
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _080609B0
ldrb r1, [r7, 0x2]
movs r0, 0xA
bl sub_8044F5C
_080609B0:
adds r0, r7, 0
bl sub_8044DC8
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0
beq _080609E8
ldrb r1, [r7, 0x2]
adds r0, r4, 0
bl sub_8044F5C
ldrb r1, [r7]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080609D6
adds r0, r4, 0
bl sub_8044FF0
_080609D6:
adds r0, r7, 0
bl sub_8046F00
lsls r0, 24
cmp r0, 0
bne _080609E8
adds r0, r4, 0
bl sub_8044FF0
_080609E8:
ldr r0, _08060A20
ldrb r0, [r0]
cmp r0, 0x14
bhi _08060A6C
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
beq _08060A0A
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08060A6C
_08060A0A:
ldrb r1, [r7]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08060A3A
ldrb r1, [r7, 0x2]
movs r0, 0x3D
bl sub_8044F5C
b _08060A42
.align 2, 0
_08060A20: .4byte gUnknown_202F238
_08060A24: .4byte gUnknown_203B418
_08060A28: .4byte 0x0000065b
_08060A2C:
movs r0, 0x3C
bl sub_8044FF0
movs r0, 0x3D
bl sub_8044FF0
b _08060A6C
_08060A3A:
ldrb r1, [r7, 0x2]
movs r0, 0x3C
bl sub_8044F5C
_08060A42:
movs r3, 0
ldr r0, _08060AD4
ldr r2, [r0]
movs r4, 0x1
_08060A4A:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _08060A64
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08060A64
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _08060A2C
_08060A64:
adds r2, 0x4
adds r3, 0x1
cmp r3, 0x13
ble _08060A4A
_08060A6C:
ldr r0, _08060AD8
ldrb r0, [r0]
cmp r0, 0x81
beq _08060AE8
cmp r0, 0x80
beq _08060B3C
movs r3, 0
mov r8, r3
ldrb r1, [r7, 0x2]
movs r0, 0x36
bl sub_8044F5C
movs r6, 0
_08060A86:
ldr r0, _08060ADC
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08060AE0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08060ABE
ldr r0, [r4, 0x70]
ldr r3, _08060AE4
adds r5, r0, r3
movs r0, 0
strb r0, [r5]
adds r0, r4, 0
bl sub_8070C60
lsls r0, 24
cmp r0, 0
bne _08060ABE
movs r0, 0x1
mov r8, r0
mov r1, r8
strb r1, [r5]
_08060ABE:
adds r6, 0x1
cmp r6, 0x3
ble _08060A86
mov r2, r8
cmp r2, 0
bne _08060B3C
movs r0, 0x36
bl sub_8044FF0
b _08060B3C
.align 2, 0
_08060AD4: .4byte gUnknown_203B460
_08060AD8: .4byte gUnknown_202F238
_08060ADC: .4byte gUnknown_203B418
_08060AE0: .4byte 0x0001357c
_08060AE4: .4byte 0x00000157
_08060AE8:
ldr r0, _08060B10
ldr r0, [r0]
ldr r3, _08060B14
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _08060B3C
ldr r0, _08060B18
ldr r0, [r0]
adds r0, 0x4C
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060B1C
ldrb r1, [r7, 0x2]
movs r0, 0x3E
bl sub_8044F5C
b _08060B24
.align 2, 0
_08060B10: .4byte gUnknown_203B418
_08060B14: .4byte 0x0000065b
_08060B18: .4byte gUnknown_203B460
_08060B1C:
ldrb r1, [r7, 0x2]
movs r0, 0x37
bl sub_8044F5C
_08060B24:
mov r0, r9
bl sub_8070C60
lsls r0, 24
cmp r0, 0
beq _08060B3C
movs r0, 0x37
bl sub_8044FF0
movs r0, 0x3E
bl sub_8044FF0
_08060B3C:
ldr r0, _08060B64
ldrb r0, [r0]
cmp r0, 0x14
bhi _08060B78
mov r1, r9
movs r2, 0x4
ldrsh r0, [r1, r2]
movs r3, 0x6
ldrsh r1, [r1, r3]
bl sub_804954C
ldr r0, [r0, 0x14]
cmp r0, 0
bne _08060B68
ldrb r1, [r7, 0x2]
movs r0, 0x8
bl sub_8044F5C
b _08060B78
.align 2, 0
_08060B64: .4byte gUnknown_202F238
_08060B68:
bl sub_80450F8
cmp r0, 0x3
bne _08060B78
ldrb r1, [r7, 0x2]
movs r0, 0x3A
bl sub_8044F5C
_08060B78:
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
bne _08060B8E
ldrb r1, [r7, 0x2]
movs r0, 0x27
bl sub_8044F5C
b _08060BAE
_08060B8E:
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08060BA6
ldrb r1, [r7, 0x2]
movs r0, 0x41
bl sub_8044F5C
b _08060BAE
_08060BA6:
ldrb r1, [r7, 0x2]
movs r0, 0xB
bl sub_8044F5C
_08060BAE:
mov r0, r10
bl sub_8071A70
lsls r0, 24
cmp r0, 0
beq _08060BBC
b _08060CCC
_08060BBC:
movs r0, 0x27
bl sub_8044FF0
movs r0, 0x41
bl sub_8044FF0
movs r0, 0xB
bl sub_8044FF0
b _08060CCC
_08060BD0:
ldrb r1, [r4]
subs r1, 0x90
ldr r0, _08060C50
mov r9, r0
ldr r0, [r0]
lsls r1, 2
ldr r2, _08060C54
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08060CCC
ldr r3, [r4, 0x70]
mov r8, r3
movs r5, 0
adds r0, r4, 0
bl sub_8070C60
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r6, r1, 31
ldr r0, _08060C58
ldr r0, [r0]
adds r0, 0x4C
ldrb r0, [r0]
movs r4, 0x1
ands r4, r0
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x5
bne _08060C22
movs r5, 0x1
_08060C22:
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x9
bne _08060C32
movs r5, 0x1
_08060C32:
mov r1, r9
ldr r0, [r1]
ldr r2, _08060C5C
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _08060C78
cmp r4, 0
beq _08060C60
ldrb r1, [r7, 0x2]
movs r0, 0x3E
bl sub_8044F5C
b _08060C68
.align 2, 0
_08060C50: .4byte gUnknown_203B418
_08060C54: .4byte 0x0001357c
_08060C58: .4byte gUnknown_203B460
_08060C5C: .4byte 0x0000065b
_08060C60:
ldrb r1, [r7, 0x2]
movs r0, 0x37
bl sub_8044F5C
_08060C68:
cmp r6, 0
beq _08060C78
movs r0, 0x37
bl sub_8044FF0
movs r0, 0x3E
bl sub_8044FF0
_08060C78:
mov r3, r8
ldrb r0, [r3, 0x7]
cmp r0, 0
beq _08060CBA
adds r0, r7, 0
bl sub_8044DC8
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0
beq _08060CCC
ldrb r1, [r7, 0x2]
adds r0, r4, 0
bl sub_8044F5C
ldrb r1, [r7]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08060CA6
adds r0, r4, 0
bl sub_8044FF0
_08060CA6:
adds r0, r7, 0
bl sub_8046F00
lsls r0, 24
cmp r0, 0
bne _08060CCC
adds r0, r4, 0
bl sub_8044FF0
b _08060CCC
_08060CBA:
ldrb r1, [r7, 0x2]
movs r0, 0x38
bl sub_8044F5C
cmp r5, 0
beq _08060CCC
movs r0, 0x38
bl sub_8044FF0
_08060CCC:
ldrb r1, [r7, 0x2]
movs r0, 0xC
bl sub_8044F5C
bl sub_8045064
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8060900
thumb_func_start sub_8060CE8
sub_8060CE8:
push {r4,lr}
adds r4, r0, 0
ldr r1, _08060D18
ldr r0, _08060D1C
movs r2, 0x18
ldrsh r0, [r0, r2]
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
adds r0, r4, 0
bl sub_8044C94
ldr r0, _08060D20
ldr r1, [r0, 0x4]
ldr r0, [r0]
str r0, [r4, 0x4]
str r1, [r4, 0x8]
movs r0, 0
strb r0, [r4, 0xC]
strh r0, [r4, 0x10]
strh r0, [r4, 0x12]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08060D18: .4byte gUnknown_202EE44
_08060D1C: .4byte gUnknown_202EE10
_08060D20: .4byte gUnknown_202F238
thumb_func_end sub_8060CE8
thumb_func_start sub_8060D24
sub_8060D24:
push {r4,lr}
bl sub_8083600
movs r1, 0
movs r2, 0xB
bl sub_8044D90
adds r4, r0, 0
movs r0, 0
movs r1, 0
bl sub_803ECB4
adds r0, r4, 0
bl sub_801B3C0
_08060D42:
movs r0, 0x16
bl sub_803E46C
bl sub_801B410
cmp r0, 0
beq _08060D42
bl sub_801B450
movs r0, 0
movs r1, 0
bl sub_803EAF0
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8060D24
thumb_func_start sub_8060D64
sub_8060D64:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r4, r0, 0
lsls r1, 24
lsrs r6, r1, 24
lsls r2, 24
lsrs r2, 24
lsls r3, 24
lsrs r3, 24
mov r8, r3
movs r7, 0
ldr r0, _08060E28
ldr r0, [r0]
ldr r1, _08060E2C
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08060DB8
cmp r6, 0
bne _08060DB8
ldr r5, _08060E30
ldr r0, [r5]
ldrb r1, [r0]
movs r3, 0x1
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _08060DA2
strh r7, [r4]
movs r7, 0x1
_08060DA2:
ldr r0, [r5]
adds r0, 0x28
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _08060DB8
lsls r0, r7, 1
adds r0, r4
strh r3, [r0]
adds r7, 0x1
_08060DB8:
cmp r2, 0
beq _08060DD4
ldr r0, [sp, 0x18]
adds r0, 0x4
bl sub_804ACE4
lsls r0, 24
cmp r0, 0
beq _08060DD4
lsls r0, r7, 1
adds r0, r4
movs r1, 0x2
strh r1, [r0]
adds r7, 0x1
_08060DD4:
cmp r6, 0
bne _08060E1A
mov r2, r8
cmp r2, 0
bne _08060E1A
movs r5, 0
lsls r0, r7, 1
adds r6, r0, r4
_08060DE4:
ldr r0, _08060E28
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08060E34
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08060E14
ldr r0, [r4, 0x70]
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08060E14
adds r0, r5, 0x4
strh r0, [r6]
adds r6, 0x2
adds r7, 0x1
_08060E14:
adds r5, 0x1
cmp r5, 0x3
ble _08060DE4
_08060E1A:
adds r0, r7, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08060E28: .4byte gUnknown_203B418
_08060E2C: .4byte 0x0000065b
_08060E30: .4byte gUnknown_203B460
_08060E34: .4byte 0x0001357c
thumb_func_end sub_8060D64
thumb_func_start sub_8060E38
sub_8060E38:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x7C
str r0, [sp, 0x78]
add r4, sp, 0x18
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [r4, 0x4]
movs r0, 0x2
strh r0, [r4, 0x8]
strh r0, [r4, 0xA]
movs r0, 0xE
strh r0, [r4, 0xC]
movs r0, 0x10
strh r0, [r4, 0xE]
strh r0, [r4, 0x10]
ldr r0, _08061018
str r0, [r4, 0x14]
movs r0, 0x3
str r0, [r4, 0x1C]
str r0, [r4, 0x34]
str r0, [r4, 0x4C]
movs r5, 0
mov r9, r4
add r0, sp, 0x4
mov r8, r0
_08060E7A:
ldr r6, _0806101C
ldr r0, [r6]
lsls r1, r5, 2
ldr r2, _08061020
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08060E9E
ldr r0, [r4, 0x70]
ldr r2, _08061024
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
_08060E9E:
adds r5, 0x1
cmp r5, 0x3
ble _08060E7A
ldr r0, [r6]
ldr r1, _08061028
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _08060EBC
movs r0, 0x3
mov r2, r9
str r0, [r2, 0x4]
ldrh r0, [r2, 0xA]
adds r0, 0x1
strh r0, [r2, 0xA]
_08060EBC:
ldr r6, _0806102C
_08060EBE:
movs r7, 0
mov r0, sp
mov r1, r9
movs r2, 0x1
bl sub_8061130
movs r0, 0
mov r10, r0
_08060ECE:
movs r1, 0x18
ldrsh r0, [r6, r1]
lsls r0, 2
add r0, r8
ldr r1, [r0]
cmp r1, 0
blt _08060F00
ldr r0, _0806101C
ldr r0, [r0]
lsls r1, 2
ldr r2, _08061020
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
movs r1, 0
bl sub_806A2BC
adds r4, 0x4
adds r0, r4, 0
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
_08060F00:
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
ldr r4, _08061030
ldrh r1, [r4, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08060F26
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_80136E0
_08060F26:
ldrh r1, [r4, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08060F3E
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_8013744
_08060F3E:
ldrh r1, [r4, 0x2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08060F5A
movs r1, 0x18
ldrsh r0, [r6, r1]
add r1, sp, 0x14
adds r1, r0
ldrb r0, [r1]
cmp r0, 0
bne _08061046
bl sub_8083D30
_08060F5A:
ldrh r1, [r4, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08060F6C
ldr r2, _08061034
ldrb r0, [r2]
cmp r0, 0
beq _08060F7E
_08060F6C:
movs r1, 0x18
ldrsh r0, [r6, r1]
add r1, sp, 0x14
adds r1, r0
ldrb r0, [r1]
cmp r0, 0
bne _08061040
bl sub_8083D30
_08060F7E:
ldr r0, _08061030
ldrh r1, [r0, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08060F92
ldr r2, _08061038
ldrb r0, [r2]
cmp r0, 0
beq _08060ECE
_08060F92:
bl sub_8083D30
movs r7, 0x1
_08060F98:
ldr r5, _0806102C
movs r1, 0x18
ldrsh r0, [r5, r1]
lsls r0, 2
add r0, r8
ldr r1, [r0]
cmp r1, 0
blt _08060FCC
ldr r0, _0806101C
ldr r0, [r0]
lsls r1, 2
ldr r2, _08061020
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
movs r1, 0
bl sub_806A2BC
adds r4, 0x4
adds r0, r4, 0
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
_08060FCC:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
bl sub_804AA60
cmp r7, 0
beq _08060FE2
b _0806110C
_08060FE2:
movs r1, 0x18
ldrsh r0, [r5, r1]
str r0, [sp]
ldr r1, _0806103C
movs r2, 0x18
ldrsh r0, [r5, r2]
str r0, [r1]
mov r0, sp
bl sub_806145C
mov r0, r10
cmp r0, 0
beq _08061064
ldr r1, [sp, 0x78]
ldr r4, [r1, 0x70]
adds r0, r4, 0
adds r0, 0x44
movs r1, 0x1B
bl sub_8044C94
ldr r0, [sp]
lsls r0, 2
add r0, r8
ldr r0, [r0]
adds r4, 0x48
strb r0, [r4]
b _08061116
.align 2, 0
_08061018: .4byte gUnknown_202F270
_0806101C: .4byte gUnknown_203B418
_08061020: .4byte 0x0001357c
_08061024: .4byte 0x00000157
_08061028: .4byte 0x0000065b
_0806102C: .4byte gUnknown_202EE10
_08061030: .4byte gUnknown_20255F0
_08061034: .4byte gUnknown_202EE39
_08061038: .4byte gUnknown_202EE3A
_0806103C: .4byte gUnknown_202F260
_08061040:
bl sub_8083D08
b _08060F98
_08061046:
bl sub_8083D44
movs r2, 0x1
mov r10, r2
b _08060F98
_08061050:
ldr r1, [sp, 0x78]
ldr r0, [r1, 0x70]
adds r0, 0x44
mov r1, sp
bl sub_80615B4
bl sub_8083D08
movs r4, 0
b _080610EA
_08061064:
mov r0, r9
movs r1, 0x12
bl sub_805FC30
adds r4, r5, 0
ldr r5, _08061100
adds r7, r4, 0
adds r7, 0x2A
_08061074:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08061098
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08061098:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _080610B0
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_080610B0:
ldrh r1, [r5, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080610C2
ldr r2, _08061104
ldrb r0, [r2]
cmp r0, 0
beq _080610D4
_080610C2:
movs r1, 0x18
ldrsh r0, [r4, r1]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _08061050
bl sub_8083D30
_080610D4:
ldrh r1, [r5, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080610E4
ldrb r0, [r7]
cmp r0, 0
beq _08061074
_080610E4:
bl sub_8083D30
movs r4, 0x1
_080610EA:
ldr r0, _08061108
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
cmp r4, 0x1
bne _080610FC
b _08060EBE
_080610FC:
movs r7, 0
b _08061116
.align 2, 0
_08061100: .4byte gUnknown_20255F0
_08061104: .4byte gUnknown_202EE39
_08061108: .4byte gUnknown_202EE10
_0806110C:
bl sub_8083600
movs r1, 0
bl sub_806A2BC
_08061116:
movs r0, 0
movs r1, 0
bl sub_803EAF0
adds r0, r7, 0
add sp, 0x7C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8060E38
thumb_func_start sub_8061130
sub_8061130:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
mov r9, r0
mov r8, r1
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x8]
movs r7, 0
movs r1, 0
mov r2, r8
ldr r0, [r2, 0x4]
cmp r0, 0x6
bne _08061154
movs r1, 0x1
_08061154:
mov r10, r1
bl sub_8083600
adds r1, r0, 0
add r0, sp, 0x4
bl sub_8069D18
movs r6, 0
_08061164:
ldr r0, _08061318
ldr r0, [r0]
lsls r1, r6, 2
ldr r3, _0806131C
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080611AC
lsls r1, r7, 2
mov r0, r9
adds r0, 0x4
adds r0, r1
str r6, [r0]
ldr r0, [r4, 0x70]
mov r1, r9
adds r1, 0x14
adds r1, r7
ldr r5, _08061320
adds r0, r5
ldrb r0, [r0]
strb r0, [r1]
ldr r1, [sp, 0x4]
ldr r0, [r4, 0x4]
cmp r1, r0
bne _080611AA
ldr r1, _08061324
ldr r0, [r1]
cmp r0, 0
bge _080611AA
str r7, [r1]
_080611AA:
adds r7, 0x1
_080611AC:
adds r6, 0x1
cmp r6, 0x3
ble _08061164
ldr r0, _08061324
ldr r1, [r0]
adds r5, r0, 0
cmp r1, r7
blt _080611C0
subs r0, r7, 0x1
str r0, [r5]
_080611C0:
ldr r0, [r5]
cmp r0, 0
bge _080611CA
movs r0, 0
str r0, [r5]
_080611CA:
adds r6, r7, 0
mov r0, r10
negs r3, r0
cmp r7, 0x3
bgt _080611F4
movs r1, 0x1
negs r1, r1
mov r12, r1
mov r2, r9
adds r2, 0x14
movs r4, 0
lsls r0, r7, 2
adds r1, r0, 0x4
add r1, r9
_080611E6:
mov r0, r12
stm r1!, {r0}
adds r0, r2, r6
strb r4, [r0]
adds r6, 0x1
cmp r6, 0x3
ble _080611E6
_080611F4:
ldr r1, _08061328
movs r4, 0
movs r0, 0x1
strb r0, [r1]
strb r4, [r1, 0x1]
strb r4, [r1, 0x3]
ldr r0, _0806132C
ldr r1, [r5]
strh r1, [r0, 0x18]
strh r7, [r0, 0x1A]
strh r7, [r0, 0x1C]
strh r4, [r0, 0x1E]
strh r4, [r0, 0x20]
strh r4, [r0, 0x4]
mov r1, r10
orrs r3, r1
asrs r1, r3, 31
movs r2, 0x10
ands r1, r2
strh r1, [r0, 0x6]
strh r4, [r0, 0xC]
strh r4, [r0, 0xE]
strh r4, [r0, 0x14]
str r4, [r0]
adds r0, 0x28
bl sub_801317C
adds r0, r7, 0
movs r1, 0
bl sub_80095E4
mov r2, r10
cmp r2, 0
beq _0806123A
adds r0, 0x2
_0806123A:
mov r3, r8
strh r0, [r3, 0x10]
strh r0, [r3, 0xE]
movs r0, 0x8
ldr r5, _08061328
strb r0, [r5, 0x2]
ldr r0, [sp, 0x8]
cmp r0, 0
beq _0806125C
mov r1, r8
adds r1, 0x18
mov r0, r8
adds r0, 0x48
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
_0806125C:
mov r0, r8
movs r1, 0x1
bl sub_803ECB4
ldr r0, _0806132C
movs r1, 0
bl sub_80137B0
movs r0, 0
bl sub_80073B8
mov r0, r10
cmp r0, 0
beq _08061286
ldr r2, _08061330
str r4, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0
bl sub_8014FF0
_08061286:
movs r6, 0
cmp r6, r7
blt _0806128E
b _08061440
_0806128E:
lsls r1, r6, 2
mov r0, r9
adds r0, 0x4
adds r0, r1
ldr r1, [r0]
cmp r1, 0
bge _0806129E
b _08061438
_0806129E:
ldr r0, _08061318
ldr r0, [r0]
lsls r1, 2
ldr r2, _0806131C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080612BA
b _08061438
_080612BA:
ldr r5, [r4, 0x70]
mov r0, r9
adds r0, 0x14
adds r0, r6
ldrb r0, [r0]
movs r2, 0x2
cmp r0, 0
beq _080612CC
movs r2, 0x6
_080612CC:
ldr r4, _08061334
adds r0, r4, 0
adds r1, r5, 0
bl sub_8070968
ldr r0, _08061338
ldr r1, [r0]
ldrb r2, [r5, 0xA]
movs r0, 0x64
muls r0, r2
adds r1, r0
ldr r3, _0806133C
adds r1, r3
movs r2, 0
ldrsh r0, [r1, r2]
bl sub_806A538
lsls r0, 24
cmp r0, 0
beq _08061388
movs r3, 0x10
ldrsh r2, [r5, r3]
adds r1, r2, 0
cmp r2, 0
bge _08061300
adds r1, r2, 0x3
_08061300:
movs r3, 0xE
ldrsh r0, [r5, r3]
asrs r1, 2
cmp r0, r1
bgt _08061344
adds r0, r4, 0
adds r0, 0x50
ldr r1, _08061340
bl strcpy
b _080613EE
.align 2, 0
_08061318: .4byte gUnknown_203B418
_0806131C: .4byte 0x0001357c
_08061320: .4byte 0x00000157
_08061324: .4byte gUnknown_202F260
_08061328: .4byte gUnknown_202F270
_0806132C: .4byte gUnknown_202EE10
_08061330: .4byte gUnknown_8106BB0
_08061334: .4byte gUnknown_202DF98
_08061338: .4byte gUnknown_203B45C
_0806133C: .4byte 0x00008e02
_08061340: .4byte gUnknown_8106BB4
_08061344:
movs r0, 0xE
ldrsh r3, [r5, r0]
lsls r0, r1, 1
cmp r3, r0
bgt _08061360
adds r0, r4, 0
adds r0, 0x50
ldr r1, _0806135C
bl strcpy
b _080613EE
.align 2, 0
_0806135C: .4byte gUnknown_8106BB8
_08061360:
adds r0, r1
cmp r3, r0
bgt _08061378
adds r0, r4, 0
adds r0, 0x50
ldr r1, _08061374
bl strcpy
b _080613EE
.align 2, 0
_08061374: .4byte gUnknown_8106BBC
_08061378:
adds r0, r4, 0
adds r0, 0x50
ldr r1, _08061384
bl strcpy
b _080613EE
.align 2, 0
_08061384: .4byte gUnknown_8106BC0
_08061388:
movs r1, 0x10
ldrsh r2, [r5, r1]
adds r1, r2, 0
cmp r2, 0
bge _08061394
adds r1, r2, 0x3
_08061394:
movs r3, 0xE
ldrsh r0, [r5, r3]
asrs r1, 2
cmp r0, r1
bgt _080613B0
adds r0, r4, 0
adds r0, 0x50
ldr r1, _080613AC
bl strcpy
b _080613EE
.align 2, 0
_080613AC: .4byte gUnknown_8106BC4
_080613B0:
movs r0, 0xE
ldrsh r3, [r5, r0]
lsls r0, r1, 1
cmp r3, r0
bgt _080613CC
adds r0, r4, 0
adds r0, 0x50
ldr r1, _080613C8
bl strcpy
b _080613EE
.align 2, 0
_080613C8: .4byte gUnknown_8106BC8
_080613CC:
adds r0, r1
cmp r3, r0
bgt _080613E4
adds r0, r4, 0
adds r0, 0x50
ldr r1, _080613E0
bl strcpy
b _080613EE
.align 2, 0
_080613E0: .4byte gUnknown_8106BCC
_080613E4:
adds r0, r4, 0
adds r0, 0x50
ldr r1, _0806141C
bl strcpy
_080613EE:
ldr r0, _08061420
movs r2, 0xE
ldrsh r1, [r5, r2]
str r1, [r0]
movs r3, 0x10
ldrsh r1, [r5, r3]
str r1, [r0, 0x4]
ldr r0, _08061424
adds r1, r6, 0
bl sub_8013800
adds r1, r0, 0
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0806142C
movs r0, 0
str r0, [sp]
movs r0, 0x9
ldr r2, _08061428
movs r3, 0
bl sub_8014FF0
b _08061438
.align 2, 0
_0806141C: .4byte gUnknown_8106BD0
_08061420: .4byte gUnknown_202DE30
_08061424: .4byte gUnknown_202EE10
_08061428: .4byte gUnknown_8106BD4
_0806142C:
str r0, [sp]
movs r0, 0x9
ldr r2, _08061458
movs r3, 0
bl sub_8014FF0
_08061438:
adds r6, 0x1
cmp r6, r7
bge _08061440
b _0806128E
_08061440:
movs r0, 0
bl sub_80073E0
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08061458: .4byte gUnknown_8106BE0
thumb_func_end sub_8061130
thumb_func_start sub_806145C
sub_806145C:
push {r4-r6,lr}
ldr r2, _08061560
movs r1, 0
str r1, [r2]
ldr r5, _08061564
ldr r2, [r5]
ldr r1, _08061568
movs r3, 0x18
ldrsh r1, [r1, r3]
lsls r1, 2
adds r0, 0x4
adds r0, r1
ldr r0, [r0]
lsls r0, 2
ldr r1, _0806156C
adds r2, r1
adds r2, r0
ldr r6, [r2]
ldr r4, [r6, 0x70]
movs r0, 0x1B
movs r1, 0
bl sub_8044F5C
movs r0, 0x19
movs r1, 0
bl sub_8044F5C
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _080614C8
ldr r2, [r5]
ldr r3, _08061570
adds r0, r2, r3
ldrb r0, [r0]
cmp r0, 0
bne _080614C0
adds r0, r4, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _080614B8
ldr r1, _08061574
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
beq _080614C0
_080614B8:
movs r0, 0x34
movs r1, 0
bl sub_8044F5C
_080614C0:
movs r0, 0x1C
movs r1, 0
bl sub_8044F5C
_080614C8:
movs r0, 0x30
movs r1, 0
bl sub_8044F5C
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _0806154C
movs r0, 0x1A
movs r1, 0
bl sub_8044F5C
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _0806154C
ldr r0, _08061564
ldr r1, [r0]
ldr r2, _08061574
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0806154C
ldr r3, _08061578
adds r0, r1, r3
ldrb r0, [r0]
bl sub_8090158
lsls r0, 24
cmp r0, 0
beq _0806154C
movs r0, 0x3B
movs r1, 0
bl sub_8044F5C
movs r5, 0x1
ldrb r0, [r4, 0xA]
cmp r0, 0x3
bhi _08061530
ldr r2, _0806157C
ldrb r1, [r4, 0xA]
movs r0, 0x64
muls r1, r0
ldr r0, _08061580
adds r1, r0
ldr r0, [r2]
adds r0, r1
movs r1, 0xA
ldrsh r0, [r0, r1]
bl sub_806A538
lsls r0, 24
cmp r0, 0
beq _08061532
_08061530:
movs r5, 0
_08061532:
adds r0, r6, 0
movs r1, 0
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _08061542
movs r5, 0
_08061542:
cmp r5, 0
bne _0806154C
movs r0, 0x3B
bl sub_8044FF0
_0806154C:
adds r0, r4, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0806155A
cmp r0, 0x47
bne _08061584
_0806155A:
movs r0, 0x1
b _08061586
.align 2, 0
_08061560: .4byte gUnknown_202EE6C
_08061564: .4byte gUnknown_203B418
_08061568: .4byte gUnknown_202EE10
_0806156C: .4byte 0x0001357c
_08061570: .4byte 0x0000065d
_08061574: .4byte 0x0000065c
_08061578: .4byte 0x00000644
_0806157C: .4byte gUnknown_203B45C
_08061580: .4byte 0x00008df8
_08061584:
movs r0, 0
_08061586:
cmp r0, 0
beq _080615A8
movs r0, 0x19
bl sub_8044FF0
movs r0, 0x3B
bl sub_8044FF0
movs r0, 0x1A
bl sub_8044FF0
movs r0, 0x30
bl sub_8044FF0
movs r0, 0x34
bl sub_8044FF0
_080615A8:
bl sub_8045064
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806145C
thumb_func_start sub_80615B4
sub_80615B4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldr r1, _080615E0
ldr r0, _080615E4
movs r2, 0x18
ldrsh r0, [r0, r2]
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
adds r0, r5, 0
bl sub_8044C94
ldm r4!, {r0}
lsls r0, 2
adds r4, r0
ldr r0, [r4]
strb r0, [r5, 0x4]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080615E0: .4byte gUnknown_202EE44
_080615E4: .4byte gUnknown_202EE10
thumb_func_end sub_80615B4
thumb_func_start sub_80615E8
sub_80615E8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x7C
adds r5, r0, 0
mov r4, sp
mov r0, sp
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x4]
movs r1, 0x2
strh r1, [r4, 0x8]
strh r1, [r4, 0xA]
movs r2, 0x12
strh r2, [r4, 0xC]
movs r0, 0xE
strh r0, [r4, 0xE]
strh r2, [r4, 0x10]
strh r1, [r4, 0x12]
ldr r0, _08061720
str r0, [sp, 0x14]
movs r0, 0x3
str r0, [sp, 0x1C]
str r0, [sp, 0x34]
str r0, [sp, 0x4C]
ldr r0, _08061724
ldr r1, [r0]
ldrb r0, [r5, 0x4]
lsls r0, 2
ldr r2, _08061728
adds r1, r2
adds r1, r0
ldr r1, [r1]
str r1, [sp, 0x74]
ldr r0, [r1, 0x70]
mov r8, r0
movs r1, 0
str r1, [sp, 0x70]
movs r2, 0
str r2, [sp, 0x6C]
add r0, sp, 0x60
mov r10, r0
_08061646:
movs r1, 0x1
str r1, [sp, 0x78]
movs r7, 0
ldr r0, _08061720
strb r1, [r0]
strb r7, [r0, 0x1]
movs r1, 0xA
strb r1, [r0, 0x2]
strb r7, [r0, 0x3]
mov r0, sp
movs r1, 0x1
bl sub_803ECB4
ldr r0, [sp, 0x6C]
mov r1, r10
mov r2, r8
movs r3, 0
bl sub_806195C
movs r2, 0
mov r1, r10
ldrb r0, [r1]
cmp r0, 0xB
beq _08061684
_08061676:
adds r2, 0x1
cmp r2, 0x7
bgt _08061684
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0xB
bne _08061676
_08061684:
ldr r4, _0806172C
movs r1, 0
strh r2, [r4, 0x1A]
movs r0, 0x8
strh r0, [r4, 0x1C]
strh r1, [r4, 0x1E]
strh r1, [r4, 0x20]
strh r1, [r4, 0x4]
movs r0, 0x10
strh r0, [r4, 0x6]
strh r1, [r4, 0xC]
strh r1, [r4, 0xE]
strh r1, [r4, 0x14]
str r1, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
add r2, sp, 0x70
ldrh r2, [r2]
strh r2, [r4, 0x18]
mov r9, r4
mov r6, r10
_080616BA:
mov r0, r9
bl AddMenuCursorSprite
ldrb r0, [r6, 0x8]
cmp r0, 0xB
beq _080616CA
bl sub_80623B0
_080616CA:
ldr r0, [sp, 0x6C]
cmp r0, 0
beq _080616D4
bl sub_8062230
_080616D4:
movs r0, 0x3D
bl sub_803E46C
ldr r0, _08061730
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08061740
movs r0, 0x1
bl sub_8083CE0
mov r1, r9
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0x7
bne _08061738
ldrb r0, [r6, 0x8]
cmp r0, 0xB
beq _0806171A
ldr r5, [sp, 0x6C]
adds r5, 0x1
ldr r6, _08061734
movs r4, 0x5
_08061704:
ldr r1, [r6]
movs r0, 0
bl _call_via_r1
movs r0, 0x3D
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061704
str r5, [sp, 0x6C]
_0806171A:
movs r0, 0x7
str r0, [sp, 0x70]
b _08061926
.align 2, 0
_08061720: .4byte gUnknown_202F270
_08061724: .4byte gUnknown_203B418
_08061728: .4byte 0x0001357c
_0806172C: .4byte gUnknown_202EE10
_08061730: .4byte gUnknown_20255F0
_08061734: .4byte gUnknown_203B080
_08061738:
mov r0, r9
movs r1, 0
bl sub_80136E0
_08061740:
ldr r0, _08061788
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0806179C
movs r0, 0x1
bl sub_8083CE0
ldr r1, _0806178C
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08061794
ldr r0, [sp, 0x6C]
cmp r0, 0
beq _08061780
adds r5, r0, 0
subs r5, 0x1
ldr r6, _08061790
movs r4, 0x5
_0806176A:
ldr r1, [r6]
movs r0, 0
bl _call_via_r1
movs r0, 0x3D
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0806176A
str r5, [sp, 0x6C]
_08061780:
movs r1, 0
str r1, [sp, 0x70]
b _08061926
.align 2, 0
_08061788: .4byte gUnknown_20255F0
_0806178C: .4byte gUnknown_202EE10
_08061790: .4byte gUnknown_203B084
_08061794:
adds r0, r1, 0
movs r1, 0
bl sub_8013744
_0806179C:
ldr r4, _080617C8
ldrh r1, [r4, 0x2]
movs r0, 0x8
ands r0, r1
lsls r0, 16
lsrs r5, r0, 16
cmp r5, 0
beq _080617DE
mov r2, r9
movs r1, 0x18
ldrsh r0, [r2, r1]
mov r2, r10
adds r1, r2, r0
ldrb r4, [r1]
str r0, [sp, 0x70]
bl sub_8083D44
adds r0, r4, 0
bl sub_8062748
_080617C4:
movs r7, 0
b _08061926
.align 2, 0
_080617C8: .4byte gUnknown_20255F0
_080617CC:
bl sub_8083D08
mov r0, r9
movs r1, 0x18
ldrsh r4, [r0, r1]
cmp r4, 0
beq _080617DC
b _08061900
_080617DC:
b _080618C4
_080617DE:
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080617F4
ldr r2, _080618BC
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
bne _080617F4
b _0806190C
_080617F4:
mov r2, r9
movs r0, 0x18
ldrsh r1, [r2, r0]
mov r2, r10
adds r0, r2, r1
ldrb r7, [r0]
str r1, [sp, 0x70]
bl sub_8062D68
bl sub_8083D08
ldr r0, _080618C0
str r5, [r0]
movs r0, 0x2F
movs r1, 0
bl sub_8044F5C
movs r0, 0xC
movs r1, 0
bl sub_8044F5C
ldr r0, [sp, 0x74]
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _08061832
movs r0, 0x2F
bl sub_8044FF0
_08061832:
mov r0, sp
movs r1, 0x16
bl sub_805FC30
ldr r5, _080618BC
adds r6, r4, 0
adds r4, r5, 0
adds r4, 0x2A
_08061842:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x3D
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08061866
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_08061866:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0806187E
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_0806187E:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08061892
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _080618A4
_08061892:
movs r1, 0x18
ldrsh r0, [r5, r1]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _080617CC
bl sub_8083D30
_080618A4:
ldrh r1, [r6, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080618B4
ldrb r0, [r4]
cmp r0, 0
beq _08061842
_080618B4:
bl sub_8083D30
b _080617C4
.align 2, 0
_080618BC: .4byte gUnknown_202EE10
_080618C0: .4byte gUnknown_202EE6C
_080618C4:
ldr r0, _080618FC
bl sub_8083E38
mov r0, r8
adds r0, 0x94
strb r7, [r0]
mov r1, r8
adds r1, 0x78
movs r0, 0x6
strb r0, [r1]
mov r0, r8
adds r0, 0x80
str r4, [r0]
adds r0, 0x4
str r4, [r0]
subs r0, 0x8
strh r4, [r0]
mov r2, r8
ldrb r0, [r2, 0x7]
cmp r0, 0
beq _080618F0
b _080617C4
_080618F0:
ldr r0, [sp, 0x74]
movs r1, 0x1
bl sub_807ADB8
b _080617C4
.align 2, 0
_080618FC: .4byte 0x00000133
_08061900:
adds r0, r7, 0
bl sub_8062748
movs r0, 0
str r0, [sp, 0x78]
b _080617C4
_0806190C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08061920
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _08061920
b _080616BA
_08061920:
bl sub_8083D30
movs r7, 0x1
_08061926:
ldr r1, [sp, 0x78]
cmp r1, 0
beq _08061932
ldr r0, _08061958
bl AddMenuCursorSprite
_08061932:
movs r0, 0x3D
bl sub_803E46C
cmp r7, 0
bne _0806193E
b _08061646
_0806193E:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0x7C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08061958: .4byte gUnknown_202EE10
thumb_func_end sub_80615E8
thumb_func_start sub_806195C
sub_806195C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
adds r5, r0, 0
mov r9, r1
str r2, [sp, 0x10]
adds r7, r3, 0
subs r5, 0x1
adds r0, r7, 0
bl sub_80073B8
ldr r0, _080619B4
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x10
movs r1, 0
adds r3, r7, 0
bl xxx_call_draw_string
movs r0, 0x14
mov r8, r0
movs r1, 0xB
mov r0, r9
adds r0, 0x8
_08061994:
strb r1, [r0]
subs r0, 0x1
cmp r0, r9
bge _08061994
bl sub_8083654
ldrb r1, [r0, 0x9]
add r0, sp, 0x4
bl sub_808EB0C
movs r6, 0x1
negs r6, r6
movs r1, 0
mov r10, r1
b _080619FC
.align 2, 0
_080619B4: .4byte gUnknown_80FE954
_080619B8:
ldr r0, _080619DC
adds r1, r4, 0
bl sub_808EAC0
ldr r0, [sp, 0x10]
adds r0, 0x94
ldrb r0, [r0]
cmp r0, r4
bne _080619E4
mov r0, r10
str r0, [sp]
movs r0, 0x10
mov r1, r8
ldr r2, _080619E0
adds r3, r7, 0
bl sub_8014FF0
b _080619F4
.align 2, 0
_080619DC: .4byte gUnknown_202DF98
_080619E0: .4byte gUnknown_8106BEC
_080619E4:
mov r1, r10
str r1, [sp]
movs r0, 0x10
mov r1, r8
ldr r2, _08061A34
adds r3, r7, 0
bl sub_8014FF0
_080619F4:
adds r6, 0x1
movs r0, 0xC
add r8, r0
adds r5, 0x1
_080619FC:
cmp r6, 0x9
bgt _08061A1E
cmp r5, 0
blt _080619F4
cmp r5, 0xB
bgt _080619F4
mov r0, sp
adds r0, r5
adds r0, 0x4
ldrb r4, [r0]
cmp r6, 0x8
bhi _08061A1A
mov r1, r9
adds r0, r1, r6
strb r4, [r0]
_08061A1A:
cmp r4, 0xB
bne _080619B8
_08061A1E:
adds r0, r7, 0
bl sub_80073E0
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08061A34: .4byte gUnknown_8106BF4
thumb_func_end sub_806195C
thumb_func_start sub_8061A38
sub_8061A38:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x130
adds r5, r0, 0
lsls r1, 24
lsrs r6, r1, 24
add r4, sp, 0xB0
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [r4, 0x4]
movs r1, 0x2
strh r1, [r4, 0x8]
strh r1, [r4, 0xA]
movs r2, 0x12
strh r2, [r4, 0xC]
movs r0, 0xE
strh r0, [r4, 0xE]
strh r2, [r4, 0x10]
strh r1, [r4, 0x12]
ldr r0, _08061AA4
str r0, [r4, 0x14]
movs r0, 0x3
str r0, [r4, 0x1C]
str r0, [r4, 0x34]
str r0, [r4, 0x4C]
movs r0, 0
str r0, [sp, 0x114]
mov r8, r0
ldr r0, _08061AA8
ldr r1, [r0]
ldrb r0, [r5, 0x4]
lsls r0, 2
ldr r2, _08061AAC
adds r1, r2
adds r1, r0
ldr r1, [r1]
str r1, [sp, 0x110]
ldr r0, [r1, 0x70]
str r0, [sp, 0x11C]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08061AA0
cmp r0, 0x47
bne _08061AB0
_08061AA0:
movs r0, 0x1
b _08061AB2
.align 2, 0
_08061AA4: .4byte gUnknown_202F270
_08061AA8: .4byte gUnknown_203B418
_08061AAC: .4byte 0x0001357c
_08061AB0:
movs r0, 0
_08061AB2:
adds r1, r0, 0
cmp r1, 0
beq _08061ACE
movs r0, 0x1
str r0, [sp, 0x4]
movs r0, 0
str r0, [sp, 0x8]
str r0, [sp, 0xC]
str r0, [sp, 0x10]
str r0, [sp, 0x14]
str r0, [sp, 0x18]
movs r1, 0x1
str r1, [sp, 0x118]
b _08061AFE
_08061ACE:
cmp r6, 0
beq _08061AE6
movs r0, 0x4
str r0, [sp, 0x4]
str r1, [sp, 0x8]
str r1, [sp, 0xC]
str r1, [sp, 0x10]
str r1, [sp, 0x14]
str r1, [sp, 0x18]
movs r2, 0x1
str r2, [sp, 0x118]
b _08061AFE
_08061AE6:
movs r0, 0x2
str r0, [sp, 0x4]
movs r0, 0x1
str r0, [sp, 0x8]
movs r0, 0x3
str r0, [sp, 0xC]
movs r0, 0x5
str r0, [sp, 0x10]
str r6, [sp, 0x14]
str r6, [sp, 0x18]
movs r0, 0x4
str r0, [sp, 0x118]
_08061AFE:
add r2, sp, 0x5C
movs r0, 0
strh r0, [r2]
mov r1, sp
adds r1, 0x72
strh r0, [r1]
ldr r3, _08061BB4
strh r0, [r3, 0x18]
subs r1, 0x56
str r1, [sp, 0x12C]
add r2, sp, 0x80
mov r9, r2
adds r7, r3, 0
_08061B18:
movs r0, 0
mov r10, r0
movs r1, 0
str r1, [sp, 0x120]
movs r2, 0
str r2, [sp, 0x124]
movs r0, 0x1
str r0, [sp, 0x128]
ldr r4, _08061BB8
ldr r1, _08061BBC
add r2, sp, 0x118
ldrb r2, [r2]
strb r2, [r1]
add r0, sp, 0x114
ldrb r0, [r0]
strb r0, [r1, 0x1]
movs r0, 0xA
strb r0, [r1, 0x2]
mov r2, r10
strb r2, [r1, 0x3]
add r0, sp, 0xB0
movs r1, 0x1
bl sub_803ECB4
ldr r0, [sp, 0x12C]
ldr r1, [sp, 0x110]
bl sub_8069844
ldr r1, [sp, 0x114]
lsls r0, r1, 2
mov r5, sp
adds r5, r0
adds r5, 0x4
ldr r0, [r5]
mov r2, r10
str r2, [sp]
ldr r2, [sp, 0x12C]
add r3, sp, 0x80
bl sub_808F844
add r0, sp, 0x114
ldrh r0, [r0]
strh r0, [r7, 0x1E]
add r1, sp, 0x118
ldrh r1, [r1]
strh r1, [r7, 0x20]
movs r2, 0
ldrsh r0, [r4, r2]
adds r0, 0xF
lsls r0, 3
strh r0, [r7, 0xC]
movs r1, 0x2
ldrsh r0, [r4, r1]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r7, 0xE]
mov r2, r10
strh r2, [r7, 0x14]
strh r2, [r7, 0x4]
movs r0, 0x10
strh r0, [r7, 0x6]
mov r0, r10
str r0, [r7]
adds r0, r7, 0
adds r0, 0x28
bl sub_801317C
mov r1, r10
strh r1, [r7, 0x18]
strh r1, [r7, 0x1A]
strh r1, [r7, 0x1C]
ldr r5, [r5]
cmp r5, 0x1
bne _08061C10
movs r2, 0
add r1, sp, 0x8C
b _08061BC8
.align 2, 0
_08061BB4: .4byte gUnknown_202EE10
_08061BB8: .4byte gUnknown_2027370
_08061BBC: .4byte gUnknown_202F270
_08061BC0:
adds r1, 0x4
adds r2, 0x1
cmp r2, 0x7
bgt _08061BCE
_08061BC8:
ldr r0, [r1]
cmp r0, 0
bne _08061BC0
_08061BCE:
cmp r2, 0
beq _08061C44
movs r0, 0x1
str r0, [sp, 0x124]
strh r2, [r7, 0x1A]
b _08061C38
_08061BDA:
movs r0, 0x18
ldrsh r2, [r7, r0]
lsls r1, r2, 2
add r0, sp, 0x8C
adds r0, r1
ldr r4, [r0]
mov r8, r2
bl sub_8083D44
adds r0, r4, 0
bl sub_806285C
movs r1, 0
str r1, [sp, 0x128]
b _080621E4
_08061BF8:
movs r2, 0x18
ldrsh r0, [r7, r2]
mov r2, r9
adds r1, r2, r0
ldrb r4, [r1]
mov r8, r0
bl sub_8083D44
adds r0, r4, 0
bl sub_806262C
b _08062082
_08061C10:
cmp r5, 0x4
bne _08061C48
movs r1, 0
add r2, sp, 0x80
ldrb r0, [r2]
cmp r0, 0
beq _08061C2E
mov r2, r9
_08061C20:
adds r1, 0x1
cmp r1, 0x7
bgt _08061C2E
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
bne _08061C20
_08061C2E:
cmp r1, 0
beq _08061C44
movs r0, 0x1
str r0, [sp, 0x120]
strh r1, [r7, 0x1A]
_08061C38:
movs r0, 0x8
strh r0, [r7, 0x1C]
adds r0, r7, 0
movs r1, 0
bl sub_80137B0
_08061C44:
mov r1, r8
strh r1, [r7, 0x18]
_08061C48:
ldr r0, _08061CF8
bl AddMenuCursorSprite
movs r0, 0
ldr r1, _08061CFC
bl sub_8014140
adds r4, r0, 0
movs r5, 0
movs r6, 0
ldr r2, [sp, 0x120]
cmp r2, 0
beq _08061C80
mov r1, r9
ldrb r0, [r1, 0x8]
cmp r0, 0
beq _08061C70
movs r5, 0x1
bl sub_80623B0
_08061C70:
add r1, sp, 0x5C
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0
beq _08061C80
movs r6, 0x1
bl sub_8062230
_08061C80:
ldr r2, [sp, 0x124]
cmp r2, 0
beq _08061CA6
mov r1, r9
ldr r0, [r1, 0x2C]
cmp r0, 0
beq _08061C94
movs r5, 0x1
bl sub_80623B0
_08061C94:
movs r1, 0x72
add r1, sp
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0
beq _08061CA6
movs r6, 0x1
bl sub_8062230
_08061CA6:
movs r0, 0x1C
bl sub_803E46C
ldr r0, _08061D00
ldrb r0, [r0]
cmp r0, 0x1
bls _08061D4E
bl sub_80048C8
lsls r0, 24
cmp r0, 0
bne _08061D4E
ldr r0, _08061D04
ldrh r1, [r0, 0x2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08061CD6
ldr r2, _08061CF8
adds r0, r2, 0
adds r0, 0x2B
ldrb r0, [r0]
cmp r0, 0
beq _08061D08
_08061CD6:
movs r0, 0
bl sub_8083CE0
ldr r2, [sp, 0x114]
adds r2, 0x1
str r2, [sp, 0x114]
lsls r0, r2, 2
add r0, sp
adds r0, 0x4
ldr r0, [r0]
cmp r0, 0
beq _08061CF0
b _080621E6
_08061CF0:
movs r0, 0
str r0, [sp, 0x114]
b _080621E6
.align 2, 0
_08061CF8: .4byte gUnknown_202EE10
_08061CFC: .4byte gUnknown_8106B8C
_08061D00: .4byte gUnknown_202F270
_08061D04: .4byte gUnknown_20255F0
_08061D08:
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08061D1A
adds r0, r2, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
beq _08061D4E
_08061D1A:
movs r0, 0
bl sub_8083CE0
ldr r1, [sp, 0x114]
subs r1, 0x1
str r1, [sp, 0x114]
movs r0, 0x1
negs r0, r0
cmp r1, r0
beq _08061D30
b _080621E6
_08061D30:
movs r2, 0x5
str r2, [sp, 0x114]
ldr r0, [sp, 0x18]
cmp r0, 0
beq _08061D3C
b _080621E6
_08061D3C:
add r1, sp, 0x18
_08061D3E:
subs r1, 0x4
ldr r0, [sp, 0x114]
subs r0, 0x1
str r0, [sp, 0x114]
ldr r0, [r1]
cmp r0, 0
beq _08061D3E
b _080621E6
_08061D4E:
ldr r1, [sp, 0x124]
cmp r1, 0
bne _08061D56
b _08061E8A
_08061D56:
cmp r4, 0x2
bne _08061D98
cmp r5, 0
beq _08061D98
movs r0, 0
bl sub_8083CE0
mov r2, r9
ldr r0, [r2, 0x2C]
cmp r0, 0
beq _08061D8E
ldr r5, _08061D94
movs r4, 0x5
_08061D70:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061D70
movs r1, 0x72
add r1, sp
ldrh r0, [r1]
adds r0, 0x1
strh r0, [r1]
_08061D8E:
movs r2, 0x7
mov r8, r2
b _080621E6
.align 2, 0
_08061D94: .4byte gUnknown_203B080
_08061D98:
ldr r0, _08061DDC
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08061DF0
movs r0, 0
bl sub_8083CE0
ldr r1, _08061DE0
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0x7
bne _08061DE8
mov r1, r9
ldr r0, [r1, 0x2C]
cmp r0, 0
bne _08061DBE
b _08061F04
_08061DBE:
ldr r5, _08061DE4
movs r4, 0x5
_08061DC2:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061DC2
movs r2, 0x72
add r2, sp
b _08061EFE
.align 2, 0
_08061DDC: .4byte gUnknown_20255F0
_08061DE0: .4byte gUnknown_202EE10
_08061DE4: .4byte gUnknown_203B080
_08061DE8:
adds r0, r1, 0
movs r1, 0
bl sub_80136E0
_08061DF0:
cmp r4, 0x1
bne _08061E28
cmp r6, 0
beq _08061E28
movs r2, 0x72
add r2, sp
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0
bne _08061E06
b _08061F96
_08061E06:
ldr r5, _08061E24
movs r4, 0x5
_08061E0A:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061E0A
movs r1, 0x72
add r1, sp
b _08061F90
.align 2, 0
_08061E24: .4byte gUnknown_203B084
_08061E28:
ldr r0, _08061E74
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _08061E36
b _08061FB0
_08061E36:
movs r0, 0x1
bl sub_8083CE0
ldr r1, _08061E78
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08061E80
movs r2, 0x72
add r2, sp
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0
bne _08061E54
b _08061F96
_08061E54:
ldr r5, _08061E7C
movs r4, 0x5
_08061E58:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061E58
movs r1, 0x72
add r1, sp
b _08061F90
.align 2, 0
_08061E74: .4byte gUnknown_20255F0
_08061E78: .4byte gUnknown_202EE10
_08061E7C: .4byte gUnknown_203B084
_08061E80:
adds r0, r1, 0
movs r1, 0
bl sub_8013744
b _08061FB0
_08061E8A:
ldr r0, [sp, 0x120]
cmp r0, 0
bne _08061E92
b _08061FB0
_08061E92:
cmp r4, 0x2
bne _08061EC0
cmp r5, 0
beq _08061EC0
mov r1, r9
ldrb r0, [r1, 0x8]
cmp r0, 0
beq _08061F04
ldr r5, _08061EBC
movs r4, 0x5
_08061EA6:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061EA6
b _08061EFC
.align 2, 0
_08061EBC: .4byte gUnknown_203B080
_08061EC0:
ldr r0, _08061F0C
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08061F20
movs r0, 0x1
bl sub_8083CE0
ldr r1, _08061F10
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0x7
bne _08061F18
mov r1, r9
ldrb r0, [r1, 0x8]
cmp r0, 0
beq _08061F04
ldr r5, _08061F14
movs r4, 0x5
_08061EE8:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061EE8
_08061EFC:
add r2, sp, 0x5C
_08061EFE:
ldrh r0, [r2]
adds r0, 0x1
strh r0, [r2]
_08061F04:
movs r0, 0x7
mov r8, r0
b _080621E6
.align 2, 0
_08061F0C: .4byte gUnknown_20255F0
_08061F10: .4byte gUnknown_202EE10
_08061F14: .4byte gUnknown_203B080
_08061F18:
adds r0, r1, 0
movs r1, 0
bl sub_80136E0
_08061F20:
cmp r4, 0x1
bne _08061F50
cmp r6, 0
beq _08061F50
add r2, sp, 0x5C
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0
beq _08061F96
ldr r5, _08061F4C
movs r4, 0x5
_08061F36:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061F36
b _08061F8E
.align 2, 0
_08061F4C: .4byte gUnknown_203B084
_08061F50:
ldr r0, _08061F9C
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08061FB0
movs r0, 0x1
bl sub_8083CE0
ldr r1, _08061FA0
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08061FA8
add r2, sp, 0x5C
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0
beq _08061F96
ldr r5, _08061FA4
movs r4, 0x5
_08061F7A:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08061F7A
_08061F8E:
add r1, sp, 0x5C
_08061F90:
ldrh r0, [r1]
subs r0, 0x1
strh r0, [r1]
_08061F96:
movs r2, 0
mov r8, r2
b _080621E6
.align 2, 0
_08061F9C: .4byte gUnknown_20255F0
_08061FA0: .4byte gUnknown_202EE10
_08061FA4: .4byte gUnknown_203B084
_08061FA8:
adds r0, r1, 0
movs r1, 0
bl sub_8013744
_08061FB0:
bl sub_80048C8
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _08061FBE
b _08061C48
_08061FBE:
ldr r5, _0806208C
ldrh r1, [r5, 0x2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08061FDA
ldr r0, [sp, 0x124]
cmp r0, 0
beq _08061FD2
b _08061BDA
_08061FD2:
ldr r2, [sp, 0x120]
cmp r2, 0
beq _08061FDA
b _08061BF8
_08061FDA:
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08061FF0
ldr r2, _08062090
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
bne _08061FF0
b _080621CA
_08061FF0:
ldr r0, [sp, 0x124]
cmp r0, 0
beq _080620BC
movs r1, 0x18
ldrsh r2, [r7, r1]
lsls r1, r2, 2
add r0, sp, 0x8C
adds r0, r1
ldr r6, [r0]
mov r8, r2
bl sub_8062D68
ldr r0, _08062094
str r4, [r0]
bl sub_8083D08
movs r0, 0xC
movs r1, 0
bl sub_8044F5C
add r0, sp, 0xB0
movs r1, 0x16
bl sub_805FC30
ldr r4, _08062090
movs r2, 0x2A
adds r2, r4
mov r10, r2
_08062028:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1C
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _0806204C
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_0806204C:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08062064
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_08062064:
ldrh r1, [r5, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062078
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08062098
_08062078:
bl sub_8083D08
adds r0, r6, 0
bl sub_806285C
_08062082:
movs r0, 0
str r0, [sp, 0x128]
mov r10, r0
b _080621E6
.align 2, 0
_0806208C: .4byte gUnknown_20255F0
_08062090: .4byte gUnknown_202EE10
_08062094: .4byte gUnknown_202EE6C
_08062098:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080620A8
mov r1, r10
ldrb r0, [r1]
cmp r0, 0
beq _08062028
_080620A8:
bl sub_8083D30
b _080621BA
_080620AE:
bl sub_8083D08
movs r1, 0x18
ldrsh r0, [r7, r1]
cmp r0, 0
bne _080621B0
b _08062198
_080620BC:
ldr r2, [sp, 0x120]
cmp r2, 0
bne _080620C4
b _080621C0
_080620C4:
movs r0, 0x18
ldrsh r1, [r7, r0]
mov r2, r9
adds r0, r2, r1
ldrb r6, [r0]
mov r8, r1
bl sub_8062D68
ldr r0, _08062190
ldr r1, [sp, 0x124]
str r1, [r0]
bl sub_8083D08
movs r0, 0x28
movs r1, 0
bl sub_8044F5C
movs r0, 0xC
movs r1, 0
bl sub_8044F5C
ldr r0, [sp, 0x110]
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _08062102
movs r0, 0x28
bl sub_8044FF0
_08062102:
add r0, sp, 0xB0
movs r1, 0x16
bl sub_805FC30
ldr r4, _08062194
movs r2, 0x2A
adds r2, r4
mov r10, r2
_08062112:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1C
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08062136
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08062136:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0806214E
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_0806214E:
ldrh r1, [r5, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062162
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08062174
_08062162:
movs r1, 0x18
ldrsh r0, [r4, r1]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _080620AE
bl sub_8083D30
_08062174:
ldrh r1, [r5, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08062186
mov r2, r10
ldrb r0, [r2]
cmp r0, 0
beq _08062112
_08062186:
bl sub_8083D30
movs r0, 0
mov r10, r0
b _080621E6
.align 2, 0
_08062190: .4byte gUnknown_202EE6C
_08062194: .4byte gUnknown_202EE10
_08062198:
ldr r0, _080621AC
bl sub_8083E38
ldr r0, [sp, 0x11C]
adds r0, 0x8C
adds r1, r6, 0
bl sub_808EBF4
b _080621BA
.align 2, 0
_080621AC: .4byte 0x00000133
_080621B0:
adds r0, r6, 0
bl sub_806262C
movs r1, 0
str r1, [sp, 0x128]
_080621BA:
movs r2, 0
mov r10, r2
b _080621E6
_080621C0:
bl sub_8083D08
movs r0, 0x1
mov r10, r0
b _080621E6
_080621CA:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080621DE
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _080621DE
b _08061C48
_080621DE:
bl sub_8083D30
movs r1, 0x1
_080621E4:
mov r10, r1
_080621E6:
ldr r2, [sp, 0x128]
cmp r2, 0
beq _08062204
ldr r0, [sp, 0x120]
cmp r0, 0
bne _080621F8
ldr r1, [sp, 0x124]
cmp r1, 0
beq _080621FE
_080621F8:
ldr r0, _0806222C
bl AddMenuCursorSprite
_080621FE:
movs r0, 0x1C
bl sub_803E46C
_08062204:
mov r2, r10
cmp r2, 0
bne _0806220C
b _08061B18
_0806220C:
movs r0, 0
movs r1, 0
bl sub_803EAF0
ldr r0, [sp, 0x110]
bl sub_807191C
add sp, 0x130
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806222C: .4byte gUnknown_202EE10
thumb_func_end sub_8061A38
thumb_func_start sub_8062230
sub_8062230:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
ldr r0, _08062380
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _08062248
b _08062372
_08062248:
ldr r0, _08062384
mov r9, r0
movs r0, 0
movs r1, 0
str r0, [sp]
str r1, [sp, 0x4]
mov r0, sp
ldrh r0, [r0]
ldr r1, _08062388
ands r1, r0
ldr r3, _0806238C
ldr r0, [sp]
ands r0, r3
orrs r0, r1
str r0, [sp]
mov r1, sp
ldrh r1, [r1]
adds r2, r3, 0
ands r2, r0
orrs r2, r1
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _08062390
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r6, _08062394
mov r8, r6
mov r0, r8
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _08062398
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _0806239C
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
movs r4, 0x80
lsls r4, 7
mov r0, sp
ldrh r1, [r0]
ldr r6, _080623A0
adds r0, r6, 0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
orrs r4, r0
ands r3, r1
orrs r3, r4
str r3, [sp]
movs r1, 0x80
lsls r1, 6
mov r5, sp
ldrh r0, [r5, 0x2]
ldr r2, _080623A4
ands r2, r0
orrs r2, r1
ands r2, r6
movs r3, 0xFC
lsls r3, 2
ldrh r1, [r5, 0x4]
movs r0, 0xFC
lsls r0, 8
ands r0, r1
orrs r0, r3
mov r1, r8
ands r0, r1
movs r3, 0xF
movs r1, 0xF0
lsls r1, 8
ldr r4, _080623A8
ands r0, r4
orrs r0, r1
strh r0, [r5, 0x4]
mov r6, r9
movs r1, 0x2
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x8
ands r0, r4
lsls r0, 4
ldrh r1, [r5, 0x6]
ands r3, r1
orrs r3, r0
strh r3, [r5, 0x6]
movs r3, 0
ldrsh r0, [r6, r3]
lsls r0, 3
adds r0, 0x40
ldr r1, _080623AC
ands r0, r1
movs r1, 0xFE
lsls r1, 8
ands r2, r1
orrs r2, r0
strh r2, [r5, 0x2]
movs r1, 0x80
lsls r1, 1
mov r0, sp
movs r2, 0
movs r3, 0
bl AddSprite
_08062372:
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08062380: .4byte gUnknown_202EDCC
_08062384: .4byte gUnknown_2027370
_08062388: .4byte 0x0000feff
_0806238C: .4byte 0xffff0000
_08062390: .4byte 0x0000fdff
_08062394: .4byte 0x0000f3ff
_08062398: .4byte 0x0000efff
_0806239C: .4byte 0x0000dfff
_080623A0: .4byte 0x00003fff
_080623A4: .4byte 0x0000c1ff
_080623A8: .4byte 0x00000fff
_080623AC: .4byte 0x000001ff
thumb_func_end sub_8062230
thumb_func_start sub_80623B0
sub_80623B0:
push {r4-r6,lr}
sub sp, 0x8
ldr r0, _080624D4
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _080623C2
b _080624CA
_080623C2:
ldr r6, _080624D8
movs r0, 0
movs r1, 0
str r0, [sp]
str r1, [sp, 0x4]
mov r0, sp
ldrh r0, [r0]
ldr r1, _080624DC
ands r1, r0
ldr r3, _080624E0
ldr r0, [sp]
ands r0, r3
orrs r0, r1
str r0, [sp]
mov r1, sp
ldrh r1, [r1]
adds r2, r3, 0
ands r2, r0
orrs r2, r1
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080624E4
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r5, _080624E8
adds r0, r5, 0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080624EC
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080624F0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
movs r4, 0x80
lsls r4, 7
mov r0, sp
ldrh r1, [r0]
ldr r0, _080624F4
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
orrs r4, r0
ands r3, r1
orrs r3, r4
str r3, [sp]
mov r3, sp
movs r2, 0xFC
lsls r2, 2
ldrh r1, [r3, 0x4]
movs r0, 0xFC
lsls r0, 8
ands r0, r1
orrs r0, r2
ands r0, r5
movs r2, 0xF
movs r1, 0xF0
lsls r1, 8
ldr r4, _080624F8
ands r0, r4
orrs r0, r1
strh r0, [r3, 0x4]
movs r1, 0x2
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x70
ands r0, r4
lsls r0, 4
ldrh r1, [r3, 0x6]
ands r2, r1
orrs r2, r0
strh r2, [r3, 0x6]
movs r1, 0
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x40
ldr r1, _080624FC
ands r0, r1
strh r0, [r3, 0x2]
subs r1, 0xFF
mov r0, sp
movs r2, 0
movs r3, 0
bl AddSprite
_080624CA:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080624D4: .4byte gUnknown_202EDCC
_080624D8: .4byte gUnknown_2027370
_080624DC: .4byte 0x0000feff
_080624E0: .4byte 0xffff0000
_080624E4: .4byte 0x0000fdff
_080624E8: .4byte 0x0000f3ff
_080624EC: .4byte 0x0000efff
_080624F0: .4byte 0x0000dfff
_080624F4: .4byte 0x00003fff
_080624F8: .4byte 0x00000fff
_080624FC: .4byte 0x000001ff
thumb_func_end sub_80623B0
thumb_func_start sub_8062500
sub_8062500:
push {r4,r5,lr}
ldr r0, _0806257C
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
beq _08062574
ldr r5, _08062580
ldr r0, _08062584
ldrh r2, [r0]
ldr r1, _08062588
ands r1, r2
ldr r2, _0806258C
ands r1, r2
ldr r4, _08062590
ands r1, r4
ldr r2, _08062594
ands r1, r2
ldr r2, _08062598
ands r1, r2
movs r3, 0x80
lsls r3, 7
ldr r2, _0806259C
ands r1, r2
orrs r1, r3
strh r1, [r0]
movs r3, 0xFC
lsls r3, 2
ldrh r2, [r0, 0x4]
movs r1, 0xFC
lsls r1, 8
ands r1, r2
orrs r1, r3
ands r1, r4
movs r3, 0xF
movs r2, 0xF0
lsls r2, 8
ldr r4, _080625A0
ands r1, r4
orrs r1, r2
strh r1, [r0, 0x4]
movs r2, 0x2
ldrsh r1, [r5, r2]
lsls r1, 3
adds r1, 0x60
ands r1, r4
lsls r1, 4
ldrh r2, [r0, 0x6]
ands r3, r2
orrs r3, r1
strh r3, [r0, 0x6]
movs r1, 0x70
strh r1, [r0, 0x2]
adds r1, 0x90
movs r2, 0
movs r3, 0
bl AddSprite
_08062574:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806257C: .4byte gUnknown_202EDCC
_08062580: .4byte gUnknown_2027370
_08062584: .4byte gUnknown_202F268
_08062588: .4byte 0x0000feff
_0806258C: .4byte 0x0000fdff
_08062590: .4byte 0x0000f3ff
_08062594: .4byte 0x0000efff
_08062598: .4byte 0x0000dfff
_0806259C: .4byte 0x00003fff
_080625A0: .4byte 0x00000fff
thumb_func_end sub_8062500
thumb_func_start sub_80625A4
sub_80625A4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0xC
adds r7, r0, 0
mov r9, r1
mov r0, sp
bl sub_801317C
movs r4, 0
cmp r4, r7
bge _0806261A
subs r0, r7, 0x1
mov r8, r0
mov r5, sp
_080625C4:
lsls r0, r4, 2
add r0, r9
ldr r0, [r0]
mov r1, sp
bl sub_80639E4
adds r6, r4, 0x1
b _080625E8
_080625D4:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080625E2
ldrb r0, [r5, 0x2]
cmp r0, 0
beq _080625E8
_080625E2:
bl sub_8083D30
b _08062614
_080625E8:
cmp r4, r8
bge _080625F0
bl sub_8062500
_080625F0:
mov r0, sp
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _08062628
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062610
ldrb r0, [r5, 0x1]
cmp r0, 0
beq _080625D4
_08062610:
bl sub_8083D08
_08062614:
adds r4, r6, 0
cmp r4, r7
blt _080625C4
_0806261A:
add sp, 0xC
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08062628: .4byte gUnknown_20255F0
thumb_func_end sub_80625A4
thumb_func_start sub_806262C
sub_806262C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x88
lsls r0, 24
lsrs r0, 24
mov r10, r0
mov r0, sp
adds r0, 0x70
str r0, [sp, 0x84]
add r0, sp, 0x10
mov r8, r0
movs r0, 0
mov r9, r0
add r7, sp, 0x4
add r6, sp, 0x80
_08062650:
add r0, sp, 0x4
bl sub_801317C
mov r0, r8
bl sub_80140B4
mov r0, r8
str r6, [r0, 0x14]
movs r1, 0x1
add r0, sp, 0x80
strb r1, [r0]
mov r0, r9
strb r0, [r6, 0x1]
movs r0, 0x10
strb r0, [r6, 0x2]
mov r0, r9
strb r0, [r6, 0x3]
mov r0, r8
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
mov r0, r10
bl sub_808EAB0
adds r1, r0, 0
ldr r0, _080626CC
bl strcpy
ldr r0, _080626D0
ldr r2, [r0]
mov r0, r9
str r0, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
mov r0, r10
bl sub_808EADC
adds r2, r0, 0
mov r0, r9
str r0, [sp]
movs r0, 0x8
movs r1, 0x10
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
mov r0, r10
bl sub_808EADC
ldr r1, [sp, 0x84]
bl sub_8097DF0
adds r5, r0, 0
b _080626EA
.align 2, 0
_080626CC: .4byte gUnknown_202DE58
_080626D0: .4byte gUnknown_80FE95C
_080626D4:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080626E2
ldrb r0, [r7, 0x2]
cmp r0, 0
beq _080626EA
_080626E2:
movs r4, 0x1
bl sub_8083D30
b _08062718
_080626EA:
cmp r5, 0
beq _080626F2
bl sub_8062500
_080626F2:
add r0, sp, 0x4
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _0806272C
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062712
ldrb r0, [r7, 0x1]
cmp r0, 0
beq _080626D4
_08062712:
movs r4, 0
bl sub_8083D08
_08062718:
cmp r4, 0
bne _08062730
cmp r5, 0
beq _08062730
adds r0, r5, 0
ldr r1, [sp, 0x84]
bl sub_80625A4
b _08062650
.align 2, 0
_0806272C: .4byte gUnknown_20255F0
_08062730:
movs r0, 0x4
movs r1, 0x3E
bl sub_803E708
add sp, 0x88
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806262C
thumb_func_start sub_8062748
sub_8062748:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x88
lsls r0, 24
lsrs r0, 24
mov r10, r0
mov r0, sp
adds r0, 0x70
str r0, [sp, 0x84]
add r0, sp, 0x10
mov r8, r0
movs r0, 0
mov r9, r0
add r7, sp, 0x4
add r6, sp, 0x80
_0806276C:
add r0, sp, 0x4
bl sub_801317C
mov r0, r8
bl sub_80140B4
mov r0, r8
str r6, [r0, 0x14]
movs r1, 0x1
add r0, sp, 0x80
strb r1, [r0]
mov r0, r9
strb r0, [r6, 0x1]
movs r0, 0x10
strb r0, [r6, 0x2]
mov r0, r9
strb r0, [r6, 0x3]
mov r0, r8
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
ldr r0, _080627E0
mov r1, r10
bl sub_808EAC0
ldr r0, _080627E4
ldr r2, [r0]
mov r0, r9
str r0, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
mov r0, r10
bl sub_808EAEC
adds r2, r0, 0
mov r0, r9
str r0, [sp]
movs r0, 0x8
movs r1, 0x10
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
mov r0, r10
bl sub_808EAEC
ldr r1, [sp, 0x84]
bl sub_8097DF0
adds r5, r0, 0
b _080627FE
.align 2, 0
_080627E0: .4byte gUnknown_202DE58
_080627E4: .4byte gUnknown_80FE960
_080627E8:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080627F6
ldrb r0, [r7, 0x2]
cmp r0, 0
beq _080627FE
_080627F6:
movs r4, 0x1
bl sub_8083D30
b _0806282C
_080627FE:
cmp r5, 0
beq _08062806
bl sub_8062500
_08062806:
add r0, sp, 0x4
movs r1, 0
bl nullsub_34
movs r0, 0x3E
bl sub_803E46C
ldr r0, _08062840
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062826
ldrb r0, [r7, 0x1]
cmp r0, 0
beq _080627E8
_08062826:
movs r4, 0
bl sub_8083D08
_0806282C:
cmp r4, 0
bne _08062844
cmp r5, 0
beq _08062844
adds r0, r5, 0
ldr r1, [sp, 0x84]
bl sub_80625A4
b _0806276C
.align 2, 0
_08062840: .4byte gUnknown_20255F0
_08062844:
movs r0, 0x4
movs r1, 0x3E
bl sub_803E708
add sp, 0x88
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8062748
thumb_func_start sub_806285C
sub_806285C:
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0xD4
mov r10, r0
add r0, sp, 0x10
mov r8, r0
add r5, sp, 0x70
adds r0, r5, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x74]
add r1, sp, 0x78
movs r6, 0
movs r0, 0
mov r9, r0
movs r0, 0x2
strh r0, [r1]
strh r0, [r1, 0x2]
add r1, sp, 0x7C
movs r0, 0x1A
strh r0, [r1]
mov r0, sp
adds r0, 0x7E
movs r1, 0xC
strh r1, [r0]
add r0, sp, 0x80
strh r1, [r0]
add r0, sp, 0x84
add r4, sp, 0xD0
str r4, [r0]
add r0, sp, 0x88
movs r1, 0x3
str r1, [r0, 0x4]
add r0, sp, 0xA0
str r1, [r0, 0x4]
add r0, sp, 0xB8
str r1, [r0, 0x4]
mov r0, r8
adds r1, r5, 0
movs r2, 0x60
bl memcpy
add r0, sp, 0x4
bl sub_801317C
movs r0, 0x1
strb r0, [r4]
strb r6, [r4, 0x1]
movs r0, 0x10
strb r0, [r4, 0x2]
strb r6, [r4, 0x3]
mov r0, r8
movs r1, 0x1
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
mov r0, r10
bl sub_808E4FC
adds r1, r0, 0
ldr r0, _0806291C
bl strcpy
ldr r0, _08062920
ldr r2, [r0]
mov r0, r9
str r0, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
mov r0, r10
bl sub_808E51C
adds r2, r0, 0
mov r0, r9
str r0, [sp]
movs r0, 0x8
movs r1, 0x10
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
add r4, sp, 0x4
b _08062938
.align 2, 0
_0806291C: .4byte gUnknown_202DE58
_08062920: .4byte gUnknown_80FE964
_08062924:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08062932
ldrb r0, [r4, 0x2]
cmp r0, 0
beq _08062938
_08062932:
bl sub_8083D30
b _0806295C
_08062938:
add r0, sp, 0x4
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _08062974
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062958
ldrb r0, [r4, 0x1]
cmp r0, 0
beq _08062924
_08062958:
bl sub_8083D08
_0806295C:
movs r0, 0x4
movs r1, 0x3E
bl sub_803E708
add sp, 0xD4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08062974: .4byte gUnknown_20255F0
thumb_func_end sub_806285C
thumb_func_start sub_8062978
sub_8062978:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x80
mov r8, r0
adds r6, r1, 0
add r4, sp, 0x1C
ldr r1, _080629AC
adds r0, r4, 0
movs r2, 0x60
bl memcpy
movs r0, 0
str r0, [sp, 0x7C]
mov r1, r8
cmp r1, 0
beq _080629A2
subs r0, 0x1
str r0, [r1]
_080629A2:
cmp r6, 0x1
bne _080629BA
add r1, sp, 0x4C
ldr r0, _080629B0
b _080629C2
.align 2, 0
_080629AC: .4byte gUnknown_8106C30
_080629B0: .4byte gUnknown_8106C00
_080629B4:
bl sub_8083D08
b _08062AF4
_080629BA:
cmp r6, 0x2
bne _080629CA
add r1, sp, 0x4C
ldr r0, _08062A38
_080629C2:
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
_080629CA:
add r0, sp, 0x4
adds r1, r4, 0
movs r2, 0
bl sub_8061130
movs r0, 0x1
bl sub_80073B8
ldr r0, _08062A3C
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x4
movs r1, 0x3
movs r3, 0x1
bl xxx_call_draw_string
movs r0, 0x1
bl sub_80073E0
ldr r0, _08062A40
mov r9, r0
add r7, sp, 0x8
ldr r1, _08062A44
mov r10, r1
_080629FC:
mov r2, r10
movs r3, 0x18
ldrsh r0, [r2, r3]
lsls r0, 2
adds r0, r7, r0
ldr r5, [r0]
cmp r5, 0
blt _08062A70
ldr r0, _08062A48
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08062A4C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08062A5A
cmp r9, r5
beq _08062A5A
cmp r6, 0x1
bne _08062A50
adds r0, r4, 0
bl sub_8062B74
b _08062A5A
.align 2, 0
_08062A38: .4byte gUnknown_8106C18
_08062A3C: .4byte gUnknown_80FE950
_08062A40: .4byte 0xfffffc27
_08062A44: .4byte gUnknown_202EE10
_08062A48: .4byte gUnknown_203B418
_08062A4C: .4byte 0x0001357c
_08062A50:
cmp r6, 0x2
bne _08062A5A
adds r0, r4, 0
bl sub_8062CA8
_08062A5A:
mov r9, r5
adds r0, r4, 0
movs r1, 0
bl sub_806A2BC
adds r0, r4, 0x4
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
_08062A70:
ldr r5, _08062B40
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
ldr r4, _08062B44
ldrh r1, [r4, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08062A98
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_08062A98:
ldrh r1, [r4, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08062AB0
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_08062AB0:
ldrh r1, [r4, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062AC4
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08062AD8
_08062AC4:
movs r3, 0x18
ldrsh r0, [r5, r3]
add r1, sp, 0x18
adds r1, r0
ldrb r0, [r1]
cmp r0, 0
beq _08062AD4
b _080629B4
_08062AD4:
bl sub_8083D30
_08062AD8:
ldr r0, _08062B44
ldrh r1, [r0, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08062AEC
ldr r5, _08062B48
ldrb r0, [r5]
cmp r0, 0
beq _080629FC
_08062AEC:
bl sub_8083D30
movs r0, 0x1
str r0, [sp, 0x7C]
_08062AF4:
ldr r4, _08062B40
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
bl sub_804AA60
bl sub_8083600
movs r1, 0
bl sub_806A2BC
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x4
movs r1, 0x3E
bl sub_803E708
ldr r1, [sp, 0x7C]
cmp r1, 0
bne _08062B3C
movs r2, 0x18
ldrsh r0, [r4, r2]
lsls r0, 2
adds r0, r7, r0
ldr r5, [r0]
mov r3, r8
cmp r3, 0
beq _08062B38
str r5, [r3]
_08062B38:
cmp r5, 0
bge _08062B4C
_08062B3C:
movs r0, 0
b _08062B5A
.align 2, 0
_08062B40: .4byte gUnknown_202EE10
_08062B44: .4byte gUnknown_20255F0
_08062B48: .4byte gUnknown_202EE3A
_08062B4C:
ldr r0, _08062B6C
ldr r0, [r0]
lsls r1, r5, 2
ldr r5, _08062B70
adds r0, r5
adds r0, r1
ldr r0, [r0]
_08062B5A:
add sp, 0x80
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08062B6C: .4byte gUnknown_203B418
_08062B70: .4byte 0x0001357c
thumb_func_end sub_8062978
thumb_func_start sub_8062B74
sub_8062B74:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
mov r10, r0
ldr r0, [r0, 0x70]
mov r9, r0
movs r0, 0x2
bl sub_8008C54
movs r0, 0x2
bl sub_80073B8
ldr r0, _08062BD0
mov r1, r10
movs r2, 0
bl sub_8045B94
ldr r0, _08062BD4
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0x2
bl sub_8014FF0
movs r1, 0x10
mov r8, r1
mov r0, r9
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _08062BDE
mov r0, r9
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08062BCA
cmp r0, 0x47
bne _08062BD8
_08062BCA:
movs r0, 0x1
b _08062BDA
.align 2, 0
_08062BD0: .4byte gUnknown_202DF98
_08062BD4: .4byte gUnknown_80FE978
_08062BD8:
movs r0, 0
_08062BDA:
cmp r0, 0
beq _08062BF4
_08062BDE:
ldr r2, _08062BF0
movs r0, 0
str r0, [sp]
movs r0, 0xC
mov r1, r8
movs r3, 0x2
bl sub_8014FF0
b _08062C8A
.align 2, 0
_08062BF0: .4byte gUnknown_8106C90
_08062BF4:
movs r7, 0
movs r4, 0x8C
lsls r4, 1
add r4, r9
adds r5, r4, 0
_08062BFE:
add r0, sp, 0x4
movs r1, 0
movs r2, 0xC
bl memset
movs r0, 0x6A
str r0, [sp, 0x8]
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08062C80
mov r1, r9
ldrb r0, [r1, 0x7]
cmp r0, 0
beq _08062C22
movs r0, 0x2
b _08062C24
_08062C22:
movs r0, 0x4
_08062C24:
str r0, [sp, 0x4]
mov r0, r10
adds r1, r5, 0
movs r2, 0x1
bl sub_80573CC
add r1, sp, 0x4
movs r2, 0
lsls r0, 24
cmp r0, 0
bne _08062C3C
movs r2, 0x1
_08062C3C:
strb r2, [r1, 0x8]
ldr r0, _08062CA0
adds r1, r5, 0
add r2, sp, 0x4
bl sub_80928C0
ldrb r1, [r4]
movs r0, 0x2
ands r0, r1
movs r6, 0xD
cmp r0, 0
bne _08062C6C
movs r6, 0x8
cmp r7, 0
beq _08062C6C
mov r2, r8
subs r2, 0x2
movs r0, 0x7
str r0, [sp]
movs r0, 0x2
movs r1, 0xC
movs r3, 0x78
bl sub_80078A4
_08062C6C:
movs r0, 0
str r0, [sp]
adds r0, r6, 0
mov r1, r8
ldr r2, _08062CA4
movs r3, 0x2
bl sub_8014FF0
movs r0, 0xC
add r8, r0
_08062C80:
adds r4, 0x8
adds r5, 0x8
adds r7, 0x1
cmp r7, 0x3
ble _08062BFE
_08062C8A:
movs r0, 0x2
bl sub_80073E0
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08062CA0: .4byte gUnknown_202DE58
_08062CA4: .4byte gUnknown_8106C98
thumb_func_end sub_8062B74
thumb_func_start sub_8062CA8
sub_8062CA8:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
ldr r5, [r4, 0x70]
movs r0, 0x2
bl sub_8008C54
movs r0, 0x2
bl sub_80073B8
ldr r0, _08062CF8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08062CFC
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0x2
bl sub_8014FF0
movs r7, 0x8
movs r6, 0x12
adds r0, r5, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _08062D08
adds r0, r5, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08062CF4
cmp r0, 0x47
bne _08062D00
_08062CF4:
movs r0, 0x1
b _08062D02
.align 2, 0
_08062CF8: .4byte gUnknown_202DF98
_08062CFC: .4byte gUnknown_80FE940
_08062D00:
movs r0, 0
_08062D02:
adds r4, r0, 0
cmp r4, 0
beq _08062D18
_08062D08:
ldr r2, _08062D14
movs r0, 0
str r0, [sp]
movs r0, 0x8
b _08062D2C
.align 2, 0
_08062D14: .4byte gUnknown_8106C90
_08062D18:
adds r2, r5, 0
adds r2, 0x60
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08062D3C
ldr r2, _08062D38
str r4, [sp]
adds r0, r7, 0
_08062D2C:
adds r1, r6, 0
movs r3, 0x2
bl sub_8014FF0
b _08062D52
.align 2, 0
_08062D38: .4byte gUnknown_8106C9C
_08062D3C:
ldr r0, _08062D60
adds r1, r2, 0
bl sub_8045C18
ldr r2, _08062D64
str r4, [sp]
adds r0, r7, 0
adds r1, r6, 0
movs r3, 0x2
bl sub_8014FF0
_08062D52:
movs r0, 0x2
bl sub_80073E0
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08062D60: .4byte gUnknown_202DE58
_08062D64: .4byte gUnknown_8106C98
thumb_func_end sub_8062CA8
thumb_func_start sub_8062D68
sub_8062D68:
push {lr}
ldr r0, _08062D84
movs r1, 0
strh r1, [r0, 0x1E]
strh r1, [r0, 0x20]
strh r1, [r0, 0xC]
strh r1, [r0, 0xE]
strh r1, [r0, 0x14]
adds r0, 0x28
bl sub_801317C
pop {r0}
bx r0
.align 2, 0
_08062D84: .4byte gUnknown_202EE10
thumb_func_end sub_8062D68
thumb_func_start sub_8062D88
sub_8062D88:
movs r0, 0x1
bx lr
thumb_func_end sub_8062D88
thumb_func_start sub_8062D8C
sub_8062D8C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
mov r10, r0
ldrb r5, [r0, 0x4]
ldr r0, _08062E24
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08062E28
adds r0, r2
adds r0, r1
ldr r0, [r0]
str r0, [sp, 0x4]
adds r7, r0, 0
_08062DAE:
movs r0, 0
mov r9, r0
movs r6, 0
movs r4, 0
adds r2, r7, 0x4
mov r8, r2
_08062DBA:
ldr r0, _08062E24
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _08062E28
adds r0, r2
adds r0, r1
ldr r0, [r0]
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _08062DDA
cmp r4, r5
bne _08062DD8
mov r9, r6
_08062DD8:
adds r6, 0x1
_08062DDA:
adds r4, 0x1
cmp r4, 0x3
ble _08062DBA
adds r0, r7, 0
movs r1, 0
bl sub_806A2BC
mov r0, r8
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
movs r0, 0x1
bl sub_8044C10
str r6, [sp]
adds r0, r7, 0
movs r1, 0
movs r2, 0x1
mov r3, r9
bl sub_8062F90
lsls r0, 24
cmp r0, 0
beq _08062E10
b _08062F80
_08062E10:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x6
bne _08062E6C
adds r6, r5, 0
movs r4, 0
b _08062E2E
.align 2, 0
_08062E24: .4byte gUnknown_203B418
_08062E28: .4byte 0x0001357c
_08062E2C:
adds r4, 0x1
_08062E2E:
cmp r4, 0x3
bgt _08062E54
adds r5, 0x1
cmp r5, 0x3
ble _08062E3A
movs r5, 0
_08062E3A:
ldr r0, _08062E64
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08062E68
adds r0, r2
adds r0, r1
ldr r7, [r0]
adds r0, r7, 0
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _08062E2C
_08062E54:
mov r0, r10
strb r5, [r0, 0x4]
cmp r6, r5
beq _08062F32
movs r0, 0
bl sub_8083CE0
b _08062F32
.align 2, 0
_08062E64: .4byte gUnknown_203B418
_08062E68: .4byte 0x0001357c
_08062E6C:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x7
bne _08062EC0
adds r6, r5, 0
movs r4, 0
b _08062E80
_08062E7E:
adds r4, 0x1
_08062E80:
cmp r4, 0x3
bgt _08062EA6
subs r5, 0x1
cmp r5, 0
bge _08062E8C
movs r5, 0x3
_08062E8C:
ldr r0, _08062EB8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08062EBC
adds r0, r2
adds r0, r1
ldr r7, [r0]
adds r0, r7, 0
bl sub_8071A8C
lsls r0, 24
cmp r0, 0
beq _08062E7E
_08062EA6:
mov r0, r10
strb r5, [r0, 0x4]
cmp r6, r5
beq _08062F32
movs r0, 0
bl sub_8083CE0
b _08062F32
.align 2, 0
_08062EB8: .4byte gUnknown_203B418
_08062EBC: .4byte 0x0001357c
_08062EC0:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1D
bne _08062ED6
bl sub_805F1A0
bl sub_80637E8
b _08062F32
_08062ED6:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1E
bne _08062EF6
movs r0, 0
movs r1, 0
bl sub_803EAF0
bl sub_805F1A0
movs r1, 0x1
bl sub_8063A70
b _08062F32
_08062EF6:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x33
bne _08062F16
movs r0, 0
movs r1, 0
bl sub_803EAF0
bl sub_805F1A0
movs r1, 0
bl sub_8063A70
b _08062F32
_08062F16:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1F
bne _08062F3A
movs r0, 0
movs r1, 0
bl sub_803EAF0
bl sub_805F1A0
bl sub_8063B54
_08062F32:
movs r0, 0x1
bl sub_8044C10
b _08062F5E
_08062F3A:
bl sub_805F1AC
lsls r0, 16
lsrs r0, 16
cmp r0, 0x21
bne _08062F5E
movs r0, 0
movs r1, 0
bl sub_803EAF0
bl sub_805F1A0
movs r1, 0x1
bl sub_8063CF0
movs r0, 0x1
bl sub_8044C10
_08062F5E:
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
bne _08062F6A
b _08062DAE
_08062F6A:
ldr r0, [sp, 0x4]
movs r1, 0
bl sub_806A2BC
ldr r0, [sp, 0x4]
adds r0, 0x4
movs r1, 0
movs r2, 0x1
movs r3, 0x1
bl sub_804A728
_08062F80:
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_8062D8C
thumb_func_start sub_8062F90
sub_8062F90:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xE8
mov r8, r0
str r3, [sp, 0xDC]
lsls r1, 24
lsrs r1, 24
str r1, [sp, 0xD4]
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0xD8]
ldr r0, [r0, 0x70]
mov r9, r0
bl sub_8083600
ldr r0, [r0, 0x70]
str r0, [sp, 0xE4]
add r4, sp, 0x70
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x74]
add r0, sp, 0x78
movs r6, 0
movs r1, 0x2
strh r1, [r0]
strh r1, [r0, 0x2]
add r1, sp, 0x7C
movs r0, 0x12
strh r0, [r1]
mov r0, sp
adds r0, 0x7E
movs r1, 0x10
strh r1, [r0]
add r0, sp, 0x80
strh r1, [r0]
add r5, sp, 0xD0
str r5, [sp, 0x84]
movs r1, 0x3
str r1, [sp, 0x8C]
add r0, sp, 0xA0
str r1, [r0, 0x4]
add r0, sp, 0xB8
str r1, [r0, 0x4]
add r0, sp, 0x10
adds r1, r4, 0
movs r2, 0x60
bl memcpy
ldr r0, _080630A4
str r6, [r0]
movs r3, 0
ldr r7, [sp, 0xE4]
adds r7, 0x44
_08063008:
lsls r0, r3, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
mov r1, r9
adds r2, r1, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08063032
ldrb r1, [r2, 0x1]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08063032
movs r0, 0xFD
ands r0, r1
strb r0, [r2, 0x1]
ldr r0, _080630A4
str r3, [r0]
_08063032:
adds r3, 0x1
cmp r3, 0x3
ble _08063008
_08063038:
movs r5, 0
movs r2, 0
str r2, [sp, 0xE0]
mov r10, r2
add r0, sp, 0xD0
str r0, [sp]
add r1, sp, 0x70
str r1, [sp, 0x4]
ldr r2, [sp, 0xDC]
str r2, [sp, 0x8]
ldr r0, [sp, 0x108]
str r0, [sp, 0xC]
mov r0, r8
mov r1, r9
ldr r2, [sp, 0xD4]
add r3, sp, 0x10
bl sub_80633E4
_0806305C:
ldr r0, _080630A8
add r1, sp, 0x70
bl AddMenuCursorSprite_
movs r0, 0x1E
bl sub_803E46C
ldr r2, _080630AC
ldrh r1, [r2, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _080630DE
ldrh r0, [r2]
lsrs r0, 8
movs r1, 0x1
ands r0, r1
ldr r1, _080630A8
movs r2, 0x18
ldrsh r6, [r1, r2]
cmp r0, 0
beq _080630BA
movs r0, 0x8C
lsls r0, 1
add r0, r9
adds r1, r6, 0
bl sub_8092F80
ldr r1, _080630A4
str r0, [r1]
cmp r6, r0
beq _080630B0
movs r0, 0
bl sub_8083CE0
b _080630B4
.align 2, 0
_080630A4: .4byte gUnknown_202F2D8
_080630A8: .4byte gUnknown_202EE10
_080630AC: .4byte gUnknown_20255F0
_080630B0:
bl sub_8083D30
_080630B4:
movs r0, 0x1
mov r10, r0
b _080631F4
_080630BA:
movs r0, 0x8C
lsls r0, 1
add r0, r9
adds r1, r6, 0
bl sub_8092D80
adds r1, r0, 0
ldr r0, _08063118
bl sub_8013780
ldr r1, _08063118
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r6, r0
beq _080630DE
movs r0, 0
bl sub_8083CE0
_080630DE:
ldr r2, _0806311C
ldrh r1, [r2, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08063150
ldrh r0, [r2]
lsrs r0, 8
movs r1, 0x1
ands r0, r1
ldr r4, _08063118
movs r1, 0x18
ldrsh r6, [r4, r1]
cmp r0, 0
beq _0806312E
movs r0, 0x8C
lsls r0, 1
add r0, r9
adds r1, r6, 0
bl sub_8093130
ldr r1, _08063120
str r0, [r1]
cmp r6, r0
beq _08063124
movs r0, 0
bl sub_8083CE0
b _08063128
.align 2, 0
_08063118: .4byte gUnknown_202EE10
_0806311C: .4byte gUnknown_20255F0
_08063120: .4byte gUnknown_202F2D8
_08063124:
bl sub_8083D30
_08063128:
movs r2, 0x1
mov r10, r2
b _080631F4
_0806312E:
movs r0, 0x8C
lsls r0, 1
add r0, r9
adds r1, r6, 0
bl sub_8092DB8
adds r1, r0, 0
adds r0, r4, 0
bl sub_8013780
movs r1, 0x18
ldrsh r0, [r4, r1]
cmp r6, r0
beq _08063150
movs r0, 0
bl sub_8083CE0
_08063150:
ldr r4, _08063174
ldrh r1, [r4, 0x4]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08063168
ldr r6, _08063178
adds r0, r6, 0
adds r0, 0x2B
ldrb r0, [r0]
cmp r0, 0
beq _0806317C
_08063168:
adds r0, r7, 0
movs r1, 0x6
bl sub_8044C94
b _080631F4
.align 2, 0
_08063174: .4byte gUnknown_20255F0
_08063178: .4byte gUnknown_202EE10
_0806317C:
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0806318E
adds r0, r6, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
beq _08063198
_0806318E:
adds r0, r7, 0
movs r1, 0x7
bl sub_8044C94
b _080631F4
_08063198:
bl sub_8062D88
ldrh r1, [r4, 0x2]
ands r0, r1
cmp r0, 0
bne _080631AE
adds r0, r6, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _080631C8
_080631AE:
ldr r2, [sp, 0xD4]
cmp r2, 0
beq _080631C2
ldrh r0, [r4]
lsrs r0, 8
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _080631C2
movs r5, 0x3
_080631C2:
bl sub_8083D08
b _080631F4
_080631C8:
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0806321C
movs r0, 0x4
ands r0, r1
cmp r0, 0
bne _08063214
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080631EC
adds r0, r6, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _080631EC
b _0806305C
_080631EC:
bl sub_8083D30
movs r0, 0x1
str r0, [sp, 0xE0]
_080631F4:
ldr r4, _08063210
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1E
bl sub_803E46C
ldrh r0, [r7]
subs r0, 0x6
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bhi _08063224
b _080633CC
.align 2, 0
_08063210: .4byte gUnknown_202EE10
_08063214:
movs r5, 0x2
bl sub_8083D44
b _080631F4
_0806321C:
movs r5, 0x1
bl sub_8083D44
b _080631F4
_08063224:
mov r1, r10
cmp r1, 0
beq _0806322C
b _08063038
_0806322C:
ldr r2, [sp, 0xE0]
cmp r2, 0
beq _08063234
b _080633B6
_08063234:
ldr r6, _08063270
movs r1, 0x18
ldrsh r0, [r4, r1]
str r0, [r6]
cmp r5, 0x1
bne _08063274
adds r0, r7, 0
movs r1, 0x1D
bl sub_8044C94
mov r0, r8
adds r0, 0x24
ldrb r1, [r0]
ldr r0, [sp, 0xE4]
adds r0, 0x48
strb r1, [r0]
ldr r1, [r6]
ldr r0, [sp, 0xE4]
adds r0, 0x50
strb r1, [r0]
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x8
movs r1, 0x1B
bl sub_803E708
b _080633B6
.align 2, 0
_08063270: .4byte gUnknown_202F2D8
_08063274:
mov r0, r8
ldr r1, [sp, 0xD4]
ldr r2, [sp, 0xD8]
bl sub_8063698
cmp r5, 0x3
bne _08063298
movs r0, 0x20
bl sub_8044FB4
adds r6, r0, 0
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _080632CC
movs r0, 0x21
b _080632BC
_08063298:
cmp r5, 0x2
bne _080632DE
mov r2, r9
ldrb r0, [r2, 0x7]
cmp r0, 0
beq _080632BA
movs r0, 0x1E
bl sub_8044FB4
adds r6, r0, 0
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _080632CC
movs r0, 0x33
b _080632BC
_080632BA:
movs r0, 0x1F
_080632BC:
bl sub_8044FB4
adds r6, r0, 0
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _080632DE
_080632CC:
mov r0, r8
bl sub_8045B60
adds r2, r0, 0
adds r0, r7, 0
adds r1, r6, 0
bl sub_80637BC
b _080633B6
_080632DE:
movs r0, 0x2
bl sub_8009524
add r0, sp, 0x10
movs r1, 0x16
bl sub_805FC30
ldr r6, _0806337C
ldr r5, _08063380
movs r0, 0x2A
adds r0, r6
mov r10, r0
adds r4, r7, 0
_080632F8:
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _0806331C
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_80136E0
_0806331C:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08063334
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_8013744
_08063334:
bl sub_8062D88
ldrh r1, [r5, 0x2]
ands r1, r0
cmp r1, 0
bne _0806334A
adds r0, r6, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08063388
_0806334A:
movs r1, 0x18
ldrsh r0, [r6, r1]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _08063384
mov r0, r8
bl sub_8045B60
adds r1, r0, 0
adds r0, r4, 0
bl sub_80637A4
ldrh r0, [r4]
subs r0, 0x14
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bls _08063376
bl sub_8083D08
_08063376:
movs r6, 0
b _080633A0
.align 2, 0
_0806337C: .4byte gUnknown_202EE10
_08063380: .4byte gUnknown_20255F0
_08063384:
bl sub_8083D30
_08063388:
ldrh r1, [r5, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0806339A
mov r2, r10
ldrb r0, [r2]
cmp r0, 0
beq _080632F8
_0806339A:
bl sub_8083D30
movs r6, 0x1
_080633A0:
ldr r0, _080633E0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
cmp r6, 0x1
bne _080633B2
b _08063038
_080633B2:
movs r0, 0
str r0, [sp, 0xE0]
_080633B6:
movs r0, 0x1
cmp r0, 0
beq _080633CC
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x8
movs r1, 0x1E
bl sub_803E708
_080633CC:
ldr r0, [sp, 0xE0]
add sp, 0xE8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080633E0: .4byte gUnknown_202EE10
thumb_func_end sub_8062F90
thumb_func_start sub_80633E4
sub_80633E4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
str r0, [sp, 0x20]
adds r7, r1, 0
adds r4, r3, 0
ldr r0, [sp, 0x44]
mov r8, r0
lsls r2, 24
lsrs r2, 24
mov r10, r2
add r1, sp, 0x8
ldr r0, _08063508
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
movs r0, 0
add r5, sp, 0x50
ldrb r6, [r5]
mov r5, r8
strb r6, [r5]
add r6, sp, 0x4C
ldrb r6, [r6]
strb r6, [r5, 0x1]
strb r0, [r5, 0x3]
movs r6, 0
ldr r5, _0806350C
ldr r0, _08063510
mov r9, r0
movs r1, 0x1
mov r12, r1
movs r3, 0x8C
lsls r3, 1
adds r2, r7, r3
movs r3, 0x3
_08063432:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _0806343E
adds r6, 0x1
_0806343E:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08063432
movs r3, 0x4
mov r1, r9
ldr r0, [r1]
movs r1, 0
strh r0, [r5, 0x18]
strh r6, [r5, 0x1A]
strh r3, [r5, 0x1C]
add r2, sp, 0x4C
ldrh r2, [r2]
strh r2, [r5, 0x1E]
add r3, sp, 0x50
ldrh r3, [r3]
strh r3, [r5, 0x20]
strh r1, [r5, 0x4]
movs r0, 0x10
strh r0, [r5, 0x6]
strh r1, [r5, 0x14]
str r1, [r5]
adds r0, r5, 0
adds r0, 0x28
bl sub_801317C
movs r0, 0x4
movs r1, 0xC
bl sub_80095E4
adds r0, 0x2
strh r0, [r4, 0x10]
strh r0, [r4, 0xE]
movs r0, 0xD
mov r6, r8
strb r0, [r6, 0x2]
movs r0, 0x2
strh r0, [r4, 0x8]
adds r1, r4, 0
adds r1, 0x18
adds r0, r4, 0
adds r0, 0x48
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
adds r1, r4, 0
adds r1, 0x30
add r0, sp, 0x8
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
adds r0, r4, 0
movs r1, 0x1
bl sub_803ECB4
adds r0, r5, 0
movs r1, 0
bl sub_80137B0
ldr r1, _08063514
movs r2, 0
ldrsh r0, [r1, r2]
adds r0, 0x10
lsls r0, 3
strh r0, [r5, 0xC]
movs r3, 0x2
ldrsh r0, [r1, r3]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r5, 0xE]
ldr r0, _08063518
adds r1, r7, 0
movs r2, 0
bl sub_80708B4
movs r3, 0
movs r5, 0x1
_080634DE:
lsls r1, r3, 3
movs r4, 0x8C
lsls r4, 1
adds r1, r4
adds r1, r7, r1
ldr r6, [sp, 0x48]
adds r4, r6, r3
movs r0, 0
strb r0, [r4]
ldrb r1, [r1]
adds r2, r5, 0
ands r2, r1
cmp r2, 0
bne _0806351C
ldr r1, _0806350C
movs r4, 0x18
ldrsh r0, [r1, r4]
cmp r0, r3
bne _08063526
strh r2, [r1, 0x18]
b _08063526
.align 2, 0
_08063508: .4byte gUnknown_8106CAC
_0806350C: .4byte gUnknown_202EE10
_08063510: .4byte gUnknown_202F2D8
_08063514: .4byte gUnknown_2027370
_08063518: .4byte gUnknown_202DF98
_0806351C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08063526
strb r5, [r4]
_08063526:
adds r3, 0x1
cmp r3, 0x3
ble _080634DE
movs r5, 0x8C
lsls r5, 1
adds r2, r7, r5
mov r6, r10
str r6, [sp]
ldr r0, [sp, 0x4C]
str r0, [sp, 0x4]
movs r0, 0x4
ldr r1, [sp, 0x20]
movs r3, 0
bl sub_8063578
movs r0, 0x2
bl sub_80073B8
ldr r0, _08063574
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x4
movs r1, 0
movs r3, 0x2
bl sub_8014FF0
movs r0, 0x2
bl sub_80073E0
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08063574: .4byte gUnknown_80FDFE8
thumb_func_end sub_80633E4
thumb_func_start sub_8063578
sub_8063578:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
str r0, [sp, 0x10]
str r1, [sp, 0x14]
adds r5, r2, 0
mov r8, r3
ldr r0, [sp, 0x40]
ldr r4, [sp, 0x44]
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x18]
ldr r0, [r1, 0x70]
str r0, [sp, 0x1C]
mov r0, r8
bl sub_80073B8
ldr r0, _080635FC
ldr r1, [sp, 0x14]
movs r2, 0
bl sub_8045B94
lsls r4, 3
adds r4, 0xA
ldr r0, _08063600
ldr r2, [r0]
movs r0, 0
str r0, [sp]
adds r0, r4, 0
movs r1, 0
mov r3, r8
bl sub_8014FF0
movs r1, 0
mov r9, r1
ldr r0, [sp, 0x10]
cmp r9, r0
bge _08063676
add r1, sp, 0x4
mov r10, r1
adds r7, r5, 0
_080635D0:
movs r0, 0
str r0, [sp, 0x4]
movs r0, 0x6A
str r0, [sp, 0x8]
movs r0, 0
mov r1, r10
strb r0, [r1, 0x8]
mov r1, sp
ldrb r0, [r1, 0x18]
mov r1, r10
strb r0, [r1, 0x9]
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08063668
ldr r1, [sp, 0x1C]
ldrb r0, [r1, 0x7]
cmp r0, 0
beq _08063604
movs r0, 0x2
b _08063606
.align 2, 0
_080635FC: .4byte gUnknown_202DF98
_08063600: .4byte gUnknown_80FE978
_08063604:
movs r0, 0x4
_08063606:
str r0, [sp, 0x4]
ldr r0, [sp, 0x14]
adds r1, r5, 0
movs r2, 0x1
bl sub_80573CC
add r1, sp, 0x4
movs r2, 0
lsls r0, 24
cmp r0, 0
bne _0806361E
movs r2, 0x1
_0806361E:
strb r2, [r1, 0x8]
ldr r0, _0806368C
adds r1, r5, 0
add r2, sp, 0x4
bl sub_80928C0
ldr r0, _08063690
mov r1, r9
bl sub_8013800
adds r4, r0, 0
ldrb r1, [r7]
movs r0, 0x2
ands r0, r1
movs r6, 0xD
cmp r0, 0
bne _08063658
movs r6, 0x8
mov r0, r9
cmp r0, 0
beq _08063658
subs r2, r4, 0x2
movs r0, 0x7
str r0, [sp]
mov r0, r8
movs r1, 0xC
movs r3, 0x78
bl sub_80078A4
_08063658:
movs r1, 0
str r1, [sp]
adds r0, r6, 0
adds r1, r4, 0
ldr r2, _08063694
mov r3, r8
bl sub_8014FF0
_08063668:
adds r7, 0x8
adds r5, 0x8
movs r0, 0x1
add r9, r0
ldr r1, [sp, 0x10]
cmp r9, r1
blt _080635D0
_08063676:
mov r0, r8
bl sub_80073E0
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806368C: .4byte gUnknown_202DE58
_08063690: .4byte gUnknown_202EE10
_08063694: .4byte gUnknown_8106CC4
thumb_func_end sub_8063578
thumb_func_start sub_8063698
sub_8063698:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
lsls r1, 24
lsrs r6, r1, 24
lsls r2, 24
lsrs r7, r2, 24
ldr r4, [r0, 0x70]
ldr r0, _080636E8
ldr r0, [r0]
lsls r0, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r5, r4, r0
ldr r1, _080636EC
movs r0, 0
str r0, [r1]
ldrb r0, [r4, 0x7]
cmp r0, 0
beq _080636FA
cmp r7, 0
beq _080636D0
movs r0, 0x14
movs r1, 0
bl sub_8044F5C
_080636D0:
ldrb r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08063702
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080636F0
movs r0, 0x33
b _080636F2
.align 2, 0
_080636E8: .4byte gUnknown_202F2D8
_080636EC: .4byte gUnknown_202EE6C
_080636F0:
movs r0, 0x1E
_080636F2:
movs r1, 0
bl sub_8044F5C
b _08063702
_080636FA:
movs r0, 0x1F
movs r1, 0
bl sub_8044F5C
_08063702:
cmp r6, 0
beq _08063716
movs r0, 0x20
movs r1, 0
bl sub_8044F5C
movs r0, 0x21
movs r1, 0
bl sub_8044F5C
_08063716:
movs r0, 0x1D
movs r1, 0
bl sub_8044F5C
cmp r6, 0
bne _0806372A
movs r0, 0x20
bl sub_8044FF0
b _08063754
_0806372A:
ldr r5, _080637A0
ldr r1, [r5]
adds r0, r4, 0
bl sub_8063C88
lsls r0, 24
cmp r0, 0
bne _08063740
movs r0, 0x20
bl sub_8044FF0
_08063740:
ldr r1, [r5]
adds r0, r4, 0
bl sub_8063DD4
lsls r0, 24
cmp r0, 0
bne _08063754
movs r0, 0x21
bl sub_8044FF0
_08063754:
ldr r5, _080637A0
ldr r1, [r5]
adds r0, r4, 0
bl sub_8063DD4
lsls r0, 24
cmp r0, 0
bne _0806376A
movs r0, 0x21
bl sub_8044FF0
_0806376A:
cmp r7, 0
beq _08063792
movs r0, 0
ldr r1, [r5]
cmp r1, 0x3
bgt _08063788
mov r0, r8
movs r2, 0x1
bl sub_8057348
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r0, r1, 31
_08063788:
cmp r0, 0
bne _08063792
movs r0, 0x14
bl sub_8044FF0
_08063792:
bl sub_8045064
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080637A0: .4byte gUnknown_202F2D8
thumb_func_end sub_8063698
thumb_func_start sub_80637A4
sub_80637A4:
push {lr}
adds r2, r1, 0
ldr r1, _080637B8
movs r3, 0x18
ldrsh r1, [r1, r3]
bl sub_80637BC
pop {r0}
bx r0
.align 2, 0
_080637B8: .4byte gUnknown_202EE10
thumb_func_end sub_80637A4
thumb_func_start sub_80637BC
sub_80637BC:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r2, 0
ldr r0, _080637E0
lsls r1, 2
adds r1, r0
ldrh r1, [r1]
adds r0, r4, 0
bl sub_8044C94
strb r5, [r4, 0x4]
ldr r0, _080637E4
ldr r0, [r0]
strb r0, [r4, 0xC]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080637E0: .4byte gUnknown_202EE44
_080637E4: .4byte gUnknown_202F2D8
thumb_func_end sub_80637BC
thumb_func_start sub_80637E8
sub_80637E8:
push {lr}
adds r3, r0, 0
ldr r0, _08063828
ldr r1, [r0]
ldrb r0, [r3, 0x4]
lsls r0, 2
ldr r2, _0806382C
adds r1, r2
adds r1, r0
ldr r0, [r1]
ldr r0, [r0, 0x70]
ldrb r1, [r3, 0xC]
lsls r1, 3
adds r1, r0, r1
ldr r2, _08063830
adds r2, r1
mov r12, r2
ldrb r2, [r2]
movs r1, 0x2
orrs r1, r2
mov r2, r12
strb r1, [r2]
movs r1, 0x8C
lsls r1, 1
adds r0, r1
ldrb r1, [r3, 0xC]
movs r2, 0x4
bl sub_8063834
pop {r0}
bx r0
.align 2, 0
_08063828: .4byte gUnknown_203B418
_0806382C: .4byte 0x0001357c
_08063830: .4byte 0x00000119
thumb_func_end sub_80637E8
thumb_func_start sub_8063834
sub_8063834:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x7C
str r0, [sp, 0x74]
str r1, [sp, 0x78]
adds r4, r2, 0
mov r0, sp
bl sub_80140B4
add r0, sp, 0x70
str r0, [sp, 0x14]
movs r1, 0x1
mov r9, r1
ldr r3, [sp, 0x78]
adds r3, 0x1
add r2, sp, 0x60
mov r10, r2
cmp r3, r4
bge _08063894
lsls r0, r3, 3
ldr r1, [sp, 0x74]
adds r2, r0, r1
ldrb r1, [r2]
mov r0, r9
ands r0, r1
cmp r0, 0
beq _08063894
movs r6, 0x2
movs r5, 0x1
_08063874:
ldrb r1, [r2]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _08063894
movs r0, 0x1
add r9, r0
adds r2, 0x8
adds r3, 0x1
cmp r3, r4
bge _08063894
ldrb r1, [r2]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _08063874
_08063894:
movs r4, 0
ldr r6, _0806393C
_08063898:
movs r7, 0
mov r1, r9
add r2, sp, 0x70
strb r1, [r2]
adds r1, r2, 0
strb r4, [r1, 0x1]
movs r0, 0xC
strb r0, [r1, 0x2]
strb r7, [r1, 0x3]
strh r4, [r6, 0x1E]
mov r0, r9
strh r0, [r6, 0x20]
ldr r1, _08063940
movs r2, 0
ldrsh r0, [r1, r2]
adds r0, 0x17
lsls r0, 3
strh r0, [r6, 0xC]
movs r2, 0x2
ldrsh r0, [r1, r2]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r6, 0xE]
strh r7, [r6, 0x14]
strh r7, [r6, 0x4]
movs r0, 0x10
strh r0, [r6, 0x6]
str r7, [r6]
adds r0, r6, 0
adds r0, 0x28
bl sub_801317C
strh r7, [r6, 0x18]
strh r7, [r6, 0x1A]
strh r7, [r6, 0x1C]
mov r0, sp
movs r1, 0x1
bl sub_803ECB4
ldr r0, [sp, 0x78]
adds r1, r0, r4
lsls r1, 3
ldr r2, [sp, 0x74]
adds r1, r2, r1
adds r0, r4, 0
movs r2, 0
mov r3, r10
bl sub_8093DE8
mov r8, r0
_080638FE:
mov r0, r8
cmp r0, 0
beq _08063908
bl sub_8062500
_08063908:
ldr r5, _08063944
adds r0, r5, 0
movs r1, 0
bl nullsub_34
movs r0, 0x1C
bl sub_803E46C
bl sub_8062D88
ldr r1, _08063948
ldrh r1, [r1, 0x2]
ands r0, r1
cmp r0, 0
bne _0806392C
ldrb r0, [r5, 0x1]
cmp r0, 0
beq _0806394C
_0806392C:
bl sub_8083D08
movs r7, 0x1
mov r1, r8
cmp r1, 0
beq _080639AE
movs r7, 0x2
b _080639AE
.align 2, 0
_0806393C: .4byte gUnknown_202EE10
_08063940: .4byte gUnknown_2027370
_08063944: .4byte gUnknown_202EE38
_08063948: .4byte gUnknown_20255F0
_0806394C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0806395A
ldrb r0, [r5, 0x2]
cmp r0, 0
beq _08063962
_0806395A:
bl sub_8083D30
movs r7, 0x1
b _080639AE
_08063962:
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08063970
ldrb r0, [r5, 0x4]
cmp r0, 0
beq _08063986
_08063970:
adds r0, r4, 0
cmp r4, 0
bne _08063978
mov r4, r9
_08063978:
subs r4, 0x1
cmp r0, r4
beq _080639AE
movs r0, 0
bl sub_8083CE0
b _080639AE
_08063986:
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08063994
ldrb r0, [r5, 0x3]
cmp r0, 0
beq _080638FE
_08063994:
adds r1, r4, 0
mov r0, r9
subs r0, 0x1
cmp r4, r0
bne _080639A2
movs r4, 0
b _080639A4
_080639A2:
adds r4, 0x1
_080639A4:
cmp r1, r4
beq _080639AE
movs r0, 0
bl sub_8083CE0
_080639AE:
cmp r7, 0x1
beq _080639CA
cmp r7, 0
bne _080639B8
b _08063898
_080639B8:
mov r2, r8
cmp r2, 0
bne _080639C0
b _08063898
_080639C0:
mov r0, r8
mov r1, r10
bl sub_80625A4
b _08063898
_080639CA:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0x7C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8063834
thumb_func_start sub_80639E4
sub_80639E4:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
adds r6, r1, 0
ldr r4, _08063A5C
adds r0, r4, 0
bl sub_80140B4
ldr r0, _08063A60
str r0, [r4, 0x14]
adds r0, r4, 0
movs r1, 0x1
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
ldr r0, _08063A64
ldr r1, [r5]
bl strcpy
ldr r2, _08063A68
movs r4, 0
str r4, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldr r2, [r5, 0x4]
str r4, [sp]
movs r0, 0x4
movs r1, 0x10
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
ldr r0, _08063A6C
strh r4, [r0, 0x1E]
strh r4, [r0, 0x20]
strh r4, [r0, 0xC]
strh r4, [r0, 0xE]
strh r4, [r0, 0x14]
strh r4, [r0, 0x4]
movs r1, 0x10
strh r1, [r0, 0x6]
str r4, [r0]
strh r4, [r0, 0x18]
strh r4, [r0, 0x1A]
strh r4, [r0, 0x1C]
adds r0, r6, 0
bl sub_801317C
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08063A5C: .4byte gUnknown_202F278
_08063A60: .4byte gUnknown_8106CC8
_08063A64: .4byte gUnknown_202DF98
_08063A68: .4byte gUnknown_8106CCC
_08063A6C: .4byte gUnknown_202EE10
thumb_func_end sub_80639E4
thumb_func_start sub_8063A70
sub_8063A70:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
lsls r1, 24
lsrs r1, 24
mov r10, r1
ldr r1, _08063B1C
ldr r2, [r1]
ldrb r1, [r0, 0x4]
lsls r1, 2
ldr r3, _08063B20
adds r2, r3
adds r2, r1
ldr r6, [r2]
ldr r5, [r6, 0x70]
ldrb r0, [r0, 0xC]
lsls r0, 3
movs r2, 0x8C
lsls r2, 1
adds r0, r2
adds r4, r5, r0
ldrb r1, [r4]
movs r0, 0x8
ands r0, r1
lsls r0, 24
lsrs r0, 24
negs r0, r0
lsrs r0, 31
mov r8, r0
ldr r0, _08063B24
mov r9, r0
movs r1, 0x1
mov r12, r1
adds r2, r5, r2
movs r7, 0xF7
movs r3, 0x3
_08063ABC:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _08063ACC
adds r0, r7, 0
ands r0, r1
strb r0, [r2]
_08063ACC:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08063ABC
mov r0, r9
adds r1, r4, 0
movs r2, 0
bl sub_80928C0
mov r3, r8
cmp r3, 0
bne _08063AEC
ldrb r1, [r4]
movs r0, 0x8
orrs r0, r1
strb r0, [r4]
_08063AEC:
movs r1, 0x8C
lsls r1, 1
adds r0, r5, r1
bl sub_80936D8
ldrb r1, [r4, 0x1]
movs r0, 0x2
orrs r0, r1
strb r0, [r4, 0x1]
ldr r0, _08063B28
bl sub_8083E38
mov r3, r10
cmp r3, 0
beq _08063B42
mov r0, r8
cmp r0, 0
bne _08063B30
ldr r0, _08063B2C
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _08063B3A
.align 2, 0
_08063B1C: .4byte gUnknown_203B418
_08063B20: .4byte 0x0001357c
_08063B24: .4byte gUnknown_202DE58
_08063B28: .4byte 0x00000133
_08063B2C: .4byte gUnknown_80F8B40
_08063B30:
ldr r0, _08063B50
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
_08063B3A:
movs r0, 0x78
movs r1, 0x1F
bl sub_803E708
_08063B42:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08063B50: .4byte gUnknown_80F8B64
thumb_func_end sub_8063A70
thumb_func_start sub_8063B54
sub_8063B54:
push {r4-r6,lr}
ldr r1, _08063BA4
ldr r2, [r1]
ldrb r1, [r0, 0x4]
lsls r1, 2
ldr r3, _08063BA8
adds r2, r3
adds r2, r1
ldr r1, [r2]
ldr r5, [r1, 0x70]
ldrb r4, [r0, 0xC]
lsls r4, 3
movs r6, 0x8C
lsls r6, 1
adds r4, r6
adds r4, r5, r4
ldr r0, _08063BAC
adds r1, r4, 0
movs r2, 0
bl sub_80928C0
ldrb r0, [r4]
movs r1, 0x4
eors r0, r1
strb r0, [r4]
adds r5, r6
adds r0, r5, 0
bl sub_80936D8
ldrb r1, [r4, 0x1]
movs r0, 0x2
orrs r0, r1
strb r0, [r4, 0x1]
ldr r0, _08063BB0
bl sub_8083E38
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08063BA4: .4byte gUnknown_203B418
_08063BA8: .4byte 0x0001357c
_08063BAC: .4byte gUnknown_202DE58
_08063BB0: .4byte 0x00000133
thumb_func_end sub_8063B54
thumb_func_start sub_8063BB4
sub_8063BB4:
push {r4-r7,lr}
ldr r1, _08063C70
ldr r2, [r1]
ldrb r1, [r0, 0x4]
lsls r1, 2
ldr r3, _08063C74
adds r2, r3
adds r2, r1
ldr r1, [r2]
ldr r6, [r1, 0x70]
ldrb r5, [r0, 0xC]
ldr r0, _08063C78
lsls r4, r5, 3
movs r7, 0x8C
lsls r7, 1
adds r1, r4, r7
adds r1, r6, r1
movs r2, 0
bl sub_80928C0
adds r4, r6, r4
ldr r0, _08063C7C
adds r2, r4, r0
ldrb r1, [r2]
movs r0, 0x2
orrs r0, r1
strb r0, [r2]
movs r3, 0
adds r5, 0x1
cmp r5, 0x3
bgt _08063C2C
lsls r2, r5, 3
adds r0, r2, r6
adds r1, r7, 0
adds r0, r1
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08063C2C
adds r0, r2, r7
adds r2, r0, r6
movs r4, 0x2
_08063C0A:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _08063C2C
adds r3, 0x1
cmp r3, 0x3
bgt _08063C2C
adds r2, 0x8
adds r5, 0x1
cmp r5, 0x3
bgt _08063C2C
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08063C0A
_08063C2C:
lsls r0, r5, 3
adds r0, r6
movs r4, 0x8C
lsls r4, 1
adds r0, r4
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08063C42
movs r5, 0x4
_08063C42:
cmp r5, 0x3
bgt _08063C5C
lsls r1, r5, 3
adds r1, r4
adds r1, r6, r1
ldrb r2, [r1]
movs r0, 0x2
orrs r0, r2
strb r0, [r1]
ldr r0, _08063C80
movs r2, 0
bl sub_80928C0
_08063C5C:
adds r0, r6, r4
bl sub_80936D8
ldr r0, _08063C84
bl sub_8083E38
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08063C70: .4byte gUnknown_203B418
_08063C74: .4byte 0x0001357c
_08063C78: .4byte gUnknown_202DE58
_08063C7C: .4byte 0x00000119
_08063C80: .4byte gUnknown_202DEA8
_08063C84: .4byte 0x00000133
thumb_func_end sub_8063BB4
thumb_func_start sub_8063C88
sub_8063C88:
push {r4-r7,lr}
adds r4, r0, 0
movs r7, 0
adds r5, r1, 0
lsls r0, r5, 3
adds r0, r4, r0
movs r1, 0x8D
lsls r1, 1
adds r0, r1
ldrh r0, [r0]
bl sub_809422C
lsls r0, 24
cmp r0, 0
beq _08063CAE
_08063CA6:
movs r0, 0
b _08063CEA
_08063CAA:
movs r7, 0x1
b _08063CE8
_08063CAE:
adds r5, 0x1
movs r6, 0
lsls r0, r5, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r4, r0, r4
_08063CBC:
ldrh r0, [r4, 0x2]
bl sub_809422C
lsls r0, 24
cmp r0, 0
bne _08063CA6
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08063CE8
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08063CAA
adds r4, 0x8
adds r5, 0x1
cmp r5, 0x3
bgt _08063CE8
adds r6, 0x1
cmp r6, 0x3
ble _08063CBC
_08063CE8:
adds r0, r7, 0
_08063CEA:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8063C88
thumb_func_start sub_8063CF0
sub_8063CF0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
lsls r1, 24
lsrs r1, 24
mov r10, r1
ldr r1, _08063D98
ldr r2, [r1]
ldrb r1, [r0, 0x4]
lsls r1, 2
ldr r3, _08063D9C
adds r2, r3
adds r2, r1
ldr r7, [r2]
ldr r6, [r7, 0x70]
ldrb r5, [r0, 0xC]
movs r0, 0
mov r8, r0
ldr r0, _08063DA0
lsls r4, r5, 3
movs r1, 0x8C
lsls r1, 1
mov r9, r1
adds r1, r4, r1
adds r1, r6, r1
movs r2, 0
bl sub_80928C0
adds r4, r6, r4
ldr r3, _08063DA4
adds r2, r4, r3
ldrb r1, [r2]
movs r0, 0x2
orrs r0, r1
strb r0, [r2]
adds r5, 0x1
movs r3, 0
cmp r5, 0x3
bgt _08063D70
movs r0, 0x2
mov r12, r0
lsls r0, r5, 3
add r0, r9
adds r2, r0, r6
movs r4, 0xFD
_08063D4E:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _08063D70
adds r0, r4, 0
ands r0, r1
strb r0, [r2]
movs r1, 0x1
mov r8, r1
adds r2, 0x8
adds r5, 0x1
adds r3, 0x1
cmp r3, 0x3
bgt _08063D70
cmp r5, 0x3
ble _08063D4E
_08063D70:
movs r2, 0x8C
lsls r2, 1
adds r0, r6, r2
bl sub_80936D8
ldr r0, _08063DA8
bl sub_8083E38
mov r3, r10
cmp r3, 0
beq _08063DC2
mov r0, r8
cmp r0, 0
beq _08063DB0
ldr r0, _08063DAC
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _08063DBA
.align 2, 0
_08063D98: .4byte gUnknown_203B418
_08063D9C: .4byte 0x0001357c
_08063DA0: .4byte gUnknown_202DE58
_08063DA4: .4byte 0x00000119
_08063DA8: .4byte 0x00000133
_08063DAC: .4byte gUnknown_80F8B88
_08063DB0:
ldr r0, _08063DD0
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
_08063DBA:
movs r0, 0x78
movs r1, 0x1F
bl sub_803E708
_08063DC2:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08063DD0: .4byte gUnknown_80F8BB4
thumb_func_end sub_8063CF0
thumb_func_start sub_8063DD4
sub_8063DD4:
push {r4-r7,lr}
adds r3, r0, 0
adds r2, r1, 0
movs r5, 0
adds r2, 0x1
movs r4, 0
cmp r2, 0x3
bgt _08063E20
lsls r0, r2, 3
movs r6, 0x8C
lsls r6, 1
adds r0, r6
adds r0, r3, r0
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08063E20
movs r5, 0x1
adds r2, 0x1
movs r7, 0x2
lsls r0, r2, 3
adds r0, r6
adds r3, r0, r3
_08063E04:
adds r4, 0x1
cmp r4, 0x3
bgt _08063E20
cmp r2, 0x3
bgt _08063E20
ldrb r1, [r3]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08063E20
movs r5, 0x1
adds r3, 0x8
adds r2, 0x1
b _08063E04
_08063E20:
cmp r5, 0
bne _08063E28
movs r0, 0
b _08063E2A
_08063E28:
movs r0, 0x1
_08063E2A:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8063DD4
thumb_func_start sub_8063E30
sub_8063E30:
push {r4-r7,lr}
adds r5, r0, 0
adds r1, 0x1
movs r4, 0
cmp r1, 0x7
bgt _08063E62
movs r7, 0x2
movs r6, 0xFD
lsls r0, r1, 3
adds r3, r0, r5
_08063E44:
ldrb r2, [r3]
adds r0, r7, 0
ands r0, r2
cmp r0, 0
beq _08063E62
adds r0, r6, 0
ands r0, r2
strb r0, [r3]
adds r3, 0x8
adds r1, 0x1
adds r4, 0x1
cmp r4, 0x7
bgt _08063E62
cmp r1, 0x7
ble _08063E44
_08063E62:
adds r0, r5, 0
bl sub_80936F4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8063E30
thumb_func_start sub_8063E70
sub_8063E70:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xD0
str r0, [sp, 0xC4]
adds r7, r1, 0
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0xC8]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0xCC]
add r4, sp, 0x60
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x64]
add r0, sp, 0x68
movs r6, 0
movs r1, 0x2
strh r1, [r0]
strh r1, [r0, 0x2]
add r1, sp, 0x6C
movs r0, 0x12
strh r0, [r1]
mov r0, sp
adds r0, 0x6E
movs r1, 0x10
strh r1, [r0]
add r0, sp, 0x70
strh r1, [r0]
add r5, sp, 0xC0
str r5, [sp, 0x74]
movs r1, 0x3
str r1, [sp, 0x7C]
add r0, sp, 0x90
str r1, [r0, 0x4]
add r0, sp, 0xA8
str r1, [r0, 0x4]
mov r0, sp
adds r1, r4, 0
movs r2, 0x60
bl memcpy
ldr r0, _08063F80
str r6, [r0]
ldr r1, _08063F84
mov r8, r1
mov r9, r0
ldr r2, _08063F88
mov r10, r2
_08063EE0:
ldr r0, [sp, 0xC4]
adds r1, r7, 0
mov r2, sp
add r3, sp, 0xC0
bl sub_8064228
_08063EEC:
mov r0, r8
bl AddMenuCursorSprite
movs r0, 0x1E
bl sub_803E46C
mov r0, r10
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08063F2A
mov r1, r8
movs r2, 0x18
ldrsh r4, [r1, r2]
adds r0, r7, 0
adds r1, r4, 0
bl sub_8092E1C
adds r1, r0, 0
mov r0, r8
bl sub_8013780
mov r1, r8
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r4, r0
beq _08063F2A
movs r0, 0
bl sub_8083CE0
_08063F2A:
mov r0, r10
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08063F5C
mov r1, r8
movs r2, 0x18
ldrsh r4, [r1, r2]
adds r0, r7, 0
adds r1, r4, 0
bl sub_8092E8C
adds r1, r0, 0
mov r0, r8
bl sub_8013780
mov r1, r8
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r4, r0
beq _08063F5C
movs r0, 0
bl sub_8083CE0
_08063F5C:
bl sub_8062D88
mov r2, r10
ldrh r1, [r2, 0x2]
ands r0, r1
cmp r0, 0
bne _08063F76
ldr r2, _08063F84
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08063F8C
_08063F76:
bl sub_8083D08
movs r4, 0
b _08063FB2
.align 2, 0
_08063F80: .4byte gUnknown_202F2D8
_08063F84: .4byte gUnknown_202EE10
_08063F88: .4byte gUnknown_20255F0
_08063F8C:
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _08063FD4
ldr r0, [sp, 0xCC]
cmp r0, 0
beq _08063EEC
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08063FAC
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
beq _08063EEC
_08063FAC:
bl sub_8083D30
movs r4, 0x1
_08063FB2:
ldr r5, _08063FD0
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x1E
bl sub_803E46C
cmp r4, 0x1
bne _08063FDC
movs r0, 0x1
negs r0, r0
mov r1, r9
str r0, [r1]
b _080640FA
.align 2, 0
_08063FD0: .4byte gUnknown_202EE10
_08063FD4:
bl sub_8083D44
movs r4, 0x2
b _08063FB2
_08063FDC:
ldr r6, _08064004
movs r2, 0x18
ldrsh r0, [r5, r2]
str r0, [r6]
cmp r4, 0x2
bne _08064008
movs r0, 0
movs r1, 0
bl sub_803EAF0
movs r0, 0x8
movs r1, 0x1B
bl sub_803E708
ldr r1, [r6]
adds r0, r7, 0
movs r2, 0x4
bl sub_8063834
b _08063EE0
.align 2, 0
_08064004: .4byte gUnknown_202F2D8
_08064008:
adds r0, r7, 0
bl sub_8064310
mov r0, sp
movs r1, 0x16
bl sub_805FC30
adds r4, r5, 0
ldr r6, _0806408C
adds r5, 0x2A
_0806401C:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064040
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08064040:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08064058
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_08064058:
bl sub_8062D88
ldrh r1, [r6, 0x2]
ands r1, r0
cmp r1, 0
bne _0806406E
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _0806409C
_0806406E:
movs r1, 0x18
ldrsh r0, [r4, r1]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _08064098
movs r2, 0x18
ldrsh r0, [r4, r2]
cmp r0, 0x2
bne _08064090
bl sub_8083D08
b _08064094
.align 2, 0
_0806408C: .4byte gUnknown_20255F0
_08064090:
bl sub_8083D1C
_08064094:
movs r4, 0
b _080640B2
_08064098:
bl sub_8083D30
_0806409C:
ldrh r1, [r6, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080640AC
ldrb r0, [r5]
cmp r0, 0
beq _0806401C
_080640AC:
bl sub_8083D30
movs r4, 0x1
_080640B2:
ldr r6, _080640E4
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x1B
bl sub_803E46C
movs r0, 0
movs r1, 0
bl sub_803EAF0
cmp r4, 0x1
bne _080640CE
b _08063EE0
_080640CE:
movs r1, 0x18
ldrsh r0, [r6, r1]
cmp r0, 0x1
bne _080640E8
mov r2, r9
ldr r1, [r2]
adds r0, r7, 0
bl sub_8063E30
b _08063EE0
.align 2, 0
_080640E4: .4byte gUnknown_202EE10
_080640E8:
cmp r0, 0x2
bne _080640FA
mov r0, r9
ldr r1, [r0]
adds r0, r7, 0
movs r2, 0x8
bl sub_8063834
b _08063EE0
_080640FA:
ldr r1, _08064140
ldr r2, [r1]
cmp r2, 0
bge _08064104
b _08064214
_08064104:
ldr r0, [sp, 0xC8]
cmp r0, 0
beq _08064160
movs r4, 0
lsls r0, r2, 3
adds r1, r7, r0
adds r0, r2, 0x1
cmp r0, 0x7
bgt _08064130
lsls r0, 3
adds r0, r7
ldrb r2, [r0]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _08064130
movs r0, 0x2
ands r0, r2
lsls r0, 24
lsrs r0, 24
negs r0, r0
lsrs r4, r0, 31
_08064130:
ldr r0, _08064144
movs r2, 0
bl sub_80928C0
cmp r4, 0
beq _0806414C
ldr r0, _08064148
b _0806414E
.align 2, 0
_08064140: .4byte gUnknown_202F2D8
_08064144: .4byte gUnknown_202DE58
_08064148: .4byte gUnknown_80FDF00
_0806414C:
ldr r0, _0806415C
_0806414E:
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
adds r3, r0, 0
b _08064162
.align 2, 0
_0806415C: .4byte gUnknown_80FDF70
_08064160:
movs r3, 0x1
_08064162:
cmp r3, 0x1
beq _08064168
b _08063EE0
_08064168:
mov r1, r9
ldr r0, [r1]
lsls r0, 3
adds r0, r7
movs r1, 0
strb r1, [r0]
mov r2, r9
ldr r0, [r2]
adds r2, r0, 0x1
cmp r2, 0x7
bgt _080641BC
lsls r0, r2, 3
adds r4, r7, r0
ldrb r1, [r4]
ands r3, r1
cmp r3, 0
beq _080641BC
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _080641BC
movs r0, 0
mov r12, r0
movs r6, 0x1
adds r3, r4, 0
movs r5, 0x2
_0806419C:
mov r1, r12
strb r1, [r4]
adds r3, 0x8
adds r2, 0x1
cmp r2, 0x7
bgt _080641BC
adds r4, r3, 0
ldrb r1, [r3]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _080641BC
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0806419C
_080641BC:
movs r4, 0
movs r6, 0x1
adds r3, r7, 0
add r5, sp, 0x60
movs r2, 0x7
_080641C6:
ldrb r1, [r3]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _080641D8
ldr r0, [r3]
ldr r1, [r3, 0x4]
stm r5!, {r0,r1}
adds r4, 0x1
_080641D8:
adds r3, 0x8
subs r2, 0x1
cmp r2, 0
bge _080641C6
cmp r4, 0x7
bgt _080641F4
movs r1, 0
_080641E6:
lsls r0, r4, 3
add r0, sp
adds r0, 0x60
strb r1, [r0]
adds r4, 0x1
cmp r4, 0x7
ble _080641E6
_080641F4:
add r4, sp, 0x60
adds r3, r7, 0
movs r2, 0x7
_080641FA:
ldm r4!, {r0,r1}
stm r3!, {r0,r1}
subs r2, 0x1
cmp r2, 0
bge _080641FA
ldr r2, _08064210
ldr r0, [r2]
cmp r0, 0
blt _08064214
movs r0, 0x1
b _08064216
.align 2, 0
_08064210: .4byte gUnknown_202F2D8
_08064214:
movs r0, 0
_08064216:
add sp, 0xD0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8063E70
thumb_func_start sub_8064228
sub_8064228:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
mov r9, r0
mov r10, r1
adds r5, r2, 0
adds r7, r3, 0
movs r1, 0
movs r0, 0x1
strb r0, [r7]
strb r1, [r7, 0x1]
strb r1, [r7, 0x3]
mov r8, r1
ldr r6, _08064304
ldr r0, _08064308
mov r12, r0
movs r4, 0x1
mov r2, r10
movs r3, 0x7
_08064254:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _08064262
movs r1, 0x1
add r8, r1
_08064262:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08064254
mov r2, r12
ldr r0, [r2]
movs r4, 0
strh r0, [r6, 0x18]
mov r3, r8
strh r3, [r6, 0x1A]
strh r3, [r6, 0x1C]
strh r4, [r6, 0x1E]
strh r4, [r6, 0x20]
strh r4, [r6, 0x4]
movs r0, 0x10
strh r0, [r6, 0x6]
strh r4, [r6, 0xC]
strh r4, [r6, 0xE]
strh r4, [r6, 0x14]
str r4, [r6]
adds r0, r6, 0
adds r0, 0x28
bl sub_801317C
mov r0, r8
movs r1, 0xC
bl sub_80095E4
adds r0, 0x2
strh r0, [r5, 0x10]
strh r0, [r5, 0xE]
movs r0, 0xE
strb r0, [r7, 0x2]
movs r0, 0x2
strh r0, [r5, 0x8]
adds r1, r5, 0
adds r1, 0x18
adds r0, r5, 0
adds r0, 0x48
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
adds r1, r5, 0
adds r1, 0x30
adds r0, r5, 0
adds r0, 0x48
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
adds r0, r5, 0
movs r1, 0x1
bl sub_803ECB4
adds r0, r6, 0
movs r1, 0
bl sub_80137B0
ldr r0, _0806430C
mov r7, r9
ldr r1, [r7, 0x70]
movs r2, 0
bl sub_80708B4
str r4, [sp]
str r4, [sp, 0x4]
mov r0, r8
mov r1, r9
mov r2, r10
movs r3, 0
bl sub_8063578
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08064304: .4byte gUnknown_202EE10
_08064308: .4byte gUnknown_202F2D8
_0806430C: .4byte gUnknown_202DF98
thumb_func_end sub_8064228
thumb_func_start sub_8064310
sub_8064310:
push {r4,lr}
adds r4, r0, 0
ldr r1, _08064350
movs r0, 0
str r0, [r1]
movs r0, 0x22
movs r1, 0
bl sub_8044F5C
movs r0, 0x21
movs r1, 0
bl sub_8044F5C
ldr r0, _08064354
ldr r1, [r0]
adds r0, r4, 0
bl sub_8064358
lsls r0, 24
cmp r0, 0
bne _08064340
movs r0, 0x21
bl sub_8044FF0
_08064340:
movs r0, 0x1D
movs r1, 0
bl sub_8044F5C
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08064350: .4byte gUnknown_202EE6C
_08064354: .4byte gUnknown_202F2D8
thumb_func_end sub_8064310
thumb_func_start sub_8064358
sub_8064358:
push {r4-r6,lr}
adds r3, r0, 0
adds r2, r1, 0
movs r5, 0
adds r2, 0x1
movs r4, 0
cmp r2, 0x7
bgt _0806439C
lsls r0, r2, 3
adds r0, r3, r0
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0806439C
movs r5, 0x1
adds r2, 0x1
movs r6, 0x2
lsls r0, r2, 3
adds r3, r0, r3
_08064380:
adds r4, 0x1
cmp r4, 0x7
bgt _0806439C
cmp r2, 0x7
bgt _0806439C
ldrb r1, [r3]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0806439C
movs r5, 0x1
adds r3, 0x8
adds r2, 0x1
b _08064380
_0806439C:
cmp r5, 0
bne _080643A4
movs r0, 0
b _080643A6
_080643A4:
movs r0, 0x1
_080643A6:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8064358
thumb_func_start sub_80643AC
sub_80643AC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xE4
adds r7, r0, 0
add r0, sp, 0x68
mov r9, r0
mov r1, sp
adds r1, 0x6C
str r1, [sp, 0xD0]
mov r2, sp
adds r2, 0x6E
str r2, [sp, 0xD4]
mov r0, sp
adds r0, 0x70
str r0, [sp, 0xD8]
adds r1, 0xC
str r1, [sp, 0xDC]
adds r2, 0x22
str r2, [sp, 0xE0]
adds r0, 0x38
str r0, [sp, 0xC8]
subs r1, 0x18
str r1, [sp, 0xC4]
add r2, sp, 0xC0
mov r10, r2
ldr r5, _080644C8
adds r0, r7, 0x4
str r0, [sp, 0xCC]
ldr r1, _080644CC
mov r8, r1
movs r6, 0
_080643F0:
movs r4, 0
ldr r0, [sp, 0xC4]
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x64]
movs r0, 0x2
mov r2, r9
strh r0, [r2]
strh r0, [r2, 0x2]
movs r0, 0x12
ldr r1, [sp, 0xD0]
strh r0, [r1]
movs r0, 0x4
ldr r2, [sp, 0xD4]
strh r0, [r2]
movs r0, 0x10
ldr r1, [sp, 0xD8]
strh r0, [r1]
mov r2, r10
str r2, [sp, 0x74]
movs r0, 0x3
ldr r1, [sp, 0xDC]
str r0, [r1, 0x4]
ldr r2, [sp, 0xE0]
str r0, [r2, 0x4]
ldr r1, [sp, 0xC8]
str r0, [r1, 0x4]
mov r0, sp
ldr r1, [sp, 0xC4]
movs r2, 0x60
bl memcpy
bl sub_8083D44
adds r0, r7, 0x4
mov r1, sp
mov r2, r10
bl sub_806455C
movs r0, 0x2D
bl sub_803E46C
adds r0, r7, 0
bl sub_80645D4
strh r4, [r5, 0x8]
strh r4, [r5, 0xA]
mov r0, sp
movs r1, 0x16
bl sub_805FC30
_0806445C:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x2D
bl sub_803E46C
mov r2, r8
ldrh r1, [r2, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064482
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_08064482:
mov r0, r8
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0806449C
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_0806449C:
mov r2, r8
ldrh r1, [r2, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080644B2
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08064510
_080644B2:
movs r1, 0x18
ldrsh r0, [r5, r1]
cmp r0, 0x1
bne _080644D0
bl sub_8083D08
ldr r0, [sp, 0xCC]
bl sub_80645F8
movs r4, 0x2
b _0806452A
.align 2, 0
_080644C8: .4byte gUnknown_202EE10
_080644CC: .4byte gUnknown_20255F0
_080644D0:
movs r2, 0x18
ldrsh r0, [r5, r2]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _0806450C
ldr r4, [r7, 0x70]
adds r4, 0x44
ldr r1, _08064508
movs r2, 0x18
ldrsh r0, [r5, r2]
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
adds r0, r4, 0
bl sub_8044C94
bl sub_8083D08
strb r6, [r4, 0x4]
strh r6, [r4, 0x8]
strh r6, [r4, 0xA]
strb r6, [r4, 0xC]
strh r6, [r4, 0x10]
strh r6, [r4, 0x12]
movs r4, 0
b _0806452A
.align 2, 0
_08064508: .4byte gUnknown_202EE44
_0806450C:
bl sub_8083D30
_08064510:
mov r0, r8
ldrh r1, [r0, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064524
ldr r1, _08064554
ldrb r0, [r1]
cmp r0, 0
beq _0806445C
_08064524:
bl sub_8083D30
movs r4, 0x1
_0806452A:
ldr r0, _08064558
bl AddMenuCursorSprite
movs r0, 0x2D
bl sub_803E46C
cmp r4, 0x2
bne _0806453C
b _080643F0
_0806453C:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0xE4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08064554: .4byte gUnknown_202EE3A
_08064558: .4byte gUnknown_202EE10
thumb_func_end sub_80643AC
thumb_func_start sub_806455C
sub_806455C:
push {r4,r5,lr}
sub sp, 0x54
adds r4, r0, 0
adds r0, r1, 0
movs r5, 0
movs r1, 0x1
strb r1, [r2]
strb r5, [r2, 0x1]
movs r1, 0xC
strb r1, [r2, 0x2]
strb r5, [r2, 0x3]
movs r1, 0x1
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r4, r0, 0
ldr r0, _080645D0
ldr r2, [r0]
str r5, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0
bl xxx_call_draw_string
ldr r0, [r4, 0x14]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080645C0
ldr r1, [r4, 0x14]
add r0, sp, 0x4
movs r2, 0
bl sub_8045B94
str r5, [sp]
movs r0, 0x8
movs r1, 0x12
add r2, sp, 0x4
movs r3, 0
bl xxx_call_draw_string
_080645C0:
movs r0, 0
bl sub_80073E0
add sp, 0x54
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080645D0: .4byte gUnknown_80FE708
thumb_func_end sub_806455C
thumb_func_start sub_80645D4
sub_80645D4:
push {lr}
ldr r1, _080645F4
movs r0, 0
str r0, [r1]
movs r0, 0x25
movs r1, 0
bl sub_8044F5C
movs r0, 0xC
movs r1, 0
bl sub_8044F5C
bl sub_8045064
pop {r0}
bx r0
.align 2, 0
_080645F4: .4byte gUnknown_202EE6C
thumb_func_end sub_80645D4
thumb_func_start sub_80645F8
sub_80645F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x110
str r0, [sp, 0xE4]
mov r0, sp
adds r0, 0x84
str r0, [sp, 0xF4]
mov r1, sp
adds r1, 0x88
str r1, [sp, 0xF8]
mov r2, sp
adds r2, 0x8C
str r2, [sp, 0xFC]
mov r3, sp
adds r3, 0x8E
str r3, [sp, 0x100]
adds r0, 0xC
str r0, [sp, 0x104]
adds r1, 0xC
str r1, [sp, 0x108]
adds r2, 0xC
str r2, [sp, 0x10C]
adds r3, 0x22
str r3, [sp, 0xEC]
adds r0, 0x38
str r0, [sp, 0xF0]
add r6, sp, 0x14
subs r1, 0x74
str r1, [sp, 0xE8]
add r2, sp, 0x80
mov r10, r2
add r3, sp, 0xE0
mov r9, r3
_08064640:
movs r7, 0
mov r0, r10
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
ldr r1, [sp, 0xF4]
str r0, [r1]
movs r0, 0x2
ldr r2, [sp, 0xF8]
strh r0, [r2]
strh r0, [r2, 0x2]
movs r0, 0x1A
ldr r3, [sp, 0xFC]
strh r0, [r3]
movs r0, 0xC
ldr r1, [sp, 0x100]
strh r0, [r1]
ldr r2, [sp, 0x104]
strh r0, [r2]
mov r3, r9
ldr r0, [sp, 0x108]
str r3, [r0]
movs r0, 0x3
ldr r1, [sp, 0x10C]
str r0, [r1, 0x4]
ldr r2, [sp, 0xEC]
str r0, [r2, 0x4]
ldr r3, [sp, 0xF0]
str r0, [r3, 0x4]
ldr r0, [sp, 0xE8]
mov r1, r10
movs r2, 0x60
bl memcpy
adds r0, r6, 0
bl sub_801317C
movs r1, 0x1
add r0, sp, 0xE0
strb r1, [r0]
movs r1, 0
mov r0, r9
strb r1, [r0, 0x1]
movs r0, 0x10
mov r2, r9
strb r0, [r2, 0x2]
strb r1, [r2, 0x3]
ldr r3, [sp, 0xE4]
movs r1, 0
ldrsh r0, [r3, r1]
movs r2, 0x2
ldrsh r1, [r3, r2]
bl sub_804954C
ldr r4, [r0, 0x14]
cmp r4, 0
bne _080646B8
b _080647D8
_080646B8:
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x2
beq _080646C4
b _080647D8
_080646C4:
ldr r0, [sp, 0xE8]
movs r1, 0
bl sub_803ECB4
adds r0, r4, 0
bl sub_8045104
adds r4, r0, 0
ldrb r1, [r4]
mov r0, r10
bl sub_807FE84
movs r0, 0
bl sub_80073B8
str r7, [sp]
movs r0, 0x10
movs r1, 0
mov r2, r10
movs r3, 0
bl xxx_call_draw_string
ldr r5, _08064720
ldrb r0, [r4]
lsls r0, 2
adds r0, r5
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r1, 0x18
movs r3, 0
bl xxx_call_draw_string
movs r0, 0
bl sub_80073E0
ldrb r0, [r4]
lsls r0, 2
adds r0, r5
ldr r0, [r0]
add r1, sp, 0x4
bl sub_8097DF0
adds r5, r0, 0
b _08064738
.align 2, 0
_08064720: .4byte gTrapDescriptions
_08064724:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064732
ldrb r0, [r6, 0x2]
cmp r0, 0
beq _08064738
_08064732:
bl sub_8083D30
b _080647D8
_08064738:
cmp r5, 0
beq _08064740
bl sub_8062500
_08064740:
adds r0, r6, 0
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _08064788
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064760
ldrb r0, [r6, 0x1]
cmp r0, 0
beq _08064724
_08064760:
bl sub_8083D08
cmp r5, 0
beq _080647D8
movs r4, 0
cmp r4, r5
blt _08064770
b _08064640
_08064770:
subs r3, r5, 0x1
mov r8, r3
_08064774:
lsls r0, r4, 2
add r0, sp
adds r0, 0x4
ldr r0, [r0]
adds r1, r6, 0
bl sub_80639E4
adds r7, r4, 0x1
b _080647A0
.align 2, 0
_08064788: .4byte gUnknown_20255F0
_0806478C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0806479A
ldrb r0, [r6, 0x2]
cmp r0, 0
beq _080647A0
_0806479A:
bl sub_8083D30
b _080647CC
_080647A0:
cmp r4, r8
bge _080647A8
bl sub_8062500
_080647A8:
adds r0, r6, 0
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _080647D4
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080647C8
ldrb r0, [r6, 0x1]
cmp r0, 0
beq _0806478C
_080647C8:
bl sub_8083D08
_080647CC:
adds r4, r7, 0
cmp r4, r5
blt _08064774
b _08064640
.align 2, 0
_080647D4: .4byte gUnknown_20255F0
_080647D8:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0x110
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80645F8
thumb_func_start sub_80647F0
sub_80647F0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xE4
adds r7, r0, 0
add r0, sp, 0x68
mov r9, r0
mov r1, sp
adds r1, 0x6C
str r1, [sp, 0xD0]
mov r2, sp
adds r2, 0x6E
str r2, [sp, 0xD4]
mov r0, sp
adds r0, 0x70
str r0, [sp, 0xD8]
adds r1, 0xC
str r1, [sp, 0xDC]
adds r2, 0x22
str r2, [sp, 0xE0]
adds r0, 0x38
str r0, [sp, 0xC8]
subs r1, 0x18
str r1, [sp, 0xC4]
add r2, sp, 0xC0
mov r10, r2
ldr r5, _0806490C
adds r0, r7, 0x4
str r0, [sp, 0xCC]
ldr r1, _08064910
mov r8, r1
movs r6, 0
_08064834:
movs r4, 0
ldr r0, [sp, 0xC4]
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x64]
movs r0, 0x2
mov r2, r9
strh r0, [r2]
strh r0, [r2, 0x2]
movs r0, 0x12
ldr r1, [sp, 0xD0]
strh r0, [r1]
movs r0, 0x4
ldr r2, [sp, 0xD4]
strh r0, [r2]
movs r0, 0x10
ldr r1, [sp, 0xD8]
strh r0, [r1]
mov r2, r10
str r2, [sp, 0x74]
movs r0, 0x3
ldr r1, [sp, 0xDC]
str r0, [r1, 0x4]
ldr r2, [sp, 0xE0]
str r0, [r2, 0x4]
ldr r1, [sp, 0xC8]
str r0, [r1, 0x4]
mov r0, sp
ldr r1, [sp, 0xC4]
movs r2, 0x60
bl memcpy
bl sub_8083D44
adds r0, r7, 0x4
mov r1, sp
mov r2, r10
bl sub_80649A0
movs r0, 0x2E
bl sub_803E46C
adds r0, r7, 0
bl sub_8064A18
strh r4, [r5, 0x8]
strh r4, [r5, 0xA]
mov r0, sp
movs r1, 0x16
bl sub_805FC30
_080648A0:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x2E
bl sub_803E46C
mov r2, r8
ldrh r1, [r2, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _080648C6
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_080648C6:
mov r0, r8
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _080648E0
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_080648E0:
mov r2, r8
ldrh r1, [r2, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080648F6
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08064954
_080648F6:
movs r1, 0x18
ldrsh r0, [r5, r1]
cmp r0, 0x1
bne _08064914
bl sub_8083D08
ldr r0, [sp, 0xCC]
bl sub_8064A3C
movs r4, 0x2
b _0806496E
.align 2, 0
_0806490C: .4byte gUnknown_202EE10
_08064910: .4byte gUnknown_20255F0
_08064914:
movs r2, 0x18
ldrsh r0, [r5, r2]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
beq _08064950
ldr r4, [r7, 0x70]
adds r4, 0x44
ldr r1, _0806494C
movs r2, 0x18
ldrsh r0, [r5, r2]
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
adds r0, r4, 0
bl sub_8044C94
bl sub_8083D08
strb r6, [r4, 0x4]
strh r6, [r4, 0x8]
strh r6, [r4, 0xA]
strb r6, [r4, 0xC]
strh r6, [r4, 0x10]
strh r6, [r4, 0x12]
movs r4, 0
b _0806496E
.align 2, 0
_0806494C: .4byte gUnknown_202EE44
_08064950:
bl sub_8083D30
_08064954:
mov r0, r8
ldrh r1, [r0, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064968
ldr r1, _08064998
ldrb r0, [r1]
cmp r0, 0
beq _080648A0
_08064968:
bl sub_8083D30
movs r4, 0x1
_0806496E:
ldr r0, _0806499C
bl AddMenuCursorSprite
movs r0, 0x2E
bl sub_803E46C
cmp r4, 0x2
bne _08064980
b _08064834
_08064980:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0xE4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08064998: .4byte gUnknown_202EE3A
_0806499C: .4byte gUnknown_202EE10
thumb_func_end sub_80647F0
thumb_func_start sub_80649A0
sub_80649A0:
push {r4,r5,lr}
sub sp, 0x4
adds r0, r1, 0
movs r3, 0
movs r1, 0x1
strb r1, [r2]
strb r3, [r2, 0x1]
movs r1, 0xB
strb r1, [r2, 0x2]
strb r3, [r2, 0x3]
movs r1, 0x1
bl sub_803ECB4
movs r0, 0
bl sub_80073B8
bl sub_8043D10
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _080649E4
cmp r0, 0x1
ble _080649D4
cmp r0, 0x2
beq _080649DC
_080649D4:
ldr r0, _080649D8
b _080649E6
.align 2, 0
_080649D8: .4byte gUnknown_80FE70C
_080649DC:
ldr r0, _080649E0
b _080649E6
.align 2, 0
_080649E0: .4byte gUnknown_80FE720
_080649E4:
ldr r0, _08064A14
_080649E6:
ldr r5, [r0]
movs r4, 0
str r4, [sp]
movs r0, 0xC
movs r1, 0
adds r2, r5, 0
movs r3, 0
bl xxx_call_draw_string
str r4, [sp]
movs r0, 0x8
movs r1, 0x12
adds r2, r5, 0
movs r3, 0
bl xxx_call_draw_string
movs r0, 0
bl sub_80073E0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08064A14: .4byte gUnknown_80FE724
thumb_func_end sub_80649A0
thumb_func_start sub_8064A18
sub_8064A18:
push {lr}
ldr r1, _08064A38
movs r0, 0
str r0, [r1]
movs r0, 0x26
movs r1, 0
bl sub_8044F5C
movs r0, 0xC
movs r1, 0
bl sub_8044F5C
bl sub_8045064
pop {r0}
bx r0
.align 2, 0
_08064A38: .4byte gUnknown_202EE6C
thumb_func_end sub_8064A18
thumb_func_start sub_8064A3C
sub_8064A3C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xE8
mov r0, sp
adds r0, 0x20
str r0, [sp, 0xE4]
add r1, sp, 0x80
mov r10, r1
add r0, sp, 0xE0
mov r9, r0
add r5, sp, 0x14
_08064A58:
mov r0, r10
movs r1, 0
movs r2, 0x60
bl memset
add r1, sp, 0x84
movs r0, 0x6
str r0, [r1]
add r0, sp, 0x88
movs r1, 0x2
strh r1, [r0]
strh r1, [r0, 0x2]
add r1, sp, 0x8C
movs r0, 0x1A
strh r0, [r1]
mov r0, sp
adds r0, 0x8E
movs r1, 0xC
strh r1, [r0]
add r0, sp, 0x90
strh r1, [r0]
add r0, sp, 0x94
mov r1, r9
str r1, [r0]
add r0, sp, 0x98
movs r1, 0x3
str r1, [r0, 0x4]
add r0, sp, 0xB0
str r1, [r0, 0x4]
add r0, sp, 0xC8
str r1, [r0, 0x4]
ldr r0, [sp, 0xE4]
mov r1, r10
movs r2, 0x60
bl memcpy
add r0, sp, 0x14
bl sub_801317C
movs r0, 0x1
mov r1, r9
strb r0, [r1]
movs r0, 0
strb r0, [r1, 0x1]
movs r0, 0x10
strb r0, [r1, 0x2]
movs r0, 0
strb r0, [r1, 0x3]
ldr r0, [sp, 0xE4]
movs r1, 0
bl sub_803ECB4
bl sub_8043D10
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
bl sub_80073B8
ldr r0, _08064B0C
lsls r4, 2
adds r0, r4, r0
ldr r2, [r0]
movs r1, 0
str r1, [sp]
movs r0, 0x10
movs r3, 0
bl xxx_call_draw_string
ldr r0, _08064B10
adds r4, r0
ldr r4, [r4]
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r1, 0x18
adds r2, r4, 0
movs r3, 0
bl xxx_call_draw_string
movs r0, 0
bl sub_80073E0
adds r0, r4, 0
add r1, sp, 0x4
bl sub_8097DF0
adds r6, r0, 0
b _08064B28
.align 2, 0
_08064B0C: .4byte gUnknown_80F8104
_08064B10: .4byte gUnknown_80F7F70
_08064B14:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064B22
ldrb r0, [r5, 0x2]
cmp r0, 0
beq _08064B28
_08064B22:
bl sub_8083D30
b _08064BC8
_08064B28:
cmp r6, 0
beq _08064B30
bl sub_8062500
_08064B30:
adds r0, r5, 0
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _08064B78
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064B50
ldrb r0, [r5, 0x1]
cmp r0, 0
beq _08064B14
_08064B50:
bl sub_8083D08
cmp r6, 0
beq _08064BC8
movs r4, 0
cmp r4, r6
blt _08064B60
b _08064A58
_08064B60:
subs r1, r6, 0x1
mov r8, r1
_08064B64:
lsls r0, r4, 2
add r0, sp
adds r0, 0x4
ldr r0, [r0]
adds r1, r5, 0
bl sub_80639E4
adds r7, r4, 0x1
b _08064B90
.align 2, 0
_08064B78: .4byte gUnknown_20255F0
_08064B7C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064B8A
ldrb r0, [r5, 0x2]
cmp r0, 0
beq _08064B90
_08064B8A:
bl sub_8083D30
b _08064BBC
_08064B90:
cmp r4, r8
bge _08064B98
bl sub_8062500
_08064B98:
adds r0, r5, 0
movs r1, 0
bl nullsub_34
movs r0, 0x16
bl sub_803E46C
ldr r0, _08064BC4
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064BB8
ldrb r0, [r5, 0x1]
cmp r0, 0
beq _08064B7C
_08064BB8:
bl sub_8083D08
_08064BBC:
adds r4, r7, 0
cmp r4, r6
blt _08064B64
b _08064A58
.align 2, 0
_08064BC4: .4byte gUnknown_20255F0
_08064BC8:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0xE8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8064A3C
thumb_func_start sub_8064BE0
sub_8064BE0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r0, _08064C94
ldr r0, [r0]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
movs r1, 0x4
mov r9, r1
cmp r0, 0
beq _08064C02
movs r0, 0x5
mov r9, r0
_08064C02:
ldr r1, _08064C98
movs r0, 0
str r0, [r1]
mov r10, r0
ldr r6, _08064C9C
ldr r7, _08064CA0
movs r1, 0x2A
adds r1, r6
mov r8, r1
_08064C14:
movs r5, 0
bl sub_8065250
_08064C1A:
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r7, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064C3E
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_80136E0
_08064C3E:
ldrh r1, [r7, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08064C56
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_8013744
_08064C56:
ldrh r1, [r7, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064C6A
adds r0, r6, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08064CAA
_08064C6A:
movs r1, 0x18
ldrsh r0, [r6, r1]
cmp r0, 0x4
bne _08064C8C
ldr r0, _08064C94
ldr r0, [r0]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08064CA4
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _08064CA4
_08064C8C:
bl sub_8083D08
b _08064CC0
.align 2, 0
_08064C94: .4byte gUnknown_203B418
_08064C98: .4byte gUnknown_202F2E0
_08064C9C: .4byte gUnknown_202EE10
_08064CA0: .4byte gUnknown_20255F0
_08064CA4:
bl sub_8083D30
b _08064CC0
_08064CAA:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064CBA
mov r1, r8
ldrb r0, [r1]
cmp r0, 0
beq _08064C1A
_08064CBA:
bl sub_8083D30
movs r5, 0x1
_08064CC0:
ldr r4, _08064D68
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
mov r0, r10
cmp r0, 0
bne _08064C14
cmp r5, 0
bne _08064D4C
ldr r5, _08064D6C
movs r1, 0x18
ldrsh r0, [r4, r1]
str r0, [r5]
cmp r0, 0
bne _08064CE8
bl sub_8064D74
_08064CE8:
ldr r0, [r5]
cmp r0, 0x1
bne _08064CF2
bl sub_80650C0
_08064CF2:
ldr r0, [r5]
cmp r0, 0x2
bne _08064CFC
bl sub_80532B4
_08064CFC:
ldr r0, [r5]
cmp r0, 0x3
bne _08064D06
bl sub_806519C
_08064D06:
ldr r0, _08064D70
ldr r0, [r0]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08064D2A
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _08064D2A
ldr r0, [r5]
cmp r0, 0x4
bne _08064D2A
bl sub_8065FB4
_08064D2A:
ldr r0, _08064D6C
ldr r0, [r0]
cmp r0, r9
bne _08064D36
bl sub_8065BF4
_08064D36:
ldr r0, _08064D70
ldr r0, [r0]
ldrb r0, [r0, 0x4]
cmp r0, 0
bne _08064D4C
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
bne _08064D4C
b _08064C14
_08064D4C:
bl sub_8040A84
movs r0, 0
movs r1, 0
bl sub_803EAF0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08064D68: .4byte gUnknown_202EE10
_08064D6C: .4byte gUnknown_202F2E0
_08064D70: .4byte gUnknown_203B418
thumb_func_end sub_8064BE0
thumb_func_start sub_8064D74
sub_8064D74:
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r6, _08064DE0
ldr r7, _08064DE4
movs r0, 0x2A
adds r0, r6
mov r8, r0
_08064D84:
movs r5, 0
bl sub_8065574
_08064D8A:
adds r0, r6, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r7, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064DAE
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_80136E0
_08064DAE:
ldrh r1, [r7, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08064DC6
movs r0, 0x1
bl sub_8083CE0
adds r0, r6, 0
movs r1, 0x1
bl sub_8013744
_08064DC6:
ldrh r1, [r7, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064DDA
adds r0, r6, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08064DE8
_08064DDA:
bl sub_8083D08
b _08064DFE
.align 2, 0
_08064DE0: .4byte gUnknown_202EE10
_08064DE4: .4byte gUnknown_20255F0
_08064DE8:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08064DF8
mov r1, r8
ldrb r0, [r1]
cmp r0, 0
beq _08064D8A
_08064DF8:
bl sub_8083D30
movs r5, 0x1
_08064DFE:
ldr r4, _08064E2C
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
cmp r5, 0
bne _08064E56
ldr r0, _08064E30
ldr r1, _08064E34
ldr r0, [r0]
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldr r0, [r0]
str r0, [r1]
movs r1, 0x18
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08064E38
bl sub_8064E68
b _08064E40
.align 2, 0
_08064E2C: .4byte gUnknown_202EE10
_08064E30: .4byte gUnknown_203B46C
_08064E34: .4byte gUnknown_202F2E8
_08064E38:
cmp r0, 0x1
bne _08064E4C
bl sub_8064F50
_08064E40:
lsls r0, 24
lsrs r5, r0, 24
adds r0, r5, 0
bl sub_8065040
b _08064D84
_08064E4C:
cmp r0, 0x2
bne _08064D84
bl sub_806509C
b _08064D84
_08064E56:
movs r0, 0
movs r1, 0
bl sub_803EAF0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8064D74
thumb_func_start sub_8064E68
sub_8064E68:
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r7, 0
ldr r0, _08064EDC
strh r7, [r0, 0x18]
adds r4, r0, 0
ldr r6, _08064EE0
movs r0, 0x2A
adds r0, r4
mov r8, r0
_08064E7E:
movs r7, 0
movs r5, 0
bl sub_80656C0
_08064E86:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064EAA
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08064EAA:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08064EC2
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_08064EC2:
ldrh r1, [r6, 0x4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _08064EE4
movs r0, 0
bl sub_8083CE0
movs r1, 0x18
ldrsh r0, [r4, r1]
bl sub_8065A8C
b _08064F2E
.align 2, 0
_08064EDC: .4byte gUnknown_202EE10
_08064EE0: .4byte gUnknown_20255F0
_08064EE4:
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08064EFC
movs r0, 0
bl sub_8083CE0
movs r2, 0x18
ldrsh r0, [r4, r2]
bl sub_8065B3C
b _08064F2E
_08064EFC:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064F0E
mov r2, r8
ldrb r0, [r2]
cmp r0, 0
beq _08064F14
_08064F0E:
bl sub_8083D08
b _08064F30
_08064F14:
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08064F24
bl sub_8083D30
movs r7, 0x1
b _08064F30
_08064F24:
bl sub_8065BEC
lsls r0, 24
cmp r0, 0
beq _08064E86
_08064F2E:
movs r5, 0x1
_08064F30:
ldr r0, _08064F4C
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
cmp r5, 0
bne _08064E7E
adds r0, r7, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08064F4C: .4byte gUnknown_202EE10
thumb_func_end sub_8064E68
thumb_func_start sub_8064F50
sub_8064F50:
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r7, 0
ldr r0, _08064FC8
strh r7, [r0, 0x18]
adds r4, r0, 0
ldr r6, _08064FCC
movs r0, 0x2A
adds r0, r4
mov r8, r0
_08064F66:
movs r7, 0
movs r5, 0
bl sub_8065948
_08064F6E:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08064F92
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08064F92:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08064FAA
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_08064FAA:
ldrh r1, [r6, 0x4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _08064FD0
movs r0, 0
bl sub_8083CE0
movs r1, 0x18
ldrsh r0, [r4, r1]
adds r0, 0x5
bl sub_8065A8C
b _0806501C
.align 2, 0
_08064FC8: .4byte gUnknown_202EE10
_08064FCC: .4byte gUnknown_20255F0
_08064FD0:
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08064FEA
movs r0, 0
bl sub_8083CE0
movs r2, 0x18
ldrsh r0, [r4, r2]
adds r0, 0x5
bl sub_8065B3C
b _0806501C
_08064FEA:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08064FFC
mov r2, r8
ldrb r0, [r2]
cmp r0, 0
beq _08065002
_08064FFC:
bl sub_8083D08
b _0806501E
_08065002:
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08065012
bl sub_8083D30
movs r7, 0x1
b _0806501E
_08065012:
bl sub_8065BF0
lsls r0, 24
cmp r0, 0
beq _08064F6E
_0806501C:
movs r5, 0x1
_0806501E:
ldr r0, _0806503C
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
cmp r5, 0
bne _08064F66
adds r0, r7, 0
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806503C: .4byte gUnknown_202EE10
thumb_func_end sub_8064F50
thumb_func_start sub_8065040
sub_8065040:
push {r4,lr}
lsls r0, 24
movs r4, 0
cmp r0, 0
beq _0806505C
ldr r0, _08065058
bl sub_80949DC
lsls r0, 24
cmp r0, 0
bne _0806505E
b _08065062
.align 2, 0
_08065058: .4byte gUnknown_202F2E8
_0806505C:
movs r4, 0x1
_0806505E:
cmp r4, 0
beq _08065088
_08065062:
ldr r0, _08065090
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _08065088
ldr r0, _08065094
ldr r1, [r0]
ldr r0, _08065098
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldr r0, [r0]
str r0, [r1]
bl sub_803E13C
bl sub_8040238
_08065088:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08065090: .4byte gUnknown_80FEBF8
_08065094: .4byte gUnknown_203B46C
_08065098: .4byte gUnknown_202F2E8
thumb_func_end sub_8065040
thumb_func_start sub_806509C
sub_806509C:
push {lr}
ldr r0, _080650BC
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0x1
bne _080650B8
movs r0, 0
bl sub_8094998
bl sub_803E13C
_080650B8:
pop {r0}
bx r0
.align 2, 0
_080650BC: .4byte gUnknown_80FEC28
thumb_func_end sub_806509C
thumb_func_start sub_80650C0
sub_80650C0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
movs r0, 0
mov r9, r0
ldr r5, _08065134
ldr r6, _08065138
movs r1, 0x2A
adds r1, r5
mov r8, r1
_080650D6:
movs r7, 0
bl sub_806544C
_080650DC:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08065100
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_08065100:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08065118
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_08065118:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0806512C
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _0806513C
_0806512C:
bl sub_8083D08
b _08065152
.align 2, 0
_08065134: .4byte gUnknown_202EE10
_08065138: .4byte gUnknown_20255F0
_0806513C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0806514C
mov r1, r8
ldrb r0, [r1]
cmp r0, 0
beq _080650DC
_0806514C:
bl sub_8083D30
movs r7, 0x1
_08065152:
ldr r4, _08065178
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
mov r0, r9
cmp r0, 0
bne _080650D6
cmp r7, 0
bne _0806518E
movs r1, 0x18
ldrsh r0, [r4, r1]
cmp r0, 0
bne _0806517C
bl sub_80651D0
b _08065184
.align 2, 0
_08065178: .4byte gUnknown_202EE10
_0806517C:
cmp r0, 0x1
bne _08065184
bl sub_80651FC
_08065184:
bl sub_805F1AC
lsls r0, 16
cmp r0, 0
beq _080650D6
_0806518E:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80650C0
thumb_func_start sub_806519C
sub_806519C:
push {lr}
ldr r0, _080651CC
ldr r1, [r0]
movs r2, 0xCF
lsls r2, 3
adds r0, r1, r2
ldrb r0, [r0]
subs r2, 0x34
adds r1, r2
ldrb r1, [r1]
movs r2, 0
bl sub_80319A4
_080651B6:
movs r0, 0x47
bl sub_803E46C
bl sub_80319F8
cmp r0, 0
beq _080651B6
bl sub_8031A3C
pop {r0}
bx r0
.align 2, 0
_080651CC: .4byte gUnknown_203B418
thumb_func_end sub_806519C
thumb_func_start sub_80651D0
sub_80651D0:
push {lr}
ldr r0, _080651F0
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0x1
bne _080651F4
bl sub_805F1A0
movs r1, 0x2B
bl sub_8044C94
movs r0, 0
b _080651F6
.align 2, 0
_080651F0: .4byte gUnknown_80FDE6C
_080651F4:
movs r0, 0x1
_080651F6:
pop {r1}
bx r1
thumb_func_end sub_80651D0
thumb_func_start sub_80651FC
sub_80651FC:
push {r4,r5,lr}
ldr r0, _08065238
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
adds r5, r0, 0
cmp r5, 0x1
bne _08065248
bl sub_805F1A0
movs r1, 0x2E
bl sub_8044C94
ldr r4, _0806523C
bl sub_8083600
adds r2, r0, 0
adds r0, r4, 0
movs r1, 0
bl sub_8083AB0
ldr r0, _08065240
ldr r0, [r0]
ldr r1, _08065244
adds r0, r1
strb r5, [r0]
movs r0, 0
b _0806524A
.align 2, 0
_08065238: .4byte gUnknown_80FDEB8
_0806523C: .4byte 0x0000021b
_08065240: .4byte gUnknown_203B418
_08065244: .4byte 0x00000654
_08065248:
movs r0, 0x1
_0806524A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80651FC
thumb_func_start sub_8065250
sub_8065250:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC8
add r5, sp, 0x64
adds r0, r5, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x68]
add r0, sp, 0x6C
movs r4, 0
movs r7, 0
movs r1, 0x2
mov r9, r1
mov r1, r9
strh r1, [r0]
strh r1, [r0, 0x2]
add r0, sp, 0x70
movs r1, 0x12
mov r10, r1
mov r1, r10
strh r1, [r0]
adds r0, 0x2
movs r1, 0x10
mov r8, r1
mov r1, r8
strh r1, [r0]
add r0, sp, 0x74
strh r1, [r0]
add r6, sp, 0xC4
str r6, [sp, 0x78]
movs r1, 0x3
str r1, [sp, 0x80]
add r0, sp, 0x94
str r1, [r0, 0x4]
add r0, sp, 0xAC
str r1, [r0, 0x4]
add r0, sp, 0x4
adds r1, r5, 0
movs r2, 0x60
bl memcpy
movs r0, 0x1
strb r0, [r6]
strb r4, [r6, 0x1]
strb r4, [r6, 0x3]
ldr r4, _080653D0
ldr r0, _080653D4
ldr r0, [r0]
strh r0, [r4, 0x18]
ldr r1, _080653D8
ldr r0, [r1]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
movs r5, 0x5
cmp r0, 0
beq _080652D2
movs r5, 0x6
_080652D2:
strh r5, [r4, 0x1A]
strh r5, [r4, 0x1C]
strh r7, [r4, 0x1E]
strh r7, [r4, 0x20]
strh r7, [r4, 0x4]
mov r0, r8
strh r0, [r4, 0x6]
strh r7, [r4, 0xC]
strh r7, [r4, 0xE]
strh r7, [r4, 0x14]
str r7, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
add r0, sp, 0x4
mov r1, r10
strh r1, [r0, 0xC]
adds r0, r5, 0
movs r1, 0xC
bl sub_80095E4
add r2, sp, 0x4
adds r1, r2, 0
adds r0, 0x2
strh r0, [r1, 0x10]
strh r0, [r2, 0xE]
movs r0, 0xA
strb r0, [r6, 0x2]
adds r0, r1, 0
mov r1, r9
strh r1, [r0, 0x8]
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
movs r0, 0
bl sub_80073B8
movs r5, 0
ldr r0, _080653DC
ldr r2, [r0]
str r5, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
adds r0, r4, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
ldr r0, _080653E0
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013800
adds r1, r0, 0
ldr r0, _080653E4
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
adds r0, r4, 0
movs r1, 0x2
bl sub_8013800
adds r1, r0, 0
ldr r0, _080653E8
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
movs r5, 0x4
adds r0, r4, 0
movs r1, 0x3
bl sub_8013800
adds r1, r0, 0
ldr r0, _080653EC
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, _080653D8
ldr r0, [r1]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0806540E
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _080653F4
movs r5, 0x5
adds r0, r4, 0
movs r1, 0x4
bl sub_8013800
adds r1, r0, 0
ldr r0, _080653F0
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
b _0806540E
.align 2, 0
_080653D0: .4byte gUnknown_202EE10
_080653D4: .4byte gUnknown_202F2E0
_080653D8: .4byte gUnknown_203B418
_080653DC: .4byte gUnknown_80FE8F8
_080653E0: .4byte gUnknown_80FE9CC
_080653E4: .4byte gUnknown_80FE9E8
_080653E8: .4byte gUnknown_80FE9F8
_080653EC: .4byte gUnknown_80FEA10
_080653F0: .4byte gUnknown_80FEA28
_080653F4:
movs r5, 0x5
adds r0, r4, 0
movs r1, 0x4
bl sub_8013800
adds r1, r0, 0
ldr r0, _08065440
ldr r2, [r0]
str r7, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
_0806540E:
ldr r0, _08065444
adds r1, r5, 0
bl sub_8013800
adds r1, r0, 0
ldr r0, _08065448
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
add sp, 0xC8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065440: .4byte gUnknown_80FEA44
_08065444: .4byte gUnknown_202EE10
_08065448: .4byte gUnknown_80FEA50
thumb_func_end sub_8065250
thumb_func_start sub_806544C
sub_806544C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC8
add r0, sp, 0x64
mov r10, r0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x68]
add r0, sp, 0x6C
movs r4, 0
movs r5, 0
movs r1, 0x2
mov r9, r1
mov r2, r9
strh r2, [r0]
strh r2, [r0, 0x2]
add r0, sp, 0x70
movs r7, 0x12
strh r7, [r0]
adds r0, 0x2
movs r6, 0x10
strh r6, [r0]
add r0, sp, 0x74
strh r6, [r0]
add r0, sp, 0xC4
mov r8, r0
str r0, [sp, 0x78]
movs r1, 0x3
str r1, [sp, 0x80]
add r0, sp, 0x94
str r1, [r0, 0x4]
add r0, sp, 0xAC
str r1, [r0, 0x4]
add r0, sp, 0x4
mov r1, r10
movs r2, 0x60
bl memcpy
movs r0, 0x1
mov r1, r8
strb r0, [r1]
strb r4, [r1, 0x1]
strb r4, [r1, 0x3]
ldr r4, _08065568
strh r5, [r4, 0x18]
mov r2, r9
strh r2, [r4, 0x1A]
strh r2, [r4, 0x1C]
strh r5, [r4, 0x1E]
strh r5, [r4, 0x20]
strh r5, [r4, 0x4]
strh r6, [r4, 0x6]
strh r5, [r4, 0xC]
strh r5, [r4, 0xE]
strh r5, [r4, 0x14]
str r5, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
add r0, sp, 0x4
strh r7, [r0, 0xC]
movs r0, 0x2
movs r1, 0xC
bl sub_80095E4
add r2, sp, 0x4
adds r1, r2, 0
adds r0, 0x2
strh r0, [r1, 0x10]
strh r0, [r2, 0xE]
movs r0, 0xA
mov r1, r8
strb r0, [r1, 0x2]
adds r0, r2, 0
mov r2, r9
strh r2, [r0, 0x8]
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
movs r0, 0
bl sub_80073B8
ldr r0, _0806556C
ldr r2, [r0]
str r5, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
adds r0, r4, 0
movs r1, 0
bl sub_8013800
adds r1, r0, 0
ldr r6, _08065570
movs r2, 0xAC
lsls r2, 1
adds r0, r6, r2
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013800
adds r1, r0, 0
movs r2, 0xB8
lsls r2, 1
adds r0, r6, r2
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
add sp, 0xC8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065568: .4byte gUnknown_202EE10
_0806556C: .4byte gUnknown_80FE8F4
_08065570: .4byte gUnknown_80F7C50
thumb_func_end sub_806544C
thumb_func_start sub_8065574
sub_8065574:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xD4
add r0, sp, 0x10
mov r10, r0
add r7, sp, 0x70
adds r0, r7, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x74]
add r0, sp, 0x78
movs r4, 0
movs r6, 0
movs r1, 0x2
strh r1, [r0]
strh r1, [r0, 0x2]
add r0, sp, 0x7C
movs r1, 0xC
strh r1, [r0]
adds r0, 0x2
movs r1, 0x10
mov r9, r1
mov r1, r9
strh r1, [r0]
add r0, sp, 0x80
strh r1, [r0]
add r0, sp, 0x84
add r1, sp, 0xD0
mov r8, r1
str r1, [r0]
add r0, sp, 0x88
movs r5, 0x3
str r5, [r0, 0x4]
add r0, sp, 0xA0
str r5, [r0, 0x4]
add r0, sp, 0xB8
str r5, [r0, 0x4]
mov r0, r10
adds r1, r7, 0
movs r2, 0x60
bl memcpy
movs r0, 0x1
mov r1, r8
strb r0, [r1]
strb r4, [r1, 0x1]
strb r4, [r1, 0x3]
ldr r4, _080656AC
strh r6, [r4, 0x18]
strh r5, [r4, 0x1A]
strh r5, [r4, 0x1C]
strh r6, [r4, 0x1E]
strh r6, [r4, 0x20]
strh r6, [r4, 0x4]
mov r0, r9
strh r0, [r4, 0x6]
strh r6, [r4, 0xC]
strh r6, [r4, 0xE]
strh r6, [r4, 0x14]
str r6, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
movs r0, 0xC
mov r1, r10
strh r0, [r1, 0xC]
movs r0, 0x3
movs r1, 0xC
bl sub_80095E4
adds r0, 0x2
mov r1, r10
strh r0, [r1, 0x10]
strh r0, [r1, 0xE]
movs r0, 0xA
mov r1, r8
strb r0, [r1, 0x2]
movs r1, 0x2
mov r0, r10
strh r1, [r0, 0x8]
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
adds r0, r4, 0
movs r1, 0
bl sub_8013800
str r0, [sp, 0x4]
adds r0, r4, 0
movs r1, 0x1
bl sub_8013800
str r0, [sp, 0x8]
adds r0, r4, 0
movs r1, 0x2
bl sub_8013800
str r0, [sp, 0xC]
movs r0, 0
bl sub_80073B8
ldr r0, _080656B0
ldr r2, [r0]
str r6, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x4]
ldr r0, _080656B4
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x8]
ldr r0, _080656B8
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0xC]
ldr r0, _080656BC
ldr r2, [r0]
str r6, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
add sp, 0xD4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080656AC: .4byte gUnknown_202EE10
_080656B0: .4byte gUnknown_80FE8F0
_080656B4: .4byte gUnknown_80FE730
_080656B8: .4byte gUnknown_80FE73C
_080656BC: .4byte gUnknown_80FE748
thumb_func_end sub_8065574
thumb_func_start sub_80656C0
sub_80656C0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xDC
add r0, sp, 0x18
mov r9, r0
add r7, sp, 0x78
adds r0, r7, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x7C]
add r0, sp, 0x80
movs r5, 0
movs r1, 0x2
mov r10, r1
mov r2, r10
strh r2, [r0]
strh r2, [r0, 0x2]
add r1, sp, 0x84
movs r0, 0x12
strh r0, [r1]
mov r0, sp
adds r0, 0x86
movs r3, 0x10
mov r8, r3
mov r4, r8
strh r4, [r0]
add r0, sp, 0x88
strh r4, [r0]
add r0, sp, 0x8C
add r6, sp, 0xD8
str r6, [r0]
add r0, sp, 0x90
movs r1, 0x3
str r1, [r0, 0x4]
add r0, sp, 0xA8
str r1, [r0, 0x4]
add r0, sp, 0xC0
str r1, [r0, 0x4]
mov r0, r9
adds r1, r7, 0
movs r2, 0x60
bl memcpy
adds r1, r7, 0
ldr r0, _0806583C
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
movs r0, 0x1
strb r0, [r6]
movs r0, 0
strb r0, [r6, 0x1]
strb r0, [r6, 0x3]
ldr r4, _08065840
movs r0, 0x5
strh r0, [r4, 0x1A]
strh r0, [r4, 0x1C]
strh r5, [r4, 0x1E]
strh r5, [r4, 0x20]
strh r5, [r4, 0x4]
mov r1, r8
strh r1, [r4, 0x6]
strh r5, [r4, 0xC]
strh r5, [r4, 0xE]
strh r5, [r4, 0x14]
str r5, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
movs r0, 0x18
mov r2, r9
strh r0, [r2, 0xC]
movs r0, 0x5
movs r1, 0xC
bl sub_80095E4
adds r0, 0x2
mov r3, r9
strh r0, [r3, 0x10]
strh r0, [r3, 0xE]
movs r0, 0xA
strb r0, [r6, 0x2]
mov r0, r10
strh r0, [r3, 0x8]
mov r0, r9
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
adds r0, r4, 0
movs r1, 0
bl sub_8013800
str r0, [sp, 0x4]
adds r0, r4, 0
movs r1, 0x1
bl sub_8013800
str r0, [sp, 0x8]
adds r0, r4, 0
movs r1, 0x2
bl sub_8013800
str r0, [sp, 0xC]
adds r0, r4, 0
movs r1, 0x3
bl sub_8013800
str r0, [sp, 0x10]
adds r0, r4, 0
movs r1, 0x4
bl sub_8013800
str r0, [sp, 0x14]
movs r0, 0
bl sub_80073B8
ldr r0, _08065844
ldr r2, [r0]
str r5, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x4]
ldr r0, _08065848
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x8]
ldr r0, _0806584C
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0xC]
ldr r0, _08065850
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x10]
ldr r0, _08065854
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r1, [sp, 0x14]
ldr r0, _08065858
ldr r2, [r0]
str r5, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r0, _0806585C
ldrb r0, [r0]
adds r4, r7, 0
cmp r0, 0
beq _08065860
ldr r2, [sp, 0x4]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x88
movs r3, 0x15
bl sub_80078A4
b _08065872
.align 2, 0
_0806583C: .4byte gUnknown_8106CE8
_08065840: .4byte gUnknown_202EE10
_08065844: .4byte gUnknown_80FE730
_08065848: .4byte gUnknown_80FE764
_0806584C: .4byte gUnknown_80FE788
_08065850: .4byte gUnknown_80FE7A8
_08065854: .4byte gUnknown_80FE7C0
_08065858: .4byte gUnknown_80FE7E4
_0806585C: .4byte gUnknown_202F2E8
_08065860:
ldr r2, [sp, 0x4]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x50
movs r3, 0x16
bl sub_80078A4
_08065872:
ldr r0, _08065890
ldrb r0, [r0, 0x1]
cmp r0, 0
beq _08065894
ldr r2, [sp, 0x8]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x88
movs r3, 0x16
bl sub_80078A4
b _080658A6
.align 2, 0
_08065890: .4byte gUnknown_202F2E8
_08065894:
ldr r2, [sp, 0x8]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x50
movs r3, 0x12
bl sub_80078A4
_080658A6:
ldr r0, _080658C4
ldrb r0, [r0, 0x2]
cmp r0, 0
beq _080658C8
ldr r2, [sp, 0xC]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x88
movs r3, 0x10
bl sub_80078A4
b _080658DA
.align 2, 0
_080658C4: .4byte gUnknown_202F2E8
_080658C8:
ldr r2, [sp, 0xC]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x50
movs r3, 0xC
bl sub_80078A4
_080658DA:
ldr r0, _080658F8
ldrb r0, [r0, 0x3]
cmp r0, 0
beq _080658FC
ldr r2, [sp, 0x10]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x88
movs r3, 0xC
bl sub_80078A4
b _0806590E
.align 2, 0
_080658F8: .4byte gUnknown_202F2E8
_080658FC:
ldr r2, [sp, 0x10]
adds r2, 0xA
movs r0, 0x7
str r0, [sp]
movs r0, 0
movs r1, 0x50
movs r3, 0x10
bl sub_80078A4
_0806590E:
ldr r0, _08065944
ldrb r1, [r0, 0x4]
lsls r0, r1, 2
adds r1, r0, r1
lsls r1, 3
adds r1, 0x50
ldr r2, [sp, 0x14]
adds r2, 0xA
adds r0, r4, r0
ldr r3, [r0]
movs r0, 0x7
str r0, [sp]
movs r0, 0
bl sub_80078A4
movs r0, 0
bl sub_80073E0
add sp, 0xDC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065944: .4byte gUnknown_202F2E8
thumb_func_end sub_80656C0
thumb_func_start sub_8065948
sub_8065948:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xCC
add r0, sp, 0x64
mov r10, r0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x68]
add r0, sp, 0x6C
movs r4, 0
movs r5, 0
movs r1, 0x2
mov r9, r1
mov r2, r9
strh r2, [r0]
strh r2, [r0, 0x2]
add r1, sp, 0x70
movs r0, 0x12
strh r0, [r1]
mov r0, sp
adds r0, 0x72
movs r6, 0x10
strh r6, [r0]
add r0, sp, 0x74
strh r6, [r0]
add r3, sp, 0xC4
mov r8, r3
str r3, [sp, 0x78]
movs r1, 0x3
str r1, [sp, 0x80]
add r0, sp, 0x94
str r1, [r0, 0x4]
add r0, sp, 0xAC
str r1, [r0, 0x4]
add r0, sp, 0x4
mov r1, r10
movs r2, 0x60
bl memcpy
mov r1, r10
ldr r0, _08065A78
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
movs r0, 0x1
mov r7, r8
strb r0, [r7]
strb r4, [r7, 0x1]
strb r4, [r7, 0x3]
ldr r4, _08065A7C
strh r0, [r4, 0x1A]
strh r0, [r4, 0x1C]
strh r5, [r4, 0x1E]
strh r5, [r4, 0x20]
strh r5, [r4, 0x4]
strh r6, [r4, 0x6]
strh r5, [r4, 0xC]
strh r5, [r4, 0xE]
strh r5, [r4, 0x14]
str r5, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
add r1, sp, 0x4
movs r0, 0x18
strh r0, [r1, 0xC]
movs r0, 0x1
movs r1, 0xC
bl sub_80095E4
add r2, sp, 0x4
adds r1, r2, 0
adds r0, 0x2
strh r0, [r1, 0x10]
strh r0, [r2, 0xE]
movs r0, 0xA
strb r0, [r7, 0x2]
adds r0, r1, 0
mov r1, r9
strh r1, [r0, 0x8]
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
movs r4, 0
mov r7, r10
add r6, sp, 0xC8
adds r5, r6, 0
_08065A0A:
ldr r0, _08065A7C
adds r1, r4, 0
bl sub_8013800
stm r5!, {r0}
adds r4, 0x1
cmp r4, 0
ble _08065A0A
movs r0, 0
bl sub_80073B8
ldr r0, _08065A80
ldr r2, [r0]
movs r4, 0
str r4, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldr r1, [r6]
ldr r0, _08065A84
ldr r2, [r0]
str r4, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
ldr r0, _08065A88
ldrb r1, [r0, 0x8]
lsls r3, r1, 2
adds r1, r3, r1
lsls r1, 3
adds r1, 0x50
add r0, sp, 0xC8
ldr r2, [r0]
adds r2, 0xA
adds r3, r7, r3
ldr r3, [r3]
movs r0, 0x7
str r0, [sp]
movs r0, 0
bl sub_80078A4
movs r0, 0
bl sub_80073E0
add sp, 0xCC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065A78: .4byte gUnknown_8106CF4
_08065A7C: .4byte gUnknown_202EE10
_08065A80: .4byte gUnknown_80FE73C
_08065A84: .4byte gUnknown_80FE808
_08065A88: .4byte gUnknown_202F2E8
thumb_func_end sub_8065948
thumb_func_start sub_8065A8C
sub_8065A8C:
push {lr}
cmp r0, 0x5
bhi _08065B38
lsls r0, 2
ldr r1, _08065A9C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08065A9C: .4byte _08065AA0
.align 2, 0
_08065AA0:
.4byte _08065AB8
.4byte _08065ACC
.4byte _08065AE0
.4byte _08065AF4
.4byte _08065B08
.4byte _08065B22
_08065AB8:
ldr r2, _08065AC8
movs r1, 0
ldrb r0, [r2]
cmp r0, 0
bne _08065AC4
movs r1, 0x1
_08065AC4:
strb r1, [r2]
b _08065B38
.align 2, 0
_08065AC8: .4byte gUnknown_202F2E8
_08065ACC:
ldr r2, _08065ADC
movs r1, 0
ldrb r0, [r2, 0x1]
cmp r0, 0
bne _08065AD8
movs r1, 0x1
_08065AD8:
strb r1, [r2, 0x1]
b _08065B38
.align 2, 0
_08065ADC: .4byte gUnknown_202F2E8
_08065AE0:
ldr r2, _08065AF0
movs r1, 0
ldrb r0, [r2, 0x2]
cmp r0, 0
bne _08065AEC
movs r1, 0x1
_08065AEC:
strb r1, [r2, 0x2]
b _08065B38
.align 2, 0
_08065AF0: .4byte gUnknown_202F2E8
_08065AF4:
ldr r2, _08065B04
movs r1, 0
ldrb r0, [r2, 0x3]
cmp r0, 0
bne _08065B00
movs r1, 0x1
_08065B00:
strb r1, [r2, 0x3]
b _08065B38
.align 2, 0
_08065B04: .4byte gUnknown_202F2E8
_08065B08:
ldr r1, _08065B18
ldrb r0, [r1, 0x4]
cmp r0, 0
bne _08065B1C
movs r0, 0x2
strb r0, [r1, 0x4]
b _08065B38
.align 2, 0
_08065B18: .4byte gUnknown_202F2E8
_08065B1C:
subs r0, 0x1
strb r0, [r1, 0x4]
b _08065B38
_08065B22:
ldr r1, _08065B30
ldrb r0, [r1, 0x8]
cmp r0, 0
bne _08065B34
movs r0, 0x2
b _08065B36
.align 2, 0
_08065B30: .4byte gUnknown_202F2E8
_08065B34:
subs r0, 0x1
_08065B36:
strb r0, [r1, 0x8]
_08065B38:
pop {r0}
bx r0
thumb_func_end sub_8065A8C
thumb_func_start sub_8065B3C
sub_8065B3C:
push {lr}
cmp r0, 0x5
bhi _08065BE8
lsls r0, 2
ldr r1, _08065B4C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08065B4C: .4byte _08065B50
.align 2, 0
_08065B50:
.4byte _08065B68
.4byte _08065B7C
.4byte _08065B90
.4byte _08065BA4
.4byte _08065BB8
.4byte _08065BD2
_08065B68:
ldr r2, _08065B78
movs r1, 0
ldrb r0, [r2]
cmp r0, 0
bne _08065B74
movs r1, 0x1
_08065B74:
strb r1, [r2]
b _08065BE8
.align 2, 0
_08065B78: .4byte gUnknown_202F2E8
_08065B7C:
ldr r2, _08065B8C
movs r1, 0
ldrb r0, [r2, 0x1]
cmp r0, 0
bne _08065B88
movs r1, 0x1
_08065B88:
strb r1, [r2, 0x1]
b _08065BE8
.align 2, 0
_08065B8C: .4byte gUnknown_202F2E8
_08065B90:
ldr r2, _08065BA0
movs r1, 0
ldrb r0, [r2, 0x2]
cmp r0, 0
bne _08065B9C
movs r1, 0x1
_08065B9C:
strb r1, [r2, 0x2]
b _08065BE8
.align 2, 0
_08065BA0: .4byte gUnknown_202F2E8
_08065BA4:
ldr r2, _08065BB4
movs r1, 0
ldrb r0, [r2, 0x3]
cmp r0, 0
bne _08065BB0
movs r1, 0x1
_08065BB0:
strb r1, [r2, 0x3]
b _08065BE8
.align 2, 0
_08065BB4: .4byte gUnknown_202F2E8
_08065BB8:
ldr r1, _08065BC8
ldrb r0, [r1, 0x4]
cmp r0, 0x2
bne _08065BCC
movs r0, 0
strb r0, [r1, 0x4]
b _08065BE8
.align 2, 0
_08065BC8: .4byte gUnknown_202F2E8
_08065BCC:
adds r0, 0x1
strb r0, [r1, 0x4]
b _08065BE8
_08065BD2:
ldr r1, _08065BE0
ldrb r0, [r1, 0x8]
cmp r0, 0x2
bne _08065BE4
movs r0, 0
b _08065BE6
.align 2, 0
_08065BE0: .4byte gUnknown_202F2E8
_08065BE4:
adds r0, 0x1
_08065BE6:
strb r0, [r1, 0x8]
_08065BE8:
pop {r0}
bx r0
thumb_func_end sub_8065B3C
thumb_func_start sub_8065BEC
sub_8065BEC:
movs r0, 0
bx lr
thumb_func_end sub_8065BEC
thumb_func_start sub_8065BF0
sub_8065BF0:
movs r0, 0
bx lr
thumb_func_end sub_8065BF0
thumb_func_start sub_8065BF4
sub_8065BF4:
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r5, _08065C60
ldr r6, _08065C64
movs r0, 0x2A
adds r0, r5
mov r8, r0
_08065C04:
movs r7, 0
bl sub_8065CAC
_08065C0A:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldrh r1, [r6, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08065C2E
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_80136E0
_08065C2E:
ldrh r1, [r6, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08065C46
movs r0, 0x1
bl sub_8083CE0
adds r0, r5, 0
movs r1, 0x1
bl sub_8013744
_08065C46:
ldrh r1, [r6, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08065C5A
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08065C68
_08065C5A:
bl sub_8083D08
b _08065C7E
.align 2, 0
_08065C60: .4byte gUnknown_202EE10
_08065C64: .4byte gUnknown_20255F0
_08065C68:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08065C78
mov r1, r8
ldrb r0, [r1]
cmp r0, 0
beq _08065C0A
_08065C78:
bl sub_8083D30
movs r7, 0x1
_08065C7E:
ldr r4, _08065C9C
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
cmp r7, 0
bne _08065CA0
movs r1, 0x18
ldrsh r0, [r4, r1]
bl sub_8065DBC
b _08065C04
.align 2, 0
_08065C9C: .4byte gUnknown_202EE10
_08065CA0:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8065BF4
thumb_func_start sub_8065CAC
sub_8065CAC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC8
add r0, sp, 0x64
mov r10, r0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x68]
add r0, sp, 0x6C
movs r4, 0
movs r5, 0
movs r1, 0x2
mov r9, r1
mov r1, r9
strh r1, [r0]
strh r1, [r0, 0x2]
add r0, sp, 0x70
movs r7, 0xC
strh r7, [r0]
adds r0, 0x2
movs r6, 0x10
strh r6, [r0]
add r0, sp, 0x74
strh r6, [r0]
add r0, sp, 0xC4
mov r8, r0
str r0, [sp, 0x78]
movs r1, 0x3
str r1, [sp, 0x80]
add r0, sp, 0x94
str r1, [r0, 0x4]
add r0, sp, 0xAC
str r1, [r0, 0x4]
add r0, sp, 0x4
mov r1, r10
movs r2, 0x60
bl memcpy
movs r0, 0x1
mov r1, r8
strb r0, [r1]
strb r4, [r1, 0x1]
strb r4, [r1, 0x3]
ldr r4, _08065DB0
strh r5, [r4, 0x18]
movs r0, 0x7
strh r0, [r4, 0x1A]
strh r0, [r4, 0x1C]
strh r5, [r4, 0x1E]
strh r5, [r4, 0x20]
strh r5, [r4, 0x4]
strh r6, [r4, 0x6]
strh r5, [r4, 0xC]
strh r5, [r4, 0xE]
strh r5, [r4, 0x14]
str r5, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
add r0, sp, 0x4
strh r7, [r0, 0xC]
movs r0, 0x7
movs r1, 0xC
bl sub_80095E4
add r2, sp, 0x4
adds r1, r2, 0
adds r0, 0x2
strh r0, [r1, 0x10]
strh r0, [r2, 0xE]
movs r0, 0xA
mov r1, r8
strb r0, [r1, 0x2]
adds r0, r2, 0
mov r1, r9
strh r1, [r0, 0x8]
movs r1, 0x1
bl sub_803ECB4
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
movs r0, 0
bl sub_80073B8
ldr r0, _08065DB4
ldr r2, [r0]
str r5, [sp]
movs r0, 0x10
movs r1, 0
movs r3, 0
bl sub_8014FF0
movs r4, 0
ldr r5, _08065DB8
_08065D7A:
ldr r0, _08065DB0
adds r1, r4, 0
bl sub_8013800
adds r1, r0, 0
ldm r5!, {r2}
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r3, 0
bl sub_8014FF0
adds r4, 0x1
cmp r4, 0x6
ble _08065D7A
movs r0, 0
bl sub_80073E0
add sp, 0xC8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065DB0: .4byte gUnknown_202EE10
_08065DB4: .4byte gUnknown_80FF770
_08065DB8: .4byte gUnknown_80FF774
thumb_func_end sub_8065CAC
thumb_func_start sub_8065DBC
sub_8065DBC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xEC
adds r6, r0, 0
ldr r0, _08065F28
ldr r0, [r0]
ldrb r1, [r0, 0x9]
negs r0, r1
orrs r0, r1
lsrs r0, 31
str r0, [sp, 0xC8]
mov r0, sp
adds r0, 0x6C
str r0, [sp, 0xD4]
mov r1, sp
adds r1, 0x70
str r1, [sp, 0xD8]
mov r2, sp
adds r2, 0x72
str r2, [sp, 0xDC]
adds r0, 0x8
str r0, [sp, 0xE0]
adds r1, 0xC
str r1, [sp, 0xE4]
adds r2, 0x22
str r2, [sp, 0xE8]
adds r0, 0x38
str r0, [sp, 0xD0]
subs r1, 0x18
str r1, [sp, 0xCC]
movs r2, 0x10
mov r10, r2
ldr r5, _08065F2C
add r0, sp, 0xC4
mov r9, r0
add r1, sp, 0x4
mov r8, r1
_08065E0C:
movs r7, 0
ldr r0, [sp, 0xCC]
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x68]
movs r0, 0x2
ldr r2, [sp, 0xD4]
strh r0, [r2]
strh r0, [r2, 0x2]
movs r0, 0xC
ldr r1, [sp, 0xD8]
strh r0, [r1]
mov r0, r10
ldr r2, [sp, 0xDC]
strh r0, [r2]
ldr r1, [sp, 0xE0]
strh r0, [r1]
mov r2, r9
str r2, [sp, 0x78]
movs r0, 0x3
ldr r1, [sp, 0xE4]
str r0, [r1, 0x4]
ldr r2, [sp, 0xE8]
str r0, [r2, 0x4]
ldr r1, [sp, 0xD0]
str r0, [r1, 0x4]
add r0, sp, 0x4
ldr r1, [sp, 0xCC]
movs r2, 0x60
bl memcpy
movs r1, 0x7
add r0, sp, 0xC4
strb r1, [r0]
mov r2, r9
strb r6, [r2, 0x1]
movs r0, 0
strb r0, [r2, 0x3]
strh r6, [r5, 0x1E]
strh r1, [r5, 0x20]
strh r7, [r5, 0x1A]
strh r7, [r5, 0x18]
strh r7, [r5, 0x1C]
strh r7, [r5, 0x4]
mov r1, r10
strh r1, [r5, 0x6]
strh r7, [r5, 0x14]
str r7, [r5]
adds r0, r5, 0
adds r0, 0x28
bl sub_801317C
movs r0, 0x18
mov r2, r8
strh r0, [r2, 0xC]
movs r0, 0x8
movs r1, 0xC
bl sub_80095E4
adds r0, 0x2
mov r1, r8
strh r0, [r1, 0x10]
strh r0, [r1, 0xE]
movs r0, 0xA
mov r2, r9
strb r0, [r2, 0x2]
movs r0, 0x2
strh r0, [r1, 0x8]
add r0, sp, 0x4
movs r1, 0x1
bl sub_803ECB4
ldr r1, _08065F30
movs r2, 0
ldrsh r0, [r1, r2]
adds r0, 0x13
lsls r0, 3
strh r0, [r5, 0xC]
movs r2, 0x2
ldrsh r0, [r1, r2]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r5, 0xE]
movs r0, 0
bl sub_80073B8
lsls r0, r6, 3
adds r0, 0x10
ldr r1, _08065F34
lsls r4, r6, 2
adds r1, r4, r1
ldr r2, [r1]
str r7, [sp]
movs r1, 0
movs r3, 0
bl sub_8014FF0
ldr r1, _08065F38
ldr r2, [sp, 0xC8]
lsls r0, r2, 5
adds r4, r0
adds r4, r1
ldr r2, [r4]
str r7, [sp]
movs r0, 0x8
movs r1, 0x10
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
_08065EF4:
adds r0, r5, 0
bl AddMenuCursorSprite
movs r0, 0x24
bl sub_803E46C
ldr r0, _08065F3C
ldrh r1, [r0, 0x2]
mov r0, r10
ands r0, r1
cmp r0, 0
bne _08065F16
adds r0, r5, 0
adds r0, 0x2B
ldrb r0, [r0]
cmp r0, 0
beq _08065F40
_08065F16:
movs r0, 0
bl sub_8083CE0
adds r6, 0x1
cmp r6, 0x7
bne _08065F64
movs r6, 0
b _08065F64
.align 2, 0
_08065F28: .4byte gUnknown_203B46C
_08065F2C: .4byte gUnknown_202EE10
_08065F30: .4byte gUnknown_2027370
_08065F34: .4byte gUnknown_80FF774
_08065F38: .4byte gUnknown_80FF7EC
_08065F3C: .4byte gUnknown_20255F0
_08065F40:
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08065F52
adds r0, r5, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
beq _08065F68
_08065F52:
movs r0, 0
bl sub_8083CE0
subs r6, 0x1
movs r0, 0x1
negs r0, r0
cmp r6, r0
bne _08065F64
movs r6, 0x6
_08065F64:
movs r7, 0x1
b _08065F94
_08065F68:
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08065F7A
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08065F80
_08065F7A:
bl sub_8083D08
b _08065F94
_08065F80:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08065F90
ldr r1, _08065FB0
ldrb r0, [r1]
cmp r0, 0
beq _08065EF4
_08065F90:
bl sub_8083D30
_08065F94:
movs r0, 0x24
bl sub_803E46C
cmp r7, 0
beq _08065FA0
b _08065E0C
_08065FA0:
add sp, 0xEC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08065FB0: .4byte gUnknown_202EE3A
thumb_func_end sub_8065DBC
thumb_func_start sub_8065FB4
sub_8065FB4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _08065FE0
add sp, r4
movs r0, 0
mov r10, r0
ldr r4, _08065FE4
ldr r0, [r4]
ldr r1, _08065FE8
adds r0, r1
ldrb r0, [r0]
bl GetRecruitable
lsls r0, 24
cmp r0, 0
bne _08065FF0
ldr r0, _08065FEC
b _08065FFE
.align 2, 0
_08065FE0: .4byte 0xfffff608
_08065FE4: .4byte gUnknown_203B418
_08065FE8: .4byte 0x00000644
_08065FEC: .4byte gUnknown_80FA5F4
_08065FF0:
ldr r0, [r4]
ldr r2, _0806600C
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _08066014
ldr r0, _08066010
_08065FFE:
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _08066194
.align 2, 0
_0806600C: .4byte 0x0000065d
_08066010: .4byte gUnknown_80FA61C
_08066014:
mov r0, sp
bl sub_80664FC
ldr r6, _08066130
_0806601C:
movs r0, 0
mov r8, r0
mov r1, r10
lsls r0, r1, 2
add r0, r10
lsls r0, 6
subs r0, r1
lsls r0, 2
add r0, sp
mov r9, r0
ldr r0, _08066134
strb r1, [r0, 0x1]
ldr r0, _08066138
movs r1, 0x1
bl sub_803ECB4
mov r2, r8
strh r2, [r6, 0x1A]
strh r2, [r6, 0x18]
strh r2, [r6, 0x1C]
mov r0, r10
strh r0, [r6, 0x1E]
movs r0, 0x2
strh r0, [r6, 0x20]
strh r2, [r6, 0x4]
movs r0, 0x10
strh r0, [r6, 0x6]
strh r2, [r6, 0x14]
mov r1, r8
str r1, [r6]
adds r0, r6, 0
adds r0, 0x28
bl sub_801317C
ldr r0, _0806613C
mov r2, r8
str r2, [r0]
movs r1, 0
ldr r0, _08066140
strb r1, [r0]
mov r0, r9
mov r1, r10
bl sub_80661AC
ldr r1, _08066144
movs r2, 0
ldrsh r0, [r1, r2]
adds r0, 0x10
lsls r0, 3
strh r0, [r6, 0xC]
movs r2, 0x2
ldrsh r0, [r1, r2]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r6, 0xE]
_0806608C:
movs r5, 0
ldr r0, _08066140
strb r5, [r0]
movs r0, 0
ldr r1, _08066148
bl sub_8014140
adds r4, r0, 0
mov r0, r9
adds r1, r4, 0
bl sub_8066288
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r5, r1, 31
mov r0, r9
adds r1, r4, 0
bl sub_8066358
lsls r0, 24
cmp r0, 0
beq _080660BE
movs r5, 0x1
_080660BE:
cmp r5, 0
bne _080660CE
ldr r0, _08066130
bl AddMenuCursorSprite
movs r0, 0x45
bl sub_803E46C
_080660CE:
ldr r2, _08066140
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080660E2
movs r0, 0x1
movs r1, 0x8
bl sub_8066434
_080660E2:
ldr r0, _08066140
ldrb r1, [r0]
movs r7, 0x2
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _080660F8
movs r0, 0
movs r1, 0x70
bl sub_8066434
_080660F8:
ldr r5, _0806614C
ldrh r1, [r5, 0x2]
movs r0, 0x30
ands r0, r1
cmp r0, 0
bne _0806611A
ldr r4, _08066130
adds r0, r4, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
bne _0806611A
adds r0, r4, 0
adds r0, 0x2B
ldrb r0, [r0]
cmp r0, 0
beq _08066150
_0806611A:
movs r0, 0
bl sub_8083CE0
movs r0, 0
mov r1, r10
cmp r1, 0
bne _0806612A
movs r0, 0x1
_0806612A:
mov r10, r0
b _08066184
.align 2, 0
_08066130: .4byte gUnknown_202EE10
_08066134: .4byte gUnknown_203B43C
_08066138: .4byte gUnknown_8106D08
_0806613C: .4byte gUnknown_202F2F8
_08066140: .4byte gUnknown_202F2FC
_08066144: .4byte gUnknown_2027370
_08066148: .4byte gUnknown_8106D68
_0806614C: .4byte gUnknown_20255F0
_08066150:
bl sub_80048C8
lsls r0, 24
cmp r0, 0
bne _0806608C
ldrh r1, [r5, 0x2]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _0806616E
adds r0, r4, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
beq _08066174
_0806616E:
bl sub_8083D30
b _0806618C
_08066174:
movs r0, 0xC
ands r0, r1
cmp r0, 0
beq _0806608C
bl sub_8083D08
movs r2, 0x1
mov r8, r2
_08066184:
mov r0, r8
cmp r0, 0
bne _0806618C
b _0806601C
_0806618C:
movs r0, 0
movs r1, 0
bl sub_803EAF0
_08066194:
ldr r3, _080661A8
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080661A8: .4byte 0x000009f8
thumb_func_end sub_8065FB4
thumb_func_start sub_80661AC
sub_80661AC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x44
adds r6, r0, 0
adds r5, r1, 0
ldr r0, _080661DC
ldr r4, [r0]
movs r0, 0x20
mov r8, r0
movs r0, 0
bl sub_80073B8
cmp r5, 0
bne _080661E4
ldr r0, _080661E0
ldr r2, [r0]
str r5, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0
bl xxx_call_draw_string
b _080661F6
.align 2, 0
_080661DC: .4byte gUnknown_202F2F8
_080661E0: .4byte gUnknown_80FEA68
_080661E4:
ldr r0, _08066254
ldr r2, [r0]
movs r0, 0
str r0, [sp]
movs r0, 0x14
movs r1, 0
movs r3, 0
bl xxx_call_draw_string
_080661F6:
movs r1, 0x9F
lsls r1, 3
adds r0, r6, r1
ldr r1, [r0]
cmp r1, 0
beq _08066260
movs r7, 0x7
lsls r0, r4, 1
adds r5, r0, r6
_08066208:
cmp r4, 0
blt _08066244
movs r1, 0x9F
lsls r1, 3
adds r0, r6, r1
ldr r0, [r0]
cmp r4, r0
bge _08066244
movs r1, 0xD4
lsls r1, 2
adds r0, r6, r1
adds r0, r4
ldrb r2, [r0]
add r0, sp, 0x4
ldr r1, _08066258
bl sub_800D158
movs r0, 0
ldrsh r1, [r5, r0]
ldr r0, _0806625C
bl sub_808D930
movs r0, 0
str r0, [sp]
movs r0, 0x8
mov r1, r8
add r2, sp, 0x4
movs r3, 0
bl sub_8014FF0
_08066244:
subs r7, 0x1
adds r5, 0x2
adds r4, 0x1
movs r1, 0xC
add r8, r1
cmp r7, 0
bge _08066208
b _08066270
.align 2, 0
_08066254: .4byte gUnknown_80FEA80
_08066258: .4byte gUnknown_8106D8C
_0806625C: .4byte gUnknown_202DF98
_08066260:
ldr r0, _08066284
ldr r2, [r0]
str r1, [sp]
movs r0, 0x8
mov r1, r8
movs r3, 0
bl xxx_call_draw_string
_08066270:
movs r0, 0
bl sub_80073E0
add sp, 0x44
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066284: .4byte gUnknown_80FEA8C
thumb_func_end sub_80661AC
thumb_func_start sub_8066288
sub_8066288:
push {r4,r5,lr}
sub sp, 0x44
adds r5, r0, 0
adds r3, r1, 0
ldr r0, _080662B8
ldr r4, [r0]
cmp r4, 0
beq _080662B4
subs r4, 0x1
ldr r2, _080662BC
ldrb r0, [r2]
movs r1, 0x1
orrs r0, r1
strb r0, [r2]
ldr r0, _080662C0
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _080662C4
cmp r3, 0x1
beq _080662C4
_080662B4:
movs r0, 0
b _0806633E
.align 2, 0
_080662B8: .4byte gUnknown_202F2F8
_080662BC: .4byte gUnknown_202F2FC
_080662C0: .4byte gUnknown_20255F0
_080662C4:
movs r0, 0
bl sub_8083CE0
movs r0, 0
bl sub_80073B8
movs r0, 0x10
str r0, [sp]
movs r0, 0
movs r1, 0
movs r2, 0x10
movs r3, 0x90
bl sub_80087EC
ldr r1, _08066348
movs r2, 0xD4
lsls r2, 2
adds r0, r5, r2
adds r0, r4
ldrb r2, [r0]
add r0, sp, 0x4
bl sub_800D158
ldr r0, _0806634C
lsls r1, r4, 1
adds r1, r5, r1
movs r2, 0
ldrsh r1, [r1, r2]
bl sub_808D930
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r1, 0x14
add r2, sp, 0x4
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
movs r0, 0x45
bl sub_803E46C
ldr r5, _08066350
movs r4, 0x5
_08066320:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x45
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08066320
ldr r1, _08066354
ldr r0, [r1]
subs r0, 0x1
str r0, [r1]
movs r0, 0x1
_0806633E:
add sp, 0x44
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08066348: .4byte gUnknown_8106D8C
_0806634C: .4byte gUnknown_202DF98
_08066350: .4byte gUnknown_203B084
_08066354: .4byte gUnknown_202F2F8
thumb_func_end sub_8066288
thumb_func_start sub_8066358
sub_8066358:
push {r4-r6,lr}
sub sp, 0x44
adds r5, r0, 0
adds r3, r1, 0
ldr r0, _08066394
ldr r0, [r0]
adds r4, r0, 0
adds r4, 0x8
movs r6, 0x80
movs r1, 0x9F
lsls r1, 3
adds r0, r5, r1
ldr r0, [r0]
cmp r0, r4
ble _08066390
ldr r2, _08066398
ldrb r0, [r2]
movs r1, 0x2
orrs r0, r1
strb r0, [r2]
ldr r0, _0806639C
ldrh r1, [r0, 0x4]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
bne _080663A0
cmp r3, 0x2
beq _080663A0
_08066390:
movs r0, 0
b _0806641A
.align 2, 0
_08066394: .4byte gUnknown_202F2F8
_08066398: .4byte gUnknown_202F2FC
_0806639C: .4byte gUnknown_20255F0
_080663A0:
movs r0, 0
bl sub_8083CE0
movs r0, 0
bl sub_80073B8
movs r0, 0x10
str r0, [sp]
movs r0, 0
movs r1, 0
adds r2, r6, 0
movs r3, 0x48
bl sub_80087EC
ldr r1, _08066424
movs r2, 0xD4
lsls r2, 2
adds r0, r5, r2
adds r0, r4
ldrb r2, [r0]
add r0, sp, 0x4
bl sub_800D158
ldr r0, _08066428
lsls r1, r4, 1
adds r1, r5, r1
movs r2, 0
ldrsh r1, [r1, r2]
bl sub_808D930
movs r0, 0
str r0, [sp]
movs r0, 0x8
adds r1, r6, 0
add r2, sp, 0x4
movs r3, 0
bl sub_8014FF0
movs r0, 0
bl sub_80073E0
movs r0, 0xD
bl sub_803E46C
ldr r5, _0806642C
movs r4, 0x5
_080663FC:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0xD
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _080663FC
ldr r1, _08066430
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
movs r0, 0x1
_0806641A:
add sp, 0x44
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08066424: .4byte gUnknown_8106D8C
_08066428: .4byte gUnknown_202DF98
_0806642C: .4byte gUnknown_203B080
_08066430: .4byte gUnknown_202F2F8
thumb_func_end sub_8066358
thumb_func_start sub_8066434
sub_8066434:
push {r4-r7,lr}
mov r12, r1
lsls r0, 24
lsrs r2, r0, 24
ldr r7, _080664C8
ldr r0, _080664CC
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _080664C0
ldr r0, _080664D0
ldrh r1, [r0]
ldr r3, _080664D4
ands r3, r1
ldr r1, _080664D8
ands r3, r1
ldr r1, _080664DC
ands r3, r1
ldr r1, _080664E0
ands r3, r1
ldr r1, _080664E4
ands r3, r1
negs r1, r2
orrs r1, r2
asrs r1, 31
movs r2, 0x80
lsls r2, 6
ands r2, r1
ldrh r1, [r0, 0x2]
ldr r4, _080664E8
ands r4, r1
orrs r4, r2
movs r5, 0xF
ldr r2, _080664EC
movs r6, 0x2
ldrsh r1, [r7, r6]
lsls r1, 3
add r1, r12
ands r1, r2
lsls r1, 4
ldrh r2, [r0, 0x6]
ands r5, r2
orrs r5, r1
strh r5, [r0, 0x6]
movs r2, 0
ldrsh r1, [r7, r2]
lsls r1, 3
adds r1, 0x40
ldr r2, _080664F0
ands r1, r2
movs r2, 0xFE
lsls r2, 8
ands r4, r2
orrs r4, r1
movs r2, 0x80
lsls r2, 7
ldr r1, _080664F4
ands r3, r1
orrs r3, r2
strh r3, [r0]
ands r4, r1
strh r4, [r0, 0x2]
ldr r1, _080664F8
strh r1, [r0, 0x4]
movs r1, 0x7F
movs r2, 0
movs r3, 0
bl AddSprite
_080664C0:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080664C8: .4byte gUnknown_2027370
_080664CC: .4byte gUnknown_202EDCC
_080664D0: .4byte gUnknown_202F300
_080664D4: .4byte 0x0000feff
_080664D8: .4byte 0x0000fdff
_080664DC: .4byte 0x0000f3ff
_080664E0: .4byte 0x0000efff
_080664E4: .4byte 0x0000dfff
_080664E8: .4byte 0x0000c1ff
_080664EC: .4byte 0x00000fff
_080664F0: .4byte 0x000001ff
_080664F4: .4byte 0x00003fff
_080664F8: .4byte 0x0000f3f0
thumb_func_end sub_8066434
thumb_func_start sub_80664FC
sub_80664FC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C0
str r0, [sp, 0x1A8]
movs r7, 0
ldr r2, _08066604
ldr r3, _08066608
movs r1, 0
_08066512:
mov r4, sp
adds r0, r4, r7
strb r1, [r0]
adds r7, 0x1
cmp r7, r2
ble _08066512
movs r4, 0
adds r1, r3, 0
ldr r0, [r3]
ldr r7, _0806660C
adds r0, r7
ldr r0, [r0]
cmp r4, r0
bge _08066578
ldr r6, _08066610
_08066530:
movs r5, 0x1
ldr r2, [r1]
lsls r0, r4, 3
adds r0, r2, r0
ldr r7, _08066614
adds r1, r0, r7
movs r7, 0
ldrsh r1, [r1, r7]
movs r7, 0xD1
lsls r7, 6
adds r0, r7
movs r7, 0
ldrsh r0, [r0, r7]
cmp r1, 0
bne _08066554
cmp r0, 0
beq _08066566
movs r5, 0x2
_08066554:
adds r0, r2, r6
str r3, [sp, 0x1BC]
bl sub_808E9B8
lsls r0, 16
asrs r0, 16
add r0, sp
strb r5, [r0]
ldr r3, [sp, 0x1BC]
_08066566:
adds r6, 0x8
adds r4, 0x1
ldr r1, _08066608
ldr r0, [r1]
ldr r2, _0806660C
adds r0, r2
ldr r0, [r0]
cmp r4, r0
blt _08066530
_08066578:
ldr r0, [r3]
ldr r4, _08066618
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
beq _0806658A
add r1, sp, 0x17C
movs r0, 0x1
strb r0, [r1]
_0806658A:
movs r0, 0x5
_0806658C:
subs r0, 0x1
cmp r0, 0
bge _0806658C
movs r7, 0
_08066594:
movs r0, 0
mov r8, r0
movs r1, 0x1
adds r2, r7, 0x1
str r2, [sp, 0x1AC]
lsls r4, r7, 2
str r4, [sp, 0x1B0]
_080665A2:
lsls r0, r1, 16
asrs r6, r0, 16
movs r0, 0x7
mov r10, r0
movs r2, 0
mov r9, r2
mov r4, sp
adds r0, r4, r6
ldrb r0, [r0]
adds r1, 0x1
str r1, [sp, 0x1B4]
cmp r0, 0
bne _080665BE
b _08066704
_080665BE:
cmp r7, 0
bne _08066620
adds r0, r6, 0
bl sub_806F9BC
lsls r0, 24
cmp r0, 0
bne _080665D0
b _08066704
_080665D0:
adds r0, r6, 0
bl sub_80981DC
lsls r0, 24
cmp r0, 0
bne _080665DE
b _08066704
_080665DE:
adds r0, r6, 0
bl sub_808DCC0
lsls r0, 16
ldr r1, _0806661C
cmp r0, r1
bne _080665EE
b _08066704
_080665EE:
cmp r6, 0x97
bne _0806669E
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _08066600
b _08066704
_08066600:
b _0806669E
.align 2, 0
_08066604: .4byte 0x000001a7
_08066608: .4byte gUnknown_203B418
_0806660C: .4byte 0x000037e4
_08066610: .4byte 0x0000343c
_08066614: .4byte 0x0000343e
_08066618: .4byte 0x0000066e
_0806661C: .4byte 0xfc190000
_08066620:
movs r5, 0
ldr r0, _080666CC
ldr r2, [r0]
movs r4, 0x1
movs r3, 0xCE
lsls r3, 1
_0806662C:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _0806663E
movs r1, 0x8
ldrsh r0, [r2, r1]
cmp r0, r6
beq _08066646
_0806663E:
adds r2, 0x58
adds r5, 0x1
cmp r5, r3
ble _0806662C
_08066646:
ldr r0, _080666D0
cmp r5, r0
beq _08066650
movs r2, 0x1
mov r9, r2
_08066650:
mov r4, r9
cmp r4, 0
bne _0806669E
movs r5, 0
ldr r2, _080666CC
_0806665A:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, _080666D4
adds r1, r0
ldr r0, [r2]
adds r4, r0, r1
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806668C
movs r1, 0xA
ldrsh r0, [r4, r1]
str r2, [sp, 0x1B8]
bl sub_806A564
lsls r0, 24
ldr r2, [sp, 0x1B8]
cmp r0, 0
bne _0806668C
movs r1, 0xE
ldrsh r0, [r4, r1]
cmp r0, r6
beq _08066692
_0806668C:
adds r5, 0x1
cmp r5, 0x3
ble _0806665A
_08066692:
cmp r5, 0x4
beq _0806669E
movs r2, 0x1
mov r9, r2
movs r4, 0x6
mov r10, r4
_0806669E:
cmp r7, 0
bne _080666D8
mov r1, sp
adds r0, r1, r6
ldrb r0, [r0]
cmp r0, 0x2
bne _080666B0
movs r2, 0x2
mov r10, r2
_080666B0:
mov r4, r8
lsls r0, r4, 1
ldr r1, [sp, 0x1A8]
adds r0, r1, r0
strh r6, [r0]
movs r2, 0xD4
lsls r2, 2
adds r0, r1, r2
add r0, r8
mov r4, r10
strb r4, [r0]
movs r0, 0x1
add r8, r0
b _08066704
.align 2, 0
_080666CC: .4byte gUnknown_203B45C
_080666D0: .4byte 0x0000019d
_080666D4: .4byte 0x00008df8
_080666D8:
mov r1, r9
cmp r1, 0
beq _08066704
ldr r2, [sp, 0x1B0]
adds r0, r2, r7
lsls r0, 6
subs r0, r7
lsls r0, 2
ldr r4, [sp, 0x1A8]
adds r0, r4
mov r2, r8
lsls r1, r2, 1
adds r1, r0, r1
strh r6, [r1]
movs r4, 0xD4
lsls r4, 2
adds r0, r4
add r0, r8
mov r1, r10
strb r1, [r0]
movs r2, 0x1
add r8, r2
_08066704:
ldr r1, [sp, 0x1B4]
ldr r0, _08066740
cmp r1, r0
bgt _0806670E
b _080665A2
_0806670E:
ldr r4, [sp, 0x1B0]
adds r0, r4, r7
lsls r0, 6
subs r0, r7
lsls r0, 2
ldr r7, [sp, 0x1A8]
adds r0, r7
movs r1, 0x9F
lsls r1, 3
adds r0, r1
mov r2, r8
str r2, [r0]
ldr r7, [sp, 0x1AC]
cmp r7, 0x1
bgt _0806672E
b _08066594
_0806672E:
add sp, 0x1C0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066740: .4byte 0x000001a3
thumb_func_end sub_80664FC
thumb_func_start sub_8066744
sub_8066744:
push {lr}
ldr r1, [r0, 0x70]
adds r1, 0x48
movs r2, 0x1
strb r2, [r1]
adds r0, 0x4
movs r1, 0
bl sub_8045DB4
pop {r0}
bx r0
thumb_func_end sub_8066744
thumb_func_start sub_806675C
sub_806675C:
push {r4-r7,lr}
adds r5, r0, 0
lsls r1, 24
lsrs r7, r1, 24
movs r1, 0
movs r2, 0xFE
bl sub_8044D90
adds r4, r0, 0
movs r3, 0
ldr r6, _080667C0
_08066772:
lsls r1, r3, 2
ldr r0, [r6]
adds r1, r0, r1
ldrb r2, [r1]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _08066798
movs r0, 0x10
ands r0, r2
cmp r0, 0
beq _08066798
movs r0, 0x8
ands r0, r2
cmp r0, 0
bne _080667EC
movs r0, 0xEF
ands r0, r2
strb r0, [r1]
_08066798:
adds r3, 0x1
cmp r3, 0x13
ble _08066772
ldr r0, _080667C4
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _080667C8
bl sub_8083E38
cmp r7, 0
beq _08066812
ldrb r1, [r4]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080667D0
ldr r0, _080667CC
b _080667DE
.align 2, 0
_080667C0: .4byte gUnknown_203B460
_080667C4: .4byte gUnknown_202DE58
_080667C8: .4byte 0x00000133
_080667CC: .4byte gUnknown_80F8D04
_080667D0:
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
bne _08066808
ldr r0, _080667E8
_080667DE:
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08066812
.align 2, 0
_080667E8: .4byte gUnknown_80F8CE4
_080667EC:
ldr r0, _08066800
bl sub_8045BF8
ldr r0, _08066804
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08066838
.align 2, 0
_08066800: .4byte gUnknown_202DE58
_08066804: .4byte gUnknown_80F8C7C
_08066808:
ldr r0, _08066840
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08066812:
ldrb r0, [r4]
movs r1, 0x10
orrs r1, r0
strb r1, [r4]
movs r0, 0x8
ands r1, r0
cmp r1, 0
beq _08066838
cmp r7, 0
beq _08066838
ldr r0, _08066844
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _08066848
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08066838:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066840: .4byte gUnknown_80F8CE8
_08066844: .4byte gUnknown_202DE58
_08066848: .4byte gUnknown_80F8BE0
thumb_func_end sub_806675C
thumb_func_start sub_806684C
sub_806684C:
push {r4-r6,lr}
adds r5, r0, 0
lsls r1, 24
lsrs r6, r1, 24
movs r4, 0
_08066856:
ldr r0, _0806688C
lsls r1, r4, 2
ldr r0, [r0]
adds r1, r0, r1
ldrb r2, [r1]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _080668B8
movs r0, 0x10
ands r0, r2
cmp r0, 0
beq _080668B8
movs r0, 0x8
ands r0, r2
cmp r0, 0
beq _08066898
ldr r0, _08066890
bl sub_8045BF8
ldr r0, _08066894
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _080668BE
.align 2, 0
_0806688C: .4byte gUnknown_203B460
_08066890: .4byte gUnknown_202DE58
_08066894: .4byte gUnknown_80F8C7C
_08066898:
movs r0, 0xEF
ands r0, r2
strb r0, [r1]
ldr r0, _080668C4
bl sub_8045BF8
ldr r0, _080668C8
bl sub_8083E38
cmp r6, 0
beq _080668B8
ldr r0, _080668CC
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_080668B8:
adds r4, 0x1
cmp r4, 0x13
ble _08066856
_080668BE:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080668C4: .4byte gUnknown_202DE58
_080668C8: .4byte 0x00000133
_080668CC: .4byte gUnknown_80F8D20
thumb_func_end sub_806684C
thumb_func_start sub_80668D0
sub_80668D0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0xC
adds r6, r0, 0
movs r1, 0x1
bl sub_8044DA4
mov r8, r0
ldr r4, [r6, 0x70]
ldr r7, [r0, 0x70]
adds r0, r6, 0
movs r1, 0
movs r2, 0x2
bl sub_8044D90
adds r5, r0, 0
adds r4, 0x48
ldrb r0, [r4]
movs r1, 0
mov r9, r1
cmp r0, 0x80
bne _08066904
movs r2, 0x1
mov r9, r2
_08066904:
mov r0, r9
cmp r0, 0
bne _08066928
ldrb r1, [r5]
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
bne _08066928
ldr r0, _08066920
adds r1, r5, 0
bl sub_8045BF8
ldr r0, _08066924
b _08066950
.align 2, 0
_08066920: .4byte gUnknown_202DEA8
_08066924: .4byte gUnknown_80F8C44
_08066928:
ldr r0, _0806695C
mov r1, r8
movs r2, 0
bl sub_8045B94
adds r1, r7, 0
adds r1, 0x60
ldrb r2, [r1]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _08066A04
movs r0, 0x8
ands r0, r2
cmp r0, 0
beq _08066968
ldr r0, _08066960
bl sub_8045BF8
ldr r0, _08066964
_08066950:
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _08066A96
.align 2, 0
_0806695C: .4byte gUnknown_202DFE8
_08066960: .4byte gUnknown_202DEA8
_08066964: .4byte gUnknown_80F8C40
_08066968:
ldr r1, [r7, 0x60]
str r1, [sp]
ldr r2, [r5]
str r2, [sp, 0x4]
movs r4, 0xEF
mov r0, sp
ldrb r0, [r0]
ands r0, r4
ldr r3, _080669A8
ands r1, r3
orrs r1, r0
str r1, [sp]
add r5, sp, 0x4
ldrb r0, [r5]
ands r0, r4
ands r2, r3
orrs r2, r0
str r2, [sp, 0x4]
adds r0, r6, 0
movs r1, 0
movs r2, 0x64
bl sub_8044DF0
mov r1, r9
cmp r1, 0
beq _080669AC
adds r0, r6, 0x4
mov r1, sp
movs r2, 0x1
bl sub_80460F8
b _080669B2
.align 2, 0
_080669A8: .4byte 0xffffff00
_080669AC:
mov r0, sp
bl sub_8091290
_080669B2:
ldr r0, [sp, 0x4]
str r0, [r7, 0x60]
ldr r4, _080669F4
adds r0, r4, 0
adds r1, r5, 0
bl sub_8045BF8
adds r4, 0x50
adds r0, r4, 0
mov r1, sp
bl sub_8045BF8
ldr r0, _080669F8
bl sub_8083E38
ldr r0, _080669FC
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
add r0, sp, 0x4
ldrb r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08066A52
ldr r0, _08066A00
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _08066A52
.align 2, 0
_080669F4: .4byte gUnknown_202DE58
_080669F8: .4byte 0x0000014d
_080669FC: .4byte gUnknown_80F8CA8
_08066A00: .4byte gUnknown_80F8BE0
_08066A04:
ldr r2, [r5]
str r2, [sp, 0x8]
movs r1, 0xEF
add r4, sp, 0x8
ldrb r0, [r4]
ands r0, r1
ldr r1, _08066AA4
ands r2, r1
orrs r2, r0
str r2, [sp, 0x8]
adds r0, r6, 0
movs r1, 0
movs r2, 0x65
bl sub_8044DF0
ldr r0, [sp, 0x8]
str r0, [r7, 0x60]
ldr r0, _08066AA8
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _08066AAC
bl sub_8083E38
ldr r0, _08066AB0
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
ldrb r1, [r4]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08066A52
ldr r0, _08066AB4
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
_08066A52:
mov r0, r8
bl sub_806A6E8
mov r1, r8
adds r1, 0x4
mov r0, r8
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _08066A74
adds r0, r6, 0
mov r1, r8
movs r2, 0
movs r3, 0
bl sub_807D148
_08066A74:
ldrb r0, [r7, 0x7]
cmp r0, 0
bne _08066A86
ldrh r1, [r7]
movs r2, 0x80
lsls r2, 7
adds r0, r2, 0
orrs r0, r1
strh r0, [r7]
_08066A86:
ldr r0, _08066AB8
ldr r0, [r0]
ldr r1, _08066ABC
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_807AB38
_08066A96:
add sp, 0xC
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066AA4: .4byte 0xffffff00
_08066AA8: .4byte gUnknown_202DE58
_08066AAC: .4byte 0x0000014d
_08066AB0: .4byte gUnknown_80F8D44
_08066AB4: .4byte gUnknown_80F8BE0
_08066AB8: .4byte gUnknown_203B418
_08066ABC: .4byte 0x00003a08
thumb_func_end sub_80668D0
thumb_func_start sub_8066AC0
sub_8066AC0:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r7, r0, 0
movs r1, 0
bl sub_8044DA4
adds r6, r0, 0
ldr r2, [r6, 0x70]
mov r8, r2
adds r5, r2, 0
adds r5, 0x60
ldr r0, _08066AF0
ldr r0, [r0]
adds r0, 0x4C
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08066AF8
ldr r0, _08066AF4
b _08066B10
.align 2, 0
_08066AF0: .4byte gUnknown_203B460
_08066AF4: .4byte gUnknown_80F8D60
_08066AF8:
ldrb r1, [r5]
movs r0, 0x8
ands r0, r1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _08066B24
ldr r0, _08066B1C
adds r1, r5, 0
bl sub_8045BF8
ldr r0, _08066B20
_08066B10:
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _08066BAC
.align 2, 0
_08066B1C: .4byte gUnknown_202DE58
_08066B20: .4byte gUnknown_80F8BE0
_08066B24:
ldr r2, [r2, 0x60]
str r2, [sp]
movs r1, 0xEF
mov r0, sp
ldrb r0, [r0]
ands r0, r1
ldr r1, _08066BB8
ands r2, r1
orrs r2, r0
str r2, [sp]
ldr r0, _08066BBC
mov r1, sp
bl sub_8045BF8
ldr r0, _08066BC0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
strb r4, [r5, 0x2]
strb r4, [r5, 0x1]
strb r4, [r5]
mov r0, sp
bl sub_8091290
ldr r0, _08066BC4
bl sub_8083E38
ldr r0, _08066BC8
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
adds r0, r6, 0
bl sub_806A6E8
adds r1, r6, 0x4
adds r0, r6, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _08066B86
adds r0, r7, 0
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_08066B86:
mov r1, r8
ldrb r0, [r1, 0x7]
cmp r0, 0
bne _08066B9C
ldrh r1, [r1]
movs r2, 0x80
lsls r2, 7
adds r0, r2, 0
orrs r0, r1
mov r1, r8
strh r0, [r1]
_08066B9C:
ldr r0, _08066BCC
ldr r0, [r0]
ldr r2, _08066BD0
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_807AB38
_08066BAC:
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066BB8: .4byte 0xffffff00
_08066BBC: .4byte gUnknown_202DE58
_08066BC0: .4byte gUnknown_202DF98
_08066BC4: .4byte 0x0000014d
_08066BC8: .4byte gUnknown_80F8D7C
_08066BCC: .4byte gUnknown_203B418
_08066BD0: .4byte 0x00003a08
thumb_func_end sub_8066AC0
thumb_func_start sub_8066BD4
sub_8066BD4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
movs r1, 0
bl sub_8044DA4
mov r9, r0
ldr r0, [r0, 0x70]
mov r8, r0
mov r10, r8
mov r6, r8
adds r6, 0x60
ldr r2, _08066C10
adds r0, r7, 0
movs r1, 0x1
bl sub_8044D90
adds r5, r0, 0
ldrb r2, [r6]
movs r0, 0x8
ands r0, r2
cmp r0, 0
beq _08066C18
ldr r0, _08066C14
adds r1, r6, 0
b _08066C26
.align 2, 0
_08066C10: .4byte 0x00001565
_08066C14: .4byte gUnknown_202DE58
_08066C18:
ldrb r1, [r5]
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
bne _08066C40
ldr r0, _08066C38
adds r1, r5, 0
_08066C26:
bl sub_8045BF8
ldr r0, _08066C3C
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _08066CC8
.align 2, 0
_08066C38: .4byte gUnknown_202DE58
_08066C3C: .4byte gUnknown_80F8BE0
_08066C40:
movs r1, 0xEF
adds r0, r1, 0
ands r0, r2
strb r0, [r6]
ldrb r0, [r5]
ands r1, r0
strb r1, [r5]
ldr r4, _08066CD8
adds r0, r4, 0
adds r1, r6, 0
bl sub_8045BF8
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
bl sub_8045BF8
ldr r0, _08066CDC
mov r1, r9
movs r2, 0
bl sub_8045B94
mov r2, r8
ldr r1, [r2, 0x60]
ldr r0, [r5]
str r0, [r2, 0x60]
str r1, [r5]
ldr r0, _08066CE0
bl sub_8083E38
ldr r0, _08066CE4
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
mov r1, r9
adds r1, 0x4
mov r0, r9
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _08066CA2
adds r0, r7, 0
mov r1, r9
movs r2, 0
movs r3, 0
bl sub_807D148
_08066CA2:
mov r1, r10
ldrb r0, [r1, 0x7]
cmp r0, 0
bne _08066CB8
ldrh r1, [r1]
movs r2, 0x80
lsls r2, 7
adds r0, r2, 0
orrs r0, r1
mov r1, r10
strh r0, [r1]
_08066CB8:
ldr r0, _08066CE8
ldr r0, [r0]
ldr r2, _08066CEC
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_807AB38
_08066CC8:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066CD8: .4byte gUnknown_202DE58
_08066CDC: .4byte gUnknown_202DFE8
_08066CE0: .4byte 0x0000014d
_08066CE4: .4byte gUnknown_80F8DB4
_08066CE8: .4byte gUnknown_203B418
_08066CEC: .4byte 0x00003a08
thumb_func_end sub_8066BD4
thumb_func_start sub_8066CF0
sub_8066CF0:
push {lr}
movs r1, 0
bl sub_8044DA4
ldr r0, [r0, 0x70]
adds r0, 0xFC
movs r1, 0x1
strb r1, [r0]
pop {r0}
bx r0
thumb_func_end sub_8066CF0
thumb_func_start sub_8066D04
sub_8066D04:
push {r4-r6,lr}
adds r4, r0, 0
ldr r6, [r4, 0x70]
movs r1, 0
movs r2, 0x4
bl sub_8044D90
adds r5, r0, 0
ldr r0, _08066D2C
adds r1, r5, 0
bl sub_8045BF8
adds r0, r6, 0
adds r0, 0x48
ldrb r0, [r0]
cmp r0, 0x80
bne _08066D34
ldr r0, _08066D30
b _08066DB2
.align 2, 0
_08066D2C: .4byte gUnknown_202DE58
_08066D30: .4byte gUnknown_80F8DE0
_08066D34:
cmp r0, 0x14
bhi _08066D4C
ldrb r1, [r5]
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
bne _08066D4C
ldr r0, _08066D48
b _08066DB2
.align 2, 0
_08066D48: .4byte gUnknown_80F8BE0
_08066D4C:
adds r0, r6, 0
adds r0, 0x48
ldrb r0, [r0]
cmp r0, 0x81
bne _08066D68
ldrb r1, [r5]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08066D68
ldr r0, _08066D64
b _08066DB2
.align 2, 0
_08066D64: .4byte gUnknown_80F8BE0
_08066D68:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x80
lsls r0, 2
ands r0, r1
cmp r0, 0
bne _08066DB0
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
bne _08066DB0
ldr r6, [r2, 0x14]
cmp r6, 0
bne _08066DB0
ldrb r1, [r5]
movs r0, 0xEF
ands r0, r1
strb r0, [r5]
ldr r0, _08066DBC
adds r1, r5, 0
bl sub_8045BF8
adds r0, r4, 0x4
adds r1, r5, 0
movs r2, 0x1
bl sub_80460F8
lsls r0, 24
cmp r0, 0
bne _08066DC4
_08066DB0:
ldr r0, _08066DC0
_08066DB2:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _08066DF8
.align 2, 0
_08066DBC: .4byte gUnknown_202DE58
_08066DC0: .4byte gUnknown_80F8E04
_08066DC4:
strb r6, [r5, 0x2]
strb r6, [r5, 0x1]
strb r6, [r5]
bl sub_80910B4
ldr r0, _08066E00
bl sub_8083E38
ldr r0, _08066E04
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08066E08
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r0, _08066E0C
ldr r0, [r0]
ldr r1, _08066E10
adds r0, r1
ldrb r1, [r0]
adds r0, r4, 0
bl sub_807AB38
_08066DF8:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08066E00: .4byte 0x0000014d
_08066E04: .4byte gUnknown_202DF98
_08066E08: .4byte gUnknown_80F8E28
_08066E0C: .4byte gUnknown_203B418
_08066E10: .4byte 0x00003a08
thumb_func_end sub_8066D04
thumb_func_start sub_8066E14
sub_8066E14:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
mov r9, r0
ldr r0, [r0, 0x70]
mov r10, r0
mov r0, r9
movs r1, 0
movs r2, 0x5
bl sub_8044D90
adds r6, r0, 0
mov r0, r9
movs r1, 0x1
movs r2, 0x6
bl sub_8044D90
adds r2, r0, 0
adds r7, r2, 0
mov r0, r10
adds r0, 0x48
ldrb r0, [r0]
cmp r0, 0x80
beq _08066E54
ldr r0, _08066E50
b _08066F1E
.align 2, 0
_08066E50: .4byte gUnknown_80F8E2C
_08066E54:
mov r0, r10
adds r0, 0x50
ldrb r1, [r0]
str r0, [sp, 0x8]
cmp r1, 0x14
bhi _08066E80
ldrb r1, [r2]
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
bne _08066E80
ldr r0, _08066E78
adds r1, r2, 0
bl sub_8045BF8
ldr r0, _08066E7C
b _08066F1E
.align 2, 0
_08066E78: .4byte gUnknown_202DE58
_08066E7C: .4byte gUnknown_80F8BE0
_08066E80:
ldr r1, [sp, 0x8]
ldrb r0, [r1]
cmp r0, 0x81
bne _08066EA8
adds r2, r7, 0
ldrb r1, [r2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08066EA8
ldr r0, _08066EA0
adds r1, r2, 0
bl sub_8045BF8
ldr r0, _08066EA4
b _08066F1E
.align 2, 0
_08066EA0: .4byte gUnknown_202DEA8
_08066EA4: .4byte gUnknown_80F8C48
_08066EA8:
mov r2, r9
movs r3, 0x4
ldrsh r0, [r2, r3]
movs r3, 0x6
ldrsh r1, [r2, r3]
bl sub_804954C
ldr r0, [r0, 0x14]
cmp r0, 0
beq _08066ECC
bl sub_80450F8
cmp r0, 0x3
beq _08066ECC
ldr r0, _08066EC8
b _08066F1E
.align 2, 0
_08066EC8: .4byte gUnknown_80F8E54
_08066ECC:
adds r0, r6, 0
ldr r5, [r0]
str r5, [sp]
adds r4, r7, 0
ldr r6, [r4]
mov r8, sp
str r6, [sp, 0x4]
movs r3, 0xEF
mov r0, sp
ldrb r2, [r0]
ands r2, r3
ldr r1, _08066F28
adds r0, r1, 0
ands r0, r5
orrs r0, r2
str r0, [sp]
mov r2, r8
ldrb r0, [r2, 0x4]
ands r0, r3
ands r1, r6
orrs r1, r0
str r1, [sp, 0x4]
mov r5, r10
adds r5, 0x4C
adds r0, r5, 0
movs r1, 0x1
bl sub_80461C8
movs r0, 0
strb r0, [r4, 0x2]
strb r0, [r4, 0x1]
strb r0, [r4]
add r1, sp, 0x4
adds r0, r5, 0
movs r2, 0x1
bl sub_80460F8
lsls r0, 24
cmp r0, 0
bne _08066F30
ldr r0, _08066F2C
_08066F1E:
ldr r1, [r0]
mov r0, r9
bl sub_80522A8
b _08066F7E
.align 2, 0
_08066F28: .4byte 0xffffff00
_08066F2C: .4byte gUnknown_80F8E78
_08066F30:
ldr r3, [sp, 0x8]
ldrb r0, [r3]
cmp r0, 0x81
bne _08066F40
ldr r0, [sp]
mov r1, r10
str r0, [r1, 0x60]
b _08066F46
_08066F40:
mov r0, sp
bl sub_8091290
_08066F46:
bl sub_80910B4
ldr r4, _08066F90
add r1, sp, 0x4
adds r0, r4, 0
bl sub_8045BF8
adds r4, 0x50
adds r0, r4, 0
mov r1, sp
bl sub_8045BF8
ldr r0, _08066F94
bl sub_8083E38
ldr r0, _08066F98
ldr r1, [r0]
mov r0, r9
bl sub_80522A8
ldr r0, _08066F9C
ldr r0, [r0]
ldr r2, _08066FA0
adds r0, r2
ldrb r1, [r0]
mov r0, r9
bl sub_807AB38
_08066F7E:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08066F90: .4byte gUnknown_202DE58
_08066F94: .4byte 0x0000014d
_08066F98: .4byte gUnknown_80F8EAC
_08066F9C: .4byte gUnknown_203B418
_08066FA0: .4byte 0x00003a08
thumb_func_end sub_8066E14
thumb_func_start sub_8066FA4
sub_8066FA4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
adds r7, r0, 0
ldr r0, [r7, 0x70]
mov r9, r0
movs r1, 0x4
ldrsh r0, [r7, r1]
movs r2, 0x6
ldrsh r1, [r7, r2]
bl sub_804954C
mov r10, r0
adds r0, r7, 0
movs r1, 0
movs r2, 0x7
bl sub_8044D90
adds r4, r0, 0
adds r5, r4, 0
ldr r0, _08067000
mov r8, r0
adds r1, r4, 0
bl sub_8045BF8
mov r0, r9
adds r0, 0x48
ldrb r0, [r0]
cmp r0, 0x14
bhi _08067008
ldrb r1, [r4]
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
bne _08067008
mov r0, r8
adds r0, 0x50
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _08067004
b _0806709E
.align 2, 0
_08067000: .4byte gUnknown_202DE58
_08067004: .4byte gUnknown_80F8C48
_08067008:
mov r0, r9
adds r0, 0x48
ldrb r1, [r0]
str r0, [sp, 0x8]
cmp r1, 0x81
bne _08067028
adds r0, r5, 0
ldrb r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08067028
ldr r0, _08067024
b _0806709E
.align 2, 0
_08067024: .4byte gUnknown_80F8C44
_08067028:
mov r1, r10
ldr r0, [r1, 0x14]
cmp r0, 0
beq _08067040
bl sub_80450F8
cmp r0, 0x3
beq _08067040
ldr r0, _0806703C
b _0806709E
.align 2, 0
_0806703C: .4byte gUnknown_80F8E54
_08067040:
mov r2, r10
ldr r0, [r2, 0x14]
bl sub_8045108
adds r4, r0, 0
ldr r0, _080670A8
adds r1, r4, 0
bl sub_8045BF8
ldr r6, [r5]
str r6, [sp]
ldr r4, [r4]
mov r8, sp
str r4, [sp, 0x4]
movs r3, 0xEF
mov r0, sp
ldrb r2, [r0]
ands r2, r3
ldr r1, _080670AC
adds r0, r1, 0
ands r0, r6
orrs r0, r2
str r0, [sp]
mov r2, r8
ldrb r0, [r2, 0x4]
ands r0, r3
ands r1, r4
orrs r1, r0
str r1, [sp, 0x4]
adds r4, r7, 0x4
adds r0, r4, 0
movs r1, 0x1
bl sub_80461C8
movs r0, 0
strb r0, [r5, 0x2]
strb r0, [r5, 0x1]
strb r0, [r5]
adds r0, r4, 0
mov r1, sp
movs r2, 0x1
bl sub_80460F8
lsls r0, 24
cmp r0, 0
bne _080670B4
ldr r0, _080670B0
_0806709E:
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _080670EE
.align 2, 0
_080670A8: .4byte gUnknown_202DEA8
_080670AC: .4byte 0xffffff00
_080670B0: .4byte gUnknown_80F8E78
_080670B4:
ldr r1, [sp, 0x8]
ldrb r0, [r1]
cmp r0, 0x81
bne _080670C4
ldr r0, [sp, 0x4]
mov r2, r9
str r0, [r2, 0x60]
b _080670CA
_080670C4:
add r0, sp, 0x4
bl sub_8091290
_080670CA:
bl sub_80910B4
ldr r0, _08067100
bl sub_8083E38
ldr r0, _08067104
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
ldr r0, _08067108
ldr r0, [r0]
ldr r1, _0806710C
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
bl sub_807AB38
_080670EE:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067100: .4byte 0x0000014d
_08067104: .4byte gUnknown_80F8EAC
_08067108: .4byte gUnknown_203B418
_0806710C: .4byte 0x00003a08
thumb_func_end sub_8066FA4
thumb_func_start sub_8067110
sub_8067110:
push {r4-r6,lr}
sub sp, 0xC
adds r5, r0, 0
ldr r4, [r5, 0x70]
movs r1, 0
movs r2, 0x8
bl sub_8044D90
adds r6, r0, 0
ldr r0, _08067190
adds r1, r6, 0
bl sub_8045BF8
ldr r0, _08067194
adds r1, r4, 0
movs r2, 0
bl sub_80708B4
adds r0, r5, 0
adds r1, r6, 0
bl sub_8048D50
lsls r0, 24
cmp r0, 0
beq _08067188
adds r0, r6, 0
bl sub_80464AC
adds r1, r0, 0
adds r0, r5, 0
bl sub_80522A8
ldr r0, [r6]
str r0, [sp, 0x8]
adds r0, r5, 0
movs r1, 0
movs r2, 0x66
bl sub_8044DF0
movs r0, 0x1E
movs r1, 0x11
bl sub_803E708
str r5, [sp]
add r0, sp, 0x8
str r0, [sp, 0x4]
movs r0, 0
movs r1, 0
movs r2, 0
adds r3, r5, 0
bl sub_80479B8
ldr r0, _08067198
ldr r0, [r0]
ldr r1, _0806719C
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_807AB38
_08067188:
add sp, 0xC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08067190: .4byte gUnknown_202DE58
_08067194: .4byte gUnknown_202DF98
_08067198: .4byte gUnknown_203B418
_0806719C: .4byte 0x00003a08
thumb_func_end sub_8067110
thumb_func_start sub_80671A0
sub_80671A0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
adds r6, r0, 0
ldr r0, [r6, 0x70]
mov r8, r0
adds r0, r6, 0
movs r1, 0
movs r2, 0x9
bl sub_8044D90
adds r4, r0, 0
mov r0, r8
adds r0, 0x48
ldrb r0, [r0]
cmp r0, 0x81
bne _080671E8
ldrb r1, [r4]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _080671E8
ldr r0, _080671E0
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _080671E4
b _08067230
.align 2, 0
_080671E0: .4byte gUnknown_202DE58
_080671E4: .4byte gUnknown_80F8BE0
_080671E8:
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
beq _08067202
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08067220
_08067202:
ldrb r1, [r4]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08067220
ldr r0, _08067218
adds r1, r4, 0
bl sub_8045BF8
ldr r0, _0806721C
b _08067230
.align 2, 0
_08067218: .4byte gUnknown_202DE58
_0806721C: .4byte gUnknown_80F8BE0
_08067220:
adds r0, r6, 0
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _08067248
ldr r0, _08067244
_08067230:
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
movs r0, 0x14
movs r1, 0x4C
bl sub_803E708
b _080674F8
.align 2, 0
_08067244: .4byte gUnknown_80FF76C
_08067248:
ldr r2, [r4]
str r2, [sp, 0x4]
movs r1, 0xEF
add r0, sp, 0x4
ldrb r0, [r0]
ands r0, r1
ldr r1, _080672C0
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
mov r0, r8
adds r0, 0x48
ldrb r1, [r0]
adds r5, r0, 0
cmp r1, 0x80
bne _08067272
movs r4, 0
adds r0, 0x4
movs r1, 0x1
bl sub_80461C8
_08067272:
movs r7, 0x1
ldr r0, [sp, 0x4]
lsrs r0, 16
lsls r0, 24
lsrs r0, 24
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
beq _0806729A
ldr r0, [sp, 0x4]
lsrs r0, 16
lsls r0, 24
lsrs r0, 24
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080672A8
_0806729A:
ldr r0, [sp, 0x4]
lsrs r0, 8
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bls _080672A8
movs r7, 0
_080672A8:
cmp r7, 0
beq _080672C4
ldrb r0, [r5]
cmp r0, 0x80
beq _080672F6
movs r0, 0
strb r0, [r4, 0x2]
strb r0, [r4, 0x1]
strb r0, [r4]
bl sub_80910B4
b _080672F6
.align 2, 0
_080672C0: .4byte 0xffffff00
_080672C4:
ldrb r0, [r5]
cmp r0, 0x80
bne _080672F0
ldr r2, [sp, 0x4]
lsrs r0, r2, 8
subs r0, 0x1
lsls r0, 24
lsrs r0, 16
ldr r1, _080672EC
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
mov r0, r8
adds r0, 0x4C
add r1, sp, 0x4
movs r2, 0x1
bl sub_80460F8
b _080672F6
.align 2, 0
_080672EC: .4byte 0xffff00ff
_080672F0:
ldrb r0, [r4, 0x1]
subs r0, 0x1
strb r0, [r4, 0x1]
_080672F6:
adds r0, r6, 0
movs r1, 0x29
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08067310
movs r0, 0x8
bl sub_8084100
mov r1, r8
adds r1, 0x46
strb r0, [r1]
_08067310:
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
movs r1, 0xE0
add r1, r8
mov r10, r1
adds r1, r6, 0x4
str r1, [sp, 0x10]
add r1, sp, 0xC
mov r9, r1
cmp r0, 0
beq _08067364
mov r0, r8
adds r0, 0x46
ldrb r4, [r0]
movs r1, 0xB2
lsls r1, 1
adds r0, r6, 0
bl sub_80421C0
movs r7, 0x7
movs r5, 0x7
_0806733E:
subs r4, 0x1
ands r4, r7
adds r0, r6, 0
movs r1, 0
adds r2, r4, 0
bl sub_806CDD4
movs r0, 0x2
movs r1, 0x15
bl sub_803E708
subs r5, 0x1
cmp r5, 0
bge _0806733E
movs r1, 0xB3
lsls r1, 1
add r1, r8
movs r0, 0x4
strb r0, [r1]
_08067364:
add r4, sp, 0x4
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
beq _08067380
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08067384
_08067380:
movs r0, 0x1
strb r0, [r4, 0x1]
_08067384:
ldr r0, _080673B0
add r4, sp, 0x4
adds r1, r4, 0
bl sub_8045C08
ldr r0, _080673B4
mov r1, r8
movs r2, 0
bl sub_80708B4
ldrb r0, [r4, 0x2]
bl sub_8090BD0
lsls r0, 24
cmp r0, 0
bne _080673BC
ldr r0, _080673B8
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _080673C6
.align 2, 0
_080673B0: .4byte gUnknown_202DE58
_080673B4: .4byte gUnknown_202DF98
_080673B8: .4byte gUnknown_80F8EC8
_080673BC:
ldr r0, _080673F8
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
_080673C6:
add r0, sp, 0x4
ldrb r0, [r0, 0x2]
bl sub_8090BD0
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl sub_8042208
adds r0, r6, 0
movs r1, 0x27
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08067400
ldr r0, _080673FC
ldr r1, [sp, 0xC]
ands r1, r0
movs r0, 0x80
lsls r0, 1
orrs r1, r0
str r1, [sp, 0xC]
b _08067408
.align 2, 0
_080673F8: .4byte gUnknown_80F8EC4
_080673FC: .4byte 0xffff00ff
_08067400:
ldr r1, _0806741C
ldr r0, [sp, 0xC]
ands r0, r1
str r0, [sp, 0xC]
_08067408:
mov r1, r10
ldrb r0, [r1]
cmp r0, 0x1
beq _08067440
cmp r0, 0x1
bgt _08067420
cmp r0, 0
beq _08067426
b _08067462
.align 2, 0
_0806741C: .4byte 0xffff00ff
_08067420:
cmp r0, 0x2
beq _0806744C
b _08067462
_08067426:
ldr r1, _08067438
ldr r0, [sp, 0xC]
ands r0, r1
ldr r1, _0806743C
ands r0, r1
movs r1, 0xA0
lsls r1, 12
b _0806745E
.align 2, 0
_08067438: .4byte 0xffffff00
_0806743C: .4byte 0x0000ffff
_08067440:
ldr r1, _08067448
ldr r0, [sp, 0xC]
ands r0, r1
b _08067456
.align 2, 0
_08067448: .4byte 0xffffff00
_0806744C:
ldr r1, _080674B4
ldr r0, [sp, 0xC]
ands r0, r1
movs r1, 0x1
orrs r0, r1
_08067456:
ldr r1, _080674B8
ands r0, r1
movs r1, 0xC6
lsls r1, 15
_0806745E:
orrs r0, r1
str r0, [sp, 0xC]
_08067462:
adds r0, r6, 0
movs r1, 0xF
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08067486
ldr r1, _080674B4
ldr r0, [sp, 0xC]
ands r0, r1
movs r1, 0x1
orrs r0, r1
ldr r1, _080674B8
ands r0, r1
movs r1, 0xC6
lsls r1, 15
orrs r0, r1
str r0, [sp, 0xC]
_08067486:
add r0, sp, 0x4
ldrb r0, [r0, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080674BC
add r4, sp, 0x8
adds r0, r4, 0
adds r1, r6, 0
bl sub_8083904
mov r0, r9
str r0, [sp]
adds r0, r6, 0
add r1, sp, 0x4
ldr r2, [sp, 0x10]
adds r3, r4, 0
bl sub_80475C4
b _080674D0
.align 2, 0
_080674B4: .4byte 0xffffff00
_080674B8: .4byte 0x0000ffff
_080674BC:
mov r0, r8
adds r0, 0x46
ldrb r3, [r0]
mov r1, r9
str r1, [sp]
adds r0, r6, 0
add r1, sp, 0x4
ldr r2, [sp, 0x10]
bl sub_8047190
_080674D0:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080674F8
mov r0, r8
adds r0, 0x46
ldrb r1, [r0]
adds r0, r6, 0
bl sub_806CE68
ldr r0, _08067508
ldr r0, [r0]
ldr r1, _0806750C
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_807AB38
_080674F8:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067508: .4byte gUnknown_203B418
_0806750C: .4byte 0x00003a08
thumb_func_end sub_80671A0
thumb_func_start sub_8067510
sub_8067510:
push {r4,lr}
adds r4, r0, 0
bl sub_806773C
adds r1, r0, 0
movs r2, 0x1
negs r2, r2
adds r0, r4, 0
bl sub_8067558
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8067510
thumb_func_start sub_806752C
sub_806752C:
push {r4,lr}
ldr r1, _08067550
ldr r1, [r1]
ldrb r0, [r0, 0x4]
lsls r0, 2
ldr r2, _08067554
adds r1, r2
adds r1, r0
ldr r4, [r1]
bl sub_8083600
adds r1, r4, 0
movs r2, 0
bl sub_8067558
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08067550: .4byte gUnknown_203B418
_08067554: .4byte 0x0001357c
thumb_func_end sub_806752C
thumb_func_start sub_8067558
sub_8067558:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x12C
adds r6, r0, 0
adds r5, r1, 0
mov r9, r2
ldr r0, [r6, 0x70]
mov r8, r0
cmp r5, 0
bne _0806757C
ldr r0, _08067578
ldr r1, [r0]
movs r0, 0
b _08067716
.align 2, 0
_08067578: .4byte gUnknown_80F8EE4
_0806757C:
adds r0, r6, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
bne _08067594
ldr r0, _08067590
ldr r1, [r0]
movs r0, 0
b _08067716
.align 2, 0
_08067590: .4byte gUnknown_80F8EE4
_08067594:
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080675AA
b _0806771E
_080675AA:
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080675C0
b _0806771E
_080675C0:
ldr r7, [r5, 0x70]
ldr r4, _08067608
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0
bl sub_80708B4
adds r4, 0x50
adds r0, r4, 0
mov r1, r8
movs r2, 0x7
bl sub_80708B4
bl sub_8084778
adds r0, r6, 0
adds r1, r5, 0
bl sub_807A96C
adds r0, r5, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
beq _08067600
adds r0, r5, 0
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _08067610
_08067600:
ldr r0, _0806760C
ldr r1, [r0]
movs r0, 0
b _08067716
.align 2, 0
_08067608: .4byte gUnknown_202DF98
_0806760C: .4byte gUnknown_80FE008
_08067610:
adds r0, r6, 0x4
adds r1, r5, 0x4
bl sub_80983D8
adds r1, r0, 0
adds r0, r6, 0
bl sub_806CEFC
mov r1, r9
cmp r1, 0
blt _0806762E
adds r0, r5, 0
bl sub_806CEFC
b _0806763C
_0806762E:
mov r0, r8
adds r0, 0x46
ldrb r1, [r0]
adds r1, 0x4
adds r0, r5, 0
bl sub_806CEFC
_0806763C:
ldrb r0, [r7, 0x8]
cmp r0, 0x1
bne _08067648
bl sub_807EF84
b _0806772A
_08067648:
adds r0, r7, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _08067694
ldr r0, _08067668
ldr r1, [r0]
ldr r2, _0806766C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _08067674
ldr r0, _08067670
ldr r1, [r0]
movs r0, 0
b _08067716
.align 2, 0
_08067668: .4byte gUnknown_203B418
_0806766C: .4byte 0x0000066e
_08067670: .4byte gUnknown_80FF674
_08067674:
ldr r3, _08067688
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
beq _0806768C
adds r0, r5, 0
bl sub_80845E0
b _0806772A
.align 2, 0
_08067688: .4byte 0x00000677
_0806768C:
adds r0, r5, 0
bl sub_8084448
b _0806772A
_08067694:
movs r0, 0x4
ldrsh r5, [r7, r0]
movs r6, 0
adds r0, r7, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
bne _080676AA
movs r5, 0xD2
lsls r5, 1
b _080676CC
_080676AA:
cmp r0, 0x47
bne _080676B8
ldr r5, _080676B4
b _080676CC
.align 2, 0
_080676B4: .4byte 0x000001a5
_080676B8:
cmp r0, 0x41
bne _080676CC
ldr r0, _080676E8
ldr r0, [r0]
ldr r1, _080676EC
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _080676CC
movs r6, 0x1
_080676CC:
movs r3, 0x10
ldrsh r2, [r7, r3]
adds r0, r2, 0
cmp r2, 0
bge _080676D8
adds r0, r2, 0x3
_080676D8:
movs r3, 0xE
ldrsh r1, [r7, r3]
asrs r0, 2
cmp r1, r0
bgt _080676F0
movs r2, 0x2
b _08067708
.align 2, 0
_080676E8: .4byte gUnknown_203B418
_080676EC: .4byte 0x0000065c
_080676F0:
movs r0, 0xE
ldrsh r4, [r7, r0]
lsls r0, r2, 1
adds r0, r2
lsls r0, 1
movs r1, 0xA
bl __divsi3
movs r2, 0
cmp r4, r0
bgt _08067708
movs r2, 0x1
_08067708:
mov r0, sp
adds r1, r5, 0
adds r3, r6, 0
bl sub_806A3D4
movs r0, 0
mov r1, sp
_08067716:
movs r2, 0x1
bl PrintFieldMessage
b _0806772A
_0806771E:
ldr r0, _08067738
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0806772A:
add sp, 0x12C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067738: .4byte gUnknown_80F8EE4
thumb_func_end sub_8067558
thumb_func_start sub_806773C
sub_806773C:
push {r4,r5,lr}
adds r5, r0, 0
bl sub_80696A8
adds r4, r0, 0
cmp r4, 0
beq _08067760
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _08067760
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _08067760
adds r0, r4, 0
b _08067762
_08067760:
movs r0, 0
_08067762:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_806773C
thumb_func_start sub_8067768
sub_8067768:
push {r4,lr}
ldr r1, _0806778C
ldr r1, [r1]
ldrb r0, [r0, 0x4]
lsls r0, 2
ldr r2, _08067790
adds r1, r2
adds r1, r0
ldr r4, [r1]
bl sub_8083600
adds r1, r4, 0
movs r2, 0
bl sub_8067794
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0806778C: .4byte gUnknown_203B418
_08067790: .4byte 0x0001357c
thumb_func_end sub_8067768
thumb_func_start sub_8067794
sub_8067794:
push {r4-r7,lr}
sub sp, 0x40
adds r7, r1, 0
ldr r4, [r7, 0x70]
cmp r7, 0
bne _080677B4
ldr r0, _080677B0
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _0806786C
.align 2, 0
_080677B0: .4byte gUnknown_80F8F08
_080677B4:
ldr r0, _080677F0
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _080677F4
ldr r5, [r0]
ldr r0, _080677F8
ldr r6, [r0]
ldrb r2, [r4, 0xA]
cmp r2, 0
blt _08067834
ldr r1, _080677FC
movs r0, 0x64
muls r0, r2
ldr r2, _08067800
adds r0, r2
ldr r1, [r1]
adds r4, r1, r0
movs r1, 0xA
ldrsh r0, [r4, r1]
bl sub_806A564
lsls r0, 24
cmp r0, 0
beq _0806780C
ldr r0, _08067804
ldr r5, [r0]
ldr r0, _08067808
b _08067832
.align 2, 0
_080677F0: .4byte gUnknown_202DF98
_080677F4: .4byte gUnknown_80F9094
_080677F8: .4byte gUnknown_80F913C
_080677FC: .4byte gUnknown_203B45C
_08067800: .4byte 0x00008df8
_08067804: .4byte gUnknown_80F9114
_08067808: .4byte gUnknown_80F9154
_0806780C:
movs r2, 0xA
ldrsh r0, [r4, r2]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _08067834
bl sub_8044210
lsls r0, 24
cmp r0, 0
beq _0806782C
ldr r0, _08067828
b _0806782E
.align 2, 0
_08067828: .4byte gUnknown_80F90DC
_0806782C:
ldr r0, _08067874
_0806782E:
ldr r5, [r0]
ldr r0, _08067878
_08067832:
ldr r6, [r0]
_08067834:
movs r0, 0
adds r1, r5, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0x1
bne _0806786C
ldr r4, _0806787C
mov r0, sp
adds r1, r4, 0
movs r2, 0x40
bl strncpy
ldr r1, _08067880
adds r0, r7, 0
movs r2, 0
bl sub_8068FE0
adds r0, r4, 0
mov r1, sp
movs r2, 0x40
bl strncpy
movs r0, 0
adds r1, r6, 0
movs r2, 0x1
bl PrintFieldMessage
_0806786C:
add sp, 0x40
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067874: .4byte gUnknown_80F90C8
_08067878: .4byte gUnknown_80F9150
_0806787C: .4byte gUnknown_202DF98
_08067880: .4byte 0x0000021d
thumb_func_end sub_8067794
thumb_func_start sub_8067884
sub_8067884:
push {r4-r6,lr}
sub sp, 0x4
adds r5, r0, 0
movs r6, 0
b _0806789A
_0806788E:
ldr r1, _08067900
adds r0, r4, r1
ldrb r0, [r0]
cmp r0, 0
bne _080678C6
adds r6, 0x1
_0806789A:
adds r0, r5, 0
movs r1, 0x1
bl sub_8070828
cmp r6, r0
bge _080678C6
ldr r4, [r5, 0x70]
adds r0, r4, 0
adds r0, 0x50
ldrb r1, [r0]
movs r0, 0
str r0, [sp]
adds r0, r5, 0
movs r2, 0x1
movs r3, 0
bl sub_8055A00
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0806788E
_080678C6:
adds r0, r5, 0
movs r1, 0x1
bl sub_8057588
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _080678F6
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080678F0
ldr r0, [r5, 0x70]
adds r0, 0x50
ldrb r1, [r0]
adds r0, r5, 0
bl sub_806A9B4
_080678F0:
adds r0, r5, 0
bl sub_806A1B0
_080678F6:
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08067900: .4byte 0x00000159
thumb_func_end sub_8067884
thumb_func_start sub_8067904
sub_8067904:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
adds r5, r0, 0
lsls r1, 16
lsrs r1, 16
mov r9, r1
ldr r6, [r5, 0x70]
ldr r1, _08067940
movs r0, 0
str r0, [r1]
add r0, sp, 0x8
mov r1, r9
bl sub_8092A88
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x1
bne _0806794C
ldr r0, _08067944
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08067948
b _08067962
.align 2, 0
_08067940: .4byte gUnknown_202F208
_08067944: .4byte gUnknown_202DF98
_08067948: .4byte gUnknown_80F8F20
_0806794C:
adds r0, r6, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _08067974
ldr r0, _0806796C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08067970
_08067962:
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08067A56
.align 2, 0
_0806796C: .4byte gUnknown_202DF98
_08067970: .4byte gUnknown_80F8F38
_08067974:
movs r0, 0xB0
lsls r0, 1
movs r1, 0
mov r10, r1
cmp r9, r0
bne _08067984
movs r2, 0x1
mov r10, r2
_08067984:
movs r0, 0
mov r8, r0
movs r7, 0
add r4, sp, 0x8
b _080679D2
_0806798E:
movs r1, 0xBC
lsls r1, 1
adds r0, r6, r1
strh r7, [r0]
ldrb r0, [r4]
movs r1, 0x8
orrs r0, r1
orrs r0, r7
movs r1, 0x4
orrs r0, r1
strb r0, [r4]
movs r0, 0xA
strb r0, [r4, 0x4]
str r7, [sp]
str r4, [sp, 0x4]
adds r0, r5, 0
mov r1, r10
movs r2, 0
movs r3, 0
bl sub_8055FA0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080679DE
ldr r2, _08067A68
adds r0, r6, r2
ldrb r0, [r0]
cmp r0, 0
bne _080679DE
movs r0, 0x1
add r8, r0
_080679D2:
adds r0, r5, 0
movs r1, 0x1
bl sub_8070828
cmp r8, r0
blt _0806798E
_080679DE:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08067A56
movs r0, 0xB0
lsls r0, 1
cmp r9, r0
bne _08067A04
ldr r0, _08067A6C
ldr r0, [r0]
cmp r0, 0
bne _08067A04
ldr r0, _08067A70
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08067A04:
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _08067A50
movs r0, 0xB0
lsls r0, 1
cmp r9, r0
beq _08067A50
ldr r4, _08067A74
adds r3, r6, 0
adds r3, 0x46
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0]
ldrh r1, [r5, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r2, _08067A78
ldr r1, [sp, 0x10]
ands r1, r2
orrs r1, r0
str r1, [sp, 0x10]
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0, 0x2]
ldrh r2, [r5, 0x6]
adds r0, r2
lsls r0, 16
ldr r2, _08067A7C
ands r1, r2
orrs r1, r0
str r1, [sp, 0x10]
add r0, sp, 0x10
movs r1, 0x1
bl sub_807FE44
_08067A50:
adds r0, r5, 0
bl sub_8071DA4
_08067A56:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067A68: .4byte 0x00000159
_08067A6C: .4byte gUnknown_202F208
_08067A70: .4byte gUnknown_80FC690
_08067A74: .4byte gUnknown_80F4448
_08067A78: .4byte 0xffff0000
_08067A7C: .4byte 0x0000ffff
thumb_func_end sub_8067904
thumb_func_start sub_8067A80
sub_8067A80:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x6C
str r1, [sp, 0x68]
mov r8, r2
mov r9, r3
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x64]
ldr r1, _08067AC8
add r0, sp, 0x4
movs r2, 0x60
bl memcpy
ldr r1, _08067ACC
movs r0, 0
str r0, [r1]
mov r10, r0
cmp r10, r8
blt _08067AB0
b _08067ED8
_08067AB0:
ldr r5, _08067AD0
mov r4, r9
mov r3, r8
_08067AB6:
ldm r4!, {r2}
ldrh r1, [r2]
adds r0, r5, 0
ands r0, r1
strh r0, [r2]
subs r3, 0x1
cmp r3, 0
bne _08067AB6
b _08067ED8
.align 2, 0
_08067AC8: .4byte gUnknown_8106DC8
_08067ACC: .4byte gUnknown_202F30C
_08067AD0: .4byte 0x00007fff
_08067AD4:
movs r7, 0
ldr r1, _08067B98
movs r0, 0x1
strb r0, [r1]
strb r7, [r1, 0x1]
movs r0, 0xE
strb r0, [r1, 0x2]
strb r7, [r1, 0x3]
add r0, sp, 0x4
movs r1, 0x1
bl sub_803ECB4
ldr r5, _08067B9C
ldr r2, [r5]
ldr r0, [sp, 0x68]
str r0, [sp]
ldr r0, [sp, 0x64]
mov r1, r9
mov r3, r8
bl sub_8067F00
ldr r4, _08067BA0
mov r0, r8
cmp r0, 0x8
ble _08067B08
movs r0, 0x8
_08067B08:
strh r0, [r4, 0x1A]
mov r1, r10
strh r1, [r4, 0x18]
movs r0, 0x8
strh r0, [r4, 0x1C]
strh r7, [r4, 0x1E]
strh r7, [r4, 0x20]
strh r7, [r4, 0x4]
movs r0, 0x12
strh r0, [r4, 0x6]
strh r7, [r4, 0xC]
strh r7, [r4, 0xE]
strh r7, [r4, 0x14]
str r7, [r4]
adds r0, r4, 0
adds r0, 0x28
bl sub_801317C
adds r0, r4, 0
movs r1, 0
bl sub_80137B0
adds r6, r5, 0
_08067B36:
ldr r0, _08067BA0
bl AddMenuCursorSprite
movs r5, 0
movs r7, 0
ldr r0, [r6]
mov r2, r8
subs r0, r2, r0
cmp r0, 0x8
ble _08067B50
movs r5, 0x1
bl sub_80684C4
_08067B50:
ldr r0, [r6]
cmp r0, 0
beq _08067B5C
movs r7, 0x1
bl sub_8068344
_08067B5C:
movs r0, 0
ldr r1, _08067BA4
bl sub_8014140
adds r4, r0, 0
movs r0, 0x37
bl sub_803E46C
cmp r4, 0x2
bne _08067BAC
cmp r5, 0
beq _08067BAC
ldr r0, [r6]
mov r3, r8
subs r0, r3, r0
cmp r0, 0x8
ble _08067BF0
ldr r5, _08067BA8
movs r4, 0x5
_08067B82:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x37
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08067B82
b _08067BEA
.align 2, 0
_08067B98: .4byte gUnknown_202F308
_08067B9C: .4byte gUnknown_202F30C
_08067BA0: .4byte gUnknown_202EE10
_08067BA4: .4byte gUnknown_8106DA4
_08067BA8: .4byte gUnknown_203B080
_08067BAC:
ldr r0, _08067BF8
ldrh r1, [r0, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08067C0C
movs r0, 0x1
bl sub_8083CE0
ldr r1, _08067BFC
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0x7
bne _08067C04
ldr r0, [r6]
mov r3, r8
subs r0, r3, r0
cmp r0, 0x8
ble _08067BF0
ldr r5, _08067C00
movs r4, 0x5
_08067BD6:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x37
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08067BD6
_08067BEA:
ldr r0, [r6]
adds r0, 0x1
str r0, [r6]
_08067BF0:
movs r7, 0
movs r0, 0x7
mov r10, r0
b _08067CF6
.align 2, 0
_08067BF8: .4byte gUnknown_20255F0
_08067BFC: .4byte gUnknown_202EE10
_08067C00: .4byte gUnknown_203B080
_08067C04:
adds r0, r1, 0
movs r1, 0
bl sub_80136E0
_08067C0C:
cmp r4, 0x1
bne _08067C44
cmp r7, 0
beq _08067C44
ldr r0, [r6]
cmp r0, 0
beq _08067C38
ldr r5, _08067C40
movs r4, 0x5
_08067C1E:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x37
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08067C1E
ldr r0, [r6]
subs r0, 0x1
str r0, [r6]
_08067C38:
movs r7, 0
movs r1, 0
mov r10, r1
b _08067CF6
.align 2, 0
_08067C40: .4byte gUnknown_203B084
_08067C44:
ldr r0, _08067C8C
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08067CA0
movs r0, 0x1
bl sub_8083CE0
ldr r1, _08067C90
movs r2, 0x18
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08067C98
ldr r0, [r6]
cmp r0, 0
beq _08067C84
ldr r5, _08067C94
movs r4, 0x5
_08067C6A:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x37
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08067C6A
ldr r0, [r6]
subs r0, 0x1
str r0, [r6]
_08067C84:
movs r7, 0
movs r3, 0
mov r10, r3
b _08067CF6
.align 2, 0
_08067C8C: .4byte gUnknown_20255F0
_08067C90: .4byte gUnknown_202EE10
_08067C94: .4byte gUnknown_203B084
_08067C98:
adds r0, r1, 0
movs r1, 0
bl sub_8013744
_08067CA0:
bl sub_80048C8
lsls r0, 24
cmp r0, 0
beq _08067CAC
b _08067B36
_08067CAC:
ldr r0, _08067CD4
ldrh r1, [r0, 0x2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _08067D40
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08067CCC
ldr r2, _08067CD8
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08067CDC
_08067CCC:
bl sub_8083D08
movs r7, 0x1
b _08067CF6
.align 2, 0
_08067CD4: .4byte gUnknown_20255F0
_08067CD8: .4byte gUnknown_202EE10
_08067CDC:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08067CF0
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _08067CF0
b _08067B36
_08067CF0:
bl sub_8083D30
movs r7, 0x2
_08067CF6:
ldr r4, _08067D34
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x37
bl sub_803E46C
cmp r7, 0
bne _08067D0A
b _08067AD4
_08067D0A:
cmp r7, 0x2
bne _08067D48
movs r1, 0x18
ldrsh r0, [r4, r1]
mov r10, r0
ldr r0, _08067D38
ldr r0, [r0]
ldr r2, [sp, 0x68]
cmp r0, r2
bge _08067D20
b _08067AD4
_08067D20:
ldr r0, _08067D3C
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _08067D32
b _08067ED8
_08067D32:
b _08067AD4
.align 2, 0
_08067D34: .4byte gUnknown_202EE10
_08067D38: .4byte gUnknown_202F310
_08067D3C: .4byte gUnknown_80FDFB8
_08067D40:
bl sub_8083D1C
movs r7, 0x3
b _08067CF6
_08067D48:
cmp r7, 0x3
bne _08067D64
movs r0, 0x18
ldrsh r3, [r4, r0]
mov r10, r3
ldr r0, _08067D60
ldr r0, [r0]
add r0, r10
lsls r0, 2
add r0, r9
b _08067ED0
.align 2, 0
_08067D60: .4byte gUnknown_202F30C
_08067D64:
movs r2, 0x18
ldrsh r1, [r4, r2]
mov r10, r1
ldr r0, _08067DAC
ldr r0, [r0]
adds r4, r0, r1
ldr r1, _08067DB0
movs r0, 0
str r0, [r1]
movs r0, 0x29
movs r1, 0
bl sub_8044F5C
movs r0, 0x2A
movs r1, 0
bl sub_8044F5C
movs r0, 0x40
movs r1, 0
bl sub_8044F5C
lsls r0, r4, 2
add r0, r9
ldr r0, [r0]
ldrh r0, [r0]
movs r3, 0x80
lsls r3, 8
adds r1, r3, 0
ands r0, r1
cmp r0, 0
beq _08067DBC
movs r0, 0x29
bl sub_8044FF0
b _08067DC2
.align 2, 0
_08067DAC: .4byte gUnknown_202F30C
_08067DB0: .4byte gUnknown_202EE6C
_08067DB4:
bl sub_8083D08
movs r7, 0x1
b _08067E6E
_08067DBC:
movs r0, 0x2A
bl sub_8044FF0
_08067DC2:
lsls r0, r4, 2
mov r2, r9
adds r1, r0, r2
ldr r2, [r1]
ldrb r1, [r2, 0x2]
adds r6, r0, 0
cmp r1, 0
bne _08067DDC
ldrb r1, [r2, 0x4]
cmp r1, 0x40
beq _08067DDC
cmp r1, 0x41
bne _08067DE2
_08067DDC:
movs r0, 0x29
bl sub_8044FF0
_08067DE2:
bl sub_8045064
add r0, sp, 0x4
movs r1, 0x15
bl sub_805FC30
ldr r4, _08067EA0
ldr r5, _08067EA4
adds r7, r4, 0
adds r7, 0x2A
_08067DF6:
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x37
bl sub_803E46C
ldrh r1, [r5, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08067E1A
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_80136E0
_08067E1A:
ldrh r1, [r5, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08067E32
movs r0, 0x1
bl sub_8083CE0
adds r0, r4, 0
movs r1, 0x1
bl sub_8013744
_08067E32:
ldrh r1, [r5, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08067E46
adds r0, r4, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _08067E58
_08067E46:
movs r3, 0x18
ldrsh r0, [r4, r3]
bl sub_8044F3C
lsls r0, 24
cmp r0, 0
bne _08067DB4
bl sub_8083D30
_08067E58:
ldrh r1, [r5, 0x2]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08067E68
ldrb r0, [r7]
cmp r0, 0
beq _08067DF6
_08067E68:
bl sub_8083D30
movs r7, 0
_08067E6E:
ldr r4, _08067EA0
adds r0, r4, 0
bl AddMenuCursorSprite
movs r0, 0x37
bl sub_803E46C
cmp r7, 0
bne _08067E82
b _08067AD4
_08067E82:
movs r1, 0x18
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08067EA8
mov r2, r9
adds r0, r6, r2
ldr r1, [r0]
ldrh r2, [r1]
movs r3, 0x80
lsls r3, 8
adds r0, r3, 0
orrs r0, r2
strh r0, [r1]
b _08067EBC
.align 2, 0
_08067EA0: .4byte gUnknown_202EE10
_08067EA4: .4byte gUnknown_20255F0
_08067EA8:
cmp r0, 0x1
bne _08067ECC
mov r1, r9
adds r0, r6, r1
ldr r2, [r0]
ldrh r0, [r2]
ldr r3, _08067EC8
adds r1, r3, 0
ands r0, r1
strh r0, [r2]
_08067EBC:
mov r0, r8
mov r1, r9
bl sub_8068310
b _08067AD4
.align 2, 0
_08067EC8: .4byte 0x00007fff
_08067ECC:
mov r1, r9
adds r0, r6, r1
_08067ED0:
ldr r0, [r0]
bl sub_806806C
b _08067AD4
_08067ED8:
mov r0, r8
mov r1, r9
bl sub_8068310
ldr r0, _08067EFC
ldr r0, [r0]
ldr r2, [sp, 0x68]
cmp r0, r2
bge _08067EEC
b _08067AD4
_08067EEC:
add sp, 0x6C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08067EFC: .4byte gUnknown_202F310
thumb_func_end sub_8067A80
thumb_func_start sub_8067F00
sub_8067F00:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
adds r4, r0, 0
mov r9, r1
str r3, [sp, 0x4]
lsls r4, 24
lsrs r4, 24
subs r7, r2, 0x1
movs r0, 0x16
mov r8, r0
movs r0, 0
bl sub_80073B8
ldr r0, _08067F44
adds r1, r4, 0
movs r2, 0
bl sub_8092578
ldr r2, _08067F48
movs r0, 0
str r0, [sp]
movs r0, 0xC
movs r1, 0
movs r3, 0
bl sub_8014FF0
movs r1, 0
mov r10, r1
b _08067FF6
.align 2, 0
_08067F44: .4byte gUnknown_202DF98
_08067F48: .4byte gUnknown_8106E28
_08067F4C:
ldr r4, _08067F8C
lsls r6, r7, 2
mov r0, r9
adds r5, r6, r0
ldr r1, [r5]
adds r0, r4, 0
movs r2, 0
bl sub_808D9AC
adds r4, 0x50
ldr r0, [r5]
movs r2, 0x8
ldrsh r1, [r0, r2]
adds r0, r4, 0
bl sub_808D930
ldr r1, _08067F90
adds r0, r7, 0x1
str r0, [r1]
ldr r0, [r5]
ldrh r1, [r0]
movs r0, 0x80
lsls r0, 8
ands r0, r1
cmp r0, 0
beq _08067F9C
ldr r0, _08067F94
ldr r1, _08067F98
bl strcpy
b _08067FA4
.align 2, 0
_08067F8C: .4byte gUnknown_202DF98
_08067F90: .4byte gUnknown_202DE30
_08067F94: .4byte gUnknown_202DE58
_08067F98: .4byte gUnknown_8106E2C
_08067F9C:
ldr r0, _08067FCC
ldr r1, _08067FD0
bl strcpy
_08067FA4:
mov r1, r9
adds r0, r6, r1
ldr r0, [r0]
ldrh r1, [r0]
movs r0, 0x80
lsls r0, 7
ands r0, r1
lsls r0, 16
lsrs r0, 16
cmp r0, 0
beq _08067FD8
ldr r2, _08067FD4
movs r0, 0
str r0, [sp]
movs r0, 0x7
mov r1, r8
movs r3, 0
bl sub_8014FF0
b _08067FE6
.align 2, 0
_08067FCC: .4byte gUnknown_202DE58
_08067FD0: .4byte gUnknown_8106E30
_08067FD4: .4byte gUnknown_8106E34
_08067FD8:
ldr r2, _08068028
str r0, [sp]
movs r0, 0x7
mov r1, r8
movs r3, 0
bl sub_8014FF0
_08067FE6:
movs r2, 0x1
add r10, r2
movs r0, 0xC
add r8, r0
adds r7, 0x1
mov r1, r10
cmp r1, 0x9
bgt _08068000
_08067FF6:
cmp r7, 0
blt _08067FE6
ldr r2, [sp, 0x4]
cmp r7, r2
blt _08067F4C
_08068000:
movs r0, 0
bl sub_80073E0
movs r0, 0x1
bl sub_80073B8
ldr r0, _0806802C
ldr r0, [r0]
ldr r1, [sp, 0x28]
cmp r0, r1
blt _08068034
ldr r2, _08068030
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r1, 0x2
movs r3, 0x1
bl sub_8014FF0
b _0806804C
.align 2, 0
_08068028: .4byte gUnknown_8106E48
_0806802C: .4byte gUnknown_202F310
_08068030: .4byte gUnknown_8106E5C
_08068034:
ldr r1, _08068064
ldr r2, [sp, 0x28]
subs r0, r2, r0
str r0, [r1]
ldr r2, _08068068
movs r0, 0
str r0, [sp]
movs r0, 0x8
movs r1, 0x2
movs r3, 0x1
bl sub_8014FF0
_0806804C:
movs r0, 0x1
bl sub_80073E0
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08068064: .4byte gUnknown_202DE30
_08068068: .4byte gUnknown_8106E6C
thumb_func_end sub_8067F00
thumb_func_start sub_806806C
sub_806806C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x110
str r0, [sp, 0x108]
add r4, sp, 0x98
adds r0, r4, 0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [r4, 0x4]
movs r1, 0x2
strh r1, [r4, 0x8]
strh r1, [r4, 0xA]
movs r2, 0x12
strh r2, [r4, 0xC]
movs r0, 0xE
strh r0, [r4, 0xE]
strh r2, [r4, 0x10]
strh r1, [r4, 0x12]
ldr r0, _080681B4
str r0, [r4, 0x14]
movs r0, 0x3
str r0, [r4, 0x1C]
str r0, [r4, 0x34]
str r0, [r4, 0x4C]
movs r7, 0
add r1, sp, 0x44
strh r7, [r1]
mov r0, sp
adds r0, 0x5A
strh r7, [r0]
ldr r0, _080681B8
strh r7, [r0, 0x18]
mov r9, r1
adds r1, 0xB4
str r1, [sp, 0x10C]
add r2, sp, 0x68
mov r10, r2
adds r6, r0, 0
_080680C4:
movs r3, 0
mov r8, r3
add r1, sp, 0xF8
ldr r0, _080681BC
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldr r0, [r0]
str r0, [r1]
ldr r1, _080681B4
movs r2, 0x4
strb r2, [r1]
strb r7, [r1, 0x1]
movs r0, 0xA
strb r0, [r1, 0x2]
mov r4, r8
strb r4, [r1, 0x3]
strh r7, [r6, 0x1E]
strh r2, [r6, 0x20]
mov r0, r8
strh r0, [r6, 0x1A]
strh r0, [r6, 0x18]
strh r0, [r6, 0x1C]
strh r0, [r6, 0x4]
movs r0, 0x10
strh r0, [r6, 0x6]
mov r1, r8
strh r1, [r6, 0x14]
mov r2, r8
str r2, [r6]
adds r0, r6, 0
adds r0, 0x28
bl sub_801317C
add r0, sp, 0x98
movs r1, 0x1
bl sub_803ECB4
ldr r0, _080681C0
ldr r0, [r0]
ldr r3, _080681C4
adds r0, r3
ldrb r2, [r0]
add r0, sp, 0x4
ldr r1, [sp, 0x108]
bl sub_808FF20
lsls r4, r7, 2
mov r0, sp
adds r0, r4
adds r0, 0xF8
ldr r0, [r0]
mov r1, r8
str r1, [sp]
adds r1, r7, 0
add r2, sp, 0x4
mov r3, r10
bl sub_808F844
ldr r1, _080681C8
movs r2, 0
ldrsh r0, [r1, r2]
adds r0, 0xF
lsls r0, 3
strh r0, [r6, 0xC]
movs r3, 0x2
ldrsh r0, [r1, r3]
adds r0, 0x1
lsls r0, 3
subs r0, 0x2
strh r0, [r6, 0xE]
_08068150:
ldr r0, _080681B8
bl AddMenuCursorSprite
ldr r1, [sp, 0x10C]
adds r0, r1, r4
ldr r0, [r0]
cmp r0, 0x4
bne _0806817A
mov r2, r10
ldrb r0, [r2, 0x8]
cmp r0, 0
beq _0806816C
bl sub_80684C4
_0806816C:
mov r3, r9
movs r1, 0
ldrsh r0, [r3, r1]
cmp r0, 0
beq _0806817A
bl sub_8068344
_0806817A:
movs r0, 0
ldr r1, _080681CC
bl sub_8014140
adds r5, r0, 0
movs r0, 0x1C
bl sub_803E46C
ldr r3, _080681D0
ldrh r1, [r3, 0x2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _080681A2
ldr r2, _080681B8
adds r0, r2, 0
adds r0, 0x2B
ldrb r0, [r0]
cmp r0, 0
beq _080681D4
_080681A2:
movs r0, 0
bl sub_8083CE0
adds r7, 0x1
cmp r7, 0x4
beq _080681B0
b _080682E8
_080681B0:
movs r7, 0
b _080682E8
.align 2, 0
_080681B4: .4byte gUnknown_202F308
_080681B8: .4byte gUnknown_202EE10
_080681BC: .4byte gUnknown_8106E80
_080681C0: .4byte gUnknown_203B418
_080681C4: .4byte 0x0000065a
_080681C8: .4byte gUnknown_2027370
_080681CC: .4byte gUnknown_8106DA4
_080681D0: .4byte gUnknown_20255F0
_080681D4:
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _080681E6
adds r0, r2, 0
adds r0, 0x2C
ldrb r0, [r0]
cmp r0, 0
beq _080681FA
_080681E6:
movs r0, 0
bl sub_8083CE0
subs r7, 0x1
movs r0, 0x1
negs r0, r0
cmp r7, r0
bne _080682E8
movs r7, 0x3
b _080682E8
_080681FA:
ldr r2, [sp, 0x10C]
adds r0, r2, r4
ldr r0, [r0]
cmp r0, 0x4
bne _08068294
ldrh r1, [r3, 0x4]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _08068212
cmp r5, 0x2
bne _08068248
_08068212:
mov r3, r10
ldrb r0, [r3, 0x8]
cmp r0, 0
beq _08068248
movs r0, 0
bl sub_8083CE0
ldr r5, _08068244
movs r4, 0x5
_08068224:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08068224
mov r4, r9
ldrh r0, [r4]
adds r0, 0x1
strh r0, [r4]
b _080682E8
.align 2, 0
_08068244: .4byte gUnknown_203B080
_08068248:
ldr r0, _0806828C
ldrh r1, [r0, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _08068258
cmp r5, 0x1
bne _08068294
_08068258:
mov r1, r9
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0
beq _08068294
movs r0, 0
bl sub_8083CE0
ldr r5, _08068290
movs r4, 0x5
_0806826C:
ldr r1, [r5]
movs r0, 0
bl _call_via_r1
movs r0, 0x1C
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0806826C
mov r3, r9
ldrh r0, [r3]
subs r0, 0x1
strh r0, [r3]
b _080682E8
.align 2, 0
_0806828C: .4byte gUnknown_20255F0
_08068290: .4byte gUnknown_203B084
_08068294:
bl sub_80048C8
lsls r0, 24
cmp r0, 0
beq _080682A0
b _08068150
_080682A0:
ldr r0, _080682C4
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080682B8
ldr r2, _080682C8
adds r0, r2, 0
adds r0, 0x29
ldrb r0, [r0]
cmp r0, 0
beq _080682CC
_080682B8:
bl sub_8083D08
movs r4, 0x1
mov r8, r4
b _080682E8
.align 2, 0
_080682C4: .4byte gUnknown_20255F0
_080682C8: .4byte gUnknown_202EE10
_080682CC:
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080682E0
adds r0, r2, 0
adds r0, 0x2A
ldrb r0, [r0]
cmp r0, 0
bne _080682E0
b _08068150
_080682E0:
bl sub_8083D30
movs r0, 0x1
mov r8, r0
_080682E8:
movs r0, 0x37
bl sub_803E46C
mov r1, r8
cmp r1, 0
bne _080682F6
b _080680C4
_080682F6:
movs r0, 0
movs r1, 0
bl sub_803EAF0
add sp, 0x110
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806806C
thumb_func_start sub_8068310
sub_8068310:
push {r4-r6,lr}
movs r4, 0
ldr r6, _08068340
cmp r4, r0
bge _08068338
movs r5, 0x80
lsls r5, 8
adds r3, r1, 0
adds r2, r0, 0
_08068322:
ldr r0, [r3]
ldrh r1, [r0]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _08068330
adds r4, 0x1
_08068330:
adds r3, 0x4
subs r2, 0x1
cmp r2, 0
bne _08068322
_08068338:
str r4, [r6]
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08068340: .4byte gUnknown_202F310
thumb_func_end sub_8068310
thumb_func_start sub_8068344
sub_8068344:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
ldr r0, _08068494
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _0806835C
b _08068486
_0806835C:
ldr r0, _08068498
mov r9, r0
movs r0, 0
movs r1, 0
str r0, [sp]
str r1, [sp, 0x4]
mov r0, sp
ldrh r0, [r0]
ldr r1, _0806849C
ands r1, r0
ldr r3, _080684A0
ldr r0, [sp]
ands r0, r3
orrs r0, r1
str r0, [sp]
mov r1, sp
ldrh r1, [r1]
adds r2, r3, 0
ands r2, r0
orrs r2, r1
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080684A4
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r6, _080684A8
mov r8, r6
mov r0, r8
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080684AC
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080684B0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
movs r4, 0x80
lsls r4, 7
mov r0, sp
ldrh r1, [r0]
ldr r6, _080684B4
adds r0, r6, 0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
orrs r4, r0
ands r3, r1
orrs r3, r4
str r3, [sp]
movs r1, 0x80
lsls r1, 6
mov r5, sp
ldrh r0, [r5, 0x2]
ldr r2, _080684B8
ands r2, r0
orrs r2, r1
ands r2, r6
movs r3, 0xFC
lsls r3, 2
ldrh r1, [r5, 0x4]
movs r0, 0xFC
lsls r0, 8
ands r0, r1
orrs r0, r3
mov r1, r8
ands r0, r1
movs r3, 0xF
movs r1, 0xF0
lsls r1, 8
ldr r4, _080684BC
ands r0, r4
orrs r0, r1
strh r0, [r5, 0x4]
mov r6, r9
movs r1, 0x2
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x8
ands r0, r4
lsls r0, 4
ldrh r1, [r5, 0x6]
ands r3, r1
orrs r3, r0
strh r3, [r5, 0x6]
movs r3, 0
ldrsh r0, [r6, r3]
lsls r0, 3
adds r0, 0x40
ldr r1, _080684C0
ands r0, r1
movs r1, 0xFE
lsls r1, 8
ands r2, r1
orrs r2, r0
strh r2, [r5, 0x2]
movs r1, 0x80
lsls r1, 1
mov r0, sp
movs r2, 0
movs r3, 0
bl AddSprite
_08068486:
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08068494: .4byte gUnknown_202EDCC
_08068498: .4byte gUnknown_2027370
_0806849C: .4byte 0x0000feff
_080684A0: .4byte 0xffff0000
_080684A4: .4byte 0x0000fdff
_080684A8: .4byte 0x0000f3ff
_080684AC: .4byte 0x0000efff
_080684B0: .4byte 0x0000dfff
_080684B4: .4byte 0x00003fff
_080684B8: .4byte 0x0000c1ff
_080684BC: .4byte 0x00000fff
_080684C0: .4byte 0x000001ff
thumb_func_end sub_8068344
thumb_func_start sub_80684C4
sub_80684C4:
push {r4-r6,lr}
sub sp, 0x8
ldr r0, _080685E8
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
cmp r0, 0
bne _080684D6
b _080685DE
_080684D6:
ldr r6, _080685EC
movs r0, 0
movs r1, 0
str r0, [sp]
str r1, [sp, 0x4]
mov r0, sp
ldrh r0, [r0]
ldr r1, _080685F0
ands r1, r0
ldr r3, _080685F4
ldr r0, [sp]
ands r0, r3
orrs r0, r1
str r0, [sp]
mov r1, sp
ldrh r1, [r1]
adds r2, r3, 0
ands r2, r0
orrs r2, r1
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _080685F8
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r5, _080685FC
adds r0, r5, 0
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _08068600
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
ldrh r1, [r0]
ldr r0, _08068604
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
adds r2, r3, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
movs r4, 0x80
lsls r4, 7
mov r0, sp
ldrh r1, [r0]
ldr r0, _08068608
ands r0, r1
adds r1, r3, 0
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
ldrh r0, [r0]
orrs r4, r0
ands r3, r1
orrs r3, r4
str r3, [sp]
mov r3, sp
movs r2, 0xFC
lsls r2, 2
ldrh r1, [r3, 0x4]
movs r0, 0xFC
lsls r0, 8
ands r0, r1
orrs r0, r2
ands r0, r5
movs r2, 0xF
movs r1, 0xF0
lsls r1, 8
ldr r4, _0806860C
ands r0, r4
orrs r0, r1
strh r0, [r3, 0x4]
movs r1, 0x2
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x70
ands r0, r4
lsls r0, 4
ldrh r1, [r3, 0x6]
ands r2, r1
orrs r2, r0
strh r2, [r3, 0x6]
movs r1, 0
ldrsh r0, [r6, r1]
lsls r0, 3
adds r0, 0x40
ldr r1, _08068610
ands r0, r1
strh r0, [r3, 0x2]
subs r1, 0xFF
mov r0, sp
movs r2, 0
movs r3, 0
bl AddSprite
_080685DE:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080685E8: .4byte gUnknown_202EDCC
_080685EC: .4byte gUnknown_2027370
_080685F0: .4byte 0x0000feff
_080685F4: .4byte 0xffff0000
_080685F8: .4byte 0x0000fdff
_080685FC: .4byte 0x0000f3ff
_08068600: .4byte 0x0000efff
_08068604: .4byte 0x0000dfff
_08068608: .4byte 0x00003fff
_0806860C: .4byte 0x00000fff
_08068610: .4byte 0x000001ff
thumb_func_end sub_80684C4
thumb_func_start sub_8068614
sub_8068614:
push {lr}
ldr r0, _0806862C
ldr r1, _08068630
bl OpenFileAndGetFileDataPtr
ldr r1, _08068634
ldr r1, [r1]
ldr r2, _08068638
adds r1, r2
str r0, [r1]
pop {r0}
bx r0
.align 2, 0
_0806862C: .4byte gUnknown_8106E98
_08068630: .4byte gUnknown_8510000
_08068634: .4byte gUnknown_203B418
_08068638: .4byte 0x000181e4
thumb_func_end sub_8068614
thumb_func_start sub_806863C
sub_806863C:
push {lr}
ldr r0, _08068650
ldr r0, [r0]
ldr r1, _08068654
adds r0, r1
ldr r0, [r0]
bl CloseFile
pop {r0}
bx r0
.align 2, 0
_08068650: .4byte gUnknown_203B418
_08068654: .4byte 0x000181e4
thumb_func_end sub_806863C
thumb_func_start sub_8068658
sub_8068658:
push {r4-r6,lr}
movs r4, 0
ldr r6, _08068740
ldr r5, _08068744
ldr r3, _08068748
movs r2, 0
_08068664:
ldr r0, [r5]
lsls r1, r4, 2
adds r0, r3
adds r0, r1
str r2, [r0]
adds r4, 0x1
cmp r4, r6
ble _08068664
ldr r0, _0806874C
movs r1, 0x1
bl sub_8068838
movs r4, 0
ldr r1, _08068744
ldr r0, [r1]
ldr r2, _08068750
adds r0, r2
ldr r0, [r0]
cmp r4, r0
bge _080686B2
adds r6, r1, 0
ldr r5, _08068754
_08068690:
ldr r0, [r6]
adds r0, r5
bl sub_808E9B8
lsls r0, 16
asrs r0, 16
movs r1, 0x1
bl sub_8068838
adds r5, 0x8
adds r4, 0x1
ldr r0, [r6]
ldr r1, _08068750
adds r0, r1
ldr r0, [r0]
cmp r4, r0
blt _08068690
_080686B2:
ldr r0, _08068744
ldr r0, [r0]
movs r2, 0xD1
lsls r2, 3
adds r1, r0, r2
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0
beq _080686CA
movs r1, 0x1
bl sub_8068838
_080686CA:
movs r4, 0
ldr r6, _08068758
movs r5, 0x1
_080686D0:
movs r0, 0x64
muls r0, r4
ldr r1, _0806875C
adds r0, r1
ldr r1, [r6]
adds r1, r0
ldrh r2, [r1]
adds r0, r5, 0
ands r0, r2
cmp r0, 0
beq _080686F8
lsrs r0, r2, 1
ands r0, r5
cmp r0, 0
beq _080686F8
movs r2, 0xE
ldrsh r0, [r1, r2]
movs r1, 0
bl sub_8068838
_080686F8:
adds r4, 0x1
cmp r4, 0x3
ble _080686D0
ldr r0, _08068744
ldr r0, [r0]
ldr r1, _08068760
adds r0, r1
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0x31
bne _08068738
movs r4, 0
ldr r5, _08068758
_08068712:
movs r0, 0x58
muls r0, r4
ldr r1, _08068764
adds r0, r1
ldr r1, [r5]
adds r2, r1, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068732
movs r1, 0x8
ldrsh r0, [r2, r1]
movs r1, 0x1
bl sub_8068838
_08068732:
adds r4, 0x1
cmp r4, 0x3
ble _08068712
_08068738:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08068740: .4byte 0x000001a7
_08068744: .4byte gUnknown_203B418
_08068748: .4byte 0x00017b44
_0806874C: .4byte 0x000001a5
_08068750: .4byte 0x000037e4
_08068754: .4byte 0x0000343c
_08068758: .4byte gUnknown_203B45C
_0806875C: .4byte 0x00008df8
_08068760: .4byte 0x00003a14
_08068764: .4byte 0x00008f88
thumb_func_end sub_8068658
thumb_func_start sub_8068768
sub_8068768:
push {r4,r5,lr}
movs r5, 0
_0806876C:
ldr r0, _080687A4
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080687A8
adds r0, r2
adds r0, r1
ldr r4, [r0]
cmp r4, 0
beq _08068796
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08068796
ldr r0, [r4, 0x70]
movs r1, 0x4
ldrsh r0, [r0, r1]
movs r1, 0
bl sub_8068838
_08068796:
adds r5, 0x1
cmp r5, 0x13
ble _0806876C
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080687A4: .4byte gUnknown_203B418
_080687A8: .4byte 0x000135cc
thumb_func_end sub_8068768
thumb_func_start sub_80687AC
sub_80687AC:
ldr r0, _080687C4
ldr r1, [r0]
ldr r0, _080687C8
adds r2, r1, r0
movs r0, 0x80
lsls r0, 3
str r0, [r2]
ldr r0, _080687CC
adds r1, r0
movs r0, 0xA
str r0, [r1]
bx lr
.align 2, 0
_080687C4: .4byte gUnknown_203B418
_080687C8: .4byte 0x000037f0
_080687CC: .4byte 0x000037f4
thumb_func_end sub_80687AC
thumb_func_start sub_80687D0
sub_80687D0:
lsls r0, 16
ldr r1, _080687E4
ldr r1, [r1]
asrs r0, 14
ldr r2, _080687E8
adds r1, r2
adds r1, r0
ldr r0, [r1]
bx lr
.align 2, 0
_080687E4: .4byte gUnknown_203B418
_080687E8: .4byte 0x00017b44
thumb_func_end sub_80687D0
thumb_func_start sub_80687EC
sub_80687EC:
push {r4,r5,lr}
sub sp, 0xC
lsls r0, 16
asrs r2, r0, 16
ldr r5, _08068828
ldr r0, [r5]
lsls r4, r2, 2
ldr r1, _0806882C
adds r0, r1
adds r0, r4
ldr r0, [r0]
cmp r0, 0
bne _08068820
ldr r1, _08068830
mov r0, sp
bl sprintf
ldr r1, _08068834
mov r0, sp
bl OpenFileAndGetFileDataPtr
ldr r1, [r5]
ldr r2, _0806882C
adds r1, r2
adds r1, r4
str r0, [r1]
_08068820:
add sp, 0xC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08068828: .4byte gUnknown_203B418
_0806882C: .4byte 0x00017b44
_08068830: .4byte gUnknown_8106EA0
_08068834: .4byte gUnknown_8510000
thumb_func_end sub_80687EC
thumb_func_start sub_8068838
sub_8068838:
push {r4,lr}
lsls r0, 16
asrs r4, r0, 16
lsls r1, 24
cmp r1, 0
bne _08068864
movs r0, 0xCF
lsls r0, 1
cmp r4, r0
beq _0806885E
adds r0, 0x3
cmp r4, r0
beq _0806885E
adds r0, 0x1
cmp r4, r0
beq _0806885E
adds r0, 0x1
cmp r4, r0
bne _08068864
_0806885E:
bl sub_80688B0
b _0806887A
_08068864:
adds r0, r4, 0
bl sub_80687EC
ldr r1, _08068880
adds r0, r4, r1
lsls r0, 16
lsrs r0, 16
cmp r0, 0x3
bhi _0806887A
bl sub_8068884
_0806887A:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08068880: .4byte 0xfffffe88
thumb_func_end sub_8068838
thumb_func_start sub_8068884
sub_8068884:
push {lr}
movs r0, 0xBC
lsls r0, 1
bl sub_80687EC
ldr r0, _080688A8
bl sub_80687EC
movs r0, 0xBD
lsls r0, 1
bl sub_80687EC
ldr r0, _080688AC
bl sub_80687EC
pop {r0}
bx r0
.align 2, 0
_080688A8: .4byte 0x00000179
_080688AC: .4byte 0x0000017b
thumb_func_end sub_8068884
thumb_func_start sub_80688B0
sub_80688B0:
push {lr}
ldr r0, _080688C8
ldr r0, [r0]
movs r1, 0xE0
lsls r1, 6
adds r0, r1
movs r1, 0
ldrsh r0, [r0, r1]
bl sub_80687EC
pop {r0}
bx r0
.align 2, 0
_080688C8: .4byte gUnknown_203B418
thumb_func_end sub_80688B0
thumb_func_start sub_80688CC
sub_80688CC:
push {r4-r6,lr}
movs r5, 0
ldr r6, _08068900
_080688D2:
ldr r0, [r6]
lsls r4, r5, 2
ldr r1, _08068904
adds r0, r1
adds r0, r4
ldr r0, [r0]
cmp r0, 0
beq _080688F2
bl CloseFile
ldr r0, [r6]
ldr r1, _08068904
adds r0, r1
adds r0, r4
movs r1, 0
str r1, [r0]
_080688F2:
adds r5, 0x1
ldr r0, _08068908
cmp r5, r0
ble _080688D2
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08068900: .4byte gUnknown_203B418
_08068904: .4byte 0x00017b44
_08068908: .4byte 0x000001a7
thumb_func_end sub_80688CC
thumb_func_start sub_806890C
sub_806890C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x64
movs r0, 0
mov r8, r0
mov r10, r0
ldr r6, _08068A60
add r5, sp, 0x8
_08068922:
movs r0, 0x58
mov r1, r10
muls r1, r0
adds r0, r1, 0
ldr r2, [r6]
adds r7, r2, r0
ldrh r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068A1C
lsrs r0, r1, 1
movs r3, 0x1
ands r0, r3
cmp r0, 0
beq _08068A1C
movs r0, 0x64
mov r4, r8
muls r4, r0
ldr r0, _08068A64
adds r0, r4
mov r9, r0
adds r0, r2, r0
mov r1, r10
bl sub_808DE30
ldr r0, _08068A68
ldr r0, [r0]
ldr r1, _08068A6C
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
lsls r0, 24
cmp r0, 0
beq _08068A06
movs r0, 0x80
lsls r0, 1
str r0, [sp, 0x60]
movs r2, 0x8
ldrsh r1, [r7, r2]
add r0, sp, 0x60
str r0, [sp]
movs r3, 0
str r3, [sp, 0x4]
add r0, sp, 0x8
movs r2, 0
bl sub_808CFD0
ldr r0, [r6]
adds r0, r4
ldrb r1, [r5, 0x3]
ldr r2, _08068A70
adds r0, r2
strb r1, [r0]
ldr r1, [r6]
adds r1, r4
ldrh r2, [r5, 0x14]
movs r3, 0x8E
lsls r3, 8
adds r0, r1, r3
strh r2, [r0]
ldrh r2, [r5, 0x16]
adds r3, 0x8
adds r0, r1, r3
strh r2, [r0]
ldrh r2, [r5, 0x16]
adds r3, 0x2
adds r0, r1, r3
strh r2, [r0]
ldrb r0, [r5, 0x18]
ldr r2, _08068A74
adds r1, r2
strb r0, [r1]
ldr r0, [r6]
adds r0, r4
ldrb r1, [r5, 0x19]
adds r3, 0x3
adds r0, r3
strb r1, [r0]
ldr r0, [r6]
adds r0, r4
ldrb r1, [r5, 0x1A]
adds r2, 0x2
adds r0, r2
strb r1, [r0]
ldr r0, [r6]
adds r0, r4
ldrb r1, [r5, 0x1B]
adds r3, 0x2
adds r0, r3
strb r1, [r0]
ldr r2, [r6]
ldr r1, _08068A78
adds r0, r2, r1
adds r0, r4
ldr r1, [sp, 0x24]
str r1, [r0]
adds r2, r4
adds r3, 0x35
adds r1, r2, r3
ldr r0, [sp, 0x28]
str r0, [r1]
add r0, sp, 0x2C
ldrb r0, [r0]
ldr r1, _08068A7C
adds r2, r1
strb r0, [r2]
ldr r0, [r6]
add r0, r9
adds r0, 0x1C
add r1, sp, 0x34
bl sub_8093F50
_08068A06:
ldr r0, [r6]
adds r0, r4
ldr r2, _08068A80
adds r0, r2
mov r3, r8
strh r3, [r0]
movs r0, 0x1
add r8, r0
mov r1, r8
cmp r1, 0x4
beq _08068A2A
_08068A1C:
movs r2, 0x1
add r10, r2
movs r0, 0xCE
lsls r0, 1
cmp r10, r0
bgt _08068A2A
b _08068922
_08068A2A:
mov r3, r8
cmp r3, 0x3
bgt _08068A50
ldr r4, _08068A60
ldr r3, _08068A64
movs r2, 0
movs r0, 0x64
mov r1, r8
muls r1, r0
_08068A3C:
ldr r0, [r4]
adds r0, r1
adds r0, r3
strh r2, [r0]
adds r1, 0x64
movs r0, 0x1
add r8, r0
mov r0, r8
cmp r0, 0x3
ble _08068A3C
_08068A50:
add sp, 0x64
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08068A60: .4byte gUnknown_203B45C
_08068A64: .4byte 0x00008df8
_08068A68: .4byte gUnknown_203B418
_08068A6C: .4byte 0x00000644
_08068A70: .4byte 0x00008dfb
_08068A74: .4byte 0x00008e0c
_08068A78: .4byte 0x00008e10
_08068A7C: .4byte 0x00008e48
_08068A80: .4byte 0x00008e04
thumb_func_end sub_806890C
thumb_func_start sub_8068A84
sub_8068A84:
push {r4-r7,lr}
adds r6, r0, 0
movs r4, 0
movs r5, 0
ldr r7, _08068AE0
_08068A8E:
movs r0, 0x64
muls r0, r5
ldr r1, _08068AE4
adds r0, r1
ldr r1, [r7]
adds r2, r1, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068AB2
movs r1, 0xE
ldrsh r0, [r2, r1]
bl GetPokemonSize
lsls r0, 24
lsrs r0, 24
adds r4, r0
_08068AB2:
adds r5, 0x1
cmp r5, 0x3
ble _08068A8E
movs r1, 0x8
ldrsh r0, [r6, r1]
bl GetPokemonSize
lsls r0, 24
lsrs r0, 24
adds r4, r0
cmp r4, 0x6
ble _08068B04
ldr r0, _08068AE8
adds r1, r6, 0
movs r2, 0
bl sub_808D9AC
ldrb r0, [r6, 0x4]
cmp r0, 0x4A
bne _08068AF0
ldr r0, _08068AEC
b _08068BB2
.align 2, 0
_08068AE0: .4byte gUnknown_203B45C
_08068AE4: .4byte 0x00008df8
_08068AE8: .4byte gUnknown_202DF98
_08068AEC: .4byte gUnknown_80FE0F4
_08068AF0:
cmp r0, 0x47
bne _08068AFC
ldr r0, _08068AF8
b _08068BB2
.align 2, 0
_08068AF8: .4byte gUnknown_80FE0F8
_08068AFC:
ldr r0, _08068B00
b _08068BB2
.align 2, 0
_08068B00: .4byte gUnknown_80FE0AC
_08068B04:
movs r5, 0
ldr r2, _08068B6C
_08068B08:
movs r0, 0x64
muls r0, r5
ldr r1, _08068B70
adds r0, r1
ldr r1, [r2]
adds r4, r1, r0
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08068B80
adds r0, r4, 0
adds r1, r6, 0
ldr r2, _08068B74
bl sub_808DE50
ldrh r0, [r4]
movs r1, 0x1
movs r2, 0
orrs r1, r0
strh r1, [r4]
movs r1, 0x8
ldrsh r0, [r4, r1]
cmp r0, 0x19
bgt _08068B3E
movs r0, 0x1A
strh r0, [r4, 0x8]
_08068B3E:
ldrh r0, [r4]
movs r1, 0x2
orrs r0, r1
strh r0, [r4]
strh r5, [r4, 0xC]
adds r0, r4, 0
adds r0, 0x40
strb r2, [r0, 0x2]
strb r2, [r0, 0x1]
strb r2, [r0]
ldr r0, _08068B78
adds r1, r6, 0
movs r2, 0x6
bl sub_808D9AC
ldrb r0, [r6, 0x4]
cmp r0, 0x4A
beq _08068BB0
cmp r0, 0x47
beq _08068BD0
ldr r0, _08068B7C
b _08068BB2
.align 2, 0
_08068B6C: .4byte gUnknown_203B45C
_08068B70: .4byte 0x00008df8
_08068B74: .4byte 0x000055aa
_08068B78: .4byte gUnknown_202DF98
_08068B7C: .4byte gUnknown_80FE134
_08068B80:
adds r5, 0x1
cmp r5, 0x3
ble _08068B08
ldr r0, _08068B9C
adds r1, r6, 0
movs r2, 0x6
bl sub_808D9AC
ldrb r0, [r6, 0x4]
cmp r0, 0x4A
bne _08068BA4
ldr r0, _08068BA0
b _08068BB2
.align 2, 0
_08068B9C: .4byte gUnknown_202DF98
_08068BA0: .4byte gUnknown_80FE0F4
_08068BA4:
cmp r0, 0x47
bne _08068BC4
ldr r0, _08068BAC
b _08068BB2
.align 2, 0
_08068BAC: .4byte gUnknown_80FE0F8
_08068BB0:
ldr r0, _08068BC0
_08068BB2:
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _08068BD0
.align 2, 0
_08068BC0: .4byte gUnknown_80FE168
_08068BC4:
ldr r0, _08068BD8
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_08068BD0:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08068BD8: .4byte gUnknown_80FE0AC
thumb_func_end sub_8068A84
thumb_func_start sub_8068BDC
sub_8068BDC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _08068CC4
add sp, r4
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x220]
movs r1, 0
mov r0, sp
adds r0, 0x39
_08068BF6:
strb r1, [r0]
subs r0, 0x1
cmp r0, sp
bge _08068BF6
movs r6, 0
ldr r0, _08068CC8
mov r8, r0
movs r7, 0x1
_08068C06:
movs r0, 0x64
muls r0, r6
ldr r1, _08068CCC
adds r0, r1
mov r2, r8
ldr r1, [r2]
adds r4, r1, r0
ldrb r1, [r4]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08068C50
movs r3, 0xA
ldrsh r0, [r4, r3]
bl sub_806A564
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08068C50
adds r4, 0x40
ldrb r1, [r4]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08068C50
ldrb r0, [r4, 0x2]
cmp r0, 0x69
bne _08068C50
adds r0, r4, 0
bl sub_80915D4
bl sub_80913A0
strb r5, [r4, 0x2]
strb r5, [r4, 0x1]
strb r5, [r4]
_08068C50:
adds r6, 0x1
cmp r6, 0x3
ble _08068C06
movs r6, 0
movs r5, 0x1
_08068C5A:
ldr r1, _08068CC8
movs r0, 0x64
muls r0, r6
ldr r2, _08068CCC
adds r0, r2
ldr r1, [r1]
adds r4, r1, r0
ldrb r1, [r4]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _08068CFE
movs r3, 0xA
ldrsh r0, [r4, r3]
bl sub_806A564
lsls r0, 24
cmp r0, 0
bne _08068CFE
ldr r1, _08068CD0
adds r0, r1, 0
ldrh r2, [r4, 0xE]
adds r0, r2
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
bhi _08068C96
movs r0, 0xBC
lsls r0, 1
strh r0, [r4, 0xE]
_08068C96:
movs r3, 0xA
ldrsh r0, [r4, r3]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _08068CE8
ldr r0, _08068CD4
ldr r0, [r0]
ldr r1, _08068CD8
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
lsls r0, 24
cmp r0, 0
beq _08068CDC
movs r2, 0xA
ldrsh r0, [r4, r2]
adds r1, r4, 0
bl sub_808DFDC
b _08068CFE
.align 2, 0
_08068CC4: .4byte 0xfffffdd8
_08068CC8: .4byte gUnknown_203B45C
_08068CCC: .4byte 0x00008df8
_08068CD0: .4byte 0xfffffe87
_08068CD4: .4byte gUnknown_203B418
_08068CD8: .4byte 0x00000644
_08068CDC:
movs r3, 0xA
ldrsh r0, [r4, r3]
adds r1, r4, 0
bl sub_808DF2C
b _08068CFE
_08068CE8:
ldr r0, [sp, 0x220]
cmp r0, 0
beq _08068CFE
movs r1, 0xE
ldrsh r0, [r4, r1]
bl GetFriendArea
lsls r0, 24
lsrs r0, 24
add r0, sp
strb r5, [r0]
_08068CFE:
adds r6, 0x1
cmp r6, 0x3
ble _08068C5A
movs r1, 0
_08068D06:
lsls r0, r1, 24
lsrs r0, 24
mov r8, r0
mov r0, sp
add r0, r8
ldrb r0, [r0]
adds r1, 0x1
str r1, [sp, 0x224]
cmp r0, 0
bne _08068D1C
b _08068F08
_08068D1C:
mov r0, r8
add r1, sp, 0x1F0
movs r2, 0x1
movs r3, 0x1
bl sub_8092404
mov r0, r8
add r1, sp, 0x214
movs r2, 0
movs r3, 0
bl sub_8092638
movs r7, 0
add r1, sp, 0x1F0
ldrh r0, [r1]
ldr r2, _08068E10
cmp r0, r2
beq _08068D60
ldr r0, _08068E14
ldr r3, [r0]
adds r5, r2, 0
add r2, sp, 0x3C
movs r4, 0x58
_08068D4A:
ldrh r0, [r1]
muls r0, r4
adds r0, r3, r0
stm r2!, {r0}
adds r1, 0x2
adds r7, 0x1
cmp r7, 0x14
bgt _08068D60
ldrh r0, [r1]
cmp r0, r5
bne _08068D4A
_08068D60:
movs r6, 0
ldr r2, _08068E14
mov r10, r2
movs r3, 0
mov r9, r3
_08068D6A:
movs r0, 0x64
muls r0, r6
ldr r1, _08068E18
adds r0, r1
mov r2, r10
ldr r1, [r2]
adds r5, r1, r0
ldrb r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068DD6
movs r3, 0xA
ldrsh r0, [r5, r3]
bl sub_806A5A4
lsls r0, 24
cmp r0, 0
beq _08068DD6
movs r1, 0xE
ldrsh r0, [r5, r1]
bl GetFriendArea
lsls r0, 24
lsrs r0, 24
cmp r0, r8
bne _08068DD6
ldr r2, [sp, 0x220]
cmp r2, 0
beq _08068DD6
add r4, sp, 0x3C
lsls r0, r7, 2
adds r4, r0
add r0, sp, 0x90
movs r1, 0x58
muls r1, r6
adds r0, r1
str r0, [r4]
adds r1, r5, 0
bl sub_808DF44
ldr r2, [r4]
ldrh r0, [r2]
movs r3, 0x80
lsls r3, 7
adds r1, r3, 0
orrs r0, r1
strh r0, [r2]
ldr r0, [r4]
mov r1, r9
strb r1, [r0, 0xC]
ldr r0, [r4]
strb r1, [r0, 0x10]
adds r7, 0x1
_08068DD6:
adds r6, 0x1
cmp r6, 0x3
ble _08068D6A
add r0, sp, 0x214
movs r2, 0
ldrsh r0, [r0, r2]
cmp r7, r0
bgt _08068E1C
cmp r7, 0
bgt _08068DEC
b _08068F08
_08068DEC:
add r5, sp, 0x3C
movs r3, 0x80
lsls r3, 7
adds r6, r3, 0
adds r4, r7, 0
_08068DF6:
ldr r1, [r5]
ldrh r0, [r1]
ands r0, r6
cmp r0, 0
beq _08068E06
adds r0, r1, 0
bl sub_808D1DC
_08068E06:
adds r5, 0x4
subs r4, 0x1
cmp r4, 0
bne _08068DF6
b _08068F08
.align 2, 0
_08068E10: .4byte 0x0000ffff
_08068E14: .4byte gUnknown_203B45C
_08068E18: .4byte 0x00008df8
_08068E1C:
ldr r0, _08068E78
mov r1, r8
movs r2, 0
bl sub_8092578
ldr r0, _08068E7C
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
add r4, sp, 0x3C
_08068E34:
add r0, sp, 0x214
movs r2, 0
ldrsh r1, [r0, r2]
subs r1, r7, r1
mov r0, r8
adds r2, r7, 0
adds r3, r4, 0
bl sub_8067A80
movs r6, 0
cmp r6, r7
bge _08068E8E
movs r5, 0x80
lsls r5, 8
adds r3, r4, 0
_08068E52:
ldr r2, [r3]
ldrh r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068E86
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _08068E86
ldrb r0, [r2, 0x4]
subs r0, 0x44
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08068E80
movs r0, 0x1
b _08068E82
.align 2, 0
_08068E78: .4byte gUnknown_202DE58
_08068E7C: .4byte gUnknown_80FE1A4
_08068E80:
movs r0, 0
_08068E82:
cmp r0, 0
bne _08068E8E
_08068E86:
adds r3, 0x4
adds r6, 0x1
cmp r6, r7
blt _08068E52
_08068E8E:
cmp r6, r7
beq _08068EA2
ldr r0, _08068F24
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _08068E34
_08068EA2:
cmp r7, 0
ble _08068ED4
movs r3, 0x80
lsls r3, 8
mov r9, r3
adds r3, r4, 0
movs r0, 0x1
mov r8, r0
movs r5, 0
adds r6, r7, 0
_08068EB6:
ldr r2, [r3]
ldrh r1, [r2]
mov r0, r8
ands r0, r1
cmp r0, 0
beq _08068ECC
mov r0, r9
ands r0, r1
cmp r0, 0
beq _08068ECC
strh r5, [r2]
_08068ECC:
adds r3, 0x4
subs r6, 0x1
cmp r6, 0
bne _08068EB6
_08068ED4:
cmp r7, 0
ble _08068F08
movs r1, 0x80
lsls r1, 7
adds r5, r1, 0
adds r6, r7, 0
_08068EE0:
ldr r2, [r4]
ldrh r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068F00
adds r0, r1, 0
ands r0, r5
cmp r0, 0
beq _08068F00
adds r0, r2, 0
bl sub_808D1DC
ldr r1, [r4]
movs r0, 0
strh r0, [r1]
_08068F00:
adds r4, 0x4
subs r6, 0x1
cmp r6, 0
bne _08068EE0
_08068F08:
ldr r1, [sp, 0x224]
cmp r1, 0x39
bgt _08068F10
b _08068D06
_08068F10:
movs r3, 0x8A
lsls r3, 2
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08068F24: .4byte gUnknown_80FE20C
thumb_func_end sub_8068BDC
thumb_func_start sub_8068F28
sub_8068F28:
push {r4-r7,lr}
movs r6, 0
ldr r7, _08068F5C
_08068F2E:
movs r0, 0x64
muls r0, r6
ldr r1, _08068F60
adds r0, r1
ldr r1, [r7]
adds r4, r1, r0
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08068F74
movs r1, 0xA
ldrsh r0, [r4, r1]
bl sub_806A564
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
beq _08068F64
movs r0, 0
strh r0, [r4]
b _08068F74
.align 2, 0
_08068F5C: .4byte gUnknown_203B45C
_08068F60: .4byte 0x00008df8
_08068F64:
movs r1, 0xA
ldrsh r0, [r4, r1]
bl sub_806A538
lsls r0, 24
cmp r0, 0
beq _08068F74
strh r5, [r4]
_08068F74:
adds r6, 0x1
cmp r6, 0x3
ble _08068F2E
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8068F28
thumb_func_start sub_8068F80
sub_8068F80:
push {r4,r5,lr}
bl sub_8083600
adds r5, r0, 0
ldr r0, _08068FD4
ldr r4, [r0]
ldr r1, _08068FD8
adds r0, r4, r1
movs r1, 0
strb r1, [r0]
ldr r2, _08068FDC
adds r0, r4, r2
strb r1, [r0]
adds r2, 0x6
adds r0, r4, r2
strb r1, [r0]
adds r0, r4, 0
adds r0, 0xC0
str r1, [r0]
cmp r5, 0
beq _08068FCC
adds r0, r5, 0
bl sub_8045128
ldrh r0, [r0]
lsrs r0, 5
movs r1, 0x1
ands r0, r1
movs r2, 0xD3
lsls r2, 3
adds r1, r4, r2
strb r0, [r1]
adds r2, 0x1
adds r1, r4, r2
strb r0, [r1]
adds r0, r5, 0x4
bl sub_804AC20
_08068FCC:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08068FD4: .4byte gUnknown_203B418
_08068FD8: .4byte 0x0000066c
_08068FDC: .4byte 0x0000066d
thumb_func_end sub_8068F80
thumb_func_start sub_8068FE0
sub_8068FE0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x84
mov r8, r0
str r2, [sp, 0x74]
lsls r1, 16
asrs r1, 16
mov r9, r1
ldr r7, [r0, 0x70]
bl sub_8045128
adds r4, r0, 0
ldr r0, [sp, 0x74]
cmp r0, 0
bne _0806900E
mov r0, sp
bl sub_80457DC
mov r1, sp
str r1, [sp, 0x74]
_0806900E:
ldr r0, [r4, 0x10]
cmp r0, r8
bne _08069018
movs r0, 0
str r0, [r4, 0x10]
_08069018:
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
movs r3, 0x6
ldrsh r1, [r2, r3]
bl sub_80402AC
movs r5, 0
adds r6, r7, 0
adds r6, 0xC8
movs r0, 0xB0
adds r0, r7
mov r10, r0
mov r1, r8
adds r1, 0x22
str r1, [sp, 0x80]
mov r2, r8
adds r2, 0x20
str r2, [sp, 0x7C]
adds r3, r7, 0
adds r3, 0x40
str r3, [sp, 0x78]
_08069044:
ldr r0, _080690E4
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080690E8
adds r0, r2
adds r0, r1
ldr r4, [r0]
cmp r4, 0
beq _08069072
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08069072
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0x80
ldr r0, [r1]
cmp r0, r8
bne _08069072
movs r0, 0
str r0, [r1]
_08069072:
adds r5, 0x1
cmp r5, 0x13
ble _08069044
ldrb r0, [r6]
cmp r0, 0x2
bne _0806908A
ldr r0, _080690E4
ldr r0, [r0]
ldr r3, _080690EC
adds r0, r3
movs r1, 0
strb r1, [r0]
_0806908A:
mov r1, r10
ldrb r0, [r1]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _080690A2
adds r0, r7, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_080690A2:
mov r0, r8
bl sub_8078084
movs r0, 0
ldr r2, [sp, 0x80]
strb r0, [r2]
ldr r3, [sp, 0x7C]
strb r0, [r3]
ldr r1, _080690F0
str r0, [r1]
ldr r1, [sp, 0x78]
ldrb r0, [r1]
cmp r0, 0x41
bne _080690FC
ldr r3, _080690E4
ldr r2, [r3]
ldr r1, _080690F4
adds r0, r2, r1
ldrb r1, [r0]
cmp r1, 0
bne _080690FC
movs r0, 0x1
strb r0, [r2, 0x10]
strh r1, [r7, 0xE]
ldr r0, [r3]
ldr r2, _080690F8
adds r0, r2
mov r1, r8
movs r2, 0
bl sub_8045B94
b _08069484
.align 2, 0
_080690E4: .4byte gUnknown_203B418
_080690E8: .4byte 0x000135cc
_080690EC: .4byte 0x000037fc
_080690F0: .4byte gUnknown_203B450
_080690F4: .4byte 0x0000065c
_080690F8: .4byte 0x000005f4
_080690FC:
ldrb r0, [r7, 0x7]
cmp r0, 0
bne _08069104
b _0806928E
_08069104:
movs r0, 0x3C
movs r1, 0x49
bl sub_803E708
bl sub_80532B4
ldr r5, _08069198
ldr r2, [r5]
ldrb r0, [r2, 0x6]
cmp r0, 0
bne _080691C8
ldr r3, _0806919C
adds r0, r2, r3
ldrb r0, [r0]
cmp r0, 0
bne _080691E0
movs r0, 0x87
lsls r0, 2
cmp r9, r0
beq _080691E0
adds r0, 0x6
cmp r9, r0
beq _080691E0
subs r0, 0x4
cmp r9, r0
beq _080691E0
ldr r1, _080691A0
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
bne _080691E0
ldr r6, _080691A4
adds r0, r2, r6
movs r1, 0
ldrsb r1, [r0, r1]
cmp r1, 0
blt _080691E0
adds r3, 0xA
adds r0, r2, r3
ldrb r0, [r0]
cmp r0, 0x1
beq _080691E0
cmp r1, 0
ble _080691B4
ldr r0, _080691A8
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
adds r4, r0, 0
cmp r4, 0x1
bne _080691E0
ldr r0, _080691AC
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
ldr r0, [r5]
strb r4, [r0, 0x4]
ldr r0, [r5]
strb r4, [r0, 0x6]
ldr r0, [r5]
ldr r1, _080691B0
adds r0, r1
strb r4, [r0]
ldr r1, [r5]
adds r1, r6
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
b _08069484
.align 2, 0
_08069198: .4byte gUnknown_203B418
_0806919C: .4byte 0x0000066e
_080691A0: .4byte 0x00003a0d
_080691A4: .4byte 0x0000067b
_080691A8: .4byte gUnknown_80FE268
_080691AC: .4byte gUnknown_80FE28C
_080691B0: .4byte 0x00000654
_080691B4:
ldr r0, _080691C4
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _080691E0
.align 2, 0
_080691C4: .4byte gUnknown_80FE2D0
_080691C8:
movs r1, 0x1
strb r1, [r2, 0x4]
ldr r0, [r5]
strb r1, [r0, 0x6]
ldr r0, [r5]
ldr r2, _080691DC
adds r0, r2
strb r1, [r0]
b _08069484
.align 2, 0
_080691DC: .4byte 0x00000654
_080691E0:
mov r0, r9
ldr r1, [sp, 0x74]
mov r2, r8
bl sub_8083AB0
ldr r0, _080691F8
cmp r9, r0
bne _0806928E
movs r6, 0
movs r5, 0
b _080691FE
.align 2, 0
_080691F8: .4byte 0x0000021f
_080691FC:
adds r5, 0x1
_080691FE:
cmp r5, 0x3
bgt _08069228
ldr r0, _080692C4
ldr r0, [r0]
lsls r1, r5, 2
ldr r3, _080692C8
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080691FC
ldr r6, [r4, 0x70]
adds r0, r6, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _080691FC
_08069228:
cmp r6, 0
beq _0806928E
ldr r5, _080692CC
ldrb r0, [r6, 0xA]
movs r1, 0x64
muls r1, r0
ldr r2, _080692D0
adds r1, r2
ldr r2, [r5]
adds r4, r2, r1
adds r1, r6, 0
bl sub_806C264
movs r3, 0xA
ldrsh r0, [r4, r3]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _0806928A
ldr r0, _080692C4
ldr r0, [r0]
ldr r1, _080692D4
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
lsls r0, 24
cmp r0, 0
bne _0806926E
movs r2, 0xA
ldrsh r0, [r4, r2]
adds r1, r4, 0
bl sub_808DF2C
_0806926E:
bl sub_8044210
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0806928A
movs r3, 0xA
ldrsh r1, [r4, r3]
movs r0, 0x58
muls r0, r1
ldr r1, [r5]
adds r0, r1
adds r0, 0x28
strb r2, [r0]
_0806928A:
movs r0, 0
strh r0, [r4]
_0806928E:
ldrb r0, [r7, 0x6]
cmp r0, 0
beq _080692DC
movs r5, 0
movs r1, 0xB4
lsls r1, 1
adds r0, r7, r1
movs r2, 0x98
adds r2, r7
mov r10, r2
ldrb r3, [r0]
cmp r5, r3
bge _0806930A
ldr r4, _080692D8
subs r1, 0x1
adds r2, r7, r1
movs r3, 0
adds r1, r0, 0
_080692B2:
ldrb r0, [r2]
adds r0, r5
adds r0, r4
strb r3, [r0]
adds r5, 0x1
ldrb r0, [r1]
cmp r5, r0
blt _080692B2
b _0806930A
.align 2, 0
_080692C4: .4byte gUnknown_203B418
_080692C8: .4byte 0x0001357c
_080692CC: .4byte gUnknown_203B45C
_080692D0: .4byte 0x00008df8
_080692D4: .4byte 0x00000644
_080692D8: .4byte gUnknown_202EE76
_080692DC:
movs r5, 0
movs r1, 0xB4
lsls r1, 1
adds r0, r7, r1
movs r2, 0x98
adds r2, r7
mov r10, r2
ldrb r3, [r0]
cmp r5, r3
bge _0806930A
ldr r4, _0806932C
subs r1, 0x1
adds r2, r7, r1
movs r3, 0
adds r1, r0, 0
_080692FA:
ldrb r0, [r2]
adds r0, r5
adds r0, r4
strb r3, [r0]
adds r5, 0x1
ldrb r0, [r1]
cmp r5, r0
blt _080692FA
_0806930A:
ldr r1, [sp, 0x78]
ldrb r0, [r1]
cmp r0, 0x4A
bne _08069338
ldr r2, _08069330
ldr r1, [r2]
movs r0, 0x2
strb r0, [r1, 0x10]
ldr r0, [r2]
ldr r2, _08069334
adds r0, r2
mov r1, r8
movs r2, 0
bl sub_8045B94
b _08069352
.align 2, 0
_0806932C: .4byte gUnknown_202EE70
_08069330: .4byte gUnknown_203B418
_08069334: .4byte 0x000005f4
_08069338:
cmp r0, 0x47
bne _08069352
ldr r2, _08069494
ldr r1, [r2]
movs r0, 0x3
strb r0, [r1, 0x10]
ldr r0, [r2]
ldr r3, _08069498
adds r0, r3
mov r1, r8
movs r2, 0
bl sub_8045B94
_08069352:
bl sub_8083600
cmp r0, 0
beq _080693C6
movs r0, 0x87
lsls r0, 2
cmp r9, r0
beq _080693C6
ldrb r0, [r7, 0x7]
cmp r0, 0
bne _080693C6
ldr r4, _08069494
ldr r0, [r4]
ldrb r0, [r0, 0x10]
cmp r0, 0
bne _080693C6
adds r0, r7, 0
adds r0, 0xA4
ldrb r1, [r0]
movs r2, 0
movs r0, 0xFA
lsls r0, 1
cmp r9, r0
bne _08069384
movs r2, 0x1
_08069384:
mov r0, r8
bl sub_8084E00
ldr r1, _0806949C
adds r0, r1, 0
ldrh r2, [r7, 0x4]
adds r0, r2
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
bhi _080693C6
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _080693C6
ldrb r0, [r7, 0x6]
cmp r0, 0
beq _080693CC
ldr r0, [r4]
ldr r3, _080694A0
adds r0, r3
movs r1, 0x1
strb r1, [r0]
ldr r0, _080694A4
ldr r1, [r0]
mov r0, r8
bl sub_805239C
bl sub_803E178
bl sub_8049ED4
_080693C6:
ldrb r0, [r7, 0x6]
cmp r0, 0
bne _08069466
_080693CC:
ldr r6, _080694A8
ldrb r0, [r7, 0xA]
movs r1, 0x64
muls r1, r0
ldr r2, _080694AC
adds r1, r2
ldr r2, [r6]
adds r4, r2, r1
adds r1, r7, 0
bl sub_806C264
movs r3, 0xA
ldrsh r0, [r4, r3]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _08069462
ldr r5, _08069494
ldr r0, [r5]
ldr r1, _080694B0
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
lsls r0, 24
cmp r0, 0
bne _0806940E
movs r2, 0xA
ldrsh r0, [r4, r2]
adds r1, r4, 0
bl sub_808DF2C
_0806940E:
bl sub_8044210
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0806942A
movs r3, 0xA
ldrsh r1, [r4, r3]
movs r0, 0x58
muls r0, r1
ldr r1, [r6]
adds r0, r1
adds r0, 0x28
strb r2, [r0]
_0806942A:
ldrb r1, [r7, 0x7]
negs r0, r1
orrs r0, r1
lsrs r1, r0, 31
ldr r0, [r5]
ldr r2, _080694B4
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
bne _08069448
ldr r3, [sp, 0x78]
ldrb r0, [r3]
cmp r0, 0x41
bne _08069448
movs r1, 0x1
_08069448:
cmp r1, 0
bne _08069462
movs r0, 0xA
ldrsh r1, [r4, r0]
movs r0, 0x58
muls r1, r0
ldr r0, _080694A8
ldr r0, [r0]
adds r1, r0
ldrh r2, [r1]
ldr r0, _080694B8
ands r0, r2
strh r0, [r1]
_08069462:
movs r0, 0
strh r0, [r4]
_08069466:
mov r1, r10
ldr r0, [r1]
bl sub_800F934
ldr r0, _080694BC
movs r2, 0
str r2, [r0]
ldr r0, _08069494
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xC]
mov r3, r8
str r2, [r3]
bl sub_8045ACC
_08069484:
add sp, 0x84
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08069494: .4byte gUnknown_203B418
_08069498: .4byte 0x000005f4
_0806949C: .4byte 0xfffffe5f
_080694A0: .4byte 0x000037fe
_080694A4: .4byte gUnknown_80FA580
_080694A8: .4byte gUnknown_203B45C
_080694AC: .4byte 0x00008df8
_080694B0: .4byte 0x00000644
_080694B4: .4byte 0x0000065c
_080694B8: .4byte 0x0000fffd
_080694BC: .4byte gUnknown_203B450
thumb_func_end sub_8068FE0
thumb_func_start sub_80694C0
sub_80694C0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r4, r0, 0
adds r7, r1, 0
mov r8, r2
lsls r3, 24
lsrs r3, 24
mov r9, r3
adds r0, r7, 0
mov r1, r8
bl sub_8049590
mov r10, r0
ldr r5, [r4, 0x70]
adds r6, r5, 0
adds r6, 0xB0
ldrb r0, [r6]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _080694FC
adds r0, r5, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_080694FC:
ldrb r0, [r6]
cmp r0, 0x7
beq _0806950A
cmp r0, 0x5
beq _0806950A
cmp r0, 0x2
bne _08069512
_0806950A:
adds r0, r4, 0
adds r1, r4, 0
bl sub_807A324
_08069512:
movs r0, 0x4
ldrsh r2, [r4, r0]
cmp r7, r2
bne _08069522
movs r1, 0x6
ldrsh r0, [r4, r1]
cmp r8, r0
beq _080695DE
_08069522:
movs r1, 0x4
ldrsh r0, [r4, r1]
cmp r0, 0
blt _08069552
movs r1, 0x6
ldrsh r0, [r4, r1]
cmp r0, 0
blt _08069552
adds r1, r0, 0
adds r0, r2, 0
bl sub_8049590
adds r1, r0, 0
ldr r0, [r1, 0x10]
cmp r0, r4
bne _08069546
movs r0, 0
str r0, [r1, 0x10]
_08069546:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_80402AC
_08069552:
ldrh r0, [r4, 0x4]
strh r0, [r4, 0x8]
ldrh r0, [r4, 0x6]
strh r0, [r4, 0xA]
strh r7, [r4, 0x4]
mov r0, r8
strh r0, [r4, 0x6]
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0806956E
ldr r0, _0806959C
strh r7, [r0]
mov r1, r8
strh r1, [r0, 0x2]
_0806956E:
mov r2, r10
str r4, [r2, 0x10]
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _08069588
ldr r0, _080695A0
strh r7, [r0]
mov r1, r8
strh r1, [r0, 0x2]
ldr r0, _080695A4
ldr r1, [r0]
movs r0, 0
strb r0, [r1, 0x1]
_08069588:
adds r0, r7, 0
mov r1, r8
bl sub_80402AC
mov r2, r9
cmp r2, 0
beq _080695A8
cmp r2, 0x1
beq _080695C4
b _080695CE
.align 2, 0
_0806959C: .4byte gUnknown_203B410
_080695A0: .4byte gUnknown_202EE0C
_080695A4: .4byte gUnknown_203B418
_080695A8:
ldr r0, [r5, 0x70]
str r0, [r5, 0x74]
ldr r0, [r5, 0x6C]
str r0, [r5, 0x70]
ldr r0, [r5, 0x68]
str r0, [r5, 0x6C]
adds r0, r5, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
beq _080695CE
ldr r0, [r4, 0x8]
str r0, [r5, 0x68]
b _080695CE
_080695C4:
ldr r0, [r4, 0x4]
str r0, [r5, 0x68]
str r0, [r5, 0x6C]
str r0, [r5, 0x70]
str r0, [r5, 0x74]
_080695CE:
mov r1, r10
ldrb r0, [r1, 0x9]
adds r1, r4, 0
adds r1, 0x25
strb r0, [r1]
adds r0, r4, 0
bl sub_806CF98
_080695DE:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80694C0
thumb_func_start sub_80695EC
sub_80695EC:
push {r4-r7,lr}
adds r4, r0, 0
adds r6, r1, 0
adds r7, r2, 0
ldr r1, [r4, 0x70]
adds r5, r1, 0
adds r0, r1, 0
adds r0, 0xB0
ldrb r0, [r0]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08069612
adds r0, r1, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_08069612:
movs r1, 0x4
ldrsh r0, [r4, r1]
cmp r6, r0
bne _08069622
movs r1, 0x6
ldrsh r0, [r4, r1]
cmp r7, r0
beq _08069658
_08069622:
ldrh r0, [r4, 0x4]
strh r0, [r4, 0x8]
ldrh r0, [r4, 0x6]
strh r0, [r4, 0xA]
strh r6, [r4, 0x4]
strh r7, [r4, 0x6]
ldr r0, [r5, 0x70]
str r0, [r5, 0x74]
ldr r0, [r5, 0x6C]
str r0, [r5, 0x70]
ldr r0, [r5, 0x68]
str r0, [r5, 0x6C]
adds r0, r5, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
beq _08069648
ldr r0, [r4, 0x8]
str r0, [r5, 0x68]
_08069648:
adds r0, r6, 0
adds r1, r7, 0
bl sub_804954C
ldrb r1, [r0, 0x9]
adds r0, r4, 0
adds r0, 0x25
strb r1, [r0]
_08069658:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80695EC
thumb_func_start sub_8069660
sub_8069660:
push {r4,r5,lr}
adds r4, r0, 0
ldr r0, [r4, 0x70]
adds r5, r0, 0
adds r5, 0x46
ldrb r1, [r5]
adds r0, r4, 0
bl sub_8070F80
lsls r0, 24
cmp r0, 0
bne _0806967C
movs r0, 0
b _0806969E
_0806967C:
movs r1, 0x4
ldrsh r0, [r4, r1]
ldr r1, _080696A4
ldrb r2, [r5]
lsls r2, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r0, [r0, 0x10]
_0806969E:
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_080696A4: .4byte gUnknown_80F4448
thumb_func_end sub_8069660
thumb_func_start sub_80696A8
sub_80696A8:
push {r4,r5,lr}
adds r4, r0, 0
ldr r0, [r4, 0x70]
adds r5, r0, 0
adds r5, 0x46
ldrb r1, [r5]
adds r0, r4, 0
bl sub_8071138
lsls r0, 24
cmp r0, 0
beq _080696F4
movs r1, 0x4
ldrsh r0, [r4, r1]
ldr r1, _080696F0
ldrb r2, [r5]
lsls r2, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r1, [r0, 0x10]
cmp r1, 0
beq _080696F4
ldr r0, [r1]
cmp r0, 0x1
bne _080696F4
adds r0, r1, 0
b _080696F6
.align 2, 0
_080696F0: .4byte gUnknown_80F4448
_080696F4:
movs r0, 0
_080696F6:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80696A8
thumb_func_start sub_80696FC
sub_80696FC:
push {r4,r5,lr}
sub sp, 0x4
adds r4, r0, 0
ldr r3, [r4, 0x70]
ldr r5, _08069764
adds r3, 0x46
ldrb r0, [r3]
lsls r0, 2
adds r0, r5
ldrh r0, [r0]
ldrh r1, [r4, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r1, _08069768
ldr r2, [sp]
ands r2, r1
orrs r2, r0
str r2, [sp]
ldrb r0, [r3]
lsls r0, 2
adds r0, r5
ldrh r0, [r0, 0x2]
ldrh r1, [r4, 0x6]
adds r0, r1
lsls r0, 16
ldr r1, _0806976C
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
movs r2, 0
ldrsh r0, [r0, r2]
asrs r1, 16
bl sub_804954C
adds r5, r0, 0
adds r0, r4, 0
mov r1, sp
bl sub_80705F0
lsls r0, 24
cmp r0, 0
bne _08069770
ldr r1, [r5, 0x10]
cmp r1, 0
beq _08069770
ldr r0, [r1]
cmp r0, 0x1
bne _08069770
adds r0, r1, 0
b _08069772
.align 2, 0
_08069764: .4byte gUnknown_80F4448
_08069768: .4byte 0xffff0000
_0806976C: .4byte 0x0000ffff
_08069770:
movs r0, 0
_08069772:
add sp, 0x4
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80696FC
thumb_func_start sub_806977C
sub_806977C:
push {r4-r7,lr}
sub sp, 0x4
adds r4, r0, 0
ldr r0, [r4, 0x70]
ldr r7, _0806982C
adds r5, r0, 0
adds r5, 0x46
ldrb r0, [r5]
lsls r0, 2
adds r0, r7
ldrh r0, [r0]
ldrh r1, [r4, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r1, _08069830
ldr r2, [sp]
ands r2, r1
orrs r2, r0
str r2, [sp]
ldrb r0, [r5]
lsls r0, 2
adds r0, r7
ldrh r0, [r0, 0x2]
ldrh r1, [r4, 0x6]
adds r0, r1
lsls r0, 16
ldr r1, _08069834
ands r1, r2
orrs r1, r0
str r1, [sp]
mov r0, sp
movs r2, 0
ldrsh r0, [r0, r2]
asrs r1, 16
bl sub_804954C
mov r6, sp
adds r0, r4, 0
mov r1, sp
bl sub_80705F0
lsls r0, 24
cmp r0, 0
bne _08069838
ldrb r0, [r5]
lsls r0, 2
adds r0, r7
movs r1, 0
ldrsh r0, [r0, r1]
lsls r0, 1
ldrh r2, [r4, 0x4]
adds r0, r2
mov r1, sp
strh r0, [r1]
ldrb r0, [r5]
lsls r0, 2
adds r0, r7
movs r1, 0x2
ldrsh r0, [r0, r1]
lsls r0, 1
ldrh r2, [r4, 0x6]
adds r0, r2
strh r0, [r6, 0x2]
mov r0, sp
movs r1, 0
ldrsh r0, [r0, r1]
movs r2, 0x2
ldrsh r1, [r6, r2]
bl sub_804954C
adds r5, r0, 0
adds r0, r4, 0
mov r1, sp
bl sub_80705F0
lsls r0, 24
cmp r0, 0
bne _08069838
ldr r1, [r5, 0x10]
cmp r1, 0
beq _08069838
ldr r0, [r1]
cmp r0, 0x1
bne _08069838
adds r0, r1, 0
b _0806983A
.align 2, 0
_0806982C: .4byte gUnknown_80F4448
_08069830: .4byte 0xffff0000
_08069834: .4byte 0x0000ffff
_08069838:
movs r0, 0
_0806983A:
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806977C
thumb_func_start sub_8069844
sub_8069844:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
mov r8, r1
ldr r5, [r1, 0x70]
adds r0, r6, 0x2
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
ldrh r0, [r5, 0x2]
strh r0, [r6]
movs r1, 0xE
ldrsh r0, [r5, r1]
str r0, [r6, 0x24]
movs r2, 0x10
ldrsh r0, [r5, r2]
str r0, [r6, 0x28]
ldrb r0, [r5, 0x9]
str r0, [r6, 0x2C]
ldr r0, [r5, 0x18]
str r0, [r6, 0x30]
movs r2, 0
_08069874:
adds r1, r6, 0
adds r1, 0x34
adds r1, r2
adds r0, r5, 0
adds r0, 0x14
adds r0, r2
ldrb r0, [r0]
strb r0, [r1]
adds r1, r6, 0
adds r1, 0x36
adds r1, r2
adds r0, r5, 0
adds r0, 0x16
adds r0, r2
ldrb r0, [r0]
strb r0, [r1]
adds r1, r6, 0
adds r1, 0x16
adds r1, r2
adds r0, r5, 0
adds r0, 0x5C
adds r0, r2
ldrb r0, [r0]
strb r0, [r1]
adds r1, r6, 0
adds r1, 0x18
adds r1, r2
adds r0, r5, 0
adds r0, 0x5E
adds r0, r2
ldrb r0, [r0]
strb r0, [r1]
adds r2, 0x1
cmp r2, 0x1
ble _08069874
ldrb r2, [r5, 0x7]
adds r1, r6, 0
adds r1, 0x38
movs r0, 0
strb r2, [r1]
adds r2, r6, 0
adds r2, 0x39
strb r0, [r2]
adds r3, r6, 0
adds r3, 0x3A
strb r0, [r3]
adds r4, r6, 0
adds r4, 0x3B
strb r0, [r4]
movs r7, 0x3C
adds r7, r6
mov r12, r7
strb r0, [r7]
adds r0, r5, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806995C
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0806995C
adds r1, r5, 0
adds r1, 0x62
ldrb r0, [r1]
cmp r0, 0x13
bne _08069908
ldr r0, _080699A4
ldrb r0, [r0]
ldrb r7, [r2]
adds r0, r7
strb r0, [r2]
_08069908:
ldrb r0, [r1]
cmp r0, 0x2B
bne _08069918
ldr r0, _080699A8
ldrb r0, [r0]
ldrb r7, [r2]
adds r0, r7
strb r0, [r2]
_08069918:
ldrb r0, [r1]
cmp r0, 0x21
bne _08069928
ldr r0, _080699AC
ldrb r0, [r0]
ldrb r2, [r3]
adds r0, r2
strb r0, [r3]
_08069928:
ldrb r0, [r1]
cmp r0, 0x2B
bne _08069938
ldr r0, _080699A8
ldrb r0, [r0]
ldrb r7, [r3]
adds r0, r7
strb r0, [r3]
_08069938:
ldrb r0, [r1]
cmp r0, 0x1E
bne _08069948
ldr r0, _080699B0
ldrb r0, [r0]
ldrb r2, [r4]
adds r0, r2
strb r0, [r4]
_08069948:
ldrb r0, [r1]
cmp r0, 0x22
bne _0806995C
ldr r0, _080699B4
ldrb r0, [r0]
mov r7, r12
ldrb r7, [r7]
adds r0, r7
mov r1, r12
strb r0, [r1]
_0806995C:
adds r0, r5, 0
adds r0, 0x94
ldrb r1, [r0]
adds r0, r6, 0
adds r0, 0x54
strb r1, [r0]
ldr r0, [r5, 0x60]
str r0, [r6, 0x20]
ldrh r0, [r5, 0xC]
movs r1, 0
strh r0, [r6, 0x3E]
ldr r0, [r5, 0x40]
str r0, [r6, 0x1C]
adds r0, r6, 0
adds r0, 0x44
strb r1, [r0]
adds r0, 0x4
strb r1, [r0]
adds r0, r5, 0
adds r0, 0x8C
ldr r0, [r0]
str r0, [r6, 0x50]
ldr r0, _080699B8
ldr r0, [r0]
ldr r2, _080699BC
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _080699C0
adds r0, r5, 0
bl sub_806A4DC
adds r1, r6, 0
adds r1, 0x4C
b _080699C6
.align 2, 0
_080699A4: .4byte gUnknown_810AC60
_080699A8: .4byte gUnknown_810AC68
_080699AC: .4byte gUnknown_810AC62
_080699B0: .4byte gUnknown_810AC64
_080699B4: .4byte gUnknown_810AC66
_080699B8: .4byte gUnknown_203B418
_080699BC: .4byte 0x0000065a
_080699C0:
adds r1, r6, 0
adds r1, 0x4C
movs r0, 0x3
_080699C6:
strb r0, [r1]
movs r4, 0
movs r7, 0x10
ldrsh r0, [r5, r7]
cmp r0, 0
bge _080699D4
adds r0, 0x3
_080699D4:
movs r2, 0xE
ldrsh r1, [r5, r2]
asrs r0, 2
cmp r1, r0
bgt _080699E8
adds r1, r6, 0
adds r1, 0x58
movs r0, 0x6
strb r0, [r1]
movs r4, 0x1
_080699E8:
ldr r0, _08069A24
ldr r0, [r0]
ldr r7, _08069A28
adds r0, r7
ldrb r0, [r0]
cmp r0, 0
beq _08069A02
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0xB
strb r1, [r0]
adds r4, 0x1
_08069A02:
movs r1, 0x9E
lsls r1, 1
adds r0, r5, r1
ldr r0, [r0]
bl sub_8094450
cmp r0, 0
bne _08069A38
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _08069A2C
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x13
b _08069A34
.align 2, 0
_08069A24: .4byte gUnknown_203B418
_08069A28: .4byte 0x00000676
_08069A2C:
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x3B
_08069A34:
strb r1, [r0]
adds r4, 0x1
_08069A38:
mov r2, r8
ldr r0, [r2, 0x70]
movs r7, 0x82
lsls r7, 1
adds r2, r0, r7
ldr r0, [r2]
cmp r0, 0x1
ble _08069A54
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x1B
strb r1, [r0]
adds r4, 0x1
_08069A54:
ldr r0, [r2]
cmp r0, 0
bgt _08069A66
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x28
strb r1, [r0]
adds r4, 0x1
_08069A66:
ldr r0, [r5, 0x2C]
cmp r0, 0xFF
ble _08069AAE
ldr r0, [r5, 0x30]
cmp r0, 0xFF
ble _08069AAE
ldr r0, [r5, 0x34]
cmp r0, 0xFF
ble _08069AAE
ldr r0, [r5, 0x38]
cmp r0, 0xFF
ble _08069AAE
movs r1, 0x1C
ldrsh r0, [r5, r1]
cmp r0, 0x9
ble _08069AAE
movs r2, 0x1E
ldrsh r0, [r5, r2]
cmp r0, 0x9
ble _08069AAE
movs r7, 0x20
ldrsh r0, [r5, r7]
cmp r0, 0x9
ble _08069AAE
movs r1, 0x22
ldrsh r0, [r5, r1]
cmp r0, 0x9
ble _08069AAE
movs r2, 0x24
ldrsh r0, [r5, r2]
cmp r0, 0x9
ble _08069AAE
movs r7, 0x26
ldrsh r0, [r5, r7]
cmp r0, 0x9
bgt _08069ABA
_08069AAE:
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x37
strb r1, [r0]
adds r4, 0x1
_08069ABA:
adds r0, r5, 0
adds r0, 0xA8
ldrb r1, [r0]
cmp r1, 0
beq _08069AD2
cmp r4, 0xB
bgt _08069AD2
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
strb r1, [r0]
adds r4, 0x1
_08069AD2:
adds r0, r5, 0
adds r0, 0xAC
ldrb r1, [r0]
cmp r1, 0
beq _08069AEC
cmp r4, 0xB
bgt _08069AEC
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x6
strb r1, [r0]
adds r4, 0x1
_08069AEC:
adds r0, r5, 0
adds r0, 0xB0
ldrb r1, [r0]
cmp r1, 0
beq _08069B06
cmp r4, 0xB
bgt _08069B06
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0xB
strb r1, [r0]
adds r4, 0x1
_08069B06:
adds r0, r5, 0
adds r0, 0xBC
ldrb r1, [r0]
cmp r1, 0
beq _08069B20
cmp r4, 0xB
bgt _08069B20
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x13
strb r1, [r0]
adds r4, 0x1
_08069B20:
adds r0, r5, 0
adds r0, 0xC0
ldrb r1, [r0]
cmp r1, 0
beq _08069B3A
cmp r4, 0xB
bgt _08069B3A
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x1B
strb r1, [r0]
adds r4, 0x1
_08069B3A:
adds r0, r5, 0
adds r0, 0xC4
ldrb r1, [r0]
cmp r1, 0
beq _08069B54
cmp r4, 0xB
bgt _08069B54
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x28
strb r1, [r0]
adds r4, 0x1
_08069B54:
adds r0, r5, 0
adds r0, 0xC8
ldrb r1, [r0]
cmp r1, 0
beq _08069B6E
cmp r4, 0xB
bgt _08069B6E
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x37
strb r1, [r0]
adds r4, 0x1
_08069B6E:
adds r0, r5, 0
adds r0, 0xD0
ldrb r1, [r0]
cmp r1, 0
beq _08069B88
cmp r4, 0xB
bgt _08069B88
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x3B
strb r1, [r0]
adds r4, 0x1
_08069B88:
adds r0, r5, 0
adds r0, 0xDC
ldrb r1, [r0]
cmp r1, 0
beq _08069BA2
cmp r4, 0xB
bgt _08069BA2
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x3E
strb r1, [r0]
adds r4, 0x1
_08069BA2:
adds r0, r5, 0
adds r0, 0xE0
ldrb r1, [r0]
cmp r1, 0
beq _08069BBC
cmp r4, 0xB
bgt _08069BBC
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x43
strb r1, [r0]
adds r4, 0x1
_08069BBC:
adds r0, r5, 0
adds r0, 0xE4
ldrb r1, [r0]
cmp r1, 0
beq _08069BD6
cmp r4, 0xB
bgt _08069BD6
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x46
strb r1, [r0]
adds r4, 0x1
_08069BD6:
adds r0, r5, 0
adds r0, 0xE8
ldrb r1, [r0]
cmp r1, 0
beq _08069BF0
cmp r4, 0xB
bgt _08069BF0
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x4A
strb r1, [r0]
adds r4, 0x1
_08069BF0:
adds r0, r5, 0
adds r0, 0xEC
ldrb r1, [r0]
cmp r1, 0
beq _08069C0A
cmp r4, 0xB
bgt _08069C0A
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
adds r1, 0x4E
strb r1, [r0]
adds r4, 0x1
_08069C0A:
movs r1, 0x89
lsls r1, 1
adds r0, r5, r1
ldrb r0, [r0]
cmp r0, 0
beq _08069C26
cmp r4, 0xB
bgt _08069C26
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x50
strb r1, [r0]
adds r4, 0x1
_08069C26:
adds r0, r5, 0
adds r0, 0xF0
ldrb r0, [r0]
cmp r0, 0
beq _08069C40
cmp r4, 0xB
bgt _08069C40
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x51
strb r1, [r0]
adds r4, 0x1
_08069C40:
adds r0, r5, 0
adds r0, 0xF1
ldrb r0, [r0]
cmp r0, 0
beq _08069C5A
cmp r4, 0xB
bgt _08069C5A
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x52
strb r1, [r0]
adds r4, 0x1
_08069C5A:
adds r0, r5, 0
adds r0, 0xF4
ldrb r0, [r0]
cmp r0, 0
beq _08069C74
cmp r4, 0xB
bgt _08069C74
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x53
strb r1, [r0]
adds r4, 0x1
_08069C74:
adds r0, r5, 0
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
beq _08069C8E
cmp r4, 0xB
bgt _08069C8E
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x54
strb r1, [r0]
adds r4, 0x1
_08069C8E:
mov r0, r8
bl sub_8071494
lsls r0, 24
cmp r0, 0
beq _08069CAA
cmp r4, 0xB
bgt _08069CAA
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x55
strb r1, [r0]
adds r4, 0x1
_08069CAA:
adds r0, r5, 0
adds r0, 0xFD
ldrb r0, [r0]
cmp r0, 0
beq _08069CC4
cmp r4, 0xB
bgt _08069CC4
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x56
strb r1, [r0]
adds r4, 0x1
_08069CC4:
mov r0, r8
movs r1, 0
bl sub_8070828
cmp r0, 0x1
ble _08069CE0
cmp r4, 0xB
bgt _08069CE0
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x57
strb r1, [r0]
adds r4, 0x1
_08069CE0:
adds r0, r5, 0
adds r0, 0xF2
ldrb r0, [r0]
cmp r0, 0
beq _08069CFA
cmp r4, 0xB
bgt _08069D0E
adds r0, r6, 0
adds r0, 0x58
adds r0, r4
movs r1, 0x58
strb r1, [r0]
adds r4, 0x1
_08069CFA:
cmp r4, 0xB
bgt _08069D0E
adds r1, r6, 0
adds r1, 0x58
movs r2, 0
_08069D04:
adds r0, r1, r4
strb r2, [r0]
adds r4, 0x1
cmp r4, 0xB
ble _08069D04
_08069D0E:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8069844
thumb_func_start sub_8069D18
sub_8069D18:
push {r4,r5,lr}
ldr r3, [r1, 0x70]
ldr r4, _08069D48
adds r3, 0x46
ldrb r2, [r3]
lsls r2, 2
adds r2, r4
ldrh r2, [r2]
ldrh r5, [r1, 0x4]
adds r2, r5
strh r2, [r0]
ldrb r2, [r3]
lsls r2, 2
adds r2, r4
ldrh r2, [r2, 0x2]
ldrh r1, [r1, 0x6]
adds r2, r1
strh r2, [r0, 0x2]
ldrb r1, [r3]
movs r0, 0x1
ands r0, r1
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08069D48: .4byte gUnknown_80F4448
thumb_func_end sub_8069D18
thumb_func_start sub_8069D4C
sub_8069D4C:
push {r4-r6,lr}
sub sp, 0xC
adds r5, r0, 0
ldr r4, [r1, 0x70]
ldrh r0, [r4, 0x2]
strh r0, [r5]
ldr r0, [r1, 0x4]
str r0, [r5, 0x4]
adds r0, r4, 0
adds r0, 0xF7
ldrb r0, [r0]
cmp r0, 0
beq _08069D6A
ldrh r0, [r4, 0x12]
b _08069D6C
_08069D6A:
ldrh r0, [r4, 0x10]
_08069D6C:
strh r0, [r5, 0x8]
ldrb r0, [r4, 0x9]
strh r0, [r5, 0xE]
movs r0, 0x2
ldrsh r1, [r4, r0]
ldrb r2, [r4, 0x9]
mov r0, sp
bl sub_808E010
ldr r0, [sp]
str r0, [r5, 0x10]
ldrb r0, [r4, 0x14]
strb r0, [r5, 0xA]
ldrb r0, [r4, 0x15]
strb r0, [r5, 0xB]
ldrb r0, [r4, 0x16]
strb r0, [r5, 0xC]
ldrb r0, [r4, 0x17]
strb r0, [r5, 0xD]
ldr r0, [r4, 0x60]
str r0, [r5, 0x1C]
adds r1, r5, 0
adds r1, 0x20
movs r2, 0x8C
lsls r2, 1
adds r0, r4, r2
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
ldm r0!, {r2,r3,r6}
stm r1!, {r2,r3,r6}
movs r3, 0x9E
lsls r3, 1
adds r0, r4, r3
ldr r0, [r0]
str r0, [r5, 0x14]
movs r6, 0xA0
lsls r6, 1
adds r0, r4, r6
ldr r0, [r0]
str r0, [r5, 0x18]
ldr r0, [r4, 0x3C]
str r0, [r5, 0x44]
add sp, 0xC
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8069D4C
thumb_func_start sub_8069DCC
sub_8069DCC:
push {r4,lr}
ldr r1, [r0, 0x70]
mov r12, r1
ldr r3, _08069E08
mov r4, r12
adds r4, 0x46
ldrb r1, [r4]
lsls r1, 2
adds r1, r3
ldrh r1, [r1]
ldrh r2, [r0, 0x4]
adds r1, r2
movs r2, 0xB6
lsls r2, 1
add r2, r12
strh r1, [r2]
ldrb r1, [r4]
lsls r1, 2
adds r1, r3
ldrh r1, [r1, 0x2]
ldrh r0, [r0, 0x6]
adds r1, r0
movs r0, 0xB7
lsls r0, 1
add r0, r12
strh r1, [r0]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08069E08: .4byte gUnknown_80F4448
thumb_func_end sub_8069DCC
thumb_func_start sub_8069E0C
sub_8069E0C:
push {r4-r7,lr}
adds r4, r0, 0
ldr r5, [r4, 0x70]
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069E44
adds r0, r4, 0
bl sub_807E580
ldr r1, _08069E40
lsls r0, 24
lsrs r0, 22
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
adds r0, 0x5C
movs r2, 0
strb r1, [r0]
adds r0, 0x1
strb r2, [r0]
adds r6, r5, 0
adds r6, 0x5E
b _08069E62
.align 2, 0
_08069E40: .4byte gUnknown_80F520C
_08069E44:
movs r4, 0
adds r7, r5, 0
adds r7, 0x5C
adds r6, r5, 0
adds r6, 0x5E
_08069E4E:
movs r1, 0x2
ldrsh r0, [r5, r1]
adds r1, r4, 0
bl sub_808DC68
adds r1, r7, r4
strb r0, [r1]
adds r4, 0x1
cmp r4, 0x1
ble _08069E4E
_08069E62:
movs r4, 0
_08069E64:
movs r1, 0x2
ldrsh r0, [r5, r1]
adds r1, r4, 0
bl sub_808DC84
adds r1, r6, r4
strb r0, [r1]
adds r4, 0x1
cmp r4, 0x1
ble _08069E64
ldr r0, _08069E88
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xC]
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08069E88: .4byte gUnknown_203B418
thumb_func_end sub_8069E0C
thumb_func_start sub_8069E8C
sub_8069E8C:
push {r4-r7,lr}
ldr r3, _08069ED8
ldr r2, [r3]
ldrb r0, [r2, 0xC]
cmp r0, 0
beq _08069F44
movs r1, 0
strb r1, [r2, 0xC]
ldr r0, [r3]
ldr r2, _08069EDC
adds r0, r2
strb r1, [r0]
movs r7, 0
adds r5, r3, 0
movs r6, 0x1
_08069EAA:
ldr r0, [r5]
lsls r1, r7, 2
ldr r2, _08069EE0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08069F3E
adds r0, r4, 0
movs r1, 0x4
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069EE8
ldr r0, [r5]
ldr r1, _08069EE4
b _08069F16
.align 2, 0
_08069ED8: .4byte gUnknown_203B418
_08069EDC: .4byte 0x0000e279
_08069EE0: .4byte 0x000135cc
_08069EE4: .4byte 0x0000e273
_08069EE8:
adds r0, r4, 0
movs r1, 0x1C
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069F04
ldr r0, [r5]
ldr r2, _08069F00
adds r0, r2
b _08069F18
.align 2, 0
_08069F00: .4byte 0x0000e271
_08069F04:
adds r0, r4, 0
movs r1, 0x31
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069F1A
ldr r0, [r5]
ldr r1, _08069F4C
_08069F16:
adds r0, r1
_08069F18:
strb r6, [r0]
_08069F1A:
adds r0, r4, 0
movs r1, 0x8
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _08069F36
adds r0, r4, 0
movs r1, 0x2D
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069F3E
_08069F36:
ldr r0, [r5]
ldr r2, _08069F50
adds r0, r2
strb r6, [r0]
_08069F3E:
adds r7, 0x1
cmp r7, 0x13
ble _08069EAA
_08069F44:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08069F4C: .4byte 0x0000e270
_08069F50: .4byte 0x0000e279
thumb_func_end sub_8069E8C
thumb_func_start sub_8069F54
sub_8069F54:
push {r4,r5,lr}
adds r5, r0, 0
lsls r1, 16
asrs r0, r1, 16
ldr r2, _08069F88
adds r1, r2
lsrs r1, 16
cmp r1, 0x3
bhi _08069F94
adds r0, r5, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08069F90
ldr r4, _08069F8C
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 22
adds r0, r4
movs r1, 0x2
ldrsh r0, [r0, r1]
b _08069F94
.align 2, 0
_08069F88: .4byte 0xfe880000
_08069F8C: .4byte gUnknown_80F520C
_08069F90:
movs r0, 0xBC
lsls r0, 1
_08069F94:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8069F54
thumb_func_start sub_8069F9C
sub_8069F9C:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
mov r8, r0
adds r6, r1, 0
mov r9, r2
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08069FB8
b _0806A0FA
_08069FB8:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08069FC6
b _0806A0FA
_08069FC6:
cmp r8, r6
bne _08069FCC
b _0806A0FA
_08069FCC:
mov r0, r8
ldr r2, [r0, 0x70]
adds r3, r2, 0
ldr r7, [r6, 0x70]
movs r4, 0x1
negs r4, r4
adds r0, r7, 0
adds r0, 0x5E
ldrb r0, [r0]
cmp r0, 0x28
bne _08069FE4
movs r4, 0
_08069FE4:
adds r0, r7, 0
adds r0, 0x5F
ldrb r0, [r0]
cmp r0, 0x28
bne _08069FF0
movs r4, 0x1
_08069FF0:
cmp r4, 0
blt _0806A068
movs r1, 0
adds r0, r2, 0
adds r0, 0x5E
ldrb r2, [r0]
cmp r2, 0
beq _0806A006
mov r0, sp
strb r2, [r0]
movs r1, 0x1
_0806A006:
adds r0, r3, 0
adds r0, 0x5F
ldrb r2, [r0]
cmp r2, 0
beq _0806A018
mov r3, sp
adds r0, r3, r1
strb r2, [r0]
adds r1, 0x1
_0806A018:
cmp r1, 0
beq _0806A068
cmp r1, 0x1
bne _0806A024
movs r1, 0
b _0806A030
_0806A024:
adds r0, r1, 0
bl sub_8084100
adds r1, r0, 0
cmp r1, 0
blt _0806A068
_0806A030:
adds r0, r7, 0
adds r0, 0x5E
adds r0, r4
add r1, sp
ldrb r1, [r1]
strb r1, [r0]
ldr r0, _0806A108
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xC]
ldr r0, _0806A10C
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0806A110
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
adds r0, r6, 0
bl sub_8042900
mov r0, r8
adds r1, r6, 0
bl sub_806ABAC
_0806A068:
movs r0, 0xAD
lsls r0, 1
adds r1, r7, r0
ldrb r0, [r1]
cmp r0, 0
beq _0806A0FA
movs r0, 0
strb r0, [r1]
adds r0, r6, 0
movs r1, 0x3B
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806A0FA
mov r0, r8
mov r1, r9
bl sub_8071A1C
lsls r0, 24
lsrs r5, r0, 24
mov r1, r9
ldrh r0, [r1, 0x2]
cmp r0, 0x1F
bne _0806A0AA
mov r0, r8
bl sub_807E580
lsls r0, 24
lsrs r0, 24
ldr r1, _0806A114
adds r0, r1
ldrb r5, [r0]
_0806A0AA:
cmp r5, 0
beq _0806A0FA
adds r0, r6, 0
adds r1, r5, 0
bl sub_8071858
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _0806A0FA
adds r4, r7, 0
adds r4, 0x5C
strb r5, [r4]
adds r1, r7, 0
adds r1, 0x5D
strb r0, [r1]
adds r1, 0x99
movs r0, 0x1
strb r0, [r1]
ldr r0, _0806A10C
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r4]
bl GetUnformattedTypeString
adds r1, r0, 0
ldr r0, _0806A118
bl strcpy
ldr r0, _0806A11C
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
adds r0, r6, 0
bl sub_8042968
_0806A0FA:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A108: .4byte gUnknown_203B418
_0806A10C: .4byte gUnknown_202DF98
_0806A110: .4byte gUnknown_80FCC7C
_0806A114: .4byte gUnknown_80F51E4
_0806A118: .4byte gUnknown_202DE58
_0806A11C: .4byte gUnknown_80FCCAC
thumb_func_end sub_8069F9C
thumb_func_start sub_806A120
sub_806A120:
push {r4-r7,lr}
adds r7, r0, 0
adds r6, r1, 0
adds r4, r2, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A19C
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A19C
cmp r7, r6
beq _0806A19C
ldr r5, [r6, 0x70]
adds r0, r5, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xC
bne _0806A19C
adds r0, r7, 0
adds r1, r4, 0
bl sub_8071A1C
lsls r0, 24
lsrs r0, 24
bl sub_8092364
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _0806A19C
adds r0, r5, 0
adds r0, 0x5C
movs r1, 0
strb r4, [r0]
adds r0, 0x1
strb r1, [r0]
adds r0, r6, 0
bl sub_8041BBC
ldr r0, _0806A1A4
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
bl GetUnformattedTypeString
adds r1, r0, 0
ldr r0, _0806A1A8
bl strcpy
ldr r0, _0806A1AC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r6, 0
bl sub_80522F4
_0806A19C:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A1A4: .4byte gUnknown_202DF98
_0806A1A8: .4byte gUnknown_202DE58
_0806A1AC: .4byte gUnknown_80FDCC8
thumb_func_end sub_806A120
thumb_func_start sub_806A1B0
sub_806A1B0:
push {r4,lr}
sub sp, 0x4
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A1DE
adds r0, r4, 0
movs r1, 0x2A
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806A1DE
movs r0, 0
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8076090
_0806A1DE:
add sp, 0x4
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_806A1B0
thumb_func_start sub_806A1E8
sub_806A1E8:
push {r4,r5,lr}
adds r4, r0, 0
movs r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A234
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806A210
ldr r0, [r4, 0x70]
movs r1, 0
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0806A20E
movs r1, 0x1
_0806A20E:
adds r5, r1, 0
_0806A210:
ldr r0, _0806A23C
ldr r0, [r0]
ldrb r0, [r0, 0x1]
cmp r0, 0
bne _0806A21C
movs r5, 0
_0806A21C:
cmp r5, 0
beq _0806A234
adds r0, r4, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
bne _0806A234
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
_0806A234:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806A23C: .4byte gUnknown_203B46C
thumb_func_end sub_806A1E8
thumb_func_start sub_806A240
sub_806A240:
push {r4-r6,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A2B4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806A26A
ldr r0, [r4, 0x70]
movs r1, 0
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0806A268
movs r1, 0x1
_0806A268:
adds r6, r1, 0
_0806A26A:
cmp r6, 0
beq _0806A284
adds r0, r4, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
bne _0806A284
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
b _0806A2B4
_0806A284:
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806A29C
ldr r0, [r5, 0x70]
movs r1, 0
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0806A29A
movs r1, 0x1
_0806A29A:
adds r6, r1, 0
_0806A29C:
cmp r6, 0
beq _0806A2B4
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
bne _0806A2B4
adds r0, r5, 0
movs r1, 0x1
bl sub_806A2BC
_0806A2B4:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806A240
thumb_func_start sub_806A2BC
sub_806A2BC:
push {r4-r7,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r6, r1, 24
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A328
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806A328
ldr r5, _0806A2F4
ldr r0, [r5]
ldr r1, _0806A2F8
adds r0, r1
ldr r0, [r0]
cmp r0, r4
beq _0806A328
adds r7, r4, 0x4
cmp r6, 0
beq _0806A30C
movs r0, 0x1
bl sub_804178C
b _0806A302
.align 2, 0
_0806A2F4: .4byte gUnknown_203B418
_0806A2F8: .4byte 0x000181f8
_0806A2FC:
movs r0, 0x34
bl sub_803E46C
_0806A302:
ldr r0, [r5]
movs r1, 0x12
ldrsh r0, [r0, r1]
cmp r0, 0x3B
ble _0806A2FC
_0806A30C:
movs r0, 0x4
movs r1, 0x44
bl sub_803E708
adds r0, r4, 0
bl sub_803F508
adds r0, r7, 0
bl sub_804AC20
ldr r0, _0806A330
ldr r1, [r0]
movs r0, 0
strh r0, [r1, 0x12]
_0806A328:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A330: .4byte gUnknown_203B418
thumb_func_end sub_806A2BC
thumb_func_start nullsub_95
nullsub_95:
bx lr
thumb_func_end nullsub_95
thumb_func_start sub_806A338
sub_806A338:
push {r4-r6,lr}
movs r5, 0
ldr r6, _0806A378
_0806A33E:
ldr r0, [r6]
lsls r1, r5, 2
ldr r2, _0806A37C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A384
ldr r0, [r4, 0x70]
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x3
bne _0806A384
ldr r1, [r6]
ldr r2, _0806A380
adds r0, r1, r2
str r4, [r0]
ldr r0, [r4, 0x70]
adds r2, 0xC
adds r1, r2
adds r0, 0x98
ldr r0, [r0]
str r0, [r1]
b _0806A38A
.align 2, 0
_0806A378: .4byte gUnknown_203B418
_0806A37C: .4byte 0x000135cc
_0806A380: .4byte 0x00017b30
_0806A384:
adds r5, 0x1
cmp r5, 0x13
ble _0806A33E
_0806A38A:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806A338
thumb_func_start sub_806A390
sub_806A390:
push {r4-r7,lr}
ldr r0, [r0, 0x70]
movs r7, 0
movs r1, 0x8C
lsls r1, 1
adds r4, r0, r1
adds r5, r4, 0
movs r6, 0x3
_0806A3A0:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806A3C2
ldrb r1, [r4, 0x1]
movs r0, 0xF7
ands r0, r1
movs r1, 0xEF
ands r0, r1
movs r1, 0x4
orrs r0, r1
strb r0, [r4, 0x1]
adds r0, r5, 0
bl sub_8092BF4
strb r0, [r4, 0x4]
_0806A3C2:
adds r4, 0x8
adds r5, 0x8
subs r6, 0x1
cmp r6, 0
bge _0806A3A0
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806A390
thumb_func_start sub_806A3D4
sub_806A3D4:
push {r4-r7,lr}
sub sp, 0xC
adds r7, r0, 0
adds r6, r2, 0
lsls r1, 16
asrs r5, r1, 16
lsls r3, 24
cmp r3, 0
beq _0806A404
ldr r4, _0806A400
adds r0, r5, 0
movs r1, 0xA
bl __divsi3
adds r2, r0, 0
lsls r2, 16
asrs r2, 16
mov r0, sp
adds r1, r4, 0
bl sprintf
b _0806A41C
.align 2, 0
_0806A400: .4byte gUnknown_8106EA8
_0806A404:
ldr r4, _0806A450
adds r0, r5, 0
movs r1, 0xA
bl __divsi3
adds r2, r0, 0
lsls r2, 16
asrs r2, 16
mov r0, sp
adds r1, r4, 0
bl sprintf
_0806A41C:
ldr r1, _0806A454
mov r0, sp
bl OpenFileAndGetFileDataPtr
adds r4, r0, 0
adds r0, r5, 0
movs r1, 0xA
bl __modsi3
lsls r0, 16
ldr r1, [r4, 0x4]
asrs r0, 12
adds r0, r1
lsls r1, r6, 2
adds r0, r1
ldr r1, [r0]
adds r0, r7, 0
bl strcpy
adds r0, r4, 0
bl CloseFile
add sp, 0xC
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A450: .4byte gUnknown_8106EB0
_0806A454: .4byte gUnknown_83B0000
thumb_func_end sub_806A3D4
thumb_func_start sub_806A458
sub_806A458:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r6, r0, 0
movs r0, 0
mov r9, r0
ldr r0, [r6, 0x70]
ldrb r0, [r0, 0x6]
mov r10, r0
adds r0, r6, 0
bl sub_80696A8
cmp r0, 0
bne _0806A47C
movs r0, 0
b _0806A4CC
_0806A47C:
movs r7, 0x1
negs r7, r7
_0806A480:
movs r5, 0x1
negs r5, r5
adds r1, r7, 0x1
mov r8, r1
_0806A488:
movs r2, 0x4
ldrsh r0, [r6, r2]
adds r0, r5
movs r2, 0x6
ldrsh r1, [r6, r2]
adds r1, r7
bl sub_8049590
adds r4, r0, 0
ldr r0, [r4, 0x10]
cmp r0, 0
beq _0806A4B6
bl sub_80450F8
cmp r0, 0x1
bne _0806A4B6
ldr r0, [r4, 0x10]
ldr r0, [r0, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, r10
beq _0806A4B6
movs r0, 0x1
add r9, r0
_0806A4B6:
adds r5, 0x1
cmp r5, 0x1
ble _0806A488
mov r7, r8
cmp r7, 0x1
ble _0806A480
movs r0, 0
mov r1, r9
cmp r1, 0x1
ble _0806A4CC
movs r0, 0x1
_0806A4CC:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806A458
thumb_func_start sub_806A4DC
sub_806A4DC:
push {r4,lr}
sub sp, 0x64
adds r4, r0, 0
ldr r1, _0806A530
ldr r0, [sp, 0x60]
ands r0, r1
ldr r1, _0806A534
ands r0, r1
movs r1, 0x80
lsls r1, 1
orrs r0, r1
str r0, [sp, 0x60]
movs r0, 0x2
ldrsh r1, [r4, r0]
add r0, sp, 0x60
str r0, [sp]
movs r0, 0
str r0, [sp, 0x4]
add r0, sp, 0x8
movs r2, 0
movs r3, 0
bl sub_808CFD0
add r1, sp, 0x8
ldrh r0, [r4, 0x2]
strh r0, [r1, 0x8]
ldrb r0, [r4, 0x9]
strb r0, [r1, 0x3]
ldrh r0, [r4, 0xC]
strh r0, [r1, 0x14]
ldrb r0, [r4, 0x14]
strb r0, [r1, 0x18]
ldrb r0, [r4, 0x16]
strb r0, [r1, 0x1A]
adds r0, r1, 0
bl sub_808F700
add sp, 0x64
pop {r4}
pop {r1}
bx r1
.align 2, 0
_0806A530: .4byte 0xffffff00
_0806A534: .4byte 0xffff00ff
thumb_func_end sub_806A4DC
thumb_func_start sub_806A538
sub_806A538:
push {lr}
lsls r0, 16
asrs r1, r0, 16
adds r2, r1, 0
ldr r0, _0806A554
cmp r1, r0
beq _0806A550
ldr r0, _0806A558
cmp r1, r0
beq _0806A550
cmp r2, 0
bge _0806A55C
_0806A550:
movs r0, 0x1
b _0806A55E
.align 2, 0
_0806A554: .4byte 0x000055aa
_0806A558: .4byte 0x00005aa5
_0806A55C:
movs r0, 0
_0806A55E:
pop {r1}
bx r1
thumb_func_end sub_806A538
thumb_func_start sub_806A564
sub_806A564:
push {lr}
lsls r0, 16
asrs r1, r0, 16
ldr r0, _0806A57C
cmp r1, r0
beq _0806A584
ldr r0, _0806A580
cmp r1, r0
beq _0806A584
movs r0, 0
b _0806A586
.align 2, 0
_0806A57C: .4byte 0x000055aa
_0806A580: .4byte 0x00005aa5
_0806A584:
movs r0, 0x1
_0806A586:
pop {r1}
bx r1
thumb_func_end sub_806A564
thumb_func_start sub_806A58C
sub_806A58C:
push {lr}
lsls r0, 16
movs r1, 0xCE
lsls r1, 17
cmp r0, r1
bls _0806A59C
movs r0, 0
b _0806A59E
_0806A59C:
movs r0, 0x1
_0806A59E:
pop {r1}
bx r1
thumb_func_end sub_806A58C
thumb_func_start sub_806A5A4
sub_806A5A4:
push {lr}
lsls r0, 16
cmp r0, 0
blt _0806A5B0
movs r0, 0
b _0806A5B2
_0806A5B0:
movs r0, 0x1
_0806A5B2:
pop {r1}
bx r1
thumb_func_end sub_806A5A4
thumb_func_start sub_806A5B8
sub_806A5B8:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r6, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806A5CE
b _0806A6D2
_0806A5CE:
adds r0, r6, 0
bl sub_8045128
ldrh r0, [r0]
movs r1, 0x3
ands r1, r0
cmp r1, 0x2
bne _0806A664
ldr r4, [r6, 0x70]
ldr r1, _0806A640
ldr r0, _0806A644
ldr r0, [r0]
ldr r2, _0806A648
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
bne _0806A650
adds r0, r4, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
bne _0806A608
adds r0, r6, 0
adds r1, r6, 0
bl sub_807A324
_0806A608:
movs r1, 0x2
ldrsh r0, [r4, r1]
bl GetWalkableTiles
lsls r0, 24
lsrs r0, 24
cmp r0, 0x4
beq _0806A6D2
movs r2, 0x2
ldrsh r1, [r4, r2]
ldr r0, _0806A64C
cmp r1, r0
beq _0806A6D2
cmp r1, 0x92
beq _0806A6D2
adds r0, r4, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x1
beq _0806A6D2
adds r0, r6, 0
adds r1, r6, 0
movs r2, 0x1
movs r3, 0
bl sub_8076210
b _0806A6D2
.align 2, 0
_0806A640: .4byte gUnknown_810ACC0
_0806A644: .4byte gUnknown_203B418
_0806A648: .4byte 0x00003a0e
_0806A64C: .4byte 0x00000113
_0806A650:
adds r0, r4, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x1
bne _0806A6D2
adds r0, r6, 0
adds r1, r6, 0
bl sub_807A290
b _0806A6D2
_0806A664:
cmp r1, 0
bne _0806A6D2
ldr r7, [r6, 0x70]
ldrb r0, [r7, 0x7]
cmp r0, 0
beq _0806A6D2
movs r0, 0x9E
lsls r0, 1
adds r4, r7, r0
ldr r5, [r4]
mov r0, sp
adds r1, r5, 0
movs r2, 0x5
bl sub_80942C0
ldr r0, [sp]
str r0, [r4]
movs r1, 0
mov r8, r1
adds r0, r5, 0
bl sub_8094450
cmp r0, 0x13
ble _0806A6A4
ldr r0, [r4]
bl sub_8094450
cmp r0, 0x13
bgt _0806A6A4
ldr r0, _0806A6E0
ldr r0, [r0]
mov r8, r0
_0806A6A4:
adds r0, r5, 0
bl sub_8094450
cmp r0, 0x9
ble _0806A6C4
movs r2, 0x9E
lsls r2, 1
adds r0, r7, r2
ldr r0, [r0]
bl sub_8094450
cmp r0, 0x9
bgt _0806A6C4
ldr r0, _0806A6E4
ldr r0, [r0]
mov r8, r0
_0806A6C4:
mov r0, r8
cmp r0, 0
beq _0806A6D2
adds r0, r6, 0
mov r1, r8
bl sub_80522A8
_0806A6D2:
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A6E0: .4byte gUnknown_80FD594
_0806A6E4: .4byte gUnknown_80FD5B8
thumb_func_end sub_806A5B8
thumb_func_start sub_806A6E8
sub_806A6E8:
push {r4-r7,lr}
sub sp, 0xC
adds r7, r0, 0
ldr r6, [r7, 0x70]
adds r0, r6, 0
adds r0, 0x64
adds r1, r6, 0
adds r1, 0x62
ldrb r2, [r0]
ldrb r1, [r1]
cmp r2, r1
beq _0806A77A
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0806A764
cmp r1, 0xA
beq _0806A70E
cmp r1, 0x2B
bne _0806A72E
_0806A70E:
movs r0, 0x9E
lsls r0, 1
adds r5, r6, r0
ldr r4, [r5]
mov r0, sp
movs r1, 0xA
bl sub_80943A0
ldr r2, [sp]
add r0, sp, 0x4
adds r1, r4, 0
bl sub_80942C0
ldr r0, [sp, 0x4]
str r0, [r5]
b _0806A744
_0806A72E:
cmp r1, 0x1B
bne _0806A744
add r0, sp, 0x8
movs r1, 0
bl sub_80943A0
movs r0, 0x9E
lsls r0, 1
adds r1, r6, r0
ldr r0, [sp, 0x8]
str r0, [r1]
_0806A744:
ldr r0, _0806A75C
ldr r0, [r0]
ldr r1, _0806A760
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0806A776
adds r0, r7, 0
bl sub_80418D4
b _0806A776
.align 2, 0
_0806A75C: .4byte gUnknown_203B418
_0806A760: .4byte 0x00000676
_0806A764:
cmp r1, 0x11
beq _0806A76C
cmp r2, 0x11
bne _0806A776
_0806A76C:
movs r0, 0x1
bl sub_803F580
bl sub_8040A84
_0806A776:
bl sub_807AA30
_0806A77A:
adds r0, r6, 0
adds r0, 0x60
ldrb r0, [r0]
movs r1, 0x1
ands r1, r0
cmp r1, 0
beq _0806A792
adds r0, r6, 0
adds r0, 0x62
ldrb r1, [r0]
adds r0, 0x2
b _0806A796
_0806A792:
adds r0, r6, 0
adds r0, 0x64
_0806A796:
strb r1, [r0]
add sp, 0xC
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806A6E8
thumb_func_start sub_806A7A0
sub_806A7A0:
push {r4,r5,lr}
movs r5, 0
_0806A7A4:
ldr r0, _0806A7E0
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806A7E4
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A7D2
ldr r2, [r4, 0x70]
movs r1, 0xC
ldrsh r0, [r2, r1]
cmp r0, 0x1
ble _0806A7D2
adds r1, r0, 0
subs r1, 0x1
adds r0, r2, 0
bl sub_806A7E8
_0806A7D2:
adds r5, 0x1
cmp r5, 0x3
ble _0806A7A4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806A7E0: .4byte gUnknown_203B418
_0806A7E4: .4byte 0x0001357c
thumb_func_end sub_806A7A0
thumb_func_start sub_806A7E8
sub_806A7E8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x30
adds r5, r0, 0
mov r0, sp
bl sub_808EBA8
mov r9, r0
add r4, sp, 0x18
movs r0, 0xC
ldrsh r1, [r5, r0]
adds r0, r4, 0
bl sub_808EBA8
adds r6, r0, 0
ldr r0, _0806A828
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
movs r2, 0x1
mov r8, r4
_0806A818:
movs r3, 0
movs r5, 0
movs r1, 0
adds r4, r2, 0x1
cmp r3, r9
bge _0806A83E
mov r0, sp
b _0806A836
.align 2, 0
_0806A828: .4byte gUnknown_202DF98
_0806A82C:
adds r1, 0x1
cmp r1, r9
bge _0806A83E
mov r7, sp
adds r0, r7, r1
_0806A836:
ldrb r0, [r0]
cmp r0, r2
bne _0806A82C
movs r3, 0x1
_0806A83E:
movs r1, 0
cmp r1, r6
bge _0806A85C
mov r7, r8
ldrb r0, [r7]
b _0806A856
_0806A84A:
adds r1, 0x1
cmp r1, r6
bge _0806A85C
mov r7, r8
adds r0, r7, r1
ldrb r0, [r0]
_0806A856:
cmp r0, r2
bne _0806A84A
movs r5, 0x1
_0806A85C:
cmp r3, r5
beq _0806A87A
lsls r0, r2, 24
lsrs r0, 24
bl sub_808EAB0
adds r1, r0, 0
ldr r0, _0806A890
bl strcpy
ldr r0, _0806A894
ldr r1, [r0]
movs r0, 0
bl sub_805239C
_0806A87A:
adds r2, r4, 0
cmp r2, 0x17
ble _0806A818
add sp, 0x30
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A890: .4byte gUnknown_202DE58
_0806A894: .4byte gUnknown_80FEAC4
thumb_func_end sub_806A7E8
thumb_func_start sub_806A898
sub_806A898:
push {r4-r7,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r7, r1, 24
lsls r2, 24
lsrs r1, r2, 24
ldr r5, [r4, 0x70]
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0806A8C2
ldrh r1, [r4, 0x4]
movs r2, 0xB6
lsls r2, 1
adds r0, r5, r2
strh r1, [r0]
ldrh r0, [r4, 0x6]
adds r0, 0x1
adds r2, 0x2
adds r1, r5, r2
strh r0, [r1]
b _0806A8C8
_0806A8C2:
adds r0, r4, 0
bl sub_807ADB8
_0806A8C8:
movs r0, 0xB6
lsls r0, 1
adds r6, r5, r0
ldr r0, [r6]
cmp r0, 0
beq _0806A90E
adds r0, r4, 0
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _0806A8EE
adds r0, r4, 0
bl sub_8070CD0
lsls r0, 24
cmp r0, 0
bne _0806A90E
_0806A8EE:
adds r0, r4, 0x4
adds r1, r6, 0
bl sub_80983D8
adds r2, r0, 0
movs r1, 0x7
ands r0, r1
adds r1, r5, 0
adds r1, 0x46
strb r0, [r1]
cmp r7, 0
beq _0806A90E
adds r0, r4, 0
adds r1, r2, 0
bl sub_806CE68
_0806A90E:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806A898
thumb_func_start sub_806A914
sub_806A914:
push {r4-r7,lr}
mov r7, r8
push {r7}
lsls r0, 24
lsrs r0, 24
mov r8, r0
lsls r1, 24
lsrs r7, r1, 24
lsls r2, 24
lsrs r6, r2, 24
movs r5, 0
_0806A92A:
ldr r0, _0806A96C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806A970
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A95C
ldr r0, [r4, 0x70]
cmp r7, 0
beq _0806A952
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806A95C
_0806A952:
adds r0, r4, 0
mov r1, r8
adds r2, r6, 0
bl sub_806A898
_0806A95C:
adds r5, 0x1
cmp r5, 0x13
ble _0806A92A
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806A96C: .4byte gUnknown_203B418
_0806A970: .4byte 0x000135cc
thumb_func_end sub_806A914
thumb_func_start sub_806A974
sub_806A974:
push {r4,r5,lr}
movs r5, 0
_0806A978:
ldr r0, _0806A9AC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806A9B0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806A99E
ldr r0, [r4, 0x70]
adds r0, 0x46
ldrb r1, [r0]
adds r0, r4, 0
bl sub_806CE68
_0806A99E:
adds r5, 0x1
cmp r5, 0x13
ble _0806A978
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806A9AC: .4byte gUnknown_203B418
_0806A9B0: .4byte 0x000135cc
thumb_func_end sub_806A974
thumb_func_start sub_806A9B4
sub_806A9B4:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806AA02
ldr r0, [r4, 0x70]
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r1, r5, 0
bl sub_80935B8
cmp r0, 0
bne _0806A9E0
ldr r0, _0806A9DC
b _0806A9E6
.align 2, 0
_0806A9DC: .4byte gPtrLinkedMovesComeApartMessage
_0806A9E0:
cmp r0, 0x1
bne _0806A9F4
ldr r0, _0806A9F0
_0806A9E6:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0806AA02
.align 2, 0
_0806A9F0: .4byte gPtrLinkMoveOneUseWarningMessage
_0806A9F4:
cmp r0, 0x2
bne _0806AA02
ldr r0, _0806AA08
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0806AA02:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806AA08: .4byte gPtrLinkMoveTwoUsesWarningMessage
thumb_func_end sub_806A9B4
thumb_func_start sub_806AA0C
sub_806AA0C:
push {r4,r5,lr}
lsls r0, 16
asrs r4, r0, 16
lsls r1, 24
lsrs r5, r1, 24
adds r0, r4, 0
bl sub_80981DC
lsls r0, 24
cmp r0, 0
beq _0806AA56
ldr r0, _0806AA5C
ldr r0, [r0]
ldr r1, _0806AA60
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0806AA40
adds r0, r4, 0
bl sub_808E770
lsls r0, 16
movs r1, 0xCF
lsls r1, 17
cmp r0, r1
beq _0806AA56
_0806AA40:
cmp r4, 0x97
bne _0806AA68
ldr r0, _0806AA5C
ldr r0, [r0]
ldr r1, _0806AA64
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0806AA56
cmp r5, 0
bne _0806AA68
_0806AA56:
movs r0, 0
b _0806AA6A
.align 2, 0
_0806AA5C: .4byte gUnknown_203B418
_0806AA60: .4byte 0x000037fd
_0806AA64: .4byte 0x000037ff
_0806AA68:
movs r0, 0x1
_0806AA6A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_806AA0C
thumb_func_start sub_806AA70
sub_806AA70:
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r7, 0
ldr r0, _0806AAB4
mov r8, r0
_0806AA7C:
mov r1, r8
ldr r0, [r1]
lsls r1, r7, 2
ldr r2, _0806AAB8
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806AB12
ldr r0, [r4, 0x70]
ldrb r2, [r0, 0xA]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0806AAC4
mov r1, r8
ldr r0, [r1]
ldrb r0, [r0, 0x11]
cmp r0, 0x1
bne _0806AABC
adds r0, r4, 0
bl sub_8042B20
b _0806AB0A
.align 2, 0
_0806AAB4: .4byte gUnknown_203B418
_0806AAB8: .4byte 0x0001357c
_0806AABC:
adds r0, r4, 0
bl sub_8042B0C
b _0806AB0A
_0806AAC4:
cmp r2, 0
blt _0806AB12
movs r6, 0
ldr r1, _0806AB24
movs r0, 0x64
muls r0, r2
ldr r2, _0806AB28
adds r0, r2
ldr r1, [r1]
adds r5, r1, r0
mov r1, r8
ldr r0, [r1]
ldrb r0, [r0, 0x11]
cmp r0, 0
bne _0806AB04
movs r2, 0xA
ldrsh r0, [r5, r2]
bl sub_806A564
lsls r0, 24
cmp r0, 0
bne _0806AB04
movs r1, 0xA
ldrsh r0, [r5, r1]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _0806AB00
movs r6, 0x1
_0806AB00:
cmp r6, 0
beq _0806AB12
_0806AB04:
adds r0, r4, 0
bl sub_8042B0C
_0806AB0A:
adds r1, r4, 0
adds r1, 0x20
movs r0, 0
strb r0, [r1]
_0806AB12:
adds r7, 0x1
cmp r7, 0x3
ble _0806AA7C
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806AB24: .4byte gUnknown_203B45C
_0806AB28: .4byte 0x00008df8
thumb_func_end sub_806AA70
thumb_func_start sub_806AB2C
sub_806AB2C:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
movs r4, 0
ldr r0, _0806ABA4
mov r9, r0
_0806AB3A:
mov r1, r9
ldr r0, [r1]
lsls r1, r4, 2
ldr r2, _0806ABA8
adds r0, r2
adds r0, r1
ldr r7, [r0]
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
adds r4, 0x1
mov r8, r4
cmp r0, 0
beq _0806AB92
ldr r5, [r7, 0x70]
movs r6, 0
_0806AB5C:
mov r1, r9
ldr r0, [r1]
lsls r1, r6, 2
ldr r2, _0806ABA8
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806AB8C
cmp r7, r4
beq _0806AB8C
adds r0, r5, 0
adds r0, 0x7C
ldrh r0, [r0]
ldrh r1, [r4, 0x26]
cmp r0, r1
bne _0806AB8C
adds r0, r5, 0
adds r0, 0x80
str r4, [r0]
_0806AB8C:
adds r6, 0x1
cmp r6, 0x13
ble _0806AB5C
_0806AB92:
mov r4, r8
cmp r4, 0x13
ble _0806AB3A
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806ABA4: .4byte gUnknown_203B418
_0806ABA8: .4byte 0x000135cc
thumb_func_end sub_806AB2C
thumb_func_start sub_806ABAC
sub_806ABAC:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
ldr r5, [r4, 0x70]
adds r0, r4, 0
movs r1, 0x16
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806ABD4
adds r0, r5, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _0806ABD4
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A290
_0806ABD4:
adds r0, r4, 0
movs r1, 0x40
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806ABF4
adds r0, r5, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
bne _0806ABF4
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A400
_0806ABF4:
adds r0, r4, 0
movs r1, 0x42
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806AC14
adds r0, r5, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x1
bne _0806AC14
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A290
_0806AC14:
adds r0, r4, 0
movs r1, 0x29
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806AC34
adds r0, r5, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x7
bne _0806AC34
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A400
_0806AC34:
adds r0, r4, 0
movs r1, 0x36
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806AC50
adds r0, r4, 0
movs r1, 0x49
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806AC72
_0806AC50:
adds r0, r4, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
bne _0806AC66
adds r0, r5, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x4
bne _0806AC72
_0806AC66:
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_807A124
_0806AC72:
adds r0, r4, 0
movs r1, 0x41
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806AC92
adds r0, r5, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
bne _0806AC92
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A324
_0806AC92:
adds r0, r4, 0
movs r1, 0x45
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806ACB8
adds r0, r5, 0
adds r0, 0xAC
ldrb r0, [r0]
subs r0, 0x2
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0806ACB8
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A290
_0806ACB8:
adds r0, r4, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806ACE0
adds r1, r5, 0
adds r1, 0xF6
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xC
bne _0806ACE0
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A4C8
_0806ACE0:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806ABAC
thumb_func_start sub_806ACE8
sub_806ACE8:
push {r4,r5,lr}
adds r4, r1, 0
ldr r0, [r0, 0x70]
mov r12, r0
movs r5, 0xEF
movs r2, 0x8C
lsls r2, 1
add r2, r12
movs r3, 0x3
_0806ACFA:
ldrb r1, [r2]
adds r0, r5, 0
ands r0, r1
strb r0, [r2]
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _0806ACFA
movs r2, 0x9C
lsls r2, 1
add r2, r12
ldrb r0, [r2]
movs r3, 0xEF
ands r3, r0
movs r5, 0
strb r3, [r2]
ldrh r1, [r4, 0x2]
movs r0, 0xB0
lsls r0, 1
cmp r1, r0
bne _0806AD2E
movs r1, 0x10
adds r0, r3, 0
orrs r0, r1
strb r0, [r2]
b _0806AD36
_0806AD2E:
ldrb r0, [r4]
movs r1, 0x10
orrs r0, r1
strb r0, [r4]
_0806AD36:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_806ACE8
thumb_func_start sub_806AD3C
sub_806AD3C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _0806AE1C
add sp, r4
ldr r0, _0806AE20
ldr r0, [r0]
ldr r1, _0806AE24
adds r4, r0, r1
mov r0, sp
movs r1, 0
bl sub_803D808
str r0, [sp, 0x200]
movs r7, 0
cmp r7, r0
bge _0806ADEC
mov r6, sp
adds r7, r0, 0
_0806AD66:
adds r0, r6, 0
bl sub_808E9B8
strh r0, [r4]
adds r0, r6, 0
bl sub_808E9E4
strh r0, [r4, 0x2]
adds r0, r4, 0x4
movs r2, 0
ldrsh r1, [r4, r2]
movs r3, 0x2
ldrsh r2, [r4, r3]
bl sub_8072AC8
ldrh r0, [r4, 0x4]
cmp r0, 0
bne _0806AD90
movs r0, 0xB8
lsls r0, 1
strh r0, [r4, 0x4]
_0806AD90:
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_806C444
strh r0, [r4, 0xC]
movs r5, 0
movs r3, 0xE
adds r3, r4
mov r9, r3
movs r0, 0x10
adds r0, r4
mov r8, r0
movs r1, 0x14
adds r1, r4
mov r10, r1
_0806ADB2:
movs r2, 0
ldrsh r0, [r4, r2]
movs r3, 0x2
ldrsh r1, [r4, r3]
adds r2, r5, 0
bl sub_806C488
mov r2, r9
adds r1, r2, r5
strb r0, [r1]
movs r3, 0
ldrsh r0, [r4, r3]
movs r2, 0x2
ldrsh r1, [r4, r2]
adds r2, r5, 0
bl sub_806C4D4
mov r3, r8
adds r1, r3, r5
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806ADB2
mov r4, r10
adds r6, 0x8
subs r7, 0x1
cmp r7, 0
bne _0806AD66
ldr r7, [sp, 0x200]
_0806ADEC:
cmp r7, 0x3F
bgt _0806ADFC
movs r0, 0
_0806ADF2:
strh r0, [r4]
adds r4, 0x14
adds r7, 0x1
cmp r7, 0x3F
ble _0806ADF2
_0806ADFC:
movs r7, 0
ldr r4, _0806AE28
ldr r3, _0806AE20
ldr r2, _0806AE2C
movs r1, 0
_0806AE06:
ldr r0, [r3]
adds r0, r2
adds r0, r7
strb r1, [r0]
adds r7, 0x1
cmp r7, r4
ble _0806AE06
movs r0, 0x1
mov r10, r0
movs r7, 0
b _0806AE94
.align 2, 0
_0806AE1C: .4byte 0xfffffdfc
_0806AE20: .4byte gUnknown_203B418
_0806AE24: .4byte 0x00002f3c
_0806AE28: .4byte 0x000001a7
_0806AE2C: .4byte 0x0000363c
_0806AE30:
movs r2, 0x1
negs r2, r2
mov r8, r2
mov r9, r8
ldr r3, [sp, 0x200]
cmp r3, 0
ble _0806AE7A
mov r5, sp
adds r6, r3, 0
_0806AE42:
adds r0, r5, 0
bl sub_808E9B8
lsls r0, 16
asrs r4, r0, 16
ldr r1, _0806AECC
ldr r0, [r1]
ldr r2, _0806AED0
adds r0, r2
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
bne _0806AE72
adds r0, r5, 0
bl sub_808E9E4
adds r1, r0, 0
adds r0, r4, 0
bl sub_808DD18
cmp r9, r0
bge _0806AE72
mov r9, r0
mov r8, r4
_0806AE72:
adds r5, 0x8
subs r6, 0x1
cmp r6, 0
bne _0806AE42
_0806AE7A:
mov r3, r8
cmp r3, 0
blt _0806AE9A
ldr r1, _0806AECC
ldr r0, [r1]
ldr r2, _0806AED0
adds r0, r2
add r0, r8
mov r3, r10
strb r3, [r0]
movs r0, 0x2
add r10, r0
adds r7, 0x1
_0806AE94:
ldr r1, [sp, 0x200]
cmp r7, r1
blt _0806AE30
_0806AE9A:
movs r7, 0
ldr r5, _0806AECC
ldr r4, _0806AED0
movs r3, 0x1
ldr r2, _0806AED4
_0806AEA4:
ldr r0, [r5]
adds r0, r4
adds r1, r0, r7
ldrb r0, [r1]
cmp r0, 0
bne _0806AEB2
strb r3, [r1]
_0806AEB2:
adds r7, 0x1
cmp r7, r2
ble _0806AEA4
movs r3, 0x81
lsls r3, 2
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806AECC: .4byte gUnknown_203B418
_0806AED0: .4byte 0x0000363c
_0806AED4: .4byte 0x000001a7
thumb_func_end sub_806AD3C
thumb_func_start sub_806AED8
sub_806AED8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
mov r10, r0
str r1, [sp, 0x8]
str r2, [sp, 0xC]
str r3, [sp, 0x10]
ldr r0, [sp, 0x38]
ldr r1, [sp, 0x3C]
mov r8, r1
lsls r0, 16
asrs r7, r0, 16
ldr r1, _0806AF04
ldr r0, [r1]
ldr r4, _0806AF08
adds r6, r0, r4
movs r3, 0
b _0806AF7A
.align 2, 0
_0806AF04: .4byte gUnknown_203B418
_0806AF08: .4byte 0x00002f3c
_0806AF0C:
lsls r0, r2, 16
asrs r0, 16
cmp r0, r7
bne _0806AF6E
movs r2, 0x2
ldrsh r0, [r6, r2]
cmp r0, r8
bne _0806AF6E
movs r5, 0xE
adds r5, r6
mov r8, r5
movs r0, 0x10
adds r0, r6
mov r9, r0
mov r1, r10
adds r1, 0x20
str r1, [sp, 0x14]
adds r5, r6, 0x4
mov r4, r10
movs r7, 0x3
_0806AF34:
ldrh r1, [r5]
adds r0, r4, 0
bl sub_8092AA8
adds r5, 0x2
adds r4, 0x8
subs r7, 0x1
cmp r7, 0
bge _0806AF34
ldrh r0, [r6, 0xC]
ldr r2, [sp, 0x8]
strh r0, [r2]
movs r5, 0
mov r3, r8
mov r2, r9
_0806AF52:
ldr r0, [sp, 0xC]
adds r1, r0, r5
adds r0, r3, r5
ldrb r0, [r0]
strb r0, [r1]
ldr r0, [sp, 0x10]
adds r1, r0, r5
adds r0, r2, r5
ldrb r0, [r0]
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806AF52
b _0806B084
_0806AF6E:
adds r4, 0x14
adds r3, 0x1
cmp r3, 0x3F
bgt _0806AF84
ldr r0, [r1]
adds r6, r0, r4
_0806AF7A:
ldrh r2, [r6]
movs r5, 0
ldrsh r0, [r6, r5]
cmp r0, 0
bne _0806AF0C
_0806AF84:
cmp r3, 0x40
bne _0806AFE6
mov r0, sp
adds r1, r7, 0
mov r2, r8
bl sub_8072AC8
mov r0, r10
adds r0, 0x20
str r0, [sp, 0x14]
mov r5, sp
mov r4, r10
movs r6, 0x3
_0806AF9E:
ldrh r1, [r5]
adds r0, r4, 0
bl sub_8092AA8
adds r5, 0x2
adds r4, 0x8
subs r6, 0x1
cmp r6, 0
bge _0806AF9E
adds r0, r7, 0
mov r1, r8
bl sub_806C444
ldr r1, [sp, 0x8]
strh r0, [r1]
movs r5, 0
_0806AFBE:
adds r0, r7, 0
mov r1, r8
adds r2, r5, 0
bl sub_806C488
ldr r2, [sp, 0xC]
adds r1, r2, r5
strb r0, [r1]
adds r0, r7, 0
mov r1, r8
adds r2, r5, 0
bl sub_806C4D4
ldr r2, [sp, 0x10]
adds r1, r2, r5
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806AFBE
b _0806B084
_0806AFE6:
strh r7, [r6]
mov r5, r8
strh r5, [r6, 0x2]
adds r4, r6, 0x4
adds r0, r4, 0
adds r1, r7, 0
mov r2, r8
bl sub_8072AC8
movs r1, 0
ldrsh r0, [r6, r1]
movs r2, 0x2
ldrsh r1, [r6, r2]
bl sub_806C444
strh r0, [r6, 0xC]
movs r5, 0
movs r0, 0xE
adds r0, r6
mov r8, r0
movs r1, 0x10
adds r1, r6
mov r9, r1
mov r2, r10
adds r2, 0x20
str r2, [sp, 0x14]
_0806B01A:
movs r1, 0
ldrsh r0, [r6, r1]
movs r2, 0x2
ldrsh r1, [r6, r2]
adds r2, r5, 0
bl sub_806C488
mov r2, r8
adds r1, r2, r5
strb r0, [r1]
movs r1, 0
ldrsh r0, [r6, r1]
movs r2, 0x2
ldrsh r1, [r6, r2]
adds r2, r5, 0
bl sub_806C4D4
mov r2, r9
adds r1, r2, r5
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806B01A
mov r5, r10
movs r7, 0x3
_0806B04C:
ldrh r1, [r4]
adds r0, r5, 0
bl sub_8092AA8
adds r4, 0x2
adds r5, 0x8
subs r7, 0x1
cmp r7, 0
bge _0806B04C
ldrh r0, [r6, 0xC]
ldr r5, [sp, 0x8]
strh r0, [r5]
movs r5, 0
mov r3, r8
mov r2, r9
_0806B06A:
ldr r0, [sp, 0xC]
adds r1, r0, r5
adds r0, r3, r5
ldrb r0, [r0]
strb r0, [r1]
ldr r0, [sp, 0x10]
adds r1, r0, r5
adds r0, r2, r5
ldrb r0, [r0]
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806B06A
_0806B084:
movs r0, 0
ldr r1, [sp, 0x14]
strb r0, [r1]
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806AED8
thumb_func_start sub_806B09C
sub_806B09C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
mov r8, r0
lsls r1, 24
lsrs r1, 24
str r1, [sp]
movs r7, 0
movs r2, 0
mov r6, r8
adds r6, 0x2
mov r9, r8
_0806B0BA:
movs r0, 0x64
muls r0, r2
ldr r1, _0806B0E4
adds r0, r1
ldr r3, _0806B0E8
ldr r1, [r3]
adds r5, r1, r0
ldrh r1, [r5]
movs r0, 0x1
ands r0, r1
adds r2, 0x1
mov r10, r2
cmp r0, 0
beq _0806B124
lsrs r0, r1, 1
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _0806B124
movs r4, 0
b _0806B0EE
.align 2, 0
_0806B0E4: .4byte 0x00008df8
_0806B0E8: .4byte gUnknown_203B45C
_0806B0EC:
adds r4, 0x1
_0806B0EE:
cmp r4, r7
bge _0806B106
lsls r0, r4, 3
add r0, r8
bl sub_808E9B8
lsls r0, 16
asrs r0, 16
movs r2, 0xE
ldrsh r1, [r5, r2]
cmp r0, r1
bne _0806B0EC
_0806B106:
cmp r4, r7
bne _0806B124
movs r3, 0xE
ldrsh r2, [r5, r3]
mov r0, r9
movs r1, 0
bl sub_808E9D8
movs r0, 0
strh r0, [r6]
strh r0, [r6, 0x2]
adds r6, 0x8
movs r0, 0x8
add r9, r0
adds r7, 0x1
_0806B124:
mov r2, r10
cmp r2, 0x3
ble _0806B0BA
mov r0, r8
adds r1, r7, 0
bl sub_803D808
adds r7, r0, 0
ldr r1, [sp]
cmp r1, 0
beq _0806B150
lsls r4, r7, 3
add r4, r8
ldr r2, _0806B164
adds r0, r4, 0
movs r1, 0x1
bl sub_808E9D8
movs r0, 0
strh r0, [r4, 0x2]
strh r0, [r4, 0x4]
adds r7, 0x1
_0806B150:
adds r0, r7, 0
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806B164: .4byte 0x000001a5
thumb_func_end sub_806B09C
thumb_func_start sub_806B168
sub_806B168:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x3C
ldr r0, _0806B324
ldr r1, [r0]
ldr r2, _0806B328
adds r0, r1, r2
movs r3, 0
ldrsh r0, [r0, r3]
ldr r4, _0806B32C
adds r1, r4
movs r2, 0
ldrsh r1, [r1, r2]
bl sub_804954C
ldrb r0, [r0, 0x9]
str r0, [sp, 0x2C]
movs r3, 0
mov r4, sp
adds r4, 0x1C
str r4, [sp, 0x30]
ldr r2, _0806B330
ldr r1, _0806B334
_0806B19C:
ldr r0, [r2]
adds r0, r1
strh r3, [r0, 0xC]
adds r1, 0x64
adds r3, 0x1
cmp r3, 0x3
ble _0806B19C
movs r4, 0
movs r3, 0
ldr r0, _0806B324
mov r8, r0
ldr r0, _0806B330
ldr r7, [r0]
movs r5, 0x1
add r6, sp, 0xC
_0806B1BA:
movs r0, 0x64
muls r0, r3
ldr r1, _0806B334
adds r0, r1
adds r2, r7, r0
ldrh r1, [r2]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _0806B1DA
lsrs r0, r1, 1
ands r0, r5
cmp r0, 0
beq _0806B1DA
stm r6!, {r2}
adds r4, 0x1
_0806B1DA:
adds r3, 0x1
cmp r3, 0x3
ble _0806B1BA
cmp r4, 0x3
bgt _0806B1F4
movs r1, 0
lsls r0, r4, 2
add r0, sp
adds r0, 0xC
_0806B1EC:
stm r0!, {r1}
adds r4, 0x1
cmp r4, 0x3
ble _0806B1EC
_0806B1F4:
movs r4, 0
movs r6, 0
add r2, sp, 0xC
ldr r5, [sp, 0x30]
movs r3, 0x3
_0806B1FE:
ldr r1, [r2]
cmp r1, 0
beq _0806B210
ldrb r0, [r1, 0x2]
cmp r0, 0
beq _0806B210
str r6, [r2]
stm r5!, {r1}
adds r4, 0x1
_0806B210:
adds r2, 0x4
subs r3, 0x1
cmp r3, 0
bge _0806B1FE
mov r2, r8
ldr r0, [r2]
ldr r3, _0806B338
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
bne _0806B24C
movs r6, 0
add r2, sp, 0xC
lsls r0, r4, 2
ldr r1, [sp, 0x30]
adds r5, r0, r1
movs r3, 0x3
_0806B232:
ldr r1, [r2]
cmp r1, 0
beq _0806B244
ldrb r0, [r1, 0x4]
cmp r0, 0x41
bne _0806B244
str r6, [r2]
stm r5!, {r1}
adds r4, 0x1
_0806B244:
adds r2, 0x4
subs r3, 0x1
cmp r3, 0
bge _0806B232
_0806B24C:
movs r5, 0
add r2, sp, 0xC
lsls r0, r4, 2
ldr r3, [sp, 0x30]
adds r0, r3
movs r3, 0x3
_0806B258:
ldr r1, [r2]
cmp r1, 0
beq _0806B264
str r5, [r2]
stm r0!, {r1}
adds r4, 0x1
_0806B264:
adds r2, 0x4
subs r3, 0x1
cmp r3, 0
bge _0806B258
cmp r4, 0x3
bgt _0806B280
movs r1, 0
lsls r0, r4, 2
ldr r2, [sp, 0x30]
adds r0, r2
_0806B278:
stm r0!, {r1}
adds r4, 0x1
cmp r4, 0x3
ble _0806B278
_0806B280:
movs r3, 0
_0806B282:
lsls r0, r3, 2
ldr r4, [sp, 0x30]
adds r0, r4, r0
ldr r0, [r0]
mov r8, r0
adds r0, r3, 0x1
str r0, [sp, 0x34]
mov r1, r8
cmp r1, 0
bne _0806B298
b _0806B3E8
_0806B298:
movs r2, 0xE
ldrsh r1, [r1, r2]
ldr r0, _0806B33C
cmp r1, r0
beq _0806B2AE
adds r0, 0x2
cmp r1, r0
beq _0806B2AE
subs r0, 0x1
cmp r1, r0
bne _0806B2B6
_0806B2AE:
movs r0, 0xBC
lsls r0, 1
mov r4, r8
strh r0, [r4, 0xE]
_0806B2B6:
ldr r0, _0806B340
ldr r2, [r0]
movs r1, 0
ldrsh r0, [r0, r1]
adds r3, 0x1
str r3, [sp, 0x34]
ldr r3, _0806B340
cmp r0, 0x63
beq _0806B350
ldr r4, _0806B324
mov r9, r4
ldr r0, _0806B328
mov r10, r0
adds r5, r3, 0
_0806B2D2:
lsls r0, r2, 16
asrs r7, r0, 16
mov r4, r9
ldr r1, [r4]
mov r4, r10
adds r0, r1, r4
movs r4, 0
ldrsh r0, [r0, r4]
adds r0, r7, r0
asrs r6, r2, 16
ldr r2, _0806B32C
adds r1, r2
movs r4, 0
ldrsh r1, [r1, r4]
adds r1, r6, r1
str r3, [sp, 0x38]
bl sub_804954C
adds r1, r0, 0
ldrb r0, [r1, 0x9]
ldr r3, [sp, 0x38]
ldr r2, [sp, 0x2C]
cmp r0, r2
bne _0806B344
mov r4, r8
movs r2, 0xE
ldrsh r0, [r4, r2]
bl sub_807034C
lsls r0, 24
lsrs r4, r0, 24
ldr r3, [sp, 0x38]
cmp r4, 0
bne _0806B344
mov r3, r8
movs r1, 0xE
ldrsh r0, [r3, r1]
mov r3, r9
ldr r2, [r3]
mov r3, r10
b _0806B3A8
.align 2, 0
_0806B324: .4byte gUnknown_203B418
_0806B328: .4byte 0x0000e218
_0806B32C: .4byte 0x0000e21a
_0806B330: .4byte gUnknown_203B45C
_0806B334: .4byte 0x00008df8
_0806B338: .4byte 0x0000065c
_0806B33C: .4byte 0x00000179
_0806B340: .4byte gUnknown_80F4598
_0806B344:
adds r5, 0x4
ldr r2, [r5]
movs r4, 0
ldrsh r0, [r5, r4]
cmp r0, 0x63
bne _0806B2D2
_0806B350:
movs r0, 0
cmp r0, 0
bne _0806B3E8
ldr r2, [r3]
movs r1, 0
ldrsh r0, [r3, r1]
cmp r0, 0x63
beq _0806B3E8
ldr r3, _0806B3CC
mov r9, r3
ldr r5, _0806B3D0
_0806B366:
lsls r0, r2, 16
asrs r7, r0, 16
mov r4, r9
ldr r1, [r4]
ldr r3, _0806B3D4
adds r0, r1, r3
movs r4, 0
ldrsh r0, [r0, r4]
adds r0, r7, r0
asrs r6, r2, 16
ldr r2, _0806B3D8
adds r1, r2
movs r3, 0
ldrsh r1, [r1, r3]
adds r1, r6, r1
bl sub_804954C
adds r1, r0, 0
mov r4, r8
movs r2, 0xE
ldrsh r0, [r4, r2]
bl sub_807034C
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _0806B3DC
mov r3, r8
movs r1, 0xE
ldrsh r0, [r3, r1]
mov r3, r9
ldr r2, [r3]
ldr r3, _0806B3D4
_0806B3A8:
adds r1, r2, r3
movs r3, 0
ldrsh r1, [r1, r3]
adds r1, r7, r1
ldr r3, _0806B3D8
adds r2, r3
movs r3, 0
ldrsh r2, [r2, r3]
adds r2, r6, r2
str r4, [sp]
movs r3, 0x1
str r3, [sp, 0x4]
str r4, [sp, 0x8]
mov r3, r8
bl sub_806B8CC
b _0806B3E8
.align 2, 0
_0806B3CC: .4byte gUnknown_203B418
_0806B3D0: .4byte gUnknown_80F4598
_0806B3D4: .4byte 0x0000e218
_0806B3D8: .4byte 0x0000e21a
_0806B3DC:
adds r5, 0x4
ldr r2, [r5]
movs r4, 0
ldrsh r0, [r5, r4]
cmp r0, 0x63
bne _0806B366
_0806B3E8:
ldr r3, [sp, 0x34]
cmp r3, 0x3
bgt _0806B3F0
b _0806B282
_0806B3F0:
bl sub_806B678
add sp, 0x3C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806B168
thumb_func_start sub_806B404
sub_806B404:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
movs r5, 0
movs r2, 0
ldr r0, _0806B480
mov r9, r0
ldr r0, _0806B484
ldr r7, [r0]
movs r6, 0x1
ldr r1, _0806B488
mov r8, r1
_0806B422:
movs r0, 0x64
muls r0, r2
ldr r3, _0806B48C
adds r0, r3
adds r3, r7, r0
ldrh r1, [r3]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0806B446
lsrs r0, r1, 1
ands r0, r6
cmp r0, 0
beq _0806B446
movs r1, 0xA
ldrsh r0, [r3, r1]
cmp r0, r8
beq _0806B490
_0806B446:
adds r2, 0x1
cmp r2, 0x3
ble _0806B422
_0806B44C:
cmp r5, 0x3
bgt _0806B460
movs r1, 0
lsls r0, r5, 2
add r0, sp
adds r0, 0xC
_0806B458:
stm r0!, {r1}
adds r5, 0x1
cmp r5, 0x3
ble _0806B458
_0806B460:
movs r0, 0
mov r2, r9
str r0, [r2]
bl sub_8083600
adds r5, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806B49C
ldrh r0, [r5, 0x6]
lsls r0, 16
ldrh r4, [r5, 0x4]
b _0806B4AE
.align 2, 0
_0806B480: .4byte gUnknown_203B450
_0806B484: .4byte gUnknown_203B45C
_0806B488: .4byte 0x000055aa
_0806B48C: .4byte 0x00008df8
_0806B490:
lsls r0, r5, 2
add r0, sp
adds r0, 0xC
str r3, [r0]
adds r5, 0x1
b _0806B44C
_0806B49C:
ldr r0, _0806B560
ldr r0, [r0]
ldr r3, _0806B564
adds r1, r0, r3
ldr r2, _0806B568
adds r0, r2
ldrh r0, [r0]
lsls r0, 16
ldrh r4, [r1]
_0806B4AE:
orrs r4, r0
lsls r5, r4, 16
asrs r0, r5, 16
asrs r4, 16
adds r1, r4, 0
bl sub_804954C
ldrb r0, [r0, 0x9]
str r0, [sp, 0x20]
movs r2, 0
str r5, [sp, 0x24]
mov r10, r4
_0806B4C6:
lsls r0, r2, 2
add r0, sp
adds r0, 0xC
ldr r6, [r0]
adds r2, 0x1
str r2, [sp, 0x28]
cmp r6, 0
bne _0806B4D8
b _0806B65E
_0806B4D8:
ldrh r1, [r6]
movs r2, 0x1
adds r0, r2, 0
ands r0, r1
cmp r0, 0
bne _0806B4E6
b _0806B65E
_0806B4E6:
lsrs r0, r1, 1
ands r0, r2
cmp r0, 0
bne _0806B4F0
b _0806B65E
_0806B4F0:
movs r3, 0xA
ldrsh r1, [r6, r3]
ldr r0, _0806B56C
cmp r1, r0
beq _0806B4FC
b _0806B65E
_0806B4FC:
ldr r0, _0806B570
strh r0, [r6, 0xA]
movs r7, 0
ldr r2, _0806B574
ldr r0, [r2]
str r0, [sp, 0x1C]
add r0, sp, 0x1C
movs r3, 0
ldrsh r1, [r0, r3]
mov r9, r2
adds r2, r0, 0
cmp r1, 0x63
beq _0806B58C
ldr r0, [sp, 0x24]
asrs r0, 16
mov r8, r0
_0806B51C:
movs r1, 0
ldrsh r0, [r2, r1]
add r0, r8
ldr r1, [sp, 0x1C]
asrs r1, 16
mov r5, r10
adds r1, r5
str r2, [sp, 0x2C]
bl sub_804954C
adds r1, r0, 0
ldrb r0, [r1, 0x9]
ldr r2, [sp, 0x2C]
ldr r3, [sp, 0x20]
cmp r0, r3
bne _0806B578
movs r3, 0xE
ldrsh r0, [r6, r3]
bl sub_807034C
lsls r0, 24
lsrs r4, r0, 24
ldr r2, [sp, 0x2C]
cmp r4, 0
bne _0806B578
movs r1, 0xE
ldrsh r0, [r6, r1]
movs r3, 0
ldrsh r1, [r2, r3]
add r1, r8
ldr r2, [sp, 0x1C]
asrs r2, 16
adds r2, r5
b _0806B642
.align 2, 0
_0806B560: .4byte gUnknown_203B418
_0806B564: .4byte 0x0000e218
_0806B568: .4byte 0x0000e21a
_0806B56C: .4byte 0x000055aa
_0806B570: .4byte 0x00005aa5
_0806B574: .4byte gUnknown_80F4598
_0806B578:
adds r7, 0x1
ldr r1, _0806B5E4
lsls r0, r7, 2
adds r0, r1
ldr r0, [r0]
str r0, [sp, 0x1C]
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0x63
bne _0806B51C
_0806B58C:
movs r3, 0
cmp r3, 0
bne _0806B65E
movs r7, 0
mov r1, r9
ldr r0, [r1]
str r0, [sp, 0x1C]
movs r3, 0
ldrsh r0, [r2, r3]
cmp r0, 0x63
beq _0806B5FC
ldr r0, [sp, 0x24]
asrs r0, 16
mov r8, r0
_0806B5A8:
movs r1, 0
ldrsh r0, [r2, r1]
add r0, r8
ldr r1, [sp, 0x1C]
asrs r1, 16
mov r5, r10
adds r1, r5
str r2, [sp, 0x2C]
bl sub_804954C
adds r1, r0, 0
movs r3, 0xE
ldrsh r0, [r6, r3]
bl sub_807034C
lsls r0, 24
lsrs r4, r0, 24
ldr r2, [sp, 0x2C]
cmp r4, 0
bne _0806B5E8
movs r1, 0xE
ldrsh r0, [r6, r1]
movs r3, 0
ldrsh r1, [r2, r3]
add r1, r8
ldr r2, [sp, 0x1C]
asrs r2, 16
adds r2, r5
b _0806B642
.align 2, 0
_0806B5E4: .4byte gUnknown_80F4598
_0806B5E8:
adds r7, 0x1
ldr r1, _0806B654
lsls r0, r7, 2
adds r0, r1
ldr r0, [r0]
str r0, [sp, 0x1C]
movs r1, 0
ldrsh r0, [r2, r1]
cmp r0, 0x63
bne _0806B5A8
_0806B5FC:
movs r3, 0
cmp r3, 0
bne _0806B65E
movs r7, 0
adds r5, r2, 0
_0806B606:
adds r0, r5, 0
str r2, [sp, 0x2C]
bl sub_8083660
lsls r0, 24
ldr r2, [sp, 0x2C]
cmp r0, 0
beq _0806B658
movs r1, 0
ldrsh r0, [r2, r1]
movs r3, 0x2
ldrsh r1, [r5, r3]
bl sub_804954C
adds r1, r0, 0
movs r3, 0xE
ldrsh r0, [r6, r3]
bl sub_807034C
lsls r0, 24
lsrs r4, r0, 24
ldr r2, [sp, 0x2C]
cmp r4, 0
bne _0806B658
movs r1, 0xE
ldrsh r0, [r6, r1]
movs r3, 0
ldrsh r1, [r2, r3]
movs r3, 0x2
ldrsh r2, [r5, r3]
_0806B642:
str r4, [sp]
movs r3, 0x1
str r3, [sp, 0x4]
str r4, [sp, 0x8]
adds r3, r6, 0
bl sub_806B8CC
b _0806B65E
.align 2, 0
_0806B654: .4byte gUnknown_80F4598
_0806B658:
adds r7, 0x1
cmp r7, 0x63
ble _0806B606
_0806B65E:
ldr r2, [sp, 0x28]
cmp r2, 0x3
bgt _0806B666
b _0806B4C6
_0806B666:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806B404
thumb_func_start sub_806B678
sub_806B678:
push {r4,r5,lr}
movs r5, 0
_0806B67C:
ldr r0, _0806B6AC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806B6B0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806B6B8
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0806B6B8
adds r0, r4, 0
bl sub_803F4A0
ldr r1, _0806B6B4
ldr r0, [r4, 0x4]
str r0, [r1]
b _0806B6BE
.align 2, 0
_0806B6AC: .4byte gUnknown_203B418
_0806B6B0: .4byte 0x0001357c
_0806B6B4: .4byte gUnknown_202EE0C
_0806B6B8:
adds r5, 0x1
cmp r5, 0x3
ble _0806B67C
_0806B6BE:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_806B678
thumb_func_start sub_806B6C4
sub_806B6C4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
ldr r4, _0806B708
ldr r0, [r4]
movs r1, 0xD1
lsls r1, 3
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
negs r0, r1
orrs r0, r1
lsrs r0, 31
mov r8, r0
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0806B710
movs r0, 0x97
bl sub_808E734
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0806B710
ldr r0, [r4]
ldr r2, _0806B70C
adds r0, r2
b _0806B71A
.align 2, 0
_0806B708: .4byte gUnknown_203B418
_0806B70C: .4byte 0x000037ff
_0806B710:
ldr r0, _0806B77C
ldr r0, [r0]
ldr r1, _0806B780
adds r0, r1
movs r1, 0x1
_0806B71A:
strb r1, [r0]
movs r0, 0x38
bl sub_8084100
adds r5, r0, 0
movs r0, 0x20
bl sub_8084100
adds r7, r0, 0
movs r0, 0
_0806B72E:
adds r7, 0x1
cmp r7, 0x20
bne _0806B736
movs r7, 0
_0806B736:
adds r0, 0x1
mov r10, r0
mov r4, sp
movs r2, 0x37
mov r9, r2
_0806B740:
adds r5, 0x1
cmp r5, 0x38
bne _0806B748
movs r5, 0
_0806B748:
adds r0, r5, 0
adds r1, r7, 0
bl sub_804954C
ldrh r1, [r0, 0x4]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0806B7C2
movs r6, 0
mov r0, r8
cmp r0, 0
beq _0806B784
ldr r0, _0806B77C
ldr r0, [r0]
movs r1, 0xD1
lsls r1, 3
adds r0, r1
ldrh r0, [r0]
strh r0, [r4]
movs r1, 0x1
movs r0, 0x1
strh r0, [r4, 0x8]
strb r1, [r4, 0x2]
movs r6, 0x1
b _0806B794
.align 2, 0
_0806B77C: .4byte gUnknown_203B418
_0806B780: .4byte 0x000037ff
_0806B784:
movs r0, 0
bl sub_803D970
movs r1, 0
strh r0, [r4]
mov r2, r8
strh r2, [r4, 0x8]
strb r1, [r4, 0x2]
_0806B794:
movs r0, 0
str r0, [sp, 0x4]
strb r0, [r4, 0x10]
strh r5, [r4, 0xC]
strh r7, [r4, 0xE]
cmp r6, 0
bne _0806B7B2
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0x1
bl sub_806AA0C
lsls r0, 24
cmp r0, 0
beq _0806B7C2
_0806B7B2:
mov r0, sp
movs r1, 0
bl sub_806B7F8
cmp r0, 0
beq _0806B7C2
movs r2, 0
mov r8, r2
_0806B7C2:
movs r0, 0x1
negs r0, r0
add r9, r0
mov r1, r9
cmp r1, 0
bge _0806B740
mov r0, r10
cmp r0, 0x1F
ble _0806B72E
mov r2, r8
cmp r2, 0
beq _0806B7E2
ldr r0, _0806B7F4
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xA]
_0806B7E2:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806B7F4: .4byte gUnknown_203B418
thumb_func_end sub_806B6C4
thumb_func_start sub_806B7F8
sub_806B7F8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x8
adds r6, r0, 0
lsls r1, 24
lsrs r1, 24
mov r8, r1
movs r1, 0xC
ldrsh r0, [r6, r1]
movs r2, 0xE
ldrsh r1, [r6, r2]
bl sub_804954C
adds r1, r0, 0
movs r3, 0
ldrsh r0, [r6, r3]
bl sub_807034C
lsls r0, 24
cmp r0, 0
bne _0806B834
movs r4, 0
ldrsh r0, [r6, r4]
bl sub_804550C
adds r7, r0, 0
cmp r7, 0
bne _0806B838
_0806B834:
movs r0, 0
b _0806B8B8
_0806B838:
ldr r3, _0806B8C8
movs r0, 0
adds r1, r7, 0
adds r2, r6, 0
bl sub_806BC68
ldr r5, [r7, 0x70]
movs r0, 0x1
strb r0, [r5, 0x6]
movs r1, 0x8C
lsls r1, 1
adds r0, r5, r1
adds r1, r5, 0
adds r1, 0x10
adds r2, r5, 0
adds r2, 0x14
movs r3, 0x16
adds r3, r5
mov r9, r3
movs r3, 0x2
ldrsh r4, [r5, r3]
str r4, [sp]
ldrb r4, [r5, 0x9]
str r4, [sp, 0x4]
mov r3, r9
bl sub_806AED8
ldrh r0, [r5, 0x10]
strh r0, [r5, 0xE]
movs r4, 0x8A
lsls r4, 1
adds r1, r5, r4
ldr r0, [r6, 0x4]
str r0, [r1]
ldrb r0, [r6, 0x2]
cmp r0, 0
bne _0806B8B6
mov r0, r8
cmp r0, 0
bne _0806B8B6
ldrb r0, [r6, 0x10]
cmp r0, 0
bne _0806B8B6
movs r0, 0x64
bl sub_8084100
adds r4, r0, 0
movs r1, 0
ldrsh r0, [r6, r1]
bl GetUnk1D
lsls r0, 24
lsrs r0, 24
cmp r0, r4
ble _0806B8B6
adds r0, r7, 0
movs r1, 0x7F
bl sub_8075BF4
adds r0, r7, 0
movs r1, 0x8
bl sub_806CE68
_0806B8B6:
adds r0, r7, 0
_0806B8B8:
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806B8C8: .4byte gUnknown_202EE0C
thumb_func_end sub_806B7F8
thumb_func_start sub_806B8CC
sub_806B8CC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x2C
mov r9, r1
mov r10, r2
adds r5, r3, 0
ldr r1, [sp, 0x50]
ldr r2, [sp, 0x54]
lsls r0, 16
asrs r4, r0, 16
lsls r1, 24
lsrs r6, r1, 24
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x18]
ldrb r1, [r5, 0x2]
negs r0, r1
orrs r0, r1
lsrs r0, 31
mov r8, r0
ldr r0, [sp, 0x4C]
cmp r0, 0
beq _0806B906
movs r0, 0
ldr r1, [sp, 0x4C]
str r0, [r1]
_0806B906:
adds r0, r4, 0
bl sub_808E770
lsls r0, 16
asrs r1, r0, 16
movs r0, 0xCF
lsls r0, 1
cmp r1, r0
bne _0806B932
cmp r6, 0
beq _0806B930
ldr r0, _0806B92C
ldr r0, [r0]
movs r2, 0xE0
lsls r2, 6
adds r0, r2
movs r3, 0
ldrsh r4, [r0, r3]
b _0806B932
.align 2, 0
_0806B92C: .4byte gUnknown_203B418
_0806B930:
adds r4, r1, 0
_0806B932:
mov r0, r9
mov r1, r10
bl sub_804954C
adds r1, r0, 0
adds r0, r4, 0
bl sub_807034C
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
bne _0806B956
adds r0, r4, 0
bl sub_80453AC
str r0, [sp, 0x1C]
cmp r0, 0
bne _0806B95A
_0806B956:
movs r0, 0
b _0806BB3C
_0806B95A:
mov r0, sp
movs r7, 0
mov r1, r9
strh r1, [r0, 0xC]
mov r2, r10
strh r2, [r0, 0xE]
strh r4, [r0]
mov r1, sp
ldrb r0, [r5, 0x3]
strh r0, [r1, 0x8]
mov r0, sp
strb r7, [r0, 0x2]
str r6, [sp, 0x4]
strb r7, [r0, 0x10]
ldr r4, _0806BB4C
ldr r3, _0806BB50
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0]
add r0, r9
lsls r0, 16
lsrs r0, 16
ldr r2, _0806BB54
ldr r1, [sp, 0x14]
ands r1, r2
orrs r1, r0
str r1, [sp, 0x14]
ldrb r0, [r3]
lsls r0, 2
adds r0, r4
ldrh r0, [r0, 0x2]
add r0, r10
lsls r0, 16
ldr r2, _0806BB58
ands r1, r2
orrs r1, r0
str r1, [sp, 0x14]
ldr r3, _0806BB5C
mov r0, r8
cmp r0, 0
beq _0806B9B0
add r3, sp, 0x14
_0806B9B0:
movs r0, 0x1
ldr r1, [sp, 0x1C]
mov r2, sp
bl sub_806BC68
ldr r1, [sp, 0x1C]
ldr r4, [r1, 0x70]
strb r7, [r4, 0x6]
strb r7, [r4, 0x8]
mov r2, r8
strb r2, [r4, 0x7]
adds r0, r4, 0
adds r0, 0xF9
mov r3, sp
ldrb r3, [r3, 0x18]
strb r3, [r0]
ldr r0, _0806BB60
str r6, [r0]
mov r6, r8
cmp r6, 0
beq _0806B9E4
ldr r0, _0806BB5C
mov r7, r9
strh r7, [r0]
mov r1, r10
strh r1, [r0, 0x2]
_0806B9E4:
ldrh r0, [r5, 0x10]
strh r0, [r4, 0xE]
ldrh r0, [r5, 0x12]
strh r0, [r4, 0x10]
ldr r0, [r5, 0x18]
str r0, [r4, 0x18]
movs r3, 0
movs r2, 0x1C
adds r2, r5
mov r8, r2
movs r6, 0x50
adds r6, r5
mov r10, r6
movs r7, 0x94
adds r7, r4
mov r9, r7
adds r0, r4, 0
adds r0, 0x8C
str r0, [sp, 0x20]
adds r1, r4, 0
adds r1, 0xF3
str r1, [sp, 0x24]
adds r2, r4, 0
adds r2, 0x64
str r2, [sp, 0x28]
movs r6, 0x14
adds r6, r4
mov r12, r6
adds r7, r5, 0
adds r7, 0x14
adds r6, r4, 0
adds r6, 0x16
adds r2, r5, 0
adds r2, 0x16
_0806BA28:
mov r0, r12
adds r1, r0, r3
adds r0, r7, r3
ldrb r0, [r0]
strb r0, [r1]
adds r1, r6, r3
adds r0, r2, r3
ldrb r0, [r0]
strb r0, [r1]
adds r3, 0x1
cmp r3, 0x1
ble _0806BA28
movs r1, 0x8C
lsls r1, 1
adds r2, r4, r1
adds r1, r2, 0
mov r0, r8
ldm r0!, {r3,r6,r7}
stm r1!, {r3,r6,r7}
ldm r0!, {r3,r6,r7}
stm r1!, {r3,r6,r7}
ldm r0!, {r3,r6,r7}
stm r1!, {r3,r6,r7}
movs r0, 0x1
mov r8, r0
movs r7, 0xEF
movs r6, 0xDF
movs r3, 0x3
_0806BA60:
ldrb r1, [r2]
mov r0, r8
ands r0, r1
cmp r0, 0
beq _0806BA72
adds r0, r7, 0
ands r0, r1
ands r0, r6
strb r0, [r2]
_0806BA72:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _0806BA60
movs r1, 0x9C
lsls r1, 1
adds r2, r4, r1
ldrb r1, [r2]
movs r0, 0xEF
ands r0, r1
movs r1, 0xDF
ands r0, r1
strb r0, [r2]
ldrb r0, [r5, 0x3]
strb r0, [r4, 0x9]
ldrh r0, [r5, 0x8]
movs r2, 0
strh r0, [r4, 0xC]
mov r3, r10
ldrb r0, [r3]
mov r6, r9
strb r0, [r6]
ldr r0, [r5, 0x4C]
ldr r7, [sp, 0x20]
str r0, [r7]
ldr r0, [r5, 0x54]
str r0, [r4, 0x3C]
ldr r0, [r5, 0x4]
str r0, [r4, 0x40]
movs r0, 0x9E
lsls r0, 1
adds r1, r4, r0
ldr r0, [r5, 0x44]
str r0, [r1]
movs r3, 0xA0
lsls r3, 1
adds r1, r4, r3
ldr r0, [r5, 0x48]
str r0, [r1]
ldrh r0, [r5, 0xC]
strb r0, [r4, 0xA]
ldr r0, [r5, 0x40]
str r0, [r4, 0x60]
ldr r0, [sp, 0x24]
strb r2, [r0]
ldr r6, [sp, 0x28]
strb r2, [r6]
ldr r7, _0806BB64
ldr r0, [r7]
ldr r1, _0806BB68
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0806BB24
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _0806BB24
adds r0, r4, 0
adds r0, 0x5E
ldrb r0, [r0]
cmp r0, 0x47
beq _0806BAFC
adds r0, r4, 0
adds r0, 0x5F
ldrb r0, [r0]
cmp r0, 0x47
bne _0806BB24
_0806BAFC:
adds r4, 0x60
ldrb r1, [r4]
movs r5, 0x1
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0806BB24
movs r0, 0
bl sub_803D73C
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0x69
beq _0806BB24
adds r0, r4, 0
movs r2, 0
bl sub_8090A8C
ldr r2, [sp, 0x24]
strb r5, [r2]
_0806BB24:
ldr r0, [sp, 0x1C]
bl sub_806A6E8
ldr r0, [sp, 0x1C]
bl sub_807191C
ldr r3, [sp, 0x4C]
cmp r3, 0
beq _0806BB3A
ldr r6, [sp, 0x1C]
str r6, [r3]
_0806BB3A:
movs r0, 0x1
_0806BB3C:
add sp, 0x2C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806BB4C: .4byte gUnknown_80F4448
_0806BB50: .4byte gUnknown_202F32C
_0806BB54: .4byte 0xffff0000
_0806BB58: .4byte 0x0000ffff
_0806BB5C: .4byte gUnknown_202EE0C
_0806BB60: .4byte gUnknown_203B450
_0806BB64: .4byte gUnknown_203B418
_0806BB68: .4byte 0x00000644
thumb_func_end sub_806B8CC
thumb_func_start sub_806BB6C
sub_806BB6C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
adds r7, r0, 0
lsls r4, r1, 16
asrs r4, 16
ldr r0, [r7, 0x70]
mov r9, r0
mov r8, r9
adds r0, 0x98
ldr r0, [r0]
bl sub_800F934
add r0, sp, 0x8
movs r1, 0
mov r10, r1
movs r6, 0
lsls r5, r4, 16
lsrs r5, 16
strh r5, [r0]
strh r6, [r0, 0x8]
mov r2, r10
strb r2, [r0, 0x2]
ldr r0, [r7, 0x4]
str r0, [sp, 0x14]
str r6, [sp, 0xC]
movs r0, 0
adds r1, r4, 0
bl sub_8069F54
lsls r0, 16
adds r1, r7, 0
adds r1, 0x22
mov r2, r10
strb r2, [r1]
ldr r1, [r7, 0x70]
asrs r2, r0, 16
lsrs r0, 16
strh r0, [r1, 0x4]
ldr r0, [r7, 0x70]
strh r5, [r0, 0x2]
adds r0, r2, 0
bl sub_80687D0
str r0, [r7, 0x64]
adds r1, r7, 0
adds r1, 0x6A
movs r0, 0x7
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x6C
mov r5, r10
strb r5, [r0]
adds r1, 0x1
movs r0, 0xFF
strb r0, [r1]
adds r1, 0x2
movs r0, 0x1
strb r0, [r1]
adds r1, 0x2
strb r0, [r1]
str r6, [r7, 0x1C]
mov r0, r9
adds r0, 0xB0
ldrb r0, [r0]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0806BC08
mov r0, r9
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_0806BC08:
movs r1, 0
mov r6, r9
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _0806BC14
movs r1, 0x1
_0806BC14:
adds r0, r1, 0
adds r1, r7, 0
add r2, sp, 0x8
movs r3, 0
bl sub_806BC68
movs r0, 0x8C
lsls r0, 1
add r0, r8
mov r1, r8
adds r1, 0x10
mov r2, r8
adds r2, 0x14
mov r3, r8
adds r3, 0x16
mov r5, r8
movs r6, 0x2
ldrsh r4, [r5, r6]
str r4, [sp]
ldrb r4, [r5, 0x9]
str r4, [sp, 0x4]
bl sub_806AED8
ldrh r0, [r5, 0x10]
strh r0, [r5, 0xE]
mov r0, r10
strb r0, [r5, 0x8]
adds r0, r7, 0
bl sub_80429E8
adds r0, r7, 0
bl sub_80418D4
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806BB6C
thumb_func_start sub_806BC68
sub_806BC68:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
adds r4, r0, 0
mov r8, r1
adds r7, r2, 0
mov r10, r3
lsls r4, 24
lsrs r4, 24
ldr r1, _0806BD0C
ldr r0, [r1]
movs r5, 0
movs r2, 0x1
mov r9, r2
mov r3, r9
strb r3, [r0, 0xC]
mov r0, r8
ldr r6, [r0, 0x70]
adds r0, r6, 0
movs r1, 0x1
bl sub_806BFC0
ldrb r1, [r7, 0x2]
adds r0, r6, 0
adds r0, 0xA4
strb r1, [r0]
mov r0, r8
adds r0, 0x20
mov r1, r9
strb r1, [r0]
adds r0, 0x2
strb r5, [r0]
ldr r0, _0806BD10
mov r2, r8
strh r0, [r2, 0x8]
movs r0, 0x1
negs r0, r0
strh r0, [r2, 0xA]
ldr r0, _0806BD14
strh r0, [r2, 0x4]
strh r0, [r2, 0x6]
movs r3, 0xC
ldrsh r1, [r7, r3]
movs r0, 0xE
ldrsh r2, [r7, r0]
mov r0, r8
movs r3, 0x1
bl sub_80694C0
mov r0, r8
movs r1, 0
bl sub_804535C
cmp r4, 0
bne _0806BD5E
movs r2, 0
ldrsh r1, [r7, r2]
movs r0, 0xBE
lsls r0, 1
cmp r1, r0
bne _0806BD20
ldr r3, _0806BD0C
ldr r1, [r3]
ldr r4, _0806BD18
adds r0, r1, r4
ldrb r0, [r0]
cmp r0, 0
bne _0806BD20
ldr r2, _0806BD1C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0806BD20
ldrb r0, [r7, 0x2]
cmp r0, 0
bne _0806BD20
mov r3, r9
strb r3, [r6, 0x8]
b _0806BD24
.align 2, 0
_0806BD0C: .4byte gUnknown_203B418
_0806BD10: .4byte 0x0000ffff
_0806BD14: .4byte 0x0000fffe
_0806BD18: .4byte 0x0000066e
_0806BD1C: .4byte 0x00003a0a
_0806BD20:
movs r0, 0
strb r0, [r6, 0x8]
_0806BD24:
movs r4, 0x2
ldrsh r0, [r6, r4]
bl sub_808E770
lsls r0, 16
movs r1, 0xCF
lsls r1, 17
cmp r0, r1
bne _0806BD42
ldr r0, _0806BD94
ldr r0, [r0]
ldr r1, _0806BD98
adds r0, r1
movs r1, 0x1
strb r1, [r0]
_0806BD42:
movs r2, 0x2
ldrsh r0, [r6, r2]
bl sub_808E770
lsls r0, 16
asrs r0, 16
cmp r0, 0x97
bne _0806BD5E
ldr r0, _0806BD94
ldr r0, [r0]
ldr r3, _0806BD9C
adds r0, r3
movs r1, 0x1
strb r1, [r0]
_0806BD5E:
adds r2, r6, 0
adds r2, 0x98
ldr r0, _0806BD94
ldr r1, [r0]
ldr r4, _0806BDA0
adds r1, r4
ldr r0, [r1]
str r0, [r2]
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
adds r1, r6, 0
adds r1, 0x9C
movs r0, 0
str r0, [r1]
ldrh r1, [r7, 0x8]
movs r3, 0x8
ldrsh r0, [r7, r3]
mov r9, r2
cmp r0, 0
bne _0806BDA4
movs r4, 0
ldrsh r0, [r7, r4]
bl sub_803DA20
strb r0, [r6, 0x9]
b _0806BDA6
.align 2, 0
_0806BD94: .4byte gUnknown_203B418
_0806BD98: .4byte 0x000037fd
_0806BD9C: .4byte 0x000037ff
_0806BDA0: .4byte 0x000037f0
_0806BDA4:
strb r1, [r6, 0x9]
_0806BDA6:
movs r0, 0x8A
lsls r0, 1
adds r1, r6, r0
ldr r0, [r7, 0x4]
str r0, [r1]
movs r4, 0x1
strh r4, [r6, 0xC]
adds r0, r6, 0
adds r0, 0x8C
movs r1, 0
bl sub_808EC94
adds r0, r6, 0
adds r0, 0x3C
bl sub_808E6F4
strh r4, [r6, 0x10]
strh r4, [r6, 0xE]
mov r0, sp
movs r1, 0x64
bl sub_80943A0
movs r2, 0x9E
lsls r2, 1
adds r1, r6, r2
ldr r0, [sp]
str r0, [r1]
add r0, sp, 0x4
movs r1, 0x64
bl sub_80943A0
movs r3, 0xA0
lsls r3, 1
adds r1, r6, r3
ldr r0, [sp, 0x4]
str r0, [r1]
mov r4, r10
cmp r4, 0
beq _0806BE00
movs r0, 0xB6
lsls r0, 1
adds r1, r6, r0
ldr r0, [r4]
str r0, [r1]
b _0806BE12
_0806BE00:
movs r1, 0xB6
lsls r1, 1
adds r0, r6, r1
mov r2, r10
strh r2, [r0]
movs r3, 0xB7
lsls r3, 1
adds r0, r6, r3
strh r2, [r0]
_0806BE12:
movs r7, 0
movs r4, 0
strh r4, [r6]
movs r1, 0xA2
lsls r1, 1
adds r0, r6, r1
strb r7, [r0]
ldr r2, _0806BFB4
adds r0, r6, r2
strb r7, [r0]
movs r3, 0xFA
lsls r3, 1
adds r0, r6, r3
strh r4, [r0]
adds r1, 0xB2
adds r0, r6, r1
strh r4, [r0]
adds r0, r6, 0
adds r0, 0x78
strb r7, [r0]
adds r1, r6, 0
adds r1, 0x88
mov r2, r8
ldr r0, [r2, 0x4]
str r0, [r1]
adds r0, r6, 0
adds r0, 0x80
str r4, [r0]
adds r0, 0x4
str r4, [r0]
subs r0, 0x8
strh r4, [r0]
adds r0, 0x83
strb r7, [r0]
subs r3, 0x80
adds r0, r6, r3
str r4, [r0]
movs r1, 0x80
lsls r1, 1
adds r0, r6, r1
strb r7, [r0]
adds r0, r6, 0
movs r1, 0x1
bl sub_806BFC0
adds r0, r6, 0
adds r0, 0x60
strb r7, [r0, 0x2]
strb r7, [r0, 0x1]
strb r7, [r0]
adds r0, 0x4
strb r7, [r0]
movs r2, 0x80
lsls r2, 2
adds r0, r6, r2
str r4, [r0]
movs r3, 0xB2
lsls r3, 1
adds r1, r6, r3
movs r0, 0xFF
strb r0, [r1]
adds r0, 0x66
adds r1, r6, r0
movs r0, 0x1
negs r0, r0
strb r0, [r1]
movs r1, 0xFE
lsls r1, 1
adds r0, r6, r1
str r4, [r0]
subs r2, 0xB9
adds r0, r6, r2
strb r7, [r0]
subs r3, 0x1E
adds r0, r6, r3
strb r7, [r0]
subs r1, 0x96
adds r0, r6, r1
strb r7, [r0]
adds r2, 0xB1
adds r0, r6, r2
strh r4, [r0]
adds r3, 0xB4
adds r0, r6, r3
strh r4, [r0]
subs r1, 0x1E
adds r0, r6, r1
strb r7, [r0]
subs r2, 0xAF
adds r0, r6, r2
strb r7, [r0]
subs r3, 0x82
adds r0, r6, r3
strh r4, [r0]
adds r0, r6, 0
adds r0, 0xFA
strb r7, [r0]
adds r0, 0x2
strb r7, [r0]
adds r1, 0x3
adds r0, r6, r1
strb r7, [r0]
adds r2, 0x3
adds r0, r6, r2
movs r5, 0x1
strb r5, [r0]
subs r3, 0x2A
adds r0, r6, r3
strh r4, [r0]
adds r1, 0x5
adds r0, r6, r1
strh r4, [r0]
adds r2, 0x6
adds r0, r6, r2
strb r7, [r0]
adds r3, 0x5
adds r0, r6, r3
strb r7, [r0]
movs r4, 0xAA
lsls r4, 1
adds r0, r6, r4
strb r7, [r0]
adds r1, 0x5
adds r0, r6, r1
strb r7, [r0]
adds r2, 0x17
adds r0, r6, r2
strb r7, [r0]
adds r0, r6, 0
adds r0, 0xFD
strb r7, [r0]
adds r1, r6, 0
adds r1, 0xFE
movs r0, 0x63
strb r0, [r1]
adds r3, 0x5
adds r0, r6, r3
strb r7, [r0]
adds r4, 0x5
adds r0, r6, r4
strb r7, [r0]
movs r1, 0xAD
lsls r1, 1
adds r0, r6, r1
strb r7, [r0]
mov r0, r8
bl sub_8070774
movs r2, 0xAB
lsls r2, 1
adds r1, r6, r2
strb r5, [r1]
movs r3, 0xAE
lsls r3, 1
adds r0, r6, r3
strb r7, [r0]
adds r4, 0x5
adds r0, r6, r4
strb r7, [r0]
adds r2, 0x7
adds r0, r6, r2
strb r7, [r0]
adds r3, 0x3
adds r0, r6, r3
strb r7, [r0]
adds r4, 0x2
adds r0, r6, r4
strb r7, [r0]
ldrh r0, [r6, 0x4]
subs r0, 0x32
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bhi _0806BF70
strb r7, [r1]
_0806BF70:
mov r0, r8
ldrh r1, [r0, 0x6]
lsls r1, 16
ldrh r0, [r0, 0x4]
orrs r0, r1
str r0, [sp, 0x8]
mov r1, r9
ldr r0, [r1]
movs r2, 0x4
ldrsh r1, [r6, r2]
add r2, sp, 0x8
ldr r3, _0806BFB8
ldr r3, [r3]
ldr r4, _0806BFBC
adds r3, r4
ldrb r3, [r3]
bl sub_800F8D0
mov r0, r8
bl sub_807191C
mov r0, r8
movs r1, 0
movs r2, 0
bl sub_806A898
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806BFB4: .4byte 0x00000145
_0806BFB8: .4byte gUnknown_203B418
_0806BFBC: .4byte 0x00018208
thumb_func_end sub_806BC68
thumb_func_start sub_806BFC0
sub_806BFC0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x3C
adds r4, r0, 0
lsls r1, 24
lsrs r1, 24
str r1, [sp]
adds r1, r4, 0
adds r1, 0xA8
movs r0, 0
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x8
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r2, r4, 0
adds r2, 0xB4
movs r1, 0x22
str r1, [r2]
adds r1, r4, 0
adds r1, 0xBC
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x4
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x4
strb r0, [r1]
adds r1, 0x9
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x2
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x4
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x3
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
adds r1, 0x1
strb r0, [r1]
movs r0, 0xB2
lsls r0, 1
adds r1, r4, r0
movs r0, 0xFF
strb r0, [r1]
ldr r2, _0806C168
adds r1, r4, r2
movs r0, 0x1
negs r0, r0
strb r0, [r1]
movs r1, 0
movs r7, 0x84
lsls r7, 1
adds r0, r4, r7
movs r5, 0x4
_0806C080:
strb r1, [r0]
strb r1, [r0, 0x5]
adds r0, 0x1
subs r5, 0x1
cmp r5, 0
bge _0806C080
movs r0, 0
str r0, [sp, 0x4]
movs r5, 0
adds r1, r4, 0
adds r1, 0x5E
str r1, [sp, 0x8]
movs r2, 0x5C
adds r2, r4
mov r10, r2
adds r7, r4, 0
adds r7, 0xFD
str r7, [sp, 0x20]
adds r0, r4, 0
adds r0, 0xF4
str r0, [sp, 0xC]
adds r1, 0x9D
str r1, [sp, 0x1C]
adds r2, r4, 0
adds r2, 0xF5
str r2, [sp, 0x10]
subs r7, 0x7
str r7, [sp, 0x14]
adds r0, 0x3
str r0, [sp, 0x18]
adds r1, 0x4
str r1, [sp, 0x24]
movs r2, 0x1
mov r9, r2
movs r3, 0xA
subs r7, 0xC2
str r7, [sp, 0x28]
subs r0, 0xCB
str r0, [sp, 0x2C]
adds r2, r4, 0
adds r2, 0x24
subs r1, 0xDF
str r1, [sp, 0x38]
adds r6, r4, 0
adds r6, 0x1C
movs r7, 0x80
lsls r7, 1
mov r8, r7
_0806C0E0:
movs r1, 0x2
ldrsh r0, [r4, r1]
adds r1, r5, 0
str r2, [sp, 0x30]
str r3, [sp, 0x34]
bl sub_808DC84
ldr r7, [sp, 0x8]
adds r1, r7, r5
strb r0, [r1]
lsls r0, 24
lsrs r0, 24
ldr r2, [sp, 0x30]
ldr r3, [sp, 0x34]
cmp r0, 0x25
bne _0806C104
movs r0, 0x1
str r0, [sp, 0x4]
_0806C104:
ldr r1, [sp]
cmp r1, 0
beq _0806C11E
adds r0, r4, 0
adds r0, 0x14
adds r0, r5
mov r7, r9
strb r7, [r0]
adds r0, r4, 0
adds r0, 0x16
adds r0, r5
mov r1, r9
strb r1, [r0]
_0806C11E:
strh r3, [r6]
ldr r7, [sp, 0x38]
strh r3, [r7]
strh r3, [r2]
ldr r1, [sp, 0x2C]
mov r0, r8
stm r1!, {r0}
str r1, [sp, 0x2C]
ldr r7, [sp, 0x28]
stm r7!, {r0}
str r7, [sp, 0x28]
adds r2, 0x2
ldr r0, [sp, 0x38]
adds r0, 0x2
str r0, [sp, 0x38]
adds r6, 0x2
adds r5, 0x1
cmp r5, 0x1
ble _0806C0E0
ldr r1, [sp, 0x4]
cmp r1, 0
beq _0806C170
movs r0, 0
bl sub_807E580
ldr r1, _0806C16C
lsls r0, 24
lsrs r0, 22
adds r0, r1
ldrb r0, [r0]
movs r1, 0
mov r2, r10
strb r0, [r2]
adds r0, r4, 0
adds r0, 0x5D
strb r1, [r0]
b _0806C188
.align 2, 0
_0806C168: .4byte 0x00000165
_0806C16C: .4byte gUnknown_80F520C
_0806C170:
movs r5, 0
_0806C172:
movs r7, 0x2
ldrsh r0, [r4, r7]
adds r1, r5, 0
bl sub_808DC68
mov r2, r10
adds r1, r2, r5
strb r0, [r1]
adds r5, 0x1
cmp r5, 0x1
ble _0806C172
_0806C188:
ldr r0, _0806C1D0
ldr r1, [r0]
movs r2, 0
movs r0, 0x1
strb r0, [r1, 0xC]
movs r0, 0
strh r2, [r4, 0x28]
movs r7, 0x89
lsls r7, 1
adds r1, r4, r7
strb r0, [r1]
ldr r1, [sp, 0x20]
strb r0, [r1]
ldr r2, _0806C1D4
adds r1, r4, r2
strb r0, [r1]
ldr r7, [sp, 0xC]
strb r0, [r7]
ldr r1, [sp, 0x1C]
strb r0, [r1]
ldr r2, [sp, 0x10]
strb r0, [r2]
ldr r7, [sp, 0x14]
strb r0, [r7]
ldr r1, [sp, 0x18]
strb r0, [r1]
ldr r2, [sp, 0x24]
strb r0, [r2]
add sp, 0x3C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806C1D0: .4byte gUnknown_203B418
_0806C1D4: .4byte 0x00000113
thumb_func_end sub_806BFC0
thumb_func_start sub_806C1D8
sub_806C1D8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
movs r5, 0
_0806C1E2:
ldr r0, _0806C258
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806C25C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
adds r5, 0x1
mov r9, r5
cmp r0, 0
beq _0806C244
ldr r4, [r4, 0x70]
ldrb r6, [r4, 0xA]
cmp r6, 0
blt _0806C244
movs r5, 0
movs r0, 0x8C
lsls r0, 1
mov r12, r0
movs r2, 0x1
mov r8, r2
adds r3, r4, 0
movs r7, 0xFE
_0806C218:
lsls r0, r5, 3
adds r0, r4
add r0, r12
ldrb r1, [r0]
mov r0, r8
ands r0, r1
cmp r0, 0
beq _0806C234
ldr r0, _0806C260
adds r2, r3, r0
ldrb r1, [r2]
adds r0, r7, 0
ands r0, r1
strb r0, [r2]
_0806C234:
adds r3, 0x8
adds r5, 0x1
cmp r5, 0x3
ble _0806C218
adds r0, r6, 0
adds r1, r4, 0
bl sub_806C264
_0806C244:
mov r5, r9
cmp r5, 0x3
ble _0806C1E2
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806C258: .4byte gUnknown_203B418
_0806C25C: .4byte 0x0001357c
_0806C260: .4byte 0x00000119
thumb_func_end sub_806C1D8
thumb_func_start sub_806C264
sub_806C264:
push {r4,r5,lr}
mov r12, r1
ldr r2, _0806C31C
movs r1, 0x64
muls r0, r1
ldr r1, _0806C320
adds r0, r1
ldr r1, [r2]
adds r3, r1, r0
mov r2, r12
ldrh r0, [r2, 0xE]
strh r0, [r3, 0x10]
ldrh r0, [r2, 0x10]
strh r0, [r3, 0x12]
ldr r0, [r2, 0x18]
str r0, [r3, 0x18]
adds r2, 0x14
adds r1, r3, 0
adds r1, 0x14
movs r4, 0x1
_0806C28C:
ldrb r0, [r2]
strb r0, [r1]
ldrb r0, [r2, 0x2]
strb r0, [r1, 0x2]
adds r2, 0x1
adds r1, 0x1
subs r4, 0x1
cmp r4, 0
bge _0806C28C
ldr r4, _0806C324
adds r0, r4, 0
mov r5, r12
ldrh r5, [r5, 0x4]
adds r0, r5
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
bhi _0806C2B6
movs r0, 0xBC
lsls r0, 1
strh r0, [r3, 0xE]
_0806C2B6:
adds r1, r3, 0
adds r1, 0x1C
movs r0, 0x8C
lsls r0, 1
add r0, r12
ldm r0!, {r2,r4,r5}
stm r1!, {r2,r4,r5}
ldm r0!, {r2,r4,r5}
stm r1!, {r2,r4,r5}
ldm r0!, {r2,r4,r5}
stm r1!, {r2,r4,r5}
mov r1, r12
ldrb r0, [r1, 0x9]
strb r0, [r3, 0x3]
ldrh r0, [r1, 0xC]
strh r0, [r3, 0x8]
mov r0, r12
adds r0, 0x8C
ldr r0, [r0]
str r0, [r3, 0x4C]
mov r0, r12
adds r0, 0x94
ldrb r1, [r0]
adds r0, r3, 0
adds r0, 0x50
strb r1, [r0]
mov r2, r12
ldr r0, [r2, 0x3C]
str r0, [r3, 0x54]
movs r0, 0x9E
lsls r0, 1
add r0, r12
ldr r0, [r0]
str r0, [r3, 0x44]
movs r0, 0xA0
lsls r0, 1
add r0, r12
ldr r0, [r0]
str r0, [r3, 0x48]
ldr r0, [r2, 0x60]
str r0, [r3, 0x40]
movs r4, 0xA
ldrsh r1, [r3, r4]
ldr r0, _0806C328
cmp r1, r0
bne _0806C316
ldr r0, _0806C32C
strh r0, [r3, 0xA]
_0806C316:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806C31C: .4byte gUnknown_203B45C
_0806C320: .4byte 0x00008df8
_0806C324: .4byte 0xfffffe87
_0806C328: .4byte 0x000055aa
_0806C32C: .4byte 0x00005aa5
thumb_func_end sub_806C264
thumb_func_start sub_806C330
sub_806C330:
push {r4-r7,lr}
adds r4, r0, 0
adds r5, r1, 0
lsls r2, 16
asrs r2, 16
mov r12, r2
lsls r3, 24
lsrs r7, r3, 24
ldr r0, _0806C370
ldr r0, [r0]
ldr r1, _0806C374
adds r2, r0, r1
movs r3, 0
ldr r0, [r2, 0x40]
cmp r3, r0
bge _0806C382
mov r1, r12
lsls r0, r1, 16
lsrs r6, r0, 16
adds r1, r2, 0
_0806C358:
ldrb r0, [r1, 0x3]
cmp r0, 0
beq _0806C378
ldrb r0, [r1, 0x4]
cmp r0, r4
bne _0806C378
ldrb r0, [r1, 0x5]
cmp r0, r5
bne _0806C378
strh r6, [r1]
strb r7, [r1, 0x2]
b _0806C3B8
.align 2, 0
_0806C370: .4byte gUnknown_203B418
_0806C374: .4byte 0x0000057c
_0806C378:
adds r1, 0x8
adds r3, 0x1
ldr r0, [r2, 0x40]
cmp r3, r0
blt _0806C358
_0806C382:
ldr r0, [r2, 0x40]
cmp r0, 0x7
bgt _0806C3B8
lsls r0, 3
adds r0, r2, r0
movs r1, 0x1
strb r1, [r0, 0x3]
ldr r0, [r2, 0x40]
lsls r0, 3
adds r0, r2, r0
strb r4, [r0, 0x4]
ldr r0, [r2, 0x40]
lsls r0, 3
adds r0, r2, r0
strb r5, [r0, 0x5]
ldr r0, [r2, 0x40]
lsls r0, 3
adds r0, r2, r0
mov r1, r12
strh r1, [r0]
ldr r0, [r2, 0x40]
lsls r0, 3
adds r0, r2, r0
strb r7, [r0, 0x2]
ldr r0, [r2, 0x40]
adds r0, 0x1
str r0, [r2, 0x40]
_0806C3B8:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806C330
thumb_func_start sub_806C3C0
sub_806C3C0:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x18
ldr r0, _0806C424
ldr r0, [r0]
ldr r1, _0806C428
adds r7, r0, r1
movs r6, 0
ldr r0, [r7, 0x40]
cmp r6, r0
bge _0806C416
mov r5, sp
movs r0, 0
mov r8, r0
movs r2, 0
adds r4, r7, 0
_0806C3E2:
ldrb r0, [r4, 0x3]
cmp r0, 0
beq _0806C40C
ldrh r0, [r4]
strh r0, [r5]
strh r2, [r5, 0x8]
ldrb r0, [r4, 0x4]
strh r0, [r5, 0xC]
ldrb r0, [r4, 0x5]
strh r0, [r5, 0xE]
ldrb r0, [r4, 0x2]
strb r0, [r5, 0x2]
str r2, [sp, 0x4]
mov r1, r8
strb r1, [r5, 0x10]
mov r0, sp
movs r1, 0x1
str r2, [sp, 0x14]
bl sub_806B7F8
ldr r2, [sp, 0x14]
_0806C40C:
adds r4, 0x8
adds r6, 0x1
ldr r0, [r7, 0x40]
cmp r6, r0
blt _0806C3E2
_0806C416:
add sp, 0x18
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806C424: .4byte gUnknown_203B418
_0806C428: .4byte 0x0000057c
thumb_func_end sub_806C3C0
thumb_func_start sub_806C42C
sub_806C42C:
ldr r0, _0806C43C
ldr r0, [r0]
ldr r1, _0806C440
adds r0, r1
movs r1, 0
str r1, [r0, 0x40]
bx lr
.align 2, 0
_0806C43C: .4byte gUnknown_203B418
_0806C440: .4byte 0x0000057c
thumb_func_end sub_806C42C
thumb_func_start sub_806C444
sub_806C444:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0xC
adds r7, r1, 0
lsls r0, 16
asrs r6, r0, 16
adds r0, r6, 0
bl GetBaseHP
adds r5, r0, 0
movs r4, 0x2
cmp r4, r7
bgt _0806C478
mov r8, sp
_0806C462:
mov r0, sp
adds r1, r6, 0
adds r2, r4, 0
bl sub_808E010
mov r1, r8
ldrh r0, [r1, 0x4]
adds r5, r0
adds r4, 0x1
cmp r4, r7
ble _0806C462
_0806C478:
adds r0, r5, 0
add sp, 0xC
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806C444
thumb_func_start sub_806C488
sub_806C488:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0xC
adds r7, r1, 0
mov r8, r2
lsls r0, 16
asrs r6, r0, 16
adds r0, r6, 0
mov r1, r8
bl sub_808DC28
adds r5, r0, 0
movs r4, 0x2
cmp r4, r7
bgt _0806C4C4
mov r0, sp
adds r0, 0x6
add r8, r0
_0806C4AE:
mov r0, sp
adds r1, r6, 0
adds r2, r4, 0
bl sub_808E010
mov r1, r8
ldrb r0, [r1]
adds r5, r0
adds r4, 0x1
cmp r4, r7
ble _0806C4AE
_0806C4C4:
adds r0, r5, 0
add sp, 0xC
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806C488
thumb_func_start sub_806C4D4
sub_806C4D4:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0xC
adds r7, r1, 0
mov r8, r2
lsls r0, 16
asrs r6, r0, 16
adds r0, r6, 0
mov r1, r8
bl sub_808DC48
adds r5, r0, 0
movs r4, 0x2
cmp r4, r7
bgt _0806C50E
add r0, sp, 0x8
add r8, r0
_0806C4F8:
mov r0, sp
adds r1, r6, 0
adds r2, r4, 0
bl sub_808E010
mov r1, r8
ldrb r0, [r1]
adds r5, r0
adds r4, 0x1
cmp r4, r7
ble _0806C4F8
_0806C50E:
adds r0, r5, 0
add sp, 0xC
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806C4D4
thumb_func_start sub_806C51C
sub_806C51C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x50
adds r6, r0, 0
ldr r0, [r6, 0x70]
mov r8, r0
ldr r0, _0806C544
ldr r1, [r0]
ldr r2, _0806C548
adds r0, r1, r2
ldr r0, [r0]
cmp r0, r6
bne _0806C54C
movs r3, 0
str r3, [sp, 0x38]
b _0806C554
.align 2, 0
_0806C544: .4byte gUnknown_203B418
_0806C548: .4byte 0x000181f8
_0806C54C:
ldr r4, _0806C5AC
adds r0, r1, r4
ldrb r0, [r0]
str r0, [sp, 0x38]
_0806C554:
mov r0, r8
adds r0, 0xC8
ldrb r1, [r0]
str r0, [sp, 0x40]
cmp r1, 0x2
bne _0806C564
movs r7, 0x1
str r7, [sp, 0x38]
_0806C564:
adds r0, r6, 0
adds r0, 0x6B
adds r1, r6, 0
adds r1, 0x6A
ldrb r2, [r0]
str r0, [sp, 0x48]
mov r9, r1
adds r5, r6, 0
adds r5, 0x6D
adds r0, 0x1
str r0, [sp, 0x4C]
adds r4, r6, 0
adds r4, 0x6F
subs r1, 0x47
str r1, [sp, 0x44]
mov r3, r9
ldrb r3, [r3]
cmp r2, r3
bne _0806C676
ldrb r0, [r5]
ldr r7, [sp, 0x4C]
ldrb r7, [r7]
cmp r0, r7
bne _0806C654
ldrb r0, [r4]
cmp r0, 0
bne _0806C654
movs r2, 0
ldrh r1, [r6, 0x28]
movs r0, 0x80
lsls r0, 6
ands r0, r1
cmp r0, 0
beq _0806C5B0
movs r0, 0
b _0806C5B2
.align 2, 0
_0806C5AC: .4byte 0x00018210
_0806C5B0:
lsrs r0, r1, 15
_0806C5B2:
cmp r0, 0
bne _0806C5B8
movs r2, 0x1
_0806C5B8:
adds r0, r6, 0
adds r0, 0x23
str r0, [sp, 0x44]
cmp r2, 0
beq _0806C654
adds r0, r6, 0
bl sub_806CEBC
lsls r0, 24
lsrs r3, r0, 24
adds r1, r6, 0
adds r1, 0x21
movs r0, 0x1
strb r0, [r1]
mov r1, r8
adds r1, 0xFE
ldrb r0, [r1]
cmp r0, 0x63
bne _0806C620
ldr r1, [sp, 0x48]
ldrb r0, [r1]
cmp r0, 0xC
bhi _0806C61C
mov r0, r8
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x1
bne _0806C5F4
movs r2, 0x2
b _0806C600
_0806C5F4:
ldr r2, [sp, 0x44]
ldrb r0, [r2]
movs r2, 0x1
cmp r0, 0x2
bhi _0806C600
movs r2, 0
_0806C600:
ldr r1, _0806C618
movs r0, 0xD
muls r0, r2
ldr r7, [sp, 0x48]
ldrb r7, [r7]
adds r0, r7
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x7
bne _0806C622
adds r0, r3, 0
b _0806C622
.align 2, 0
_0806C618: .4byte gUnknown_8106EC8
_0806C61C:
movs r0, 0x63
b _0806C622
_0806C620:
ldrb r0, [r1]
_0806C622:
cmp r0, 0x63
beq _0806C654
mov r1, r9
strb r0, [r1]
ldrb r1, [r5]
movs r0, 0x7
ands r0, r1
ldr r2, [sp, 0x4C]
strb r0, [r2]
movs r0, 0x1
strb r0, [r4]
mov r7, r9
ldrb r0, [r7]
cmp r0, 0x6
bne _0806C654
adds r1, r6, 0
adds r1, 0x6E
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
lsls r0, 24
lsrs r0, 24
cmp r0, 0x10
bne _0806C654
strb r3, [r7]
_0806C654:
ldr r1, [sp, 0x48]
ldrb r0, [r1]
mov r2, r9
ldrb r2, [r2]
cmp r0, r2
bne _0806C676
ldrb r0, [r5]
ldr r3, [sp, 0x4C]
ldrb r3, [r3]
cmp r0, r3
bne _0806C676
ldrb r0, [r4]
movs r7, 0x28
adds r7, r6
mov r10, r7
cmp r0, 0
beq _0806C714
_0806C676:
mov r1, r9
ldrb r0, [r1]
ldr r2, [sp, 0x48]
strb r0, [r2]
ldr r3, [sp, 0x4C]
mov r10, r3
ldrb r0, [r3]
strb r0, [r5]
movs r7, 0
strb r7, [r4]
adds r0, r6, 0
adds r0, 0x68
movs r1, 0
ldrsh r7, [r0, r1]
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
mov r4, r9
ldrb r1, [r4]
bl sub_808DA44
lsls r0, 24
cmp r0, 0
beq _0806C6A8
movs r7, 0
_0806C6A8:
ldr r0, [sp, 0x38]
cmp r0, 0
bne _0806C6D6
bl Random
movs r4, 0x3
ands r4, r0
adds r5, r6, 0
adds r5, 0x28
ldr r1, [r6, 0x64]
mov r3, r9
ldrb r2, [r3]
mov r0, r10
ldrb r3, [r0]
str r7, [sp]
str r4, [sp, 0x4]
ldr r4, [sp, 0x38]
str r4, [sp, 0x8]
adds r0, r5, 0
bl sub_80053AC
mov r10, r5
b _0806C704
_0806C6D6:
ldr r0, _0806C774
bl sub_80687D0
adds r5, r0, 0
bl Random
movs r1, 0x3
ands r1, r0
adds r4, r6, 0
adds r4, 0x28
mov r0, r9
ldrb r2, [r0]
ldr r0, [sp, 0x4C]
ldrb r3, [r0]
str r7, [sp]
str r1, [sp, 0x4]
movs r1, 0
str r1, [sp, 0x8]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80053AC
mov r10, r4
_0806C704:
mov r2, r9
ldrb r0, [r2]
cmp r0, 0x6
beq _0806C714
adds r1, r6, 0
adds r1, 0x6E
movs r0, 0
strb r0, [r1]
_0806C714:
ldr r0, _0806C778
ldr r1, [r0]
ldr r3, _0806C77C
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
beq _0806C784
ldr r4, [sp, 0x48]
ldrb r0, [r4]
cmp r0, 0x7
bne _0806C73C
mov r7, r8
movs r1, 0x4
ldrsh r0, [r7, r1]
bl GetWalkableTiles
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
bne _0806C7E2
_0806C73C:
movs r0, 0xAE
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
beq _0806C76A
movs r0, 0xB0
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
bne _0806C7E2
ldr r0, _0806C780
add r0, r8
ldrb r0, [r0]
cmp r0, 0
beq _0806C76A
mov r0, r10
bl sub_80054BC
mov r0, r10
bl sub_80054BC
_0806C76A:
mov r0, r10
bl sub_80054BC
b _0806C7E2
.align 2, 0
_0806C774: .4byte 0x000001a5
_0806C778: .4byte gUnknown_203B418
_0806C77C: .4byte 0x0001356c
_0806C780: .4byte 0x0000015f
_0806C784:
mov r0, r8
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
beq _0806C7E2
cmp r0, 0x6
beq _0806C7E2
ldr r2, _0806C7B4
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0806C7BC
ldr r3, _0806C7B8
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
bne _0806C7BC
mov r0, r10
bl sub_80054BC
mov r0, r10
bl sub_80054BC
b _0806C7DC
.align 2, 0
_0806C7B4: .4byte 0x0000066c
_0806C7B8: .4byte 0x0001c05f
_0806C7BC:
ldr r4, [sp, 0x48]
ldrb r0, [r4]
cmp r0, 0
beq _0806C7C8
cmp r0, 0x7
bne _0806C7DC
_0806C7C8:
ldr r0, [r6, 0x70]
movs r7, 0x82
lsls r7, 1
adds r0, r7
ldr r0, [r0]
cmp r0, 0x1
ble _0806C7DC
mov r0, r10
bl sub_80054BC
_0806C7DC:
mov r0, r10
bl sub_80054BC
_0806C7E2:
ldr r1, [r6, 0xC]
ldr r0, [r6, 0x14]
cmp r1, r0
bne _0806C800
ldr r1, [r6, 0x10]
ldr r0, [r6, 0x18]
cmp r1, r0
bne _0806C800
ldr r1, [sp, 0x44]
ldrb r0, [r1]
cmp r0, 0x9
bhi _0806C806
adds r0, 0x1
strb r0, [r1]
b _0806C806
_0806C800:
movs r0, 0
ldr r2, [sp, 0x44]
strb r0, [r2]
_0806C806:
ldr r0, [r6, 0xC]
str r0, [r6, 0x14]
ldr r2, [r6, 0x10]
str r2, [r6, 0x18]
cmp r0, 0
bge _0806C814
adds r0, 0xFF
_0806C814:
asrs r1, r0, 8
ldr r0, _0806C88C
ldr r3, [r0]
ldr r4, _0806C890
adds r0, r3, r4
movs r7, 0
ldrsh r0, [r0, r7]
subs r1, r0
str r1, [sp, 0x2C]
ldr r0, [r6, 0x1C]
subs r0, r2, r0
movs r1, 0xBA
lsls r1, 1
add r1, r8
ldr r1, [r1]
subs r0, r1
cmp r0, 0
bge _0806C83A
adds r0, 0xFF
_0806C83A:
asrs r1, r0, 8
ldr r4, _0806C894
adds r0, r3, r4
movs r7, 0
ldrsh r3, [r0, r7]
subs r1, r3
str r1, [sp, 0x30]
adds r0, r2, 0
cmp r0, 0
bge _0806C850
adds r0, 0xFF
_0806C850:
asrs r0, 8
subs r0, r3
mov r9, r0
lsrs r0, 31
add r0, r9
asrs r0, 1
mov r9, r0
movs r0, 0xAB
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
bne _0806C870
movs r0, 0x1
negs r0, r0
add r9, r0
_0806C870:
movs r0, 0xAE
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
bne _0806C898
adds r0, r6, 0
bl sub_8042768
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x34]
b _0806C8D8
.align 2, 0
_0806C88C: .4byte gUnknown_203B418
_0806C890: .4byte 0x000181f0
_0806C894: .4byte 0x000181f2
_0806C898:
ldr r0, _0806C8B8
add r0, r8
ldrb r0, [r0]
cmp r0, 0
beq _0806C8C6
ldr r0, _0806C8BC
ldr r0, [r0]
movs r1, 0x4
ands r0, r1
cmp r0, 0
beq _0806C8C0
ldr r1, [sp, 0x2C]
adds r1, 0x1
str r1, [sp, 0x2C]
b _0806C8C6
.align 2, 0
_0806C8B8: .4byte 0x0000015d
_0806C8BC: .4byte gUnknown_202EDCC
_0806C8C0:
ldr r2, [sp, 0x2C]
subs r2, 0x1
str r2, [sp, 0x2C]
_0806C8C6:
movs r1, 0
movs r0, 0xAF
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
bne _0806C8D6
movs r1, 0x1
_0806C8D6:
str r1, [sp, 0x34]
_0806C8D8:
ldr r0, [r6, 0xC]
cmp r0, 0
bge _0806C8E0
adds r0, 0xFF
_0806C8E0:
lsls r0, 8
lsrs r0, 16
ldr r1, _0806C998
ldr r2, [sp, 0x28]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x28]
ldr r1, [r6, 0x10]
ldr r0, [r6, 0x1C]
subs r1, r0
movs r5, 0xBA
lsls r5, 1
add r5, r8
ldr r0, [r5]
subs r0, r1, r0
cmp r0, 0
bge _0806C904
adds r0, 0xFF
_0806C904:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _0806C99C
ands r2, r1
orrs r2, r0
str r2, [sp, 0x28]
add r0, sp, 0xC
mov r1, r10
bl sub_8005700
mov r4, r8
adds r4, 0x98
ldr r0, [r4]
add r1, sp, 0x28
ldr r2, _0806C9A0
ldr r2, [r2]
ldr r3, _0806C9A4
adds r2, r3
ldrb r3, [r2]
add r2, sp, 0xC
bl sub_800F958
adds r0, r6, 0
bl sub_804187C
adds r2, r0, 0
ldr r4, [r4]
mov r0, r8
movs r1, 0x4
ldrsh r7, [r0, r1]
movs r3, 0
ldr r0, [sp, 0x34]
cmp r0, 0
beq _0806C958
movs r0, 0xA6
lsls r0, 1
add r0, r8
ldrb r1, [r0]
negs r0, r1
orrs r0, r1
lsrs r3, r0, 31
_0806C958:
adds r0, r4, 0
adds r1, r7, 0
bl sub_800F75C
adds r0, r6, 0
mov r1, r9
bl sub_8042EC8
movs r0, 0xAE
lsls r0, 1
add r0, r8
ldrb r1, [r0]
cmp r1, 0
bne _0806C9BA
mov r0, r8
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0x1
bne _0806C9AC
ldr r1, [r5]
ldr r0, _0806C9A8
cmp r1, r0
bgt _0806C9BA
movs r2, 0x80
lsls r2, 4
adds r0, r1, r2
str r0, [r5]
movs r1, 0xC8
lsls r1, 8
cmp r0, r1
ble _0806C9BA
b _0806C9B8
.align 2, 0
_0806C998: .4byte 0xffff0000
_0806C99C: .4byte 0x0000ffff
_0806C9A0: .4byte gUnknown_203B418
_0806C9A4: .4byte 0x00018208
_0806C9A8: .4byte 0x0000c7ff
_0806C9AC:
ldr r0, [r5]
ldr r3, _0806CA5C
adds r0, r3
str r0, [r5]
cmp r0, 0
bge _0806C9BA
_0806C9B8:
str r1, [r5]
_0806C9BA:
ldr r4, [sp, 0x34]
cmp r4, 0
bne _0806C9C2
b _0806CBDE
_0806C9C2:
movs r4, 0
adds r0, r6, 0
bl sub_806CF54
lsls r0, 24
lsrs r7, r0, 24
add r1, sp, 0x1C
ldr r2, _0806CA60
strh r2, [r1]
ldr r0, _0806CA64
strh r0, [r1, 0x2]
strh r2, [r1, 0x4]
strh r4, [r1, 0x6]
strh r4, [r1, 0x8]
ldr r0, _0806CA68
ldr r0, [r0]
ldr r2, _0806CA6C
adds r0, r2
ldrb r0, [r0]
lsls r0, 10
strh r0, [r1, 0xA]
mov r3, r8
ldrb r0, [r3, 0x6]
adds r5, r1, 0
cmp r0, 0
beq _0806CA08
ldr r1, _0806CA70
adds r0, r1, 0
ldrh r2, [r3, 0x4]
adds r0, r2
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
bhi _0806CA08
movs r4, 0x1
_0806CA08:
mov r0, r8
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806CA22
ldr r0, _0806CA68
ldr r0, [r0]
ldr r3, _0806CA74
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
bne _0806CA22
movs r4, 0x1
_0806CA22:
cmp r4, 0
beq _0806CA32
ldrh r1, [r5, 0x6]
movs r4, 0x80
lsls r4, 3
adds r0, r4, 0
orrs r0, r1
strh r0, [r5, 0x6]
_0806CA32:
movs r0, 0
str r0, [sp, 0x3C]
mov r1, r8
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _0806CA46
ldr r2, [sp, 0x40]
ldrb r0, [r2]
cmp r0, 0x2
bne _0806CA4A
_0806CA46:
movs r3, 0x1
str r3, [sp, 0x3C]
_0806CA4A:
mov r0, r8
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0806CA58
cmp r0, 0x47
bne _0806CA78
_0806CA58:
movs r0, 0x1
b _0806CA7A
.align 2, 0
_0806CA5C: .4byte 0xfffff400
_0806CA60: .4byte 0x0000f3ff
_0806CA64: .4byte 0x0000ffff
_0806CA68: .4byte gUnknown_203B418
_0806CA6C: .4byte 0x00018208
_0806CA70: .4byte 0xfffffe5f
_0806CA74: .4byte 0x0001820f
_0806CA78:
movs r0, 0
_0806CA7A:
cmp r0, 0
bne _0806CA88
mov r0, r8
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806CA8C
_0806CA88:
movs r4, 0x1
str r4, [sp, 0x3C]
_0806CA8C:
mov r0, r8
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0x2
beq _0806CB16
mov r0, r8
adds r0, 0xB0
ldrb r1, [r0]
cmp r1, 0x6
beq _0806CAAC
subs r0, 0x4
ldrb r0, [r0]
cmp r0, 0x4
beq _0806CAAC
cmp r1, 0x2
bne _0806CABA
_0806CAAC:
ldr r0, _0806CAC4
ldr r0, [r0]
movs r1, 0x2
ands r0, r1
ldr r1, [sp, 0x2C]
adds r1, r0
str r1, [sp, 0x2C]
_0806CABA:
ldr r2, [sp, 0x38]
cmp r2, 0
beq _0806CACC
ldr r0, _0806CAC8
b _0806CAD2
.align 2, 0
_0806CAC4: .4byte gUnknown_202EDCC
_0806CAC8: .4byte 0x000001a5
_0806CACC:
mov r3, r8
movs r4, 0x4
ldrsh r0, [r3, r4]
_0806CAD2:
movs r1, 0
bl sub_808DD68
lsls r0, 24
lsrs r2, r0, 24
adds r0, r6, 0
adds r0, 0x22
ldrb r1, [r0]
cmp r1, 0
bne _0806CAF8
str r2, [sp]
str r5, [sp, 0x4]
mov r0, r10
ldr r1, [sp, 0x2C]
ldr r2, [sp, 0x30]
mov r3, r9
bl sub_800558C
b _0806CB16
_0806CAF8:
cmp r1, 0x1
bne _0806CB16
ldr r0, _0806CBF0
ldr r0, [r0]
ands r0, r1
cmp r0, 0
beq _0806CB16
str r2, [sp]
str r5, [sp, 0x4]
mov r0, r10
ldr r1, [sp, 0x2C]
ldr r2, [sp, 0x30]
mov r3, r9
bl sub_800558C
_0806CB16:
ldr r0, [r6, 0xC]
cmp r0, 0
bge _0806CB1E
adds r0, 0xFF
_0806CB1E:
asrs r0, 8
ldrh r1, [r6, 0x38]
adds r0, r1
movs r1, 0xB8
lsls r1, 1
add r1, r8
strh r0, [r1]
ldr r0, [r6, 0x10]
cmp r0, 0
bge _0806CB34
adds r0, 0xFF
_0806CB34:
asrs r0, 8
ldrh r2, [r6, 0x3A]
adds r0, r2
movs r3, 0xB9
lsls r3, 1
add r3, r8
strh r0, [r3]
movs r4, 0
ldrsh r2, [r1, r4]
ldr r0, _0806CBF4
ldr r1, [r0]
ldr r4, _0806CBF8
adds r0, r1, r4
movs r4, 0
ldrsh r0, [r0, r4]
subs r4, r2, r0
movs r0, 0
ldrsh r2, [r3, r0]
ldr r3, _0806CBFC
adds r1, r3
movs r3, 0
ldrsh r0, [r1, r3]
subs r5, r2, r0
movs r0, 0x20
negs r0, r0
cmp r4, r0
blt _0806CBDE
cmp r5, r0
blt _0806CBDE
ldr r0, _0806CC00
cmp r4, r0
bgt _0806CBDE
cmp r5, 0xBF
bgt _0806CBDE
cmp r7, 0x6
beq _0806CBDE
adds r0, r6, 0
adds r0, 0x22
ldrb r0, [r0]
cmp r0, 0
bne _0806CBDE
ldr r0, [sp, 0x3C]
lsls r2, r0, 3
adds r2, r0
lsls r2, 3
lsls r0, r7, 1
adds r0, r7
lsls r0, 2
ldr r1, _0806CC04
adds r0, r1
adds r3, r2, r0
movs r0, 0xAB
lsls r0, 1
add r0, r8
ldrb r0, [r0]
cmp r0, 0
beq _0806CBDE
movs r2, 0x8
ldrsh r1, [r3, r2]
adds r1, r4, r1
ldr r0, _0806CC08
ands r1, r0
ldrh r2, [r3, 0x2]
movs r0, 0xFE
lsls r0, 8
ands r0, r2
orrs r0, r1
strh r0, [r3, 0x2]
movs r4, 0xA
ldrsh r1, [r3, r4]
adds r1, r5, r1
ldr r0, _0806CC0C
ands r1, r0
lsls r1, 4
ldrh r2, [r3, 0x6]
movs r0, 0xF
ands r0, r2
orrs r0, r1
strh r0, [r3, 0x6]
adds r0, r3, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl AddSprite
_0806CBDE:
add sp, 0x50
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806CBF0: .4byte gUnknown_202EDCC
_0806CBF4: .4byte gUnknown_203B418
_0806CBF8: .4byte 0x000181f0
_0806CBFC: .4byte 0x000181f2
_0806CC00: .4byte 0x0000010f
_0806CC04: .4byte gUnknown_202ED28
_0806CC08: .4byte 0x000001ff
_0806CC0C: .4byte 0x00000fff
thumb_func_end sub_806C51C
thumb_func_start sub_806CC10
sub_806CC10:
push {r4,r5,lr}
movs r5, 0
_0806CC14:
ldr r0, _0806CC68
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806CC6C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806CC5C
ldr r2, [r4, 0x70]
movs r1, 0xB3
lsls r1, 1
adds r0, r2, r1
ldrb r1, [r0]
cmp r1, 0
beq _0806CC5C
subs r1, 0x1
strb r1, [r0]
movs r0, 0x1
ands r1, r0
cmp r1, 0
bne _0806CC5C
adds r0, r2, 0
adds r0, 0x46
ldrb r2, [r0]
subs r2, 0x1
movs r0, 0x7
ands r2, r0
adds r0, r4, 0
movs r1, 0
bl sub_806CDD4
_0806CC5C:
adds r5, 0x1
cmp r5, 0x13
ble _0806CC14
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806CC68: .4byte gUnknown_203B418
_0806CC6C: .4byte 0x000135cc
thumb_func_end sub_806CC10
thumb_func_start sub_806CC70
sub_806CC70:
push {r4,r5,lr}
movs r5, 0
_0806CC74:
ldr r0, _0806CCAC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806CCB0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806CCA0
adds r0, r4, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_806CCB4
_0806CCA0:
adds r5, 0x1
cmp r5, 0x13
ble _0806CC74
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806CCAC: .4byte gUnknown_203B418
_0806CCB0: .4byte 0x000135cc
thumb_func_end sub_806CC70
thumb_func_start sub_806CCB4
sub_806CCB4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0xC
adds r5, r0, 0
lsls r1, 24
lsrs r4, r1, 24
ldr r7, [r5, 0x70]
ldr r0, _0806CD40
ldr r0, [r0]
ldr r2, _0806CD44
adds r1, r0, r2
ldrb r6, [r1]
ldr r3, _0806CD48
adds r0, r3
ldr r0, [r0]
cmp r5, r0
bne _0806CCDC
movs r6, 0
_0806CCDC:
adds r0, r5, 0
adds r0, 0x6B
movs r3, 0
strb r4, [r0]
adds r2, r5, 0
adds r2, 0x6A
strb r4, [r2]
adds r4, r7, 0
adds r4, 0x46
ldrb r0, [r4]
adds r1, r5, 0
adds r1, 0x6D
strb r0, [r1]
ldrb r0, [r4]
subs r1, 0x1
strb r0, [r1]
adds r0, r5, 0
adds r0, 0x6F
strb r3, [r0]
subs r0, 0x7
movs r3, 0
ldrsh r4, [r0, r3]
mov r9, r4
adds r0, r7, 0
adds r0, 0xC8
ldrb r0, [r0]
adds r7, r2, 0
mov r8, r1
cmp r0, 0x2
beq _0806CD4C
cmp r6, 0
bne _0806CD4C
bl Random
movs r4, 0x3
ands r4, r0
adds r0, r5, 0
adds r0, 0x28
ldr r1, [r5, 0x64]
ldrb r2, [r7]
mov r7, r8
ldrb r3, [r7]
mov r7, r9
str r7, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
bl sub_80053AC
b _0806CD76
.align 2, 0
_0806CD40: .4byte gUnknown_203B418
_0806CD44: .4byte 0x00018210
_0806CD48: .4byte 0x000181f8
_0806CD4C:
ldr r0, _0806CD8C
bl sub_80687D0
adds r4, r0, 0
bl Random
movs r1, 0x3
ands r1, r0
adds r0, r5, 0
adds r0, 0x28
ldrb r2, [r7]
mov r6, r8
ldrb r3, [r6]
mov r7, r9
str r7, [sp]
str r1, [sp, 0x4]
movs r1, 0
str r1, [sp, 0x8]
adds r1, r4, 0
bl sub_80053AC
_0806CD76:
adds r1, r5, 0
adds r1, 0x6E
movs r0, 0
strb r0, [r1]
add sp, 0xC
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806CD8C: .4byte 0x000001a5
thumb_func_end sub_806CCB4
thumb_func_start sub_806CD90
sub_806CD90:
push {r4,r5,lr}
movs r5, 0
_0806CD94:
ldr r0, _0806CDCC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806CDD0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806CDC0
adds r0, r4, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_806CCB4
_0806CDC0:
adds r5, 0x1
cmp r5, 0x13
ble _0806CD94
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806CDCC: .4byte gUnknown_203B418
_0806CDD0: .4byte 0x000135cc
thumb_func_end sub_806CD90
thumb_func_start sub_806CDD4
sub_806CDD4:
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r2, 0
lsls r1, 24
lsrs r5, r1, 24
bl sub_80450F8
cmp r0, 0x1
bne _0806CDF4
adds r0, r4, 0
adds r0, 0x6A
strb r5, [r0]
cmp r6, 0x7
bhi _0806CDF4
adds r0, 0x2
strb r6, [r0]
_0806CDF4:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806CDD4
thumb_func_start sub_806CDFC
sub_806CDFC:
push {r4-r7,lr}
adds r4, r0, 0
adds r6, r2, 0
lsls r1, 24
lsrs r5, r1, 24
adds r7, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806CE2E
adds r0, r4, 0
adds r0, 0x6B
ldrb r0, [r0]
cmp r0, r5
bne _0806CE24
adds r0, r4, 0
adds r0, 0x6D
ldrb r0, [r0]
cmp r0, r6
beq _0806CE2E
_0806CE24:
adds r0, r4, 0
adds r1, r7, 0
adds r2, r6, 0
bl sub_806CDD4
_0806CE2E:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806CDFC
thumb_func_start sub_806CE34
sub_806CE34:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806CE62
adds r0, r4, 0
bl sub_806CEBC
adds r1, r4, 0
adds r1, 0x6A
strb r0, [r1]
cmp r5, 0x7
bhi _0806CE62
ldr r0, [r4, 0x70]
movs r1, 0x7
ands r1, r5
adds r0, 0x46
strb r1, [r0]
adds r0, r4, 0
adds r0, 0x6C
strb r1, [r0]
_0806CE62:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_806CE34
thumb_func_start sub_806CE68
sub_806CE68:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806CE8C
adds r0, r4, 0
bl sub_806CEBC
adds r1, r4, 0
adds r1, 0x6A
strb r0, [r1]
cmp r5, 0x7
bhi _0806CE8C
adds r0, r4, 0
adds r0, 0x6C
strb r5, [r0]
_0806CE8C:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_806CE68
thumb_func_start sub_806CE94
sub_806CE94:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806CEB4
adds r1, r4, 0
adds r1, 0x6A
movs r0, 0x6
strb r0, [r1]
cmp r5, 0x7
bhi _0806CEB4
adds r0, r4, 0
adds r0, 0x6C
strb r5, [r0]
_0806CEB4:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_806CE94
thumb_func_start sub_806CEBC
sub_806CEBC:
push {lr}
ldr r0, [r0, 0x70]
adds r1, r0, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _0806CED2
cmp r0, 0x5
beq _0806CED2
cmp r0, 0x3
bne _0806CEE8
_0806CED2:
movs r2, 0x4
ldrsh r0, [r1, r2]
cmp r0, 0xB9
bne _0806CEE4
adds r0, r1, 0
adds r0, 0xA9
ldrb r0, [r0]
cmp r0, 0x7F
beq _0806CEF2
_0806CEE4:
movs r0, 0x5
b _0806CEF8
_0806CEE8:
adds r0, r1, 0
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x1
beq _0806CEF6
_0806CEF2:
movs r0, 0x7
b _0806CEF8
_0806CEF6:
movs r0, 0xB
_0806CEF8:
pop {r1}
bx r1
thumb_func_end sub_806CEBC
thumb_func_start sub_806CEFC
sub_806CEFC:
push {r4,lr}
adds r4, r1, 0
ldr r2, [r0, 0x70]
movs r3, 0x7
ands r1, r3
adds r2, 0x46
strb r1, [r2]
movs r1, 0x7
ands r1, r4
bl sub_806CE68
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_806CEFC
thumb_func_start sub_806CF18
sub_806CF18:
push {r4-r6,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806CF4C
ldr r6, [r4, 0x70]
movs r5, 0
b _0806CF2E
_0806CF2C:
adds r5, 0x1
_0806CF2E:
cmp r5, 0x63
bgt _0806CF4C
movs r0, 0x21
bl sub_803E46C
movs r1, 0x4
ldrsh r0, [r6, r1]
adds r1, r4, 0
adds r1, 0x6B
ldrb r1, [r1]
bl sub_808DA44
lsls r0, 24
cmp r0, 0
bne _0806CF2C
_0806CF4C:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806CF18
thumb_func_start sub_806CF54
sub_806CF54:
ldr r0, [r0, 0x70]
movs r1, 0x81
lsls r1, 2
adds r0, r1
ldrb r0, [r0]
bx lr
thumb_func_end sub_806CF54
thumb_func_start sub_806CF60
sub_806CF60:
push {r4,r5,lr}
movs r5, 0
_0806CF64:
ldr r0, _0806CF90
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0806CF94
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806CF84
adds r0, r4, 0
bl sub_806CF98
_0806CF84:
adds r5, 0x1
cmp r5, 0x13
ble _0806CF64
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0806CF90: .4byte gUnknown_203B418
_0806CF94: .4byte 0x000135cc
thumb_func_end sub_806CF60
thumb_func_start sub_806CF98
sub_806CF98:
push {r4-r7,lr}
adds r4, r0, 0
bl sub_8045128
ldrh r0, [r0]
movs r5, 0x3
ands r5, r0
adds r6, r5, 0
ldr r7, [r4, 0x70]
movs r1, 0x4
ldrsh r0, [r7, r1]
bl GetShadowSize
lsls r0, 24
lsrs r4, r0, 24
cmp r5, 0x3
bne _0806CFBE
movs r0, 0x6
b _0806CFF8
_0806CFBE:
cmp r5, 0x1
bne _0806CFCE
bl sub_804AF74
lsls r0, 24
cmp r0, 0
beq _0806CFEE
b _0806CFE8
_0806CFCE:
cmp r6, 0x2
bne _0806CFEE
ldr r1, _0806D000
ldr r0, _0806D004
ldr r0, [r0]
ldr r2, _0806D008
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
beq _0806CFEE
_0806CFE8:
ldr r0, _0806D00C
adds r0, r4, r0
ldrb r4, [r0]
_0806CFEE:
movs r1, 0x81
lsls r1, 2
adds r0, r7, r1
strb r4, [r0]
adds r0, r4, 0
_0806CFF8:
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806D000: .4byte gUnknown_810ACC0
_0806D004: .4byte gUnknown_203B418
_0806D008: .4byte 0x00003a0e
_0806D00C: .4byte gUnknown_8106EEF
thumb_func_end sub_806CF98
thumb_func_start sub_806D010
sub_806D010:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
adds r6, r0, 0
adds r5, r1, 0
mov r8, r2
ldr r0, [sp, 0x40]
lsls r0, 16
asrs r0, 16
mov r10, r0
movs r7, 0
ldr r0, [sp, 0x3C]
str r0, [sp]
mov r1, r10
str r1, [sp, 0x4]
ldr r2, [sp, 0x48]
str r2, [sp, 0x8]
adds r0, r6, 0
adds r1, r5, 0
mov r2, r8
bl sub_806D528
lsls r0, 24
cmp r0, 0
beq _0806D04A
b _0806D514
_0806D04A:
mov r3, r8
ldrb r0, [r3, 0xF]
cmp r0, 0
beq _0806D054
b _0806D514
_0806D054:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D062
b _0806D514
_0806D062:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D070
b _0806D514
_0806D070:
adds r0, r6, 0
bl sub_80450F8
cmp r0, 0x1
beq _0806D07C
b _0806D514
_0806D07C:
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
beq _0806D088
b _0806D514
_0806D088:
ldr r0, [sp, 0x44]
mov r9, r0
adds r0, r5, 0
bl sub_8070CD0
lsls r0, 24
cmp r0, 0
bne _0806D0A2
ldr r0, [r5, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0
beq _0806D0A6
_0806D0A2:
movs r1, 0
mov r9, r1
_0806D0A6:
mov r2, r9
cmp r2, 0
beq _0806D100
movs r3, 0x4
ldrsh r1, [r6, r3]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0806D0BC
negs r1, r1
_0806D0BC:
cmp r1, 0x1
bgt _0806D100
movs r3, 0x6
ldrsh r1, [r6, r3]
movs r2, 0x6
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0806D0D0
negs r1, r1
_0806D0D0:
cmp r1, 0x1
bgt _0806D100
cmp r6, r5
beq _0806D100
mov r3, r8
ldrb r0, [r3, 0xC]
bl sub_8092354
lsls r0, 24
cmp r0, 0
beq _0806D100
ldr r0, [r5, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xD
bne _0806D100
adds r0, r5, 0
adds r1, r6, 0
bl sub_8042730
adds r0, r5, 0
adds r1, r6, 0
bl sub_807F43C
_0806D100:
ldr r0, [r5, 0x70]
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0xC
bne _0806D118
ldr r0, _0806D3BC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
movs r3, 0x1
bl sub_8077084
_0806D118:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D126
b _0806D514
_0806D126:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D134
b _0806D514
_0806D134:
mov r0, r9
cmp r0, 0
beq _0806D216
cmp r6, r5
beq _0806D216
movs r2, 0x4
ldrsh r1, [r6, r2]
movs r3, 0x4
ldrsh r0, [r5, r3]
subs r1, r0
cmp r1, 0
bge _0806D14E
negs r1, r1
_0806D14E:
cmp r1, 0x1
bgt _0806D216
movs r0, 0x6
ldrsh r1, [r6, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0806D162
negs r1, r1
_0806D162:
cmp r1, 0x1
bgt _0806D216
mov r3, r8
ldrb r0, [r3, 0xC]
bl sub_8092354
lsls r0, 24
lsrs r4, r0, 24
ldr r0, [r5, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x4
bne _0806D188
cmp r4, 0
beq _0806D188
adds r0, r5, 0
bl sub_8041B18
adds r7, 0x4
_0806D188:
ldr r0, [r5, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xA
bne _0806D19E
cmp r4, 0
beq _0806D19E
adds r0, r5, 0
bl sub_8041B18
adds r7, 0x1
_0806D19E:
ldr r0, [r5, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x8
bne _0806D1B4
cmp r4, 0
bne _0806D1B4
adds r0, r5, 0
bl sub_8041B90
adds r7, 0x4
_0806D1B4:
adds r0, r5, 0
movs r1, 0x12
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D1C4
adds r7, 0x2
_0806D1C4:
cmp r7, 0
beq _0806D216
ldr r0, _0806D3C0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
mov r1, r8
ldr r0, [r1]
muls r0, r7
cmp r0, 0
bge _0806D1E0
adds r0, 0x3
_0806D1E0:
asrs r0, 2
str r0, [sp, 0xC]
add r2, sp, 0xC
mov r3, r8
ldrb r0, [r3, 0xC]
movs r1, 0
strb r0, [r2, 0xC]
movs r0, 0x6
str r0, [sp, 0x10]
movs r0, 0x2
str r0, [sp, 0x14]
adds r0, r2, 0
strb r1, [r0, 0xD]
strb r1, [r0, 0xE]
strb r1, [r0, 0xF]
ldr r0, [sp, 0x3C]
str r0, [sp]
mov r1, r10
str r1, [sp, 0x4]
ldr r2, [sp, 0x48]
str r2, [sp, 0x8]
adds r0, r5, 0
adds r1, r6, 0
add r2, sp, 0xC
movs r3, 0
bl sub_806D528
_0806D216:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D224
b _0806D514
_0806D224:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806D232
b _0806D514
_0806D232:
mov r3, r9
cmp r3, 0
bne _0806D23A
b _0806D48A
_0806D23A:
cmp r6, r5
bne _0806D240
b _0806D48A
_0806D240:
movs r0, 0x4
ldrsh r1, [r6, r0]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0806D250
negs r1, r1
_0806D250:
cmp r1, 0x1
ble _0806D256
b _0806D48A
_0806D256:
movs r3, 0x6
ldrsh r1, [r6, r3]
movs r2, 0x6
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0806D266
negs r1, r1
_0806D266:
cmp r1, 0x1
ble _0806D26C
b _0806D48A
_0806D26C:
mov r3, r8
ldrb r0, [r3, 0xC]
bl sub_8092354
lsls r0, 24
lsrs r7, r0, 24
ldr r4, [r6, 0x70]
adds r0, r5, 0
movs r1, 0x5
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D2C2
adds r0, r6, 0
movs r1, 0xA
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _0806D2C2
adds r0, r6, 0
movs r1, 0x37
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806D2C2
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3C4
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D2C2
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x1
orrs r0, r1
strh r0, [r2]
_0806D2C2:
adds r0, r5, 0
movs r1, 0xA
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D2EE
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3C8
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D2EE
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x2
orrs r0, r1
strh r0, [r2]
_0806D2EE:
adds r0, r5, 0
movs r1, 0x17
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D328
adds r0, r6, 0
movs r1, 0x11
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0806D328
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3CC
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D328
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x4
orrs r0, r1
strh r0, [r2]
_0806D328:
adds r0, r5, 0
movs r1, 0x20
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D358
cmp r7, 0
beq _0806D358
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3D0
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D358
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x8
orrs r0, r1
strh r0, [r2]
_0806D358:
adds r0, r5, 0
movs r1, 0x27
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D384
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3D4
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D384
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x20
orrs r0, r1
strh r0, [r2]
_0806D384:
adds r0, r5, 0
movs r1, 0x3D
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D3FA
cmp r7, 0
beq _0806D3FA
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D3D8
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D3FA
movs r0, 0x3
bl sub_8084100
cmp r0, 0
bgt _0806D3DC
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r0, 0x40
b _0806D3F6
.align 2, 0
_0806D3BC: .4byte gUnknown_8106A4C
_0806D3C0: .4byte gUnknown_80FCFA4
_0806D3C4: .4byte gUnknown_80F4E10
_0806D3C8: .4byte gUnknown_80F4E12
_0806D3CC: .4byte gUnknown_80F4E14
_0806D3D0: .4byte gUnknown_80F4E16
_0806D3D4: .4byte gUnknown_80F4E18
_0806D3D8: .4byte gUnknown_80F4E1A
_0806D3DC:
cmp r0, 0x1
bgt _0806D3EC
movs r0, 0xBC
lsls r0, 1
adds r2, r4, r0
ldrh r1, [r2]
movs r0, 0x10
b _0806D3F6
_0806D3EC:
movs r1, 0xBC
lsls r1, 1
adds r2, r4, r1
ldrh r1, [r2]
movs r0, 0x80
_0806D3F6:
orrs r0, r1
strh r0, [r2]
_0806D3FA:
adds r0, r5, 0
movs r1, 0x3E
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D428
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D4D4
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D428
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
subs r3, 0x78
adds r0, r3, 0
orrs r0, r1
strh r0, [r2]
_0806D428:
adds r0, r5, 0
movs r1, 0x44
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D45A
cmp r7, 0
beq _0806D45A
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D4D8
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D45A
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
adds r3, 0x88
adds r0, r3, 0
orrs r0, r1
strh r0, [r2]
_0806D45A:
adds r0, r5, 0
movs r1, 0x1
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D48A
movs r0, 0x64
bl sub_8084100
ldr r1, _0806D4DC
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _0806D48A
movs r3, 0xBC
lsls r3, 1
adds r2, r4, r3
ldrh r1, [r2]
movs r3, 0x80
lsls r3, 3
adds r0, r3, 0
orrs r0, r1
strh r0, [r2]
_0806D48A:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806D514
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806D514
mov r0, r9
cmp r0, 0
beq _0806D514
ldr r2, [r5, 0x70]
adds r6, r2, 0
adds r3, r2, 0
adds r3, 0xD0
ldrb r0, [r3]
cmp r0, 0x2
bne _0806D514
ldr r0, _0806D4E0
ldr r1, [r0]
adds r0, r2, 0
adds r0, 0xD8
ldrb r0, [r0]
lsls r0, 2
ldr r2, _0806D4E4
adds r1, r2
adds r1, r0
ldr r4, [r1]
cmp r4, 0
bne _0806D4E8
strb r4, [r3]
b _0806D514
.align 2, 0
_0806D4D4: .4byte gUnknown_80F4E1C
_0806D4D8: .4byte gUnknown_80F4E1E
_0806D4DC: .4byte gUnknown_80F4E20
_0806D4E0: .4byte gUnknown_203B418
_0806D4E4: .4byte 0x000135cc
_0806D4E8:
ldr r0, [r4, 0x70]
adds r0, 0x98
adds r1, r6, 0
adds r1, 0xD4
ldr r2, [r0]
ldr r0, [r1]
cmp r2, r0
beq _0806D4FE
movs r0, 0
strb r0, [r3]
b _0806D514
_0806D4FE:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8041D00
mov r3, r8
ldr r1, [r3]
ldr r3, _0806D524
adds r0, r4, 0
movs r2, 0xC
bl sub_806F324
_0806D514:
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806D524: .4byte 0x000001f9
thumb_func_end sub_806D010
thumb_func_start sub_806D528
sub_806D528:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x58
mov r9, r0
adds r7, r1, 0
adds r5, r2, 0
str r3, [sp, 0x4C]
ldr r0, [sp, 0x7C]
lsls r0, 16
asrs r0, 16
str r0, [sp, 0x50]
movs r0, 0
str r0, [sp, 0x54]
mov r10, r0
mov r8, r0
mov r1, r10
strb r1, [r5, 0xF]
adds r0, r7, 0
bl sub_80450F8
cmp r0, 0x1
beq _0806D55C
b _0806D754
_0806D55C:
ldr r6, [r7, 0x70]
mov r0, r9
adds r1, r7, 0
bl sub_807A96C
mov r0, r9
adds r1, r7, 0
bl sub_806F450
mov r0, r9
bl sub_80450F8
cmp r0, 0x1
bne _0806D592
mov r2, r9
ldr r0, [r2, 0x70]
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0x3
bne _0806D592
ldrb r0, [r5, 0xE]
cmp r0, 0
bne _0806D592
ldr r0, _0806D5C8
movs r3, 0
ldrsh r0, [r0, r3]
str r0, [r5]
_0806D592:
ldr r0, _0806D5CC
ldr r1, [sp, 0x50]
cmp r1, r0
beq _0806D5DC
adds r0, r7, 0
movs r1, 0xD
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D5DC
ldr r1, [r5]
ldr r0, _0806D5D0
cmp r1, r0
bne _0806D5DC
ldr r0, _0806D5D4
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0806D5D8
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
b _0806D71E
.align 2, 0
_0806D5C8: .4byte gUnknown_80F4F8C
_0806D5CC: .4byte 0x0000020e
_0806D5D0: .4byte 0x0000270f
_0806D5D4: .4byte gUnknown_202DFE8
_0806D5D8: .4byte gUnknown_80FCA90
_0806D5DC:
adds r0, r6, 0
adds r0, 0xB0
ldrb r4, [r0]
mov r10, r0
cmp r4, 0x1
bne _0806D618
ldr r0, _0806D610
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0806D614
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
mov r0, r9
adds r1, r7, 0
bl sub_8042238
strb r4, [r5, 0xF]
_0806D608:
movs r0, 0
bl _0806E0F0
.align 2, 0
_0806D610: .4byte gUnknown_202DFE8
_0806D614: .4byte gUnknown_80F9600
_0806D618:
adds r0, r6, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _0806D62A
cmp r0, 0x5
beq _0806D62A
cmp r0, 0x3
bne _0806D63A
_0806D62A:
adds r0, r6, 0
adds r0, 0xA9
ldrb r0, [r0]
cmp r0, 0x7F
bne _0806D63A
adds r0, r7, 0
bl sub_807A9B0
_0806D63A:
adds r0, r7, 0
movs r1, 0x23
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D660
ldrb r0, [r5, 0xC]
cmp r0, 0x5
bne _0806D660
_0806D64E:
ldr r2, [r5]
movs r0, 0
str r0, [sp]
mov r0, r9
adds r1, r7, 0
movs r3, 0
bl sub_8077C44
b _0806D754
_0806D660:
adds r0, r7, 0
movs r1, 0x24
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806D674
ldrb r0, [r5, 0xC]
cmp r0, 0x3
beq _0806D64E
_0806D674:
movs r2, 0xA9
lsls r2, 1
adds r0, r6, r2
ldrb r0, [r0]
cmp r0, 0
bne _0806D6D0
ldrb r0, [r5, 0xD]
cmp r0, 0
beq _0806D692
ldr r0, _0806D6A4
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D692:
ldr r0, [r5, 0x8]
cmp r0, 0x1
beq _0806D6B0
cmp r0, 0x1
bcc _0806D6A8
cmp r0, 0x3
beq _0806D6C4
b _0806D6D0
.align 2, 0
_0806D6A4: .4byte gUnknown_80F9614
_0806D6A8:
ldr r0, _0806D6AC
b _0806D6B2
.align 2, 0
_0806D6AC: .4byte gUnknown_80F9630
_0806D6B0:
ldr r0, _0806D6C0
_0806D6B2:
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
b _0806D6D0
.align 2, 0
_0806D6C0: .4byte gUnknown_80F9654
_0806D6C4:
ldr r0, _0806D728
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D6D0:
ldr r4, _0806D72C
adds r0, r4, 0
mov r1, r9
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r1, [r5]
cmp r1, 0
bne _0806D760
mov r0, r9
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0806D734
adds r0, r7, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0806D734
movs r3, 0xA9
lsls r3, 1
adds r0, r6, r3
ldrb r0, [r0]
cmp r0, 0
bne _0806D71E
ldr r0, _0806D730
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D71E:
mov r0, r9
adds r1, r7, 0
bl sub_8042238
b _0806D754
.align 2, 0
_0806D728: .4byte gUnknown_80F9670
_0806D72C: .4byte gUnknown_202DF98
_0806D730: .4byte gUnknown_80F9688
_0806D734:
movs r1, 0xA9
lsls r1, 1
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
bne _0806D74C
ldr r0, _0806D75C
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D74C:
movs r0, 0x1E
movs r1, 0x18
bl sub_803E708
_0806D754:
movs r0, 0x1
strb r0, [r5, 0xF]
b _0806D608
.align 2, 0
_0806D75C: .4byte gUnknown_80F9688
_0806D760:
ldr r0, _0806D7B8
cmp r1, r0
bne _0806D7C4
ldr r0, [sp, 0x80]
cmp r0, 0
beq _0806D796
adds r0, r7, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0806D796
adds r0, r7, 0
bl sub_8045128
mov r8, r0
movs r0, 0x14
movs r1, 0x18
bl sub_803E708
mov r2, r8
ldrh r1, [r2, 0x4]
movs r0, 0x4
orrs r0, r1
strh r0, [r2, 0x4]
bl sub_8049ED4
_0806D796:
movs r3, 0xA9
lsls r3, 1
adds r0, r6, r3
ldrb r0, [r0]
cmp r0, 0
bne _0806D7AE
ldr r0, _0806D7BC
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D7AE:
adds r1, r6, 0
adds r1, 0xA0
ldr r0, _0806D7C0
str r0, [r1]
b _0806D84A
.align 2, 0
_0806D7B8: .4byte 0x0000270f
_0806D7BC: .4byte gUnknown_80F96A8
_0806D7C0: .4byte 0x000003e7
_0806D7C4:
ldr r0, _0806D824
str r1, [r0]
ldr r1, _0806D828
ldr r0, [r5, 0x4]
lsls r0, 2
adds r0, r1
ldr r4, [r0]
adds r2, r6, 0
adds r2, 0xA0
ldr r0, [r2]
ldr r1, [r5]
adds r0, r1
str r0, [r2]
ldr r1, _0806D82C
cmp r0, r1
ble _0806D7E6
str r1, [r2]
_0806D7E6:
adds r0, r7, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0806D830
ldr r0, [r5, 0x4]
cmp r0, 0xE
beq _0806D808
ldr r0, [r5]
negs r0, r0
movs r3, 0x1
negs r3, r3
adds r1, r7, 0
movs r2, 0x1
bl sub_803ED30
_0806D808:
movs r1, 0xA9
lsls r1, 1
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
bne _0806D84A
cmp r4, 0
beq _0806D84A
mov r0, r9
adds r1, r7, 0
adds r2, r4, 0
bl sub_80522F4
b _0806D84A
.align 2, 0
_0806D824: .4byte gUnknown_202DE30
_0806D828: .4byte gUnknown_80F9764
_0806D82C: .4byte 0x000003e7
_0806D830:
movs r2, 0xA9
lsls r2, 1
adds r0, r6, r2
ldrb r0, [r0]
cmp r0, 0
bne _0806D84A
cmp r4, 0
beq _0806D84A
mov r0, r9
adds r1, r7, 0
adds r2, r4, 0
bl sub_80522F4
_0806D84A:
ldr r0, [r5, 0x4]
cmp r0, 0xE
bne _0806D858
movs r3, 0xE
ldrsh r0, [r6, r3]
cmp r0, 0x1
bgt _0806D900
_0806D858:
mov r0, r8
cmp r0, 0
bne _0806D900
adds r0, r7, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0806D900
mov r2, r9
ldr r1, [r2, 0x4]
ldr r0, [r7, 0x4]
cmp r1, r0
beq _0806D8E6
mov r0, r9
bl sub_80450F8
cmp r0, 0x1
bne _0806D8E6
movs r4, 0
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _0806D8B4
ldr r0, _0806D8B0
ldr r0, [r0]
ldrb r0, [r0, 0x2]
cmp r0, 0
beq _0806D8B6
adds r0, r7, 0
bl sub_806A458
lsls r0, 24
cmp r0, 0
bne _0806D8B6
adds r0, r7, 0
mov r1, r9
bl sub_8045990
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r4, r1, 31
b _0806D8B6
.align 2, 0
_0806D8B0: .4byte gUnknown_203B46C
_0806D8B4:
movs r4, 0
_0806D8B6:
adds r0, r6, 0
adds r0, 0xE8
ldrb r0, [r0]
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0806D8C8
movs r4, 0
_0806D8C8:
cmp r4, 0
beq _0806D8E0
ldr r4, [r7, 0x70]
adds r0, r7, 0x4
mov r1, r9
adds r1, 0x4
bl sub_80983D8
movs r1, 0x7
ands r0, r1
adds r4, 0x46
strb r0, [r4]
_0806D8E0:
adds r0, r7, 0
bl sub_8069DCC
_0806D8E6:
ldr r0, [r7, 0x70]
adds r0, 0x46
ldrb r2, [r0]
adds r0, r7, 0
movs r1, 0x6
bl sub_806CDD4
adds r0, r7, 0
adds r1, r5, 0
bl sub_80420E8
movs r3, 0x1
str r3, [sp, 0x54]
_0806D900:
movs r0, 0xE
ldrsh r4, [r6, r0]
ldr r1, [r5]
cmp r4, r1
ble _0806D910
ldrh r0, [r6, 0xE]
subs r0, r1
b _0806D912
_0806D910:
movs r0, 0
_0806D912:
strh r0, [r6, 0xE]
adds r0, r6, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x9
bne _0806D93C
movs r1, 0xE
ldrsh r0, [r6, r1]
cmp r0, 0
bne _0806D958
movs r0, 0x1
strh r0, [r6, 0xE]
ldr r0, _0806D938
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
b _0806D958
.align 2, 0
_0806D938: .4byte gUnknown_8100548
_0806D93C:
ldr r2, [sp, 0x4C]
cmp r2, 0x1
bne _0806D958
movs r3, 0xE
ldrsh r0, [r6, r3]
cmp r0, 0
bne _0806D958
strh r2, [r6, 0xE]
ldr r0, _0806D9C8
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
_0806D958:
movs r1, 0xE
ldrsh r0, [r6, r1]
subs r4, r0
cmp r4, 0
bge _0806D964
movs r4, 0
_0806D964:
ldr r2, [sp, 0x54]
cmp r2, 0
bne _0806D970
mov r3, r8
cmp r3, 0
beq _0806D978
_0806D970:
movs r0, 0xA
movs r1, 0x18
bl sub_803E708
_0806D978:
movs r1, 0xE
ldrsh r0, [r6, r1]
cmp r0, 0
beq _0806D9D4
ldr r2, [sp, 0x54]
cmp r2, 0
beq _0806D98E
adds r0, r7, 0
movs r1, 0x8
bl sub_806CE68
_0806D98E:
adds r0, r7, 0
movs r1, 0x10
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806D9B2
cmp r4, 0
ble _0806D9B2
ldr r1, [r5]
ldr r0, _0806D9CC
cmp r1, r0
beq _0806D9B2
mov r0, r9
adds r1, r7, 0
adds r2, r4, 0
bl sub_8071D4C
_0806D9B2:
mov r3, r8
cmp r3, 0
bne _0806D9BA
b _0806D608
_0806D9BA:
ldrh r1, [r3, 0x4]
ldr r0, _0806D9D0
ands r0, r1
strh r0, [r3, 0x4]
bl sub_8049ED4
b _0806D608
.align 2, 0
_0806D9C8: .4byte gUnknown_810056C
_0806D9CC: .4byte 0x0000270f
_0806D9D0: .4byte 0x0000fffb
_0806D9D4:
adds r0, r6, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x2
bne _0806D9E6
mov r0, r9
adds r1, r7, 0
bl sub_807A7C8
_0806D9E6:
mov r0, r8
cmp r0, 0
beq _0806DA18
movs r0, 0x14
movs r1, 0x18
bl sub_803E708
adds r1, r7, 0
adds r1, 0x22
movs r0, 0x2
strb r0, [r1]
movs r0, 0xA
movs r1, 0x18
bl sub_803E708
mov r2, r8
ldrh r1, [r2, 0x4]
ldr r0, _0806DA14
ands r0, r1
strh r0, [r2, 0x4]
bl sub_8049ED4
b _0806DA2E
.align 2, 0
_0806DA14: .4byte 0x0000fffb
_0806DA18:
ldr r3, [sp, 0x54]
cmp r3, 0
beq _0806DA2E
adds r1, r7, 0
adds r1, 0x22
movs r0, 0x1
strb r0, [r1]
movs r0, 0x1E
movs r1, 0x18
bl sub_803E708
_0806DA2E:
movs r0, 0x1
mov r8, r0
mov r0, r9
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806DA50
mov r0, r9
bl sub_80450F8
cmp r0, 0x1
bne _0806DA50
cmp r9, r7
beq _0806DA50
movs r1, 0
mov r8, r1
_0806DA50:
movs r2, 0xA6
lsls r2, 1
adds r1, r6, r2
movs r0, 0
strb r0, [r1]
ldr r4, _0806DA88
adds r0, r4, 0
mov r1, r9
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r5, 0x4]
subs r0, 0x13
cmp r0, 0x1
bhi _0806DA9C
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _0806DA90
ldr r0, _0806DA8C
ldr r2, [r0]
b _0806DAC2
.align 2, 0
_0806DA88: .4byte gUnknown_202DF98
_0806DA8C: .4byte gUnknown_80F9E44
_0806DA90:
ldr r0, _0806DA98
ldr r1, [r0]
b _0806DB86
.align 2, 0
_0806DA98: .4byte gUnknown_80F9E44
_0806DA9C:
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _0806DAD0
adds r0, r6, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806DAB8
ldr r0, _0806DAB4
mov r3, r8
lsls r1, r3, 2
b _0806DB82
.align 2, 0
_0806DAB4: .4byte gUnknown_80F9DF0
_0806DAB8:
ldr r0, _0806DACC
mov r2, r8
lsls r1, r2, 2
adds r1, r0
ldr r2, [r1]
_0806DAC2:
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
b _0806DBA4
.align 2, 0
_0806DACC: .4byte gUnknown_80F9CC0
_0806DAD0:
ldr r2, _0806DB04
ldrb r1, [r6, 0xA]
movs r0, 0x64
muls r0, r1
ldr r3, _0806DB08
adds r0, r3
ldr r1, [r2]
adds r3, r1, r0
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0806DB00
adds r0, r6, 0
adds r0, 0x40
ldrb r1, [r0]
adds r2, r0, 0
cmp r1, 0x41
bne _0806DB18
ldr r0, _0806DB0C
ldr r0, [r0]
ldr r1, _0806DB10
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0806DB18
_0806DB00:
ldr r0, _0806DB14
b _0806DB7E
.align 2, 0
_0806DB04: .4byte gUnknown_203B45C
_0806DB08: .4byte 0x00008df8
_0806DB0C: .4byte gUnknown_203B418
_0806DB10: .4byte 0x0000065c
_0806DB14: .4byte gUnknown_80F9CEC
_0806DB18:
ldrb r0, [r2]
cmp r0, 0x4A
beq _0806DB22
cmp r0, 0x47
bne _0806DB26
_0806DB22:
movs r0, 0x1
b _0806DB28
_0806DB26:
movs r0, 0
_0806DB28:
cmp r0, 0
beq _0806DB38
ldr r0, _0806DB34
mov r3, r8
lsls r1, r3, 2
b _0806DB82
.align 2, 0
_0806DB34: .4byte gUnknown_80F9DAC
_0806DB38:
adds r0, r6, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806DB4C
ldr r0, _0806DB48
b _0806DB7E
.align 2, 0
_0806DB48: .4byte gUnknown_80F9DF0
_0806DB4C:
movs r1, 0xA
ldrsh r0, [r3, r1]
bl sub_806A58C
lsls r0, 24
cmp r0, 0
beq _0806DB94
ldr r0, _0806DB70
ldr r0, [r0]
ldr r2, _0806DB74
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _0806DB7C
ldr r0, _0806DB78
mov r3, r8
lsls r1, r3, 2
b _0806DB82
.align 2, 0
_0806DB70: .4byte gUnknown_203B418
_0806DB74: .4byte 0x0000065d
_0806DB78: .4byte gUnknown_80F9D8C
_0806DB7C:
ldr r0, _0806DB90
_0806DB7E:
mov r2, r8
lsls r1, r2, 2
_0806DB82:
adds r1, r0
ldr r1, [r1]
_0806DB86:
mov r0, r9
bl sub_805239C
b _0806DBA4
.align 2, 0
_0806DB90: .4byte gUnknown_80F9D84
_0806DB94:
ldr r0, _0806DC4C
mov r3, r8
lsls r1, r3, 2
adds r1, r0
ldr r1, [r1]
mov r0, r9
bl sub_805239C
_0806DBA4:
mov r1, r10
ldrb r0, [r1]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0806DBBC
adds r0, r6, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_0806DBBC:
adds r1, r6, 0
adds r1, 0x60
ldrb r3, [r1]
movs r2, 0x1
mov r8, r2
mov r0, r8
ands r0, r3
adds r5, r1, 0
cmp r0, 0
beq _0806DC5C
movs r0, 0x8
ands r0, r3
cmp r0, 0
bne _0806DC5C
movs r0, 0x2
ands r0, r3
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _0806DC5C
ldrb r0, [r5, 0x2]
cmp r0, 0xD2
bne _0806DC5C
adds r0, r7, 0
bl sub_8042148
adds r0, r7, 0
adds r0, 0x22
strb r4, [r0]
ldrh r0, [r6, 0x10]
movs r2, 0
strh r0, [r6, 0xE]
movs r3, 0xAC
lsls r3, 1
adds r0, r6, r3
strb r2, [r0]
movs r1, 0xA6
lsls r1, 1
adds r0, r6, r1
mov r3, r8
strb r3, [r0]
movs r0, 0x9E
lsls r0, 1
adds r1, r6, r0
movs r3, 0xA0
lsls r3, 1
adds r0, r6, r3
ldr r0, [r0]
str r0, [r1]
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _0806DC36
ldr r0, _0806DC50
ldr r1, [r0]
ldr r3, _0806DC54
adds r1, r3
strb r2, [r1]
ldr r0, [r0]
ldr r1, _0806DC58
adds r0, r1
strb r2, [r0]
_0806DC36:
strb r2, [r5, 0x2]
strb r2, [r5, 0x1]
strb r2, [r5]
adds r0, r6, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x3
bne _0806DC48
b _0806DEC8
_0806DC48:
b _0806DEE4
.align 2, 0
_0806DC4C: .4byte gUnknown_80F9D28
_0806DC50: .4byte gUnknown_203B418
_0806DC54: .4byte 0x00000679
_0806DC58: .4byte 0x00000676
_0806DC5C:
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0806DC64
b _0806DDFC
_0806DC64:
mov r10, r5
ldrb r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0806DC72
b _0806DDFC
_0806DC72:
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0806DC7C
b _0806DDFC
_0806DC7C:
ldrb r0, [r5, 0x2]
cmp r0, 0xD8
beq _0806DC84
b _0806DDFC
_0806DC84:
movs r4, 0
_0806DC86:
ldr r0, _0806DD80
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _0806DD84
adds r0, r2
adds r0, r1
ldr r0, [r0]
mov r8, r0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806DCDE
cmp r8, r7
beq _0806DCDE
adds r0, r7, 0
mov r1, r8
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0806DCDE
mov r3, r8
movs r0, 0x4
ldrsh r1, [r3, r0]
movs r2, 0x4
ldrsh r0, [r7, r2]
subs r1, r0
cmp r1, 0
bge _0806DCC4
negs r1, r1
_0806DCC4:
cmp r1, 0x1
bgt _0806DCDE
mov r3, r8
movs r0, 0x6
ldrsh r1, [r3, r0]
movs r2, 0x6
ldrsh r0, [r7, r2]
subs r1, r0
cmp r1, 0
bge _0806DCDA
negs r1, r1
_0806DCDA:
cmp r1, 0x1
ble _0806DCE4
_0806DCDE:
adds r4, 0x1
cmp r4, 0x3
ble _0806DC86
_0806DCE4:
cmp r4, 0x4
bne _0806DCEA
b _0806DDFC
_0806DCEA:
adds r0, r7, 0
bl sub_8042148
mov r3, r8
ldr r4, [r3, 0x4]
ldr r1, _0806DD88
mov r0, r8
adds r2, r7, 0
bl sub_8068FE0
lsls r1, r4, 16
asrs r1, 16
asrs r4, 16
adds r0, r7, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_80694C0
adds r0, r7, 0
movs r1, 0
bl sub_804535C
adds r1, r7, 0
adds r1, 0x22
movs r0, 0
strb r0, [r1]
ldrh r0, [r6, 0x10]
movs r4, 0
strh r0, [r6, 0xE]
adds r0, r7, 0
bl sub_8042A24
movs r1, 0xAC
lsls r1, 1
adds r0, r6, r1
strb r4, [r0]
movs r2, 0xA6
lsls r2, 1
adds r1, r6, r2
movs r0, 0x1
strb r0, [r1]
movs r3, 0x9E
lsls r3, 1
adds r1, r6, r3
subs r2, 0xC
adds r0, r6, r2
ldr r0, [r0]
str r0, [r1]
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _0806DD62
ldr r0, _0806DD80
ldr r1, [r0]
ldr r3, _0806DD8C
adds r1, r3
strb r4, [r1]
ldr r0, [r0]
ldr r1, _0806DD90
adds r0, r1
strb r4, [r0]
_0806DD62:
mov r2, r10
strb r4, [r2, 0x2]
strb r4, [r2, 0x1]
strb r4, [r2]
adds r0, r6, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x3
bne _0806DD94
mov r0, r9
adds r1, r7, 0
movs r2, 0x3
bl sub_807A5D0
b _0806DDA2
.align 2, 0
_0806DD80: .4byte gUnknown_203B418
_0806DD84: .4byte 0x0001357c
_0806DD88: .4byte 0x00000221
_0806DD8C: .4byte 0x00000679
_0806DD90: .4byte 0x00000676
_0806DD94:
cmp r0, 0x2
bne _0806DDA2
mov r0, r9
adds r1, r7, 0
movs r2, 0x2
bl sub_807A5D0
_0806DDA2:
adds r0, r7, 0
bl sub_8078084
adds r0, r6, 0
movs r1, 0
bl sub_806BFC0
bl sub_800DBBC
adds r0, r7, 0
bl sub_806A390
adds r0, r7, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r7, 0
bl sub_806CCB4
adds r0, r7, 0
bl sub_80418D4
ldr r4, _0806DDF0
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _0806DDF4
b _0806DF2E
.align 2, 0
_0806DDF0: .4byte gUnknown_202DF98
_0806DDF4: .4byte gUnknown_80FD484
_0806DDF8:
mov r4, r8
b _0806DE64
_0806DDFC:
adds r0, r7, 0
movs r1, 0x16
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0806DE0C
b _0806DF48
_0806DE0C:
movs r4, 0
ldrb r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806DE28
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0806DE28
ldrb r0, [r5, 0x2]
cmp r0, 0x3A
bne _0806DE28
adds r4, r5, 0
_0806DE28:
cmp r4, 0
bne _0806DE68
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _0806DE64
movs r3, 0
ldr r0, _0806DED4
ldr r2, [r0]
mov r12, r2
movs r0, 0x1
mov r10, r0
_0806DE3E:
lsls r0, r3, 2
add r0, r12
mov r8, r0
ldrb r1, [r2]
mov r0, r10
ands r0, r1
cmp r0, 0
beq _0806DE5C
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0806DE5C
ldrb r0, [r2, 0x2]
cmp r0, 0x3A
beq _0806DDF8
_0806DE5C:
adds r2, 0x4
adds r3, 0x1
cmp r3, 0x13
ble _0806DE3E
_0806DE64:
cmp r4, 0
beq _0806DF48
_0806DE68:
adds r0, r7, 0
bl sub_8042148
adds r0, r4, 0
movs r1, 0x46
movs r2, 0x2
bl sub_8045C28
adds r1, r7, 0
adds r1, 0x22
movs r0, 0
strb r0, [r1]
ldrh r0, [r6, 0x10]
movs r2, 0
strh r0, [r6, 0xE]
movs r1, 0xAC
lsls r1, 1
adds r0, r6, r1
strb r2, [r0]
movs r3, 0xA6
lsls r3, 1
adds r1, r6, r3
movs r0, 0x1
strb r0, [r1]
movs r0, 0x9E
lsls r0, 1
adds r1, r6, r0
subs r3, 0xC
adds r0, r6, r3
ldr r0, [r0]
str r0, [r1]
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _0806DEBE
ldr r0, _0806DED8
ldr r1, [r0]
ldr r3, _0806DEDC
adds r1, r3
strb r2, [r1]
ldr r0, [r0]
ldr r1, _0806DEE0
adds r0, r1
strb r2, [r0]
_0806DEBE:
adds r0, r6, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x3
bne _0806DEE4
_0806DEC8:
mov r0, r9
adds r1, r7, 0
movs r2, 0x3
bl sub_807A5D0
b _0806DEF2
.align 2, 0
_0806DED4: .4byte gUnknown_203B460
_0806DED8: .4byte gUnknown_203B418
_0806DEDC: .4byte 0x00000679
_0806DEE0: .4byte 0x00000676
_0806DEE4:
cmp r0, 0x2
bne _0806DEF2
mov r0, r9
adds r1, r7, 0
movs r2, 0x2
bl sub_807A5D0
_0806DEF2:
adds r0, r7, 0
bl sub_8078084
adds r0, r6, 0
movs r1, 0
bl sub_806BFC0
bl sub_800DBBC
adds r0, r7, 0
bl sub_806A390
adds r0, r7, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r7, 0
bl sub_806CCB4
adds r0, r7, 0
bl sub_80418D4
ldr r0, _0806DF40
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0806DF44
_0806DF2E:
ldr r1, [r0]
mov r0, r9
bl sub_805239C
adds r0, r7, 0
bl sub_806F63C
bl _0806D608
.align 2, 0
_0806DF40: .4byte gUnknown_202DFE8
_0806DF44: .4byte gUnknown_80FD46C
_0806DF48:
ldrb r4, [r6, 0x7]
cmp r4, 0
bne _0806DF68
ldrb r1, [r5]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806DF68
adds r1, r7, 0x4
adds r0, r7, 0
adds r2, r5, 0
bl sub_80464C8
strb r4, [r5, 0x2]
strb r4, [r5, 0x1]
strb r4, [r5]
_0806DF68:
adds r0, r6, 0
adds r0, 0xF7
ldrb r0, [r0]
cmp r0, 0
beq _0806DF7E
ldr r0, _0806E02C
ldr r0, [r0]
ldr r2, _0806E030
adds r0, r2
ldr r1, _0806E034
strh r1, [r0]
_0806DF7E:
movs r3, 0
mov r10, r3
mov r0, r9
bl sub_80450F8
cmp r0, 0x1
bne _0806E066
mov r0, r9
ldr r4, [r0, 0x70]
movs r1, 0x2
ldrsh r0, [r6, r1]
ldrb r1, [r6, 0x9]
bl sub_808DD18
adds r5, r0, 0
adds r0, r6, 0
adds r0, 0xFB
ldrb r0, [r0]
cmp r0, 0
beq _0806DFAE
cmp r0, 0x2
bne _0806DFB4
lsls r0, r5, 1
adds r5, r0, r5
_0806DFAE:
lsrs r0, r5, 31
adds r0, r5, r0
asrs r5, r0, 1
_0806DFB4:
cmp r5, 0
bne _0806DFBA
movs r5, 0x1
_0806DFBA:
ldrb r0, [r4, 0x7]
cmp r0, 0
beq _0806DFC8
movs r2, 0x2
ldrsh r0, [r6, r2]
bl sub_80980B4
_0806DFC8:
adds r0, r6, 0
adds r0, 0xF4
ldrb r0, [r0]
cmp r0, 0
beq _0806DFDA
ldr r3, _0806E038
adds r1, r4, r3
movs r0, 0x1
strb r0, [r1]
_0806DFDA:
ldr r0, [sp, 0x78]
cmp r0, 0x1
bne _0806E066
ldrb r0, [r4, 0x6]
cmp r0, 0
bne _0806E040
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _0806E066
mov r0, r9
mov r1, r9
adds r2, r5, 0
bl sub_8071D4C
movs r6, 0
_0806DFF8:
ldr r0, _0806E02C
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0806E03C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806E020
cmp r4, r9
beq _0806E020
mov r0, r9
adds r1, r4, 0
adds r2, r5, 0
bl sub_8071D4C
_0806E020:
adds r6, 0x1
cmp r6, 0x3
ble _0806DFF8
movs r3, 0x1
mov r10, r3
b _0806E066
.align 2, 0
_0806E02C: .4byte gUnknown_203B418
_0806E030: .4byte 0x0000066a
_0806E034: .4byte 0x000003e7
_0806E038: .4byte 0x0000014b
_0806E03C: .4byte 0x0001357c
_0806E040:
ldr r5, _0806E0BC
ldr r0, [r5]
ldr r1, _0806E0C0
adds r0, r1
ldrb r0, [r0]
bl sub_809033C
lsls r0, 24
cmp r0, 0
beq _0806E066
ldr r2, _0806E0C4
adds r0, r4, r2
add r3, sp, 0x78
ldrb r3, [r3]
strb r3, [r0]
ldr r0, [r5]
add r1, sp, 0x78
ldrb r1, [r1]
strb r1, [r0, 0xD]
_0806E066:
mov r0, r9
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806E08A
mov r0, r9
bl sub_80450F8
cmp r0, 0x1
bne _0806E08A
mov r2, r9
ldr r0, [r2, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
bne _0806E08A
movs r3, 0
mov r10, r3
_0806E08A:
mov r0, r10
cmp r0, 0
beq _0806E0E4
add r0, sp, 0x4
adds r1, r7, 0
bl sub_8069D4C
mov r0, r9
adds r1, r7, 0
bl sub_806F660
lsls r0, 24
cmp r0, 0
beq _0806E0D8
mov r0, r9
adds r1, r7, 0
add r2, sp, 0x4
bl sub_806FA5C
lsls r0, 24
cmp r0, 0
bne _0806E0CC
ldr r1, _0806E0C8
adds r0, r7, 0
b _0806E0DC
.align 2, 0
_0806E0BC: .4byte gUnknown_203B418
_0806E0C0: .4byte 0x00000644
_0806E0C4: .4byte 0x00000149
_0806E0C8: .4byte 0x000001f5
_0806E0CC:
ldr r1, _0806E0D4
movs r0, 0x1
strb r0, [r1]
b _0806E0EE
.align 2, 0
_0806E0D4: .4byte gUnknown_202F221
_0806E0D8:
adds r0, r7, 0
ldr r1, [sp, 0x50]
_0806E0DC:
mov r2, r9
bl sub_8068FE0
b _0806E0EE
_0806E0E4:
adds r0, r7, 0
ldr r1, [sp, 0x50]
mov r2, r9
bl sub_8068FE0
_0806E0EE:
movs r0, 0x1
_0806E0F0:
add sp, 0x58
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806D528
thumb_func_start sub_806E100
sub_806E100:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x28
adds r6, r0, 0
mov r8, r1
str r2, [sp, 0x18]
lsls r3, 24
lsrs r7, r3, 24
movs r0, 0
mov r9, r0
movs r1, 0
str r1, [sp, 0x20]
mov r2, r8
ldr r2, [r2, 0x70]
str r2, [sp, 0x24]
ldr r3, [sp, 0x18]
ldr r3, [r3, 0x70]
mov r10, r3
adds r0, r6, 0
movs r1, 0x1
bl sub_800A020
mov r0, r9
ldr r4, [sp, 0x48]
strb r0, [r4, 0xD]
strb r0, [r4, 0xE]
movs r1, 0
str r1, [sp, 0x1C]
ldr r0, [sp, 0x18]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806E14E
movs r0, 0x1
b _0806E61A
_0806E14E:
cmp r7, 0x1
beq _0806E156
cmp r7, 0x7
bne _0806E15A
_0806E156:
movs r2, 0x1
str r2, [sp, 0x20]
_0806E15A:
ldr r0, [sp, 0x18]
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E170
cmp r7, 0
beq _0806E170
movs r3, 0x1
str r3, [sp, 0x1C]
_0806E170:
movs r0, 0x2
ldr r4, [sp, 0x48]
str r0, [r4, 0x8]
movs r5, 0
add r0, sp, 0x10
mov r9, r0
b _0806E1F2
_0806E17E:
mov r1, r10
adds r1, 0x5C
ldr r2, [sp, 0x20]
cmp r2, 0
beq _0806E1B4
adds r0, r1, r5
ldrb r0, [r0]
cmp r0, 0xE
bne _0806E1B4
mov r0, r10
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _0806E1B4
movs r4, 0
ldr r0, _0806E1AC
ldr r0, [r0]
ldr r3, _0806E1B0
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
b _0806E1CA
.align 2, 0
_0806E1AC: .4byte gUnknown_203B418
_0806E1B0: .4byte 0x00000179
_0806E1B4:
ldr r2, _0806E4E4
adds r0, r1, r5
ldrb r1, [r0]
lsls r1, 1
lsls r0, r7, 3
adds r0, r7
lsls r0, 2
adds r1, r0
adds r1, r2
movs r0, 0
ldrsh r4, [r1, r0]
_0806E1CA:
cmp r4, 0x2
beq _0806E1DC
lsls r0, r4, 2
add r0, sp
ldr r2, [r0]
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E1DC:
lsls r0, r5, 2
add r0, r9
str r4, [r0]
ldr r0, _0806E4E8
ldr r0, [r0]
movs r1, 0x9E
lsls r1, 1
adds r0, r1
adds r0, r5
strb r4, [r0]
adds r5, 0x1
_0806E1F2:
cmp r5, 0x1
bgt _0806E20E
mov r1, sp
ldr r0, _0806E4EC
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldr r0, [r0]
str r0, [r1]
adds r0, r6, 0
bl sub_800A2A0
lsls r0, 24
cmp r0, 0
beq _0806E17E
_0806E20E:
ldr r2, _0806E4F0
mov r1, r9
ldr r0, [r1, 0x4]
lsls r0, 2
ldr r1, [sp, 0x10]
lsls r1, 4
adds r0, r1
adds r0, r2
ldr r0, [r0]
ldr r2, [sp, 0x48]
str r0, [r2, 0x8]
movs r3, 0x1
mov r9, r3
cmp r0, 0x3
beq _0806E240
movs r4, 0
mov r9, r4
ldr r0, [sp, 0x1C]
cmp r0, 0
beq _0806E240
ldr r0, _0806E4F4
ldr r1, [r0, 0x4]
ldr r0, [r0]
str r0, [r6]
str r1, [r6, 0x4]
_0806E240:
cmp r7, 0x2
beq _0806E248
cmp r7, 0x6
bne _0806E26C
_0806E248:
ldr r0, [sp, 0x18]
movs r1, 0x2
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E26C
ldr r0, _0806E4E8
ldr r0, [r0]
ldr r2, _0806E4F8
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E4FC
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E26C:
cmp r7, 0x2
bne _0806E2A0
ldr r0, [sp, 0x18]
bl sub_807723C
lsls r0, 24
cmp r0, 0
beq _0806E2A0
ldr r0, _0806E4E8
ldr r0, [r0]
movs r3, 0xB7
lsls r3, 1
adds r0, r3
movs r4, 0
movs r5, 0x1
strb r5, [r0]
adds r0, r6, 0
movs r1, 0
bl sub_800A020
ldr r0, [sp, 0x48]
str r4, [r0, 0x8]
strb r4, [r0, 0xD]
strb r5, [r0, 0xE]
movs r1, 0
mov r9, r1
_0806E2A0:
cmp r7, 0x9
bne _0806E2D2
ldr r0, [sp, 0x18]
movs r1, 0x37
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E2D2
ldr r0, _0806E4E8
ldr r0, [r0]
ldr r2, _0806E500
adds r0, r2
movs r4, 0
movs r5, 0x1
strb r5, [r0]
adds r0, r6, 0
movs r1, 0
bl sub_800A020
ldr r3, [sp, 0x48]
str r4, [r3, 0x8]
strb r4, [r3, 0xD]
strb r5, [r3, 0xE]
mov r9, r4
_0806E2D2:
cmp r7, 0x3
bne _0806E340
mov r0, r8
movs r1, 0x10
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E340
movs r4, 0
ldr r0, [sp, 0x24]
movs r2, 0x10
ldrsh r1, [r0, r2]
cmp r1, 0
bge _0806E2F2
adds r1, 0x3
_0806E2F2:
asrs r1, 2
ldr r3, [sp, 0x24]
movs r2, 0xE
ldrsh r0, [r3, r2]
cmp r1, r0
blt _0806E300
movs r4, 0x1
_0806E300:
ldr r0, [sp, 0x24]
movs r1, 0x80
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r5, r0, 24
cmp r4, 0
beq _0806E32A
ldr r0, _0806E4E8
ldr r0, [r0]
movs r3, 0xB8
lsls r3, 1
adds r0, r3
movs r1, 0x1
strb r1, [r0]
ldr r2, _0806E504
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E32A:
cmp r5, 0
beq _0806E340
mov r0, r8
bl sub_80428EC
ldr r0, _0806E508
ldr r2, [r0]
mov r0, r8
ldr r1, [sp, 0x18]
bl sub_80522F4
_0806E340:
cmp r7, 0x4
bne _0806E3AC
mov r0, r8
movs r1, 0x1A
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E3AC
movs r4, 0
ldr r0, [sp, 0x24]
movs r2, 0x10
ldrsh r1, [r0, r2]
cmp r1, 0
bge _0806E360
adds r1, 0x3
_0806E360:
asrs r1, 2
ldr r3, [sp, 0x24]
movs r2, 0xE
ldrsh r0, [r3, r2]
cmp r1, r0
blt _0806E36E
movs r4, 0x1
_0806E36E:
ldr r0, [sp, 0x24]
movs r1, 0x2
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r5, r0, 24
cmp r4, 0
beq _0806E396
ldr r0, _0806E4E8
ldr r0, [r0]
ldr r3, _0806E50C
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E504
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E396:
cmp r5, 0
beq _0806E3AC
mov r0, r8
bl sub_80428D8
ldr r0, _0806E510
ldr r2, [r0]
mov r0, r8
ldr r1, [sp, 0x18]
bl sub_80522F4
_0806E3AC:
cmp r7, 0xC
bne _0806E41A
mov r0, r8
movs r1, 0x43
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E41A
movs r4, 0
ldr r0, [sp, 0x24]
movs r2, 0x10
ldrsh r1, [r0, r2]
cmp r1, 0
bge _0806E3CC
adds r1, 0x3
_0806E3CC:
asrs r1, 2
ldr r3, [sp, 0x24]
movs r2, 0xE
ldrsh r0, [r3, r2]
cmp r1, r0
blt _0806E3DA
movs r4, 0x1
_0806E3DA:
ldr r0, [sp, 0x24]
movs r1, 0x10
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r5, r0, 24
cmp r4, 0
beq _0806E404
ldr r0, _0806E4E8
ldr r0, [r0]
movs r3, 0xB9
lsls r3, 1
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E504
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E404:
cmp r5, 0
beq _0806E41A
mov r0, r8
bl sub_8042978
ldr r0, _0806E514
ldr r2, [r0]
mov r0, r8
ldr r1, [sp, 0x18]
bl sub_80522F4
_0806E41A:
cmp r7, 0x2
bne _0806E486
mov r0, r8
movs r1, 0x46
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E486
movs r4, 0
ldr r0, [sp, 0x24]
movs r2, 0x10
ldrsh r1, [r0, r2]
cmp r1, 0
bge _0806E43A
adds r1, 0x3
_0806E43A:
asrs r1, 2
ldr r3, [sp, 0x24]
movs r2, 0xE
ldrsh r0, [r3, r2]
cmp r1, r0
blt _0806E448
movs r4, 0x1
_0806E448:
ldr r0, [sp, 0x24]
movs r1, 0x20
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r5, r0, 24
cmp r4, 0
beq _0806E470
ldr r0, _0806E4E8
ldr r0, [r0]
ldr r3, _0806E518
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E504
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E470:
cmp r5, 0
beq _0806E486
mov r0, r8
bl sub_804298C
ldr r0, _0806E51C
ldr r2, [r0]
mov r0, r8
ldr r1, [sp, 0x18]
bl sub_80522F4
_0806E486:
adds r0, r6, 0
bl sub_800A2A0
lsls r0, 24
cmp r0, 0
bne _0806E4B8
mov r0, r8
adds r1, r7, 0
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0806E4B8
ldr r0, _0806E4E8
ldr r0, [r0]
movs r4, 0xBA
lsls r4, 1
adds r0, r4
movs r1, 0x1
strb r1, [r0]
ldr r2, _0806E520
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E4B8:
mov r0, r8
bl sub_807E580
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0x1
bne _0806E53E
cmp r7, 0x2
bne _0806E524
ldr r0, _0806E4E8
ldr r0, [r0]
movs r1, 0xB6
lsls r1, 1
adds r0, r1
strb r4, [r0]
ldr r2, _0806E520
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
b _0806E53E
.align 2, 0
_0806E4E4: .4byte gUnknown_80F522C
_0806E4E8: .4byte gUnknown_203B418
_0806E4EC: .4byte gUnknown_8106F54
_0806E4F0: .4byte gUnknown_80F54B4
_0806E4F4: .4byte gUnknown_8106EFC
_0806E4F8: .4byte 0x0000016d
_0806E4FC: .4byte gUnknown_8106F1C
_0806E500: .4byte 0x0000016f
_0806E504: .4byte gUnknown_8106F0C
_0806E508: .4byte gUnknown_80FEDA8
_0806E50C: .4byte 0x00000171
_0806E510: .4byte gUnknown_80FED88
_0806E514: .4byte gUnknown_80FEDC8
_0806E518: .4byte 0x00000173
_0806E51C: .4byte gUnknown_80FEDE8
_0806E520: .4byte gUnknown_8106F14
_0806E524:
cmp r7, 0x3
bne _0806E53E
ldr r0, _0806E560
ldr r0, [r0]
movs r2, 0xB6
lsls r2, 1
adds r0, r2
strb r4, [r0]
ldr r2, _0806E564
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E53E:
cmp r4, 0x4
bne _0806E586
cmp r7, 0x2
bne _0806E56C
ldr r0, _0806E560
ldr r0, [r0]
ldr r3, _0806E568
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E564
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
b _0806E586
.align 2, 0
_0806E560: .4byte gUnknown_203B418
_0806E564: .4byte gUnknown_8106F1C
_0806E568: .4byte 0x0000016b
_0806E56C:
cmp r7, 0x3
bne _0806E586
ldr r0, _0806E62C
ldr r0, [r0]
ldr r2, _0806E630
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E634
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E586:
cmp r4, 0x3
bne _0806E5A6
cmp r7, 0x1
beq _0806E5A6
ldr r2, _0806E638
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
ldr r0, _0806E62C
ldr r0, [r0]
movs r3, 0xB5
lsls r3, 1
adds r1, r0, r3
movs r0, 0x1
strb r0, [r1]
_0806E5A6:
ldr r0, _0806E62C
ldr r1, [r0]
ldr r2, _0806E63C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
bne _0806E5B8
cmp r4, 0x6
bne _0806E5CE
_0806E5B8:
cmp r7, 0x5
bne _0806E5CE
ldr r3, _0806E640
adds r1, r3
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E644
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E5CE:
ldr r0, _0806E62C
ldr r1, [r0]
ldr r4, _0806E648
adds r0, r1, r4
ldrb r0, [r0]
cmp r0, 0
beq _0806E5F4
cmp r7, 0x2
bne _0806E5F4
movs r0, 0xBB
lsls r0, 1
adds r1, r0
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E644
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E5F4:
cmp r7, 0x5
bne _0806E618
ldr r0, [sp, 0x24]
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0xB
bne _0806E618
ldr r0, _0806E62C
ldr r0, [r0]
ldr r2, _0806E64C
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
ldr r2, _0806E650
adds r0, r6, 0
adds r1, r6, 0
bl sub_800A34C
_0806E618:
mov r0, r9
_0806E61A:
add sp, 0x28
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806E62C: .4byte gUnknown_203B418
_0806E630: .4byte 0x0000016b
_0806E634: .4byte gUnknown_8106F14
_0806E638: .4byte gUnknown_8106F64
_0806E63C: .4byte 0x0000e277
_0806E640: .4byte 0x00000175
_0806E644: .4byte gUnknown_8106F1C
_0806E648: .4byte 0x0000e278
_0806E64C: .4byte 0x00000177
_0806E650: .4byte gUnknown_8106F0C
thumb_func_end sub_806E100
thumb_func_start sub_806E654
sub_806E654:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
mov r9, r0
str r1, [sp, 0x14]
lsls r2, 24
lsrs r4, r2, 24
movs r5, 0x1
movs r0, 0
str r0, [sp, 0x10]
adds r0, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0806E6DC
cmp r4, 0x1
beq _0806E682
cmp r4, 0x7
bne _0806E686
_0806E682:
movs r1, 0x1
str r1, [sp, 0x10]
_0806E686:
mov r2, r9
ldr r2, [r2, 0x70]
mov r8, r2
ldr r3, [sp, 0x14]
ldr r3, [r3, 0x70]
mov r10, r3
cmp r4, 0x2
bne _0806E6A2
ldr r0, [sp, 0x14]
bl sub_807723C
lsls r0, 24
cmp r0, 0
bne _0806E6C6
_0806E6A2:
cmp r4, 0x5
bne _0806E6B4
ldr r0, [sp, 0x14]
movs r1, 0x23
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806E6C6
_0806E6B4:
cmp r4, 0x3
bne _0806E6CA
ldr r0, [sp, 0x14]
movs r1, 0x24
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E6CA
_0806E6C6:
movs r0, 0
b _0806E894
_0806E6CA:
cmp r4, 0x9
bne _0806E6E0
ldr r0, [sp, 0x14]
movs r1, 0x37
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E6E0
_0806E6DC:
movs r0, 0x1
b _0806E894
_0806E6E0:
mov r6, r10
adds r6, 0x5C
str r6, [sp, 0x18]
lsls r0, r4, 3
adds r0, r4
lsls r0, 2
mov r12, r0
adds r2, r6, 0
_0806E6F0:
mov r0, sp
ldr r1, _0806E724
ldm r1!, {r3,r6,r7}
stm r0!, {r3,r6,r7}
ldr r1, [r1]
str r1, [r0]
ldr r7, [sp, 0x10]
cmp r7, 0
beq _0806E730
ldrb r0, [r2]
cmp r0, 0xE
bne _0806E730
mov r0, r10
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _0806E730
movs r3, 0
ldr r0, _0806E728
ldr r0, [r0]
ldr r6, _0806E72C
adds r1, r0, r6
movs r0, 0x1
strb r0, [r1]
b _0806E73E
.align 2, 0
_0806E724: .4byte gUnknown_8106F6C
_0806E728: .4byte gUnknown_203B418
_0806E72C: .4byte 0x00000179
_0806E730:
ldrb r0, [r2]
lsls r0, 1
add r0, r12
ldr r7, _0806E854
adds r0, r7
movs r1, 0
ldrsh r3, [r0, r1]
_0806E73E:
cmp r5, 0
beq _0806E75E
lsls r0, r3, 2
add r0, sp
ldr r0, [r0]
muls r5, r0
lsrs r0, r5, 31
adds r0, r5, r0
asrs r5, r0, 1
cmp r5, 0
beq _0806E84E
adds r2, 0x1
ldr r0, [sp, 0x18]
adds r0, 0x1
cmp r2, r0
ble _0806E6F0
_0806E75E:
cmp r4, 0x2
beq _0806E766
cmp r4, 0x6
bne _0806E774
_0806E766:
ldr r0, [sp, 0x14]
movs r1, 0x2
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806E84E
_0806E774:
cmp r4, 0x3
bne _0806E7A0
mov r0, r9
movs r1, 0x10
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E7A0
mov r2, r8
movs r3, 0x10
ldrsh r1, [r2, r3]
cmp r1, 0
bge _0806E792
adds r1, 0x3
_0806E792:
asrs r1, 2
mov r6, r8
movs r7, 0xE
ldrsh r0, [r6, r7]
cmp r1, r0
blt _0806E7A0
lsls r5, 1
_0806E7A0:
cmp r4, 0x4
bne _0806E7CC
mov r0, r9
movs r1, 0x1A
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E7CC
mov r0, r8
movs r2, 0x10
ldrsh r1, [r0, r2]
cmp r1, 0
bge _0806E7BE
adds r1, 0x3
_0806E7BE:
asrs r1, 2
mov r3, r8
movs r6, 0xE
ldrsh r0, [r3, r6]
cmp r1, r0
blt _0806E7CC
lsls r5, 1
_0806E7CC:
cmp r4, 0xC
bne _0806E7F8
mov r0, r9
movs r1, 0x43
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E7F8
mov r7, r8
movs r0, 0x10
ldrsh r1, [r7, r0]
cmp r1, 0
bge _0806E7EA
adds r1, 0x3
_0806E7EA:
asrs r1, 2
mov r2, r8
movs r3, 0xE
ldrsh r0, [r2, r3]
cmp r1, r0
blt _0806E7F8
lsls r5, 1
_0806E7F8:
cmp r4, 0x2
bne _0806E824
mov r0, r9
movs r1, 0x46
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E824
mov r6, r8
movs r7, 0x10
ldrsh r1, [r6, r7]
cmp r1, 0
bge _0806E816
adds r1, 0x3
_0806E816:
asrs r1, 2
mov r2, r8
movs r3, 0xE
ldrsh r0, [r2, r3]
cmp r1, r0
blt _0806E824
lsls r5, 1
_0806E824:
cmp r5, 0
beq _0806E84E
mov r0, r9
adds r1, r4, 0
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0806E838
lsls r5, 1
_0806E838:
mov r0, r9
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0806E85A
cmp r4, 0x2
beq _0806E858
cmp r4, 0x3
bne _0806E85A
_0806E84E:
movs r0, 0x2
b _0806E894
.align 2, 0
_0806E854: .4byte gUnknown_80F522C
_0806E858:
lsls r5, 1
_0806E85A:
ldr r0, _0806E8A4
ldr r1, [r0]
ldr r6, _0806E8A8
adds r1, r6
ldrb r1, [r1]
cmp r1, 0
beq _0806E86C
cmp r4, 0x5
beq _0806E84E
_0806E86C:
ldr r0, [r0]
ldr r7, _0806E8AC
adds r0, r7
ldrb r0, [r0]
cmp r0, 0
beq _0806E87C
cmp r4, 0x2
beq _0806E84E
_0806E87C:
cmp r4, 0x5
bne _0806E88C
mov r0, r8
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0xB
bne _0806E88C
lsls r5, 1
_0806E88C:
cmp r5, 0x2
ble _0806E892
movs r5, 0x3
_0806E892:
adds r0, r5, 0x2
_0806E894:
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806E8A4: .4byte gUnknown_203B418
_0806E8A8: .4byte 0x0000e277
_0806E8AC: .4byte 0x0000e278
thumb_func_end sub_806E654
thumb_func_start sub_806E8B0
sub_806E8B0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
adds r6, r0, 0
mov r9, r1
adds r0, r2, 0
str r3, [sp]
lsls r0, 24
lsrs r0, 24
movs r7, 0x1
movs r1, 0x1
mov r8, r1
movs r2, 0x1
str r2, [sp, 0x4]
str r1, [sp, 0x8]
bl sub_8092354
movs r2, 0
mov r10, r2
lsls r0, 24
cmp r0, 0
bne _0806E8E6
movs r0, 0x1
mov r10, r0
_0806E8E6:
adds r0, r6, 0
movs r1, 0x11
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E92C
ldr r5, [r6, 0x70]
adds r0, r6, 0
bl sub_8070A58
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
movs r1, 0x1
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r0, 24
cmp r4, 0
beq _0806E916
movs r7, 0x2
_0806E916:
cmp r0, 0
beq _0806E92C
adds r0, r6, 0
bl sub_80428B0
ldr r0, _0806EADC
ldr r2, [r0]
adds r0, r6, 0
mov r1, r9
bl sub_80522F4
_0806E92C:
adds r0, r6, 0
movs r1, 0x22
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806E948
adds r0, r6, 0
movs r1, 0x4B
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E98E
_0806E948:
ldr r2, [r6, 0x70]
movs r4, 0
ldr r0, [sp, 0x30]
cmp r0, 0x20
bgt _0806E95A
mov r1, r10
cmp r1, 0
bne _0806E95A
movs r4, 0x1
_0806E95A:
movs r1, 0x80
lsls r1, 1
adds r0, r2, 0
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r1, r0, 24
cmp r4, 0
beq _0806E978
lsls r0, r7, 1
adds r7, r0, r7
mov r2, r8
lsls r2, 1
mov r8, r2
_0806E978:
cmp r1, 0
beq _0806E98E
adds r0, r6, 0
bl sub_80428C4
ldr r0, _0806EAE0
ldr r2, [r0]
adds r0, r6, 0
mov r1, r9
bl sub_80522F4
_0806E98E:
adds r0, r6, 0
movs r1, 0x30
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E9AC
mov r0, r10
cmp r0, 0
bne _0806E9AC
lsls r0, r7, 1
adds r7, r0, r7
mov r1, r8
lsls r1, 1
mov r8, r1
_0806E9AC:
ldr r0, [r6, 0x70]
ldrb r0, [r0, 0x6]
movs r4, 0x1
cmp r0, 0
beq _0806E9B8
movs r4, 0
_0806E9B8:
adds r0, r6, 0
movs r1, 0x38
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806E9EA
mov r2, r10
cmp r2, 0x1
bne _0806E9EA
ldr r0, _0806EAE4
ldr r0, [r0]
ldr r1, _0806EAE8
adds r0, r1
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
beq _0806E9EA
lsls r0, r7, 4
subs r7, r0, r7
mov r2, r8
lsls r0, r2, 2
add r0, r8
lsls r0, 1
mov r8, r0
_0806E9EA:
adds r0, r6, 0
movs r1, 0x3F
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806EA1C
mov r0, r10
cmp r0, 0x1
bne _0806EA1C
ldr r0, _0806EAE4
ldr r0, [r0]
ldr r1, _0806EAEC
adds r0, r1
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
beq _0806EA1C
lsls r0, r7, 4
subs r7, r0, r7
mov r2, r8
lsls r0, r2, 2
add r0, r8
lsls r0, 1
mov r8, r0
_0806EA1C:
mov r0, r9
movs r1, 0x6
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806EA38
mov r0, r10
cmp r0, 0
bne _0806EA38
lsls r7, 2
mov r1, r8
lsls r0, r1, 2
add r8, r0
_0806EA38:
mov r0, r9
movs r1, 0x34
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806EA90
mov r2, r10
cmp r2, 0
bne _0806EA90
mov r0, r9
ldr r5, [r0, 0x70]
bl sub_8070A58
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
movs r1, 0x8
adds r2, r4, 0
bl sub_8071ACC
lsls r0, 24
lsrs r1, r0, 24
cmp r4, 0
beq _0806EA7A
ldr r2, [sp, 0x4]
lsls r0, r2, 1
adds r2, r0, r2
str r2, [sp, 0x4]
ldr r0, [sp, 0x8]
lsls r0, 1
str r0, [sp, 0x8]
_0806EA7A:
cmp r1, 0
beq _0806EA90
mov r0, r9
bl sub_8042940
ldr r0, _0806EAF0
ldr r2, [r0]
adds r0, r6, 0
mov r1, r9
bl sub_80522F4
_0806EA90:
ldr r1, [sp]
ldr r0, [r1]
muls r0, r7
str r0, [r1]
ldr r2, [sp, 0x2C]
ldr r0, [r2]
ldr r1, [sp, 0x4]
muls r0, r1
str r0, [r2]
mov r2, r8
cmp r2, 0x1
beq _0806EAB6
ldr r1, [sp]
ldr r0, [r1]
mov r1, r8
bl __divsi3
ldr r2, [sp]
str r0, [r2]
_0806EAB6:
ldr r0, [sp, 0x8]
cmp r0, 0x1
beq _0806EACA
ldr r1, [sp, 0x2C]
ldr r0, [r1]
ldr r1, [sp, 0x8]
bl __divsi3
ldr r2, [sp, 0x2C]
str r0, [r2]
_0806EACA:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806EADC: .4byte gUnknown_80FEE04
_0806EAE0: .4byte gUnknown_80FEE2C
_0806EAE4: .4byte gUnknown_203B418
_0806EAE8: .4byte 0x000037fa
_0806EAEC: .4byte 0x000037f8
_0806EAF0: .4byte gUnknown_80FEE54
thumb_func_end sub_806E8B0
thumb_func_start sub_806EAF4
sub_806EAF4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8C
str r0, [sp, 0x70]
mov r9, r1
adds r7, r3, 0
ldr r0, [sp, 0xB8]
ldr r1, [sp, 0xBC]
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x74]
lsls r0, 16
lsrs r4, r0, 16
lsls r1, 24
lsrs r1, 24
str r1, [sp, 0x78]
ldr r0, [sp, 0x70]
ldr r0, [r0, 0x70]
mov r10, r0
mov r1, r9
ldr r1, [r1, 0x70]
str r1, [sp, 0x7C]
adds r0, r2, 0
bl sub_8092354
movs r2, 0
str r2, [sp, 0x80]
lsls r0, 24
cmp r0, 0
bne _0806EB3A
movs r3, 0x1
str r3, [sp, 0x80]
_0806EB3A:
bl sub_806F500
mov r6, r10
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0806EB72
movs r0, 0x9E
lsls r0, 1
add r0, r10
ldr r0, [r0]
bl sub_8094450
adds r1, r0, 0
cmp r1, 0
bne _0806EB72
movs r0, 0x1
ldr r2, [sp, 0xB0]
str r0, [r2]
str r1, [r2, 0x4]
movs r0, 0x2
str r0, [r2, 0x8]
add r3, sp, 0x74
ldrb r3, [r3]
strb r3, [r2, 0xC]
strb r1, [r2, 0xD]
strb r1, [r2, 0xE]
strb r1, [r2, 0xF]
b _0806F294
_0806EB72:
ldr r0, _0806EBA4
cmp r4, r0
bne _0806EBA8
mov r0, r9
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806EBA8
movs r0, 0x1
ldr r6, [sp, 0xB0]
str r0, [r6]
movs r1, 0
str r1, [r6, 0x4]
movs r0, 0x2
str r0, [r6, 0x8]
add r0, sp, 0x74
ldrb r0, [r0]
strb r0, [r6, 0xC]
strb r1, [r6, 0xD]
strb r1, [r6, 0xE]
strb r1, [r6, 0xF]
b _0806F294
.align 2, 0
_0806EBA4: .4byte 0x00000163
_0806EBA8:
add r1, sp, 0x74
ldrb r2, [r1]
ldr r1, [sp, 0xB0]
strb r2, [r1, 0xC]
ldr r1, _0806EDA4
ldr r0, [r1]
movs r2, 0x9A
lsls r2, 1
adds r0, r2
add r3, sp, 0x74
ldrb r3, [r3]
strb r3, [r0]
ldr r2, [r1]
movs r6, 0x9C
lsls r6, 1
adds r0, r2, r6
ldr r1, [sp, 0x80]
str r1, [r0]
lsls r1, 1
mov r0, r10
adds r0, 0x1C
adds r0, r1
movs r3, 0
ldrsh r4, [r0, r3]
mov r8, r1
ldr r6, [sp, 0x78]
cmp r6, 0
beq _0806EBF8
ldr r0, [sp, 0x74]
cmp r0, 0x2
bne _0806EBF8
mov r1, r10
movs r3, 0x28
ldrsh r0, [r1, r3]
adds r4, r0
ldrh r1, [r1, 0x28]
movs r6, 0xA2
lsls r6, 1
adds r0, r2, r6
strh r1, [r0]
_0806EBF8:
mov r0, r10
movs r2, 0x4
ldrsh r1, [r0, r2]
ldr r0, _0806EDA8
cmp r1, r0
bne _0806EC06
adds r4, 0x2
_0806EC06:
movs r0, 0xD1
lsls r0, 1
cmp r1, r0
bne _0806EC10
subs r4, 0x2
_0806EC10:
ldr r0, _0806EDAC
cmp r1, r0
bne _0806EC18
subs r4, 0x2
_0806EC18:
cmp r4, 0
bge _0806EC1E
movs r4, 0
_0806EC1E:
cmp r4, 0x14
ble _0806EC24
movs r4, 0x14
_0806EC24:
ldr r6, _0806EDA4
ldr r0, [r6]
movs r3, 0x9F
lsls r3, 1
adds r0, r3
strb r4, [r0]
ldr r1, [r6]
mov r5, r10
adds r5, 0x14
ldr r0, [sp, 0x80]
adds r2, r5, r0
ldrb r0, [r2]
adds r0, r7
adds r3, 0x2
adds r1, r3
strh r0, [r1]
ldrb r0, [r2]
adds r0, r7
lsls r0, 8
ldr r2, _0806EDB0
lsls r1, r4, 2
adds r1, r2
ldr r1, [r1]
bl sub_8009DA4
adds r2, r0, 0
ldr r0, [sp, 0x80]
lsls r4, r0, 2
mov r0, r10
adds r0, 0x2C
adds r0, r4
ldr r1, [r0]
adds r0, r2, 0
bl sub_8009DA4
adds r2, r0, 0
str r5, [sp, 0x88]
cmp r2, 0
bge _0806EC74
adds r0, 0xFF
_0806EC74:
asrs r0, 8
str r0, [sp, 0x8]
ldr r0, [sp, 0x7C]
adds r0, 0x20
add r0, r8
movs r1, 0
ldrsh r3, [r0, r1]
ldr r2, [sp, 0x80]
cmp r2, 0
bne _0806ECA0
ldr r0, [sp, 0x7C]
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x6
bne _0806ECA0
ldr r0, [r6]
movs r6, 0xBD
lsls r6, 1
adds r1, r0, r6
movs r0, 0x1
strb r0, [r1]
adds r3, 0x1
_0806ECA0:
ldr r0, [sp, 0x7C]
movs r2, 0x4
ldrsh r1, [r0, r2]
ldr r0, _0806EDA8
cmp r1, r0
bne _0806ECAE
subs r3, 0x2
_0806ECAE:
movs r0, 0xD1
lsls r0, 1
cmp r1, r0
bne _0806ECB8
adds r3, 0x2
_0806ECB8:
ldr r0, _0806EDAC
cmp r1, r0
bne _0806ECC0
subs r3, 0x2
_0806ECC0:
cmp r3, 0
bge _0806ECC6
movs r3, 0
_0806ECC6:
cmp r3, 0x14
ble _0806ECCC
movs r3, 0x14
_0806ECCC:
ldr r5, _0806EDA4
ldr r0, [r5]
ldr r6, _0806EDB4
adds r0, r6
strb r3, [r0]
ldr r2, [r5]
ldr r0, [sp, 0x7C]
adds r0, 0x16
ldr r1, [sp, 0x80]
adds r0, r1
ldrb r1, [r0]
adds r6, 0x3
adds r2, r6
strh r1, [r2]
ldrb r0, [r0]
lsls r0, 8
ldr r2, _0806EDB8
lsls r1, r3, 2
adds r1, r2
ldr r1, [r1]
bl sub_8009DA4
adds r2, r0, 0
ldr r0, [sp, 0x7C]
adds r0, 0x34
adds r0, r4
ldr r1, [r0]
adds r0, r2, 0
bl sub_8009DA4
cmp r0, 0
bge _0806ED0E
adds r0, 0xFF
_0806ED0E:
asrs r0, 8
str r0, [sp, 0xC]
movs r0, 0x64
bl sub_8084100
str r0, [sp, 0x84]
ldr r0, [sp, 0x80]
cmp r0, 0
bne _0806EDC8
ldr r0, [sp, 0x70]
movs r1, 0x13
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806ED4A
ldr r2, _0806EDBC
movs r3, 0
ldrsh r1, [r2, r3]
ldr r0, [sp, 0x8]
adds r0, r1
str r0, [sp, 0x8]
ldr r1, [r5]
movs r6, 0xB0
lsls r6, 1
adds r1, r6
ldrb r0, [r2]
ldrb r2, [r1]
adds r0, r2
strb r0, [r1]
_0806ED4A:
ldr r0, [sp, 0x70]
movs r1, 0x2B
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806ED74
ldr r2, _0806EDC0
movs r3, 0
ldrsh r1, [r2, r3]
ldr r0, [sp, 0x8]
adds r0, r1
str r0, [sp, 0x8]
ldr r1, [r5]
movs r6, 0xB0
lsls r6, 1
adds r1, r6
ldrb r0, [r2]
ldrb r2, [r1]
adds r0, r2
strb r0, [r1]
_0806ED74:
ldr r3, [sp, 0x78]
cmp r3, 0
beq _0806EE4A
mov r0, r9
movs r1, 0x1E
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806EE4A
ldr r2, _0806EDC4
movs r6, 0
ldrsh r1, [r2, r6]
ldr r0, [sp, 0xC]
adds r0, r1
str r0, [sp, 0xC]
ldr r0, [r5]
movs r3, 0xB1
lsls r3, 1
adds r1, r0, r3
ldrb r0, [r2]
ldrb r6, [r1]
adds r0, r6
b _0806EE48
.align 2, 0
_0806EDA4: .4byte gUnknown_203B418
_0806EDA8: .4byte 0x000001a1
_0806EDAC: .4byte 0x000001a3
_0806EDB0: .4byte gUnknown_80F504C
_0806EDB4: .4byte 0x0000013f
_0806EDB8: .4byte gUnknown_80F50A0
_0806EDBC: .4byte gUnknown_810AC60
_0806EDC0: .4byte gUnknown_810AC68
_0806EDC4: .4byte gUnknown_810AC64
_0806EDC8:
ldr r0, [sp, 0x78]
cmp r0, 0
beq _0806EDF6
mov r0, r9
movs r1, 0x22
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806EDF6
ldr r2, _0806EEF8
movs r3, 0
ldrsh r1, [r2, r3]
ldr r0, [sp, 0xC]
adds r0, r1
str r0, [sp, 0xC]
ldr r0, [r5]
ldr r6, _0806EEFC
adds r1, r0, r6
ldrb r0, [r2]
ldrb r2, [r1]
adds r0, r2
strb r0, [r1]
_0806EDF6:
ldr r0, [sp, 0x70]
movs r1, 0x21
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806EE20
ldr r2, _0806EF00
movs r3, 0
ldrsh r1, [r2, r3]
ldr r0, [sp, 0x8]
adds r0, r1
str r0, [sp, 0x8]
ldr r0, _0806EF04
ldr r0, [r0]
ldr r6, _0806EF08
adds r1, r0, r6
ldrb r0, [r2]
ldrb r2, [r1]
adds r0, r2
strb r0, [r1]
_0806EE20:
ldr r0, [sp, 0x70]
movs r1, 0x2B
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806EE4A
ldr r2, _0806EF0C
movs r3, 0
ldrsh r1, [r2, r3]
ldr r0, [sp, 0x8]
adds r0, r1
str r0, [sp, 0x8]
ldr r0, _0806EF04
ldr r0, [r0]
ldr r6, _0806EF08
adds r1, r0, r6
ldrb r0, [r2]
ldrb r2, [r1]
adds r0, r2
_0806EE48:
strb r0, [r1]
_0806EE4A:
ldr r0, _0806EF04
ldr r2, [r0]
movs r3, 0xA3
lsls r3, 1
adds r1, r2, r3
add r0, sp, 0x8
ldrh r0, [r0]
strh r0, [r1]
movs r6, 0xA4
lsls r6, 1
adds r1, r2, r6
add r4, sp, 0xC
ldrh r0, [r4]
strh r0, [r1]
ldr r0, [sp, 0x8]
cmp r0, 0
bge _0806EE70
movs r0, 0
str r0, [sp, 0x8]
_0806EE70:
ldr r1, _0806EF10
ldr r0, [sp, 0x8]
cmp r0, r1
ble _0806EE7C
ldr r0, _0806EF14
str r0, [sp, 0x8]
_0806EE7C:
movs r3, 0xA8
lsls r3, 1
add r3, r10
ldrh r2, [r3]
ldr r1, _0806EF18
adds r0, r1, 0
ands r0, r2
strh r0, [r3]
movs r2, 0xA7
lsls r2, 1
add r2, r10
ldrh r0, [r2]
ands r1, r0
strh r1, [r2]
str r4, [sp]
ldr r0, [sp, 0x84]
str r0, [sp, 0x4]
ldr r0, [sp, 0x70]
mov r1, r9
ldr r2, [sp, 0x74]
add r3, sp, 0x8
bl sub_806E8B0
add r5, sp, 0x10
ldr r1, [sp, 0x8]
ldr r0, [sp, 0xC]
subs r1, r0
adds r0, r5, 0
bl sub_800A020
add r4, sp, 0x18
adds r0, r4, 0
movs r1, 0x8
bl sub_800A020
adds r0, r5, 0
adds r1, r5, 0
adds r2, r4, 0
bl sub_800A3F0
mov r1, r10
ldrb r6, [r1, 0x6]
mov r8, r5
adds r7, r4, 0
cmp r6, 0
bne _0806EF20
ldrb r1, [r1, 0x9]
adds r0, r7, 0
bl sub_800A020
str r6, [sp, 0x20]
ldr r0, _0806EF1C
add r2, sp, 0x20
str r0, [r2, 0x4]
adds r0, r7, 0
adds r1, r7, 0
bl sub_800A34C
mov r2, r10
ldrb r0, [r2, 0x9]
lsls r0, 1
b _0806EF60
.align 2, 0
_0806EEF8: .4byte gUnknown_810AC66
_0806EEFC: .4byte 0x00000163
_0806EF00: .4byte gUnknown_810AC62
_0806EF04: .4byte gUnknown_203B418
_0806EF08: .4byte 0x00000161
_0806EF0C: .4byte gUnknown_810AC68
_0806EF10: .4byte 0x000003e6
_0806EF14: .4byte 0x000003e7
_0806EF18: .4byte 0x0000feff
_0806EF1C: .4byte 0x0000aaaa
_0806EF20:
ldr r3, [sp, 0x88]
ldr r6, [sp, 0x80]
adds r0, r3, r6
ldrb r0, [r0]
str r0, [sp, 0x28]
movs r0, 0x1
str r0, [sp, 0x2C]
add r3, sp, 0x28
add r0, sp, 0x2C
str r0, [sp]
ldr r0, [sp, 0x84]
str r0, [sp, 0x4]
ldr r0, [sp, 0x70]
mov r1, r9
ldr r2, [sp, 0x74]
bl sub_806E8B0
ldr r1, [sp, 0x28]
adds r0, r7, 0
bl sub_800A020
add r4, sp, 0x20
adds r0, r4, 0
movs r1, 0x3
bl sub_800A020
adds r0, r7, 0
adds r1, r7, 0
adds r2, r4, 0
bl sub_800A3F0
ldr r0, [sp, 0x28]
_0806EF60:
movs r1, 0x3
bl __divsi3
adds r6, r0, 0
add r5, sp, 0x30
adds r0, r5, 0
mov r1, r8
adds r2, r7, 0
bl sub_800A6D0
ldr r4, _0806F098
ldr r0, [r4]
movs r1, 0xA5
lsls r1, 1
adds r0, r1
movs r2, 0
mov r8, r2
strh r6, [r0]
adds r0, r5, 0
bl sub_800A048
ldr r1, [r4]
movs r3, 0xA6
lsls r3, 1
adds r1, r3
strh r0, [r1]
ldr r0, [sp, 0x30]
ldr r1, [sp, 0x34]
str r0, [sp, 0x38]
str r1, [sp, 0x3C]
str r0, [sp, 0x48]
str r1, [sp, 0x4C]
add r6, sp, 0x38
adds r0, r6, 0
adds r1, r6, 0
adds r2, r6, 0
bl sub_800A34C
mov r0, r8
str r0, [sp, 0x40]
ldr r0, _0806F09C
add r5, sp, 0x40
str r0, [r5, 0x4]
adds r0, r6, 0
adds r1, r6, 0
adds r2, r5, 0
bl sub_800A34C
adds r0, r5, 0
movs r1, 0x2
bl sub_800A020
add r4, sp, 0x48
adds r0, r4, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_800A34C
ldr r1, [sp, 0xC]
adds r0, r5, 0
bl sub_800A020
adds r0, r4, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_800A6F0
adds r0, r5, 0
movs r1, 0xA
bl sub_800A020
adds r0, r4, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_800A6D0
add r5, sp, 0x50
adds r0, r5, 0
adds r1, r6, 0
adds r2, r4, 0
bl sub_800A6D0
ldr r4, _0806F0A0
adds r0, r4, 0
adds r1, r5, 0
bl sub_800A2F0
lsls r0, 24
mov r8, r5
cmp r0, 0
beq _0806F01E
ldr r0, [r4]
ldr r1, [r4, 0x4]
str r0, [sp, 0x50]
str r1, [sp, 0x54]
_0806F01E:
ldr r4, _0806F0A4
mov r0, r8
adds r1, r4, 0
bl sub_800A2F0
lsls r0, 24
cmp r0, 0
beq _0806F036
ldr r0, [r4]
ldr r1, [r4, 0x4]
str r0, [sp, 0x50]
str r1, [sp, 0x54]
_0806F036:
add r4, sp, 0x58
ldr r1, [sp, 0xB0]
str r1, [sp]
adds r0, r4, 0
ldr r1, [sp, 0x70]
mov r2, r9
ldr r3, [sp, 0x74]
bl sub_806E100
lsls r0, 24
lsrs r5, r0, 24
adds r7, r4, 0
ldr r2, [sp, 0x74]
cmp r2, 0x2
bne _0806F0BC
mov r0, r9
bl sub_807723C
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _0806F0BC
ldr r3, [sp, 0x7C]
movs r6, 0xA9
lsls r6, 1
adds r1, r3, r6
ldrb r0, [r1]
cmp r0, 0
bne _0806F0BC
ldr r0, [sp, 0x78]
cmp r0, 0
beq _0806F118
movs r0, 0x1
strb r0, [r1]
ldr r0, _0806F0A8
mov r1, r9
movs r2, 0
bl sub_8045B94
cmp r4, 0x1
bne _0806F0B0
ldr r0, _0806F0AC
ldr r2, [r0]
ldr r0, [sp, 0x70]
mov r1, r9
bl sub_80522F4
b _0806F0BC
.align 2, 0
_0806F098: .4byte gUnknown_203B418
_0806F09C: .4byte 0x00000ccc
_0806F0A0: .4byte gUnknown_8106F24
_0806F0A4: .4byte gUnknown_8106F04
_0806F0A8: .4byte gUnknown_202DFE8
_0806F0AC: .4byte gUnknown_80FAE00
_0806F0B0:
ldr r0, _0806F15C
ldr r2, [r0]
ldr r0, [sp, 0x70]
mov r1, r9
bl sub_80522F4
_0806F0BC:
ldr r1, [sp, 0x78]
cmp r1, 0
beq _0806F118
ldr r2, [sp, 0x80]
cmp r2, 0
bne _0806F0EE
ldr r0, [sp, 0x7C]
adds r0, 0xC4
ldrb r4, [r0]
cmp r4, 0x1
bne _0806F0EE
mov r0, r9
bl sub_8041B74
ldr r2, _0806F160
adds r0, r7, 0
adds r1, r7, 0
bl sub_800A34C
ldr r0, _0806F164
ldr r0, [r0]
movs r3, 0xB3
lsls r3, 1
adds r0, r3
strb r4, [r0]
_0806F0EE:
ldr r6, [sp, 0x80]
cmp r6, 0x1
bne _0806F118
ldr r0, [sp, 0x7C]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x3
bne _0806F118
mov r0, r9
bl sub_8041B5C
ldr r2, _0806F160
adds r0, r7, 0
adds r1, r7, 0
bl sub_800A34C
ldr r0, _0806F164
ldr r0, [r0]
ldr r1, _0806F168
adds r0, r1
strb r6, [r0]
_0806F118:
mov r0, r9
movs r1, 0xC
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806F1F4
mov r0, r9
movs r1, 0x13
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0806F1F4
mov r3, r10
ldrb r0, [r3, 0x6]
ldr r4, [sp, 0xAC]
cmp r0, 0
beq _0806F140
movs r4, 0
_0806F140:
mov r0, r10
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0x4
bne _0806F170
ldr r4, _0806F16C
ldr r0, _0806F164
ldr r0, [r0]
movs r6, 0xB4
lsls r6, 1
adds r0, r6
movs r1, 0x1
strb r1, [r0]
b _0806F1DA
.align 2, 0
_0806F15C: .4byte gUnknown_80FADD8
_0806F160: .4byte gUnknown_8106F1C
_0806F164: .4byte gUnknown_203B418
_0806F168: .4byte 0x00000167
_0806F16C: .4byte 0x000003e7
_0806F170:
ldr r0, [sp, 0x70]
movs r1, 0xC
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806F194
ldr r0, _0806F2A4
movs r1, 0
ldrsh r0, [r0, r1]
adds r4, r0
ldr r0, _0806F2A8
ldr r0, [r0]
movs r2, 0xB2
lsls r2, 1
adds r0, r2
movs r1, 0x1
strb r1, [r0]
_0806F194:
mov r0, r9
movs r1, 0xD
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806F1B6
ldr r0, _0806F2A4
movs r3, 0
ldrsh r0, [r0, r3]
adds r4, r0
ldr r0, _0806F2A8
ldr r0, [r0]
ldr r6, _0806F2AC
adds r1, r0, r6
movs r0, 0x1
strb r0, [r1]
_0806F1B6:
cmp r5, 0
beq _0806F1DA
ldr r0, [sp, 0x70]
movs r1, 0x1
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0806F1DA
ldr r0, _0806F2B0
movs r1, 0
ldrsh r4, [r0, r1]
ldr r0, _0806F2A8
ldr r0, [r0]
ldr r2, _0806F2B4
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
_0806F1DA:
movs r0, 0x64
bl sub_8084100
cmp r0, r4
bge _0806F1F4
ldr r2, _0806F2B8
adds r0, r7, 0
adds r1, r7, 0
bl sub_800A34C
movs r0, 0x1
ldr r3, [sp, 0xB0]
strb r0, [r3, 0xD]
_0806F1F4:
mov r0, r8
bl sub_800A048
ldr r5, _0806F2A8
ldr r1, [r5]
movs r6, 0xAA
lsls r6, 1
adds r1, r6
str r0, [r1]
mov r0, r8
mov r1, r8
adds r2, r7, 0
bl sub_800A34C
ldr r0, [r5]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
ldr r2, [sp, 0xB4]
str r2, [r0]
add r4, sp, 0x60
adds r0, r4, 0
adds r1, r2, 0
bl sub_800A088
mov r0, r8
mov r1, r8
adds r2, r4, 0
bl sub_800A34C
mov r0, r8
bl sub_800A048
ldr r1, [r5]
movs r3, 0xA8
lsls r3, 1
adds r1, r3
str r0, [r1]
movs r0, 0x80
lsls r0, 7
bl sub_8084100
movs r6, 0
str r6, [sp, 0x58]
movs r1, 0xE0
lsls r1, 8
adds r0, r1
str r0, [r7, 0x4]
mov r0, r8
mov r1, r8
adds r2, r7, 0
bl sub_800A34C
add r4, sp, 0x68
adds r0, r4, 0
movs r1, 0x64
bl sub_800A020
adds r0, r7, 0
adds r1, r4, 0
adds r2, r7, 0
bl sub_800A34C
adds r0, r7, 0
bl sub_800A048
ldr r1, [r5]
movs r2, 0xAC
lsls r2, 1
adds r1, r2
str r0, [r1]
mov r0, r8
bl sub_800A048
ldr r3, [sp, 0xB0]
str r0, [r3]
str r6, [r3, 0x4]
cmp r0, 0
bne _0806F294
strb r0, [r3, 0xD]
_0806F294:
add sp, 0x8C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806F2A4: .4byte gUnknown_80F4DAE
_0806F2A8: .4byte gUnknown_203B418
_0806F2AC: .4byte 0x00000165
_0806F2B0: .4byte gUnknown_80F4DB0
_0806F2B4: .4byte 0x00000169
_0806F2B8: .4byte gUnknown_8106F14
thumb_func_end sub_806EAF4
thumb_func_start sub_806F2BC
sub_806F2BC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x14
adds r5, r0, 0
mov r12, r1
ldr r7, [sp, 0x2C]
lsls r2, 24
lsrs r4, r2, 24
adds r6, r3, 0
cmp r6, 0
bgt _0806F2D6
movs r6, 0x1
_0806F2D6:
ldr r0, _0806F320
cmp r6, r0
ble _0806F2DE
adds r6, r0, 0
_0806F2DE:
movs r0, 0
mov r8, r0
strb r4, [r7, 0xC]
str r7, [sp]
add r0, sp, 0x4
adds r1, r5, 0
mov r2, r12
adds r3, r4, 0
bl sub_806E100
add r4, sp, 0xC
adds r0, r4, 0
adds r1, r6, 0
bl sub_800A020
adds r0, r4, 0
adds r1, r4, 0
add r2, sp, 0x4
bl sub_800A34C
adds r0, r4, 0
bl sub_800A048
str r0, [r7]
mov r0, r8
str r0, [r7, 0x4]
add sp, 0x14
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806F320: .4byte 0x000003e7
thumb_func_end sub_806F2BC
thumb_func_start sub_806F324
sub_806F324:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x94
mov r8, r0
adds r5, r1, 0
adds r6, r2, 0
lsls r4, r3, 16
asrs r4, 16
add r0, sp, 0x10
bl sub_80457DC
add r2, sp, 0x84
str r5, [sp, 0x84]
movs r0, 0x2
str r0, [r2, 0x8]
movs r0, 0
strb r0, [r2, 0xC]
str r6, [r2, 0x4]
strb r0, [r2, 0xD]
strb r0, [r2, 0xE]
strb r0, [r2, 0xF]
str r0, [sp]
str r4, [sp, 0x4]
str r0, [sp, 0x8]
str r0, [sp, 0xC]
add r0, sp, 0x10
mov r1, r8
movs r3, 0
bl sub_806D010
add sp, 0x94
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806F324
thumb_func_start sub_806F370
sub_806F370:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x2C
mov r10, r0
adds r7, r1, 0
mov r9, r3
ldr r0, [sp, 0x50]
ldr r1, [sp, 0x54]
ldr r3, [sp, 0x58]
lsls r0, 24
lsrs r4, r0, 24
lsls r1, 16
asrs r1, 16
mov r8, r1
adds r5, r2, 0
movs r0, 0x2
str r0, [sp, 0x18]
str r3, [sp, 0x14]
add r0, sp, 0x10
movs r1, 0
strb r4, [r0, 0xC]
strb r1, [r0, 0xD]
strb r1, [r0, 0xE]
cmp r4, 0
beq _0806F3FC
ldr r1, [r7, 0x70]
movs r2, 0
lsls r0, r4, 3
mov r3, sp
adds r3, 0x20
str r3, [sp, 0x28]
ldr r6, _0806F408
mov r12, r6
adds r1, 0x5C
adds r0, r4
lsls r3, r0, 2
ldr r4, [sp, 0x28]
_0806F3C0:
adds r0, r1, r2
ldrb r0, [r0]
lsls r0, 1
adds r0, r3
add r0, r12
movs r6, 0
ldrsh r0, [r0, r6]
stm r4!, {r0}
adds r2, 0x1
cmp r2, 0x1
ble _0806F3C0
adds r0, r7, 0
movs r1, 0x35
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0806F3FC
ldr r2, _0806F40C
ldr r1, [sp, 0x28]
ldr r0, [r1, 0x4]
lsls r0, 2
ldr r1, [sp, 0x20]
lsls r1, 4
adds r0, r1
adds r0, r2
ldr r0, [r0]
cmp r0, 0x3
beq _0806F3FC
movs r5, 0
_0806F3FC:
str r5, [sp, 0x10]
cmp r5, 0
bne _0806F410
add r1, sp, 0x10
movs r0, 0x1
b _0806F414
.align 2, 0
_0806F408: .4byte gUnknown_80F522C
_0806F40C: .4byte gUnknown_80F54B4
_0806F410:
add r1, sp, 0x10
movs r0, 0
_0806F414:
strb r0, [r1, 0xF]
mov r3, r9
str r3, [sp]
mov r6, r8
str r6, [sp, 0x4]
ldr r0, [sp, 0x5C]
str r0, [sp, 0x8]
ldr r0, [sp, 0x60]
str r0, [sp, 0xC]
mov r0, r10
adds r1, r7, 0
add r2, sp, 0x10
movs r3, 0
bl sub_806D010
ldr r0, [sp, 0x4C]
cmp r0, 0
beq _0806F440
add r0, sp, 0x10
ldrb r0, [r0, 0xF]
ldr r1, [sp, 0x4C]
strb r0, [r1]
_0806F440:
add sp, 0x2C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_806F370
thumb_func_start sub_806F450
sub_806F450:
push {r4-r6,lr}
adds r5, r0, 0
ldr r4, [r1, 0x70]
adds r6, r4, 0
ldrb r0, [r4, 0x8]
cmp r0, 0
beq _0806F47A
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0806F47A
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
beq _0806F476
movs r0, 0x2
strb r0, [r4, 0x8]
b _0806F47A
_0806F476:
movs r0, 0x3
strb r0, [r6, 0x8]
_0806F47A:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_806F450
thumb_func_start sub_806F480
sub_806F480:
push {lr}
lsls r1, 24
lsrs r1, 24
ldr r2, [r0, 0x70]
adds r3, r2, 0
ldrb r0, [r2, 0x8]
cmp r0, 0
beq _0806F49E
cmp r1, 0
beq _0806F49A
movs r0, 0x2
strb r0, [r2, 0x8]
b _0806F49E
_0806F49A:
movs r0, 0x3
strb r0, [r3, 0x8]
_0806F49E:
pop {r0}
bx r0
thumb_func_end sub_806F480
thumb_func_start sub_806F4A4
sub_806F4A4:
push {r4-r6,lr}
lsls r1, 24
lsrs r4, r1, 24
ldr r5, [r0, 0x70]
movs r1, 0xE
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0806F4CE
cmp r4, 0x1
beq _0806F4C0
cmp r4, 0x7
bne _0806F4CE
_0806F4C0:
adds r0, r5, 0
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _0806F4CE
_0806F4CA:
movs r0, 0
b _0806F4F6
_0806F4CE:
movs r2, 0
lsls r0, r4, 3
ldr r6, _0806F4FC
adds r3, r5, 0
adds r3, 0x5C
adds r0, r4
lsls r1, r0, 2
_0806F4DC:
adds r0, r3, r2
ldrb r0, [r0]
lsls r0, 1
adds r0, r1
adds r0, r6
movs r4, 0
ldrsh r0, [r0, r4]
cmp r0, 0
beq _0806F4CA
adds r2, 0x1
cmp r2, 0x1
ble _0806F4DC
movs r0, 0x1
_0806F4F6:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0806F4FC: .4byte gUnknown_80F522C
thumb_func_end sub_806F4A4
thumb_func_start sub_806F500
sub_806F500:
ldr r0, _0806F5F4
ldr r0, [r0]
mov r12, r0
movs r0, 0x9A
lsls r0, 1
add r0, r12
movs r1, 0
strb r1, [r0]
str r1, [r0, 0x4]
strb r1, [r0, 0x8]
strb r1, [r0, 0x9]
movs r2, 0xA
strb r2, [r0, 0xA]
strb r2, [r0, 0xB]
movs r2, 0
movs r3, 0x1
strh r3, [r0, 0xC]
strh r3, [r0, 0xE]
strh r1, [r0, 0x10]
strh r1, [r0, 0x14]
strh r1, [r0, 0x12]
strh r1, [r0, 0x16]
strh r1, [r0, 0x18]
str r1, [r0, 0x1C]
str r1, [r0, 0x24]
str r1, [r0, 0x28]
movs r0, 0xB0
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F5F8
add r0, r12
strb r2, [r0]
movs r0, 0xB1
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F5FC
add r0, r12
strb r2, [r0]
movs r0, 0xB2
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F600
add r0, r12
strb r2, [r0]
movs r0, 0xB3
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F604
add r0, r12
strb r2, [r0]
movs r0, 0xB4
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F608
add r0, r12
strb r2, [r0]
movs r0, 0xB5
lsls r0, 1
add r0, r12
strb r2, [r0]
movs r0, 0xB6
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F60C
add r0, r12
strb r2, [r0]
ldr r0, _0806F610
add r0, r12
strb r2, [r0]
movs r0, 0xB7
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F614
add r0, r12
strb r2, [r0]
movs r0, 0xB8
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F618
add r0, r12
strb r2, [r0]
movs r0, 0xB9
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F61C
add r0, r12
strb r2, [r0]
movs r0, 0xBA
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F620
add r0, r12
strb r2, [r0]
movs r0, 0xBB
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F624
add r0, r12
strb r2, [r0]
movs r0, 0xBC
lsls r0, 1
add r0, r12
strb r2, [r0]
ldr r0, _0806F628
add r0, r12
strb r2, [r0]
movs r0, 0xBD
lsls r0, 1
add r0, r12
strb r2, [r0]
bx lr
.align 2, 0
_0806F5F4: .4byte gUnknown_203B418
_0806F5F8: .4byte 0x00000161
_0806F5FC: .4byte 0x00000163
_0806F600: .4byte 0x00000165
_0806F604: .4byte 0x00000167
_0806F608: .4byte 0x00000169
_0806F60C: .4byte 0x0000016b
_0806F610: .4byte 0x0000016d
_0806F614: .4byte 0x0000016f
_0806F618: .4byte 0x00000171
_0806F61C: .4byte 0x00000173
_0806F620: .4byte 0x00000175
_0806F624: .4byte 0x00000177
_0806F628: .4byte 0x00000179
thumb_func_end sub_806F500
thumb_func_start sub_806F62C
sub_806F62C:
ldr r1, _0806F638
lsls r0, 2
adds r0, r1
ldr r0, [r0]
bx lr
.align 2, 0
_0806F638: .4byte gUnknown_8106F7C
thumb_func_end sub_806F62C
thumb_func_start sub_806F63C
sub_806F63C:
push {lr}
ldr r1, _0806F658
ldr r1, [r1]
ldr r2, _0806F65C
adds r1, r2
ldr r1, [r1, 0x10]
cmp r1, r0
bne _0806F652
adds r0, r1, 0
bl sub_803F508
_0806F652:
pop {r0}
bx r0
.align 2, 0
_0806F658: .4byte gUnknown_203B418
_0806F65C: .4byte 0x000181e8
thumb_func_end sub_806F63C
thumb_func_start sub_806F660
sub_806F660:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r6, r0, 0
mov r8, r1
ldr r0, [r6, 0x70]
mov r10, r0
ldr r4, [r1, 0x70]
movs r1, 0x1
negs r1, r1
mov r9, r1
movs r2, 0x4
ldrsh r0, [r4, r2]
bl GetPokemonSize
lsls r0, 24
lsrs r5, r0, 24
ldr r0, _0806F6C0
ldr r3, [r0]
ldr r1, _0806F6C4
adds r0, r3, r1
ldrh r2, [r0]
subs r0, r2, 0x4
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bls _0806F702
lsls r0, r2, 16
asrs r1, r0, 16
cmp r1, 0x9
beq _0806F702
cmp r1, 0xF
beq _0806F702
adds r0, r2, 0
subs r0, 0x2C
lsls r0, 16
lsrs r0, 16
cmp r0, 0x4
bhi _0806F6CC
ldr r2, _0806F6C8
adds r0, r3, r2
ldrb r0, [r0]
cmp r0, 0
bne _0806F702
b _0806F8FC
.align 2, 0
_0806F6C0: .4byte gUnknown_203B418
_0806F6C4: .4byte 0x00003a14
_0806F6C8: .4byte 0x0000065c
_0806F6CC:
cmp r1, 0x31
bne _0806F6F0
ldr r1, _0806F6EC
adds r0, r3, r1
ldrb r0, [r0]
cmp r0, 0
bne _0806F6DC
b _0806F8FC
_0806F6DC:
movs r0, 0xCF
lsls r0, 1
bl sub_8097900
lsls r0, 24
cmp r0, 0
bne _0806F702
b _0806F8FC
.align 2, 0
_0806F6EC: .4byte 0x00000659
_0806F6F0:
ldr r2, _0806F834
adds r0, r3, r2
ldrb r0, [r0]
bl GetRecruitable
lsls r0, 24
cmp r0, 0
bne _0806F702
b _0806F8FC
_0806F702:
ldr r0, _0806F838
ldr r0, [r0]
ldr r3, _0806F83C
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _0806F712
b _0806F8FC
_0806F712:
ldrh r1, [r4, 0x2]
adds r0, r1, 0
subs r0, 0x90
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
bls _0806F766
lsls r0, r1, 16
asrs r1, r0, 16
ldr r0, _0806F840
cmp r1, r0
beq _0806F766
subs r0, 0x1
cmp r1, r0
beq _0806F766
adds r0, 0x2
cmp r1, r0
beq _0806F766
adds r0, 0x8A
cmp r1, r0
beq _0806F766
adds r0, 0x1
cmp r1, r0
beq _0806F766
adds r0, 0x4
cmp r1, r0
beq _0806F766
subs r0, 0x1
cmp r1, r0
beq _0806F766
adds r0, 0x2
cmp r1, r0
beq _0806F766
subs r0, 0x9
cmp r1, r0
beq _0806F766
adds r0, 0x1
cmp r1, r0
beq _0806F766
adds r0, 0x1
cmp r1, r0
bne _0806F776
_0806F766:
movs r1, 0x2
ldrsh r0, [r4, r1]
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0806F776
b _0806F8FC
_0806F776:
movs r2, 0x2
ldrsh r0, [r4, r2]
bl sub_806F9BC
lsls r0, 24
cmp r0, 0
bne _0806F786
b _0806F8FC
_0806F786:
movs r3, 0x4
ldrsh r1, [r6, r3]
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
subs r1, r0
cmp r1, 0
bge _0806F798
negs r1, r1
_0806F798:
cmp r1, 0x1
ble _0806F79E
b _0806F8FC
_0806F79E:
movs r0, 0x6
ldrsh r1, [r6, r0]
mov r2, r8
movs r3, 0x6
ldrsh r0, [r2, r3]
subs r1, r0
cmp r1, 0
bge _0806F7B0
negs r1, r1
_0806F7B0:
cmp r1, 0x1
ble _0806F7B6
b _0806F8FC
_0806F7B6:
adds r0, r4, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
bne _0806F7C2
b _0806F8FC
_0806F7C2:
adds r0, r4, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0806F7CE
b _0806F8FC
_0806F7CE:
mov r0, r8
adds r1, r6, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
bne _0806F7DE
b _0806F8FC
_0806F7DE:
bl sub_806F910
movs r0, 0xFA
lsls r0, 2
bl sub_8084100
adds r7, r0, 0
movs r1, 0x2
ldrsh r0, [r4, r1]
bl sub_808DCC0
lsls r0, 16
asrs r4, r0, 16
ldr r0, _0806F844
cmp r4, r0
bne _0806F800
b _0806F8FC
_0806F800:
adds r0, r6, 0
movs r1, 0x2E
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0806F816
ldr r0, _0806F848
movs r2, 0
ldrsh r0, [r0, r2]
adds r4, r0
_0806F816:
ldr r0, _0806F84C
mov r3, r10
ldrb r1, [r3, 0x9]
lsls r1, 1
adds r1, r0
movs r2, 0
ldrsh r0, [r1, r2]
adds r4, r0
cmp r7, r4
bge _0806F8FC
movs r4, 0
movs r0, 0x6
subs r3, r0, r5
ldr r7, _0806F850
b _0806F856
.align 2, 0
_0806F834: .4byte 0x00000644
_0806F838: .4byte gUnknown_203B418
_0806F83C: .4byte 0x0000065d
_0806F840: .4byte 0x0000010d
_0806F844: .4byte 0xfffffc19
_0806F848: .4byte gUnknown_80F5008
_0806F84C: .4byte gUnknown_80F5700
_0806F850: .4byte gUnknown_202EE70
_0806F854:
adds r4, 0x1
_0806F856:
cmp r4, r3
bgt _0806F878
movs r2, 0
cmp r2, r5
bge _0806F872
adds r1, r4, r7
b _0806F86C
_0806F864:
adds r1, 0x1
adds r2, 0x1
cmp r2, r5
bge _0806F872
_0806F86C:
ldrb r0, [r1]
cmp r0, 0
beq _0806F864
_0806F872:
cmp r2, r5
bne _0806F854
mov r9, r4
_0806F878:
movs r0, 0x1
negs r0, r0
cmp r9, r0
beq _0806F8F4
movs r4, 0
ldr r3, _0806F8BC
ldr r0, [r3]
ldr r2, _0806F8C0
adds r0, r2
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806F8B4
adds r7, r3, 0
adds r5, r2, 0
movs r2, 0
movs r3, 0x1
_0806F89C:
adds r2, 0x64
adds r4, 0x1
cmp r4, 0x3
bgt _0806F8B4
ldr r0, [r7]
adds r0, r2, r0
adds r0, r5
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0806F89C
_0806F8B4:
cmp r4, 0x4
beq _0806F8F4
movs r4, 0
b _0806F8C6
.align 2, 0
_0806F8BC: .4byte gUnknown_203B45C
_0806F8C0: .4byte 0x00008df8
_0806F8C4:
adds r4, 0x1
_0806F8C6:
cmp r4, 0x3
bgt _0806F8E2
ldr r0, _0806F8EC
ldr r0, [r0]
lsls r1, r4, 2
ldr r3, _0806F8F0
adds r0, r3
adds r0, r1
ldr r0, [r0]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806F8C4
_0806F8E2:
cmp r4, 0x4
beq _0806F8F4
movs r0, 0x1
b _0806F8FE
.align 2, 0
_0806F8EC: .4byte gUnknown_203B418
_0806F8F0: .4byte 0x0001357c
_0806F8F4:
adds r0, r6, 0
mov r1, r8
bl nullsub_96
_0806F8FC:
movs r0, 0
_0806F8FE:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806F660
thumb_func_start nullsub_96
nullsub_96:
bx lr
thumb_func_end nullsub_96
thumb_func_start sub_806F910
sub_806F910:
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r5, 0
movs r6, 0
movs r7, 0x40
_0806F91C:
ldr r0, _0806F9AC
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0806F9B0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
adds r1, r6, 0x1
mov r8, r1
cmp r0, 0
beq _0806F98A
ldr r0, [r4, 0x70]
movs r2, 0x4
ldrsh r0, [r0, r2]
bl GetPokemonSize
lsls r0, 24
lsrs r1, r0, 24
adds r0, r4, 0
adds r0, 0x68
strh r7, [r0]
ldr r0, [r4, 0x70]
ldr r2, _0806F9B4
adds r0, r2
strb r6, [r0]
ldr r0, [r4, 0x70]
adds r2, 0x1
adds r0, r2
strb r1, [r0]
cmp r1, 0
beq _0806F978
ldr r3, _0806F9B8
movs r2, 0x1
_0806F966:
cmp r5, 0x5
bgt _0806F972
adds r0, r5, r3
strb r2, [r0]
adds r7, 0x10
adds r5, 0x1
_0806F972:
subs r1, 0x1
cmp r1, 0
bne _0806F966
_0806F978:
adds r0, r4, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_806CCB4
_0806F98A:
mov r6, r8
cmp r6, 0x3
ble _0806F91C
cmp r5, 0x5
bgt _0806F9A2
ldr r2, _0806F9B8
movs r1, 0
_0806F998:
adds r0, r5, r2
strb r1, [r0]
adds r5, 0x1
cmp r5, 0x5
ble _0806F998
_0806F9A2:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0806F9AC: .4byte gUnknown_203B418
_0806F9B0: .4byte 0x0001357c
_0806F9B4: .4byte 0x00000167
_0806F9B8: .4byte gUnknown_202EE70
thumb_func_end sub_806F910
thumb_func_start sub_806F9BC
sub_806F9BC:
push {r4,r5,lr}
sub sp, 0xC
lsls r0, 16
asrs r4, r0, 16
ldr r5, _0806FA40
ldr r0, [r5]
movs r1, 0xCB
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _0806FA3C
adds r0, r4, 0
bl sub_808529C
lsls r0, 24
cmp r0, 0
beq _0806FA3C
cmp r4, 0x97
bne _0806F9F2
ldr r0, [r5]
movs r1, 0xCF
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
beq _0806FA3C
_0806F9F2:
movs r0, 0xCC
lsls r0, 1
cmp r4, r0
beq _0806FA3C
ldr r0, _0806FA44
cmp r4, r0
beq _0806FA3C
ldr r0, _0806FA48
cmp r4, r0
beq _0806FA3C
movs r0, 0xD1
lsls r0, 1
cmp r4, r0
beq _0806FA3C
ldr r0, _0806FA4C
cmp r4, r0
beq _0806FA3C
adds r0, r4, 0
bl GetUnk12
lsls r0, 24
cmp r0, 0
bne _0806FA50
adds r0, r4, 0
bl GetFriendArea
lsls r0, 24
lsrs r0, 24
mov r1, sp
movs r2, 0
movs r3, 0
bl sub_8092638
mov r0, sp
ldrb r0, [r0, 0x4]
cmp r0, 0
bne _0806FA50
_0806FA3C:
movs r0, 0
b _0806FA52
.align 2, 0
_0806FA40: .4byte gUnknown_203B418
_0806FA44: .4byte 0x00000199
_0806FA48: .4byte 0x000001a1
_0806FA4C: .4byte 0x000001a3
_0806FA50:
movs r0, 0x1
_0806FA52:
add sp, 0xC
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_806F9BC
thumb_func_start sub_806FA5C
sub_806FA5C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
mov r8, r0
adds r5, r1, 0
adds r6, r2, 0
adds r0, r5, 0x4
mov r1, r8
adds r1, 0x4
bl sub_80983D8
adds r4, r0, 0
movs r0, 0
mov r10, r0
movs r1, 0
ldrsh r0, [r6, r1]
bl GetFriendArea
lsls r0, 24
lsrs r0, 24
mov r9, r0
adds r0, r5, 0
adds r0, 0x22
mov r2, r10
strb r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_807A0CC
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
ldr r0, _0806FAD4
movs r3, 0
ldrsh r1, [r6, r3]
bl sub_808D908
ldr r0, _0806FAD8
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0
bne _0806FAE4
movs r4, 0
ldrsh r1, [r6, r4]
ldr r0, _0806FADC
cmp r1, r0
beq _0806FB28
ldr r0, _0806FAE0
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
b _0806FB28
.align 2, 0
_0806FAD4: .4byte gUnknown_202DF98
_0806FAD8: .4byte gUnknown_80F9FE8
_0806FADC: .4byte 0x0000019d
_0806FAE0: .4byte gUnknown_80FA004
_0806FAE4:
movs r7, 0
ldr r3, _0806FB2C
ldr r0, [r3]
ldr r2, _0806FB30
adds r0, r2
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806FB1A
mov r12, r3
adds r4, r2, 0
movs r2, 0
movs r3, 0x1
_0806FB00:
adds r2, 0x64
adds r7, 0x1
cmp r7, 0x3
bgt _0806FB1A
mov r1, r12
ldr r0, [r1]
adds r0, r2, r0
adds r0, r4
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0806FB00
_0806FB1A:
cmp r7, 0x4
bne _0806FB38
ldr r0, _0806FB34
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
_0806FB28:
movs r0, 0
b _0806FCF0
.align 2, 0
_0806FB2C: .4byte gUnknown_203B45C
_0806FB30: .4byte 0x00008df8
_0806FB34: .4byte gUnknown_80FA030
_0806FB38:
mov r0, r9
bl sub_8092600
lsls r0, 24
cmp r0, 0
bne _0806FB4E
mov r0, r9
bl sub_80925EC
movs r2, 0x1
mov r10, r2
_0806FB4E:
movs r1, 0xFA
lsls r1, 1
adds r0, r5, 0
mov r2, r8
bl sub_8068FE0
ldr r1, _0806FC40
movs r0, 0x64
muls r0, r7
ldr r3, _0806FC44
adds r0, r3
ldr r1, [r1]
adds r5, r1, r0
movs r4, 0
movs r0, 0x3
strh r0, [r5]
strb r4, [r5, 0x2]
ldrh r0, [r6, 0xE]
strb r0, [r5, 0x3]
movs r0, 0x1
strh r0, [r5, 0x8]
adds r0, r5, 0
adds r0, 0x4C
movs r1, 0
bl sub_808EC94
ldr r0, [r6, 0x44]
str r0, [r5, 0x54]
adds r0, r5, 0
adds r0, 0x50
strb r4, [r0]
ldr r0, _0806FC48
strh r0, [r5, 0xA]
strh r7, [r5, 0xC]
ldrh r0, [r6]
strh r0, [r5, 0xE]
ldr r0, _0806FC4C
ldr r0, [r0]
ldr r4, _0806FC50
adds r0, r4
ldr r0, [r0]
str r0, [r5, 0x4]
ldrh r0, [r6, 0x8]
strh r0, [r5, 0x10]
ldrh r0, [r6, 0x8]
strh r0, [r5, 0x12]
ldr r0, [r6, 0x14]
str r0, [r5, 0x44]
ldr r0, [r6, 0x18]
str r0, [r5, 0x48]
movs r2, 0
adds r7, r6, 0
adds r7, 0x20
adds r4, r6, 0
adds r4, 0xA
adds r3, r6, 0
adds r3, 0xC
adds r1, r5, 0
adds r1, 0x14
_0806FBC4:
adds r0, r4, r2
ldrb r0, [r0]
strb r0, [r1]
adds r0, r3, r2
ldrb r0, [r0]
strb r0, [r1, 0x2]
adds r1, 0x1
adds r2, 0x1
cmp r2, 0x1
ble _0806FBC4
ldr r0, [r6, 0x10]
str r0, [r5, 0x18]
adds r1, r5, 0
adds r1, 0x1C
adds r0, r7, 0
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldr r0, [r6, 0x1C]
str r0, [r5, 0x40]
adds r4, r5, 0
adds r4, 0x58
movs r1, 0
ldrsh r0, [r6, r1]
bl sub_808D994
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0xA
bl sub_8092310
bl sub_8097848
movs r2, 0
ldrsh r0, [r6, r2]
movs r3, 0x4
ldrsh r1, [r6, r3]
movs r3, 0x6
ldrsh r2, [r6, r3]
add r3, sp, 0xC
str r3, [sp]
movs r3, 0
str r3, [sp, 0x4]
movs r3, 0x1
str r3, [sp, 0x8]
adds r3, r5, 0
bl sub_806B8CC
lsls r0, 24
lsrs r7, r0, 24
cmp r7, 0
bne _0806FC58
ldr r0, _0806FC54
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
strh r7, [r5]
b _0806FCEE
.align 2, 0
_0806FC40: .4byte gUnknown_203B45C
_0806FC44: .4byte 0x00008df8
_0806FC48: .4byte 0x0000ffff
_0806FC4C: .4byte gUnknown_203B418
_0806FC50: .4byte 0x00000644
_0806FC54: .4byte gUnknown_80FA058
_0806FC58:
bl sub_8083D88
movs r0, 0xA0
movs r1, 0x46
bl sub_803E708
ldr r0, _0806FC78
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _0806FC94
b _0806FC88
.align 2, 0
_0806FC78: .4byte gUnknown_80FA090
_0806FC7C:
ldr r0, _0806FD00
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0806FC88:
adds r0, r4, 0
bl sub_805FBE8
lsls r0, 24
cmp r0, 0
beq _0806FC7C
_0806FC94:
ldr r4, _0806FD04
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_808D9DC
ldr r0, _0806FD08
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
mov r0, r10
cmp r0, 0
beq _0806FCD8
bl sub_8085480
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0806FD0C
mov r1, r9
bl sub_8092558
movs r0, 0xCE
bl sub_8011988
ldr r0, _0806FD10
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0806FCD8:
movs r1, 0
ldrsh r0, [r6, r1]
cmp r0, 0x97
bne _0806FCEE
ldr r2, _0806FD14
ldr r1, [r2]
movs r0, 0x1
strb r0, [r1, 0x4]
ldr r1, [r2]
movs r0, 0x3
strb r0, [r1, 0x11]
_0806FCEE:
movs r0, 0x1
_0806FCF0:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0806FD00: .4byte gUnknown_80FA0C8
_0806FD04: .4byte gUnknown_202DF98
_0806FD08: .4byte gUnknown_80FA0F0
_0806FD0C: .4byte gUnknown_202E628
_0806FD10: .4byte gUnknown_80FA120
_0806FD14: .4byte gUnknown_203B418
thumb_func_end sub_806FA5C
thumb_func_start sub_806FD18
sub_806FD18:
push {r4-r7,lr}
ldr r4, [r0, 0x70]
movs r6, 0x1
negs r6, r6
movs r1, 0x4
ldrsh r0, [r4, r1]
bl GetPokemonSize
lsls r0, 24
lsrs r5, r0, 24
movs r2, 0x2
ldrsh r0, [r4, r2]
bl sub_806F9BC
lsls r0, 24
cmp r0, 0
beq _0806FDEC
bl sub_806F910
movs r4, 0
movs r0, 0x6
subs r3, r0, r5
ldr r7, _0806FD48
b _0806FD4E
.align 2, 0
_0806FD48: .4byte gUnknown_202EE70
_0806FD4C:
adds r4, 0x1
_0806FD4E:
cmp r4, r3
bgt _0806FD70
movs r2, 0
cmp r2, r5
bge _0806FD6A
adds r1, r4, r7
b _0806FD64
_0806FD5C:
adds r1, 0x1
adds r2, 0x1
cmp r2, r5
bge _0806FD6A
_0806FD64:
ldrb r0, [r1]
cmp r0, 0
beq _0806FD5C
_0806FD6A:
cmp r2, r5
bne _0806FD4C
adds r6, r4, 0
_0806FD70:
movs r0, 0x1
negs r0, r0
cmp r6, r0
beq _0806FDEC
movs r4, 0
ldr r3, _0806FDB4
ldr r0, [r3]
ldr r2, _0806FDB8
adds r0, r2
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806FDAC
adds r6, r3, 0
adds r5, r2, 0
movs r2, 0
movs r3, 0x1
_0806FD94:
adds r2, 0x64
adds r4, 0x1
cmp r4, 0x3
bgt _0806FDAC
ldr r0, [r6]
adds r0, r2, r0
adds r0, r5
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0806FD94
_0806FDAC:
cmp r4, 0x4
beq _0806FDEC
movs r4, 0
b _0806FDBE
.align 2, 0
_0806FDB4: .4byte gUnknown_203B45C
_0806FDB8: .4byte 0x00008df8
_0806FDBC:
adds r4, 0x1
_0806FDBE:
cmp r4, 0x3
bgt _0806FDDA
ldr r0, _0806FDE4
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _0806FDE8
adds r0, r2
adds r0, r1
ldr r0, [r0]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0806FDBC
_0806FDDA:
cmp r4, 0x4
beq _0806FDEC
movs r0, 0x1
b _0806FDEE
.align 2, 0
_0806FDE4: .4byte gUnknown_203B418
_0806FDE8: .4byte 0x0001357c
_0806FDEC:
movs r0, 0
_0806FDEE:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_806FD18
thumb_func_start sub_806FDF4
sub_806FDF4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x60
str r0, [sp, 0x58]
mov r10, r1
str r2, [sp, 0x5C]
movs r0, 0
mov r9, r0
str r0, [r2]
add r0, sp, 0xC
bl sub_8069D4C
movs r6, 0
ldr r3, _0806FE50
ldr r0, [r3]
ldr r2, _0806FE54
adds r0, r2
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0806FE46
adds r5, r3, 0
adds r4, r2, 0
movs r2, 0
movs r3, 0x1
_0806FE2E:
adds r2, 0x64
adds r6, 0x1
cmp r6, 0x3
bgt _0806FE46
ldr r0, [r5]
adds r0, r2, r0
adds r0, r4
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0806FE2E
_0806FE46:
cmp r6, 0x4
bne _0806FE58
movs r0, 0
b _0806FFF8
.align 2, 0
_0806FE50: .4byte gUnknown_203B45C
_0806FE54: .4byte 0x00008df8
_0806FE58:
add r0, sp, 0xC
movs r1, 0
ldrsh r0, [r0, r1]
bl GetFriendArea
lsls r0, 24
lsrs r7, r0, 24
ldr r1, _0806FF74
movs r0, 0x64
muls r0, r6
ldr r2, _0806FF78
adds r0, r2
ldr r1, [r1]
adds r5, r1, r0
movs r4, 0
movs r0, 0x3
strh r0, [r5]
strb r4, [r5, 0x2]
add r0, sp, 0xC
ldrh r0, [r0, 0xE]
strb r0, [r5, 0x3]
movs r0, 0x1
strh r0, [r5, 0x8]
adds r0, r5, 0
adds r0, 0x4C
movs r1, 0
bl sub_808EC94
ldr r0, [sp, 0x50]
str r0, [r5, 0x54]
adds r0, r5, 0
adds r0, 0x50
strb r4, [r0]
ldr r0, _0806FF7C
strh r0, [r5, 0xA]
strh r6, [r5, 0xC]
add r0, sp, 0xC
ldrh r0, [r0]
strh r0, [r5, 0xE]
ldr r0, _0806FF80
ldr r0, [r0]
ldr r3, _0806FF84
adds r0, r3
ldr r0, [r0]
str r0, [r5, 0x4]
add r0, sp, 0xC
ldrh r0, [r0, 0x8]
strh r0, [r5, 0x10]
add r0, sp, 0xC
ldrh r0, [r0, 0x8]
strh r0, [r5, 0x12]
ldr r0, [sp, 0x20]
str r0, [r5, 0x44]
ldr r0, [sp, 0x24]
str r0, [r5, 0x48]
movs r2, 0
add r6, sp, 0x2C
add r4, sp, 0x54
mov r8, r4
mov r4, sp
adds r4, 0x16
add r3, sp, 0x18
adds r1, r5, 0
adds r1, 0x14
_0806FED8:
adds r0, r4, r2
ldrb r0, [r0]
strb r0, [r1]
adds r0, r3, r2
ldrb r0, [r0]
strb r0, [r1, 0x2]
adds r1, 0x1
adds r2, 0x1
cmp r2, 0x1
ble _0806FED8
ldr r0, [sp, 0x1C]
str r0, [r5, 0x18]
adds r1, r5, 0
adds r1, 0x1C
adds r0, r6, 0
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldr r0, [sp, 0x28]
str r0, [r5, 0x40]
adds r4, r5, 0
adds r4, 0x58
add r0, sp, 0xC
movs r1, 0
ldrsh r0, [r0, r1]
bl sub_808D994
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0xA
bl sub_8092310
adds r0, r7, 0
bl sub_8092600
lsls r0, 24
cmp r0, 0
bne _0806FF34
adds r0, r7, 0
bl sub_80925EC
movs r2, 0x1
mov r9, r2
_0806FF34:
bl sub_8097848
movs r1, 0xFA
lsls r1, 1
mov r0, r10
ldr r2, [sp, 0x58]
bl sub_8068FE0
add r0, sp, 0xC
movs r3, 0
ldrsh r0, [r0, r3]
add r1, sp, 0xC
movs r2, 0x4
ldrsh r1, [r1, r2]
add r2, sp, 0xC
movs r3, 0x6
ldrsh r2, [r2, r3]
mov r3, r8
str r3, [sp]
movs r3, 0
str r3, [sp, 0x4]
str r3, [sp, 0x8]
adds r3, r5, 0
bl sub_806B8CC
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _0806FF88
strh r0, [r5]
b _0806FFF6
.align 2, 0
_0806FF74: .4byte gUnknown_203B45C
_0806FF78: .4byte 0x00008df8
_0806FF7C: .4byte 0x0000ffff
_0806FF80: .4byte gUnknown_203B418
_0806FF84: .4byte 0x00000644
_0806FF88:
ldr r0, _0806FF9C
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _0806FFB8
b _0806FFAC
.align 2, 0
_0806FF9C: .4byte gUnknown_80FA090
_0806FFA0:
ldr r0, _08070008
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0806FFAC:
adds r0, r4, 0
bl sub_805FBE8
lsls r0, 24
cmp r0, 0
beq _0806FFA0
_0806FFB8:
mov r4, r9
cmp r4, 0
beq _0806FFE6
bl sub_8085480
adds r1, r0, 0
ldr r0, _0807000C
movs r2, 0
bl sub_8045B94
ldr r0, _08070010
adds r1, r7, 0
bl sub_8092558
movs r0, 0xCE
bl sub_8011988
ldr r0, _08070014
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_0806FFE6:
ldr r0, _08070018
adds r1, r5, 0
movs r2, 0
bl sub_808D9DC
ldr r0, [sp, 0x54]
ldr r1, [sp, 0x5C]
str r0, [r1]
_0806FFF6:
movs r0, 0x1
_0806FFF8:
add sp, 0x60
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08070008: .4byte gUnknown_80FA0C8
_0807000C: .4byte gUnknown_202DF98
_08070010: .4byte gUnknown_202E628
_08070014: .4byte gUnknown_80FA120
_08070018: .4byte gUnknown_202E088
thumb_func_end sub_806FDF4
thumb_func_start sub_807001C
sub_807001C:
push {r4-r6,lr}
adds r5, r0, 0
ldr r4, [r5, 0x70]
ldr r0, _08070050
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r0, 0x44
movs r1, 0x1
bl sub_8044C94
adds r0, r4, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x3
bne _08070042
b _0807019C
_08070042:
cmp r0, 0x3
bgt _08070054
cmp r0, 0x1
bne _0807004C
b _0807019C
_0807004C:
b _0807005A
.align 2, 0
_08070050: .4byte gUnknown_202DF98
_08070054:
cmp r0, 0x5
bne _0807005A
b _0807019C
_0807005A:
adds r0, r4, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x3
beq _0807008C
cmp r0, 0x3
bgt _0807006E
cmp r0, 0x1
beq _0807007A
b _080700AC
_0807006E:
cmp r0, 0x4
beq _0807009C
cmp r0, 0x6
bne _08070078
b _0807019C
_08070078:
b _080700AC
_0807007A:
ldr r0, _08070088
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_08070088: .4byte gUnknown_80F954C
_0807008C:
ldr r0, _08070098
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_08070098: .4byte gUnknown_80F956C
_0807009C:
ldr r0, _080700A8
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_080700A8: .4byte gUnknown_80F958C
_080700AC:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x3
beq _080700D4
cmp r0, 0x7
beq _080700E4
adds r0, r4, 0
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x1
bne _080700F4
ldr r0, _080700D0
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_080700D0: .4byte gUnknown_80F95D8
_080700D4:
ldr r0, _080700E0
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_080700E0: .4byte gUnknown_80F95A4
_080700E4:
ldr r0, _080700F0
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807019C
.align 2, 0
_080700F0: .4byte gUnknown_80F95BC
_080700F4:
adds r0, r4, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _0807012E
adds r0, r4, 0
adds r0, 0x44
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8044CA0
movs r0, 0x8
bl sub_8084100
adds r1, r4, 0
adds r1, 0x46
strb r0, [r1]
ldrh r1, [r5, 0x4]
movs r2, 0xB6
lsls r2, 1
adds r0, r4, r2
strh r1, [r0]
ldrh r0, [r5, 0x6]
subs r0, 0x1
movs r1, 0xB7
lsls r1, 1
adds r2, r4, r1
strh r0, [r2]
b _0807019C
_0807012E:
ldrb r0, [r4, 0x8]
cmp r0, 0x1
beq _0807019C
adds r0, r4, 0
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x1
bne _0807017C
adds r6, r4, 0
adds r6, 0x46
ldrb r1, [r6]
adds r0, r5, 0
bl sub_8070D6C
lsls r0, 24
cmp r0, 0
bne _08070166
movs r0, 0x2
bl sub_8084100
cmp r0, 0
beq _08070174
movs r0, 0x8
bl sub_8084100
movs r1, 0x7
ands r1, r0
strb r1, [r6]
_08070166:
adds r0, r4, 0
adds r0, 0x44
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8044CA0
b _0807019C
_08070174:
adds r0, r5, 0
bl sub_807BB94
b _0807019C
_0807017C:
cmp r0, 0x2
beq _08070184
movs r0, 0
b _0807019E
_08070184:
adds r0, r4, 0
adds r0, 0x44
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8044CA0
movs r0, 0x8
bl sub_8084100
adds r1, r4, 0
adds r1, 0x46
strb r0, [r1]
_0807019C:
movs r0, 0x1
_0807019E:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_807001C
thumb_func_start sub_80701A4
sub_80701A4:
push {r4-r7,lr}
adds r7, r0, 0
ldr r6, [r7, 0x70]
movs r4, 0
ldr r0, _080701D4
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x1
bl sub_8044C94
adds r0, r6, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x3
beq _080701DC
cmp r0, 0x3
bgt _080701D8
cmp r0, 0x1
beq _080701DC
b _080701E4
.align 2, 0
_080701D4: .4byte gUnknown_202DF98
_080701D8:
cmp r0, 0x5
bne _080701E4
_080701DC:
ldr r0, _080701E0
b _08070278
.align 2, 0
_080701E0: .4byte gUnknown_80F95EC
_080701E4:
adds r0, r6, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x3
beq _0807020C
cmp r0, 0x3
bgt _080701F8
cmp r0, 0x1
beq _08070202
b _0807021C
_080701F8:
cmp r0, 0x4
beq _08070214
cmp r0, 0x6
beq _08070280
b _0807021C
_08070202:
ldr r0, _08070208
b _08070278
.align 2, 0
_08070208: .4byte gUnknown_80F954C
_0807020C:
ldr r0, _08070210
b _08070278
.align 2, 0
_08070210: .4byte gUnknown_80F956C
_08070214:
ldr r0, _08070218
b _08070278
.align 2, 0
_08070218: .4byte gUnknown_80F958C
_0807021C:
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x8
bhi _0807026C
lsls r0, 2
ldr r1, _08070230
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08070230: .4byte _08070234
.align 2, 0
_08070234:
.4byte _0807026C
.4byte _0807026C
.4byte _08070258
.4byte _0807025C
.4byte _0807026C
.4byte _0807026C
.4byte _0807026C
.4byte _08070264
.4byte _0807026C
_08070258:
movs r4, 0x1
b _0807026C
_0807025C:
ldr r0, _08070260
b _08070278
.align 2, 0
_08070260: .4byte gUnknown_80F95A4
_08070264:
ldr r0, _08070268
b _08070278
.align 2, 0
_08070268: .4byte gUnknown_80F95BC
_0807026C:
adds r0, r6, 0
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x1
bne _08070288
ldr r0, _08070284
_08070278:
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
_08070280:
movs r0, 0x1
b _08070322
.align 2, 0
_08070284: .4byte gUnknown_80F95D8
_08070288:
cmp r0, 0
beq _08070320
cmp r0, 0xB
beq _08070320
cmp r0, 0xC
beq _08070320
cmp r4, 0
beq _080702A8
ldr r0, _080702A4
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _0807031A
.align 2, 0
_080702A4: .4byte gPtrMoveInterruptedMessage
_080702A8:
movs r5, 0
movs r0, 0x8C
lsls r0, 1
adds r4, r6, r0
_080702B0:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08070312
adds r0, r7, 0
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _08070312
adds r0, r6, 0
adds r0, 0xC2
ldrb r0, [r0]
cmp r0, r5
bne _08070312
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x14
bl sub_8044C94
adds r3, r5, 0
adds r7, r6, 0
adds r7, 0x50
cmp r5, 0
ble _0807030E
ldrb r1, [r4]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0807030E
movs r4, 0x2
lsls r0, r5, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r2, r0, r6
_080702FC:
subs r2, 0x8
subs r3, 0x1
cmp r3, 0
ble _0807030E
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _080702FC
_0807030E:
strb r3, [r7]
b _08070280
_08070312:
adds r4, 0x8
adds r5, 0x1
cmp r5, 0x3
ble _080702B0
_0807031A:
adds r0, r7, 0
bl sub_8079764
_08070320:
movs r0, 0
_08070322:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80701A4
thumb_func_start sub_8070328
sub_8070328:
push {lr}
lsls r0, 16
asrs r0, 16
bl GetWalkableTiles
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0x3
bhi _0807033E
adds r0, r1, 0
b _08070344
_0807033E:
ldr r0, _08070348
adds r0, r1, r0
ldrb r0, [r0]
_08070344:
pop {r1}
bx r1
.align 2, 0
_08070348: .4byte gUnknown_202F314
thumb_func_end sub_8070328
thumb_func_start sub_807034C
sub_807034C:
push {r4,lr}
adds r4, r1, 0
lsls r0, 16
asrs r2, r0, 16
ldr r0, [r4, 0x10]
cmp r0, 0
bne _08070398
ldrh r1, [r4]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08070398
adds r0, r2, 0
bl sub_8070328
lsls r0, 24
lsrs r2, r0, 24
ldrh r0, [r4]
movs r1, 0x3
ands r1, r0
cmp r2, 0x1
beq _08070388
cmp r2, 0x1
bgt _08070382
cmp r2, 0
beq _0807038C
b _08070390
_08070382:
cmp r2, 0x2
beq _08070394
b _08070390
_08070388:
cmp r1, 0x2
beq _08070390
_0807038C:
cmp r1, 0x1
bne _08070398
_08070390:
movs r0, 0
b _0807039A
_08070394:
cmp r1, 0
bne _08070390
_08070398:
movs r0, 0x1
_0807039A:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_807034C
thumb_func_start sub_80703A0
sub_80703A0:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
ldr r7, [r6, 0x70]
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r5, r0, 0
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0
blt _08070456
movs r2, 0x2
ldrsh r1, [r4, r2]
cmp r1, 0
blt _08070456
cmp r0, 0x37
bgt _08070456
cmp r1, 0x1F
bgt _08070456
ldr r0, [r5, 0x10]
cmp r0, 0
bne _08070456
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08070456
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070400
adds r0, r7, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _0807044E
adds r0, r6, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _0807044E
_08070400:
movs r1, 0x2
ldrsh r0, [r7, r1]
bl sub_8070328
lsls r0, 24
lsrs r4, r0, 24
ldrh r0, [r5]
movs r5, 0x3
ands r5, r0
adds r0, r6, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070422
movs r4, 0x2
_08070422:
adds r0, r6, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070432
movs r4, 0x3
_08070432:
cmp r4, 0x1
beq _08070446
cmp r4, 0x1
bgt _08070440
cmp r4, 0
beq _0807044A
b _0807044E
_08070440:
cmp r4, 0x2
beq _08070452
b _0807044E
_08070446:
cmp r5, 0x2
beq _0807044E
_0807044A:
cmp r5, 0x1
bne _08070456
_0807044E:
movs r0, 0
b _08070458
_08070452:
cmp r5, 0
bne _0807044E
_08070456:
movs r0, 0x1
_08070458:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80703A0
thumb_func_start sub_8070460
sub_8070460:
push {r4,lr}
adds r1, r0, 0
ldr r0, [r1, 0x70]
adds r4, r0, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070492
adds r0, r1, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08070492
movs r1, 0x2
ldrsh r0, [r4, r1]
bl sub_8070328
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
beq _08070492
movs r0, 0
b _08070494
_08070492:
movs r0, 0x1
_08070494:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8070460
thumb_func_start sub_807049C
sub_807049C:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
ldr r7, [r6, 0x70]
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r5, r0, 0
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0
blt _0807055A
movs r2, 0x2
ldrsh r1, [r4, r2]
cmp r1, 0
blt _0807055A
cmp r0, 0x37
bgt _0807055A
cmp r1, 0x1F
bgt _0807055A
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0807055A
ldr r0, [r5, 0x10]
cmp r0, 0
beq _080704E2
bl sub_80450F8
cmp r0, 0x1
bne _0807055A
_080704E2:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070504
adds r0, r7, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070552
adds r0, r6, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08070552
_08070504:
movs r1, 0x2
ldrsh r0, [r7, r1]
bl sub_8070328
lsls r0, 24
lsrs r4, r0, 24
ldrh r0, [r5]
movs r5, 0x3
ands r5, r0
adds r0, r6, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070526
movs r4, 0x2
_08070526:
adds r0, r6, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070536
movs r4, 0x3
_08070536:
cmp r4, 0x1
beq _0807054A
cmp r4, 0x1
bgt _08070544
cmp r4, 0
beq _0807054E
b _08070552
_08070544:
cmp r4, 0x2
beq _08070556
b _08070552
_0807054A:
cmp r5, 0x2
beq _08070552
_0807054E:
cmp r5, 0x1
bne _0807055A
_08070552:
movs r0, 0
b _0807055C
_08070556:
cmp r5, 0
bne _08070552
_0807055A:
movs r0, 0x1
_0807055C:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807049C
thumb_func_start sub_8070564
sub_8070564:
push {r4-r6,lr}
adds r4, r1, 0
ldr r6, [r0, 0x70]
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r5, r0, 0
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0
blt _080705E6
movs r2, 0x2
ldrsh r1, [r4, r2]
cmp r1, 0
blt _080705E6
cmp r0, 0x37
bgt _080705E6
cmp r1, 0x1F
bgt _080705E6
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _080705E6
ldr r0, [r5, 0x10]
cmp r0, 0
beq _080705A8
bl sub_80450F8
cmp r0, 0x1
bne _080705E6
_080705A8:
movs r1, 0x2
ldrsh r0, [r6, r1]
bl sub_8070328
lsls r0, 24
lsrs r2, r0, 24
adds r3, r2, 0
ldrh r0, [r5]
movs r1, 0x3
ands r1, r0
adds r0, r1, 0
cmp r2, 0x1
beq _080705DE
cmp r2, 0x1
bgt _080705CC
cmp r2, 0
beq _080705D8
b _080705D4
_080705CC:
cmp r3, 0x3
bgt _080705D4
cmp r1, 0
beq _080705E6
_080705D4:
movs r0, 0
b _080705E8
_080705D8:
cmp r1, 0x1
bne _080705E6
b _080705D4
_080705DE:
cmp r1, 0x2
beq _080705D4
cmp r0, 0x1
beq _080705D4
_080705E6:
movs r0, 0x1
_080705E8:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8070564
thumb_func_start sub_80705F0
sub_80705F0:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
ldr r7, [r6, 0x70]
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r5, r0, 0
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0
blt _0807069A
movs r2, 0x2
ldrsh r1, [r4, r2]
cmp r1, 0
blt _0807069A
cmp r0, 0x37
bgt _0807069A
cmp r1, 0x1F
bgt _0807069A
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0807069A
ldr r0, [r5, 0x10]
cmp r0, 0
beq _08070636
bl sub_80450F8
cmp r0, 0x1
bne _0807069A
_08070636:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070658
adds r0, r7, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070696
adds r0, r6, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08070696
_08070658:
movs r1, 0x2
ldrsh r0, [r7, r1]
bl sub_8070328
lsls r0, 24
lsrs r4, r0, 24
ldrh r0, [r5]
movs r5, 0x3
ands r5, r0
adds r0, r6, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807067A
movs r4, 0x2
_0807067A:
adds r0, r6, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807068A
movs r4, 0x3
_0807068A:
cmp r4, 0
blt _08070696
cmp r4, 0x2
bgt _08070696
cmp r5, 0
beq _0807069A
_08070696:
movs r0, 0
b _0807069C
_0807069A:
movs r0, 0x1
_0807069C:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80705F0
thumb_func_start sub_80706A4
sub_80706A4:
push {r4-r7,lr}
adds r7, r0, 0
adds r4, r1, 0
ldr r6, [r7, 0x70]
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
adds r5, r0, 0
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0
blt _0807076A
movs r2, 0x2
ldrsh r1, [r4, r2]
cmp r1, 0
blt _0807076A
cmp r0, 0x37
bgt _0807076A
cmp r1, 0x1F
bgt _0807076A
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0807076A
ldr r0, [r5, 0x10]
cmp r0, 0
beq _080706F2
bl sub_80450F8
cmp r0, 0x1
bne _0807076A
ldr r0, [r5, 0x10]
ldr r0, [r0, 0x70]
cmp r0, r6
bne _0807076A
_080706F2:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070714
adds r0, r6, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070762
adds r0, r7, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08070762
_08070714:
movs r1, 0x2
ldrsh r0, [r6, r1]
bl sub_8070328
lsls r0, 24
lsrs r4, r0, 24
ldrh r0, [r5]
movs r5, 0x3
ands r5, r0
adds r0, r7, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070736
movs r4, 0x2
_08070736:
adds r0, r7, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070746
movs r4, 0x3
_08070746:
cmp r4, 0x1
beq _0807075A
cmp r4, 0x1
bgt _08070754
cmp r4, 0
beq _0807075E
b _08070762
_08070754:
cmp r4, 0x2
beq _08070766
b _08070762
_0807075A:
cmp r5, 0x2
beq _08070762
_0807075E:
cmp r5, 0x1
bne _0807076A
_08070762:
movs r0, 0
b _0807076C
_08070766:
cmp r5, 0
bne _08070762
_0807076A:
movs r0, 0x1
_0807076C:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80706A4
thumb_func_start sub_8070774
sub_8070774:
push {r4-r6,lr}
adds r6, r0, 0
ldr r5, [r6, 0x70]
movs r4, 0
movs r0, 0x84
lsls r0, 1
adds r1, r5, r0
movs r2, 0x4
_08070784:
ldrb r0, [r1, 0x5]
cmp r0, 0
beq _0807078C
subs r4, 0x1
_0807078C:
ldrb r0, [r1]
cmp r0, 0
beq _08070794
adds r4, 0x1
_08070794:
adds r1, 0x1
subs r2, 0x1
cmp r2, 0
bge _08070784
adds r0, r5, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _080707A8
subs r4, 0x1
_080707A8:
movs r1, 0x2
ldrsh r0, [r5, r1]
bl GetMoveSpeed
adds r4, r0
adds r0, r6, 0
movs r1, 0x6
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _080707D0
adds r0, r6, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x7
bne _080707D0
adds r4, 0x1
_080707D0:
movs r0, 0x4
ldrsh r1, [r5, r0]
ldr r0, _0807081C
cmp r1, r0
bne _080707DC
adds r4, 0x1
_080707DC:
movs r0, 0x2
ldrsh r1, [r5, r0]
movs r0, 0xBE
lsls r0, 1
cmp r1, r0
bne _080707FE
ldrb r0, [r5, 0x6]
cmp r0, 0
beq _080707FE
ldr r0, _08070820
ldr r0, [r0]
ldr r1, _08070824
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _080707FE
adds r4, 0x1
_080707FE:
cmp r4, 0
bge _08070804
movs r4, 0
_08070804:
cmp r4, 0x4
ble _0807080A
movs r4, 0x4
_0807080A:
movs r1, 0x82
lsls r1, 1
adds r0, r5, r1
str r4, [r0]
adds r0, r4, 0
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0807081C: .4byte 0x000001a3
_08070820: .4byte gUnknown_203B418
_08070824: .4byte 0x0000066e
thumb_func_end sub_8070774
thumb_func_start sub_8070828
sub_8070828:
push {r4-r6,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r6, r1, 24
movs r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08070840
movs r0, 0
b _080708AE
_08070840:
adds r0, r4, 0
movs r1, 0x1B
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807085E
adds r0, r4, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x4
bne _0807085E
movs r5, 0x1
_0807085E:
adds r0, r4, 0
movs r1, 0x4A
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807087C
adds r0, r4, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0807087C
movs r5, 0x1
_0807087C:
cmp r6, 0
beq _080708A0
ldr r0, [r4, 0x70]
movs r1, 0x40
adds r2, r5, 0
bl sub_8071ACC
lsls r0, 24
cmp r0, 0
beq _080708A0
adds r0, r4, 0
bl sub_80429B4
ldr r0, _080708A8
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_080708A0:
cmp r5, 0
bne _080708AC
movs r0, 0x1
b _080708AE
.align 2, 0
_080708A8: .4byte gUnknown_80FEE80
_080708AC:
movs r0, 0x2
_080708AE:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8070828
thumb_func_start sub_80708B4
sub_80708B4:
push {r4,r5,lr}
adds r3, r0, 0
adds r4, r2, 0
ldr r0, _080708E8
ldr r2, [r0]
ldr r5, _080708EC
adds r0, r2, r5
ldrb r0, [r0]
cmp r0, 0
bne _080708DC
adds r5, 0x6
adds r0, r2, r5
ldrb r0, [r0]
cmp r0, 0
bne _080708DC
adds r0, r1, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
bne _080708F4
_080708DC:
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _080708F4
ldr r0, _080708F0
b _08070900
.align 2, 0
_080708E8: .4byte gUnknown_203B418
_080708EC: .4byte 0x0001820a
_080708F0: .4byte gUnknown_80F8988
_080708F4:
adds r0, r1, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _08070910
ldr r0, _0807090C
_08070900:
ldr r1, [r0]
adds r0, r3, 0
bl strcpy
b _0807095A
.align 2, 0
_0807090C: .4byte gUnknown_80F8968
_08070910:
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08070942
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0807092A
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _08070936
_0807092A:
movs r0, 0x4
ldrsh r1, [r1, r0]
adds r0, r3, 0
bl sub_808D8E0
b _0807095A
_08070936:
movs r5, 0x4
ldrsh r1, [r1, r5]
adds r0, r3, 0
bl sub_808D908
b _0807095A
_08070942:
ldr r2, _08070960
ldrb r1, [r1, 0xA]
movs r0, 0x64
muls r0, r1
ldr r1, _08070964
adds r0, r1
ldr r1, [r2]
adds r1, r0
adds r0, r3, 0
adds r2, r4, 0
bl sub_808D9DC
_0807095A:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08070960: .4byte gUnknown_203B45C
_08070964: .4byte 0x00008df8
thumb_func_end sub_80708B4
thumb_func_start sub_8070968
sub_8070968:
push {r4,lr}
adds r4, r0, 0
adds r3, r2, 0
adds r0, r1, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _08070990
ldr r1, _08070988
adds r2, 0x30
ldr r0, _0807098C
ldr r3, [r0]
adds r0, r4, 0
bl sub_800D158
b _080709BA
.align 2, 0
_08070988: .4byte gUnknown_8106FA4
_0807098C: .4byte gUnknown_80F8974
_08070990:
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _080709A2
movs r0, 0x4
ldrsh r1, [r1, r0]
adds r0, r4, 0
bl sub_808D908
b _080709BA
_080709A2:
ldr r2, _080709C0
ldrb r1, [r1, 0xA]
movs r0, 0x64
muls r0, r1
ldr r1, _080709C4
adds r0, r1
ldr r1, [r2]
adds r1, r0
adds r0, r4, 0
adds r2, r3, 0
bl sub_808D9DC
_080709BA:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080709C0: .4byte gUnknown_203B45C
_080709C4: .4byte 0x00008df8
thumb_func_end sub_8070968
thumb_func_start sub_80709C8
sub_80709C8:
push {r4,lr}
adds r3, r0, 0
ldr r0, _080709F8
ldr r2, [r0]
ldr r4, _080709FC
adds r0, r2, r4
ldrb r0, [r0]
cmp r0, 0
bne _080709EE
adds r4, 0x6
adds r0, r2, r4
ldrb r0, [r0]
cmp r0, 0
bne _080709EE
adds r0, r1, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
bne _08070A04
_080709EE:
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08070A04
ldr r0, _08070A00
b _08070A10
.align 2, 0
_080709F8: .4byte gUnknown_203B418
_080709FC: .4byte 0x0001820a
_08070A00: .4byte gUnknown_80F8994
_08070A04:
adds r0, r1, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _08070A20
ldr r0, _08070A1C
_08070A10:
ldr r1, [r0]
adds r0, r3, 0
bl strcpy
b _08070A48
.align 2, 0
_08070A1C: .4byte gUnknown_80F8974
_08070A20:
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08070A32
movs r0, 0x4
ldrsh r1, [r1, r0]
adds r0, r3, 0
bl sub_808D8BC
b _08070A48
_08070A32:
ldr r2, _08070A50
ldrb r1, [r1, 0xA]
movs r0, 0x64
muls r0, r1
ldr r1, _08070A54
adds r0, r1
ldr r1, [r2]
adds r1, r0
adds r0, r3, 0
bl sub_808DA0C
_08070A48:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08070A50: .4byte gUnknown_203B45C
_08070A54: .4byte 0x00008df8
thumb_func_end sub_80709C8
thumb_func_start sub_8070A58
sub_8070A58:
push {r4,lr}
ldr r0, [r0, 0x70]
mov r12, r0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070ADE
cmp r0, 0x3
beq _08070ADE
cmp r0, 0x4
beq _08070ADE
mov r0, r12
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0
bne _08070ADE
mov r0, r12
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x5
beq _08070A86
cmp r0, 0
bne _08070ADE
_08070A86:
mov r0, r12
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0
bne _08070ADE
mov r0, r12
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070ADE
cmp r0, 0x2
beq _08070ADE
mov r0, r12
adds r0, 0xD0
ldrb r0, [r0]
cmp r0, 0x1
beq _08070ADE
mov r0, r12
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0x2
beq _08070ADE
mov r0, r12
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070ADE
cmp r0, 0x2
beq _08070ADE
mov r0, r12
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0x1
beq _08070ADE
mov r0, r12
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
bne _08070ADE
mov r0, r12
adds r0, 0xFD
ldrb r0, [r0]
cmp r0, 0
beq _08070AE2
_08070ADE:
movs r0, 0x1
b _08070B1E
_08070AE2:
movs r3, 0
movs r4, 0x1
movs r2, 0x8C
lsls r2, 1
add r2, r12
_08070AEC:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _08070B00
ldrb r1, [r2, 0x1]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _08070ADE
_08070B00:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _08070AEC
movs r3, 0
ldr r1, _08070B24
add r1, r12
_08070B0E:
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
bne _08070ADE
adds r3, 0x1
cmp r3, 0x4
ble _08070B0E
movs r0, 0
_08070B1E:
pop {r4}
pop {r1}
bx r1
.align 2, 0
_08070B24: .4byte 0x0000010d
thumb_func_end sub_8070A58
thumb_func_start sub_8070B28
sub_8070B28:
push {lr}
ldr r0, [r0, 0x70]
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070B40
cmp r0, 0x5
beq _08070B40
cmp r0, 0x3
beq _08070B40
movs r0, 0
b _08070B42
_08070B40:
movs r0, 0x1
_08070B42:
pop {r1}
bx r1
thumb_func_end sub_8070B28
thumb_func_start sub_8070B48
sub_8070B48:
push {lr}
ldr r0, [r0, 0x70]
adds r1, r0, 0
movs r2, 0x10
ldrsh r0, [r1, r2]
cmp r0, 0
bge _08070B58
adds r0, 0x3
_08070B58:
movs r2, 0xE
ldrsh r1, [r1, r2]
asrs r0, 2
cmp r1, r0
ble _08070B66
movs r0, 0
b _08070B68
_08070B66:
movs r0, 0x1
_08070B68:
pop {r1}
bx r1
thumb_func_end sub_8070B48
thumb_func_start sub_8070B6C
sub_8070B6C:
push {lr}
lsls r1, 24
ldr r2, [r0, 0x70]
cmp r1, 0
beq _08070B80
adds r0, r2, 0
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070BB8
_08070B80:
adds r0, r2, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _08070BB8
cmp r0, 0x5
beq _08070BB8
cmp r0, 0x3
beq _08070BB8
adds r0, r2, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x3
beq _08070BB8
cmp r0, 0x7
beq _08070BB8
adds r0, r2, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x6
beq _08070BB8
adds r0, r2, 0
adds r0, 0xFA
ldrb r0, [r0]
cmp r0, 0
bne _08070BB8
movs r0, 0
b _08070BBA
_08070BB8:
movs r0, 0x1
_08070BBA:
pop {r1}
bx r1
thumb_func_end sub_8070B6C
thumb_func_start sub_8070BC0
sub_8070BC0:
push {r4-r6,lr}
adds r4, r0, 0
ldr r5, [r4, 0x70]
movs r1, 0
bl sub_80570F4
lsls r0, 24
cmp r0, 0
bne _08070C56
adds r6, r5, 0
adds r6, 0xA8
ldrb r0, [r6]
cmp r0, 0x4
beq _08070C56
cmp r0, 0x3
beq _08070C56
adds r0, r4, 0
bl sub_8071494
lsls r0, 24
cmp r0, 0
bne _08070C56
adds r0, r5, 0
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0x1
beq _08070C56
adds r0, r5, 0
adds r0, 0xB0
ldrb r1, [r0]
cmp r1, 0x6
beq _08070C56
cmp r1, 0x1
beq _08070C56
adds r0, r5, 0
adds r0, 0xBC
ldrb r3, [r0]
adds r4, r0, 0
cmp r3, 0x2
beq _08070C56
ldrb r2, [r6]
cmp r2, 0x1
beq _08070C56
adds r0, r5, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
beq _08070C56
cmp r2, 0x5
beq _08070C56
cmp r3, 0x1
beq _08070C56
cmp r1, 0x3
beq _08070C56
cmp r1, 0x4
beq _08070C56
adds r0, r5, 0
adds r0, 0xE8
ldrb r1, [r0]
cmp r1, 0x2
beq _08070C56
adds r0, r5, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
beq _08070C56
cmp r1, 0x1
beq _08070C56
ldrb r0, [r4]
cmp r0, 0x7
beq _08070C56
cmp r0, 0x3
beq _08070C56
movs r0, 0x1
b _08070C58
_08070C56:
movs r0, 0
_08070C58:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8070BC0
thumb_func_start sub_8070C60
sub_8070C60:
push {r4,lr}
adds r4, r0, 0
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _08070CC6
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08070C7E
cmp r0, 0x47
bne _08070C82
_08070C7E:
movs r0, 0x1
b _08070C84
_08070C82:
movs r0, 0
_08070C84:
cmp r0, 0
bne _08070CC6
ldrb r0, [r1, 0x7]
cmp r0, 0
bne _08070C9A
adds r0, r4, 0
bl sub_8071494
lsls r0, 24
cmp r0, 0
bne _08070CC6
_08070C9A:
adds r0, r4, 0
movs r1, 0
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
bne _08070CC6
adds r0, r4, 0
bl sub_8070CD0
lsls r0, 24
cmp r0, 0
bne _08070CC6
adds r0, r4, 0
movs r1, 0
bl sub_80570F4
lsls r0, 24
cmp r0, 0
bne _08070CC6
movs r0, 0
b _08070CC8
_08070CC6:
movs r0, 0x1
_08070CC8:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8070C60
thumb_func_start sub_8070CD0
sub_8070CD0:
push {lr}
ldr r1, [r0, 0x70]
adds r0, r1, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x2
beq _08070CE2
cmp r0, 0
bne _08070CFE
_08070CE2:
adds r0, r1, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
beq _08070CFE
cmp r0, 0x6
beq _08070CFE
adds r0, r1, 0
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, 0x1
beq _08070CFE
movs r0, 0
b _08070D00
_08070CFE:
movs r0, 0x1
_08070D00:
pop {r1}
bx r1
thumb_func_end sub_8070CD0
thumb_func_start sub_8070D04
sub_8070D04:
push {lr}
adds r3, r0, 0
lsls r1, 24
ldr r2, [r3, 0x70]
cmp r1, 0
bne _08070D22
adds r0, r2, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x2
beq _08070D22
cmp r0, 0x4
beq _08070D22
cmp r0, 0
bne _08070D64
_08070D22:
adds r0, r2, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
beq _08070D64
cmp r0, 0x3
beq _08070D64
cmp r0, 0x4
beq _08070D64
cmp r0, 0x6
beq _08070D64
adds r0, r2, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x1
beq _08070D64
cmp r0, 0x3
beq _08070D64
cmp r0, 0x7
beq _08070D64
adds r0, r2, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
beq _08070D64
adds r0, r3, 0
bl sub_8071494
lsls r0, 24
cmp r0, 0
bne _08070D64
movs r0, 0
b _08070D66
_08070D64:
movs r0, 0x1
_08070D66:
pop {r1}
bx r1
thumb_func_end sub_8070D04
thumb_func_start sub_8070D6C
sub_8070D6C:
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r5, r0, 24
movs r2, 0x4
ldrsh r0, [r4, r2]
ldr r1, _08070DD8
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08070E34
ldr r0, [r2, 0x10]
cmp r0, 0
bne _08070E34
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070E04
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070DD2
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08070DDC
_08070DD2:
movs r5, 0x3
b _08070E04
.align 2, 0
_08070DD8: .4byte gUnknown_80F4448
_08070DDC:
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _08070E02
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070E04
movs r0, 0x1
ands r0, r6
movs r5, 0x3
cmp r0, 0
beq _08070E04
_08070E02:
movs r5, 0x2
_08070E04:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r2, r0, 0
adds r1, r2, 0
adds r1, 0xA
adds r1, r5
ldr r2, _08070E30
movs r0, 0x7
ands r0, r6
adds r0, r2
ldrb r1, [r1]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _08070E34
movs r0, 0x1
b _08070E36
.align 2, 0
_08070E30: .4byte gUnknown_8106FAD
_08070E34:
movs r0, 0
_08070E36:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8070D6C
thumb_func_start sub_8070E3C
sub_8070E3C:
push {r4-r7,lr}
adds r4, r0, 0
adds r6, r1, 0
adds r7, r2, 0
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r5, r0, 24
movs r2, 0
ldrsh r0, [r6, r2]
ldr r1, _08070EB0
lsls r2, r7, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x2
ldrsh r1, [r6, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08070F0C
ldr r0, [r2, 0x10]
cmp r0, 0
beq _08070E8A
bl sub_80450F8
cmp r0, 0x1
bne _08070F0C
_08070E8A:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08070EDC
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070EAC
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08070EB4
_08070EAC:
movs r5, 0x3
b _08070EDC
.align 2, 0
_08070EB0: .4byte gUnknown_80F4448
_08070EB4:
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _08070EDA
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08070EDC
movs r0, 0x1
ands r0, r7
movs r5, 0x3
cmp r0, 0
beq _08070EDC
_08070EDA:
movs r5, 0x2
_08070EDC:
movs r1, 0
ldrsh r0, [r6, r1]
movs r2, 0x2
ldrsh r1, [r6, r2]
bl sub_804954C
adds r2, r0, 0
adds r1, r2, 0
adds r1, 0xA
adds r1, r5
ldr r2, _08070F08
movs r0, 0x7
ands r0, r7
adds r0, r2
ldrb r1, [r1]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _08070F0C
movs r0, 0x1
b _08070F0E
.align 2, 0
_08070F08: .4byte gUnknown_8106FB5
_08070F0C:
movs r0, 0
_08070F0E:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8070E3C
thumb_func_start sub_8070F14
sub_8070F14:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r1, 0x4
ldrsh r0, [r4, r1]
ldr r1, _08070F70
lsls r2, r5, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08070F78
ldr r0, [r2, 0x10]
cmp r0, 0
bne _08070F78
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r2, r0, 0
ldr r1, _08070F74
movs r0, 0x7
ands r0, r5
adds r0, r1
ldrb r1, [r2, 0xA]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _08070F78
movs r0, 0x1
b _08070F7A
.align 2, 0
_08070F70: .4byte gUnknown_80F4448
_08070F74: .4byte gUnknown_8106FBD
_08070F78:
movs r0, 0
_08070F7A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8070F14
thumb_func_start sub_8070F80
sub_8070F80:
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r5, r0, 24
movs r2, 0x4
ldrsh r0, [r4, r2]
ldr r1, _08070FF4
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08071050
ldr r0, [r2, 0x10]
cmp r0, 0
beq _08070FCC
bl sub_80450F8
cmp r0, 0x1
bne _08071050
_08070FCC:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08071020
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08070FEE
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08070FF8
_08070FEE:
movs r5, 0x3
b _08071020
.align 2, 0
_08070FF4: .4byte gUnknown_80F4448
_08070FF8:
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807101E
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08071020
movs r0, 0x1
ands r0, r6
movs r5, 0x3
cmp r0, 0
beq _08071020
_0807101E:
movs r5, 0x2
_08071020:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r2, r0, 0
adds r1, r2, 0
adds r1, 0xA
adds r1, r5
ldr r2, _0807104C
movs r0, 0x7
ands r0, r6
adds r0, r2
ldrb r1, [r1]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _08071050
movs r0, 0x1
b _08071052
.align 2, 0
_0807104C: .4byte gUnknown_8106FC5
_08071050:
movs r0, 0
_08071052:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8070F80
thumb_func_start sub_8071058
sub_8071058:
push {r4-r7,lr}
adds r5, r0, 0
adds r7, r1, 0
ldr r0, [r5, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r6, r0, 24
movs r2, 0x4
ldrsh r0, [r5, r2]
ldr r1, _080710D4
lsls r2, r7, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r4, r0, 0
ldrh r1, [r4]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _08071130
ldr r0, [r4, 0x10]
cmp r0, 0
beq _080710AE
bl sub_80450F8
cmp r0, 0x1
beq _080710AE
ldr r0, [r4, 0x10]
ldr r0, [r0, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _08071130
_080710AE:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08071100
ldr r0, [r5, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _080710D0
adds r0, r5, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080710D8
_080710D0:
movs r6, 0x3
b _08071100
.align 2, 0
_080710D4: .4byte gUnknown_80F4448
_080710D8:
adds r0, r5, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _080710FE
adds r0, r5, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08071100
movs r0, 0x1
ands r0, r7
movs r6, 0x3
cmp r0, 0
beq _08071100
_080710FE:
movs r6, 0x2
_08071100:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_804954C
adds r4, r0, 0
adds r1, r4, 0
adds r1, 0xA
adds r1, r6
ldr r2, _0807112C
movs r0, 0x7
ands r0, r7
adds r0, r2
ldrb r1, [r1]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _08071130
movs r0, 0x1
b _08071132
.align 2, 0
_0807112C: .4byte gUnknown_8106FCD
_08071130:
movs r0, 0
_08071132:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8071058
thumb_func_start sub_8071138
sub_8071138:
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x1
bhi _08071152
movs r5, 0x2
_08071152:
movs r2, 0x4
ldrsh r0, [r4, r2]
ldr r1, _080711B0
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0807120C
ldr r0, [r2, 0x10]
cmp r0, 0
beq _0807118A
bl sub_80450F8
cmp r0, 0x1
bne _0807120C
_0807118A:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _080711DC
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _080711AC
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080711B4
_080711AC:
movs r5, 0x3
b _080711DC
.align 2, 0
_080711B0: .4byte gUnknown_80F4448
_080711B4:
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _080711DA
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080711DC
movs r0, 0x1
ands r0, r6
movs r5, 0x3
cmp r0, 0
beq _080711DC
_080711DA:
movs r5, 0x2
_080711DC:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r2, r0, 0
adds r1, r2, 0
adds r1, 0xA
adds r1, r5
ldr r2, _08071208
movs r0, 0x7
ands r0, r6
adds r0, r2
ldrb r1, [r1]
ldrb r0, [r0]
ands r0, r1
cmp r0, 0
beq _0807120C
movs r0, 0x1
b _0807120E
.align 2, 0
_08071208: .4byte gUnknown_8106FD5
_0807120C:
movs r0, 0
_0807120E:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8071138
thumb_func_start sub_8071214
sub_8071214:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r4, r0, 0
adds r7, r1, 0
mov r8, r2
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r6, r0, 24
movs r0, 0
mov r2, r8
strb r0, [r2]
movs r3, 0x4
ldrsh r0, [r4, r3]
ldr r1, _0807130C
lsls r2, r7, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
adds r5, r0, 0
ldrh r1, [r5]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08071260
b _0807137E
_08071260:
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _08071286
ldr r0, _08071310
ldr r0, [r0]
ldr r1, _08071314
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _08071286
adds r0, r4, 0
movs r1, 0xF
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08071286
b _0807137E
_08071286:
ldr r0, [r5, 0x14]
cmp r0, 0
beq _080712B8
adds r0, r4, 0
movs r1, 0xE
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080712B8
ldr r0, [r5, 0x14]
bl sub_80450F8
cmp r0, 0x2
bne _080712B8
ldr r0, [r5, 0x14]
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
bne _0807137E
ldr r0, [r4, 0x70]
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x3
beq _0807137E
_080712B8:
ldrh r1, [r5]
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
bne _080712E6
ldr r1, _08071318
ldr r0, _08071310
ldr r0, [r0]
ldr r2, _0807131C
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
bne _080712E6
adds r0, r4, 0
movs r1, 0x14
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807137E
_080712E6:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _08071348
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08071308
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08071320
_08071308:
movs r6, 0x3
b _08071348
.align 2, 0
_0807130C: .4byte gUnknown_80F4448
_08071310: .4byte gUnknown_203B418
_08071314: .4byte 0x00000671
_08071318: .4byte gUnknown_810ACC0
_0807131C: .4byte 0x00003a0e
_08071320:
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _08071346
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08071348
movs r0, 0x1
ands r0, r7
movs r6, 0x3
cmp r0, 0
beq _08071348
_08071346:
movs r6, 0x2
_08071348:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r0, 0xA
adds r0, r6
ldr r2, _08071374
movs r1, 0x7
ands r1, r7
adds r1, r2
ldrb r2, [r0]
ldrb r0, [r1]
ands r0, r2
cmp r0, 0
beq _0807137E
ldr r0, [r5, 0x10]
cmp r0, 0
bne _08071378
movs r0, 0x1
b _08071380
.align 2, 0
_08071374: .4byte gUnknown_8106FDD
_08071378:
movs r0, 0x1
mov r3, r8
strb r0, [r3]
_0807137E:
movs r0, 0
_08071380:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8071214
thumb_func_start sub_807138C
sub_807138C:
push {r4,r5,lr}
adds r4, r0, 0
ldr r0, [r4, 0x70]
movs r1, 0x2
ldrsh r0, [r0, r1]
bl sub_8070328
lsls r0, 24
lsrs r5, r0, 24
bl sub_80441E8
lsls r0, 24
cmp r0, 0
bne _080713E2
ldr r0, [r4, 0x70]
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _080713E0
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _080713E0
adds r0, r4, 0
movs r1, 0xC
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080713D2
movs r5, 0x2
b _080713E2
_080713D2:
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080713E2
_080713E0:
movs r5, 0x3
_080713E2:
cmp r5, 0x3
bne _08071408
ldr r4, [r4, 0x70]
movs r0, 0x64
bl sub_8084100
movs r1, 0xFD
lsls r1, 1
adds r2, r4, r1
ldrh r1, [r2]
adds r1, r0
strh r1, [r2]
lsls r1, 16
asrs r1, 16
cmp r1, 0xC7
ble _08071458
movs r0, 0
strh r0, [r2]
b _08071468
_08071408:
ldr r1, _0807145C
ldr r0, _08071460
ldr r0, [r0]
ldr r2, _08071464
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
bne _08071432
cmp r5, 0x1
bne _08071432
adds r0, r4, 0
movs r1, 0x14
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08071432
movs r5, 0
_08071432:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
adds r0, 0xA
adds r0, r5
ldrb r0, [r0]
cmp r0, 0x54
beq _08071468
cmp r0, 0x51
beq _08071468
cmp r0, 0x45
beq _08071468
cmp r0, 0x15
beq _08071468
cmp r0, 0x55
beq _08071468
_08071458:
movs r0, 0
b _0807146A
.align 2, 0
_0807145C: .4byte gUnknown_810ACC0
_08071460: .4byte gUnknown_203B418
_08071464: .4byte 0x00003a0e
_08071468:
movs r0, 0x1
_0807146A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_807138C
thumb_func_start sub_8071470
sub_8071470:
push {r4,lr}
lsls r1, 24
lsrs r4, r1, 24
movs r1, 0x3
bl sub_80718AC
lsls r0, 24
cmp r0, 0
beq _0807148A
cmp r4, 0
beq _0807148A
movs r0, 0x1
b _0807148C
_0807148A:
movs r0, 0
_0807148C:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8071470
thumb_func_start sub_8071494
sub_8071494:
push {r4,r5,lr}
adds r5, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807150E
ldr r4, [r5, 0x70]
adds r0, r4, 0
adds r0, 0xFA
ldrb r0, [r0]
cmp r0, 0
bne _0807150A
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _0807150E
adds r0, r5, 0
movs r1, 0x2B
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080714DC
movs r2, 0
movs r1, 0x10
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
movs r3, 0xE
ldrsh r1, [r4, r3]
asrs r0, 1
cmp r1, r0
bge _080714D8
movs r2, 0x1
_080714D8:
cmp r2, 0
bne _0807150A
_080714DC:
adds r0, r5, 0
movs r1, 0xA
bl sub_80718AC
lsls r0, 24
cmp r0, 0
bne _0807150A
adds r0, r5, 0
movs r1, 0x6
bl sub_80718AC
lsls r0, 24
cmp r0, 0
beq _0807150E
movs r1, 0x10
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
movs r2, 0xE
ldrsh r1, [r4, r2]
asrs r0, 1
cmp r1, r0
bgt _0807150E
_0807150A:
movs r0, 0x1
b _08071510
_0807150E:
movs r0, 0
_08071510:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8071494
thumb_func_start sub_8071518
sub_8071518:
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
bl sub_8071494
lsls r0, 24
cmp r0, 0
bne _0807152E
movs r0, 0
b _08071538
_0807152E:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8071540
movs r0, 0x1
_08071538:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8071518
thumb_func_start sub_8071540
sub_8071540:
push {r4-r7,lr}
adds r5, r0, 0
lsls r1, 24
lsrs r7, r1, 24
ldr r4, [r5, 0x70]
adds r6, r4, 0
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _08071590
adds r0, r5, 0
movs r1, 0x2B
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08071590
movs r2, 0
movs r1, 0x10
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
movs r3, 0xE
ldrsh r1, [r4, r3]
asrs r0, 1
cmp r1, r0
bgt _08071576
movs r2, 0x1
_08071576:
adds r0, r6, 0
movs r1, 0x4
bl sub_8071ACC
lsls r0, 24
lsrs r0, 24
cmp r7, 0
beq _08071590
cmp r0, 0
beq _08071590
adds r0, r5, 0
bl sub_8042910
_08071590:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8071540
thumb_func_start sub_8071598
sub_8071598:
push {r4-r6,lr}
adds r6, r0, 0
lsls r2, 24
lsrs r2, 24
lsls r3, 24
lsrs r3, 24
ldr r5, [r6, 0x70]
ldr r4, [r1, 0x70]
cmp r6, r1
bne _080715B0
movs r0, 0
b _08071670
_080715B0:
ldrb r0, [r5, 0x8]
cmp r0, 0x1
beq _08071606
ldrb r0, [r4, 0x8]
cmp r0, 0x1
beq _08071606
adds r0, r5, 0
adds r0, 0xA4
ldrb r1, [r0]
cmp r1, 0x4
beq _08071606
adds r0, r4, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x4
beq _08071606
cmp r1, 0x1
beq _08071606
cmp r0, 0x1
beq _08071606
cmp r3, 0
beq _080715EC
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _080715EC
adds r0, r4, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x6
beq _08071606
_080715EC:
cmp r2, 0
bne _0807160A
adds r0, r4, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
bne _0807160A
adds r0, r6, 0
bl sub_8071884
lsls r0, 24
cmp r0, 0
bne _0807160A
_08071606:
movs r0, 0x2
b _08071670
_0807160A:
movs r1, 0x80
lsls r1, 1
adds r0, r5, r1
ldrb r0, [r0]
movs r6, 0
cmp r0, 0
beq _08071620
movs r6, 0x2
cmp r0, 0x1
bne _08071620
movs r6, 0x1
_08071620:
ldrb r0, [r5, 0x8]
cmp r0, 0
beq _08071630
movs r5, 0
cmp r0, 0x3
bne _08071638
movs r5, 0x1
b _08071638
_08071630:
ldrb r1, [r5, 0x6]
negs r0, r1
orrs r0, r1
lsrs r5, r0, 31
_08071638:
ldrb r0, [r4, 0x8]
cmp r0, 0
beq _08071648
movs r1, 0
cmp r0, 0x3
bne _08071650
movs r1, 0x1
b _08071650
_08071648:
ldrb r1, [r4, 0x6]
negs r0, r1
orrs r0, r1
lsrs r1, r0, 31
_08071650:
movs r3, 0
adds r0, r4, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _0807165E
movs r3, 0x1
_0807165E:
ldr r2, _08071678
lsls r0, r1, 1
adds r0, r3, r0
lsls r1, r5, 2
adds r0, r1
lsls r1, r6, 3
adds r0, r1
adds r0, r2
ldrb r0, [r0]
_08071670:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08071678: .4byte gUnknown_8106FE5
thumb_func_end sub_8071598
thumb_func_start sub_807167C
sub_807167C:
push {lr}
ldr r2, [r0, 0x70]
ldr r1, [r1, 0x70]
adds r0, r2, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _080716D2
adds r0, r2, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0807169A
cmp r0, 0x47
bne _0807169E
_0807169A:
movs r0, 0x1
b _080716A0
_0807169E:
movs r0, 0
_080716A0:
cmp r0, 0
bne _080716D2
ldrb r0, [r2, 0x8]
cmp r0, 0
bne _080716D2
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _080716D2
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _080716C2
cmp r0, 0x47
bne _080716C6
_080716C2:
movs r0, 0x1
b _080716C8
_080716C6:
movs r0, 0
_080716C8:
cmp r0, 0
bne _080716D2
ldrb r0, [r1, 0x8]
cmp r0, 0
beq _080716D6
_080716D2:
movs r0, 0x2
b _080716E4
_080716D6:
ldrb r0, [r2, 0x6]
ldrb r1, [r1, 0x6]
cmp r0, r1
bne _080716E2
movs r0, 0
b _080716E4
_080716E2:
movs r0, 0x1
_080716E4:
pop {r1}
bx r1
thumb_func_end sub_807167C
thumb_func_start sub_80716E8
sub_80716E8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
ldr r0, [r4, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x2
bne _08071720
cmp r2, 0
beq _08071714
ldr r0, _08071718
movs r2, 0
bl sub_8045B94
ldr r0, _0807171C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08071714:
movs r0, 0x1
b _08071722
.align 2, 0
_08071718: .4byte gUnknown_202DF98
_0807171C: .4byte gUnknown_80FC2FC
_08071720:
movs r0, 0
_08071722:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80716E8
thumb_func_start sub_8071728
sub_8071728:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
adds r5, r2, 0
ldr r0, [r4, 0x70]
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xE
bne _08071758
cmp r2, 0
beq _0807178E
ldr r0, _08071750
movs r2, 0
bl sub_8045B94
ldr r0, _08071754
b _08071784
.align 2, 0
_08071750: .4byte gUnknown_202DF98
_08071754: .4byte gUnknown_80FC31C
_08071758:
adds r0, r4, 0
movs r1, 0xF
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _08071774
adds r0, r4, 0
movs r1, 0x18
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807179C
_08071774:
cmp r5, 0
beq _0807178E
ldr r0, _08071794
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08071798
_08071784:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_0807178E:
movs r0, 0x1
b _0807179E
.align 2, 0
_08071794: .4byte gUnknown_202DF98
_08071798: .4byte gUnknown_80FCEFC
_0807179C:
movs r0, 0
_0807179E:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8071728
thumb_func_start sub_80717A4
sub_80717A4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
mov r8, r0
lsls r1, 16
lsrs r1, 16
mov r9, r1
ldr r6, [r0, 0x70]
adds r0, r6, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _080717CE
cmp r0, 0x5
beq _080717CE
cmp r0, 0x3
beq _080717CE
b _08071816
_080717CA:
movs r0, 0x1
b _08071818
_080717CE:
movs r7, 0
movs r0, 0x8C
lsls r0, 1
adds r4, r6, r0
adds r5, r4, 0
_080717D8:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807180C
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _080717F0
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0807180C
_080717F0:
mov r0, r8
adds r1, r5, 0
movs r2, 0x1
bl sub_805744C
lsls r0, 24
cmp r0, 0
beq _0807180C
ldrb r0, [r4, 0x4]
cmp r0, 0
beq _0807180C
ldrh r0, [r4, 0x2]
cmp r0, r9
beq _080717CA
_0807180C:
adds r4, 0x8
adds r5, 0x8
adds r7, 0x1
cmp r7, 0x3
ble _080717D8
_08071816:
movs r0, 0
_08071818:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_80717A4
thumb_func_start sub_8071824
sub_8071824:
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r5, r1, 24
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08071850
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0x5E
ldrb r0, [r0]
cmp r0, r5
beq _0807184C
adds r0, r1, 0
adds r0, 0x5F
ldrb r0, [r0]
cmp r0, r5
bne _08071850
_0807184C:
movs r0, 0x1
b _08071852
_08071850:
movs r0, 0
_08071852:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8071824
thumb_func_start sub_8071858
sub_8071858:
push {lr}
lsls r1, 24
lsrs r1, 24
adds r3, r1, 0
ldr r0, [r0, 0x70]
adds r2, r0, 0
cmp r1, 0
beq _0807187A
adds r0, 0x5C
ldrb r0, [r0]
cmp r0, r1
beq _0807187E
adds r0, r2, 0
adds r0, 0x5D
ldrb r0, [r0]
cmp r0, r3
beq _0807187E
_0807187A:
movs r0, 0
b _08071880
_0807187E:
movs r0, 0x1
_08071880:
pop {r1}
bx r1
thumb_func_end sub_8071858
thumb_func_start sub_8071884
sub_8071884:
push {lr}
adds r1, r0, 0
ldr r0, [r1, 0x70]
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x3
beq _080718A4
adds r0, r1, 0
movs r1, 0x1A
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _080718A4
movs r0, 0
b _080718A6
_080718A4:
movs r0, 0x1
_080718A6:
pop {r1}
bx r1
thumb_func_end sub_8071884
thumb_func_start sub_80718AC
sub_80718AC:
push {lr}
lsls r1, 24
lsrs r1, 24
ldr r2, [r0, 0x70]
ldrb r0, [r2, 0x7]
cmp r0, 0
beq _080718C4
movs r0, 0
cmp r1, 0x1
bne _080718D4
movs r0, 0x1
b _080718D4
_080718C4:
movs r3, 0
adds r0, r2, 0
adds r0, 0x94
ldrb r0, [r0]
cmp r0, r1
bne _080718D2
movs r3, 0x1
_080718D2:
adds r0, r3, 0
_080718D4:
pop {r1}
bx r1
thumb_func_end sub_80718AC
thumb_func_start sub_80718D8
sub_80718D8:
push {lr}
lsls r2, r1, 24
lsrs r2, 24
ldr r0, [r0, 0x70]
adds r0, 0x90
movs r1, 0x1
lsls r1, r2
bl sub_808ECD0
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
thumb_func_end sub_80718D8
thumb_func_start sub_80718F4
sub_80718F4:
push {r4,lr}
adds r4, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r2, 24
lsrs r2, 24
ldr r0, [r0, 0x70]
adds r0, 0x90
movs r3, 0x1
adds r1, r3, 0
lsls r1, r4
lsls r3, r2
orrs r1, r3
bl sub_808ECD0
lsls r0, 24
lsrs r0, 24
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_80718F4
thumb_func_start sub_807191C
sub_807191C:
push {r4-r6,lr}
ldr r5, [r0, 0x70]
ldrb r1, [r5, 0x6]
cmp r1, 0
beq _08071978
adds r4, r5, 0
adds r4, 0x90
adds r0, r4, 0
movs r1, 0x8
bl sub_808EC30
adds r0, r4, 0
movs r1, 0x6
bl sub_808EC30
adds r0, r4, 0
movs r1, 0x2
bl sub_808EC30
adds r0, r5, 0
adds r0, 0xF7
ldrb r0, [r0]
cmp r0, 0
beq _08071954
adds r0, r4, 0
movs r1, 0x12
bl sub_808EC30
_08071954:
ldrb r0, [r5, 0x9]
ldr r1, _08071974
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
blt _08071968
adds r0, r4, 0
movs r1, 0x16
bl sub_808EC30
_08071968:
adds r1, r5, 0
adds r1, 0x94
movs r0, 0x2
strb r0, [r1]
b _080719BE
.align 2, 0
_08071974: .4byte gUnknown_80F59C4
_08071978:
adds r0, r5, 0
adds r0, 0x90
strb r1, [r0]
adds r2, r5, 0
adds r2, 0x91
strb r1, [r2]
adds r2, 0x1
strb r1, [r2]
movs r4, 0x1
adds r6, r0, 0
_0807198C:
movs r1, 0xC
ldrsh r0, [r5, r1]
lsls r1, r4, 24
lsrs r1, 24
bl sub_808EB7C
lsls r0, 24
cmp r0, 0
beq _080719B8
movs r1, 0x1
lsls r1, r4
adds r0, r5, 0
adds r0, 0x8C
bl sub_808ECD0
lsls r0, 24
cmp r0, 0
beq _080719B8
adds r0, r6, 0
adds r1, r4, 0
bl sub_808EC30
_080719B8:
adds r4, 0x1
cmp r4, 0x17
ble _0807198C
_080719BE:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_807191C
thumb_func_start sub_80719C4
sub_80719C4:
push {r4-r6,lr}
adds r5, r0, 0
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
beq _080719D6
b _08071A0A
_080719D2:
movs r0, 0x1
b _08071A0C
_080719D6:
movs r6, 0
_080719D8:
ldr r0, _08071A14
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08071A18
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08071A04
cmp r5, r4
beq _08071A04
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
bne _080719D2
_08071A04:
adds r6, 0x1
cmp r6, 0x3
ble _080719D8
_08071A0A:
movs r0, 0
_08071A0C:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08071A14: .4byte gUnknown_203B418
_08071A18: .4byte 0x0001357c
thumb_func_end sub_80719C4
thumb_func_start sub_8071A1C
sub_8071A1C:
push {lr}
adds r3, r0, 0
adds r2, r1, 0
ldrh r1, [r2, 0x2]
movs r0, 0xA2
lsls r0, 1
cmp r1, r0
beq _08071A38
adds r0, r2, 0
bl sub_8092B00
lsls r0, 24
lsrs r0, 24
b _08071A3E
_08071A38:
ldr r0, [r3, 0x70]
adds r0, 0x3E
ldrb r0, [r0]
_08071A3E:
pop {r1}
bx r1
thumb_func_end sub_8071A1C
thumb_func_start sub_8071A44
sub_8071A44:
push {r4,lr}
adds r2, r0, 0
adds r4, r1, 0
ldrh r1, [r4, 0x2]
movs r0, 0xA2
lsls r0, 1
cmp r1, r0
beq _08071A60
adds r0, r4, 0
bl sub_8092BC0
ldrb r1, [r4, 0x5]
adds r0, r1
b _08071A6A
_08071A60:
ldr r0, [r2, 0x70]
movs r1, 0x3C
ldrsh r0, [r0, r1]
ldrb r4, [r4, 0x5]
adds r0, r4
_08071A6A:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8071A44
thumb_func_start sub_8071A70
sub_8071A70:
push {lr}
movs r1, 0x2
ldrsh r0, [r0, r1]
bl GetUnk33
lsls r0, 24
cmp r0, 0
beq _08071A84
movs r0, 0x1
b _08071A86
_08071A84:
movs r0, 0
_08071A86:
pop {r1}
bx r1
thumb_func_end sub_8071A70
thumb_func_start sub_8071A8C
sub_8071A8C:
push {r4,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08071AC2
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
beq _08071AC2
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08071AB4
cmp r0, 0x47
bne _08071AB8
_08071AB4:
movs r0, 0x1
b _08071ABA
_08071AB8:
movs r0, 0
_08071ABA:
cmp r0, 0
bne _08071AC2
movs r0, 0x1
b _08071AC4
_08071AC2:
movs r0, 0
_08071AC4:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8071A8C
thumb_func_start sub_8071ACC
sub_8071ACC:
push {r4,r5,lr}
adds r3, r0, 0
lsls r1, 16
lsrs r4, r1, 16
lsls r2, 24
lsrs r5, r2, 24
movs r1, 0xA7
lsls r1, 1
adds r0, r3, r1
ldrh r0, [r0]
ands r0, r4
cmp r0, 0
beq _08071AF6
movs r0, 0xA8
lsls r0, 1
adds r2, r3, r0
ldrh r1, [r2]
adds r0, r4, 0
orrs r0, r1
strh r0, [r2]
b _08071B02
_08071AF6:
movs r0, 0xA8
lsls r0, 1
adds r1, r3, r0
ldrh r0, [r1]
bics r0, r4
strh r0, [r1]
_08071B02:
cmp r5, 0
beq _08071B16
movs r1, 0xA7
lsls r1, 1
adds r2, r3, r1
ldrh r1, [r2]
adds r0, r4, 0
orrs r0, r1
strh r0, [r2]
b _08071B22
_08071B16:
movs r0, 0xA7
lsls r0, 1
adds r1, r3, r0
ldrh r0, [r1]
bics r0, r4
strh r0, [r1]
_08071B22:
movs r1, 0xA8
lsls r1, 1
adds r0, r3, r1
ldrh r0, [r0]
ands r0, r4
cmp r0, 0
bne _08071B40
subs r1, 0x2
adds r0, r3, r1
ldrh r0, [r0]
ands r0, r4
cmp r0, 0
beq _08071B40
movs r0, 0x1
b _08071B42
_08071B40:
movs r0, 0
_08071B42:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8071ACC
thumb_func_start sub_8071B48
sub_8071B48:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x14
movs r0, 0
mov r8, r0
ldr r0, _08071B94
ldr r6, [r0]
ldr r1, _08071B98
adds r0, r6, r1
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0
bne _08071B66
b _08071D3E
_08071B66:
subs r1, 0x20
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0x15
bne _08071B7C
ldr r2, _08071B9C
adds r0, r6, r2
ldrb r0, [r0]
cmp r0, 0
beq _08071B7C
b _08071D3E
_08071B7C:
ldr r0, _08071BA0
adds r1, r6, r0
ldrh r0, [r1]
adds r2, r0, 0x1
strh r2, [r1]
ldr r1, _08071BA4
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
bne _08071BAC
ldr r0, _08071BA8
b _08071BAE
.align 2, 0
_08071B94: .4byte gUnknown_203B418
_08071B98: .4byte 0x00000664
_08071B9C: .4byte 0x000037fd
_08071BA0: .4byte 0x00000662
_08071BA4: .4byte 0x0000066e
_08071BA8: .4byte gUnknown_80F4DAA
_08071BAC:
ldr r0, _08071C60
_08071BAE:
lsls r1, r2, 16
asrs r1, 16
movs r2, 0
ldrsh r0, [r0, r2]
cmp r1, r0
bge _08071BBC
b _08071D3E
_08071BBC:
ldr r1, _08071C64
adds r0, r6, r1
movs r2, 0
ldrsh r1, [r0, r2]
movs r0, 0xE1
lsls r0, 2
cmp r1, r0
ble _08071BF6
ldr r1, _08071C68
adds r0, r6, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08071BF6
ldrh r0, [r4, 0x26]
ldr r2, _08071C6C
adds r1, r6, r2
ldr r1, [r1]
cmp r0, r1
bne _08071BF6
ldr r0, _08071C70
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
mov r8, r4
_08071BF6:
ldr r1, _08071C64
adds r0, r6, r1
movs r1, 0
strh r1, [r0]
ldr r2, _08071C68
adds r0, r6, r2
str r1, [r0]
movs r7, 0
movs r5, 0
_08071C08:
lsls r0, r5, 2
ldr r2, _08071C74
adds r1, r6, r2
adds r1, r0
ldr r4, [r1]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08071C3A
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
ldrh r0, [r0]
movs r2, 0x80
lsls r2, 1
adds r1, r2, 0
ands r0, r1
cmp r0, 0
bne _08071C3A
adds r7, 0x1
_08071C3A:
adds r5, 0x1
cmp r5, 0xF
ble _08071C08
ldr r1, _08071C78
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
bne _08071C92
ldr r0, _08071C7C
ldr r0, [r0]
ldr r2, _08071C80
adds r0, r2
ldrb r0, [r0]
cmp r0, 0xFF
bne _08071C88
ldr r0, _08071C84
movs r1, 0
ldrsh r0, [r0, r1]
b _08071C8E
.align 2, 0
_08071C60: .4byte gUnknown_80F4DAC
_08071C64: .4byte 0x00000662
_08071C68: .4byte 0x00017b34
_08071C6C: .4byte 0x00017b40
_08071C70: .4byte gUnknown_202DF98
_08071C74: .4byte 0x0001358c
_08071C78: .4byte 0x0000066e
_08071C7C: .4byte gUnknown_203B418
_08071C80: .4byte 0x00003a0c
_08071C84: .4byte gUnknown_80F4DA6
_08071C88:
ldr r0, _08071CB8
movs r2, 0
ldrsh r0, [r0, r2]
_08071C8E:
cmp r7, r0
bge _08071D3E
_08071C92:
mov r0, r8
cmp r0, 0
beq _08071CA8
ldr r0, _08071CBC
ldr r1, [r0]
movs r0, 0
bl sub_805239C
mov r0, r8
bl sub_8042920
_08071CA8:
ldr r1, _08071CC0
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
beq _08071CC4
movs r5, 0xBE
lsls r5, 1
b _08071CCE
.align 2, 0
_08071CB8: .4byte gUnknown_80F4DA8
_08071CBC: .4byte gUnknown_80FED68
_08071CC0: .4byte 0x0000066e
_08071CC4:
movs r0, 0
bl sub_803D970
lsls r0, 16
asrs r5, r0, 16
_08071CCE:
adds r0, r5, 0
bl sub_803DA20
adds r4, r0, 0
cmp r4, 0
bne _08071CDC
movs r4, 0x1
_08071CDC:
adds r0, r5, 0
movs r1, 0
bl sub_806AA0C
lsls r0, 24
cmp r0, 0
beq _08071D3E
add r0, sp, 0xC
bl sub_8083660
lsls r0, 24
cmp r0, 0
beq _08071D3E
mov r0, sp
movs r1, 0
strh r5, [r0]
strh r4, [r0, 0x8]
strb r1, [r0, 0x2]
movs r0, 0x64
bl sub_8084100
adds r4, r0, 0
ldr r0, _08071D24
ldr r0, [r0]
ldr r2, _08071D28
adds r0, r2
ldrb r0, [r0]
bl sub_8090168
lsls r0, 16
asrs r0, 16
cmp r4, r0
bge _08071D2C
movs r0, 0x1
b _08071D2E
.align 2, 0
_08071D24: .4byte gUnknown_203B418
_08071D28: .4byte 0x00000644
_08071D2C:
movs r0, 0
_08071D2E:
str r0, [sp, 0x4]
mov r1, sp
movs r0, 0
strb r0, [r1, 0x10]
mov r0, sp
movs r1, 0
bl sub_806B7F8
_08071D3E:
add sp, 0x14
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8071B48
thumb_func_start sub_8071D4C
sub_8071D4C:
push {lr}
ldr r3, [r1, 0x70]
ldrb r0, [r3, 0x9]
cmp r0, 0x64
beq _08071D94
adds r0, r3, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08071D64
cmp r0, 0x47
bne _08071D68
_08071D64:
movs r0, 0x1
b _08071D6A
_08071D68:
movs r0, 0
_08071D6A:
cmp r0, 0
bne _08071D94
ldr r1, [r3, 0x18]
adds r2, r1, r2
ldr r0, _08071D98
cmp r2, r0
ble _08071D7A
ldr r2, _08071D9C
_08071D7A:
subs r2, r1
cmp r2, 0
beq _08071D94
movs r0, 0xFE
lsls r0, 1
adds r1, r3, r0
ldr r0, [r1]
adds r0, r2
str r0, [r1]
ldr r0, _08071DA0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0xD]
_08071D94:
pop {r0}
bx r0
.align 2, 0
_08071D98: .4byte 0x0098967e
_08071D9C: .4byte 0x0098967f
_08071DA0: .4byte gUnknown_203B418
thumb_func_end sub_8071D4C
thumb_func_start sub_8071DA4
sub_8071DA4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xD4
str r0, [sp, 0xB4]
ldr r2, _08071E44
ldr r1, [r2]
ldrb r0, [r1, 0xD]
cmp r0, 0
bne _08071DBE
b _08071FE2
_08071DBE:
movs r0, 0
strb r0, [r1, 0xD]
ldr r0, [r2]
ldrb r0, [r0, 0x10]
cmp r0, 0
beq _08071DCC
b _08071FE2
_08071DCC:
ldr r0, [sp, 0xB4]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08071DE2
mov r0, sp
bl sub_80457DC
mov r0, sp
str r0, [sp, 0xB4]
_08071DE2:
movs r4, 0
_08071DE4:
movs r5, 0
ldr r0, _08071E44
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _08071E48
adds r0, r2
adds r0, r1
ldr r0, [r0]
mov r8, r0
movs r0, 0
str r0, [sp, 0xB8]
movs r1, 0
movs r2, 0
str r1, [sp, 0xBC]
str r2, [sp, 0xC0]
movs r0, 0
movs r1, 0
str r0, [sp, 0xC4]
str r1, [sp, 0xC8]
adds r1, r4, 0x1
str r1, [sp, 0xCC]
mov r2, r8
cmp r2, 0
bne _08071E16
b _08071FDA
_08071E16:
mov r0, r8
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08071E24
b _08071FDA
_08071E24:
mov r0, r8
ldr r6, [r0, 0x70]
movs r1, 0xE
ldrsh r0, [r6, r1]
cmp r0, 0
bne _08071E32
b _08071FDA
_08071E32:
adds r1, r6, 0
adds r1, 0xF9
ldrb r0, [r1]
cmp r0, 0
beq _08071E4C
add r2, sp, 0xB8
ldrb r2, [r2]
strb r2, [r1]
b _08071FCA
.align 2, 0
_08071E44: .4byte gUnknown_203B418
_08071E48: .4byte 0x000135cc
_08071E4C:
movs r1, 0xFE
lsls r1, 1
adds r0, r6, r1
ldr r0, [r0]
mov r10, r0
cmp r0, 0
beq _08071EB6
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _08071E68
ldrb r1, [r6, 0x9]
add r0, sp, 0x74
bl sub_808EB48
_08071E68:
movs r0, 0x10
ldrsh r2, [r6, r0]
str r2, [sp, 0xB8]
ldrb r1, [r6, 0x14]
str r1, [sp, 0xBC]
ldrb r2, [r6, 0x15]
str r2, [sp, 0xC0]
ldrb r0, [r6, 0x16]
str r0, [sp, 0xC4]
ldrb r1, [r6, 0x17]
str r1, [sp, 0xC8]
ldrb r0, [r6, 0x9]
cmp r0, 0x64
beq _08071EB6
ldr r0, [r6, 0x18]
add r0, r10
str r0, [r6, 0x18]
mov r2, r10
ldr r0, _08071EE8
str r2, [r0]
ldr r0, _08071EEC
adds r1, r6, 0
movs r2, 0
bl sub_80708B4
ldr r0, _08071EF0
ldr r2, [r0]
ldr r0, [sp, 0xB4]
mov r1, r8
bl sub_80522F4
ldr r0, [sp, 0xB4]
mov r1, r8
movs r2, 0x1
movs r3, 0x1
bl sub_80723D0
lsls r0, 24
lsrs r5, r0, 24
_08071EB6:
ldr r1, _08071EF4
adds r0, r6, r1
ldrb r0, [r0]
adds r4, 0x1
str r4, [sp, 0xCC]
cmp r0, 0
beq _08071F3A
movs r2, 0x2
ldrsh r0, [r6, r2]
add r1, sp, 0x8C
movs r2, 0
movs r3, 0
bl sub_808E400
adds r7, r0, 0
add r0, sp, 0x8C
mov r9, r0
cmp r7, 0
beq _08071F38
adds r0, r7, 0
bl sub_8084100
adds r4, r0, 0
movs r1, 0
b _08071F02
.align 2, 0
_08071EE8: .4byte gUnknown_202DE30
_08071EEC: .4byte gUnknown_202DF98
_08071EF0: .4byte gUnknown_80F9E64
_08071EF4: .4byte 0x00000149
_08071EF8:
adds r4, 0x1
cmp r4, r7
blt _08071F00
movs r4, 0
_08071F00:
adds r1, 0x1
_08071F02:
cmp r1, r7
bge _08071F38
lsls r0, r4, 1
mov r2, r9
adds r5, r2, r0
movs r2, 0
ldrsh r0, [r5, r2]
str r1, [sp, 0xD0]
bl sub_803D930
lsls r0, 24
ldr r1, [sp, 0xD0]
cmp r0, 0
beq _08071EF8
movs r2, 0
ldrsh r0, [r5, r2]
bl sub_80687D0
ldr r1, [sp, 0xD0]
cmp r0, 0
beq _08071EF8
movs r0, 0
ldrsh r2, [r5, r0]
ldr r0, [sp, 0xB4]
mov r1, r8
bl sub_8072B78
_08071F38:
movs r5, 0
_08071F3A:
cmp r5, 0
beq _08071F7A
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _08071F7A
movs r1, 0x10
ldrsh r0, [r6, r1]
ldr r2, [sp, 0xB8]
subs r0, r2
ldr r1, _08071FF4
str r0, [r1]
ldrb r0, [r6, 0x14]
ldr r2, [sp, 0xBC]
subs r0, r2
str r0, [r1, 0x4]
ldrb r0, [r6, 0x16]
ldr r1, [sp, 0xC4]
subs r0, r1
ldr r2, _08071FF4
str r0, [r2, 0x8]
ldrb r0, [r6, 0x15]
ldr r1, [sp, 0xC0]
subs r0, r1
str r0, [r2, 0xC]
ldrb r0, [r6, 0x17]
ldr r2, [sp, 0xC8]
subs r0, r2
ldr r1, _08071FF4
str r0, [r1, 0x10]
mov r0, r8
bl sub_807218C
_08071F7A:
mov r2, r10
cmp r2, 0
beq _08071FCA
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _08071FCA
ldrb r1, [r6, 0x9]
add r0, sp, 0x80
bl sub_808EB48
movs r4, 0
add r7, sp, 0x74
add r5, sp, 0x80
_08071F94:
adds r0, r7, r4
ldrb r0, [r0]
cmp r0, 0
bne _08071FC4
adds r0, r5, r4
ldrb r0, [r0]
cmp r0, 0x1
bne _08071FC4
ldr r0, _08071FF8
mov r1, r8
movs r2, 0
bl sub_8045B94
lsls r1, r4, 24
lsrs r1, 24
ldr r0, _08071FFC
bl sub_808EAC0
ldr r0, _08072000
ldr r2, [r0]
ldr r0, [sp, 0xB4]
mov r1, r8
bl sub_80522F4
_08071FC4:
adds r4, 0x1
cmp r4, 0xB
ble _08071F94
_08071FCA:
movs r1, 0xFE
lsls r1, 1
adds r0, r6, r1
movs r1, 0
str r1, [r0]
ldr r2, _08072004
adds r0, r6, r2
strb r1, [r0]
_08071FDA:
ldr r4, [sp, 0xCC]
cmp r4, 0x13
bgt _08071FE2
b _08071DE4
_08071FE2:
add sp, 0xD4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08071FF4: .4byte gUnknown_202DE30
_08071FF8: .4byte gUnknown_202DF98
_08071FFC: .4byte gUnknown_202DE58
_08072000: .4byte gUnknown_80FF730
_08072004: .4byte 0x00000149
thumb_func_end sub_8071DA4
thumb_func_start sub_8072008
sub_8072008:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x38
mov r9, r0
mov r8, r1
adds r4, r2, 0
ldr r0, [sp, 0x58]
lsls r3, 24
lsrs r3, 24
mov r10, r3
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x24]
mov r0, r8
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08072036
b _08072162
_08072036:
movs r0, 0
str r0, [sp, 0x28]
mov r1, r8
ldr r5, [r1, 0x70]
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0807204C
add r0, sp, 0xC
ldrb r1, [r5, 0x9]
bl sub_808EB48
_0807204C:
movs r0, 0x10
ldrsh r2, [r5, r0]
str r2, [sp, 0x2C]
ldrb r6, [r5, 0x14]
ldrb r7, [r5, 0x15]
ldrb r1, [r5, 0x16]
str r1, [sp, 0x30]
ldrb r2, [r5, 0x17]
str r2, [sp, 0x34]
adds r0, r5, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0807206C
cmp r0, 0x47
bne _08072070
_0807206C:
movs r0, 0x1
b _08072072
_08072070:
movs r0, 0
_08072072:
cmp r0, 0
bne _080720E6
ldrb r0, [r5, 0x9]
adds r2, r0, r4
cmp r2, 0x63
ble _08072080
movs r2, 0x64
_08072080:
cmp r2, r0
beq _080720E6
movs r0, 0x2
ldrsh r1, [r5, r0]
mov r0, sp
bl sub_808E010
ldr r0, [sp]
str r0, [r5, 0x18]
mov r0, r9
mov r1, r8
mov r2, r10
ldr r3, [sp, 0x24]
bl sub_80723D0
ldr r1, [sp, 0x28]
orrs r1, r0
lsls r0, r1, 24
lsrs r0, 24
str r0, [sp, 0x28]
cmp r0, 0
beq _080720E6
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _080720E6
ldr r1, _08072174
movs r2, 0x10
ldrsh r0, [r5, r2]
ldr r2, [sp, 0x2C]
subs r0, r2
str r0, [r1]
ldrb r0, [r5, 0x14]
subs r0, r6
str r0, [r1, 0x4]
ldrb r0, [r5, 0x16]
ldr r2, [sp, 0x30]
subs r0, r2
str r0, [r1, 0x8]
ldrb r0, [r5, 0x15]
subs r0, r7
str r0, [r1, 0xC]
ldrb r0, [r5, 0x17]
ldr r2, [sp, 0x34]
subs r0, r2
str r0, [r1, 0x10]
mov r0, r10
cmp r0, 0
beq _080720E6
mov r0, r8
bl sub_807218C
_080720E6:
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _08072130
add r4, sp, 0x18
ldrb r1, [r5, 0x9]
adds r0, r4, 0
bl sub_808EB48
movs r6, 0
add r7, sp, 0xC
_080720FA:
adds r0, r7, r6
ldrb r0, [r0]
cmp r0, 0
bne _0807212A
adds r0, r4, r6
ldrb r0, [r0]
cmp r0, 0x1
bne _0807212A
ldr r0, _08072178
mov r1, r8
movs r2, 0
bl sub_8045B94
lsls r1, r6, 24
lsrs r1, 24
ldr r0, _0807217C
bl sub_808EAC0
ldr r0, _08072180
ldr r2, [r0]
mov r0, r9
mov r1, r8
bl sub_80522F4
_0807212A:
adds r6, 0x1
cmp r6, 0xB
ble _080720FA
_08072130:
movs r1, 0xFE
lsls r1, 1
adds r0, r5, r1
movs r1, 0
str r1, [r0]
ldr r2, _08072184
adds r0, r5, r2
strb r1, [r0]
ldr r0, [sp, 0x28]
cmp r0, 0
bne _08072162
mov r1, r10
cmp r1, 0
beq _08072162
ldr r0, _08072178
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _08072188
ldr r2, [r0]
mov r0, r9
mov r1, r8
bl sub_80522F4
_08072162:
add sp, 0x38
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08072174: .4byte gUnknown_202DE30
_08072178: .4byte gUnknown_202DF98
_0807217C: .4byte gUnknown_202DE58
_08072180: .4byte gUnknown_80FF730
_08072184: .4byte 0x00000149
_08072188: .4byte gUnknown_80F9B74
thumb_func_end sub_8072008
thumb_func_start sub_807218C
sub_807218C:
push {r4-r6,lr}
sub sp, 0x190
adds r4, r0, 0
movs r6, 0
ldr r5, [r4, 0x70]
movs r1, 0
bl sub_806A2BC
ldr r0, _080721C8
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
adds r0, r4, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
beq _08072200
movs r3, 0
movs r0, 0x2
ldrsh r1, [r5, r0]
adds r0, r5, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
bne _080721CC
movs r1, 0xD2
lsls r1, 1
b _080721EC
.align 2, 0
_080721C8: .4byte gUnknown_202DF98
_080721CC:
cmp r0, 0x47
bne _080721D8
ldr r1, _080721D4
b _080721EC
.align 2, 0
_080721D4: .4byte 0x000001a5
_080721D8:
cmp r0, 0x41
bne _080721EC
ldr r0, _080721F8
ldr r0, [r0]
ldr r2, _080721FC
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
bne _080721EC
movs r3, 0x1
_080721EC:
mov r0, sp
movs r2, 0x3
bl sub_806A3D4
b _0807220A
.align 2, 0
_080721F8: .4byte gUnknown_203B418
_080721FC: .4byte 0x0000065c
_08072200:
ldr r0, _08072308
ldr r1, [r0]
mov r0, sp
bl strcpy
_0807220A:
movs r0, 0
mov r1, sp
movs r2, 0x1
bl PrintFieldMessage
mov r0, sp
movs r1, 0
strb r1, [r0]
ldr r4, _0807230C
ldr r0, [r4]
cmp r0, 0
ble _0807222E
ldr r0, _08072310
ldr r1, [r0]
mov r0, sp
bl strcat
adds r6, 0x1
_0807222E:
ldr r0, [r4, 0x4]
cmp r0, 0
ble _0807225A
ldr r0, _08072314
adds r1, r6, r0
ldrb r0, [r1]
cmp r0, 0
beq _0807224E
ldr r0, _08072318
ldrb r1, [r1]
lsls r1, 2
adds r1, r0
ldr r1, [r1]
mov r0, sp
bl strcat
_0807224E:
ldr r0, _0807231C
ldr r1, [r0]
mov r0, sp
bl strcat
adds r6, 0x1
_0807225A:
ldr r0, _0807230C
ldr r0, [r0, 0x8]
cmp r0, 0
ble _08072288
ldr r0, _08072314
adds r1, r6, r0
ldrb r0, [r1]
cmp r0, 0
beq _0807227C
ldr r0, _08072318
ldrb r1, [r1]
lsls r1, 2
adds r1, r0
ldr r1, [r1]
mov r0, sp
bl strcat
_0807227C:
ldr r0, _08072320
ldr r1, [r0]
mov r0, sp
bl strcat
adds r6, 0x1
_08072288:
ldr r0, _0807230C
ldr r0, [r0, 0xC]
cmp r0, 0
ble _080722B6
ldr r0, _08072314
adds r1, r6, r0
ldrb r0, [r1]
cmp r0, 0
beq _080722AA
ldr r0, _08072318
ldrb r1, [r1]
lsls r1, 2
adds r1, r0
ldr r1, [r1]
mov r0, sp
bl strcat
_080722AA:
ldr r0, _08072324
ldr r1, [r0]
mov r0, sp
bl strcat
adds r6, 0x1
_080722B6:
ldr r0, _0807230C
ldr r0, [r0, 0x10]
cmp r0, 0
ble _080722E2
ldr r0, _08072314
adds r1, r6, r0
ldrb r0, [r1]
cmp r0, 0
beq _080722D8
ldr r0, _08072318
ldrb r1, [r1]
lsls r1, 2
adds r1, r0
ldr r1, [r1]
mov r0, sp
bl strcat
_080722D8:
ldr r0, _08072328
ldr r1, [r0]
mov r0, sp
bl strcat
_080722E2:
mov r0, sp
ldrb r0, [r0]
cmp r0, 0
beq _080722F4
movs r0, 0
mov r1, sp
movs r2, 0x1
bl PrintFieldMessage
_080722F4:
bl sub_8083600
movs r1, 0
bl sub_806A2BC
add sp, 0x190
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08072308: .4byte gUnknown_80FCF18
_0807230C: .4byte gUnknown_202DE30
_08072310: .4byte gUnknown_80F9ACC
_08072314: .4byte gUnknown_8107010
_08072318: .4byte gUnknown_8107018
_0807231C: .4byte gUnknown_80F9AEC
_08072320: .4byte gUnknown_80F9B10
_08072324: .4byte gUnknown_80F9B34
_08072328: .4byte gUnknown_80F9B58
thumb_func_end sub_807218C
thumb_func_start sub_807232C
sub_807232C:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0xC
mov r8, r0
adds r5, r1, 0
adds r7, r2, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080723B6
movs r6, 0
ldr r4, [r5, 0x70]
adds r0, r4, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08072358
cmp r0, 0x47
bne _0807235C
_08072358:
movs r0, 0x1
b _0807235E
_0807235C:
movs r0, 0
_0807235E:
cmp r0, 0
bne _0807238C
ldrb r0, [r4, 0x9]
subs r2, r0, r7
cmp r2, 0
bgt _0807236C
movs r2, 0x1
_0807236C:
cmp r2, r0
beq _0807238C
movs r0, 0x2
ldrsh r1, [r4, r0]
mov r0, sp
bl sub_808E010
ldr r0, [sp]
str r0, [r4, 0x18]
mov r0, r8
adds r1, r5, 0
bl sub_80725A4
orrs r6, r0
lsls r0, r6, 24
lsrs r6, r0, 24
_0807238C:
movs r1, 0xFE
lsls r1, 1
adds r0, r4, r1
movs r1, 0
str r1, [r0]
ldr r2, _080723C4
adds r0, r4, r2
strb r1, [r0]
cmp r6, 0
bne _080723B6
ldr r0, _080723C8
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _080723CC
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
_080723B6:
add sp, 0xC
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080723C4: .4byte 0x00000149
_080723C8: .4byte gUnknown_202DF98
_080723CC: .4byte gUnknown_80F9B94
thumb_func_end sub_807232C
thumb_func_start sub_80723D0
sub_80723D0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
str r0, [sp, 0xC]
mov r10, r1
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x10]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0x14]
movs r0, 0
str r0, [sp, 0x18]
mov r0, r10
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08072422
mov r1, r10
ldr r5, [r1, 0x70]
movs r0, 0x2
ldrsh r3, [r5, r0]
str r3, [sp, 0x1C]
ldr r1, [r5, 0x18]
str r1, [sp, 0x20]
adds r0, r5, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08072418
cmp r0, 0x47
bne _0807241C
_08072418:
movs r0, 0x1
b _0807241E
_0807241C:
movs r0, 0
_0807241E:
cmp r0, 0
beq _08072426
_08072422:
movs r0, 0
b _08072576
_08072426:
ldrb r0, [r5, 0x9]
adds r0, 0x1
mov r8, r0
mov r9, sp
b _0807255A
_08072430:
mov r3, r8
strb r3, [r5, 0x9]
ldr r0, [sp, 0x20]
str r0, [r5, 0x18]
ldr r1, [sp, 0x10]
cmp r1, 0
beq _080724A4
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _08072480
mov r0, r10
movs r1, 0
bl sub_806A2BC
ldr r3, [sp, 0x18]
cmp r3, 0
bne _08072456
bl sub_8083D58
_08072456:
ldr r0, _08072474
mov r1, r8
str r1, [r0]
ldr r0, _08072478
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
ldr r0, _0807247C
ldr r1, [r0]
mov r0, r10
bl sub_80528F4
b _080724A4
.align 2, 0
_08072474: .4byte gUnknown_202DE30
_08072478: .4byte gUnknown_202DF98
_0807247C: .4byte gUnknown_80F9E80
_08072480:
ldr r3, [sp, 0x18]
cmp r3, 0
bne _0807248A
bl sub_8083D58
_0807248A:
ldr r0, _08072588
mov r1, r8
str r1, [r0]
ldr r0, _0807258C
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
ldr r0, _08072590
ldr r1, [r0]
mov r0, r10
bl sub_805239C
_080724A4:
movs r3, 0x1
str r3, [sp, 0x18]
mov r1, r9
ldrh r0, [r1, 0x4]
ldrh r3, [r5, 0x10]
adds r0, r3
movs r2, 0
strh r0, [r5, 0x10]
ldrh r1, [r1, 0x4]
ldrh r3, [r5, 0xE]
adds r1, r3
strh r1, [r5, 0xE]
lsls r0, 16
ldr r1, _08072594
cmp r0, r1
ble _080724C8
ldr r0, _08072598
strh r0, [r5, 0x10]
_080724C8:
movs r0, 0xE
ldrsh r1, [r5, r0]
ldrh r2, [r5, 0x10]
movs r3, 0x10
ldrsh r0, [r5, r3]
cmp r1, r0
blt _080724D8
strh r2, [r5, 0xE]
_080724D8:
ldr r7, _0807259C
ldrb r4, [r5, 0x14]
str r4, [r7]
ldrb r1, [r5, 0x15]
str r1, [r7, 0x4]
ldr r6, _080725A0
ldrb r2, [r5, 0x16]
str r2, [r6]
ldrb r0, [r5, 0x17]
mov r12, r0
mov r3, r9
ldrb r0, [r3, 0x6]
adds r4, r0
str r4, [r7]
ldrb r0, [r3, 0x7]
adds r1, r0
str r1, [r7, 0x4]
ldrb r0, [r3, 0x8]
adds r2, r0
str r2, [r6]
ldrb r0, [r3, 0x9]
mov r1, r12
adds r3, r1, r0
str r3, [r6, 0x4]
cmp r4, 0xFE
ble _08072510
movs r3, 0xFF
str r3, [r7]
_08072510:
ldr r0, [r7, 0x4]
cmp r0, 0xFE
ble _0807251A
movs r0, 0xFF
str r0, [r7, 0x4]
_0807251A:
ldr r0, [r6]
cmp r0, 0xFE
ble _08072524
movs r1, 0xFF
str r1, [r6]
_08072524:
ldr r0, [r6, 0x4]
cmp r0, 0xFE
ble _0807252E
movs r3, 0xFF
str r3, [r6, 0x4]
_0807252E:
mov r0, r10
bl sub_807191C
mov r0, r10
bl sub_8079764
ldr r0, [r7]
strb r0, [r5, 0x14]
ldr r0, [r7, 0x4]
strb r0, [r5, 0x15]
ldr r0, [r6]
strb r0, [r5, 0x16]
ldr r0, [r6, 0x4]
strb r0, [r5, 0x17]
ldr r0, [sp, 0xC]
mov r1, r10
ldr r2, [sp, 0x10]
ldr r3, [sp, 0x14]
bl sub_8072778
movs r0, 0x1
add r8, r0
_0807255A:
mov r1, r8
cmp r1, 0x64
bgt _08072574
mov r0, sp
ldr r1, [sp, 0x1C]
mov r2, r8
bl sub_808E010
ldr r0, [sp]
ldr r3, [sp, 0x20]
cmp r0, r3
bgt _08072574
b _08072430
_08072574:
ldr r0, [sp, 0x18]
_08072576:
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08072588: .4byte gUnknown_202DE30
_0807258C: .4byte gUnknown_202DF98
_08072590: .4byte gUnknown_80F9E80
_08072594: .4byte 0x03e60000
_08072598: .4byte 0x000003e7
_0807259C: .4byte gUnknown_202F31C
_080725A0: .4byte gUnknown_202F324
thumb_func_end sub_80723D0
thumb_func_start sub_80725A4
sub_80725A4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
str r0, [sp, 0xC]
str r1, [sp, 0x10]
adds r0, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080725C2
b _0807272E
_080725C2:
ldr r0, [sp, 0x10]
ldr r5, [r0, 0x70]
movs r2, 0x2
ldrsh r1, [r5, r2]
str r1, [sp, 0x18]
ldr r3, [r5, 0x18]
str r3, [sp, 0x1C]
ldrb r0, [r5, 0x9]
str r0, [sp, 0x20]
adds r0, r5, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _080725E2
cmp r0, 0x47
bne _080725E6
_080725E2:
movs r0, 0x1
b _080725E8
_080725E6:
movs r0, 0
_080725E8:
cmp r0, 0
beq _080725EE
b _0807272E
_080725EE:
movs r1, 0x1
mov r8, r1
b _080725F8
_080725F4:
movs r2, 0x1
add r8, r2
_080725F8:
ldrb r3, [r5, 0x9]
cmp r8, r3
bge _08072610
mov r0, sp
ldr r1, [sp, 0x18]
mov r2, r8
bl sub_808E010
ldr r0, [sp]
ldr r1, [sp, 0x1C]
cmp r0, r1
blt _080725F4
_08072610:
mov r2, r8
subs r2, 0x1
str r2, [sp, 0x14]
ldrb r3, [r5, 0x9]
mov r8, r3
cmp r8, r2
ble _08072710
mov r9, sp
movs r0, 0x1
mov r10, r0
_08072624:
mov r4, r8
adds r4, 0x1
mov r1, r8
cmp r1, 0x63
bgt _08072640
mov r0, sp
ldr r1, [sp, 0x18]
adds r2, r4, 0
bl sub_808E010
ldr r0, [sp]
subs r0, 0x1
str r0, [r5, 0x18]
b _08072644
_08072640:
ldr r2, [sp, 0x1C]
str r2, [r5, 0x18]
_08072644:
ldr r3, [sp, 0x20]
cmp r3, r8
ble _08072704
mov r0, sp
ldr r1, [sp, 0x18]
adds r2, r4, 0
bl sub_808E010
mov r0, r8
strb r0, [r5, 0x9]
ldrh r0, [r5, 0x10]
mov r2, r9
ldrh r1, [r2, 0x4]
subs r0, r1
strh r0, [r5, 0x10]
ldrh r0, [r5, 0xE]
ldrh r1, [r2, 0x4]
subs r0, r1
strh r0, [r5, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bgt _08072676
mov r3, r10
strh r3, [r5, 0xE]
_08072676:
movs r1, 0x10
ldrsh r0, [r5, r1]
cmp r0, 0x1
bgt _08072682
mov r2, r10
strh r2, [r5, 0x10]
_08072682:
movs r3, 0xE
ldrsh r1, [r5, r3]
ldrh r2, [r5, 0x10]
movs r3, 0x10
ldrsh r0, [r5, r3]
cmp r1, r0
blt _08072692
strh r2, [r5, 0xE]
_08072692:
ldr r7, _08072734
ldrb r4, [r5, 0x14]
str r4, [r7]
ldrb r1, [r5, 0x15]
str r1, [r7, 0x4]
ldr r6, _08072738
ldrb r2, [r5, 0x16]
str r2, [r6]
ldrb r0, [r5, 0x17]
mov r12, r0
mov r3, r9
ldrb r0, [r3, 0x6]
subs r4, r0
str r4, [r7]
ldrb r0, [r3, 0x7]
subs r1, r0
str r1, [r7, 0x4]
ldrb r0, [r3, 0x8]
subs r2, r0
str r2, [r6]
ldrb r0, [r3, 0x9]
mov r1, r12
subs r3, r1, r0
str r3, [r6, 0x4]
cmp r4, 0x1
bgt _080726CA
mov r2, r10
str r2, [r7]
_080726CA:
ldr r0, [r7, 0x4]
cmp r0, 0x1
bgt _080726D4
mov r3, r10
str r3, [r7, 0x4]
_080726D4:
ldr r0, [r6]
cmp r0, 0x1
bgt _080726DE
mov r0, r10
str r0, [r6]
_080726DE:
ldr r0, [r6, 0x4]
cmp r0, 0x1
bgt _080726E8
mov r1, r10
str r1, [r6, 0x4]
_080726E8:
ldr r0, [sp, 0x10]
bl sub_807191C
ldr r0, [sp, 0x10]
bl sub_8079764
ldr r0, [r7]
strb r0, [r5, 0x14]
ldr r0, [r7, 0x4]
strb r0, [r5, 0x15]
ldr r0, [r6]
strb r0, [r5, 0x16]
ldr r0, [r6, 0x4]
strb r0, [r5, 0x17]
_08072704:
movs r2, 0x1
negs r2, r2
add r8, r2
ldr r3, [sp, 0x14]
cmp r8, r3
bgt _08072624
_08072710:
ldr r0, _0807273C
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
ldrb r1, [r5, 0x9]
ldr r0, [sp, 0x20]
cmp r1, r0
bne _08072744
ldr r0, _08072740
ldr r2, [r0]
ldr r0, [sp, 0xC]
ldr r1, [sp, 0x10]
bl sub_80522F4
_0807272E:
movs r0, 0
b _08072760
.align 2, 0
_08072734: .4byte gUnknown_202F31C
_08072738: .4byte gUnknown_202F324
_0807273C: .4byte gUnknown_202DF98
_08072740: .4byte gUnknown_80F9EEC
_08072744:
ldr r0, _08072770
str r1, [r0]
movs r1, 0xD3
lsls r1, 1
ldr r0, [sp, 0x10]
bl sub_80421C0
ldr r0, _08072774
ldr r2, [r0]
ldr r0, [sp, 0xC]
ldr r1, [sp, 0x10]
bl sub_80522F4
movs r0, 0x1
_08072760:
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08072770: .4byte gUnknown_202DE30
_08072774: .4byte gUnknown_80F9EC8
thumb_func_end sub_80725A4
thumb_func_start sub_8072778
sub_8072778:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xD0
mov r9, r1
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0xC4]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0xC8]
ldr r0, [r1, 0x70]
mov r8, r0
movs r1, 0
str r1, [sp, 0xCC]
ldrb r0, [r0, 0x6]
cmp r0, 0
beq _080727A8
movs r2, 0
str r2, [sp, 0xC8]
movs r4, 0
str r4, [sp, 0xC4]
_080727A8:
mov r0, r8
movs r2, 0x2
ldrsh r1, [r0, r2]
ldrb r2, [r0, 0x9]
movs r4, 0xC
ldrsh r3, [r0, r4]
mov r0, sp
bl sub_808E0AC
adds r7, r0, 0
add r4, sp, 0x20
movs r1, 0x8C
lsls r1, 1
add r1, r8
adds r0, r4, 0
bl sub_8093FC8
mov r10, r4
cmp r7, 0
beq _08072810
adds r0, r7, 0
bl sub_8084100
movs r2, 0
lsls r0, 1
mov r1, sp
adds r6, r1, r0
mov r5, sp
adds r5, 0x21
mov r3, r10
_080727E4:
lsls r0, r2, 3
add r0, sp
adds r0, 0x20
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08072806
ldrh r1, [r6]
adds r0, r3, 0
bl sub_8092A88
ldrb r1, [r5]
movs r0, 0x4
orrs r0, r1
strb r0, [r5]
b _08072810
_08072806:
adds r5, 0x8
adds r3, 0x8
adds r2, 0x1
cmp r2, 0x7
ble _080727E4
_08072810:
movs r5, 0
movs r4, 0x1
_08072814:
movs r7, 0
movs r2, 0
_08072818:
lsls r0, r2, 3
add r0, sp
adds r0, 0x20
ldrb r1, [r0]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _0807282A
adds r7, 0x1
_0807282A:
adds r2, 0x1
cmp r2, 0x7
ble _08072818
cmp r7, 0x4
bgt _080728D4
movs r3, 0
movs r5, 0
cmp r3, r7
bge _0807287C
movs r4, 0x8C
lsls r4, 1
add r4, r8
mov r6, r10
_08072844:
lsls r0, r5, 3
movs r2, 0x8C
lsls r2, 1
add r2, r8
adds r2, r0
ldr r0, [r6]
ldr r1, [r6, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
ldrb r1, [r4, 0x1]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _08072872
movs r0, 0xFB
ands r0, r1
strb r0, [r4, 0x1]
add r0, sp, 0x60
adds r1, r4, 0
movs r2, 0
bl sub_80928C0
movs r3, 0x1
_08072872:
adds r4, 0x8
adds r6, 0x8
adds r5, 0x1
cmp r5, r7
blt _08072844
_0807287C:
cmp r5, 0x3
bgt _08072894
movs r2, 0x8C
lsls r2, 1
movs r1, 0
_08072886:
lsls r0, r5, 3
add r0, r8
adds r0, r2
strb r1, [r0]
adds r5, 0x1
cmp r5, 0x3
ble _08072886
_08072894:
cmp r3, 0
beq _08072928
ldr r2, [sp, 0xC4]
cmp r2, 0
beq _08072928
ldr r0, _080728C8
mov r1, r8
movs r2, 0
bl sub_80708B4
ldr r0, _080728CC
add r1, sp, 0x60
bl strcpy
mov r0, r9
movs r1, 0x9C
lsls r1, 1
bl sub_80421C0
ldr r0, _080728D0
ldr r1, [r0]
mov r0, r9
bl sub_80528F4
b _08072928
.align 2, 0
_080728C8: .4byte gUnknown_202DF98
_080728CC: .4byte gUnknown_202DE58
_080728D0: .4byte gUnknown_80F9F04
_080728D4:
mov r1, r8
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08072918
ldr r2, [sp, 0xC8]
cmp r2, 0
beq _08072918
ldr r0, [sp, 0xCC]
cmp r0, 0
bne _08072902
ldr r1, [sp, 0xC4]
cmp r1, 0
beq _08072902
movs r0, 0xA
movs r1, 0x6
bl sub_803E708
ldr r0, _08072914
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
_08072902:
movs r2, 0x1
str r2, [sp, 0xCC]
mov r0, r9
mov r1, r10
movs r3, 0
bl sub_8063E70
b _08072920
.align 2, 0
_08072914: .4byte gUnknown_80F9FA4
_08072918:
mov r0, r9
mov r1, r10
bl sub_8072B24
_08072920:
adds r5, 0x1
cmp r5, 0x1D
bgt _08072928
b _08072814
_08072928:
add sp, 0xD0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8072778
thumb_func_start sub_8072938
sub_8072938:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xA4
mov r9, r0
lsls r1, 16
lsrs r5, r1, 16
ldr r0, [r0, 0x70]
mov r8, r0
movs r1, 0
mov r10, r1
movs r1, 0x8C
lsls r1, 1
add r1, r8
mov r0, sp
bl sub_8093FC8
movs r3, 0
mov r4, sp
mov r2, sp
_08072964:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _08072980
adds r0, r2, 0
adds r1, r5, 0
bl sub_8092A88
ldrb r1, [r4, 0x1]
movs r0, 0x4
orrs r0, r1
strb r0, [r4, 0x1]
b _0807298A
_08072980:
adds r4, 0x8
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x7
ble _08072964
_0807298A:
movs r4, 0
movs r5, 0x1
_0807298E:
movs r7, 0
mov r2, sp
movs r3, 0x7
_08072994:
ldrb r1, [r2]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _080729A0
adds r7, 0x1
_080729A0:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08072994
cmp r7, 0x4
bgt _08072A50
movs r5, 0
cmp r5, r7
bge _080729F4
movs r4, 0x8C
lsls r4, 1
add r4, r8
mov r6, sp
_080729BA:
lsls r0, r5, 3
movs r2, 0x8C
lsls r2, 1
add r2, r8
adds r2, r0
ldr r0, [r6]
ldr r1, [r6, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
ldrb r1, [r4, 0x1]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _080729EA
movs r0, 0xFB
ands r0, r1
strb r0, [r4, 0x1]
add r0, sp, 0x40
adds r1, r4, 0
movs r2, 0
bl sub_80928C0
movs r0, 0x1
mov r10, r0
_080729EA:
adds r4, 0x8
adds r6, 0x8
adds r5, 0x1
cmp r5, r7
blt _080729BA
_080729F4:
cmp r5, 0x3
bgt _08072A0C
movs r2, 0x8C
lsls r2, 1
movs r1, 0
_080729FE:
lsls r0, r5, 3
add r0, r8
adds r0, r2
strb r1, [r0]
adds r5, 0x1
cmp r5, 0x3
ble _080729FE
_08072A0C:
mov r1, r10
cmp r1, 0
beq _08072A92
mov r1, r8
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08072A8C
ldr r0, _08072A44
mov r1, r9
movs r2, 0
bl sub_8045B94
ldr r0, _08072A48
add r1, sp, 0x40
bl strcpy
mov r0, r9
movs r1, 0x9C
lsls r1, 1
bl sub_80421C0
ldr r0, _08072A4C
ldr r1, [r0]
mov r0, r9
bl sub_80528F4
b _08072A8C
.align 2, 0
_08072A44: .4byte gUnknown_202DF98
_08072A48: .4byte gUnknown_202DE58
_08072A4C: .4byte gUnknown_80F9F04
_08072A50:
movs r0, 0
mov r10, r0
mov r1, r8
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08072A84
ldr r0, _08072A80
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
mov r0, r9
mov r1, sp
movs r2, 0x1
movs r3, 0x1
bl sub_8063E70
lsls r0, 24
cmp r0, 0
bne _08072A84
movs r0, 0
b _08072AB0
.align 2, 0
_08072A80: .4byte gUnknown_80FDF40
_08072A84:
adds r4, 0x1
cmp r4, 0x1D
bgt _08072A8C
b _0807298E
_08072A8C:
mov r0, r10
cmp r0, 0
bne _08072AAE
_08072A92:
mov r1, r8
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08072AAE
ldr r0, _08072AC0
mov r1, r9
movs r2, 0
bl sub_8045B94
ldr r0, _08072AC4
ldr r1, [r0]
mov r0, r9
bl sub_80528F4
_08072AAE:
movs r0, 0x1
_08072AB0:
add sp, 0xA4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08072AC0: .4byte gUnknown_202DF98
_08072AC4: .4byte gUnknown_80F9F2C
thumb_func_end sub_8072938
thumb_func_start sub_8072AC8
sub_8072AC8:
push {r4-r7,lr}
sub sp, 0x4
adds r6, r0, 0
adds r7, r2, 0
lsls r1, 16
asrs r0, r1, 16
movs r3, 0
adds r2, r6, 0x6
_08072AD8:
strh r3, [r2]
subs r2, 0x2
cmp r2, r6
bge _08072AD8
movs r5, 0
bl sub_8092B18
adds r4, r0, 0
b _08072B04
_08072AEA:
cmp r5, 0x4
bne _08072AF6
movs r0, 0x4
bl sub_8084100
b _08072AFA
_08072AF6:
adds r0, r5, 0
adds r5, 0x1
_08072AFA:
lsls r0, 1
adds r0, r6
mov r1, sp
ldrh r1, [r1]
strh r1, [r0]
_08072B04:
ldrb r0, [r4]
cmp r0, 0
beq _08072B1C
adds r0, r4, 0
mov r1, sp
bl sub_808E07C
adds r4, r0, 0
ldrb r0, [r4]
adds r4, 0x1
cmp r0, r7
ble _08072AEA
_08072B1C:
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8072AC8
thumb_func_start sub_8072B24
sub_8072B24:
push {r4-r7,lr}
adds r5, r1, 0
movs r4, 0
movs r7, 0x1
movs r6, 0xFD
adds r2, r5, 0
movs r3, 0x7
_08072B32:
ldrb r1, [r2]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08072B44
adds r0, r6, 0
ands r0, r1
strb r0, [r2]
adds r4, 0x1
_08072B44:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08072B32
adds r0, r4, 0
bl sub_8084100
adds r3, r0, 0
adds r4, r5, 0
adds r4, 0x38
cmp r3, 0x6
bgt _08072B6C
lsls r0, r3, 3
adds r2, r0, r5
_08072B60:
ldr r0, [r2, 0x8]
ldr r1, [r2, 0xC]
stm r2!, {r0,r1}
adds r3, 0x1
cmp r3, 0x6
ble _08072B60
_08072B6C:
movs r0, 0
strb r0, [r4]
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8072B24
thumb_func_start sub_8072B78
sub_8072B78:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x20
mov r8, r0
adds r7, r1, 0
lsls r5, r2, 16
asrs r5, 16
ldr r6, [r7, 0x70]
ldr r4, _08072BFC
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_80708B4
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
bl sub_808D908
adds r0, r5, 0
bl sub_80687D0
adds r4, r0, 0
lsls r0, r5, 16
lsrs r0, 16
strh r0, [r6, 0x4]
strh r0, [r6, 0x2]
ldrb r2, [r6, 0x9]
mov r0, sp
adds r1, r5, 0
bl sub_808E010
ldr r0, [sp]
str r0, [r6, 0x18]
str r4, [r7, 0x64]
adds r0, r6, 0
movs r1, 0
bl sub_806BFC0
adds r0, r7, 0
bl sub_8069E0C
adds r0, r7, 0
movs r1, 0x7
bl sub_806CCB4
ldr r0, _08072C00
ldr r2, [r0]
mov r0, r8
adds r1, r7, 0
bl sub_80522F4
adds r0, r7, 0
bl sub_8042A44
bl sub_8083D78
movs r0, 0x9E
lsls r0, 1
cmp r5, r0
bne _08072C74
movs r5, 0
ldr r4, _08072C04
b _08072C0C
.align 2, 0
_08072BFC: .4byte gUnknown_202DF98
_08072C00: .4byte gUnknown_80FE2EC
_08072C04: .4byte gUnknown_80F4448
_08072C08:
adds r4, 0x4
adds r5, 0x1
_08072C0C:
cmp r5, 0x7
bgt _08072C36
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x4
ldrsh r1, [r7, r2]
adds r0, r1
movs r3, 0x2
ldrsh r1, [r4, r3]
movs r3, 0x6
ldrsh r2, [r7, r3]
adds r1, r2
bl sub_804954C
adds r1, r0, 0
ldr r0, _08072C80
bl sub_807034C
lsls r0, 24
cmp r0, 0
bne _08072C08
_08072C36:
ldr r0, _08072C80
mov r8, r0
bl sub_803D930
lsls r0, 24
cmp r0, 0
beq _08072C74
add r0, sp, 0xC
movs r3, 0
movs r4, 0
mov r1, r8
strh r1, [r0]
ldrb r1, [r6, 0x9]
strh r1, [r0, 0x8]
strb r3, [r0, 0x2]
ldr r1, _08072C84
lsls r2, r5, 2
adds r2, r1
ldrh r1, [r7, 0x4]
ldrh r5, [r2]
adds r1, r5
strh r1, [r0, 0xC]
ldrh r1, [r7, 0x6]
ldrh r2, [r2, 0x2]
adds r1, r2
strh r1, [r0, 0xE]
str r4, [r0, 0x4]
strb r3, [r0, 0x10]
movs r1, 0x1
bl sub_806B7F8
_08072C74:
add sp, 0x20
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08072C80: .4byte 0x0000013d
_08072C84: .4byte gUnknown_80F4448
thumb_func_end sub_8072B78
thumb_func_start sub_8072C88
sub_8072C88:
push {lr}
ldr r1, [r0, 0x70]
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08072CA2
adds r0, r1, 0
adds r0, 0x94
ldrb r0, [r0]
bl sub_808EAFC
lsls r0, 24
lsrs r0, 24
b _08072CA4
_08072CA2:
movs r0, 0
_08072CA4:
pop {r1}
bx r1
thumb_func_end sub_8072C88
thumb_func_start sub_8072CA8
sub_8072CA8:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _08072CEC
bl sub_8083600
adds r4, r0, 0
cmp r4, 0
beq _08072CEC
ldr r0, [r4, 0x70]
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
beq _08072CEC
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _08072CEC
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045A00
lsls r0, 24
cmp r0, 0
beq _08072CEC
adds r0, r4, 0
b _08072CEE
_08072CEC:
movs r0, 0
_08072CEE:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8072CA8
thumb_func_start sub_8072CF4
sub_8072CF4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r4, r0, 0
movs r0, 0x1
bl sub_804178C
ldr r1, _08072D4C
movs r0, 0x1
strb r0, [r1]
ldr r6, [r4, 0x70]
adds r0, r6, 0
adds r0, 0xFC
movs r1, 0
strb r1, [r0]
subs r0, 0x9
strb r1, [r0]
ldr r0, _08072D50
ldr r0, [r0]
adds r0, 0xB8
str r4, [r0]
ldr r2, _08072D54
adds r0, r6, 0
adds r0, 0x44
ldrh r0, [r0]
lsls r1, r0, 1
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _08072D64
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _08072D58
adds r0, r2, 0x1
adds r0, r1, r0
ldrb r1, [r0]
adds r0, r4, 0
bl sub_805EFB4
b _08072D64
.align 2, 0
_08072D4C: .4byte gUnknown_203B434
_08072D50: .4byte gUnknown_203B418
_08072D54: .4byte gUnknown_80F58F4
_08072D58:
adds r0, r2, 0x1
adds r0, r1, r0
ldrb r1, [r0]
adds r0, r4, 0
bl sub_8075BA4
_08072D64:
adds r0, r4, 0
movs r1, 0
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _08072D86
adds r0, r4, 0
movs r1, 0x1
bl sub_80570F4
lsls r0, 24
cmp r0, 0
beq _08072D86
adds r0, r4, 0
bl sub_8079764
_08072D86:
movs r7, 0x1
movs r5, 0xFB
movs r0, 0x8C
lsls r0, 1
adds r2, r6, r0
movs r3, 0x3
_08072D92:
ldrb r1, [r2]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _08072DA4
ldrb r1, [r2, 0x1]
adds r0, r5, 0
ands r0, r1
strb r0, [r2, 0x1]
_08072DA4:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08072D92
adds r0, r4, 0
movs r1, 0
bl sub_8045028
lsls r0, 24
cmp r0, 0
bne _08072E08
adds r0, r4, 0
bl sub_807520C
lsls r0, 24
cmp r0, 0
beq _08072DF0
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08072DD2
b _080732D4
_08072DD2:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08072DE0
b _080732D4
_08072DE0:
ldr r0, _08072DEC
ldrb r0, [r0]
cmp r0, 0
beq _08072DF0
movs r0, 0x1
b _080732D6
.align 2, 0
_08072DEC: .4byte gUnknown_202F32D
_08072DF0:
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _08072DFC
movs r0, 0xA
bl sub_8052740
_08072DFC:
adds r0, r4, 0
bl sub_806A1E8
movs r0, 0xA
bl sub_803E46C
_08072E08:
adds r0, r6, 0
adds r0, 0x44
ldrh r1, [r0]
adds r5, r0, 0
cmp r1, 0x1
bls _08072E26
cmp r1, 0x4
beq _08072E26
cmp r1, 0x2
beq _08072E26
movs r2, 0xA4
lsls r2, 1
adds r1, r6, r2
movs r0, 0x1
strb r0, [r1]
_08072E26:
movs r3, 0
mov r10, r3
movs r7, 0xA5
lsls r7, 1
adds r0, r6, r7
mov r1, r10
strb r1, [r0]
ldr r0, _08072E50
strb r1, [r0]
ldr r0, _08072E54
strb r1, [r0]
ldrh r0, [r5]
subs r0, 0x2
cmp r0, 0x3F
bls _08072E46
b _080731B4
_08072E46:
lsls r0, 2
ldr r1, _08072E58
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08072E50: .4byte gUnknown_202F221
_08072E54: .4byte gUnknown_202F222
_08072E58: .4byte _08072E5C
.align 2, 0
_08072E5C:
.4byte _08072F5C
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _08073104
.4byte _080730A4
.4byte _0807310C
.4byte _0807311C
.4byte _080731B4
.4byte _08073094
.4byte _08073094
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _08073094
.4byte _0807314C
.4byte _08073154
.4byte _0807303E
.4byte _080731B4
.4byte _0807315C
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _08073186
.4byte _0807318E
.4byte _08073170
.4byte _08073046
.4byte _0807311C
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _0807309C
.4byte _08073162
.4byte _080731B4
.4byte _080731B4
.4byte _080731B4
.4byte _080730AC
.4byte _080730B4
.4byte _080730C4
.4byte _08073196
.4byte _08073114
.4byte _080730E0
.4byte _080730CC
.4byte _080730D6
.4byte _080730BC
.4byte _0807317E
.4byte _080731B4
.4byte _0807311C
_08072F5C:
adds r0, r6, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x2
beq _08072F76
cmp r0, 0x7
beq _08072F76
cmp r0, 0x5
beq _08072F76
cmp r0, 0x3
beq _08072F76
cmp r0, 0x4
bne _08072F84
_08072F76:
movs r0, 0
strh r0, [r5]
ldr r2, _08072F80
adds r1, r6, r2
b _08072FDA
.align 2, 0
_08072F80: .4byte 0x00000147
_08072F84:
movs r3, 0
mov r9, r3
ldr r1, _08072FE0
adds r2, r6, 0
adds r2, 0x46
ldrb r3, [r2]
lsls r0, r3, 2
adds r0, r1
ldrh r1, [r0]
ldrh r7, [r4, 0x4]
adds r1, r7
lsls r1, 16
ldrh r0, [r0, 0x2]
ldrh r7, [r4, 0x6]
adds r0, r7
lsls r0, 16
lsrs r1, 16
mov r8, r1
orrs r1, r0
mov r8, r1
ldrh r1, [r6]
movs r0, 0x80
lsls r0, 8
ands r0, r1
adds r7, r2, 0
cmp r0, 0
bne _08072FCC
adds r0, r4, 0
adds r1, r3, 0
bl sub_8070D6C
lsls r0, 24
cmp r0, 0
bne _08072FCC
movs r2, 0x1
mov r9, r2
_08072FCC:
mov r3, r9
cmp r3, 0
beq _08072FE8
movs r0, 0
strh r0, [r5]
ldr r7, _08072FE4
adds r1, r6, r7
_08072FDA:
movs r0, 0x1
strb r0, [r1]
b _080731B8
.align 2, 0
_08072FE0: .4byte gUnknown_80F4448
_08072FE4: .4byte 0x00000147
_08072FE8:
ldrh r1, [r4, 0x6]
lsls r1, 16
ldrh r0, [r4, 0x4]
orrs r0, r1
str r0, [sp]
mov r0, r8
lsls r1, r0, 16
asrs r1, 16
asrs r2, r0, 16
adds r0, r4, 0
movs r3, 0
bl sub_80694C0
ldrb r1, [r7]
adds r0, r4, 0
mov r2, sp
bl sub_8074FB0
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08073038
adds r0, r6, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08073038
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08073038
adds r0, r4, 0x4
bl sub_804AE08
_08073038:
movs r1, 0x1
mov r10, r1
b _080731B8
_0807303E:
adds r0, r4, 0
bl sub_807CABC
b _080731B8
_08073046:
ldr r0, _08073064
ldr r1, [r0]
ldr r2, _08073068
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0x15
bne _08073074
ldr r3, _0807306C
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
bne _08073074
ldr r0, _08073070
b _080731A2
.align 2, 0
_08073064: .4byte gUnknown_203B418
_08073068: .4byte 0x00000644
_0807306C: .4byte 0x000037fe
_08073070: .4byte gUnknown_80FA5B4
_08073074:
bl sub_804267C
ldr r0, _0807308C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
ldr r1, _08073090
adds r0, r6, 0
adds r0, 0x46
ldrb r0, [r0]
strb r0, [r1]
b _080731B8
.align 2, 0
_0807308C: .4byte gUnknown_203B418
_08073090: .4byte gUnknown_202F32C
_08073094:
adds r0, r4, 0
bl sub_8067110
b _080731B8
_0807309C:
adds r0, r4, 0
bl sub_807CB3C
b _080731B8
_080730A4:
adds r0, r4, 0
bl sub_8066744
b _080731B8
_080730AC:
adds r0, r4, 0
bl sub_80668D0
b _080731B8
_080730B4:
adds r0, r4, 0
bl sub_8066AC0
b _080731B8
_080730BC:
adds r0, r4, 0
bl sub_8066BD4
b _080731B8
_080730C4:
adds r0, r4, 0
bl sub_8066CF0
b _080731B8
_080730CC:
adds r0, r4, 0
movs r1, 0x1
bl sub_806675C
b _080731B8
_080730D6:
adds r0, r4, 0
movs r1, 0x1
bl sub_806684C
b _080731B8
_080730E0:
ldr r0, _080730FC
ldr r1, [r0]
adds r2, r1, 0
adds r2, 0xBC
adds r0, r6, 0
adds r0, 0x48
ldrb r0, [r0]
lsls r0, 2
ldr r7, _08073100
adds r1, r7
adds r1, r0
ldr r0, [r1]
str r0, [r2]
b _080731B8
.align 2, 0
_080730FC: .4byte gUnknown_203B418
_08073100: .4byte 0x0001357c
_08073104:
adds r0, r4, 0
bl sub_8066D04
b _080731B8
_0807310C:
adds r0, r4, 0
bl sub_8066E14
b _080731B8
_08073114:
adds r0, r4, 0
bl sub_8066FA4
b _080731B8
_0807311C:
adds r0, r6, 0
bl sub_8071A70
lsls r0, 24
cmp r0, 0
beq _08073136
adds r0, r4, 0
bl nullsub_95
adds r0, r4, 0
bl sub_80671A0
b _080731B8
_08073136:
ldr r0, _08073144
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08073148
b _080731A2
.align 2, 0
_08073144: .4byte gUnknown_202DF98
_08073148: .4byte gUnknown_80FE6D4
_0807314C:
adds r0, r4, 0
bl sub_8067510
b _080731B8
_08073154:
adds r0, r4, 0
bl sub_8067884
b _080731B8
_0807315C:
movs r1, 0xB0
lsls r1, 1
b _08073164
_08073162:
ldr r1, _0807316C
_08073164:
adds r0, r4, 0
bl sub_8067904
b _080731B8
.align 2, 0
_0807316C: .4byte 0x00000163
_08073170:
adds r1, r4, 0x4
adds r0, r4, 0
movs r2, 0
movs r3, 0
bl sub_807FE9C
b _080731B8
_0807317E:
adds r0, r4, 0
bl sub_8073D08
b _080731B8
_08073186:
adds r0, r4, 0
bl sub_8073CF0
b _080731B8
_0807318E:
adds r0, r4, 0
bl sub_8073CFC
b _080731B8
_08073196:
ldr r0, _080731AC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _080731B0
_080731A2:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _080731B8
.align 2, 0
_080731AC: .4byte gUnknown_202DF98
_080731B0: .4byte gUnknown_80FE478
_080731B4:
movs r0, 0x1
strh r0, [r5]
_080731B8:
adds r0, r4, 0
bl sub_807FD84
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080731CC
b _080732D4
_080731CC:
ldr r0, [r4, 0x70]
movs r2, 0xA5
lsls r2, 1
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
bne _080731E2
strb r0, [r1]
adds r0, r4, 0
bl sub_8079764
_080731E2:
movs r0, 0
bl sub_8041888
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080732D4
bl sub_8085140
ldr r3, _080732E8
adds r1, r6, r3
ldrb r0, [r1]
cmp r0, 0
beq _08073242
movs r5, 0
strb r5, [r1]
movs r7, 0x8C
lsls r7, 1
adds r2, r6, r7
movs r0, 0x1
mov r12, r0
movs r7, 0x10
movs r3, 0x3
_08073214:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _0807322C
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _0807322C
movs r0, 0
strb r0, [r2, 0x4]
movs r5, 0x1
_0807322C:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _08073214
cmp r5, 0
beq _08073242
ldr r0, _080732EC
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_08073242:
bl sub_807360C
bl sub_8044B84
lsls r0, 24
cmp r0, 0
bne _08073264
bl sub_807348C
bl sub_80732F0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080732D4
_08073264:
mov r1, r10
cmp r1, 0
beq _08073270
adds r0, r4, 0
bl sub_8075818
_08073270:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080732D4
bl sub_8044B84
lsls r0, 24
cmp r0, 0
bne _0807328A
bl sub_8046D20
_0807328A:
movs r0, 0
bl sub_8041888
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080732D4
movs r2, 0xA2
lsls r2, 1
adds r0, r6, r2
ldrb r0, [r0]
cmp r0, 0
bne _080732D4
mov r3, r10
cmp r3, 0
bne _080732D4
adds r1, r4, 0x4
adds r0, r4, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _080732C8
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_080732C8:
adds r0, r4, 0
bl sub_8074094
adds r0, r4, 0
bl sub_8071DA4
_080732D4:
movs r0, 0
_080732D6:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080732E8: .4byte 0x0000014b
_080732EC: .4byte gUnknown_80FD2CC
thumb_func_end sub_8072CF4
thumb_func_start sub_80732F0
sub_80732F0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
movs r4, 0
_080732FE:
movs r5, 0
ldr r0, _0807335C
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _08073360
adds r0, r2
adds r0, r1
ldr r0, [r0]
mov r8, r0
bl sub_80450E0
lsls r0, 24
adds r4, 0x1
str r4, [sp, 0x10]
cmp r0, 0
bne _08073320
b _08073472
_08073320:
mov r0, r8
ldr r7, [r0, 0x70]
movs r1, 0xB2
lsls r1, 1
adds r4, r7, r1
ldrb r0, [r4]
cmp r0, 0xFF
bne _08073332
b _08073472
_08073332:
adds r2, r0, 0
mov r9, r2
mov r0, r8
movs r1, 0x1
bl sub_8070D04
lsls r0, 24
cmp r0, 0
bne _0807336E
mov r0, r8
bl sub_8070B28
lsls r0, 24
cmp r0, 0
bne _08073364
ldrb r0, [r4]
movs r2, 0xFF
orrs r0, r2
strb r0, [r4]
b _08073472
.align 2, 0
_0807335C: .4byte gUnknown_203B418
_08073360: .4byte 0x000135cc
_08073364:
adds r0, r7, 0
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0x1
bne _08073378
_0807336E:
ldrb r0, [r4]
movs r1, 0xFF
orrs r0, r1
strb r0, [r4]
b _08073472
_08073378:
movs r0, 0x4
bl sub_8084100
adds r3, r0, 0
movs r4, 0
_08073382:
lsls r0, r3, 3
movs r2, 0x8C
lsls r2, 1
adds r0, r2
adds r2, r7, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08073448
ldr r0, [r2]
ldr r1, [r2, 0x4]
str r0, [sp, 0x8]
str r1, [sp, 0xC]
ldr r1, [sp, 0x8]
lsrs r0, r1, 16
cmp r0, 0x8A
beq _08073448
adds r1, r0, 0
ldr r0, _08073434
cmp r1, r0
beq _08073448
movs r6, 0
movs r0, 0x46
adds r0, r7
mov r10, r0
movs r1, 0x8C
lsls r1, 1
adds r4, r7, r1
_080733BC:
lsls r0, r6, 3
movs r2, 0x8C
lsls r2, 1
adds r0, r2
adds r5, r7, r0
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080733F4
ldrb r0, [r7, 0x7]
cmp r0, 0
bne _080733DE
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _080733F4
_080733DE:
ldrh r0, [r4, 0x2]
cmp r0, 0xE3
bne _080733F4
mov r0, r8
adds r1, r5, 0
movs r2, 0x1
bl sub_80573CC
lsls r0, 24
cmp r0, 0
bne _08073440
_080733F4:
adds r4, 0x8
adds r6, 0x1
cmp r6, 0x3
ble _080733BC
_080733FC:
ldr r0, _08073438
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _0807343C
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
movs r0, 0x7
mov r1, r9
ands r1, r0
movs r0, 0
mov r2, r10
strb r1, [r2]
str r0, [sp]
add r0, sp, 0x8
str r0, [sp, 0x4]
mov r0, r8
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8055FA0
movs r5, 0x1
b _08073456
.align 2, 0
_08073434: .4byte 0x00000147
_08073438: .4byte gUnknown_202DF98
_0807343C: .4byte gUnknown_80FCF38
_08073440:
adds r0, r5, 0x4
bl sub_80838EC
b _080733FC
_08073448:
adds r3, 0x1
cmp r3, 0x4
bne _08073450
movs r3, 0
_08073450:
adds r4, 0x1
cmp r4, 0x3
ble _08073382
_08073456:
movs r2, 0xB2
lsls r2, 1
adds r1, r7, r2
ldrb r0, [r1]
movs r2, 0xFF
orrs r0, r2
strb r0, [r1]
cmp r5, 0
beq _08073472
mov r0, r8
movs r1, 0xB8
lsls r1, 2
bl sub_80421C0
_08073472:
ldr r4, [sp, 0x10]
cmp r4, 0x13
bgt _0807347A
b _080732FE
_0807347A:
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80732F0
thumb_func_start sub_807348C
sub_807348C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
movs r4, 0
movs r0, 0xFF
mov r9, r0
_0807349E:
ldr r0, _080734E8
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _080734EC
adds r0, r2
adds r0, r1
ldr r7, [r0]
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
adds r4, 0x1
str r4, [sp, 0x10]
cmp r0, 0
bne _080734BE
b _080735E6
_080734BE:
ldr r6, [r7, 0x70]
ldr r0, _080734F0
adds r4, r6, r0
ldrb r0, [r4]
cmp r0, 0xFF
bne _080734CC
b _080735E6
_080734CC:
adds r1, r0, 0
mov r8, r1
adds r0, r7, 0
movs r1, 0x1
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _080734F4
ldrb r0, [r4]
mov r2, r9
orrs r0, r2
strb r0, [r4]
b _080735DA
.align 2, 0
_080734E8: .4byte gUnknown_203B418
_080734EC: .4byte 0x000135cc
_080734F0: .4byte 0x00000165
_080734F4:
adds r0, r7, 0
bl sub_8070B28
lsls r0, 24
cmp r0, 0
bne _08073514
ldrb r0, [r4]
mov r1, r9
orrs r0, r1
strb r0, [r4]
movs r2, 0xB2
lsls r2, 1
adds r1, r6, r2
ldrb r0, [r1]
mov r2, r9
b _080735E2
_08073514:
adds r0, r6, 0
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0x1
bne _0807354A
ldrb r0, [r4]
mov r1, r9
orrs r0, r1
strb r0, [r4]
movs r2, 0xB2
lsls r2, 1
adds r1, r6, r2
ldrb r0, [r1]
mov r2, r9
b _080735E2
_08073532:
ldr r0, [r5]
ldr r1, [r5, 0x4]
str r0, [sp, 0x8]
str r1, [sp, 0xC]
adds r0, r5, 0x4
bl sub_80838EC
adds r0, r7, 0
adds r1, r5, 0
bl sub_806ACE8
b _0807359C
_0807354A:
movs r3, 0
movs r0, 0x46
adds r0, r6
mov r10, r0
movs r1, 0x8C
lsls r1, 1
adds r4, r6, r1
_08073558:
lsls r0, r3, 3
movs r2, 0x8C
lsls r2, 1
adds r0, r2
adds r5, r6, r0
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08073594
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0807357A
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _08073594
_0807357A:
ldrh r0, [r4, 0x2]
cmp r0, 0x19
bne _08073594
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x1
str r3, [sp, 0x14]
bl sub_80573CC
lsls r0, 24
ldr r3, [sp, 0x14]
cmp r0, 0
bne _08073532
_08073594:
adds r4, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _08073558
_0807359C:
ldr r0, _08073600
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08073604
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
movs r0, 0x7
mov r1, r8
ands r1, r0
movs r0, 0
mov r2, r10
strb r1, [r2]
str r0, [sp]
add r0, sp, 0x8
str r0, [sp, 0x4]
adds r0, r7, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8055FA0
ldr r2, _08073608
adds r1, r6, r2
ldrb r0, [r1]
mov r2, r9
orrs r0, r2
strb r0, [r1]
_080735DA:
movs r0, 0xB2
lsls r0, 1
adds r1, r6, r0
ldrb r0, [r1]
_080735E2:
orrs r0, r2
strb r0, [r1]
_080735E6:
ldr r4, [sp, 0x10]
cmp r4, 0x13
bgt _080735EE
b _0807349E
_080735EE:
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08073600: .4byte gUnknown_202DF98
_08073604: .4byte gUnknown_80FCF50
_08073608: .4byte 0x00000165
thumb_func_end sub_807348C
thumb_func_start sub_807360C
sub_807360C:
push {r4,r5,lr}
movs r5, 0
_08073610:
ldr r0, _08073650
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08073654
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08073644
ldr r0, [r4, 0x70]
movs r2, 0xA9
lsls r2, 1
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
beq _08073644
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
adds r1, r4, 0
bl sub_8077274
_08073644:
adds r5, 0x1
cmp r5, 0x13
ble _08073610
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08073650: .4byte gUnknown_203B418
_08073654: .4byte 0x000135cc
thumb_func_end sub_807360C
thumb_func_start sub_8073658
sub_8073658:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x58
mov r8, r0
ldr r6, [r0, 0x70]
bl sub_8070C60
lsls r0, 24
cmp r0, 0
beq _080736B8
adds r1, r6, 0
adds r1, 0xFC
movs r0, 0
strb r0, [r1]
b _080739C4
_0807367C:
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x24
bl sub_8044C94
adds r0, r6, 0
adds r0, 0x48
add r1, sp, 0x54
ldrb r1, [r1]
strb r1, [r0]
mov r2, r8
ldrh r1, [r2, 0x4]
adds r0, 0x4
strh r1, [r0]
ldrh r0, [r2, 0x6]
adds r1, r6, 0
adds r1, 0x4E
strh r0, [r1]
ldr r0, _080736B4
adds r0, r7, r0
ldr r0, [r0]
movs r1, 0x7
ands r0, r1
adds r1, r6, 0
adds r1, 0x46
strb r0, [r1]
b _08073718
.align 2, 0
_080736B4: .4byte gUnknown_202F330
_080736B8:
adds r0, r6, 0
adds r0, 0xFC
ldrb r0, [r0]
cmp r0, 0
bne _080736C4
b _080737DC
_080736C4:
adds r7, r6, 0
adds r7, 0x60
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080736D4
b _080739C4
_080736D4:
movs r3, 0x81
str r3, [sp, 0x54]
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _0807372C
mov r0, r8
movs r1, 0x2
adds r2, r7, 0
movs r3, 0x1
bl sub_80739DC
movs r5, 0
ldr r0, _08073724
ldr r0, [r0]
cmp r5, r0
bge _08073718
ldr r4, _08073728
_080736FE:
lsls r7, r5, 2
ldr r0, [r4]
bl sub_8084144
lsls r0, 24
cmp r0, 0
bne _0807367C
adds r4, 0x4
adds r5, 0x1
ldr r0, _08073724
ldr r0, [r0]
cmp r5, r0
blt _080736FE
_08073718:
ldr r0, _08073724
ldr r0, [r0]
cmp r5, r0
beq _08073722
b _080739C4
_08073722:
b _08073792
.align 2, 0
_08073724: .4byte gUnknown_203B440
_08073728: .4byte gUnknown_202F358
_0807372C:
cmp r0, 0x1
bne _0807377C
mov r0, r8
adds r1, r7, 0
mov r2, sp
movs r3, 0x1
bl sub_8073AA0
ldr r0, _08073778
ldr r0, [r0]
cmp r0, 0
beq _08073792
bl sub_8084100
adds r4, r0, 0
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x24
bl sub_8044C94
adds r0, r6, 0
adds r0, 0x48
add r1, sp, 0x54
ldrb r1, [r1]
strb r1, [r0]
mov r2, r8
ldrh r1, [r2, 0x4]
adds r0, 0x4
strh r1, [r0]
ldrh r0, [r2, 0x6]
adds r1, r6, 0
adds r1, 0x4E
strh r0, [r1]
mov r0, r8
adds r0, 0x4
lsls r4, 2
add r4, sp
b _0807395E
.align 2, 0
_08073778: .4byte gUnknown_203B440
_0807377C:
subs r0, 0x2
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08073792
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x23
bl sub_8044C94
b _080738CE
_08073792:
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x39
bl sub_8044C94
b _080739C4
_0807379E:
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x24
bl sub_8044C94
adds r0, r6, 0
adds r0, 0x48
add r3, sp, 0x54
ldrb r3, [r3]
strb r3, [r0]
mov r0, r8
ldrh r1, [r0, 0x4]
adds r0, r6, 0
adds r0, 0x4C
strh r1, [r0]
mov r1, r8
ldrh r0, [r1, 0x6]
adds r1, r6, 0
adds r1, 0x4E
strh r0, [r1]
ldr r0, _080737D8
add r0, r10
ldr r0, [r0]
movs r1, 0x7
ands r0, r1
adds r1, r6, 0
adds r1, 0x46
strb r0, [r1]
b _080739C4
.align 2, 0
_080737D8: .4byte gUnknown_202F330
_080737DC:
mov r0, r8
movs r1, 0x16
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _080737EC
b _080739C4
_080737EC:
movs r2, 0x1
str r2, [sp, 0x50]
_080737F0:
ldr r3, [sp, 0x50]
cmp r3, 0x1
bne _080737FE
adds r7, r6, 0
adds r7, 0x60
movs r0, 0x81
b _0807384E
_080737FE:
ldr r1, [sp, 0x50]
cmp r1, 0
bne _08073832
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
movs r3, 0x6
ldrsh r1, [r2, r3]
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x14]
cmp r0, 0
bne _0807381C
b _080739B8
_0807381C:
bl sub_80450F8
cmp r0, 0x3
beq _08073826
b _080739B8
_08073826:
ldr r0, [r4, 0x14]
bl sub_8045108
adds r7, r0, 0
movs r0, 0x80
b _0807384E
_08073832:
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _0807383A
b _080739C4
_0807383A:
ldr r1, _080738C0
ldr r2, [sp, 0x50]
lsls r0, r2, 2
subs r0, 0x8
ldr r1, [r1]
adds r7, r1, r0
adds r0, r2, 0
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
_0807384E:
str r0, [sp, 0x54]
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0807385C
b _080739B8
_0807385C:
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08073866
b _080739B8
_08073866:
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08073870
b _080739B8
_08073870:
ldrb r0, [r7, 0x2]
movs r1, 0
bl sub_8090DAC
lsls r0, 24
cmp r0, 0
beq _080738EC
mov r0, r8
adds r1, r7, 0
movs r2, 0x2
bl sub_8048F28
adds r5, r0, 0
cmp r5, 0
beq _080738EC
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
adds r4, r0, 0
cmp r4, 0x9
bne _080738A4
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _080738EC
_080738A4:
adds r0, r5, 0
bl sub_8084144
lsls r0, 24
cmp r0, 0
beq _080738EC
cmp r4, 0x9
bne _080738C4
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x31
bl sub_8044C94
b _080738CE
.align 2, 0
_080738C0: .4byte gUnknown_203B460
_080738C4:
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x23
bl sub_8044C94
_080738CE:
adds r0, r6, 0
adds r0, 0x48
add r3, sp, 0x54
ldrb r3, [r3]
strb r3, [r0]
mov r0, r8
ldrh r1, [r0, 0x4]
adds r0, r6, 0
adds r0, 0x4C
strh r1, [r0]
mov r2, r8
ldrh r1, [r2, 0x6]
adds r0, 0x2
strh r1, [r0]
b _080739C4
_080738EC:
adds r0, r6, 0
bl sub_8071A70
lsls r0, 24
cmp r0, 0
beq _080739B8
movs r3, 0x1
mov r9, r3
_080738FC:
ldrb r0, [r7, 0x2]
mov r1, r9
bl sub_8090DAC
lsls r0, 24
cmp r0, 0
beq _080739AE
ldrb r0, [r7, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08073978
mov r0, r8
adds r1, r7, 0
mov r2, sp
movs r3, 0
bl sub_8073AA0
ldr r1, _08073974
ldr r0, [r1]
cmp r0, 0
beq _080739AE
bl sub_8084100
adds r4, r0, 0
adds r0, r6, 0
adds r0, 0x44
movs r1, 0x24
bl sub_8044C94
adds r0, r6, 0
adds r0, 0x48
add r2, sp, 0x54
ldrb r2, [r2]
strb r2, [r0]
mov r3, r8
ldrh r1, [r3, 0x4]
adds r0, 0x4
strh r1, [r0]
ldrh r0, [r3, 0x6]
adds r1, r6, 0
adds r1, 0x4E
strh r0, [r1]
lsls r4, 2
add r4, sp
mov r0, r8
adds r0, 0x4
_0807395E:
adds r1, r4, 0
bl sub_80983D8
movs r1, 0x7
ands r0, r1
adds r1, r6, 0
adds r1, 0x46
strb r0, [r1]
ldr r0, [r4]
str r0, [r6, 0x58]
b _080739C4
.align 2, 0
_08073974: .4byte gUnknown_203B440
_08073978:
mov r0, r8
mov r1, r9
adds r2, r7, 0
movs r3, 0
bl sub_80739DC
movs r5, 0
ldr r1, _080739D4
ldr r0, [r1]
cmp r5, r0
bge _080739AE
ldr r4, _080739D8
_08073990:
lsls r2, r5, 2
mov r10, r2
ldr r0, [r4]
bl sub_8084144
lsls r0, 24
cmp r0, 0
beq _080739A2
b _0807379E
_080739A2:
adds r4, 0x4
adds r5, 0x1
ldr r3, _080739D4
ldr r0, [r3]
cmp r5, r0
blt _08073990
_080739AE:
movs r0, 0x1
add r9, r0
mov r1, r9
cmp r1, 0x2
ble _080738FC
_080739B8:
ldr r2, [sp, 0x50]
adds r2, 0x1
str r2, [sp, 0x50]
cmp r2, 0x15
bgt _080739C4
b _080737F0
_080739C4:
add sp, 0x58
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080739D4: .4byte gUnknown_203B440
_080739D8: .4byte gUnknown_202F358
thumb_func_end sub_8073658
thumb_func_start sub_80739DC
sub_80739DC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r5, r0, 0
mov r10, r1
mov r9, r2
lsls r3, 24
lsrs r3, 24
mov r8, r3
ldr r1, _08073A44
movs r0, 0
str r0, [r1]
ldr r1, _08073A48
movs r2, 0
adds r0, r1, 0x7
_08073A00:
strb r2, [r0]
subs r0, 0x1
cmp r0, r1
bge _08073A00
movs r7, 0
_08073A0A:
ldr r0, _08073A4C
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _08073A50
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08073A88
cmp r5, r4
beq _08073A88
mov r0, r10
cmp r0, 0x1
bne _08073A54
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _08073A88
movs r6, 0x3
b _08073A6A
.align 2, 0
_08073A44: .4byte gUnknown_203B440
_08073A48: .4byte gUnknown_202F350
_08073A4C: .4byte gUnknown_203B418
_08073A50: .4byte 0x000135cc
_08073A54:
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08073A88
movs r6, 0x1
_08073A6A:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _08073A88
mov r2, r8
str r2, [sp]
adds r0, r5, 0
adds r1, r4, 0
mov r2, r9
adds r3, r6, 0
bl sub_8073B78
_08073A88:
adds r7, 0x1
cmp r7, 0x13
ble _08073A0A
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80739DC
thumb_func_start sub_8073AA0
sub_8073AA0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r5, r0, 0
mov r10, r1
mov r9, r2
lsls r3, 24
lsrs r3, 24
mov r8, r3
ldr r1, _08073B6C
movs r0, 0
str r0, [r1]
movs r6, 0
adds r7, r1, 0
_08073AC0:
ldr r0, _08073B70
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08073B74
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08073B56
cmp r5, r4
beq _08073B56
adds r0, r5, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _08073B56
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08073B56
movs r3, 0x4
ldrsh r1, [r4, r3]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r2, r1, r0
cmp r2, 0
bge _08073B10
negs r2, r2
_08073B10:
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r3, 0x6
ldrsh r0, [r5, r3]
subs r1, r0
cmp r1, 0
bge _08073B20
negs r1, r1
_08073B20:
cmp r1, r2
bge _08073B26
adds r1, r2, 0
_08073B26:
cmp r1, 0xA
bgt _08073B56
mov r0, r8
cmp r0, 0
bne _08073B44
adds r0, r4, 0
mov r1, r10
movs r2, 0x1
bl sub_8048F28
bl sub_8084144
lsls r0, 24
cmp r0, 0
beq _08073B56
_08073B44:
ldr r2, [r7]
lsls r1, r2, 2
add r1, r9
ldrh r0, [r4, 0x4]
strh r0, [r1]
ldrh r0, [r4, 0x6]
strh r0, [r1, 0x2]
adds r2, 0x1
str r2, [r7]
_08073B56:
adds r6, 0x1
cmp r6, 0x13
ble _08073AC0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08073B6C: .4byte gUnknown_203B440
_08073B70: .4byte gUnknown_203B418
_08073B74: .4byte 0x000135cc
thumb_func_end sub_8073AA0
thumb_func_start sub_8073B78
sub_8073B78:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r4, r0, 0
adds r5, r1, 0
mov r9, r2
mov r10, r3
ldr r0, [sp, 0x20]
lsls r0, 24
lsrs r0, 24
mov r8, r0
movs r0, 0x4
ldrsh r1, [r4, r0]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r2, r1, r0
cmp r2, 0
bge _08073BA2
negs r2, r2
_08073BA2:
movs r3, 0x6
ldrsh r1, [r4, r3]
movs r6, 0x6
ldrsh r0, [r5, r6]
subs r1, r0
cmp r1, 0
bge _08073BB2
negs r1, r1
_08073BB2:
ldr r0, [r4, 0x70]
adds r0, 0xE0
ldrb r0, [r0]
cmp r0, 0
bne _08073BCA
adds r0, r1, 0
cmp r1, r2
bge _08073BC4
adds r0, r2, 0
_08073BC4:
cmp r0, 0xA
ble _08073BCA
b _08073CDC
_08073BCA:
movs r6, 0x1
negs r6, r6
cmp r2, r1
bne _08073C14
movs r7, 0x4
ldrsh r1, [r4, r7]
movs r2, 0x4
ldrsh r0, [r5, r2]
ldrh r2, [r4, 0x4]
ldrh r3, [r5, 0x4]
cmp r1, r0
bge _08073BFA
movs r6, 0x6
ldrsh r1, [r4, r6]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
bge _08073BF2
movs r6, 0x1
b _08073C7E
_08073BF2:
cmp r1, r0
ble _08073BFA
movs r6, 0x3
b _08073C7E
_08073BFA:
lsls r1, r2, 16
lsls r0, r3, 16
movs r6, 0x7
cmp r1, r0
ble _08073C7A
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
cmp r1, r0
ble _08073C7A
movs r6, 0x5
b _08073C7E
_08073C14:
movs r3, 0x4
ldrsh r1, [r4, r3]
movs r7, 0x4
ldrsh r0, [r5, r7]
ldrh r2, [r4, 0x4]
ldrh r3, [r5, 0x4]
cmp r1, r0
bne _08073C34
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
bge _08073C34
movs r6, 0
b _08073C7E
_08073C34:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
bge _08073C4C
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
bne _08073C4C
movs r6, 0x2
b _08073C7E
_08073C4C:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
bne _08073C64
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
ble _08073C64
movs r6, 0x4
b _08073C7E
_08073C64:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
ble _08073C7A
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
cmp r1, r0
bne _08073C7A
movs r6, 0x6
_08073C7A:
cmp r6, 0
blt _08073CDC
_08073C7E:
ldr r0, _08073CC0
adds r7, r6, r0
ldrb r0, [r7]
cmp r0, 0
bne _08073CDC
adds r0, r4, 0
adds r1, r5, 0
adds r2, r6, 0
movs r3, 0xA
bl sub_807C9F8
lsls r0, 24
cmp r0, 0
beq _08073CDC
movs r0, 0x1
strb r0, [r7]
ldr r1, _08073CC4
ldr r0, _08073CC8
ldr r0, [r0]
lsls r0, 2
adds r1, r0, r1
str r6, [r1]
ldr r1, _08073CCC
adds r4, r0, r1
mov r3, r8
cmp r3, 0
bne _08073CD0
adds r0, r5, 0
mov r1, r9
mov r2, r10
bl sub_8048F28
b _08073CD2
.align 2, 0
_08073CC0: .4byte gUnknown_202F350
_08073CC4: .4byte gUnknown_202F330
_08073CC8: .4byte gUnknown_203B440
_08073CCC: .4byte gUnknown_202F358
_08073CD0:
movs r0, 0x64
_08073CD2:
str r0, [r4]
ldr r1, _08073CEC
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
_08073CDC:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08073CEC: .4byte gUnknown_203B440
thumb_func_end sub_8073B78
thumb_func_start sub_8073CF0
sub_8073CF0:
push {lr}
bl sub_8067110
pop {r0}
bx r0
thumb_func_end sub_8073CF0
thumb_func_start sub_8073CFC
sub_8073CFC:
push {lr}
bl sub_80671A0
pop {r0}
bx r0
thumb_func_end sub_8073CFC
thumb_func_start sub_8073D08
sub_8073D08:
push {lr}
bl sub_8073D14
pop {r0}
bx r0
thumb_func_end sub_8073D08
thumb_func_start sub_8073D14
sub_8073D14:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xB0
adds r6, r0, 0
ldr r4, [r6, 0x70]
bl sub_8045128
ldr r5, [r0, 0x14]
cmp r5, 0
bne _08073D30
b _0807407A
_08073D30:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08073D3C
b _0807407A
_08073D3C:
ldr r0, _08073D68
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r4, 0x7]
cmp r0, 0
beq _08073D4E
b _0807407A
_08073D4E:
ldrb r0, [r4, 0x8]
cmp r0, 0x1
bne _08073D56
b _0807407A
_08073D56:
adds r0, r4, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _08073D64
cmp r0, 0x47
bne _08073D6C
_08073D64:
movs r0, 0x1
b _08073D6E
.align 2, 0
_08073D68: .4byte gUnknown_202DF98
_08073D6C:
movs r0, 0
_08073D6E:
cmp r0, 0
beq _08073D74
b _0807407A
_08073D74:
adds r0, r4, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _08073D80
b _0807407A
_08073D80:
ldr r0, [r6, 0x70]
mov r10, r0
adds r0, r5, 0
bl sub_8045108
adds r5, r0, 0
ldrb r1, [r5]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08073D98
b _0807407A
_08073D98:
adds r0, r6, 0
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _08073DC8
ldr r0, _08073DBC
adds r1, r5, 0
bl sub_8045BF8
ldr r0, _08073DC0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08073DC4
b _0807404C
.align 2, 0
_08073DBC: .4byte gUnknown_202DE58
_08073DC0: .4byte gUnknown_202DF98
_08073DC4: .4byte gUnknown_80F8F88
_08073DC8:
mov r1, r10
ldrb r0, [r1, 0x6]
cmp r0, 0
bne _08073E24
ldrb r0, [r5, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x6
bne _08073E24
mov r7, r10
ldrb r0, [r7, 0x6]
cmp r0, 0
beq _08073DF4
ldr r0, _08073DF0
bl sub_8083E38
b _08073DFC
.align 2, 0
_08073DF0: .4byte 0x0000014b
_08073DF4:
movs r0, 0xA6
lsls r0, 1
bl sub_8083E38
_08073DFC:
adds r0, r5, 0
bl sub_80915D4
bl sub_80913A0
ldr r0, _08073E1C
adds r1, r5, 0
bl sub_8045BF8
adds r0, r6, 0x4
movs r1, 0x1
bl sub_80461C8
ldr r0, _08073E20
b _0807404C
.align 2, 0
_08073E1C: .4byte gUnknown_202DE58
_08073E20: .4byte gUnknown_80F9054
_08073E24:
ldr r0, _08073E64
ldr r0, [r0]
ldr r1, _08073E68
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08073E70
mov r7, r10
ldrb r0, [r7, 0x6]
cmp r0, 0
bne _08073E70
movs r4, 0
add r2, sp, 0x54
adds r7, 0x60
ldr r0, _08073E6C
mov r1, sp
ldr r0, [r0]
adds r3, r2, 0
_08073E48:
stm r3!, {r0}
stm r1!, {r4}
adds r0, 0x4
adds r4, 0x1
cmp r4, 0x13
ble _08073E48
str r7, [r2, 0x50]
movs r0, 0x1
negs r0, r0
str r0, [sp, 0x50]
movs r0, 0x15
mov r8, r0
b _08073E80
.align 2, 0
_08073E64: .4byte gUnknown_203B418
_08073E68: .4byte 0x0000065b
_08073E6C: .4byte gUnknown_203B460
_08073E70:
mov r0, r10
adds r0, 0x60
str r0, [sp, 0x54]
movs r0, 0x1
negs r0, r0
str r0, [sp]
movs r1, 0x1
mov r8, r1
_08073E80:
ldrb r0, [r5, 0x2]
add r7, sp, 0xA8
strb r0, [r7]
adds r0, r7, 0
ldrb r0, [r0]
cmp r0, 0x8
bls _08073E90
b _08073FA8
_08073E90:
ldrb r1, [r5]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _08073E9C
b _08073FA8
_08073E9C:
movs r1, 0x1
negs r1, r1
mov r12, r1
mov r7, r12
str r7, [sp, 0xAC]
movs r4, 0
cmp r4, r8
bge _08073EEC
ldr r0, _08073F94
mov r9, r0
add r3, sp, 0x54
_08073EB2:
ldr r2, [r3]
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08073EE4
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08073EE4
ldr r1, [r5]
mov r7, r9
ands r1, r7
ldr r0, [r2]
ands r0, r7
cmp r1, r0
bne _08073EE4
ldrb r0, [r2, 0x1]
cmp r0, 0x63
beq _08073EE4
ldr r1, [sp, 0xAC]
cmp r1, r0
bge _08073EE4
str r0, [sp, 0xAC]
mov r12, r4
_08073EE4:
adds r3, 0x4
adds r4, 0x1
cmp r4, r8
blt _08073EB2
_08073EEC:
movs r0, 0x1
negs r0, r0
cmp r12, r0
bne _08073F40
mov r7, r12
str r7, [sp, 0xAC]
movs r4, 0
cmp r4, r8
bge _08073F38
add r0, sp, 0xA8
ldrb r0, [r0]
mov r9, r0
add r3, sp, 0x54
_08073F06:
ldr r2, [r3]
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08073F30
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08073F30
ldrb r1, [r2, 0x2]
cmp r9, r1
bne _08073F30
ldrb r0, [r2, 0x1]
cmp r0, 0x63
beq _08073F30
ldr r7, [sp, 0xAC]
cmp r7, r0
bge _08073F30
str r0, [sp, 0xAC]
mov r12, r4
_08073F30:
adds r3, 0x4
adds r4, 0x1
cmp r4, r8
blt _08073F06
_08073F38:
movs r0, 0x1
negs r0, r0
cmp r12, r0
beq _08073FA8
_08073F40:
add r0, sp, 0x54
mov r1, r12
lsls r4, r1, 2
adds r3, r0, r4
ldr r2, [r3]
ldrb r1, [r2, 0x1]
ldrb r0, [r5, 0x1]
adds r1, r0
cmp r1, 0x62
ble _08073F56
movs r1, 0x63
_08073F56:
strb r1, [r2, 0x1]
ldrb r1, [r5]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _08073F6C
ldr r0, [r3]
ldrb r1, [r0]
movs r2, 0x8
orrs r1, r2
strb r1, [r0]
_08073F6C:
ldr r0, _08073F98
adds r1, r5, 0
bl sub_8045BF8
adds r0, r6, 0x4
movs r1, 0x1
bl sub_80461C8
movs r0, 0xA5
lsls r0, 1
bl sub_8083E38
mov r7, sp
adds r0, r7, r4
ldr r0, [r0]
cmp r0, 0
bge _08073FA0
ldr r0, _08073F9C
b _0807404C
.align 2, 0
_08073F94: .4byte 0x00ff0008
_08073F98: .4byte gUnknown_202DE58
_08073F9C: .4byte gUnknown_80F9018
_08073FA0:
ldr r0, _08073FA4
b _0807404C
.align 2, 0
_08073FA4: .4byte gUnknown_80F9050
_08073FA8:
movs r4, 0
cmp r4, r8
bge _08073FD2
ldr r0, [sp, 0x54]
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08073FD2
movs r3, 0x1
add r2, sp, 0x54
_08073FBE:
adds r2, 0x4
adds r4, 0x1
cmp r4, r8
bge _08073FD2
ldr r0, [r2]
ldrb r1, [r0]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _08073FBE
_08073FD2:
cmp r4, r8
bne _08073FEC
ldr r0, _08073FE4
adds r1, r5, 0
bl sub_8045BF8
ldr r0, _08073FE8
b _0807404C
.align 2, 0
_08073FE4: .4byte gUnknown_202DE58
_08073FE8: .4byte gUnknown_80F8F54
_08073FEC:
mov r1, r10
ldrb r0, [r1, 0x6]
cmp r0, 0
beq _08074000
ldr r0, _08073FFC
bl sub_8083E38
b _08074008
.align 2, 0
_08073FFC: .4byte 0x0000014b
_08074000:
movs r0, 0xA5
lsls r0, 1
bl sub_8083E38
_08074008:
lsls r0, r4, 2
add r0, sp
ldr r0, [r0]
cmp r0, 0
bge _08074034
ldr r0, [r5]
mov r7, r10
str r0, [r7, 0x60]
ldr r0, _0807402C
adds r1, r5, 0
bl sub_8045BF8
adds r0, r6, 0x4
movs r1, 0x1
bl sub_80461C8
ldr r0, _08074030
b _0807404C
.align 2, 0
_0807402C: .4byte gUnknown_202DE58
_08074030: .4byte gUnknown_80F9018
_08074034:
adds r0, r5, 0
bl sub_8091290
lsls r0, 24
cmp r0, 0
beq _08074060
ldr r0, _08074058
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807405C
_0807404C:
ldr r1, [r0]
adds r0, r6, 0
bl sub_805239C
b _0807407A
.align 2, 0
_08074058: .4byte gUnknown_202DF98
_0807405C: .4byte gUnknown_80F8FAC
_08074060:
ldr r0, _0807408C
adds r1, r5, 0
bl sub_8045BF8
adds r0, r6, 0x4
movs r1, 0x1
bl sub_80461C8
ldr r0, _08074090
ldr r1, [r0]
adds r0, r6, 0
bl sub_805239C
_0807407A:
add sp, 0xB0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807408C: .4byte gUnknown_202DE58
_08074090: .4byte gUnknown_80F9050
thumb_func_end sub_8073D14
thumb_func_start sub_8074094
sub_8074094:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
adds r5, r0, 0
cmp r5, 0
bne _080740AA
bl _08074B2E
_080740AA:
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080740B8
bl _08074B2E
_080740B8:
bl sub_8044B28
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
beq _080740C8
bl _08074B2E
_080740C8:
ldr r0, [r5, 0x70]
mov r8, r0
movs r0, 0xA3
lsls r0, 1
add r0, r8
strb r6, [r0]
bl sub_805229C
adds r0, r5, 0
bl sub_807E8F0
adds r0, r5, 0
movs r1, 0x16
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08074170
ldr r4, _0807434C
add r4, r8
ldrb r0, [r4]
adds r0, 0x1
strb r0, [r4]
lsls r0, 24
lsrs r0, 24
cmp r0, 0x13
bls _08074102
movs r0, 0x13
strb r0, [r4]
_08074102:
movs r0, 0x64
bl sub_8084100
ldr r2, _08074350
ldrb r1, [r4]
lsls r1, 1
adds r1, r2
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _08074170
strb r6, [r4]
adds r0, r5, 0
bl sub_80444F4
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074136
bl _08074B2E
_08074136:
bl sub_8044B28
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _08074146
bl _08074B2E
_08074146:
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0
movs r3, 0
bl sub_807D148
mov r3, r8
ldrb r0, [r3, 0x7]
cmp r0, 0
bne _0807415C
b _080743B0
_0807415C:
ldr r1, _08074354
ldr r0, [r1]
strb r4, [r0, 0x1]
ldr r0, [r1]
movs r4, 0xB8
lsls r4, 3
adds r0, r4
movs r1, 0x1
negs r1, r1
str r1, [r0]
_08074170:
mov r1, r8
ldrb r0, [r1, 0x7]
cmp r0, 0
bne _0807417A
b _080743B0
_0807417A:
movs r2, 0
mov r9, r2
movs r4, 0xA
adds r0, r5, 0
movs r1, 0x17
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08074190
movs r4, 0
_08074190:
adds r0, r5, 0
movs r1, 0x1F
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080741A0
subs r4, 0x1
_080741A0:
adds r0, r5, 0
movs r1, 0x10
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080741B0
subs r4, 0x1
_080741B0:
adds r0, r5, 0
movs r1, 0x1B
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080741C0
adds r4, 0x1
_080741C0:
adds r0, r5, 0
movs r1, 0xA
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080741D0
adds r4, 0x1
_080741D0:
adds r0, r5, 0
movs r1, 0x2B
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _080741E0
adds r4, 0x1
_080741E0:
cmp r4, 0
bge _080741E6
movs r4, 0
_080741E6:
cmp r4, 0x13
ble _080741EC
movs r4, 0x13
_080741EC:
mov r3, r9
str r3, [sp, 0x8]
ldr r0, _08074358
str r0, [sp, 0xC]
add r6, sp, 0x10
lsls r2, r4, 3
ldr r0, _0807435C
adds r2, r0
adds r0, r6, 0
add r1, sp, 0x8
bl sub_800A34C
ldr r2, _08074360
add r2, r8
ldrb r0, [r2]
cmp r0, 0x1
bls _0807421E
ldr r1, _08074364
lsls r0, 2
adds r0, r1
ldr r1, [r0]
lsls r1, 16
ldr r0, [r6, 0x4]
adds r0, r1
str r0, [r6, 0x4]
_0807421E:
mov r4, r9
strb r4, [r2]
movs r4, 0x9E
lsls r4, 1
add r4, r8
ldr r7, [r4]
add r0, sp, 0x18
adds r1, r6, 0
bl sub_80943A8
ldr r2, [sp, 0x18]
add r0, sp, 0x1C
adds r1, r7, 0
bl sub_80942C0
ldr r0, [sp, 0x1C]
str r0, [r4]
movs r6, 0x1
adds r0, r7, 0
bl sub_8094450
cmp r0, 0x13
ble _0807425C
ldr r0, [r4]
bl sub_8094450
cmp r0, 0x13
bgt _0807425C
ldr r0, _08074368
ldr r0, [r0]
mov r9, r0
_0807425C:
adds r0, r7, 0
bl sub_8094450
cmp r0, 0x9
ble _0807427C
movs r0, 0x9E
lsls r0, 1
add r0, r8
ldr r0, [r0]
bl sub_8094450
cmp r0, 0x9
bgt _0807427C
ldr r0, _0807436C
ldr r0, [r0]
mov r9, r0
_0807427C:
movs r4, 0x9E
lsls r4, 1
add r4, r8
ldr r0, [r4]
bl sub_8094450
cmp r0, 0
bne _08074298
add r0, sp, 0x20
movs r1, 0
bl sub_80943A0
ldr r0, [sp, 0x20]
str r0, [r4]
_08074298:
ldr r0, [r4]
bl sub_8094450
cmp r0, 0
bge _080742AE
add r0, sp, 0x24
movs r1, 0
bl sub_80943A0
ldr r0, [sp, 0x24]
str r0, [r4]
_080742AE:
ldr r0, [r4]
bl sub_8094450
cmp r0, 0
bne _08074384
bl sub_805E804
adds r0, r5, 0
bl sub_80444F4
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080742D8
bl _08074B2E
_080742D8:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080742E6
bl _08074B2E
_080742E6:
ldr r3, _08074354
ldr r0, [r3]
ldr r2, _08074370
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0x9
bhi _080742F8
adds r0, 0x1
strb r0, [r1]
_080742F8:
ldr r0, [r3]
adds r0, r2
ldrb r2, [r0]
cmp r2, 0x1
bne _08074308
ldr r0, _08074374
ldr r0, [r0]
mov r9, r0
_08074308:
cmp r2, 0x2
bne _08074314
ldr r0, _08074378
ldr r0, [r0]
mov r9, r0
movs r6, 0
_08074314:
cmp r2, 0x3
bne _08074320
ldr r0, _0807437C
ldr r0, [r0]
mov r9, r0
movs r6, 0
_08074320:
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r3, _08074380
adds r0, r5, 0
movs r1, 0x1
movs r2, 0xE
bl sub_806F324
movs r1, 0xA3
lsls r1, 1
add r1, r8
movs r0, 0x1
strb r0, [r1]
ldr r0, [r4]
bl sub_8094450
cmp r0, 0
beq _08074390
b _080743B0
.align 2, 0
_0807434C: .4byte 0x00000169
_08074350: .4byte gUnknown_80F5594
_08074354: .4byte gUnknown_203B418
_08074358: .4byte 0x0000199a
_0807435C: .4byte gUnknown_80F54F4
_08074360: .4byte 0x00000153
_08074364: .4byte gUnknown_80F60DC
_08074368: .4byte gUnknown_80FD594
_0807436C: .4byte gUnknown_80FD5B8
_08074370: .4byte 0x00000679
_08074374: .4byte gUnknown_80FD5DC
_08074378: .4byte gUnknown_80FD608
_0807437C: .4byte gUnknown_80FD628
_08074380: .4byte 0x00000211
_08074384:
ldr r0, _08074408
ldr r0, [r0]
ldr r1, _0807440C
adds r0, r1
movs r1, 0
strb r1, [r0]
_08074390:
mov r2, r9
cmp r2, 0
beq _080743B0
cmp r6, 0
beq _080743A0
ldr r0, _08074410
bl sub_8083E38
_080743A0:
adds r0, r5, 0
mov r1, r9
bl sub_80522A8
movs r0, 0x1E
movs r1, 0x32
bl sub_803E708
_080743B0:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080743BE
b _08074B2E
_080743BE:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080743CA
b _08074B2E
_080743CA:
ldr r0, _08074408
ldr r0, [r0]
ldr r3, _08074414
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
bne _08074480
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x5
bne _0807441C
adds r0, r5, 0
movs r1, 0x6
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _08074466
ldr r0, _08074418
movs r4, 0
ldrsh r1, [r0, r4]
movs r3, 0x88
lsls r3, 2
adds r0, r5, 0
movs r2, 0x12
bl sub_806F324
b _08074466
.align 2, 0
_08074408: .4byte gUnknown_203B418
_0807440C: .4byte 0x00000679
_08074410: .4byte 0x00000153
_08074414: .4byte 0x0000e266
_08074418: .4byte gUnknown_80F4F8E
_0807441C:
adds r0, r5, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
bne _08074466
adds r0, r5, 0
movs r1, 0x9
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _08074466
adds r0, r5, 0
movs r1, 0xD
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _08074466
adds r0, r5, 0
movs r1, 0x11
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _08074466
ldr r0, _08074608
movs r2, 0
ldrsh r1, [r0, r2]
movs r3, 0x88
lsls r3, 2
adds r0, r5, 0
movs r2, 0x12
bl sub_806F324
_08074466:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074474
b _08074B2E
_08074474:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074480
b _08074B2E
_08074480:
movs r0, 0x64
bl sub_8084100
adds r4, r0, 0
adds r0, r5, 0
movs r1, 0x21
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080744D8
ldr r0, _0807460C
movs r3, 0
ldrsh r0, [r0, r3]
cmp r4, r0
bge _080744D8
adds r0, r5, 0
bl sub_8070A58
lsls r0, 24
cmp r0, 0
beq _080744D8
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080744C0
b _08074B2E
_080744C0:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080744CC
b _08074B2E
_080744CC:
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0
bl sub_8079F20
_080744D8:
adds r0, r5, 0
movs r1, 0xB
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807450C
ldr r2, _08074610
add r2, r8
ldrb r0, [r2]
adds r0, 0x1
strb r0, [r2]
ldrb r1, [r2]
ldr r0, _08074614
movs r4, 0
ldrsh r0, [r0, r4]
cmp r1, r0
blt _0807450C
movs r0, 0
strb r0, [r2]
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x7F
movs r3, 0
bl sub_8077910
_0807450C:
mov r0, r8
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x4
bne _0807453C
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807452A
b _08074B2E
_0807452A:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074536
b _08074B2E
_08074536:
adds r0, r5, 0
bl sub_80420B8
_0807453C:
mov r0, r8
adds r0, 0xAC
ldrb r1, [r0]
adds r6, r0, 0
cmp r1, 0x1
bne _080745B6
mov r4, r8
adds r4, 0xAE
ldrb r0, [r4]
cmp r0, 0
beq _0807455C
subs r0, 0x1
strb r0, [r4]
lsls r0, 24
cmp r0, 0
bne _0807459C
_0807455C:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074570
b _08074B2E
_08074570:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807457C
b _08074B2E
_0807457C:
ldr r0, _08074618
ldrh r0, [r0]
strb r0, [r4]
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r0, _0807461C
movs r2, 0
ldrsh r1, [r0, r2]
movs r3, 0x82
lsls r3, 2
adds r0, r5, 0
movs r2, 0x1
bl sub_806F324
_0807459C:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080745AA
b _08074B2E
_080745AA:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080745B6
b _08074B2E
_080745B6:
ldrb r0, [r6]
cmp r0, 0x2
bne _08074628
mov r4, r8
adds r4, 0xAE
ldrb r0, [r4]
cmp r0, 0
beq _080745D0
subs r0, 0x1
strb r0, [r4]
lsls r0, 24
cmp r0, 0
bne _08074696
_080745D0:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080745E4
b _08074B2E
_080745E4:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080745F0
b _08074B2E
_080745F0:
ldr r0, _08074620
ldrh r0, [r0]
strb r0, [r4]
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r0, _08074624
movs r3, 0
ldrsh r1, [r0, r3]
b _0807468C
.align 2, 0
_08074608: .4byte gUnknown_80F4F8E
_0807460C: .4byte gUnknown_80F4E0C
_08074610: .4byte 0x00000113
_08074614: .4byte gUnknown_80F4F30
_08074618: .4byte gUnknown_80F4F32
_0807461C: .4byte gUnknown_80F4F70
_08074620: .4byte gUnknown_80F4F34
_08074624: .4byte gUnknown_80F4F72
_08074628:
cmp r0, 0x3
bne _080746B0
mov r2, r8
adds r2, 0xAE
ldrb r0, [r2]
cmp r0, 0
beq _08074640
subs r0, 0x1
strb r0, [r2]
lsls r0, 24
cmp r0, 0
bne _08074696
_08074640:
mov r1, r8
adds r1, 0xAF
ldrb r4, [r1]
cmp r4, 0x1C
bhi _0807464E
adds r0, r4, 0x1
strb r0, [r1]
_0807464E:
ldr r0, _08074718
ldrh r0, [r0]
strb r0, [r2]
cmp r4, 0x1C
ble _0807465A
movs r4, 0x1D
_0807465A:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807466E
b _08074B2E
_0807466E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807467A
b _08074B2E
_0807467A:
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r1, _0807471C
lsls r0, r4, 1
adds r0, r1
movs r4, 0
ldrsh r1, [r0, r4]
_0807468C:
ldr r3, _08074720
adds r0, r5, 0
movs r2, 0x3
bl sub_806F324
_08074696:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080746A4
b _08074B2E
_080746A4:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080746B0
b _08074B2E
_080746B0:
mov r0, r8
adds r0, 0xB0
ldrb r1, [r0]
mov r10, r0
cmp r1, 0x7
bne _08074730
mov r4, r8
adds r4, 0xB9
ldrb r0, [r4]
cmp r0, 0
beq _080746D0
subs r0, 0x1
strb r0, [r4]
lsls r0, 24
cmp r0, 0
bne _08074786
_080746D0:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080746E4
b _08074B2E
_080746E4:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080746F0
b _08074B2E
_080746F0:
ldr r0, _08074724
ldrh r0, [r0]
strb r0, [r4]
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
mov r0, r8
adds r0, 0xB4
ldr r1, [r0]
adds r0, r5, 0
bl sub_8041C4C
ldr r0, _08074728
movs r2, 0
ldrsh r1, [r0, r2]
ldr r3, _0807472C
adds r0, r5, 0
movs r2, 0x2
b _08074782
.align 2, 0
_08074718: .4byte gUnknown_80F4F36
_0807471C: .4byte gUnknown_80F4FC8
_08074720: .4byte 0x0000020a
_08074724: .4byte gUnknown_80F4F38
_08074728: .4byte gUnknown_80F4F74
_0807472C: .4byte 0x00000209
_08074730:
cmp r1, 0x4
bne _080747B0
mov r4, r8
adds r4, 0xB9
ldrb r0, [r4]
cmp r0, 0
beq _08074748
subs r0, 0x1
strb r0, [r4]
lsls r0, 24
cmp r0, 0
bne _08074786
_08074748:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807475C
b _08074B2E
_0807475C:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074768
b _08074B2E
_08074768:
ldr r0, _080747A4
ldrh r0, [r0]
strb r0, [r4]
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r0, _080747A8
movs r3, 0
ldrsh r1, [r0, r3]
ldr r3, _080747AC
adds r0, r5, 0
movs r2, 0x5
_08074782:
bl sub_806F324
_08074786:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074794
b _08074B2E
_08074794:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080747A0
b _08074B2E
_080747A0:
b _08074802
.align 2, 0
_080747A4: .4byte gUnknown_80F4F3A
_080747A8: .4byte gUnknown_80F4F76
_080747AC: .4byte 0x0000020b
_080747B0:
cmp r1, 0x5
bne _08074802
mov r4, r8
adds r4, 0xB9
ldrb r0, [r4]
cmp r0, 0
beq _080747C8
subs r0, 0x1
strb r0, [r4]
lsls r0, 24
cmp r0, 0
bne _08074802
_080747C8:
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080747DC
b _08074B2E
_080747DC:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080747E8
b _08074B2E
_080747E8:
ldr r0, _080748D4
ldrh r0, [r0]
strb r0, [r4]
ldr r0, _080748D8
movs r4, 0
ldrsh r2, [r0, r4]
movs r0, 0x1
str r0, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r3, 0
bl sub_8077C44
_08074802:
mov r0, r8
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x1
bne _0807488A
mov r2, r8
adds r2, 0xCC
ldrb r0, [r2]
cmp r0, 0
beq _08074820
subs r0, 0x1
strb r0, [r2]
lsls r0, 24
cmp r0, 0
bne _08074870
_08074820:
mov r0, r8
movs r3, 0x10
ldrsh r1, [r0, r3]
cmp r1, 0
bge _0807482C
adds r1, 0x3
_0807482C:
asrs r4, r1, 2
cmp r4, 0
bne _08074834
movs r4, 0x1
_08074834:
ldr r0, _080748DC
ldrh r0, [r0]
strb r0, [r2]
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807484E
b _08074B2E
_0807484E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807485A
b _08074B2E
_0807485A:
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
movs r3, 0x83
lsls r3, 2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x7
bl sub_806F324
_08074870:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807487E
b _08074B2E
_0807487E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807488A
b _08074B2E
_0807488A:
mov r3, r8
adds r3, 0xD0
ldrb r4, [r3]
mov r9, r4
cmp r4, 0x1
beq _08074898
b _080749AE
_08074898:
mov r2, r8
adds r2, 0xDA
ldrb r0, [r2]
cmp r0, 0
beq _080748AC
subs r0, 0x1
strb r0, [r2]
lsls r0, 24
cmp r0, 0
bne _08074994
_080748AC:
ldr r0, _080748E0
movs r1, 0
ldrsh r6, [r0, r1]
ldr r0, _080748E4
ldr r1, [r0]
mov r0, r8
adds r0, 0xD8
ldrb r0, [r0]
lsls r0, 2
ldr r4, _080748E8
adds r1, r4
adds r1, r0
ldr r4, [r1]
ldr r0, _080748EC
ldrh r0, [r0]
strb r0, [r2]
cmp r4, 0
bne _080748F0
strb r4, [r3]
b _08074994
.align 2, 0
_080748D4: .4byte gUnknown_80F4F3C
_080748D8: .4byte gUnknown_80F4FB2
_080748DC: .4byte gUnknown_80F4F3E
_080748E0: .4byte gUnknown_80F4FB4
_080748E4: .4byte gUnknown_203B418
_080748E8: .4byte 0x000135cc
_080748EC: .4byte gUnknown_80F4F40
_080748F0:
ldr r0, [r4, 0x70]
adds r0, 0x98
mov r1, r8
adds r1, 0xD4
ldr r2, [r0]
ldr r0, [r1]
cmp r2, r0
beq _08074906
movs r0, 0
strb r0, [r3]
b _08074994
_08074906:
adds r0, r5, 0
movs r1, 0x3A
bl sub_8071824
lsls r0, 24
lsrs r7, r0, 24
adds r0, r5, 0
bl sub_80444F4
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807492C
b _08074B2E
_0807492C:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807493A
b _08074B2E
_0807493A:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074946
b _08074B2E
_08074946:
mov r1, r10
ldrb r0, [r1]
cmp r0, 0x1
beq _08074994
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
ldr r3, _08074980
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x9
bl sub_806F324
cmp r7, 0
beq _08074984
adds r0, r4, 0
adds r1, r4, 0
bl sub_807A96C
movs r3, 0xFD
lsls r3, 1
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0xD
bl sub_806F324
b _08074994
.align 2, 0
_08074980: .4byte 0x0000020d
_08074984:
mov r2, r9
str r2, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r6, 0
movs r3, 0
bl sub_8077C44
_08074994:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080749A2
b _08074B2E
_080749A2:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080749AE
b _08074B2E
_080749AE:
mov r4, r8
adds r4, 0xFD
ldrb r0, [r4]
cmp r0, 0
beq _08074A46
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074A46
movs r0, 0
bl sub_807520C
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080749D8
b _08074B2E
_080749D8:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _080749E4
b _08074B2E
_080749E4:
ldr r0, _08074A18
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08074A1C
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
mov r0, r8
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x7
bne _08074A24
ldr r0, _08074A20
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _08074A30
.align 2, 0
_08074A18: .4byte gUnknown_202DFE8
_08074A1C: .4byte gUnknown_80FEB30
_08074A20: .4byte gPtrProtectSavedItMessage
_08074A24:
ldr r1, _08074B40
ldr r3, _08074B44
adds r0, r5, 0
movs r2, 0xB
bl sub_806F324
_08074A30:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08074B2E
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08074B2E
_08074A46:
mov r0, r8
adds r0, 0xC0
ldrb r1, [r0]
adds r7, r0, 0
cmp r1, 0x1
bne _08074AD4
mov r4, r8
adds r4, 0xC1
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074AD4
strb r0, [r7]
adds r0, r5, 0
movs r1, 0
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
bne _08074AD4
adds r0, r5, 0
movs r1, 0
bl sub_8070D04
lsls r0, 24
cmp r0, 0
bne _08074AD4
adds r0, r5, 0
bl sub_8070CD0
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
bne _08074AD4
movs r0, 0
bl sub_807520C
add r4, sp, 0x28
ldr r1, _08074B48
adds r0, r4, 0
bl sub_8092A88
ldrb r0, [r4]
movs r1, 0x10
orrs r0, r1
strb r0, [r4]
str r6, [sp]
str r4, [sp, 0x4]
adds r0, r5, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl sub_8055FA0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08074B2E
bl sub_8044B28
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _08074B2E
mov r0, r8
adds r0, 0xA0
str r1, [r0]
_08074AD4:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08074B2E
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08074B2E
ldrb r0, [r7]
cmp r0, 0xC
bne _08074B1E
mov r4, r8
adds r4, 0xC1
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074B1E
strb r0, [r7]
movs r1, 0xA5
lsls r1, 1
add r1, r8
strb r0, [r1]
ldr r0, _08074B4C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08074B50
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_08074B1E:
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08074B2E
bl sub_8044B28
_08074B2E:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08074B40: .4byte 0x0000270f
_08074B44: .4byte 0x0000020e
_08074B48: .4byte 0x00000165
_08074B4C: .4byte gUnknown_202DF98
_08074B50: .4byte gUnknown_80FABD8
thumb_func_end sub_8074094
thumb_func_start sub_8074B54
sub_8074B54:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
cmp r7, 0
bne _08074B62
b _08074F96
_08074B62:
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074B6E
b _08074F96
_08074B6E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074B7A
b _08074F96
_08074B7A:
bl sub_805229C
ldr r6, [r7, 0x70]
movs r1, 0xA3
lsls r1, 1
adds r0, r6, r1
ldrb r0, [r0]
cmp r0, 0
bne _08074C48
adds r0, r6, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x2
beq _08074C48
cmp r0, 0x3
beq _08074C48
movs r4, 0
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _08074BAE
movs r2, 0x2
ldrsh r0, [r6, r2]
bl GetUnk1B
lsls r0, 24
lsrs r4, r0, 24
_08074BAE:
cmp r4, 0
beq _08074C48
adds r0, r7, 0
movs r1, 0xA
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08074BC8
ldr r0, _08074EF8
movs r3, 0
ldrsh r0, [r0, r3]
adds r4, r0
_08074BC8:
adds r0, r6, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0x6
bne _08074BDA
ldr r0, _08074EFC
movs r1, 0
ldrsh r0, [r0, r1]
adds r4, r0
_08074BDA:
adds r0, r7, 0
movs r1, 0x3
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08074BFE
adds r0, r7, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x4
bne _08074BFE
ldr r0, _08074F00
movs r2, 0
ldrsh r0, [r0, r2]
adds r4, r0
_08074BFE:
movs r0, 0xFA
lsls r0, 1
cmp r4, r0
ble _08074C08
adds r4, r0, 0
_08074C08:
cmp r4, 0x1D
bgt _08074C0E
movs r4, 0x1E
_08074C0E:
movs r3, 0xFC
lsls r3, 1
adds r1, r6, r3
ldrh r0, [r6, 0x10]
ldrh r2, [r1]
adds r0, r2
strh r0, [r1]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, r4
blt _08074C38
_08074C24:
ldrh r0, [r6, 0xE]
adds r0, 0x1
strh r0, [r6, 0xE]
ldrh r0, [r1]
subs r0, r4
strh r0, [r1]
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, r4
bge _08074C24
_08074C38:
movs r3, 0xE
ldrsh r1, [r6, r3]
ldrh r2, [r6, 0x10]
movs r3, 0x10
ldrsh r0, [r6, r3]
cmp r1, r0
blt _08074C48
strh r2, [r6, 0xE]
_08074C48:
adds r0, r6, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0
beq _08074C6E
adds r4, r6, 0
adds r4, 0xA9
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074C6E
adds r0, r7, 0
adds r1, r7, 0
movs r2, 0x1
movs r3, 0x1
bl sub_807A124
_08074C6E:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074C7C
b _08074F96
_08074C7C:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074C88
b _08074F96
_08074C88:
adds r0, r6, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0
beq _08074CAA
adds r4, r6, 0
adds r4, 0xAD
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074CAA
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A290
_08074CAA:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074CB8
b _08074F96
_08074CB8:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074CC4
b _08074F96
_08074CC4:
adds r0, r6, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0
beq _08074CE6
adds r4, r6, 0
adds r4, 0xB8
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074CE6
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A324
_08074CE6:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074CF4
b _08074F96
_08074CF4:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074D00
b _08074F96
_08074D00:
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0
beq _08074D22
adds r4, r6, 0
adds r4, 0xBD
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074D22
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A400
_08074D22:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074D30
b _08074F96
_08074D30:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074D3C
b _08074F96
_08074D3C:
adds r0, r6, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0
beq _08074D5E
adds r4, r6, 0
adds r4, 0xC5
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074D5E
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A4C8
_08074D5E:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074D6C
b _08074F96
_08074D6C:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074D78
b _08074F96
_08074D78:
adds r0, r6, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0
beq _08074D9C
adds r4, r6, 0
adds r4, 0xCB
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074D9C
adds r0, r7, 0
adds r1, r7, 0
movs r2, 0
bl sub_807A5D0
_08074D9C:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074DAA
b _08074F96
_08074DAA:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074DB6
b _08074F96
_08074DB6:
adds r0, r6, 0
adds r0, 0xD0
ldrb r0, [r0]
cmp r0, 0
beq _08074DD8
adds r4, r6, 0
adds r4, 0xD9
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074DD8
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A6C8
_08074DD8:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074DE6
b _08074F96
_08074DE6:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074DF2
b _08074F96
_08074DF2:
adds r0, r6, 0
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0
beq _08074E14
adds r4, r6, 0
adds r4, 0xDD
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074E14
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A734
_08074E14:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074E22
b _08074F96
_08074E22:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074E2E
b _08074F96
_08074E2E:
adds r0, r6, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0
beq _08074E50
adds r4, r6, 0
adds r4, 0xE5
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074E50
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A7C8
_08074E50:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074E5E
b _08074F96
_08074E5E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _08074E6A
b _08074F96
_08074E6A:
adds r0, r6, 0
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0
beq _08074E8C
adds r4, r6, 0
adds r4, 0xE9
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074E8C
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A888
_08074E8C:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08074E9A
b _08074F96
_08074E9A:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08074F96
adds r0, r6, 0
adds r0, 0xEC
ldrb r0, [r0]
cmp r0, 0
beq _08074EC6
adds r4, r6, 0
adds r4, 0xED
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074EC6
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A924
_08074EC6:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08074F96
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08074F96
adds r4, r6, 0
adds r4, 0xFA
ldrb r0, [r4]
cmp r0, 0
beq _08074F18
adds r0, r4, 0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074F18
ldr r0, _08074F04
adds r1, r7, 0
b _08074F08
.align 2, 0
_08074EF8: .4byte gUnknown_80F4FC4
_08074EFC: .4byte gUnknown_80F4FC0
_08074F00: .4byte gUnknown_80F4FC2
_08074F04: .4byte gUnknown_202DF98
_08074F08:
movs r2, 0
bl sub_8045B94
ldr r0, _08074FA0
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
_08074F18:
movs r0, 0
mov r8, r0
movs r5, 0
_08074F1E:
ldr r1, _08074FA4
adds r0, r6, r1
adds r4, r0, r5
ldrb r0, [r4]
cmp r0, 0
beq _08074F3C
adds r0, r5, r1
adds r0, r6, r0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074F3C
movs r2, 0x1
mov r8, r2
_08074F3C:
movs r3, 0x84
lsls r3, 1
adds r0, r6, r3
adds r4, r0, r5
ldrb r0, [r4]
cmp r0, 0
beq _08074F5C
adds r0, r5, r3
adds r0, r6, r0
bl sub_80838EC
ldrb r0, [r4]
cmp r0, 0
bne _08074F5C
movs r0, 0x1
mov r8, r0
_08074F5C:
adds r5, 0x1
cmp r5, 0x4
ble _08074F1E
mov r1, r8
cmp r1, 0
beq _08074F96
ldr r0, [r7, 0x70]
movs r2, 0x82
lsls r2, 1
adds r0, r2
ldr r4, [r0]
adds r0, r7, 0
bl sub_8070774
adds r5, r0, 0
cmp r4, r5
beq _08074F96
ldr r0, _08074FA8
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r1, _08074FAC
lsls r0, r5, 2
adds r0, r1
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
_08074F96:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08074FA0: .4byte gPtrStenchWavedOffMessage
_08074FA4: .4byte 0x0000010d
_08074FA8: .4byte gUnknown_202DF98
_08074FAC: .4byte gUnknown_80FA124
thumb_func_end sub_8074B54
thumb_func_start sub_8074FB0
sub_8074FB0:
push {r4-r6,lr}
adds r3, r0, 0
adds r5, r1, 0
ldr r4, [r3, 0x70]
movs r1, 0xFA
lsls r1, 1
adds r0, r4, r1
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x3
ble _08074FD0
adds r1, r4, 0
adds r1, 0x44
movs r0, 0
strh r0, [r1]
b _08075040
_08074FD0:
ldr r0, _08074FE0
ldr r0, [r0]
ldrb r0, [r0]
cmp r0, 0
beq _08074FE8
ldr r1, _08074FE4
movs r0, 0x2
b _08074FEC
.align 2, 0
_08074FE0: .4byte gUnknown_203B46C
_08074FE4: .4byte gUnknown_202F378
_08074FE8:
ldr r1, _08075048
movs r0, 0x1
_08074FEC:
str r0, [r1]
adds r6, r1, 0
movs r1, 0xFA
lsls r1, 1
adds r0, r4, r1
movs r1, 0
ldrsh r0, [r0, r1]
lsls r1, r0, 3
subs r1, r0
lsls r1, 2
movs r0, 0xC2
lsls r0, 1
adds r1, r0
adds r1, r4, r1
movs r0, 0
strb r0, [r1, 0x1A]
str r5, [r1, 0xC]
ldrh r0, [r3, 0x4]
strh r0, [r1]
ldrh r0, [r3, 0x6]
strh r0, [r1, 0x2]
movs r3, 0
ldrsh r0, [r2, r3]
str r0, [r1, 0x4]
movs r3, 0x2
ldrsh r0, [r2, r3]
str r0, [r1, 0x8]
ldr r0, _0807504C
lsls r2, r5, 2
adds r2, r0
movs r5, 0
ldrsh r0, [r2, r5]
ldr r3, [r6]
muls r0, r3
str r0, [r1, 0x10]
movs r5, 0x2
ldrsh r0, [r2, r5]
muls r0, r3
str r0, [r1, 0x14]
adds r0, r4, 0
bl sub_8075050
_08075040:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08075048: .4byte gUnknown_202F378
_0807504C: .4byte gUnknown_80F4D44
thumb_func_end sub_8074FB0
thumb_func_start sub_8075050
sub_8075050:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
mov r9, r0
adds r6, r1, 0
ldr r0, _08075070
ldr r0, [r0]
ldrb r0, [r0]
cmp r0, 0
beq _08075078
ldr r1, _08075074
movs r0, 0x2
b _0807507C
.align 2, 0
_08075070: .4byte gUnknown_203B46C
_08075074: .4byte gUnknown_202F378
_08075078:
ldr r1, _080750D0
movs r0, 0x1
_0807507C:
str r0, [r1]
movs r1, 0xFA
lsls r1, 1
add r1, r9
ldrh r0, [r1]
adds r0, 0x1
strh r0, [r1]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
bne _080750D4
ldr r0, _080750D0
ldr r1, [r0]
lsls r1, 1
movs r0, 0x18
bl __divsi3
movs r1, 0xCE
lsls r1, 1
add r1, r9
strh r0, [r1]
movs r2, 0xCA
lsls r2, 1
add r2, r9
ldr r1, [r2]
lsls r1, 1
str r1, [r2]
movs r2, 0xCC
lsls r2, 1
add r2, r9
ldr r1, [r2]
lsls r1, 1
str r1, [r2]
strh r0, [r6, 0x18]
ldr r0, [r6, 0x10]
lsls r0, 1
str r0, [r6, 0x10]
ldr r0, [r6, 0x14]
lsls r0, 1
str r0, [r6, 0x14]
b _080751F8
.align 2, 0
_080750D0: .4byte gUnknown_202F378
_080750D4:
cmp r0, 0x3
bne _08075160
ldr r1, [r6, 0x10]
str r1, [sp]
ldr r0, [r6, 0x14]
str r0, [sp, 0x4]
movs r4, 0xCE
lsls r4, 1
add r4, r9
movs r5, 0
movs r7, 0x1
_080750EA:
ldr r1, _0807515C
ldr r0, [r1]
lsls r1, r0, 1
adds r1, r0
movs r0, 0x18
bl __divsi3
strh r0, [r4]
movs r3, 0xCA
lsls r3, 1
add r3, r9
adds r3, r5
ldr r1, [r3]
lsls r0, r1, 1
adds r0, r1
str r0, [r3]
movs r2, 0xCC
lsls r2, 1
add r2, r9
adds r2, r5
ldr r1, [r2]
lsls r0, r1, 1
adds r0, r1
str r0, [r2]
ldr r0, [r3]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
str r0, [r3]
ldr r0, [r2]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
str r0, [r2]
adds r4, 0x1C
adds r5, 0x1C
subs r7, 0x1
cmp r7, 0
bge _080750EA
ldr r1, _0807515C
ldr r0, [r1]
lsls r1, r0, 1
adds r1, r0
movs r0, 0x18
bl __divsi3
strh r0, [r6, 0x18]
ldr r1, [sp]
lsls r0, r1, 1
adds r0, r1
str r0, [r6, 0x10]
ldr r1, [sp, 0x4]
lsls r0, r1, 1
adds r0, r1
str r0, [r6, 0x14]
b _080751F8
.align 2, 0
_0807515C: .4byte gUnknown_202F378
_08075160:
cmp r0, 0x4
bne _080751EC
ldr r0, [r6, 0x10]
str r0, [sp]
ldr r1, [r6, 0x14]
str r1, [sp, 0x4]
movs r7, 0xCE
lsls r7, 1
add r7, r9
movs r0, 0
mov r8, r0
movs r1, 0x2
mov r10, r1
_0807517A:
ldr r0, _080751E8
ldr r1, [r0]
lsls r1, 2
movs r0, 0x18
bl __divsi3
strh r0, [r7]
movs r4, 0xCA
lsls r4, 1
add r4, r9
add r4, r8
ldr r0, [r4]
lsls r0, 2
str r0, [r4]
movs r5, 0xCC
lsls r5, 1
add r5, r9
add r5, r8
ldr r0, [r5]
lsls r0, 2
str r0, [r5]
ldr r0, [r4]
movs r1, 0x3
bl __divsi3
str r0, [r4]
ldr r0, [r5]
movs r1, 0x3
bl __divsi3
str r0, [r5]
adds r7, 0x1C
movs r1, 0x1C
add r8, r1
movs r0, 0x1
negs r0, r0
add r10, r0
mov r1, r10
cmp r1, 0
bge _0807517A
ldr r0, _080751E8
ldr r1, [r0]
lsls r1, 2
movs r0, 0x18
bl __divsi3
strh r0, [r6, 0x18]
ldr r1, [sp]
lsls r0, r1, 2
str r0, [r6, 0x10]
ldr r1, [sp, 0x4]
lsls r0, r1, 2
str r0, [r6, 0x14]
b _080751F8
.align 2, 0
_080751E8: .4byte gUnknown_202F378
_080751EC:
ldr r0, _08075208
ldr r1, [r0]
movs r0, 0x18
bl __divsi3
strh r0, [r6, 0x18]
_080751F8:
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08075208: .4byte gUnknown_202F378
thumb_func_end sub_8075050
thumb_func_start sub_807520C
sub_807520C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
mov r10, r0
movs r7, 0
movs r0, 0
mov r9, r0
ldr r0, _08075238
mov r1, r9
strb r1, [r0]
ldr r0, _0807523C
ldr r0, [r0]
ldrb r0, [r0]
cmp r0, 0
beq _08075244
ldr r1, _08075240
movs r0, 0x2
b _08075248
.align 2, 0
_08075238: .4byte gUnknown_202F32D
_0807523C: .4byte gUnknown_203B46C
_08075240: .4byte gUnknown_202F378
_08075244:
ldr r1, _080752D0
movs r0, 0x1
_08075248:
str r0, [r1]
movs r2, 0
mov r8, r2
_0807524E:
ldr r0, _080752D4
ldr r0, [r0]
mov r3, r8
lsls r1, r3, 2
ldr r4, _080752D8
adds r0, r4
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807534C
ldr r4, [r5, 0x70]
movs r1, 0xFA
lsls r1, 1
adds r0, r4, r1
movs r3, 0
ldrsh r2, [r0, r3]
cmp r2, 0
bne _080752E0
ldr r0, _080752DC
adds r1, r4, r0
ldrb r0, [r1]
cmp r0, 0
beq _0807534C
strb r2, [r1]
movs r1, 0xB6
lsls r1, 1
adds r6, r4, r1
ldr r1, [r6]
cmp r1, 0
beq _0807534C
ldr r0, [r5, 0x4]
cmp r1, r0
beq _0807534C
adds r0, r5, 0
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _080752B2
adds r0, r5, 0
bl sub_8070CD0
lsls r0, 24
cmp r0, 0
bne _0807534C
_080752B2:
adds r0, r5, 0x4
adds r1, r6, 0
bl sub_80983D8
adds r1, r0, 0
adds r0, r4, 0
adds r0, 0x46
ldrb r0, [r0]
cmp r1, r0
beq _0807534C
adds r0, r5, 0
bl sub_806CE68
b _0807534C
.align 2, 0
_080752D0: .4byte gUnknown_202F378
_080752D4: .4byte gUnknown_203B418
_080752D8: .4byte 0x000135cc
_080752DC: .4byte 0x00000147
_080752E0:
ldrh r1, [r4]
movs r2, 0x80
lsls r2, 6
adds r0, r2, 0
orrs r0, r1
strh r0, [r4]
movs r3, 0xC4
lsls r3, 1
adds r0, r4, r3
ldr r1, [r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r1, 0xC0
lsls r1, 4
adds r0, r1
str r0, [sp]
movs r2, 0xC6
lsls r2, 1
adds r0, r4, r2
ldr r1, [r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r3, 0x80
lsls r3, 5
adds r0, r3
str r0, [sp, 0x4]
adds r0, r5, 0
mov r1, sp
bl sub_804535C
movs r1, 0xC8
lsls r1, 1
adds r0, r4, r1
ldr r2, [r0]
adds r0, r5, 0
movs r1, 0
bl sub_806CDFC
movs r2, 0xFB
lsls r2, 1
adds r0, r4, r2
movs r3, 0
strh r3, [r0]
movs r7, 0x1
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807534C
movs r4, 0x1
mov r9, r4
_0807534C:
movs r0, 0x1
add r8, r0
mov r1, r8
cmp r1, 0x13
bgt _08075358
b _0807524E
_08075358:
cmp r7, 0
bne _08075360
movs r0, 0
b _0807566C
_08075360:
ldr r0, _08075390
ldr r0, [r0]
adds r1, r0, 0
adds r1, 0xB8
ldr r2, [r1]
str r2, [sp, 0x10]
mov r3, r10
str r3, [r1]
ldr r4, _08075394
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
beq _0807537C
b _080754AE
_0807537C:
mov r0, r9
cmp r0, 0
bne _08075384
b _080754AE
_08075384:
movs r0, 0x35
bl sub_80526D0
movs r5, 0
b _0807549E
.align 2, 0
_08075390: .4byte gUnknown_203B418
_08075394: .4byte 0x0000066c
_08075398:
movs r0, 0x7
bl sub_803E46C
movs r1, 0
mov r8, r1
adds r5, 0x1
mov r9, r5
_080753A6:
ldr r0, _08075420
ldr r0, [r0]
mov r2, r8
lsls r1, r2, 2
ldr r3, _08075424
adds r0, r3
adds r0, r1
ldr r3, [r0]
adds r0, r3, 0
str r3, [sp, 0x14]
bl sub_80450E0
lsls r0, 24
ldr r3, [sp, 0x14]
cmp r0, 0
beq _08075492
ldr r0, [r3, 0x70]
adds r7, r0, 0
movs r4, 0xFB
lsls r4, 1
adds r5, r7, r4
movs r1, 0
ldrsh r0, [r5, r1]
lsls r1, r0, 3
subs r1, r0
lsls r1, 2
movs r2, 0xC2
lsls r2, 1
adds r1, r2
adds r4, r7, r1
movs r0, 0xFA
lsls r0, 1
adds r6, r7, r0
movs r1, 0
ldrsh r0, [r6, r1]
cmp r0, 0
beq _08075492
ldr r1, [r4, 0x10]
ldr r2, [r4, 0x14]
adds r0, r3, 0
bl sub_804539C
ldrh r0, [r4, 0x18]
subs r0, 0x1
strh r0, [r4, 0x18]
lsls r0, 16
asrs r2, r0, 16
ldr r3, [sp, 0x14]
cmp r2, 0
bne _08075492
ldrh r0, [r5]
adds r0, 0x1
strh r0, [r5]
lsls r0, 16
asrs r0, 16
movs r4, 0
ldrsh r1, [r6, r4]
cmp r0, r1
bne _08075428
strh r2, [r6]
b _08075492
.align 2, 0
_08075420: .4byte gUnknown_203B418
_08075424: .4byte 0x000135cc
_08075428:
movs r0, 0
ldrsh r1, [r5, r0]
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
movs r2, 0xC4
lsls r2, 1
adds r1, r7, r2
adds r1, r0
ldr r1, [r1]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r4, 0xC0
lsls r4, 4
adds r0, r4
str r0, [sp, 0x8]
movs r0, 0
ldrsh r1, [r5, r0]
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
adds r2, 0x4
adds r1, r7, r2
adds r1, r0
ldr r1, [r1]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r4, 0x80
lsls r4, 5
adds r0, r4
add r1, sp, 0x8
str r0, [r1, 0x4]
adds r0, r3, 0
str r3, [sp, 0x14]
bl sub_804535C
movs r0, 0
ldrsh r1, [r5, r0]
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
movs r2, 0xC8
lsls r2, 1
adds r1, r7, r2
adds r1, r0
ldr r2, [r1]
ldr r3, [sp, 0x14]
adds r0, r3, 0
movs r1, 0
bl sub_806CDFC
_08075492:
movs r3, 0x1
add r8, r3
mov r4, r8
cmp r4, 0x13
ble _080753A6
mov r5, r9
_0807549E:
ldr r0, _08075510
ldr r1, [r0]
movs r0, 0x18
bl __divsi3
cmp r5, r0
bge _080754AE
b _08075398
_080754AE:
movs r0, 0
mov r8, r0
_080754B2:
ldr r0, _08075514
ldr r0, [r0]
mov r2, r8
lsls r1, r2, 2
ldr r3, _08075518
adds r0, r3
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080754F6
ldr r4, [r5, 0x70]
movs r0, 0xFA
lsls r0, 1
adds r1, r4, r0
movs r0, 0
strh r0, [r1]
adds r0, r5, 0
bl nullsub_97
ldrh r0, [r4]
movs r2, 0x80
lsls r2, 6
adds r1, r2, 0
ands r0, r1
cmp r0, 0
beq _080754F6
adds r0, r5, 0
movs r1, 0
bl sub_804535C
_080754F6:
movs r3, 0x1
add r8, r3
mov r4, r8
cmp r4, 0x13
ble _080754B2
bl sub_807AA30
movs r7, 0
_08075506:
movs r5, 0
adds r0, r7, 0x1
mov r8, r0
b _08075600
.align 2, 0
_08075510: .4byte gUnknown_202F378
_08075514: .4byte gUnknown_203B418
_08075518: .4byte 0x000135cc
_0807551C:
ldr r2, [r4, 0x70]
cmp r7, 0
bne _0807552A
ldrb r0, [r2, 0x7]
cmp r0, 0
beq _080755FE
b _08075530
_0807552A:
ldrb r0, [r2, 0x7]
cmp r0, 0
bne _080755FE
_08075530:
ldr r6, [r4, 0x4]
ldrh r1, [r2]
movs r3, 0x80
lsls r3, 6
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _080755BC
ldr r3, _08075560
adds r0, r3, 0
ands r0, r1
strh r0, [r2]
ldrb r0, [r2, 0x7]
cmp r0, 0
beq _08075564
adds r0, r4, 0x4
bl sub_804AC20
movs r0, 0
bl sub_807EC28
bl sub_805EE30
b _0807556A
.align 2, 0
_08075560: .4byte 0x0000dfff
_08075564:
adds r0, r4, 0
bl sub_8075708
_0807556A:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080755FE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807562A
movs r0, 0
bl sub_8043ED0
adds r0, r4, 0
bl sub_8074094
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080755FE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807562A
adds r0, r4, 0
bl sub_8071DA4
bl sub_8046D20
ldr r0, _08075650
ldr r0, [r0]
ldr r1, _08075654
adds r0, r1
ldrb r1, [r0]
adds r0, r4, 0
bl sub_8075900
_080755BC:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080755FE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807562A
ldr r0, [r4, 0x4]
cmp r6, r0
beq _080755DE
ldr r1, _08075658
movs r0, 0x1
strb r0, [r1]
_080755DE:
adds r0, r4, 0
bl sub_806A5B8
adds r1, r4, 0x4
adds r0, r4, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _080755FE
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_080755FE:
adds r5, 0x1
_08075600:
cmp r5, 0x13
bgt _0807562A
ldr r0, _08075650
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807565C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080755FE
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807562A
b _0807551C
_0807562A:
mov r7, r8
cmp r7, 0x1
bgt _08075632
b _08075506
_08075632:
bl sub_8086AC0
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08075660
bl sub_8085140
ldr r0, _08075650
ldr r0, [r0]
adds r0, 0xB8
ldr r3, [sp, 0x10]
str r3, [r0]
b _0807566A
.align 2, 0
_08075650: .4byte gUnknown_203B418
_08075654: .4byte 0x00003a08
_08075658: .4byte gUnknown_202F32D
_0807565C: .4byte 0x000135cc
_08075660:
ldr r0, _0807567C
ldr r0, [r0]
adds r0, 0xB8
ldr r4, [sp, 0x10]
str r4, [r0]
_0807566A:
movs r0, 0x1
_0807566C:
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807567C: .4byte gUnknown_203B418
thumb_func_end sub_807520C
thumb_func_start sub_8075680
sub_8075680:
push {r4-r7,lr}
movs r7, 0
_08075684:
ldr r0, _080756FC
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _08075700
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080756EE
ldr r6, [r5, 0x70]
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _080756EE
movs r0, 0xB6
lsls r0, 1
adds r4, r6, r0
ldr r1, [r4]
cmp r1, 0
beq _080756EE
ldr r0, [r5, 0x4]
cmp r1, r0
beq _080756EE
adds r0, r5, 0
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
bne _080756EE
adds r0, r5, 0x4
adds r1, r4, 0
bl sub_80983D8
adds r4, r0, 0
movs r1, 0x7
ands r0, r1
adds r1, r6, 0
adds r1, 0x46
strb r0, [r1]
adds r0, r5, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
adds r2, r4, 0
bl sub_806CDD4
_080756EE:
adds r7, 0x1
cmp r7, 0x13
ble _08075684
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080756FC: .4byte gUnknown_203B418
_08075700: .4byte 0x000135cc
thumb_func_end sub_8075680
thumb_func_start nullsub_97
nullsub_97:
bx lr
thumb_func_end nullsub_97
thumb_func_start sub_8075708
sub_8075708:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r4, r0, 0
ldr r6, [r4, 0x70]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807580C
adds r0, r4, 0
bl sub_8045128
adds r5, r0, 0
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08075752
adds r0, r6, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x3
beq _08075752
adds r0, r4, 0
movs r1, 0x9
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _08075752
adds r0, r4, 0x4
bl sub_804AE84
_08075752:
ldr r5, [r5, 0x14]
cmp r5, 0
beq _0807580C
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x5
bhi _0807580C
lsls r0, 2
ldr r1, _0807576C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807576C: .4byte _08075770
.align 2, 0
_08075770:
.4byte _0807580C
.4byte _0807580C
.4byte _08075788
.4byte _08075806
.4byte _0807580C
.4byte _0807580C
_08075788:
adds r0, r5, 0
bl sub_8045104
adds r7, r0, 0
movs r0, 0
mov r8, r0
mov r9, r0
adds r0, r4, 0
movs r1, 0x13
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080757BA
adds r1, r5, 0
adds r1, 0x20
ldrb r0, [r1]
cmp r0, 0
bne _080757BA
movs r0, 0x1
strb r0, [r1]
bl sub_8049ED4
movs r0, 0x1
mov r9, r0
_080757BA:
ldrb r0, [r7, 0x1]
cmp r0, 0
bne _080757D2
adds r0, r5, 0
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
beq _080757EC
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _080757EC
b _080757F2
_080757D2:
cmp r0, 0x1
bne _080757DE
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _080757EC
b _080757F2
_080757DE:
cmp r0, 0x2
bne _080757EC
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _080757EC
movs r0, 0x1
mov r8, r0
_080757EC:
mov r0, r8
cmp r0, 0
beq _0807580C
_080757F2:
mov r0, r9
cmp r0, 0
bne _0807580C
adds r1, r4, 0x4
adds r0, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_807FE9C
b _0807580C
_08075806:
adds r0, r4, 0
bl sub_8073D14
_0807580C:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8075708
thumb_func_start sub_8075818
sub_8075818:
push {r4-r6,lr}
adds r4, r0, 0
ldr r6, [r4, 0x70]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080758F6
adds r0, r4, 0
bl sub_8045128
adds r5, r0, 0
adds r0, r4, 0
movs r1, 0xD
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08075848
ldrh r1, [r5]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _080758F2
_08075848:
ldr r4, [r5, 0x14]
cmp r4, 0
beq _080758F6
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x5
bhi _080758F6
lsls r0, 2
ldr r1, _08075864
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08075864: .4byte _08075868
.align 2, 0
_08075868:
.4byte _080758F6
.4byte _080758F6
.4byte _08075880
.4byte _080758BE
.4byte _080758F6
.4byte _080758F6
_08075880:
adds r0, r4, 0
bl sub_8045104
movs r1, 0
ldrb r0, [r0, 0x1]
cmp r0, 0
bne _080758A0
adds r0, r4, 0
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
beq _080758B8
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _080758B8
b _080758F2
_080758A0:
cmp r0, 0x1
bne _080758AC
ldrb r0, [r6, 0x6]
cmp r0, 0
beq _080758B8
b _080758F2
_080758AC:
cmp r0, 0x2
bne _080758B8
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _080758B8
movs r1, 0x1
_080758B8:
cmp r1, 0
beq _080758F6
b _080758F2
_080758BE:
ldrb r0, [r6, 0x7]
cmp r0, 0
bne _080758F6
adds r0, r6, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080758F6
ldrh r1, [r5]
movs r0, 0x3
ands r0, r1
cmp r0, 0
bne _080758E2
ldrb r0, [r6, 0x6]
cmp r0, 0
bne _080758F6
_080758E2:
adds r0, r4, 0
bl sub_8045108
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080758F6
_080758F2:
movs r0, 0x1
b _080758F8
_080758F6:
movs r0, 0
_080758F8:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8075818
thumb_func_start sub_8075900
sub_8075900:
push {r4-r6,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r6, r1, 24
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807597A
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
bne _0807597A
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807597A
ldr r5, _08075980
ldr r0, [r5]
ldr r1, _08075984
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807597A
adds r0, r4, 0
bl sub_8045128
ldrh r1, [r0]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0807597A
bl sub_8083600
ldr r1, _08075988
ldr r1, [r1]
bl sub_80522A8
ldr r0, [r5]
ldr r1, _0807598C
adds r0, r1
movs r1, 0x1
strb r1, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_807AB38
movs r0, 0
bl sub_8041888
adds r0, r4, 0x4
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _0807597A
movs r0, 0x78
movs r1, 0x39
bl sub_803E708
_0807597A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08075980: .4byte gUnknown_203B418
_08075984: .4byte 0x00000671
_08075988: .4byte gUnknown_80FE308
_0807598C: .4byte 0x00000672
thumb_func_end sub_8075900
thumb_func_start sub_8075990
sub_8075990:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
ldr r5, [r7, 0x70]
ldrh r1, [r5]
movs r0, 0x80
lsls r0, 8
ands r0, r1
lsls r0, 16
lsrs r6, r0, 16
cmp r6, 0
beq _080759C2
adds r0, r5, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x6
beq _080759B8
b _08075B92
_080759B8:
adds r0, r7, 0
adds r1, r7, 0
bl sub_807A324
b _08075B92
_080759C2:
movs r1, 0x80
lsls r1, 1
adds r0, r5, r1
strb r6, [r0]
adds r0, r5, 0
adds r0, 0xA4
ldrb r1, [r0]
mov r9, r0
cmp r1, 0
beq _080759E4
adds r0, r7, 0
bl sub_8085A50
lsls r0, 24
cmp r0, 0
bne _080759E4
b _08075B92
_080759E4:
mov r2, r9
ldrb r0, [r2]
cmp r0, 0x1
beq _08075A36
adds r4, r5, 0
adds r4, 0xFC
ldrb r0, [r4]
cmp r0, 0
beq _08075A36
adds r0, r7, 0
bl sub_8070C60
lsls r0, 24
cmp r0, 0
beq _08075A24
strb r6, [r4]
ldr r0, _08075A1C
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08075A20
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _08075B92
.align 2, 0
_08075A1C: .4byte gUnknown_202DF98
_08075A20: .4byte gPtrCouldntBeUsedMessage
_08075A24:
adds r0, r7, 0
bl sub_8073658
adds r0, r5, 0
adds r0, 0x44
ldrh r0, [r0]
cmp r0, 0
beq _08075A36
b _08075B92
_08075A36:
adds r0, r7, 0
bl sub_807001C
lsls r0, 24
cmp r0, 0
beq _08075A44
b _08075B92
_08075A44:
ldr r0, _08075AA4
ldr r0, [r0]
ldr r1, _08075AA8
adds r0, r1
ldrb r0, [r0]
movs r2, 0x44
adds r2, r5
mov r8, r2
cmp r0, 0
beq _08075AB6
movs r6, 0
_08075A5A:
ldr r0, _08075AA4
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08075AAC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08075AB0
ldr r0, [r4, 0x70]
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x2
bne _08075AB0
adds r0, r7, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _08075AB0
ldr r0, [r4, 0x70]
adds r0, 0xC9
ldrb r0, [r0]
movs r1, 0x1
cmp r0, 0
beq _08075A9A
movs r1, 0x2
_08075A9A:
movs r2, 0x80
lsls r2, 1
adds r0, r5, r2
strb r1, [r0]
b _08075AB6
.align 2, 0
_08075AA4: .4byte gUnknown_203B418
_08075AA8: .4byte 0x000037fc
_08075AAC: .4byte 0x000135cc
_08075AB0:
adds r6, 0x1
cmp r6, 0x13
ble _08075A5A
_08075AB6:
mov r4, r8
adds r0, r4, 0
bl sub_8044C88
mov r1, r9
ldrb r0, [r1]
cmp r0, 0x1
bne _08075AF4
movs r2, 0x2
ldrsh r1, [r5, r2]
adds r0, r4, 0
bl sub_8044CA0
movs r0, 0x8
bl sub_8084100
adds r1, r5, 0
adds r1, 0x46
strb r0, [r1]
ldrh r1, [r7, 0x4]
movs r2, 0xB6
lsls r2, 1
adds r0, r5, r2
strh r1, [r0]
ldrh r0, [r7, 0x6]
subs r0, 0x1
movs r1, 0xB7
lsls r1, 1
adds r2, r5, r1
strh r0, [r2]
b _08075B92
_08075AF4:
adds r0, r7, 0
bl sub_8073658
ldrh r6, [r4]
cmp r6, 0
bne _08075B92
adds r0, r7, 0
movs r1, 0x15
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _08075B3C
adds r0, r7, 0
bl sub_807BB94
ldrh r0, [r4]
cmp r0, 0
bne _08075B92
adds r0, r5, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
beq _08075B46
movs r1, 0x2
ldrsh r0, [r5, r1]
bl GetIsMoving
lsls r0, 24
cmp r0, 0
beq _08075B92
adds r0, r7, 0
movs r1, 0x1
bl sub_807ADB8
b _08075B92
_08075B3C:
adds r0, r5, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
bne _08075B52
_08075B46:
movs r2, 0x2
ldrsh r1, [r5, r2]
adds r0, r4, 0
bl sub_8044CA0
b _08075B92
_08075B52:
movs r1, 0x2
ldrsh r0, [r5, r1]
bl GetIsMoving
lsls r0, 24
cmp r0, 0
beq _08075B68
adds r0, r7, 0
movs r1, 0x1
bl sub_807ADB8
_08075B68:
mov r2, r8
ldrh r0, [r2]
cmp r0, 0x1
bhi _08075B92
adds r0, r7, 0
bl sub_807BB94
mov r1, r8
ldrh r0, [r1]
cmp r0, 0x1
bls _08075B92
adds r0, r5, 0
adds r0, 0x79
strb r6, [r0]
movs r2, 0xA2
lsls r2, 1
adds r0, r5, r2
strb r6, [r0]
ldr r1, _08075BA0
adds r0, r5, r1
strb r6, [r0]
_08075B92:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08075BA0: .4byte 0x00000147
thumb_func_end sub_8075990
thumb_func_start sub_8075BA4
sub_8075BA4:
push {r4,r5,lr}
adds r5, r0, 0
lsls r1, 24
ldr r4, [r5, 0x70]
cmp r1, 0
beq _08075BD0
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x4
bne _08075BD0
adds r0, r4, 0
adds r0, 0x46
ldrb r1, [r0]
adds r1, 0x4
movs r2, 0x7
ands r1, r2
strb r1, [r0]
adds r0, r5, 0
bl sub_8069DCC
b _08075BEC
_08075BD0:
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
bne _08075BEC
movs r0, 0x8
bl sub_8084100
adds r1, r4, 0
adds r1, 0x46
strb r0, [r1]
adds r0, r5, 0
bl sub_8069DCC
_08075BEC:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8075BA4
thumb_func_start sub_8075BF4
sub_8075BF4:
push {r4-r7,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08075C0A
movs r0, 0
b _08075C52
_08075C0A:
ldr r6, [r5, 0x70]
adds r1, r6, 0
adds r1, 0xA8
ldrb r0, [r1]
cmp r0, 0x3
beq _08075C48
cmp r0, 0x1
beq _08075C44
movs r0, 0x1
strb r0, [r1]
cmp r4, 0x7F
beq _08075C3C
adds r0, r5, 0
movs r1, 0x2F
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08075C3C
lsrs r0, r4, 31
adds r0, r4, r0
asrs r4, r0, 1
cmp r4, 0
bgt _08075C3C
movs r4, 0x1
_08075C3C:
adds r0, r6, 0
adds r0, 0xA9
strb r4, [r0]
b _08075C4A
_08075C44:
movs r7, 0x1
b _08075C4A
_08075C48:
movs r7, 0x2
_08075C4A:
adds r0, r5, 0
bl sub_80418D4
adds r0, r7, 0
_08075C52:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8075BF4
thumb_func_start sub_8075C58
sub_8075C58:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r4, r1, 0
mov r8, r2
lsls r3, 24
lsrs r5, r3, 24
adds r7, r5, 0
movs r2, 0x1
adds r3, r5, 0
bl sub_8075CFC
lsls r0, 24
cmp r0, 0
bne _08075CEC
ldr r0, [r4, 0x70]
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x2
bne _08075C90
cmp r5, 0
beq _08075CEC
ldr r0, _08075C8C
b _08075CCE
.align 2, 0
_08075C8C: .4byte gUnknown_80FB380
_08075C90:
cmp r0, 0x5
bne _08075CA0
cmp r7, 0
beq _08075CEC
ldr r0, _08075C9C
b _08075CCE
.align 2, 0
_08075C9C: .4byte gUnknown_80FB384
_08075CA0:
adds r0, r4, 0
bl sub_8041AF4
adds r0, r4, 0
mov r1, r8
bl sub_8075BF4
lsls r0, 24
lsrs r5, r0, 24
adds r0, r4, 0
movs r1, 0x8
bl sub_806CE68
cmp r5, 0x1
bne _08075CC8
ldr r0, _08075CC4
b _08075CCE
.align 2, 0
_08075CC4: .4byte gUnknown_80FB338
_08075CC8:
cmp r5, 0x2
bne _08075CE0
ldr r0, _08075CDC
_08075CCE:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08075CEC
.align 2, 0
_08075CDC: .4byte gUnknown_80FB35C
_08075CE0:
ldr r0, _08075CF8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08075CEC:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08075CF8: .4byte gUnknown_80FB318
thumb_func_end sub_8075C58
thumb_func_start sub_8075CFC
sub_8075CFC:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r7, r2, 24
lsls r3, 24
lsrs r5, r3, 24
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08075DAA
ldr r0, _08075D4C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
cmp r7, 0
beq _08075D34
adds r0, r6, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08075DAA
_08075D34:
adds r0, r4, 0
movs r1, 0x11
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _08075D54
cmp r5, 0
beq _08075DAA
ldr r0, _08075D50
b _08075DA0
.align 2, 0
_08075D4C: .4byte gUnknown_202DF98
_08075D50: .4byte gUnknown_80FCD54
_08075D54:
adds r0, r4, 0
movs r1, 0x36
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08075D70
cmp r5, 0
beq _08075DAA
ldr r0, _08075D6C
b _08075DA0
.align 2, 0
_08075D6C: .4byte gUnknown_80FCD58
_08075D70:
adds r0, r4, 0
movs r1, 0x49
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08075D8C
cmp r5, 0
beq _08075DAA
ldr r0, _08075D88
b _08075DA0
.align 2, 0
_08075D88: .4byte gUnknown_80FCD88
_08075D8C:
adds r0, r4, 0
movs r1, 0x15
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08075DB4
cmp r5, 0
beq _08075DAA
ldr r0, _08075DB0
_08075DA0:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08075DAA:
movs r0, 0x1
b _08075DB6
.align 2, 0
_08075DB0: .4byte gUnknown_80FD548
_08075DB4:
movs r0, 0
_08075DB6:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8075CFC
thumb_func_start sub_8075DBC
sub_8075DBC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
adds r5, r1, 0
mov r8, r2
movs r0, 0
mov r9, r0
adds r0, r7, 0
movs r2, 0x1
movs r3, 0x1
bl sub_8075CFC
lsls r0, 24
cmp r0, 0
bne _08075E62
ldr r6, [r5, 0x70]
adds r4, r6, 0
adds r4, 0xA8
ldrb r0, [r4]
cmp r0, 0x2
beq _08075E50
adds r0, r5, 0
bl sub_8041EC8
ldrb r0, [r4]
cmp r0, 0x3
beq _08075E1A
adds r4, 0x1
mov r0, r8
strb r0, [r4]
adds r0, r5, 0
movs r1, 0x2F
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08075E1E
ldrb r0, [r4]
lsrs r0, 1
strb r0, [r4]
cmp r0, 0
bne _08075E1E
movs r0, 0x1
strb r0, [r4]
b _08075E1E
_08075E1A:
movs r0, 0x1
mov r9, r0
_08075E1E:
adds r1, r6, 0
adds r1, 0xA8
movs r0, 0x3
strb r0, [r1]
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE68
mov r0, r9
cmp r0, 0
beq _08075E3C
ldr r0, _08075E38
b _08075E3E
.align 2, 0
_08075E38: .4byte gUnknown_80FB3CC
_08075E3C:
ldr r0, _08075E4C
_08075E3E:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08075E5C
.align 2, 0
_08075E4C: .4byte gUnknown_80FB3A4
_08075E50:
ldr r0, _08075E70
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08075E5C:
adds r0, r5, 0
bl sub_80418D4
_08075E62:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08075E70: .4byte gUnknown_80FB3D0
thumb_func_end sub_8075DBC
thumb_func_start sub_8075E74
sub_8075E74:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
adds r5, r1, 0
mov r8, r2
movs r0, 0
mov r9, r0
adds r0, r7, 0
movs r2, 0
movs r3, 0x1
bl sub_8075CFC
lsls r0, 24
cmp r0, 0
bne _08075F22
ldr r6, [r5, 0x70]
adds r4, r6, 0
adds r4, 0xA8
ldrb r0, [r4]
cmp r0, 0x2
beq _08075F10
adds r0, r5, 0
bl sub_8041ED8
ldrb r0, [r4]
cmp r0, 0
beq _08075EB2
cmp r0, 0x4
bne _08075ED8
_08075EB2:
adds r4, r6, 0
adds r4, 0xA9
mov r0, r8
strb r0, [r4]
adds r0, r5, 0
movs r1, 0x2F
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08075EDC
ldrb r0, [r4]
lsrs r0, 1
strb r0, [r4]
cmp r0, 0
bne _08075EDC
movs r0, 0x1
strb r0, [r4]
b _08075EDC
_08075ED8:
movs r0, 0x1
mov r9, r0
_08075EDC:
adds r1, r6, 0
adds r1, 0xA8
movs r0, 0x5
strb r0, [r1]
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE68
mov r0, r9
cmp r0, 0
beq _08075EFC
ldr r0, _08075EF8
b _08075EFE
.align 2, 0
_08075EF8: .4byte gUnknown_80FB360
_08075EFC:
ldr r0, _08075F0C
_08075EFE:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08075F1C
.align 2, 0
_08075F0C: .4byte gUnknown_80FB31C
_08075F10:
ldr r0, _08075F30
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08075F1C:
adds r0, r5, 0
bl sub_80418D4
_08075F22:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08075F30: .4byte gUnknown_80FB388
thumb_func_end sub_8075E74
thumb_func_start sub_8075F34
sub_8075F34:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r6, r2, 0
movs r2, 0x1
movs r3, 0x1
bl sub_8075CFC
lsls r0, 24
cmp r0, 0
bne _08075FC2
ldr r2, [r4, 0x70]
adds r1, r2, 0
adds r1, 0xA8
ldrb r0, [r1]
cmp r0, 0
bne _08075F78
movs r0, 0x4
strb r0, [r1]
adds r0, r2, 0
adds r0, 0xA9
strb r6, [r0]
adds r0, r4, 0
bl nullsub_91
adds r0, r4, 0
movs r1, 0x8
bl sub_806CE68
ldr r0, _08075F74
b _08075F9E
.align 2, 0
_08075F74: .4byte gUnknown_80FB3E0
_08075F78:
cmp r0, 0x1
beq _08075F84
cmp r0, 0x3
beq _08075F84
cmp r0, 0x5
bne _08075F8C
_08075F84:
ldr r0, _08075F88
b _08075F9E
.align 2, 0
_08075F88: .4byte gUnknown_80FB418
_08075F8C:
cmp r0, 0x2
bne _08075F98
ldr r0, _08075F94
b _08075F9E
.align 2, 0
_08075F94: .4byte gUnknown_80FB3F8
_08075F98:
cmp r0, 0x4
bne _08075FB0
ldr r0, _08075FAC
_08075F9E:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08075FBC
.align 2, 0
_08075FAC: .4byte gUnknown_80FB414
_08075FB0:
ldr r0, _08075FC8
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08075FBC:
adds r0, r4, 0
bl sub_80418D4
_08075FC2:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08075FC8: .4byte gUnknown_80FB3E0
thumb_func_end sub_8075F34
thumb_func_start sub_8075FCC
sub_8075FCC:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
movs r7, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076086
ldr r5, [r4, 0x70]
adds r0, r5, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
beq _08075FF4
cmp r0, 0x5
beq _08075FF4
cmp r0, 0x3
bne _08075FF6
_08075FF4:
movs r7, 0x1
_08075FF6:
ldr r0, _08076060
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xA8
ldrb r0, [r1]
cmp r0, 0x2
beq _08076074
movs r0, 0x2
strb r0, [r1]
ldr r1, _08076064
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xA9
strb r0, [r1]
ldr r0, _08076068
adds r1, r5, r0
movs r0, 0xFF
strb r0, [r1]
adds r0, 0x65
adds r1, r5, r0
movs r0, 0x1
negs r0, r0
strb r0, [r1]
adds r0, r4, 0
bl sub_8041EE8
adds r0, r4, 0
movs r1, 0x8
bl sub_806CE68
cmp r7, 0
beq _08076050
ldr r0, _0807606C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076050:
ldr r0, _08076070
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076080
.align 2, 0
_08076060: .4byte gUnknown_202DF98
_08076064: .4byte gUnknown_80F4E7C
_08076068: .4byte 0x00000165
_0807606C: .4byte gUnknown_80FB41C
_08076070: .4byte gUnknown_80FB458
_08076074:
ldr r0, _0807608C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076080:
adds r0, r4, 0
bl sub_80418D4
_08076086:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807608C: .4byte gUnknown_80FB43C
thumb_func_end sub_8075FCC
thumb_func_start sub_8076090
sub_8076090:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r6, r0, 0
adds r4, r1, 0
adds r7, r3, 0
ldr r0, [sp, 0x1C]
lsls r2, 24
lsrs r2, 24
mov r8, r2
lsls r0, 24
lsrs r0, 24
mov r9, r0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807613A
ldr r5, [r4, 0x70]
mov r0, r8
cmp r0, 0
beq _080760D0
adds r0, r6, 0
adds r1, r4, 0
mov r2, r9
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _0807613A
_080760D0:
ldr r0, _08076100
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
adds r1, r5, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x3
beq _08076110
movs r0, 0x3
strb r0, [r1]
adds r1, r7, 0x1
adds r0, r5, 0
adds r0, 0xBD
strb r1, [r0]
adds r0, r4, 0
bl nullsub_72
cmp r7, 0x1
bne _08076108
ldr r0, _08076104
b _08076116
.align 2, 0
_08076100: .4byte gUnknown_202DF98
_08076104: .4byte gUnknown_80FB480
_08076108:
ldr r0, _0807610C
b _08076116
.align 2, 0
_0807610C: .4byte gUnknown_80FB4D4
_08076110:
cmp r7, 0x1
bne _08076128
ldr r0, _08076124
_08076116:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076134
.align 2, 0
_08076124: .4byte gUnknown_80FB4B0
_08076128:
ldr r0, _08076148
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076134:
adds r0, r4, 0
bl sub_80418D4
_0807613A:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076148: .4byte gUnknown_80FB4F0
thumb_func_end sub_8076090
thumb_func_start sub_807614C
sub_807614C:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r7, r2, 24
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076206
ldr r5, [r4, 0x70]
adds r0, r6, 0
adds r1, r4, 0
adds r2, r7, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08076206
adds r0, r4, 0
movs r1, 0x29
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080761A8
ldr r0, _080761A0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
cmp r7, 0
beq _08076206
ldr r0, _080761A4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076206
.align 2, 0
_080761A0: .4byte gUnknown_202DF98
_080761A4: .4byte gUnknown_80FCC4C
_080761A8:
ldr r0, _080761E8
adds r1, r5, 0
movs r2, 0
bl sub_80708B4
adds r1, r5, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x7
beq _080761F4
movs r0, 0x7
strb r0, [r1]
ldr r1, _080761EC
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xBD
strb r0, [r1]
adds r0, r4, 0
bl sub_8041EF8
ldr r0, _080761F0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076200
.align 2, 0
_080761E8: .4byte gUnknown_202DF98
_080761EC: .4byte gUnknown_80F4F00
_080761F0: .4byte gUnknown_80FB50C
_080761F4:
ldr r0, _0807620C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076200:
adds r0, r4, 0
bl sub_80418D4
_08076206:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807620C: .4byte gUnknown_80FB52C
thumb_func_end sub_807614C
thumb_func_start sub_8076210
sub_8076210:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
adds r5, r1, 0
lsls r2, 24
lsrs r2, 24
mov r9, r2
lsls r3, 24
lsrs r3, 24
mov r10, r3
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08076238
b _080763DA
_08076238:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r10
bl sub_80716E8
lsls r0, 24
cmp r0, 0
beq _0807624A
b _080763DA
_0807624A:
ldr r0, [r5, 0x70]
mov r8, r0
ldr r0, _08076274
mov r1, r8
movs r2, 0
bl sub_80708B4
adds r0, r5, 0
movs r1, 0x42
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807627C
mov r1, r10
cmp r1, 0
bne _0807626E
b _080763DA
_0807626E:
ldr r0, _08076278
b _080762CC
.align 2, 0
_08076274: .4byte gUnknown_202DF98
_08076278: .4byte gUnknown_80FCE5C
_0807627C:
adds r0, r5, 0
movs r1, 0x2
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0807629C
mov r2, r10
cmp r2, 0
bne _08076292
b _080763DA
_08076292:
ldr r0, _08076298
b _080762CC
.align 2, 0
_08076298: .4byte gUnknown_80FCE84
_0807629C:
adds r0, r5, 0
bl sub_8045128
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
bne _080762E8
ldr r1, _080762D8
ldr r0, _080762DC
ldr r0, [r0]
ldr r3, _080762E0
adds r0, r3
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
beq _080762E8
mov r3, r10
cmp r3, 0
bne _080762CA
b _080763DA
_080762CA:
ldr r0, _080762E4
_080762CC:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080763DA
.align 2, 0
_080762D8: .4byte gUnknown_810ACC0
_080762DC: .4byte gUnknown_203B418
_080762E0: .4byte 0x00003a0e
_080762E4: .4byte gUnknown_80FEBBC
_080762E8:
movs r6, 0x1
mov r1, r8
adds r1, 0xAC
ldrb r0, [r1]
cmp r0, 0x1
beq _08076338
movs r4, 0
strb r6, [r1]
ldr r1, _08076330
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
mov r1, r8
adds r1, 0xAD
strb r0, [r1]
mov r0, r8
adds r0, 0xAE
strb r4, [r0]
adds r0, 0x1
strb r4, [r0]
movs r6, 0
mov r0, r9
cmp r0, 0
beq _08076322
adds r0, r5, 0
bl sub_8041C34
_08076322:
ldr r0, _08076334
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08076344
.align 2, 0
_08076330: .4byte gUnknown_80F4E30
_08076334: .4byte gUnknown_80FB548
_08076338:
ldr r0, _080763E8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08076344:
adds r0, r5, 0
bl sub_80418D4
adds r0, r5, 0
movs r1, 0x19
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080763DA
cmp r6, 0
bne _080763DA
movs r1, 0
mov r9, r1
movs r6, 0
_08076362:
movs r2, 0x4
ldrsh r0, [r5, r2]
ldr r1, _080763EC
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r4, [r0, 0x10]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080763D4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _080763D4
mov r0, r9
cmp r0, 0
bne _080763B8
movs r1, 0x1
mov r9, r1
ldr r0, _080763F0
mov r1, r8
movs r2, 0
bl sub_80708B4
ldr r0, _080763F4
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080763B8:
adds r0, r5, 0
adds r1, r4, 0
bl sub_807167C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080763D4
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0x1
mov r3, r10
bl sub_8076210
_080763D4:
adds r6, 0x1
cmp r6, 0x7
ble _08076362
_080763DA:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080763E8: .4byte gUnknown_80FB564
_080763EC: .4byte gUnknown_80F4448
_080763F0: .4byte gUnknown_202DF98
_080763F4: .4byte gUnknown_80FF01C
thumb_func_end sub_8076210
thumb_func_start sub_80763F8
sub_80763F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
adds r5, r1, 0
lsls r2, 24
lsrs r2, 24
mov r10, r2
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807641A
b _080765C0
_0807641A:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r10
bl sub_80716E8
lsls r0, 24
cmp r0, 0
beq _0807642C
b _080765C0
_0807642C:
ldr r0, [r5, 0x70]
mov r8, r0
ldr r0, _08076454
mov r1, r8
movs r2, 0
bl sub_80708B4
adds r0, r5, 0
movs r1, 0x14
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0807645C
mov r1, r10
cmp r1, 0
bne _08076450
b _080765C0
_08076450:
ldr r0, _08076458
b _080764A4
.align 2, 0
_08076454: .4byte gUnknown_202DF98
_08076458: .4byte gUnknown_80FD524
_0807645C:
adds r0, r5, 0
movs r1, 0x45
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807647C
mov r3, r10
cmp r3, 0
bne _08076472
b _080765C0
_08076472:
ldr r0, _08076478
b _080764A4
.align 2, 0
_08076478: .4byte gUnknown_80FCEB0
_0807647C:
adds r0, r5, 0
movs r1, 0x8
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _0807649A
adds r0, r5, 0
movs r1, 0x11
bl sub_8071858
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _080764B4
_0807649A:
mov r0, r10
cmp r0, 0
bne _080764A2
b _080765C0
_080764A2:
ldr r0, _080764B0
_080764A4:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080765C0
.align 2, 0
_080764B0: .4byte gUnknown_80FCEDC
_080764B4:
movs r6, 0x1
mov r1, r8
adds r1, 0xAC
ldrb r0, [r1]
cmp r0, 0x3
beq _08076520
cmp r0, 0x2
beq _0807650C
movs r0, 0x2
strb r0, [r1]
ldr r1, _08076504
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
mov r1, r8
adds r1, 0xAD
strb r0, [r1]
mov r0, r8
adds r0, 0xAE
strb r4, [r0]
adds r0, 0x1
strb r4, [r0]
movs r6, 0
adds r0, r5, 0
bl sub_8041C6C
ldr r0, _08076508
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE94
b _0807652C
.align 2, 0
_08076504: .4byte gUnknown_80F4E34
_08076508: .4byte gUnknown_80FB598
_0807650C:
ldr r0, _0807651C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _0807652C
.align 2, 0
_0807651C: .4byte gUnknown_80FB5D4
_08076520:
ldr r0, _080765D0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_0807652C:
adds r0, r5, 0
movs r1, 0x19
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080765BA
cmp r6, 0
bne _080765BA
movs r1, 0
mov r9, r1
movs r6, 0
_08076544:
movs r3, 0x4
ldrsh r0, [r5, r3]
ldr r1, _080765D4
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r4, [r0, 0x10]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080765B4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _080765B4
mov r0, r9
cmp r0, 0
bne _0807659A
movs r1, 0x1
mov r9, r1
ldr r0, _080765D8
mov r1, r8
movs r2, 0
bl sub_80708B4
ldr r0, _080765DC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_0807659A:
adds r0, r5, 0
adds r1, r4, 0
bl sub_807167C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080765B4
adds r0, r7, 0
adds r1, r4, 0
mov r2, r10
bl sub_80763F8
_080765B4:
adds r6, 0x1
cmp r6, 0x7
ble _08076544
_080765BA:
adds r0, r5, 0
bl sub_80418D4
_080765C0:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080765D0: .4byte gUnknown_80FB5F8
_080765D4: .4byte gUnknown_80F4448
_080765D8: .4byte gUnknown_202DF98
_080765DC: .4byte gUnknown_80FF01C
thumb_func_end sub_80763F8
thumb_func_start sub_80765E0
sub_80765E0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
adds r5, r1, 0
lsls r2, 24
lsrs r2, 24
mov r10, r2
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08076602
b _08076790
_08076602:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r10
bl sub_80716E8
lsls r0, 24
cmp r0, 0
beq _08076614
b _08076790
_08076614:
ldr r0, [r5, 0x70]
mov r8, r0
ldr r0, _0807663C
mov r1, r8
movs r2, 0
bl sub_80708B4
adds r0, r5, 0
movs r1, 0x14
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08076644
mov r1, r10
cmp r1, 0
bne _08076638
b _08076790
_08076638:
ldr r0, _08076640
b _0807668C
.align 2, 0
_0807663C: .4byte gUnknown_202DF98
_08076640: .4byte gUnknown_80FD524
_08076644:
adds r0, r5, 0
movs r1, 0x45
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08076664
mov r3, r10
cmp r3, 0
bne _0807665A
b _08076790
_0807665A:
ldr r0, _08076660
b _0807668C
.align 2, 0
_08076660: .4byte gUnknown_80FCEB0
_08076664:
adds r0, r5, 0
movs r1, 0x8
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _08076682
adds r0, r5, 0
movs r1, 0x11
bl sub_8071858
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _0807669C
_08076682:
mov r0, r10
cmp r0, 0
bne _0807668A
b _08076790
_0807668A:
ldr r0, _08076698
_0807668C:
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _08076790
.align 2, 0
_08076698: .4byte gUnknown_80FCEDC
_0807669C:
movs r6, 0x1
mov r1, r8
adds r1, 0xAC
ldrb r0, [r1]
cmp r0, 0x3
beq _080766F0
movs r0, 0x3
strb r0, [r1]
ldr r1, _080766E8
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
mov r1, r8
adds r1, 0xAD
strb r0, [r1]
mov r0, r8
adds r0, 0xAE
strb r4, [r0]
adds r0, 0x1
strb r4, [r0]
movs r6, 0
adds r0, r5, 0
bl sub_8041C7C
ldr r0, _080766EC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE94
b _080766FC
.align 2, 0
_080766E8: .4byte gUnknown_80F4E38
_080766EC: .4byte gUnknown_80FB5B4
_080766F0:
ldr r0, _080767A0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080766FC:
adds r0, r5, 0
movs r1, 0x19
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807678A
cmp r6, 0
bne _0807678A
movs r1, 0
mov r9, r1
movs r6, 0
_08076714:
movs r3, 0x4
ldrsh r0, [r5, r3]
ldr r1, _080767A4
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r4, [r0, 0x10]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076784
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _08076784
mov r0, r9
cmp r0, 0
bne _0807676A
movs r1, 0x1
mov r9, r1
ldr r0, _080767A8
mov r1, r8
movs r2, 0
bl sub_80708B4
ldr r0, _080767AC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_0807676A:
adds r0, r5, 0
adds r1, r4, 0
bl sub_807167C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08076784
adds r0, r7, 0
adds r1, r4, 0
mov r2, r10
bl sub_80765E0
_08076784:
adds r6, 0x1
cmp r6, 0x7
ble _08076714
_0807678A:
adds r0, r5, 0
bl sub_80418D4
_08076790:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080767A0: .4byte gUnknown_80FB5F8
_080767A4: .4byte gUnknown_80F4448
_080767A8: .4byte gUnknown_202DF98
_080767AC: .4byte gUnknown_80FF01C
thumb_func_end sub_80765E0
thumb_func_start sub_80767B0
sub_80767B0:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r5, r1, 0
lsls r2, 24
lsrs r4, r2, 24
adds r6, r4, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080767CE
b _080768C8
_080767CE:
ldr r0, _0807680C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r7, [r5, 0x70]
adds r0, r7, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
beq _080768C8
mov r0, r8
adds r1, r5, 0
adds r2, r4, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080768C8
adds r0, r5, 0
movs r1, 0x41
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08076814
cmp r4, 0
beq _080768C8
ldr r0, _08076810
b _0807685C
.align 2, 0
_0807680C: .4byte gUnknown_202DF98
_08076810: .4byte gUnknown_80FCDE0
_08076814:
adds r0, r5, 0
movs r1, 0x6
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _08076830
cmp r4, 0
beq _080768C8
ldr r0, _0807682C
b _0807685C
.align 2, 0
_0807682C: .4byte gUnknown_80FCE00
_08076830:
adds r0, r5, 0
bl sub_8045128
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
bne _08076878
ldr r1, _08076868
ldr r0, _0807686C
ldr r0, [r0]
ldr r2, _08076870
adds r0, r2
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x1
bne _08076878
cmp r6, 0
beq _080768C8
ldr r0, _08076874
_0807685C:
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _080768C8
.align 2, 0
_08076868: .4byte gUnknown_810ACC0
_0807686C: .4byte gUnknown_203B418
_08076870: .4byte 0x00003a0e
_08076874: .4byte gUnknown_80FCE34
_08076878:
adds r6, r7, 0
adds r6, 0xB0
ldrb r0, [r6]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08076892
adds r0, r7, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_08076892:
adds r0, r5, 0
bl sub_8041F08
movs r4, 0
movs r0, 0x1
strb r0, [r6]
ldr r1, _080768D4
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xB8
strb r0, [r1]
adds r0, r7, 0
adds r0, 0xB9
strb r4, [r0]
ldr r0, _080768D8
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_80418D4
_080768C8:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080768D4: .4byte gUnknown_80F4E2C
_080768D8: .4byte gUnknown_80FB610
thumb_func_end sub_80767B0
thumb_func_start sub_80768DC
sub_80768DC:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
adds r5, r1, 0
lsls r2, 16
asrs r2, 16
mov r8, r2
lsls r3, 24
lsrs r4, r3, 24
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080769BE
adds r0, r7, 0
adds r1, r5, 0
adds r2, r4, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080769BE
ldr r6, [r5, 0x70]
adds r0, r6, 0
adds r0, 0xB0
ldrb r1, [r0]
subs r0, r1, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0807692A
adds r0, r6, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
b _08076948
_0807692A:
lsls r0, r1, 24
lsrs r0, 24
cmp r0, 0x5
bne _08076948
ldr r0, _0807699C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _080769A0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08076948:
ldr r0, _0807699C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xB0
ldrb r0, [r1]
cmp r0, 0x7
beq _080769AC
movs r4, 0
movs r0, 0x7
strb r0, [r1]
ldr r1, _080769A4
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xB8
strb r0, [r1]
adds r0, r6, 0
adds r0, 0xB9
strb r4, [r0]
subs r0, 0x5
mov r1, r8
str r1, [r0]
adds r0, r5, 0
bl nullsub_71
ldr r0, _080769A8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE94
b _080769B8
.align 2, 0
_0807699C: .4byte gUnknown_202DF98
_080769A0: .4byte gUnknown_80FA844
_080769A4: .4byte gUnknown_80F4E58
_080769A8: .4byte gUnknown_80FB628
_080769AC:
ldr r0, _080769C8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080769B8:
adds r0, r5, 0
bl sub_80418D4
_080769BE:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080769C8: .4byte gUnknown_80FB64C
thumb_func_end sub_80768DC
thumb_func_start sub_80769CC
sub_80769CC:
push {r4-r7,lr}
adds r7, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076A9A
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08076A9A
ldr r6, [r5, 0x70]
adds r0, r6, 0
adds r0, 0xB0
ldrb r1, [r0]
subs r0, r1, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08076A0C
adds r0, r6, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
b _08076A2A
_08076A0C:
lsls r0, r1, 24
lsrs r0, 24
cmp r0, 0x5
bne _08076A2A
ldr r0, _08076A78
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076A7C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08076A2A:
ldr r0, _08076A78
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xB0
ldrb r0, [r1]
cmp r0, 0x2
beq _08076A88
movs r4, 0
movs r0, 0x2
strb r0, [r1]
ldr r1, _08076A80
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xB8
strb r0, [r1]
adds r0, r6, 0
adds r0, 0xB9
strb r4, [r0]
adds r0, r5, 0
bl nullsub_70
ldr r0, _08076A84
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE94
b _08076A94
.align 2, 0
_08076A78: .4byte gUnknown_202DF98
_08076A7C: .4byte gUnknown_80FA844
_08076A80: .4byte gUnknown_80F4E54
_08076A84: .4byte gUnknown_80FB668
_08076A88:
ldr r0, _08076AA0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_08076A94:
adds r0, r5, 0
bl sub_80418D4
_08076A9A:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076AA0: .4byte gUnknown_80FB688
thumb_func_end sub_80769CC
thumb_func_start sub_8076AA4
sub_8076AA4:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076B3A
ldr r1, [r5, 0x70]
adds r7, r1, 0
adds r6, r1, 0
adds r6, 0xB0
ldrb r0, [r6]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08076AD8
adds r0, r1, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_08076AD8:
ldr r0, _08076B1C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r6]
cmp r0, 0x5
beq _08076B28
movs r4, 0
movs r0, 0x5
strb r0, [r6]
ldr r1, _08076B20
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xB8
strb r0, [r1]
adds r0, r7, 0
adds r0, 0xB9
strb r4, [r0]
adds r0, r5, 0
bl nullsub_90
ldr r0, _08076B24
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _08076B34
.align 2, 0
_08076B1C: .4byte gUnknown_202DF98
_08076B20: .4byte gUnknown_80F4E60
_08076B24: .4byte gUnknown_80FB6A4
_08076B28:
ldr r0, _08076B44
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
_08076B34:
adds r0, r5, 0
bl sub_80418D4
_08076B3A:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076B44: .4byte gUnknown_80FB6C0
thumb_func_end sub_8076AA4
thumb_func_start sub_8076B48
sub_8076B48:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08076B60
b _08076C9E
_08076B60:
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
lsrs r7, r0, 24
cmp r7, 0
beq _08076B74
b _08076C9E
_08076B74:
ldr r5, [r6, 0x70]
ldr r0, [r4, 0x70]
mov r8, r0
adds r1, r5, 0
adds r1, 0xB0
ldrb r0, [r1]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bls _08076C20
mov r2, r8
adds r2, 0xB0
ldrb r0, [r2]
cmp r0, 0x3
beq _08076C20
cmp r0, 0x4
beq _08076C20
movs r0, 0x3
strb r0, [r1]
adds r1, 0x8
movs r0, 0x7F
strb r0, [r1]
adds r0, r5, 0
adds r0, 0xB9
strb r7, [r0]
movs r0, 0x4
strb r0, [r2]
ldr r1, _08076C0C
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
mov r1, r8
adds r1, 0xB8
strb r0, [r1]
mov r0, r8
adds r0, 0xB9
strb r7, [r0]
adds r2, r5, 0
adds r2, 0x9C
ldr r0, _08076C10
ldr r1, [r0]
ldr r0, _08076C14
adds r1, r0
ldr r0, [r1]
str r0, [r2]
mov r2, r8
adds r2, 0x9C
ldr r0, [r1]
str r0, [r2]
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
adds r0, r6, 0
adds r1, r4, 0
bl nullsub_69
ldr r0, _08076C18
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076C1C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
adds r0, r4, 0
movs r1, 0x8
bl sub_806CE94
b _08076C98
.align 2, 0
_08076C0C: .4byte gUnknown_80F4E5C
_08076C10: .4byte gUnknown_203B418
_08076C14: .4byte 0x000037f4
_08076C18: .4byte gUnknown_202DF98
_08076C1C: .4byte gUnknown_80FB6D8
_08076C20:
adds r7, r5, 0
adds r7, 0xB0
ldrb r0, [r7]
cmp r0, 0x3
bne _08076C40
ldr r0, _08076CA8
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076CAC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076C40:
mov r5, r8
adds r5, 0xB0
ldrb r0, [r5]
cmp r0, 0x3
bne _08076C60
ldr r0, _08076CA8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076CAC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076C60:
ldrb r0, [r7]
cmp r0, 0x4
bne _08076C7C
ldr r0, _08076CA8
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076CB0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076C7C:
ldrb r0, [r5]
cmp r0, 0x4
bne _08076C98
ldr r0, _08076CA8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076CB0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076C98:
adds r0, r4, 0
bl sub_80418D4
_08076C9E:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076CA8: .4byte gUnknown_202DF98
_08076CAC: .4byte gUnknown_80FB6FC
_08076CB0: .4byte gUnknown_80FB718
thumb_func_end sub_8076B48
thumb_func_start sub_8076CB4
sub_8076CB4:
push {r4-r7,lr}
adds r7, r0, 0
movs r5, 0
movs r6, 0
_08076CBC:
ldr r0, _08076D08
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08076D0C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076CFA
ldr r1, [r4, 0x70]
adds r2, r1, 0
adds r2, 0x9C
ldr r0, [r2]
cmp r0, r7
bne _08076CF4
adds r1, 0xB0
ldrb r0, [r1]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08076CF2
strb r6, [r1]
_08076CF2:
str r6, [r2]
_08076CF4:
adds r0, r4, 0
bl sub_80418D4
_08076CFA:
adds r5, 0x1
cmp r5, 0x13
ble _08076CBC
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076D08: .4byte gUnknown_203B418
_08076D0C: .4byte 0x000135cc
thumb_func_end sub_8076CB4
thumb_func_start sub_8076D10
sub_8076D10:
push {r4-r7,lr}
adds r7, r0, 0
adds r6, r1, 0
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076E0E
adds r0, r7, 0
adds r1, r6, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08076E0E
adds r0, r6, 0
bl sub_8041C08
ldr r4, [r6, 0x70]
adds r5, r4, 0
adds r5, 0xB0
ldrb r0, [r5]
subs r0, 0x3
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08076D54
adds r0, r4, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
_08076D54:
ldr r0, _08076D74
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r5]
cmp r0, 0x6
beq _08076DAC
movs r0, 0x6
strb r0, [r5]
ldrb r0, [r4, 0x7]
cmp r0, 0
beq _08076D7C
ldr r1, _08076D78
b _08076D7E
.align 2, 0
_08076D74: .4byte gUnknown_202DF98
_08076D78: .4byte gUnknown_80F4EBC
_08076D7C:
ldr r1, _08076DA4
_08076D7E:
adds r0, r6, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r4, 0
adds r1, 0xB8
strb r0, [r1]
adds r1, r4, 0
adds r1, 0xB9
movs r0, 0
strb r0, [r1]
ldr r0, _08076DA8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r6, 0
bl sub_80522F4
b _08076DB8
.align 2, 0
_08076DA4: .4byte gUnknown_80F4EC0
_08076DA8: .4byte gUnknown_80FB7BC
_08076DAC:
ldr r0, _08076E14
ldr r2, [r0]
adds r0, r7, 0
adds r1, r6, 0
bl sub_80522F4
_08076DB8:
ldrb r0, [r4, 0x6]
cmp r0, 0
beq _08076E08
movs r5, 0
movs r7, 0
_08076DC2:
ldr r0, _08076E18
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08076E1C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08076E02
ldr r1, [r4, 0x70]
adds r3, r1, 0
adds r3, 0x78
ldrb r0, [r3]
cmp r0, 0x1
bne _08076E02
adds r2, r1, 0
adds r2, 0x80
ldr r0, [r2]
cmp r0, r6
bne _08076E02
movs r0, 0x6
strb r0, [r3]
str r7, [r2]
adds r0, r1, 0
adds r0, 0x7C
strh r7, [r0]
subs r0, 0x2
strb r7, [r0]
_08076E02:
adds r5, 0x1
cmp r5, 0x3
ble _08076DC2
_08076E08:
adds r0, r6, 0
bl sub_80418D4
_08076E0E:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076E14: .4byte gUnknown_80FB7DC
_08076E18: .4byte gUnknown_203B418
_08076E1C: .4byte 0x0001357c
thumb_func_end sub_8076D10
thumb_func_start sub_8076E20
sub_8076E20:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
mov r9, r3
ldr r0, [sp, 0x1C]
ldr r1, [sp, 0x20]
lsls r0, 24
lsrs r7, r0, 24
lsls r1, 24
lsrs r1, 24
mov r8, r1
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08076E4C
b _08076F6E
_08076E4C:
cmp r5, 0
beq _08076E64
ldr r0, _08076E5C
ldr r1, _08076E60
ldr r1, [r1]
bl strcpy
b _08076E6E
.align 2, 0
_08076E5C: .4byte gUnknown_202DE58
_08076E60: .4byte gUnknown_80FC0C8
_08076E64:
ldr r0, _08076EA0
ldr r1, _08076EA4
ldr r1, [r1]
bl strcpy
_08076E6E:
cmp r7, 0
beq _08076EE4
adds r0, r6, 0
adds r1, r4, 0
mov r2, r8
bl sub_8071728
lsls r0, 24
cmp r0, 0
bne _08076F6E
adds r0, r4, 0
movs r1, 0xB
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08076EB0
ldr r0, _08076EA8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076EAC
b _08076ECE
.align 2, 0
_08076EA0: .4byte gUnknown_202DE58
_08076EA4: .4byte gUnknown_80FC0B8
_08076EA8: .4byte gUnknown_202DF98
_08076EAC: .4byte gUnknown_80FD550
_08076EB0:
adds r0, r4, 0
movs r1, 0x9
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08076EE4
cmp r5, 0
bne _08076EE4
ldr r0, _08076EDC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08076EE0
_08076ECE:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076F6E
.align 2, 0
_08076EDC: .4byte gUnknown_202DF98
_08076EE0: .4byte gUnknown_80FCA60
_08076EE4:
ldr r7, [r4, 0x70]
ldr r0, _08076F0C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r1, r5, 0
bl sub_8041F28
mov r0, r9
cmp r0, 0x1
bne _08076F18
ldr r0, _08076F10
ldr r1, _08076F14
ldr r1, [r1]
bl strcpy
b _08076F22
.align 2, 0
_08076F0C: .4byte gUnknown_202DF98
_08076F10: .4byte gUnknown_202DEA8
_08076F14: .4byte gUnknown_80FC0E4
_08076F18:
ldr r0, _08076F50
ldr r1, _08076F54
ldr r1, [r1]
bl strcpy
_08076F22:
lsls r1, r5, 1
adds r0, r7, 0
adds r0, 0x1C
adds r1, r0, r1
movs r2, 0
ldrsh r3, [r1, r2]
mov r0, r9
subs r3, r0
cmp r3, 0
bge _08076F38
movs r3, 0
_08076F38:
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, r3
beq _08076F5C
strh r3, [r1]
ldr r0, _08076F58
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08076F68
.align 2, 0
_08076F50: .4byte gUnknown_202DEA8
_08076F54: .4byte gUnknown_80FC0D4
_08076F58: .4byte gUnknown_80FC15C
_08076F5C:
ldr r0, _08076F7C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08076F68:
adds r0, r4, 0
bl sub_80418D4
_08076F6E:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08076F7C: .4byte gUnknown_80FC274
thumb_func_end sub_8076E20
thumb_func_start sub_8076F80
sub_8076F80:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
mov r9, r3
ldr r0, [sp, 0x1C]
ldr r1, [sp, 0x20]
lsls r0, 24
lsrs r7, r0, 24
lsls r1, 24
lsrs r1, 24
mov r8, r1
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077072
cmp r5, 0
beq _08076FC4
ldr r0, _08076FBC
ldr r1, _08076FC0
ldr r1, [r1]
bl strcpy
b _08076FCE
.align 2, 0
_08076FBC: .4byte gUnknown_202DE58
_08076FC0: .4byte gUnknown_80FC0AC
_08076FC4:
ldr r0, _08077008
ldr r1, _0807700C
ldr r1, [r1]
bl strcpy
_08076FCE:
cmp r7, 0
beq _08076FE2
adds r0, r6, 0
adds r1, r4, 0
mov r2, r8
bl sub_8071728
lsls r0, 24
cmp r0, 0
bne _08077072
_08076FE2:
ldr r7, [r4, 0x70]
ldr r0, _08077010
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r1, r5, 0
bl sub_8041F4C
mov r0, r9
cmp r0, 0x1
bne _0807701C
ldr r0, _08077014
ldr r1, _08077018
ldr r1, [r1]
bl strcpy
b _08077026
.align 2, 0
_08077008: .4byte gUnknown_202DE58
_0807700C: .4byte gUnknown_80FC09C
_08077010: .4byte gUnknown_202DF98
_08077014: .4byte gUnknown_202DEA8
_08077018: .4byte gUnknown_80FC0E4
_0807701C:
ldr r0, _08077054
ldr r1, _08077058
ldr r1, [r1]
bl strcpy
_08077026:
lsls r1, r5, 1
adds r0, r7, 0
adds r0, 0x20
adds r1, r0, r1
movs r2, 0
ldrsh r3, [r1, r2]
mov r0, r9
subs r3, r0
cmp r3, 0
bge _0807703C
movs r3, 0
_0807703C:
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, r3
beq _08077060
strh r3, [r1]
ldr r0, _0807705C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _0807706C
.align 2, 0
_08077054: .4byte gUnknown_202DEA8
_08077058: .4byte gUnknown_80FC0D4
_0807705C: .4byte gUnknown_80FC158
_08077060:
ldr r0, _08077080
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_0807706C:
adds r0, r4, 0
bl sub_80418D4
_08077072:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077080: .4byte gUnknown_80FC248
thumb_func_end sub_8076F80
thumb_func_start sub_8077084
sub_8077084:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r4, r1, 0
adds r5, r2, 0
adds r6, r3, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077152
ldr r7, [r4, 0x70]
ldr r0, _080770C4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r1, r5, 0
bl sub_8041F70
cmp r5, 0
beq _080770D0
ldr r0, _080770C8
ldr r1, _080770CC
ldr r1, [r1]
bl strcpy
b _080770DA
.align 2, 0
_080770C4: .4byte gUnknown_202DF98
_080770C8: .4byte gUnknown_202DE58
_080770CC: .4byte gUnknown_80FC0C8
_080770D0:
ldr r0, _080770EC
ldr r1, _080770F0
ldr r1, [r1]
bl strcpy
_080770DA:
cmp r6, 0x1
bne _080770FC
ldr r0, _080770F4
ldr r1, _080770F8
ldr r1, [r1]
bl strcpy
b _08077106
.align 2, 0
_080770EC: .4byte gUnknown_202DE58
_080770F0: .4byte gUnknown_80FC0B8
_080770F4: .4byte gUnknown_202DEA8
_080770F8: .4byte gUnknown_80FC0E4
_080770FC:
ldr r0, _08077134
ldr r1, _08077138
ldr r1, [r1]
bl strcpy
_08077106:
lsls r1, r5, 1
adds r0, r7, 0
adds r0, 0x1C
adds r1, r0, r1
movs r0, 0
ldrsh r3, [r1, r0]
adds r3, r6
cmp r3, 0x13
ble _0807711A
movs r3, 0x14
_0807711A:
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, r3
beq _08077140
strh r3, [r1]
ldr r0, _0807713C
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
b _0807714C
.align 2, 0
_08077134: .4byte gUnknown_202DEA8
_08077138: .4byte gUnknown_80FC0D4
_0807713C: .4byte gUnknown_80FC13C
_08077140:
ldr r0, _0807715C
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
_0807714C:
adds r0, r4, 0
bl sub_80418D4
_08077152:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807715C: .4byte gUnknown_80FC270
thumb_func_end sub_8077084
thumb_func_start sub_8077160
sub_8077160:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r4, r1, 0
adds r5, r2, 0
adds r6, r3, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807722E
ldr r7, [r4, 0x70]
ldr r0, _080771A0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r1, r5, 0
bl sub_8041F94
cmp r5, 0
beq _080771AC
ldr r0, _080771A4
ldr r1, _080771A8
ldr r1, [r1]
bl strcpy
b _080771B6
.align 2, 0
_080771A0: .4byte gUnknown_202DF98
_080771A4: .4byte gUnknown_202DE58
_080771A8: .4byte gUnknown_80FC0AC
_080771AC:
ldr r0, _080771C8
ldr r1, _080771CC
ldr r1, [r1]
bl strcpy
_080771B6:
cmp r6, 0x1
bne _080771D8
ldr r0, _080771D0
ldr r1, _080771D4
ldr r1, [r1]
bl strcpy
b _080771E2
.align 2, 0
_080771C8: .4byte gUnknown_202DE58
_080771CC: .4byte gUnknown_80FC09C
_080771D0: .4byte gUnknown_202DEA8
_080771D4: .4byte gUnknown_80FC0E4
_080771D8:
ldr r0, _08077210
ldr r1, _08077214
ldr r1, [r1]
bl strcpy
_080771E2:
lsls r1, r5, 1
adds r0, r7, 0
adds r0, 0x20
adds r1, r0, r1
movs r0, 0
ldrsh r3, [r1, r0]
adds r3, r6
cmp r3, 0x13
ble _080771F6
movs r3, 0x14
_080771F6:
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, r3
beq _0807721C
strh r3, [r1]
ldr r0, _08077218
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
b _08077228
.align 2, 0
_08077210: .4byte gUnknown_202DEA8
_08077214: .4byte gUnknown_80FC0D4
_08077218: .4byte gUnknown_80FC138
_0807721C:
ldr r0, _08077238
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
_08077228:
adds r0, r4, 0
bl sub_80418D4
_0807722E:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077238: .4byte gUnknown_80FC21C
thumb_func_end sub_8077160
thumb_func_start sub_807723C
sub_807723C:
push {r4,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077258
adds r0, r4, 0
movs r1, 0x48
bl sub_8071824
lsls r0, 24
cmp r0, 0
bne _0807725C
_08077258:
movs r0, 0
b _0807726C
_0807725C:
ldr r0, [r4, 0x70]
movs r1, 0x28
ldrsh r0, [r0, r1]
cmp r0, 0x1
bgt _0807726A
movs r0, 0x2
b _0807726C
_0807726A:
movs r0, 0x1
_0807726C:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_807723C
thumb_func_start sub_8077274
sub_8077274:
push {r4,r5,lr}
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080772B4
ldr r0, [r5, 0x70]
adds r4, r0, 0
ldr r0, _080772BC
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
movs r0, 0x28
ldrsh r1, [r4, r0]
adds r1, 0x1
cmp r1, 0x1
ble _0807729E
movs r1, 0x2
_0807729E:
movs r2, 0x28
ldrsh r0, [r4, r2]
cmp r0, r1
beq _080772AE
strh r1, [r4, 0x28]
adds r0, r5, 0
bl sub_8041C58
_080772AE:
adds r0, r5, 0
bl sub_80418D4
_080772B4:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080772BC: .4byte gUnknown_202DF98
thumb_func_end sub_8077274
thumb_func_start sub_80772C0
sub_80772C0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r9, r0
adds r5, r1, 0
adds r4, r2, 0
adds r7, r3, 0
ldr r0, [sp, 0x20]
lsls r0, 24
lsrs r6, r0, 24
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080772E6
b _08077422
_080772E6:
cmp r4, 0
beq _08077300
ldr r0, _080772F8
ldr r1, _080772FC
ldr r1, [r1]
bl strcpy
b _0807730A
.align 2, 0
_080772F8: .4byte gUnknown_202DE58
_080772FC: .4byte gUnknown_80FC0C8
_08077300:
ldr r0, _08077340
ldr r1, _08077344
ldr r1, [r1]
bl strcpy
_0807730A:
cmp r7, 0xFF
bgt _08077320
mov r0, r9
adds r1, r5, 0
adds r2, r6, 0
bl sub_8071728
lsls r0, 24
cmp r0, 0
beq _08077320
b _08077422
_08077320:
adds r0, r5, 0
movs r1, 0xB
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08077350
cmp r7, 0xFF
bgt _08077350
ldr r0, _08077348
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807734C
b _08077376
.align 2, 0
_08077340: .4byte gUnknown_202DE58
_08077344: .4byte gUnknown_80FC0B8
_08077348: .4byte gUnknown_202DF98
_0807734C: .4byte gUnknown_80FD550
_08077350:
adds r0, r5, 0
movs r1, 0x9
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807738C
cmp r4, 0
bne _0807738C
cmp r7, 0xFF
bgt _0807738C
cmp r6, 0
beq _08077422
ldr r0, _08077384
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08077388
_08077376:
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
b _08077422
.align 2, 0
_08077384: .4byte gUnknown_202DF98
_08077388: .4byte gUnknown_80FCA60
_0807738C:
ldr r0, [r5, 0x70]
mov r8, r0
ldr r0, _080773B8
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
lsls r1, r4, 2
mov r0, r8
adds r0, 0x2C
adds r0, r1
ldr r0, [r0]
mov r10, r0
adds r6, r1, 0
cmp r7, 0xFF
bgt _080773BC
adds r0, r5, 0
adds r1, r4, 0
bl sub_8041FD8
b _080773C4
.align 2, 0
_080773B8: .4byte gUnknown_202DF98
_080773BC:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8041FB4
_080773C4:
mov r0, r8
adds r0, 0x2C
adds r4, r0, r6
ldr r0, [r4]
adds r1, r7, 0
bl sub_8009DA4
str r0, [r4]
cmp r0, 0x1
bgt _080773DC
movs r0, 0x2
str r0, [r4]
_080773DC:
ldr r0, [r4]
ldr r1, _080773F0
cmp r0, r1
ble _080773E6
str r1, [r4]
_080773E6:
ldr r0, [r4]
cmp r10, r0
ble _080773F8
ldr r0, _080773F4
b _080773FE
.align 2, 0
_080773F0: .4byte 0x000063fd
_080773F4: .4byte gUnknown_80FC11C
_080773F8:
cmp r10, r0
bge _08077410
ldr r0, _0807740C
_080773FE:
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
b _0807741C
.align 2, 0
_0807740C: .4byte gUnknown_80FC118
_08077410:
ldr r0, _08077430
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
_0807741C:
adds r0, r5, 0
bl sub_80418D4
_08077422:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077430: .4byte gUnknown_80FC184
thumb_func_end sub_80772C0
thumb_func_start sub_8077434
sub_8077434:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r9, r0
adds r5, r1, 0
adds r4, r2, 0
mov r8, r3
ldr r0, [sp, 0x20]
lsls r0, 24
lsrs r6, r0, 24
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807752E
cmp r4, 0
beq _08077470
ldr r0, _08077468
ldr r1, _0807746C
ldr r1, [r1]
bl strcpy
b _0807747A
.align 2, 0
_08077468: .4byte gUnknown_202DE58
_0807746C: .4byte gUnknown_80FC0AC
_08077470:
ldr r0, _080774BC
ldr r1, _080774C0
ldr r1, [r1]
bl strcpy
_0807747A:
mov r0, r8
cmp r0, 0xFF
bgt _08077490
mov r0, r9
adds r1, r5, 0
adds r2, r6, 0
bl sub_8071728
lsls r0, 24
cmp r0, 0
bne _0807752E
_08077490:
ldr r7, [r5, 0x70]
ldr r0, _080774C4
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
lsls r1, r4, 2
adds r0, r7, 0
adds r0, 0x34
adds r0, r1
ldr r0, [r0]
mov r10, r0
adds r6, r1, 0
mov r0, r8
cmp r0, 0xFF
bgt _080774C8
adds r0, r5, 0
adds r1, r4, 0
bl sub_804201C
b _080774D0
.align 2, 0
_080774BC: .4byte gUnknown_202DE58
_080774C0: .4byte gUnknown_80FC09C
_080774C4: .4byte gUnknown_202DF98
_080774C8:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8041FFC
_080774D0:
adds r0, r7, 0
adds r0, 0x34
adds r4, r0, r6
ldr r0, [r4]
mov r1, r8
bl sub_8009DA4
str r0, [r4]
cmp r0, 0x1
bgt _080774E8
movs r0, 0x2
str r0, [r4]
_080774E8:
ldr r0, [r4]
ldr r1, _080774FC
cmp r0, r1
ble _080774F2
str r1, [r4]
_080774F2:
ldr r0, [r4]
cmp r10, r0
ble _08077504
ldr r0, _08077500
b _0807750A
.align 2, 0
_080774FC: .4byte 0x000063fd
_08077500: .4byte gUnknown_80FC114
_08077504:
cmp r10, r0
bge _0807751C
ldr r0, _08077518
_0807750A:
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
b _08077528
.align 2, 0
_08077518: .4byte gUnknown_80FC0FC
_0807751C:
ldr r0, _0807753C
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
_08077528:
adds r0, r5, 0
bl sub_80418D4
_0807752E:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807753C: .4byte gUnknown_80FC180
thumb_func_end sub_8077434
thumb_func_start sub_8077540
sub_8077540:
push {r4-r7,lr}
adds r7, r0, 0
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080775D2
ldr r6, [r4, 0x70]
ldr r0, _08077578
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
adds r1, r5, 0
bl sub_8042040
cmp r5, 0
beq _08077584
ldr r0, _0807757C
ldr r1, _08077580
ldr r1, [r1]
bl strcpy
b _0807758E
.align 2, 0
_08077578: .4byte gUnknown_202DF98
_0807757C: .4byte gUnknown_202DE58
_08077580: .4byte gUnknown_80FC090
_08077584:
ldr r0, _080775B4
ldr r1, _080775B8
ldr r1, [r1]
bl strcpy
_0807758E:
lsls r0, r5, 1
adds r1, r6, 0
adds r1, 0x24
adds r1, r0
ldrh r2, [r1]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0x13
bgt _080775C0
adds r0, r2, 0x1
strh r0, [r1]
ldr r0, _080775BC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r4, 0
bl sub_80522F4
b _080775CC
.align 2, 0
_080775B4: .4byte gUnknown_202DE58
_080775B8: .4byte gUnknown_80FC084
_080775BC: .4byte gUnknown_80FC1C4
_080775C0:
ldr r0, _080775D8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r4, 0
bl sub_80522F4
_080775CC:
adds r0, r4, 0
bl sub_80418D4
_080775D2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080775D8: .4byte gUnknown_80FC218
thumb_func_end sub_8077540
thumb_func_start sub_80775DC
sub_80775DC:
push {r4-r7,lr}
adds r7, r0, 0
adds r5, r1, 0
adds r6, r2, 0
lsls r3, 24
lsrs r4, r3, 24
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080776B6
cmp r6, 0
beq _0807760C
ldr r0, _08077604
ldr r1, _08077608
ldr r1, [r1]
bl strcpy
b _08077616
.align 2, 0
_08077604: .4byte gUnknown_202DE58
_08077608: .4byte gUnknown_80FC090
_0807760C:
ldr r0, _08077654
ldr r1, _08077658
ldr r1, [r1]
bl strcpy
_08077616:
adds r0, r7, 0
adds r1, r5, 0
adds r2, r4, 0
bl sub_8071728
lsls r0, 24
cmp r0, 0
bne _080776B6
adds r0, r5, 0
movs r1, 0x1E
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08077664
cmp r6, 0
bne _08077664
cmp r4, 0
beq _080776B6
ldr r0, _0807765C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08077660
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080776B6
.align 2, 0
_08077654: .4byte gUnknown_202DE58
_08077658: .4byte gUnknown_80FC084
_0807765C: .4byte gUnknown_202DF98
_08077660: .4byte gUnknown_80FCA64
_08077664:
ldr r4, [r5, 0x70]
ldr r0, _0807769C
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r1, r6, 0
bl sub_8042060
lsls r0, r6, 1
adds r4, 0x24
adds r1, r4, r0
ldrh r2, [r1]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0
beq _080776A4
subs r0, r2, 0x1
strh r0, [r1]
ldr r0, _080776A0
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080776B0
.align 2, 0
_0807769C: .4byte gUnknown_202DF98
_080776A0: .4byte gUnknown_80FC1A4
_080776A4:
ldr r0, _080776BC
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080776B0:
adds r0, r5, 0
bl sub_80418D4
_080776B6:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080776BC: .4byte gUnknown_80FC1F0
thumb_func_end sub_80775DC
thumb_func_start sub_80776C0
sub_80776C0:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r6, r2, 24
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077776
adds r0, r5, 0
adds r1, r4, 0
adds r2, r6, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08077776
adds r0, r4, 0
movs r1, 0x1F
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08077718
ldr r0, _08077710
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
cmp r6, 0
beq _08077776
ldr r0, _08077714
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08077776
.align 2, 0
_08077710: .4byte gUnknown_202DF98
_08077714: .4byte gUnknown_80FCC18
_08077718:
ldr r6, [r4, 0x70]
ldr r0, _08077758
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x1
beq _08077764
movs r0, 0x1
strb r0, [r1]
ldr r1, _0807775C
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xBD
strb r0, [r1]
adds r0, r4, 0
bl sub_80420A0
ldr r0, _08077760
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08077770
.align 2, 0
_08077758: .4byte gUnknown_202DF98
_0807775C: .4byte gUnknown_80F4E3C
_08077760: .4byte gUnknown_80FB2E0
_08077764:
ldr r0, _0807777C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08077770:
adds r0, r4, 0
bl sub_80418D4
_08077776:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807777C: .4byte gUnknown_80FB300
thumb_func_end sub_80776C0
thumb_func_start sub_8077780
sub_8077780:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
adds r5, r1, 0
lsls r2, 24
lsrs r2, 24
mov r10, r2
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080777A2
b _080778F0
_080777A2:
adds r0, r7, 0
adds r1, r5, 0
mov r2, r10
bl sub_80716E8
lsls r0, 24
cmp r0, 0
beq _080777B4
b _080778F0
_080777B4:
adds r0, r5, 0
movs r1, 0x16
bl sub_8071824
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
beq _080777EC
ldr r0, _080777E4
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
mov r0, r10
cmp r0, 0
bne _080777D6
b _080778F0
_080777D6:
ldr r0, _080777E8
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
b _080778F0
.align 2, 0
_080777E4: .4byte gUnknown_202DF98
_080777E8: .4byte gUnknown_80FCBF8
_080777EC:
movs r6, 0x1
ldr r1, [r5, 0x70]
mov r8, r1
ldr r0, _08077844
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
mov r1, r8
adds r1, 0xAC
ldrb r0, [r1]
cmp r0, 0x4
beq _08077850
movs r0, 0x4
strb r0, [r1]
ldr r1, _08077848
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
mov r1, r8
adds r1, 0xAD
strb r0, [r1]
mov r0, r8
adds r0, 0xAE
strb r4, [r0]
adds r0, 0x1
strb r4, [r0]
movs r6, 0
ldr r0, _0807784C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_8041C1C
adds r0, r5, 0
bl sub_8070774
b _0807785C
.align 2, 0
_08077844: .4byte gUnknown_202DF98
_08077848: .4byte gUnknown_80F4E50
_0807784C: .4byte gUnknown_80FB2AC
_08077850:
ldr r0, _08077900
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_0807785C:
adds r0, r5, 0
movs r1, 0x19
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080778EA
cmp r6, 0
bne _080778EA
movs r3, 0
mov r9, r3
movs r6, 0
_08077874:
movs r1, 0x4
ldrsh r0, [r5, r1]
ldr r1, _08077904
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r5, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r4, [r0, 0x10]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080778E4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _080778E4
mov r0, r9
cmp r0, 0
bne _080778CA
movs r1, 0x1
mov r9, r1
ldr r0, _08077908
mov r1, r8
movs r2, 0
bl sub_80708B4
ldr r0, _0807790C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r5, 0
bl sub_80522F4
_080778CA:
adds r0, r5, 0
adds r1, r4, 0
bl sub_807167C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _080778E4
adds r0, r7, 0
adds r1, r4, 0
mov r2, r10
bl sub_8077780
_080778E4:
adds r6, 0x1
cmp r6, 0x7
ble _08077874
_080778EA:
adds r0, r5, 0
bl sub_80418D4
_080778F0:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077900: .4byte gUnknown_80FB2CC
_08077904: .4byte gUnknown_80F4448
_08077908: .4byte gUnknown_202DF98
_0807790C: .4byte gUnknown_80FF01C
thumb_func_end sub_8077780
thumb_func_start sub_8077910
sub_8077910:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
mov r8, r0
adds r5, r1, 0
adds r4, r2, 0
lsls r3, 24
lsrs r3, 24
mov r9, r3
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080779DE
cmp r4, 0
bne _08077940
ldr r1, _08077964
adds r0, r5, 0
movs r2, 0
bl sub_808417C
adds r4, r0, 0x1
_08077940:
ldr r6, [r5, 0x70]
ldr r0, _08077968
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
bl sub_8070774
adds r7, r0, 0
cmp r7, 0x4
bne _08077970
mov r0, r9
cmp r0, 0
beq _080779D8
ldr r0, _0807796C
b _0807799E
.align 2, 0
_08077964: .4byte gUnknown_80F4E40
_08077968: .4byte gUnknown_202DF98
_0807796C: .4byte gUnknown_80FC2B8
_08077970:
movs r2, 0
movs r0, 0x84
lsls r0, 1
adds r1, r6, r0
b _08077988
_0807797A:
adds r2, 0x1
cmp r2, 0x4
bgt _08077990
movs r1, 0x84
lsls r1, 1
adds r0, r6, r1
adds r1, r0, r2
_08077988:
ldrb r0, [r1]
cmp r0, 0
bne _0807797A
strb r4, [r1]
_08077990:
adds r0, r5, 0
bl sub_8070774
adds r4, r0, 0
cmp r7, r4
bne _080779B0
ldr r0, _080779AC
_0807799E:
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _080779D8
.align 2, 0
_080779AC: .4byte gUnknown_80FC298
_080779B0:
adds r0, r5, 0
bl sub_8041CB8
ldr r1, _080779EC
lsls r0, r4, 2
adds r0, r1
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
adds r1, r6, 0
adds r1, 0xF8
movs r2, 0
movs r0, 0x1
strb r0, [r1]
movs r1, 0xA4
lsls r1, 1
adds r0, r6, r1
strb r2, [r0]
_080779D8:
adds r0, r5, 0
bl sub_80418D4
_080779DE:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080779EC: .4byte gUnknown_80FA124
thumb_func_end sub_8077910
thumb_func_start sub_80779F0
sub_80779F0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
mov r10, r0
adds r5, r1, 0
mov r8, r2
lsls r3, 24
lsrs r3, 24
mov r9, r3
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077AD0
mov r0, r10
adds r1, r5, 0
mov r2, r9
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08077AD0
ldr r7, [r5, 0x70]
ldr r0, _08077A48
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
bl sub_8070774
str r0, [sp]
cmp r0, 0
bne _08077A50
mov r0, r9
cmp r0, 0
beq _08077ACA
ldr r0, _08077A4C
b _08077AA2
.align 2, 0
_08077A48: .4byte gUnknown_202DF98
_08077A4C: .4byte gUnknown_80FC2D8
_08077A50:
movs r0, 0
cmp r0, r8
bge _08077A8C
_08077A56:
movs r1, 0
adds r6, r0, 0x1
_08077A5A:
ldr r2, _08077A78
adds r0, r7, r2
adds r4, r0, r1
ldrb r0, [r4]
cmp r0, 0
bne _08077A80
adds r0, r5, 0
ldr r1, _08077A7C
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
strb r0, [r4]
b _08077A86
.align 2, 0
_08077A78: .4byte 0x0000010d
_08077A7C: .4byte gUnknown_80F4E48
_08077A80:
adds r1, 0x1
cmp r1, 0x4
ble _08077A5A
_08077A86:
adds r0, r6, 0
cmp r0, r8
blt _08077A56
_08077A8C:
adds r0, r5, 0
bl sub_8070774
adds r4, r0, 0
ldr r0, [sp]
cmp r0, r4
bne _08077AB4
mov r2, r9
cmp r2, 0
beq _08077ACA
ldr r0, _08077AB0
_08077AA2:
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
b _08077ACA
.align 2, 0
_08077AB0: .4byte gUnknown_80FC298
_08077AB4:
adds r0, r5, 0
bl sub_8041CCC
ldr r0, _08077AE0
lsls r1, r4, 2
adds r1, r0
ldr r2, [r1]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
_08077ACA:
adds r0, r5, 0
bl sub_80418D4
_08077AD0:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077AE0: .4byte gUnknown_80FA124
thumb_func_end sub_80779F0
thumb_func_start sub_8077AE4
sub_8077AE4:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r5, r2, 24
adds r7, r5, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077BAA
adds r0, r6, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08077BAA
ldr r0, _08077B2C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
movs r1, 0x12
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08077B34
cmp r5, 0
beq _08077BAA
ldr r0, _08077B30
b _08077B48
.align 2, 0
_08077B2C: .4byte gUnknown_202DF98
_08077B30: .4byte gUnknown_80FD500
_08077B34:
adds r0, r4, 0
movs r1, 0x40
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08077B58
cmp r7, 0
beq _08077BAA
ldr r0, _08077B54
_08077B48:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08077BAA
.align 2, 0
_08077B54: .4byte gUnknown_80FCDB4
_08077B58:
adds r0, r4, 0
bl sub_8041BE8
ldr r5, [r4, 0x70]
adds r1, r5, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x2
beq _08077B98
movs r0, 0x2
strb r0, [r1]
ldr r1, _08077B90
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xBD
strb r0, [r1]
ldr r0, _08077B94
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08077BA4
.align 2, 0
_08077B90: .4byte gUnknown_80F4E4C
_08077B94: .4byte gUnknown_80FB25C
_08077B98:
ldr r0, _08077BB0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08077BA4:
adds r0, r4, 0
bl sub_80418D4
_08077BAA:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077BB0: .4byte gUnknown_80FB27C
thumb_func_end sub_8077AE4
thumb_func_start sub_8077BB4
sub_8077BB4:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r5, r2, 24
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077C3A
adds r0, r6, 0
adds r1, r4, 0
adds r2, r5, 0
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08077C3A
ldr r5, [r4, 0x70]
ldr r0, _08077C1C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x4
beq _08077C28
movs r0, 0x4
strb r0, [r1]
ldr r1, _08077C20
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xBD
strb r0, [r1]
adds r0, r4, 0
bl sub_8041BF8
ldr r0, _08077C24
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08077C34
.align 2, 0
_08077C1C: .4byte gUnknown_202DF98
_08077C20: .4byte gUnknown_80F4ECC
_08077C24: .4byte gUnknown_80FB940
_08077C28:
ldr r0, _08077C40
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08077C34:
adds r0, r4, 0
bl sub_80418D4
_08077C3A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08077C40: .4byte gUnknown_80FB960
thumb_func_end sub_8077BB4
thumb_func_start sub_8077C44
sub_8077C44:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
mov r9, r0
adds r5, r1, 0
mov r10, r2
mov r8, r3
ldr r0, [sp, 0x24]
lsls r0, 24
lsrs r0, 24
str r0, [sp]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08077C6E
b _08077DC8
_08077C6E:
ldr r4, [r5, 0x70]
movs r0, 0x10
ldrsh r7, [r4, r0]
movs r1, 0xE
ldrsh r6, [r4, r1]
ldrh r2, [r4, 0xE]
adds r0, r6, 0
ldrh r1, [r4, 0x10]
mov r12, r1
adds r1, r7, 0
cmp r0, r1
bne _08077C8C
mov r0, r8
cmp r0, 0
bgt _08077C92
_08077C8C:
mov r3, r10
cmp r3, 0
bne _08077CD0
_08077C92:
ldrh r1, [r4, 0x10]
add r1, r8
strh r1, [r4, 0x10]
ldrh r0, [r4, 0xE]
add r0, r8
strh r0, [r4, 0xE]
lsls r1, 16
asrs r1, 16
ldr r0, _08077CCC
cmp r1, r0
ble _08077CAA
strh r0, [r4, 0x10]
_08077CAA:
movs r1, 0xE
ldrsh r0, [r4, r1]
movs r3, 0x10
ldrsh r2, [r4, r3]
ldrh r1, [r4, 0x10]
cmp r0, r2
ble _08077CBA
strh r1, [r4, 0xE]
_08077CBA:
movs r1, 0xE
ldrsh r0, [r4, r1]
cmp r0, r2
bne _08077CC4
adds r6, r0, 0
_08077CC4:
adds r0, r5, 0
bl sub_8041C94
b _08077CE8
.align 2, 0
_08077CCC: .4byte 0x000003e7
_08077CD0:
mov r3, r10
adds r0, r2, r3
strh r0, [r4, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, r1
ble _08077CE2
mov r0, r12
strh r0, [r4, 0xE]
_08077CE2:
adds r0, r5, 0
bl sub_8041CA8
_08077CE8:
movs r1, 0x10
ldrsh r0, [r4, r1]
subs r7, r0, r7
movs r2, 0xE
ldrsh r0, [r4, r2]
subs r6, r0, r6
adds r0, r5, 0
bl sub_80418D4
ldr r0, _08077D1C
str r6, [r0]
str r7, [r0, 0x4]
ldr r0, _08077D20
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
cmp r6, 0
bne _08077D28
cmp r7, 0
bne _08077D28
ldr r3, [sp]
cmp r3, 0
beq _08077DC8
ldr r0, _08077D24
b _08077D3A
.align 2, 0
_08077D1C: .4byte gUnknown_202DE30
_08077D20: .4byte gUnknown_202DF98
_08077D24: .4byte gUnknown_80FB204
_08077D28:
mov r0, r8
cmp r0, 0
bne _08077D4C
cmp r6, 0
bne _08077D4C
ldr r1, [sp]
cmp r1, 0
beq _08077DC8
ldr r0, _08077D48
_08077D3A:
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
b _08077DC8
.align 2, 0
_08077D48: .4byte gUnknown_80FB21C
_08077D4C:
movs r2, 0
mov r8, r2
cmp r7, 0
beq _08077D6E
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08077D62
mov r8, r7
_08077D62:
ldr r0, _08077DA0
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
_08077D6E:
cmp r6, 0
beq _08077DB4
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _08077D80
mov r8, r6
_08077D80:
mov r3, r10
cmp r3, 0
beq _08077DB4
movs r0, 0x10
ldrsh r1, [r4, r0]
movs r2, 0xE
ldrsh r0, [r4, r2]
cmp r1, r0
bne _08077DA8
ldr r0, _08077DA4
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
b _08077DB4
.align 2, 0
_08077DA0: .4byte gUnknown_80FB240
_08077DA4: .4byte gUnknown_80FB1E0
_08077DA8:
ldr r0, _08077DD8
ldr r2, [r0]
mov r0, r9
adds r1, r5, 0
bl sub_80522F4
_08077DB4:
mov r3, r8
cmp r3, 0
beq _08077DC8
movs r3, 0x1
negs r3, r3
mov r0, r8
adds r1, r5, 0
movs r2, 0x1
bl sub_803ED30
_08077DC8:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08077DD8: .4byte gUnknown_80FB1C4
thumb_func_end sub_8077C44
thumb_func_start sub_8077DDC
sub_8077DDC:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077E3C
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xF1
ldrb r0, [r1]
cmp r0, 0
beq _08077E0C
ldr r0, _08077E08
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08077E3C
.align 2, 0
_08077E08: .4byte gUnknown_80FAEF0
_08077E0C:
movs r0, 0x1
strb r0, [r1]
adds r0, r4, 0
bl nullsub_75
ldr r0, _08077E44
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08077E48
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0
bl sub_803F580
bl sub_8040A84
adds r0, r4, 0
bl sub_80418D4
_08077E3C:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08077E44: .4byte gUnknown_202DF98
_08077E48: .4byte gUnknown_80FAEA0
thumb_func_end sub_8077DDC
thumb_func_start sub_8077E4C
sub_8077E4C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077EC0
bl sub_8043D10
lsls r0, 24
cmp r0, 0
beq _08077E70
ldr r0, _08077E6C
b _08077E7E
.align 2, 0
_08077E6C: .4byte gUnknown_80FAF3C
_08077E70:
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xF2
ldrb r0, [r1]
cmp r0, 0
beq _08077E90
ldr r0, _08077E8C
_08077E7E:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08077EC0
.align 2, 0
_08077E8C: .4byte gUnknown_80FAF1C
_08077E90:
movs r0, 0x1
strb r0, [r1]
adds r0, r4, 0
bl nullsub_76
ldr r0, _08077EC8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08077ECC
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0
bl sub_803F580
bl sub_8040A84
adds r0, r4, 0
bl sub_80418D4
_08077EC0:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08077EC8: .4byte gUnknown_202DF98
_08077ECC: .4byte gUnknown_80FAEC8
thumb_func_end sub_8077E4C
thumb_func_start sub_8077ED0
sub_8077ED0:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08077F30
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xF0
ldrb r0, [r1]
cmp r0, 0
beq _08077F00
ldr r0, _08077EFC
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08077F30
.align 2, 0
_08077EFC: .4byte gUnknown_80FAFD0
_08077F00:
movs r0, 0x1
strb r0, [r1]
adds r0, r4, 0
bl nullsub_77
ldr r0, _08077F38
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08077F3C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0
bl sub_803F580
bl sub_8040A84
adds r0, r4, 0
bl sub_80418D4
_08077F30:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08077F38: .4byte gUnknown_202DF98
_08077F3C: .4byte gUnknown_80FAFAC
thumb_func_end sub_8077ED0
thumb_func_start sub_8077F40
sub_8077F40:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r5, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r6, r2, 24
mov r9, r6
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08077F62
b _08078068
_08077F62:
adds r0, r5, 0
bl sub_80450F8
mov r10, r0
cmp r0, 0x1
beq _08077F70
b _08078068
_08077F70:
ldr r7, [r4, 0x70]
cmp r5, r4
bne _08077F88
cmp r6, 0
beq _08078068
ldr r0, _08077F84
ldr r2, [r0]
adds r0, r4, 0
b _08078022
.align 2, 0
_08077F84: .4byte gPtrCantLeechSeedSelfMessage
_08077F88:
adds r0, r5, 0
adds r1, r4, 0
mov r2, r9
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08078068
ldr r0, _08077FC0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
movs r1, 0x4
bl sub_8071858
lsls r0, 24
lsrs r0, 24
mov r8, r0
cmp r0, 0
beq _08077FC8
mov r0, r9
cmp r0, 0
beq _08078068
ldr r0, _08077FC4
b _0807801E
.align 2, 0
_08077FC0: .4byte gUnknown_202DF98
_08077FC4: .4byte gPtrCantLeechSeedMonMessage
_08077FC8:
adds r6, r7, 0
adds r6, 0xD0
ldrb r0, [r6]
cmp r0, 0x1
beq _0807801C
cmp r0, 0x2
bne _08077FE2
ldr r0, _08078014
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08077FE2:
mov r1, r10
strb r1, [r6]
ldr r1, _08078018
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xD9
strb r0, [r1]
adds r0, r7, 0
adds r0, 0xDA
mov r6, r8
strb r6, [r0]
adds r0, r4, 0
bl nullsub_78
adds r1, r7, 0
adds r1, 0xD8
movs r0, 0xFF
strb r0, [r1]
movs r2, 0
adds r3, r1, 0
b _08078030
.align 2, 0
_08078014: .4byte gUnknown_80FAA8C
_08078018: .4byte gUnknown_80F4EB0
_0807801C:
ldr r0, _0807802C
_0807801E:
ldr r2, [r0]
adds r0, r5, 0
_08078022:
adds r1, r4, 0
bl sub_80522F4
b _08078068
.align 2, 0
_0807802C: .4byte gUnknown_80FAE7C
_08078030:
ldr r0, _08078078
ldr r0, [r0]
lsls r1, r2, 2
ldr r6, _0807807C
adds r0, r6
adds r0, r1
ldr r0, [r0]
cmp r5, r0
bne _08078050
strb r2, [r3]
ldr r0, [r5, 0x70]
adds r1, r7, 0
adds r1, 0xD4
adds r0, 0x98
ldr r0, [r0]
str r0, [r1]
_08078050:
adds r2, 0x1
cmp r2, 0x13
ble _08078030
ldr r0, _08078080
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
adds r0, r4, 0
bl sub_80418D4
_08078068:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078078: .4byte gUnknown_203B418
_0807807C: .4byte 0x000135cc
_08078080: .4byte gUnknown_80FAE58
thumb_func_end sub_8077F40
thumb_func_start sub_8078084
sub_8078084:
push {r4-r6,lr}
ldr r6, [r0, 0x70]
movs r5, 0
_0807808A:
ldr r0, _080780DC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080780E0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080780D0
ldr r1, [r4, 0x70]
adds r3, r1, 0
adds r3, 0xD0
ldrb r0, [r3]
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _080780D0
adds r0, r1, 0
adds r0, 0xD4
adds r1, r6, 0
adds r1, 0x98
ldr r2, [r0]
ldr r0, [r1]
cmp r2, r0
bne _080780D0
movs r0, 0
strb r0, [r3]
adds r0, r4, 0
bl sub_80418D4
_080780D0:
adds r5, 0x1
cmp r5, 0x13
ble _0807808A
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080780DC: .4byte gUnknown_203B418
_080780E0: .4byte 0x000135cc
thumb_func_end sub_8078084
thumb_func_start sub_80780E4
sub_80780E4:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r4, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080781C4
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _080781C4
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _080781C4
ldr r6, [r4, 0x70]
ldr r0, _0807816C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r7, r6, 0
adds r7, 0xD0
ldrb r0, [r7]
cmp r0, 0x2
beq _08078178
cmp r0, 0x1
bne _08078134
ldr r0, _08078170
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_08078134:
movs r0, 0
mov r8, r0
movs r0, 0x2
strb r0, [r7]
ldr r1, _08078174
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xD9
strb r0, [r1]
adds r0, r6, 0
adds r0, 0xDA
mov r1, r8
strb r1, [r0]
adds r0, r5, 0
bl nullsub_74
adds r1, r6, 0
adds r1, 0xD8
movs r0, 0xFF
strb r0, [r1]
movs r2, 0
adds r3, r1, 0
b _0807818C
.align 2, 0
_0807816C: .4byte gUnknown_202DF98
_08078170: .4byte gUnknown_80FA79C
_08078174: .4byte gUnknown_80F4EF0
_08078178:
ldr r0, _08078188
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
b _080781C4
.align 2, 0
_08078188: .4byte gUnknown_80FBB78
_0807818C:
ldr r0, _080781D0
ldr r0, [r0]
lsls r1, r2, 2
ldr r7, _080781D4
adds r0, r7
adds r0, r1
ldr r0, [r0]
cmp r5, r0
bne _080781AC
strb r2, [r3]
ldr r0, [r5, 0x70]
adds r1, r6, 0
adds r1, 0xD4
adds r0, 0x98
ldr r0, [r0]
str r0, [r1]
_080781AC:
adds r2, 0x1
cmp r2, 0x13
ble _0807818C
ldr r0, _080781D8
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_80418D4
_080781C4:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080781D0: .4byte gUnknown_203B418
_080781D4: .4byte 0x000135cc
_080781D8: .4byte gUnknown_80FBB4C
thumb_func_end sub_80780E4
thumb_func_start sub_80781DC
sub_80781DC:
push {r4-r7,lr}
adds r7, r0, 0
adds r4, r1, 0
adds r6, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078242
ldr r5, [r4, 0x70]
ldr r0, _08078228
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xDC
ldrb r0, [r1]
cmp r0, 0x1
beq _08078230
movs r0, 0x1
strb r0, [r1]
adds r1, r6, 0x1
adds r0, r5, 0
adds r0, 0xDD
strb r1, [r0]
adds r0, r4, 0
bl sub_8041CDC
ldr r0, _0807822C
ldr r2, [r0]
adds r0, r7, 0
adds r1, r4, 0
bl sub_80522F4
b _0807823C
.align 2, 0
_08078228: .4byte gUnknown_202DF98
_0807822C: .4byte gUnknown_80FB73C
_08078230:
ldr r0, _08078248
ldr r2, [r0]
adds r0, r7, 0
adds r1, r4, 0
bl sub_80522F4
_0807823C:
adds r0, r4, 0
bl sub_80418D4
_08078242:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078248: .4byte gUnknown_80FB764
thumb_func_end sub_80781DC
thumb_func_start sub_807824C
sub_807824C:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r7, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080782C2
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080782C2
ldr r5, [r4, 0x70]
ldr r0, _080782A8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xDC
ldrb r0, [r1]
cmp r0, 0x2
beq _080782B0
movs r0, 0x2
strb r0, [r1]
adds r1, r7, 0x1
adds r0, r5, 0
adds r0, 0xDD
strb r1, [r0]
adds r0, r4, 0
bl sub_8041CEC
ldr r0, _080782AC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080782BC
.align 2, 0
_080782A8: .4byte gUnknown_202DF98
_080782AC: .4byte gUnknown_80FB780
_080782B0:
ldr r0, _080782C8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080782BC:
adds r0, r4, 0
bl sub_80418D4
_080782C2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080782C8: .4byte gUnknown_80FB7A0
thumb_func_end sub_807824C
thumb_func_start sub_80782CC
sub_80782CC:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807833E
ldr r5, [r4, 0x70]
ldr r0, _08078320
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xDC
ldrb r0, [r1]
cmp r0, 0x3
beq _0807832C
movs r0, 0x3
strb r0, [r1]
ldr r1, _08078324
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xDD
strb r0, [r1]
adds r0, r4, 0
bl nullsub_79
ldr r0, _08078328
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08078338
.align 2, 0
_08078320: .4byte gUnknown_202DF98
_08078324: .4byte gUnknown_80F4EC4
_08078328: .4byte gUnknown_80FB8BC
_0807832C:
ldr r0, _08078344
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08078338:
adds r0, r4, 0
bl sub_80418D4
_0807833E:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08078344: .4byte gUnknown_80FB8E4
thumb_func_end sub_80782CC
thumb_func_start sub_8078348
sub_8078348:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080783BA
ldr r5, [r4, 0x70]
ldr r0, _0807839C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xDC
ldrb r0, [r1]
cmp r0, 0x4
beq _080783A8
movs r0, 0x4
strb r0, [r1]
ldr r1, _080783A0
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xDD
strb r0, [r1]
adds r0, r4, 0
bl nullsub_80
ldr r0, _080783A4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080783B4
.align 2, 0
_0807839C: .4byte gUnknown_202DF98
_080783A0: .4byte gUnknown_80F4EC8
_080783A4: .4byte gUnknown_80FB900
_080783A8:
ldr r0, _080783C0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080783B4:
adds r0, r4, 0
bl sub_80418D4
_080783BA:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080783C0: .4byte gUnknown_80FB924
thumb_func_end sub_8078348
thumb_func_start sub_80783C4
sub_80783C4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
adds r5, r0, 0
adds r7, r1, 0
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x18]
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _080783E8
b _0807856A
_080783E8:
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
beq _080783FA
b _0807856A
_080783FA:
ldr r4, [r7, 0x70]
ldr r0, _08078420
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
adds r1, r4, 0
adds r1, 0xC8
ldrb r0, [r1]
cmp r0, 0x2
bne _08078428
ldr r0, _08078424
ldr r2, [r0]
adds r0, r5, 0
adds r1, r7, 0
bl sub_80522F4
b _0807856A
.align 2, 0
_08078420: .4byte gUnknown_202DF98
_08078424: .4byte gUnknown_80FB994
_08078428:
movs r6, 0
mov r8, r1
movs r0, 0xC9
adds r0, r4
mov r9, r0
movs r1, 0xCA
adds r1, r4
mov r10, r1
adds r2, r4, 0
adds r2, 0xCB
str r2, [sp, 0x1C]
adds r4, 0xCC
str r4, [sp, 0x20]
_08078442:
ldr r0, _0807857C
ldr r0, [r0]
lsls r1, r6, 2
ldr r3, _08078580
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078480
cmp r7, r4
beq _08078480
ldr r0, [r4, 0x70]
adds r0, 0xC8
ldrb r0, [r0]
subs r0, 0x2
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _08078480
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
bl sub_807A5D0
movs r0, 0x2A
bl sub_803E46C
_08078480:
adds r6, 0x1
cmp r6, 0x13
ble _08078442
adds r0, r7, 0
bl sub_8041D38
ldr r0, _08078584
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
mov r4, r8
ldrb r0, [r4]
cmp r0, 0
beq _080784A8
adds r0, r5, 0
adds r1, r7, 0
movs r2, 0x2
bl sub_807A5D0
_080784A8:
movs r4, 0
movs r0, 0x2
mov r1, r8
strb r0, [r1]
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x6]
mov r2, r9
strb r0, [r2]
mov r3, sp
ldrb r0, [r3, 0x18]
mov r3, r10
strb r0, [r3]
ldr r1, _08078588
adds r0, r7, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
ldr r1, [sp, 0x1C]
strb r0, [r1]
ldr r2, [sp, 0x20]
strb r4, [r2]
adds r0, r7, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r7, 0
bl sub_806CCB4
ldr r0, _0807857C
ldr r0, [r0]
ldr r3, _0807858C
adds r0, r3
movs r1, 0x1
strb r1, [r0]
ldr r0, _08078590
ldr r2, [r0]
adds r0, r5, 0
adds r1, r7, 0
bl sub_80522F4
movs r6, 0
mov r8, r6
_08078502:
ldr r0, _0807857C
ldr r0, [r0]
lsls r1, r6, 2
ldr r4, _08078580
adds r0, r4
adds r0, r1
ldr r0, [r0]
mov r9, r0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807855E
mov r5, r9
ldr r4, [r5, 0x70]
adds r1, r4, 0
adds r1, 0x78
movs r0, 0x6
strb r0, [r1]
adds r0, r4, 0
adds r0, 0x80
mov r1, r8
str r1, [r0]
subs r0, 0x4
strh r1, [r0]
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _0807855E
mov r1, sp
adds r0, r4, 0
adds r0, 0x44
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
mov r0, r9
movs r1, 0x1
bl sub_807ADB8
adds r1, r4, 0
adds r1, 0x44
mov r0, sp
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2,r3,r5}
stm r1!, {r2,r3,r5}
_0807855E:
adds r6, 0x1
cmp r6, 0x13
ble _08078502
adds r0, r7, 0
bl sub_80418D4
_0807856A:
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807857C: .4byte gUnknown_203B418
_08078580: .4byte 0x000135cc
_08078584: .4byte gUnknown_202DF98
_08078588: .4byte gUnknown_80F4ED0
_0807858C: .4byte 0x000037fc
_08078590: .4byte gUnknown_80FB978
thumb_func_end sub_80783C4
thumb_func_start sub_8078594
sub_8078594:
push {r4-r7,lr}
adds r5, r0, 0
adds r6, r1, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807866E
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807866E
ldr r4, [r5, 0x70]
ldr r7, [r6, 0x70]
adds r0, r5, 0
movs r1, 0xE
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _08078640
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _0807866E
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0x1
bl sub_807A5D0
adds r0, r6, 0
bl sub_8041D48
movs r1, 0xE
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r4, 0xE]
cmp r0, 0
bne _080785F6
movs r0, 0x1
strh r0, [r4, 0xE]
_080785F6:
adds r1, r7, 0
adds r1, 0xC8
ldrb r0, [r1]
cmp r0, 0x1
beq _0807861C
movs r0, 0x1
strb r0, [r1]
ldr r1, _08078634
adds r0, r6, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xCB
strb r0, [r1]
adds r1, 0x1
movs r0, 0
strb r0, [r1]
_0807861C:
ldr r0, _08078638
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807863C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
b _08078668
.align 2, 0
_08078634: .4byte gUnknown_80F4EA4
_08078638: .4byte gUnknown_202DF98
_0807863C: .4byte gUnknown_80FB004
_08078640:
ldr r0, _08078674
ldr r4, [r0]
adds r0, r5, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077084
adds r0, r5, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8077160
adds r0, r5, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0x1
bl sub_80779F0
_08078668:
adds r0, r6, 0
bl sub_80418D4
_0807866E:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078674: .4byte gUnknown_8106A4C
thumb_func_end sub_8078594
thumb_func_start sub_8078678
sub_8078678:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
adds r6, r1, 0
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078732
adds r0, r7, 0
adds r1, r6, 0
movs r2, 0x3
bl sub_807A5D0
movs r5, 0
_0807869A:
ldr r0, _0807873C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08078740
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080786C8
ldr r0, [r4, 0x70]
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x3
bne _080786C8
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0
bl sub_807A5D0
_080786C8:
adds r5, 0x1
cmp r5, 0x13
ble _0807869A
adds r0, r6, 0
bl nullsub_81
ldr r5, [r6, 0x70]
mov r8, r5
adds r1, r5, 0
adds r1, 0xC8
ldrb r0, [r1]
cmp r0, 0x3
beq _08078700
movs r4, 0
movs r0, 0x3
strb r0, [r1]
ldr r1, _08078744
adds r0, r6, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xCB
strb r0, [r1]
adds r0, r5, 0
adds r0, 0xCC
strb r4, [r0]
_08078700:
ldr r0, _0807873C
ldr r1, [r0]
ldr r2, _08078748
adds r0, r1, r2
str r6, [r0]
ldr r0, _0807874C
adds r1, r0
mov r0, r8
adds r0, 0x98
ldr r0, [r0]
str r0, [r1]
ldr r0, _08078750
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08078754
ldr r2, [r0]
adds r0, r7, 0
adds r1, r6, 0
bl sub_80522F4
adds r0, r6, 0
bl sub_80418D4
_08078732:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807873C: .4byte gUnknown_203B418
_08078740: .4byte 0x000135cc
_08078744: .4byte gUnknown_80F4EA8
_08078748: .4byte 0x00017b30
_0807874C: .4byte 0x00017b3c
_08078750: .4byte gUnknown_202DF98
_08078754: .4byte gUnknown_80FB01C
thumb_func_end sub_8078678
thumb_func_start sub_8078758
sub_8078758:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080787DA
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080787DA
ldr r6, [r4, 0x70]
ldr r0, _080787BC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x5
beq _080787C8
movs r0, 0x5
strb r0, [r1]
ldr r1, _080787C0
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xBD
strb r0, [r1]
adds r0, r4, 0
bl nullsub_73
ldr r0, _080787C4
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _080787D4
.align 2, 0
_080787BC: .4byte gUnknown_202DF98
_080787C0: .4byte gUnknown_80F4ED8
_080787C4: .4byte gUnknown_80FB9F0
_080787C8:
ldr r0, _080787E0
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_080787D4:
adds r0, r4, 0
bl sub_80418D4
_080787DA:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080787E0: .4byte gUnknown_80FBA14
thumb_func_end sub_8078758
thumb_func_start sub_80787E4
sub_80787E4:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078852
ldr r4, [r5, 0x70]
ldr r0, _08078834
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
movs r0, 0x89
lsls r0, 1
adds r4, r0
ldrb r0, [r4]
cmp r0, 0x2
bhi _08078840
adds r0, 0x1
strb r0, [r4]
movs r0, 0x1
bl sub_804178C
adds r0, r5, 0
bl sub_8041D5C
ldr r1, _08078838
ldrb r0, [r4]
str r0, [r1]
ldr r0, _0807883C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _0807884C
.align 2, 0
_08078834: .4byte gUnknown_202DF98
_08078838: .4byte gUnknown_202DE30
_0807883C: .4byte gUnknown_80FBA38
_08078840:
ldr r0, _08078858
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_0807884C:
adds r0, r5, 0
bl sub_80418D4
_08078852:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08078858: .4byte gUnknown_80FBA60
thumb_func_end sub_80787E4
thumb_func_start sub_807885C
sub_807885C:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080788DE
ldr r0, [r4, 0x70]
adds r7, r0, 0
adds r5, r7, 0
adds r5, 0xE4
ldrb r0, [r5]
cmp r0, 0x2
bne _08078884
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A7C8
_08078884:
ldr r0, _080788C0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r5]
cmp r0, 0x1
beq _080788CC
movs r0, 0x1
strb r0, [r5]
ldr r1, _080788C4
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xE5
strb r0, [r1]
adds r0, r4, 0
bl sub_8041D84
ldr r0, _080788C8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080788D8
.align 2, 0
_080788C0: .4byte gUnknown_202DF98
_080788C4: .4byte gUnknown_80F4EE4
_080788C8: .4byte gUnknown_80FBA80
_080788CC:
ldr r0, _080788E4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080788D8:
adds r0, r4, 0
bl sub_80418D4
_080788DE:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080788E4: .4byte gUnknown_80FBAA0
thumb_func_end sub_807885C
thumb_func_start sub_80788E8
sub_80788E8:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807895E
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _0807895E
adds r0, r5, 0
bl nullsub_82
ldr r4, [r5, 0x70]
ldr r0, _08078940
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r4, 0xFD
ldrb r0, [r4]
cmp r0, 0
bne _0807894C
ldr r1, _08078944
adds r0, r5, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
strb r0, [r4]
ldr r0, _08078948
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _08078958
.align 2, 0
_08078940: .4byte gUnknown_202DF98
_08078944: .4byte gUnknown_80F4EEC
_08078948: .4byte gUnknown_80FBB04
_0807894C:
ldr r0, _08078964
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_08078958:
adds r0, r5, 0
bl sub_80418D4
_0807895E:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08078964: .4byte gUnknown_80FBB28
thumb_func_end sub_80788E8
thumb_func_start sub_8078968
sub_8078968:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r4, r1, 0
ldr r5, [r4, 0x70]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078A4A
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08078A4A
movs r3, 0
ldr r0, _080789E8
mov r8, r0
movs r1, 0x1
mov r12, r1
movs r0, 0x8C
lsls r0, 1
adds r2, r5, r0
movs r7, 0x10
_080789A2:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _080789B4
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _080789BC
_080789B4:
adds r2, 0x8
adds r3, 0x1
cmp r3, 0x3
ble _080789A2
_080789BC:
cmp r3, 0x4
bne _080789F0
movs r1, 0x9C
lsls r1, 1
adds r0, r5, r1
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _080789F0
mov r0, r8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _080789EC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08078A4A
.align 2, 0
_080789E8: .4byte gUnknown_202DF98
_080789EC: .4byte gUnknown_80FBBD4
_080789F0:
mov r0, r8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xBC
ldrb r0, [r1]
cmp r0, 0x6
beq _08078A38
movs r0, 0x6
strb r0, [r1]
ldr r1, _08078A30
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xBD
strb r0, [r1]
adds r0, r4, 0
bl nullsub_83
ldr r0, _08078A34
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08078A44
.align 2, 0
_08078A30: .4byte gUnknown_80F4EF4
_08078A34: .4byte gUnknown_80FBB94
_08078A38:
ldr r0, _08078A54
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08078A44:
adds r0, r4, 0
bl sub_80418D4
_08078A4A:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078A54: .4byte gUnknown_80FBBB8
thumb_func_end sub_8078968
thumb_func_start sub_8078A58
sub_8078A58:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x14
mov r8, r0
adds r6, r1, 0
adds r7, r2, 0
adds r5, r3, 0
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078B4A
ldr r4, [r6, 0x70]
cmp r5, 0
beq _08078AE0
mov r0, sp
adds r1, r5, 0
bl sub_80943A0
ldr r2, [sp]
movs r0, 0xA0
lsls r0, 1
adds r5, r4, r0
ldr r7, [r5]
add r0, sp, 0x4
adds r1, r7, 0
bl sub_80942C0
ldr r2, [sp, 0x4]
str r2, [r5]
movs r0, 0x9E
lsls r0, 1
adds r4, r0
ldr r1, [r4]
add r0, sp, 0x8
bl sub_8094318
ldr r0, [sp, 0x8]
str r0, [r4]
ldr r0, _08078AD0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r7, 0
bl sub_8094450
adds r4, r0, 0
ldr r0, [r5]
bl sub_8094450
cmp r4, r0
beq _08078AD8
adds r0, r6, 0
bl sub_8041D9C
ldr r0, _08078AD4
b _08078B22
.align 2, 0
_08078AD0: .4byte gUnknown_202DF98
_08078AD4: .4byte gUnknown_80FBD9C
_08078AD8:
ldr r0, _08078ADC
b _08078B22
.align 2, 0
_08078ADC: .4byte gUnknown_80FBE3C
_08078AE0:
add r0, sp, 0xC
adds r1, r7, 0
bl sub_80943A0
ldr r2, [sp, 0xC]
movs r0, 0x9E
lsls r0, 1
adds r4, r0
ldr r7, [r4]
add r0, sp, 0x10
adds r1, r7, 0
bl sub_80942C0
ldr r0, [sp, 0x10]
str r0, [r4]
ldr r0, _08078B30
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r7, 0
bl sub_8094450
adds r5, r0, 0
ldr r0, [r4]
bl sub_8094450
cmp r5, r0
beq _08078B38
adds r0, r6, 0
bl nullsub_84
ldr r0, _08078B34
_08078B22:
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
b _08078B44
.align 2, 0
_08078B30: .4byte gUnknown_202DF98
_08078B34: .4byte gUnknown_80FBD78
_08078B38:
ldr r0, _08078B58
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
_08078B44:
adds r0, r6, 0
bl sub_80418D4
_08078B4A:
add sp, 0x14
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078B58: .4byte gUnknown_80FBE40
thumb_func_end sub_8078A58
thumb_func_start sub_8078B5C
sub_8078B5C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x28
mov r9, r0
adds r6, r1, 0
mov r10, r2
str r3, [sp, 0x1C]
ldr r0, [sp, 0x48]
lsls r0, 24
lsrs r0, 24
mov r8, r0
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08078B86
b _08078D78
_08078B86:
ldr r7, [r6, 0x70]
ldrb r0, [r7, 0x7]
cmp r0, 0
bne _08078BB8
adds r0, r6, 0
movs r1, 0x1B
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08078BB8
mov r0, r8
cmp r0, 0
bne _08078BA4
b _08078D78
_08078BA4:
ldr r0, _08078BB4
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
b _08078D78
.align 2, 0
_08078BB4: .4byte gUnknown_80FBEA0
_08078BB8:
movs r5, 0
ldr r1, [sp, 0x1C]
cmp r1, 0
beq _08078BE8
movs r1, 0x9E
lsls r1, 1
adds r0, r7, r1
ldr r0, [r0]
bl sub_8094450
adds r4, r0, 0
movs r1, 0xA0
lsls r1, 1
adds r0, r7, r1
ldr r0, [r0]
bl sub_8094450
cmp r4, r0
blt _08078BE0
movs r5, 0x1
_08078BE0:
ldr r0, _08078C8C
cmp r10, r0
bne _08078BE8
movs r5, 0x1
_08078BE8:
cmp r5, 0
beq _08078CC0
movs r0, 0xA0
lsls r0, 1
adds r5, r7, r0
ldr r1, [r5]
str r1, [sp, 0x20]
subs r0, 0x4
adds r0, r7
mov r10, r0
ldr r0, [r0]
bl sub_8094450
adds r4, r0, 0
ldr r0, [r5]
bl sub_8094450
movs r1, 0
str r1, [sp, 0x24]
cmp r4, r0
bne _08078C16
movs r0, 0x1
str r0, [sp, 0x24]
_08078C16:
mov r0, sp
ldr r1, [sp, 0x1C]
bl sub_80943A0
ldr r2, [sp]
ldr r1, [r5]
add r0, sp, 0x4
bl sub_8094268
ldr r4, [sp, 0x4]
str r4, [r5]
add r0, sp, 0x8
movs r1, 0xC8
bl sub_80943A0
ldr r2, [sp, 0x8]
add r0, sp, 0xC
adds r1, r4, 0
bl sub_8094318
ldr r0, [sp, 0xC]
str r0, [r5]
mov r1, r10
str r0, [r1]
ldr r0, [sp, 0x24]
cmp r0, 0
bne _08078C5E
mov r1, r8
cmp r1, 0
beq _08078C5E
ldr r0, _08078C90
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
_08078C5E:
ldr r0, [sp, 0x20]
bl sub_8094450
adds r4, r0, 0
movs r1, 0xA0
lsls r1, 1
adds r0, r7, r1
ldr r0, [r0]
bl sub_8094450
cmp r4, r0
bne _08078C9C
ldr r0, _08078C94
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
mov r0, r8
cmp r0, 0
beq _08078D72
ldr r0, _08078C98
b _08078D4E
.align 2, 0
_08078C8C: .4byte 0x000003e7
_08078C90: .4byte gUnknown_80FBE64
_08078C94: .4byte gUnknown_202DF98
_08078C98: .4byte gUnknown_80FBDF0
_08078C9C:
adds r0, r6, 0
bl sub_8041DB0
ldr r0, _08078CB8
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
mov r1, r8
cmp r1, 0
beq _08078D72
ldr r0, _08078CBC
b _08078D4E
.align 2, 0
_08078CB8: .4byte gUnknown_202DF98
_08078CBC: .4byte gUnknown_80FBDC4
_08078CC0:
movs r0, 0x9E
lsls r0, 1
adds r5, r7, r0
ldr r4, [r5]
add r0, sp, 0x10
mov r1, r10
bl sub_80943A0
ldr r2, [sp, 0x10]
ldr r1, [r5]
add r0, sp, 0x14
bl sub_8094268
ldr r1, [sp, 0x14]
str r1, [r5]
movs r0, 0xA0
lsls r0, 1
adds r7, r0
ldr r2, [r7]
add r0, sp, 0x18
bl sub_8094318
ldr r0, [sp, 0x18]
str r0, [r5]
ldr r0, _08078D28
cmp r10, r0
bne _08078CFA
ldr r0, [r7]
str r0, [r5]
_08078CFA:
adds r0, r6, 0
bl nullsub_85
ldr r0, _08078D2C
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r4, 0
bl sub_8094450
adds r4, r0, 0
ldr r0, [r5]
bl sub_8094450
cmp r4, r0
bne _08078D34
mov r1, r8
cmp r1, 0
beq _08078D72
ldr r0, _08078D30
b _08078D4E
.align 2, 0
_08078D28: .4byte 0x000003e7
_08078D2C: .4byte gUnknown_202DF98
_08078D30: .4byte gUnknown_80FBE14
_08078D34:
ldr r0, [r5]
bl sub_8094450
adds r4, r0, 0
ldr r0, [r7]
bl sub_8094450
cmp r4, r0
blt _08078D60
mov r0, r8
cmp r0, 0
beq _08078D72
ldr r0, _08078D5C
_08078D4E:
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
b _08078D72
.align 2, 0
_08078D5C: .4byte gUnknown_80FBE64
_08078D60:
mov r1, r8
cmp r1, 0
beq _08078D72
ldr r0, _08078D88
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
_08078D72:
adds r0, r6, 0
bl sub_80418D4
_08078D78:
add sp, 0x28
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078D88: .4byte gUnknown_80FBE84
thumb_func_end sub_8078B5C
thumb_func_start sub_8078D8C
sub_8078D8C:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078E0E
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08078E0E
ldr r6, [r4, 0x70]
ldr r0, _08078DF0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xEC
ldrb r0, [r1]
cmp r0, 0x1
beq _08078DFC
movs r0, 0x1
strb r0, [r1]
ldr r1, _08078DF4
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xED
strb r0, [r1]
adds r0, r4, 0
bl nullsub_86
ldr r0, _08078DF8
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08078E08
.align 2, 0
_08078DF0: .4byte gUnknown_202DF98
_08078DF4: .4byte gUnknown_80F4F1C
_08078DF8: .4byte gUnknown_80FBF68
_08078DFC:
ldr r0, _08078E14
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08078E08:
adds r0, r4, 0
bl sub_80418D4
_08078E0E:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08078E14: .4byte gUnknown_80FBF84
thumb_func_end sub_8078D8C
thumb_func_start sub_8078E18
sub_8078E18:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _08078E48
add sp, r4
mov r10, r0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078F2E
ldr r7, [r5, 0x70]
adds r0, r7, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x2
bne _08078E50
ldr r0, _08078E4C
b _08078EC0
.align 2, 0
_08078E48: .4byte 0xfffffe00
_08078E4C: .4byte gUnknown_80FBF04
_08078E50:
ldr r0, _08078ECC
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
mov r0, sp
movs r1, 0
bl sub_803D870
mov r8, r0
cmp r0, 0
beq _08078EBE
movs r0, 0
mov r9, r0
movs r6, 0
_08078E6E:
mov r0, r8
bl sub_8084100
lsls r0, 3
add r0, sp
bl sub_808E9B8
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r5, 0
bl sub_8069F54
lsls r0, 16
asrs r4, r0, 16
movs r1, 0x4
ldrsh r0, [r7, r1]
cmp r4, r0
beq _08078EAE
adds r0, r4, 0
movs r1, 0x1
bl sub_806AA0C
lsls r0, 24
cmp r0, 0
beq _08078EAE
adds r0, r4, 0
bl sub_80687D0
mov r9, r0
cmp r0, 0
bne _08078EB4
_08078EAE:
adds r6, 0x1
cmp r6, 0x13
ble _08078E6E
_08078EB4:
cmp r6, 0x14
beq _08078EBE
mov r2, r9
cmp r2, 0
bne _08078ED4
_08078EBE:
ldr r0, _08078ED0
_08078EC0:
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
b _08078F2E
.align 2, 0
_08078ECC: .4byte gUnknown_202DF98
_08078ED0: .4byte gUnknown_80FBEE4
_08078ED4:
strh r4, [r7, 0x4]
mov r0, r9
str r0, [r5, 0x64]
adds r1, r7, 0
adds r1, 0xE4
movs r0, 0x2
strb r0, [r1]
ldr r1, _08078F44
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xE5
strb r0, [r1]
adds r0, r5, 0
bl sub_806CF98
adds r0, r5, 0
bl nullsub_87
adds r0, r5, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_806CCB4
ldr r0, _08078F48
movs r2, 0x4
ldrsh r1, [r7, r2]
bl sub_808D908
ldr r0, _08078F4C
ldr r2, [r0]
mov r0, r10
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
bl sub_80418D4
_08078F2E:
movs r3, 0x80
lsls r3, 2
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078F44: .4byte gUnknown_80F4EFC
_08078F48: .4byte gUnknown_202DFE8
_08078F4C: .4byte gUnknown_80FBEC0
thumb_func_end sub_8078E18
thumb_func_start sub_8078F50
sub_8078F50:
push {r4-r7,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08078FD2
ldr r0, [r4, 0x70]
adds r7, r0, 0
adds r5, r7, 0
adds r5, 0xE4
ldrb r0, [r5]
cmp r0, 0x2
bne _08078F78
adds r0, r6, 0
adds r1, r4, 0
bl sub_807A7C8
_08078F78:
ldr r0, _08078FB4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r5]
cmp r0, 0x3
beq _08078FC0
movs r0, 0x3
strb r0, [r5]
ldr r1, _08078FB8
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xE5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_88
ldr r0, _08078FBC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08078FCC
.align 2, 0
_08078FB4: .4byte gUnknown_202DF98
_08078FB8: .4byte gUnknown_80F4F04
_08078FBC: .4byte gUnknown_80FBF28
_08078FC0:
ldr r0, _08078FD8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08078FCC:
adds r0, r4, 0
bl sub_80418D4
_08078FD2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08078FD8: .4byte gUnknown_80FBF50
thumb_func_end sub_8078F50
thumb_func_start sub_8078FDC
sub_8078FDC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r6, r0, 0
adds r4, r1, 0
lsls r2, 16
asrs r7, r2, 16
mov r10, r7
movs r0, 0
mov r8, r0
mov r9, r0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080790B6
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080790B6
ldr r5, [r4, 0x70]
ldr r0, _08079064
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
movs r1, 0x26
ldrsh r0, [r5, r1]
cmp r0, 0xA
ble _0807902E
movs r0, 0xA
strh r0, [r5, 0x26]
movs r0, 0x1
mov r8, r0
_0807902E:
mov r1, r8
cmp r1, 0
beq _0807904C
adds r0, r4, 0
adds r1, r7, 0
bl sub_8041DD8
ldr r0, _08079068
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0x1
mov r9, r0
_0807904C:
adds r5, 0xF5
ldrb r0, [r5]
cmp r0, 0
beq _08079070
ldr r0, _0807906C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080790B6
.align 2, 0
_08079064: .4byte gUnknown_202DF98
_08079068: .4byte gUnknown_80FC000
_0807906C: .4byte gUnknown_80FBFB8
_08079070:
mov r1, r9
cmp r1, 0
bne _0807907E
adds r0, r4, 0
mov r1, r10
bl sub_8041DD8
_0807907E:
adds r0, r4, 0
movs r1, 0xE
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _080790A0
ldr r0, _0807909C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080790B0
.align 2, 0
_0807909C: .4byte gUnknown_80FBFD8
_080790A0:
movs r0, 0x1
strb r0, [r5]
ldr r0, _080790C4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080790B0:
adds r0, r4, 0
bl sub_80418D4
_080790B6:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080790C4: .4byte gUnknown_80FBF9C
thumb_func_end sub_8078FDC
thumb_func_start sub_80790C8
sub_80790C8:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079134
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08079134
ldr r6, _0807911C
ldr r0, [r6]
ldr r1, _08079120
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _08079128
adds r0, r4, 0
bl nullsub_89
ldr r0, [r6]
ldr r1, _08079120
adds r0, r1
movs r1, 0x1
strb r1, [r0]
adds r0, r4, 0
bl sub_80418D4
ldr r0, _08079124
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08079134
.align 2, 0
_0807911C: .4byte gUnknown_203B418
_08079120: .4byte 0x00000676
_08079124: .4byte gUnknown_80FC028
_08079128:
ldr r0, _0807913C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08079134:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807913C: .4byte gUnknown_80FC054
thumb_func_end sub_80790C8
thumb_func_start sub_8079140
sub_8079140:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080791CE
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _080791CE
ldr r6, [r4, 0x70]
ldr r0, _080791B0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xE8
ldrb r0, [r1]
cmp r0, 0x1
beq _080791BC
movs r0, 0x1
strb r0, [r1]
ldr r1, _080791B4
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xE9
strb r0, [r1]
adds r0, r4, 0
bl sub_8041E0C
ldr r0, _080791B8
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0x31
bl sub_803E46C
bl sub_8049ED4
bl sub_8040A84
b _080791C8
.align 2, 0
_080791B0: .4byte gUnknown_202DF98
_080791B4: .4byte gUnknown_80F4F08
_080791B8: .4byte gUnknown_80FB7F4
_080791BC:
ldr r0, _080791D4
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_080791C8:
adds r0, r4, 0
bl sub_80418D4
_080791CE:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080791D4: .4byte gUnknown_80FB810
thumb_func_end sub_8079140
thumb_func_start sub_80791D8
sub_80791D8:
push {r4-r7,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079266
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08079266
ldr r7, [r4, 0x70]
ldr r0, _08079248
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r6, r7, 0
adds r6, 0xE8
ldrb r0, [r6]
cmp r0, 0x2
beq _08079254
adds r0, r4, 0
bl sub_8041E1C
ldr r0, _0807924C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0x2
strb r0, [r6]
ldr r1, _08079250
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r0, 0x1
adds r1, r7, 0
adds r1, 0xE9
strb r0, [r1]
movs r0, 0x1
bl sub_803F580
bl sub_8049ED4
bl sub_8040A84
b _08079260
.align 2, 0
_08079248: .4byte gUnknown_202DF98
_0807924C: .4byte gUnknown_80FB834
_08079250: .4byte gUnknown_80F4F0C
_08079254:
ldr r0, _0807926C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08079260:
adds r0, r4, 0
bl sub_80418D4
_08079266:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807926C: .4byte gUnknown_80FB85C
thumb_func_end sub_80791D8
thumb_func_start sub_8079270
sub_8079270:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080792EE
ldr r5, [r4, 0x70]
ldr r0, _080792D0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xE8
ldrb r0, [r1]
cmp r0, 0x3
beq _080792DC
movs r0, 0x3
strb r0, [r1]
ldr r1, _080792D4
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xE9
strb r0, [r1]
adds r0, r4, 0
bl sub_8041E3C
ldr r0, _080792D8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
movs r0, 0x31
bl sub_803E46C
bl sub_8049ED4
bl sub_8040A84
b _080792E8
.align 2, 0
_080792D0: .4byte gUnknown_202DF98
_080792D4: .4byte gUnknown_80F4F10
_080792D8: .4byte gUnknown_80FB880
_080792DC:
ldr r0, _080792F4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080792E8:
adds r0, r4, 0
bl sub_80418D4
_080792EE:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080792F4: .4byte gUnknown_80FB89C
thumb_func_end sub_8079270
thumb_func_start sub_80792F8
sub_80792F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
mov r10, r0
adds r6, r1, 0
mov r9, r2
movs r0, 0
mov r8, r0
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807939A
ldr r0, [r6, 0x70]
movs r1, 0x8C
lsls r1, 1
adds r4, r0, r1
adds r5, r4, 0
movs r7, 0x3
_08079326:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807935E
ldrb r0, [r4, 0x4]
str r0, [sp]
adds r0, r5, 0
bl sub_8092BF4
str r0, [sp, 0x4]
ldr r1, [sp]
ldr r0, [sp, 0x4]
cmp r1, r0
bge _0807935E
ldr r0, [sp]
add r0, r9
str r0, [sp]
ldr r1, [sp]
ldr r0, [sp, 0x4]
cmp r1, r0
ble _08079356
ldr r0, [sp, 0x4]
str r0, [sp]
_08079356:
ldr r0, [sp]
strb r0, [r4, 0x4]
movs r0, 0x1
mov r8, r0
_0807935E:
adds r4, 0x8
adds r5, 0x8
subs r7, 0x1
cmp r7, 0
bge _08079326
mov r1, r8
cmp r1, 0
beq _08079388
adds r0, r6, 0
bl sub_8041E4C
ldr r0, _08079384
ldr r2, [r0]
mov r0, r10
adds r1, r6, 0
bl sub_80522F4
b _08079394
.align 2, 0
_08079384: .4byte gUnknown_80FDBD0
_08079388:
ldr r0, _080793AC
ldr r2, [r0]
mov r0, r10
adds r1, r6, 0
bl sub_80522F4
_08079394:
adds r0, r6, 0
bl sub_80418D4
_0807939A:
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080793AC: .4byte gUnknown_80FDBF0
thumb_func_end sub_80792F8
thumb_func_start sub_80793B0
sub_80793B0:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079416
ldr r0, _080793FC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r4, 0x70]
adds r1, r0, 0
ldrb r0, [r1, 0x14]
adds r2, r0, 0
adds r0, r2, r5
cmp r0, 0xFE
ble _080793DE
movs r0, 0xFF
_080793DE:
strb r0, [r1, 0x14]
lsls r0, 24
lsrs r0, 24
cmp r2, r0
bcs _08079404
adds r0, r4, 0
bl sub_8041E60
ldr r0, _08079400
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079410
.align 2, 0
_080793FC: .4byte gUnknown_202DF98
_08079400: .4byte gUnknown_80FC33C
_08079404:
ldr r0, _0807941C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079410:
adds r0, r4, 0
bl sub_80418D4
_08079416:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807941C: .4byte gUnknown_80FC360
thumb_func_end sub_80793B0
thumb_func_start sub_8079420
sub_8079420:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079486
ldr r0, _0807946C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r4, 0x70]
adds r1, r0, 0
ldrb r0, [r1, 0x15]
adds r2, r0, 0
adds r0, r2, r5
cmp r0, 0xFE
ble _0807944E
movs r0, 0xFF
_0807944E:
strb r0, [r1, 0x15]
lsls r0, 24
lsrs r0, 24
cmp r2, r0
bcs _08079474
adds r0, r4, 0
bl sub_8041E74
ldr r0, _08079470
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079480
.align 2, 0
_0807946C: .4byte gUnknown_202DF98
_08079470: .4byte gUnknown_80FC388
_08079474:
ldr r0, _0807948C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079480:
adds r0, r4, 0
bl sub_80418D4
_08079486:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807948C: .4byte gUnknown_80FC3B4
thumb_func_end sub_8079420
thumb_func_start sub_8079490
sub_8079490:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080794F6
ldr r0, _080794DC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r4, 0x70]
adds r1, r0, 0
ldrb r0, [r1, 0x16]
adds r2, r0, 0
adds r0, r2, r5
cmp r0, 0xFE
ble _080794BE
movs r0, 0xFF
_080794BE:
strb r0, [r1, 0x16]
lsls r0, 24
lsrs r0, 24
cmp r2, r0
bcs _080794E4
adds r0, r4, 0
bl sub_8041E84
ldr r0, _080794E0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080794F0
.align 2, 0
_080794DC: .4byte gUnknown_202DF98
_080794E0: .4byte gUnknown_80FC3D8
_080794E4:
ldr r0, _080794FC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080794F0:
adds r0, r4, 0
bl sub_80418D4
_080794F6:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080794FC: .4byte gUnknown_80FC3FC
thumb_func_end sub_8079490
thumb_func_start sub_8079500
sub_8079500:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079566
ldr r0, _0807954C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, [r4, 0x70]
adds r1, r0, 0
ldrb r0, [r1, 0x17]
adds r2, r0, 0
adds r0, r2, r5
cmp r0, 0xFE
ble _0807952E
movs r0, 0xFF
_0807952E:
strb r0, [r1, 0x17]
lsls r0, 24
lsrs r0, 24
cmp r2, r0
bcs _08079554
adds r0, r4, 0
bl sub_8041E94
ldr r0, _08079550
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079560
.align 2, 0
_0807954C: .4byte gUnknown_202DF98
_08079550: .4byte gUnknown_80FC428
_08079554:
ldr r0, _0807956C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079560:
adds r0, r4, 0
bl sub_80418D4
_08079566:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807956C: .4byte gUnknown_80FC454
thumb_func_end sub_8079500
thumb_func_start sub_8079570
sub_8079570:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
ldr r4, [r5, 0x70]
ldr r0, _080795A0
movs r2, 0
bl sub_8045B94
adds r4, 0xE0
ldrb r0, [r4]
cmp r0, 0x1
beq _080795A8
movs r0, 0x1
strb r0, [r4]
adds r0, r5, 0
bl sub_8041EA4
ldr r0, _080795A4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _080795B4
.align 2, 0
_080795A0: .4byte gUnknown_202DFE8
_080795A4: .4byte gUnknown_80FD20C
_080795A8:
ldr r0, _080795C0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_080795B4:
adds r0, r5, 0
bl sub_80418D4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080795C0: .4byte gUnknown_80FD22C
thumb_func_end sub_8079570
thumb_func_start sub_80795C4
sub_80795C4:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
ldr r4, [r5, 0x70]
ldr r0, _080795F4
movs r2, 0
bl sub_8045B94
adds r4, 0xE0
ldrb r0, [r4]
cmp r0, 0x2
beq _080795FC
movs r0, 0x2
strb r0, [r4]
adds r0, r5, 0
bl sub_8041EB4
ldr r0, _080795F8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _08079608
.align 2, 0
_080795F4: .4byte gUnknown_202DFE8
_080795F8: .4byte gUnknown_80FD254
_080795FC:
ldr r0, _08079614
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_08079608:
adds r0, r5, 0
bl sub_80418D4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079614: .4byte gUnknown_80FD27C
thumb_func_end sub_80795C4
thumb_func_start sub_8079618
sub_8079618:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
mov r9, r0
adds r7, r1, 0
mov r8, r3
lsls r2, 24
lsrs r6, r2, 24
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08079638
b _08079752
_08079638:
ldr r5, [r7, 0x70]
ldr r0, _08079660
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xC0
ldrb r0, [r0]
cmp r0, r6
bne _08079668
cmp r6, 0xC
bne _08079668
ldr r0, _08079664
ldr r2, [r0]
mov r0, r9
adds r1, r7, 0
bl sub_80522F4
b _08079752
.align 2, 0
_08079660: .4byte gUnknown_202DF98
_08079664: .4byte gUnknown_80FC074
_08079668:
adds r0, r5, 0
adds r0, 0xC0
strb r6, [r0]
movs r4, 0
movs r1, 0x8C
lsls r1, 1
adds r0, r5, r1
subs r2, r6, 0x7
b _0807968A
_0807967A:
adds r4, 0x1
cmp r4, 0x3
bgt _08079694
lsls r0, r4, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r0, r5, r0
_0807968A:
cmp r0, r8
bne _0807967A
adds r0, r5, 0
adds r0, 0xC2
strb r4, [r0]
_08079694:
movs r1, 0xA5
lsls r1, 1
adds r0, r5, r1
movs r1, 0x1
strb r1, [r0]
movs r4, 0
lsls r0, r2, 24
lsrs r0, 24
cmp r0, 0x1
bhi _080796B2
adds r0, r5, 0
adds r0, 0xFF
strb r1, [r0]
movs r4, 0x1
b _080796C6
_080796B2:
adds r0, r6, 0
subs r0, 0x9
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _080796C6
adds r1, r5, 0
adds r1, 0xFF
movs r0, 0x2
strb r0, [r1]
_080796C6:
cmp r6, 0x1
bne _080796E4
ldr r1, _08079718
adds r0, r7, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r2, r5, 0
adds r2, 0xC1
movs r1, 0
strb r0, [r2]
adds r0, r5, 0
adds r0, 0xA0
str r1, [r0]
_080796E4:
cmp r6, 0xC
bne _080796FA
ldr r1, _0807971C
adds r0, r7, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC1
strb r0, [r1]
_080796FA:
adds r0, r7, 0
adds r1, r4, 0
bl sub_8041BD0
mov r0, r9
adds r1, r7, 0
ldr r2, [sp, 0x1C]
bl sub_80522F4
adds r0, r7, 0
bl sub_80418D4
movs r4, 0
ldr r6, _08079720
b _0807972C
.align 2, 0
_08079718: .4byte gUnknown_80F4E9C
_0807971C: .4byte gUnknown_80F4EA0
_08079720: .4byte 0x0000c7ff
_08079724:
movs r0, 0x53
bl sub_803E46C
adds r4, 0x1
_0807972C:
ldr r0, _08079760
cmp r4, r0
bgt _08079752
movs r1, 0x1
adds r0, r5, 0
adds r0, 0xFF
ldrb r0, [r0]
cmp r0, 0x1
bne _0807974E
movs r1, 0xBA
lsls r1, 1
adds r0, r5, r1
ldr r0, [r0]
movs r1, 0
cmp r0, r6
ble _0807974E
movs r1, 0x1
_0807974E:
cmp r1, 0
beq _08079724
_08079752:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08079760: .4byte 0x0000018f
thumb_func_end sub_8079618
thumb_func_start sub_8079764
sub_8079764:
push {r4,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807979A
ldr r2, [r4, 0x70]
adds r3, r2, 0
adds r3, 0xC0
ldrb r0, [r3]
cmp r0, 0x1
beq _08079794
cmp r0, 0xC
beq _08079794
movs r1, 0
strb r1, [r3]
movs r3, 0xA5
lsls r3, 1
adds r0, r2, r3
strb r1, [r0]
adds r0, r2, 0
adds r0, 0xFF
strb r1, [r0]
_08079794:
adds r0, r4, 0
bl sub_80418D4
_0807979A:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8079764
thumb_func_start sub_80797A0
sub_80797A0:
push {r4-r7,lr}
mov r7, r8
push {r7}
mov r8, r0
adds r4, r1, 0
lsls r2, 24
lsrs r7, r2, 24
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079822
ldr r6, [r4, 0x70]
ldr r0, _080797E0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r5, r6, 0
adds r5, 0xC4
ldrb r0, [r5]
cmp r0, r7
bne _080797E8
ldr r0, _080797E4
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
b _08079822
.align 2, 0
_080797E0: .4byte gUnknown_202DF98
_080797E4: .4byte gUnknown_80FB10C
_080797E8:
adds r0, r4, 0
bl nullsub_57
ldrb r0, [r5]
cmp r0, 0x4
beq _0807980A
cmp r0, 0xA
beq _0807980A
ldr r1, _0807982C
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xC5
strb r0, [r1]
_0807980A:
adds r0, r6, 0
adds r0, 0xC4
strb r7, [r0]
ldr r0, _08079830
ldr r2, [r0]
mov r0, r8
adds r1, r4, 0
bl sub_80522F4
adds r0, r4, 0
bl sub_80418D4
_08079822:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807982C: .4byte gUnknown_80F4E98
_08079830: .4byte gUnknown_80FB0E0
thumb_func_end sub_80797A0
thumb_func_start sub_8079834
sub_8079834:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080798A6
ldr r5, [r4, 0x70]
ldr r0, _08079888
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x2
beq _08079894
movs r0, 0x2
strb r0, [r1]
ldr r1, _0807988C
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_58
ldr r0, _08079890
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080798A0
.align 2, 0
_08079888: .4byte gUnknown_202DF98
_0807988C: .4byte gUnknown_80F4E88
_08079890: .4byte gUnknown_80FB048
_08079894:
ldr r0, _080798AC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_080798A0:
adds r0, r4, 0
bl sub_80418D4
_080798A6:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080798AC: .4byte gUnknown_80FB074
thumb_func_end sub_8079834
thumb_func_start sub_80798B0
sub_80798B0:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079922
ldr r5, [r4, 0x70]
ldr r0, _08079904
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0xE
beq _08079910
movs r0, 0xE
strb r0, [r1]
ldr r1, _08079908
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_59
ldr r0, _0807990C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _0807991C
.align 2, 0
_08079904: .4byte gUnknown_202DF98
_08079908: .4byte gUnknown_80F4E8C
_0807990C: .4byte gUnknown_80FB09C
_08079910:
ldr r0, _08079928
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_0807991C:
adds r0, r4, 0
bl sub_80418D4
_08079922:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079928: .4byte gUnknown_80FB0C4
thumb_func_end sub_80798B0
thumb_func_start sub_807992C
sub_807992C:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807999E
ldr r5, [r4, 0x70]
ldr r0, _08079980
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x6
beq _0807998C
movs r0, 0x6
strb r0, [r1]
ldr r1, _08079984
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl sub_8041B34
ldr r0, _08079988
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079998
.align 2, 0
_08079980: .4byte gUnknown_202DF98
_08079984: .4byte gUnknown_80F4EB4
_08079988: .4byte gUnknown_80FAE1C
_0807998C:
ldr r0, _080799A4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079998:
adds r0, r4, 0
bl sub_80418D4
_0807999E:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080799A4: .4byte gUnknown_80FAE3C
thumb_func_end sub_807992C
thumb_func_start sub_80799A8
sub_80799A8:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079A1A
ldr r5, [r4, 0x70]
ldr r0, _080799FC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x5
beq _08079A08
movs r0, 0x5
strb r0, [r1]
ldr r1, _08079A00
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_60
ldr r0, _08079A04
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079A14
.align 2, 0
_080799FC: .4byte gUnknown_202DF98
_08079A00: .4byte gUnknown_80F4E90
_08079A04: .4byte gUnknown_80FAF5C
_08079A08:
ldr r0, _08079A20
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079A14:
adds r0, r4, 0
bl sub_80418D4
_08079A1A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079A20: .4byte gUnknown_80FAF8C
thumb_func_end sub_80799A8
thumb_func_start sub_8079A24
sub_8079A24:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079A96
ldr r5, [r4, 0x70]
ldr r0, _08079A78
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x3
beq _08079A84
movs r0, 0x3
strb r0, [r1]
ldr r1, _08079A7C
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_61
ldr r0, _08079A80
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079A90
.align 2, 0
_08079A78: .4byte gUnknown_202DF98
_08079A7C: .4byte gUnknown_80F4E84
_08079A80: .4byte gUnknown_80FB130
_08079A84:
ldr r0, _08079A9C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079A90:
adds r0, r4, 0
bl sub_80418D4
_08079A96:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079A9C: .4byte gUnknown_80FB160
thumb_func_end sub_8079A24
thumb_func_start sub_8079AA0
sub_8079AA0:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079B12
ldr r5, [r4, 0x70]
ldr r0, _08079AF4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x1
beq _08079B00
movs r0, 0x1
strb r0, [r1]
ldr r1, _08079AF8
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_62
ldr r0, _08079AFC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079B0C
.align 2, 0
_08079AF4: .4byte gUnknown_202DF98
_08079AF8: .4byte gUnknown_80F4E80
_08079AFC: .4byte gUnknown_80FB17C
_08079B00:
ldr r0, _08079B18
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079B0C:
adds r0, r4, 0
bl sub_80418D4
_08079B12:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079B18: .4byte gUnknown_80FB1A8
thumb_func_end sub_8079AA0
thumb_func_start sub_8079B1C
sub_8079B1C:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079B98
adds r0, r4, 0
bl nullsub_63
ldr r5, [r4, 0x70]
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x7
beq _08079B7C
movs r0, 0x7
strb r0, [r1]
ldr r1, _08079B70
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
ldr r0, _08079B74
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08079B78
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079B92
.align 2, 0
_08079B70: .4byte gUnknown_80F4ED4
_08079B74: .4byte gUnknown_202DF98
_08079B78: .4byte gUnknown_80FB9B0
_08079B7C:
ldr r0, _08079BA0
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _08079BA4
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079B92:
adds r0, r4, 0
bl sub_80418D4
_08079B98:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079BA0: .4byte gUnknown_202DF98
_08079BA4: .4byte gUnknown_80FB9D8
thumb_func_end sub_8079B1C
thumb_func_start sub_8079BA8
sub_8079BA8:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079C1A
ldr r5, [r4, 0x70]
ldr r0, _08079BFC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x8
beq _08079C08
movs r0, 0x8
strb r0, [r1]
ldr r1, _08079C00
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_64
ldr r0, _08079C04
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079C14
.align 2, 0
_08079BFC: .4byte gUnknown_202DF98
_08079C00: .4byte gUnknown_80F4EE8
_08079C04: .4byte gUnknown_80FBAC0
_08079C08:
ldr r0, _08079C20
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079C14:
adds r0, r4, 0
bl sub_80418D4
_08079C1A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079C20: .4byte gUnknown_80FBAE4
thumb_func_end sub_8079BA8
thumb_func_start sub_8079C24
sub_8079C24:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079C96
ldr r5, [r4, 0x70]
ldr r0, _08079C78
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0x9
beq _08079C84
movs r0, 0x9
strb r0, [r1]
ldr r1, _08079C7C
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_65
ldr r0, _08079C80
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079C90
.align 2, 0
_08079C78: .4byte gUnknown_202DF98
_08079C7C: .4byte gUnknown_80F4EF8
_08079C80: .4byte gUnknown_80FBBF0
_08079C84:
ldr r0, _08079C9C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079C90:
adds r0, r4, 0
bl sub_80418D4
_08079C96:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079C9C: .4byte gUnknown_80FBC14
thumb_func_end sub_8079C24
thumb_func_start sub_8079CA0
sub_8079CA0:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079D12
ldr r5, [r4, 0x70]
ldr r0, _08079CF4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0xB
beq _08079D00
movs r0, 0xB
strb r0, [r1]
ldr r1, _08079CF8
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_66
ldr r0, _08079CFC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079D0C
.align 2, 0
_08079CF4: .4byte gUnknown_202DF98
_08079CF8: .4byte gUnknown_80F4F18
_08079CFC: .4byte gUnknown_80FBC38
_08079D00:
ldr r0, _08079D18
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079D0C:
adds r0, r4, 0
bl sub_80418D4
_08079D12:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079D18: .4byte gUnknown_80FBC5C
thumb_func_end sub_8079CA0
thumb_func_start sub_8079D1C
sub_8079D1C:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079DAE
ldr r6, [r4, 0x70]
adds r0, r4, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _08079D50
ldr r0, _08079D4C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08079DAE
.align 2, 0
_08079D4C: .4byte gPtrForecastPreventsConversion2Message
_08079D50:
ldr r0, _08079D90
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r6, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0xC
beq _08079D9C
movs r0, 0xC
strb r0, [r1]
ldr r1, _08079D94
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r6, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_67
ldr r0, _08079D98
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _08079DA8
.align 2, 0
_08079D90: .4byte gUnknown_202DF98
_08079D94: .4byte gUnknown_80F4F20
_08079D98: .4byte gUnknown_80FBC7C
_08079D9C:
ldr r0, _08079DB4
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08079DA8:
adds r0, r4, 0
bl sub_80418D4
_08079DAE:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079DB4: .4byte gUnknown_80FBCA4
thumb_func_end sub_8079D1C
thumb_func_start sub_8079DB8
sub_8079DB8:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079E2A
ldr r5, [r4, 0x70]
ldr r0, _08079E0C
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r1, r5, 0
adds r1, 0xC4
ldrb r0, [r1]
cmp r0, 0xD
beq _08079E18
movs r0, 0xD
strb r0, [r1]
ldr r1, _08079E10
adds r0, r4, 0
movs r2, 0
bl sub_808417C
adds r0, 0x1
adds r1, r5, 0
adds r1, 0xC5
strb r0, [r1]
adds r0, r4, 0
bl nullsub_68
ldr r0, _08079E14
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _08079E24
.align 2, 0
_08079E0C: .4byte gUnknown_202DF98
_08079E10: .4byte gUnknown_80F4F24
_08079E14: .4byte gUnknown_80FBCC8
_08079E18:
ldr r0, _08079E30
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
_08079E24:
adds r0, r4, 0
bl sub_80418D4
_08079E2A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08079E30: .4byte gUnknown_80FBCF0
thumb_func_end sub_8079DB8
thumb_func_start sub_8079E34
sub_8079E34:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
mov r8, r0
adds r5, r1, 0
lsls r2, 24
lsrs r2, 24
mov r9, r2
movs r6, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08079F0E
ldr r0, [r5, 0x70]
mov r12, r0
movs r4, 0
movs r7, 0xA
_08079E5C:
lsls r2, r4, 1
mov r0, r12
adds r0, 0x1C
adds r1, r0, r2
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0xA
beq _08079E70
strh r7, [r1]
movs r6, 0x1
_08079E70:
mov r0, r12
adds r0, 0x20
adds r1, r0, r2
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0xA
beq _08079E82
strh r7, [r1]
movs r6, 0x1
_08079E82:
mov r0, r12
adds r0, 0x24
adds r1, r0, r2
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0xA
beq _08079E94
strh r7, [r1]
movs r6, 0x1
_08079E94:
lsls r3, r4, 2
mov r0, r12
adds r0, 0x2C
adds r1, r0, r3
ldr r0, [r1]
movs r2, 0x80
lsls r2, 1
cmp r0, r2
beq _08079EAA
str r2, [r1]
movs r6, 0x1
_08079EAA:
mov r0, r12
adds r0, 0x34
adds r1, r0, r3
ldr r0, [r1]
cmp r0, r2
beq _08079EBA
str r2, [r1]
movs r6, 0x1
_08079EBA:
adds r4, 0x1
cmp r4, 0x1
ble _08079E5C
cmp r6, 0
beq _08079ECC
adds r0, r5, 0
bl sub_80420C8
b _08079ED8
_08079ECC:
mov r3, r9
cmp r3, 0
beq _08079ED8
adds r0, r5, 0
bl sub_80420C8
_08079ED8:
ldr r0, _08079EF4
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
cmp r6, 0
beq _08079EFC
ldr r0, _08079EF8
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _08079F08
.align 2, 0
_08079EF4: .4byte gUnknown_202DF98
_08079EF8: .4byte gUnknown_80FBD18
_08079EFC:
ldr r0, _08079F1C
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
_08079F08:
adds r0, r5, 0
bl sub_80418D4
_08079F0E:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08079F1C: .4byte gUnknown_80FBD3C
thumb_func_end sub_8079E34
thumb_func_start sub_8079F20
sub_8079F20:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r5, r0, 0
adds r4, r1, 0
lsls r2, 24
lsrs r2, 24
str r2, [sp]
lsls r3, 24
lsrs r3, 24
mov r10, r3
movs r0, 0
mov r8, r0
mov r9, r0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08079F50
b _0807A0B8
_08079F50:
ldr r7, [r4, 0x70]
adds r0, r4, 0
bl sub_8070A58
lsls r0, 24
cmp r0, 0
beq _08079FF2
movs r2, 0x1
mov r8, r2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_807A124
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _08079F7C
b _0807A0B8
_08079F7C:
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A290
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A324
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A400
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
bl sub_807A5D0
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A6C8
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A734
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A888
adds r0, r5, 0
adds r1, r4, 0
bl sub_807A924
adds r1, r7, 0
adds r1, 0xFD
ldrb r0, [r1]
cmp r0, 0
beq _08079FD8
mov r0, r9
strb r0, [r1]
ldr r0, _0807A08C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08079FD8:
adds r1, r7, 0
adds r1, 0xF5
ldrb r0, [r1]
cmp r0, 0
beq _08079FF2
mov r2, r9
strb r2, [r1]
ldr r0, _0807A090
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_08079FF2:
adds r0, r4, 0
bl sub_8070774
adds r6, r0, 0
movs r1, 0
movs r3, 0x4
ldr r2, _0807A094
adds r0, r7, r2
_0807A002:
strb r1, [r0]
subs r0, 0x1
subs r3, 0x1
cmp r3, 0
bge _0807A002
adds r0, r4, 0
bl sub_8070774
cmp r6, r0
beq _0807A032
movs r0, 0x1
mov r8, r0
ldr r1, _0807A098
movs r2, 0x82
lsls r2, 1
adds r0, r7, r2
ldr r0, [r0]
lsls r0, 2
adds r0, r1
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0807A032:
movs r6, 0x1
movs r0, 0x8C
lsls r0, 1
adds r2, r7, r0
movs r7, 0xFE
movs r3, 0x3
_0807A03E:
ldrb r1, [r2]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0807A05E
ldrb r1, [r2, 0x1]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _0807A05E
movs r0, 0x1
mov r8, r0
mov r9, r0
adds r0, r7, 0
ands r0, r1
strb r0, [r2, 0x1]
_0807A05E:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _0807A03E
mov r2, r8
cmp r2, 0
beq _0807A0A0
ldr r0, [sp]
cmp r0, 0
beq _0807A078
adds r0, r4, 0
bl sub_80420C8
_0807A078:
mov r2, r9
cmp r2, 0
beq _0807A0B2
ldr r0, _0807A09C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _0807A0B2
.align 2, 0
_0807A08C: .4byte gUnknown_8100594
_0807A090: .4byte gPtrExposedWoreOffMessage
_0807A094: .4byte 0x00000111
_0807A098: .4byte gUnknown_80FA124
_0807A09C: .4byte gPtrSealedMoveReleasedMessage
_0807A0A0:
mov r0, r10
cmp r0, 0
bne _0807A0B2
ldr r0, _0807A0C8
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0807A0B2:
adds r0, r4, 0
bl sub_80418D4
_0807A0B8:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807A0C8: .4byte gUnknown_81004E8
thumb_func_end sub_8079F20
thumb_func_start sub_807A0CC
sub_807A0CC:
push {r4-r7,lr}
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A11E
ldr r4, [r5, 0x70]
adds r0, r4, 0
movs r1, 0
bl sub_806BFC0
adds r1, r4, 0
adds r1, 0xFD
movs r0, 0
strb r0, [r1]
subs r1, 0x8
strb r0, [r1]
movs r7, 0x1
movs r6, 0xFE
movs r0, 0x8C
lsls r0, 1
adds r2, r4, r0
movs r3, 0x3
_0807A0FE:
ldrb r1, [r2]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
beq _0807A110
ldrb r1, [r2, 0x1]
adds r0, r6, 0
ands r0, r1
strb r0, [r2, 0x1]
_0807A110:
adds r2, 0x8
subs r3, 0x1
cmp r3, 0
bge _0807A0FE
adds r0, r5, 0
bl sub_80418D4
_0807A11E:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807A0CC
thumb_func_start sub_807A124
sub_807A124:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r6, r0, 0
adds r5, r1, 0
lsls r2, 24
lsrs r4, r2, 24
lsls r3, 24
lsrs r3, 24
mov r8, r3
movs r0, 0
mov r9, r0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807A14E
b _0807A27C
_0807A14E:
ldr r7, [r5, 0x70]
ldr r0, _0807A170
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r7, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x6
bls _0807A166
b _0807A260
_0807A166:
lsls r0, 2
ldr r1, _0807A174
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A170: .4byte gUnknown_202DF98
_0807A174: .4byte _0807A178
.align 2, 0
_0807A178:
.4byte _0807A260
.4byte _0807A194
.4byte _0807A1A0
.4byte _0807A1B4
.4byte _0807A228
.4byte _0807A1E8
.4byte _0807A260
_0807A194:
movs r1, 0x1
mov r9, r1
ldr r0, _0807A19C
b _0807A1A2
.align 2, 0
_0807A19C: .4byte gUnknown_80FA6E8
_0807A1A0:
ldr r0, _0807A1B0
_0807A1A2:
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
b _0807A260
.align 2, 0
_0807A1B0: .4byte gUnknown_80FA708
_0807A1B4:
movs r2, 0x1
mov r9, r2
ldr r0, _0807A1DC
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
mov r0, r8
cmp r0, 0
beq _0807A260
ldr r0, _0807A1E0
movs r2, 0
ldrsh r1, [r0, r2]
ldr r3, _0807A1E4
adds r0, r5, 0
movs r2, 0x8
bl sub_806F324
b _0807A260
.align 2, 0
_0807A1DC: .4byte gUnknown_80FA70C
_0807A1E0: .4byte gUnknown_80F4F78
_0807A1E4: .4byte 0x0000020f
_0807A1E8:
movs r0, 0x1
mov r9, r0
ldr r0, _0807A220
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
ldr r0, _0807A224
movs r1, 0
ldrsh r2, [r0, r1]
movs r4, 0
str r4, [sp]
adds r0, r6, 0
adds r1, r5, 0
movs r3, 0
bl sub_8077C44
adds r0, r7, 0
adds r0, 0xA8
strb r4, [r0]
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0x1
bl sub_8079F20
b _0807A260
.align 2, 0
_0807A220: .4byte gUnknown_80FA710
_0807A224: .4byte gUnknown_80F4F7A
_0807A228:
cmp r4, 0
beq _0807A254
adds r1, r7, 0
adds r1, 0xA8
movs r0, 0
strb r0, [r1]
ldr r1, _0807A250
adds r0, r5, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r2, 0x1
adds r0, r6, 0
adds r1, r5, 0
movs r3, 0x1
bl sub_8075C58
b _0807A27C
.align 2, 0
_0807A250: .4byte gUnknown_80F4F2C
_0807A254:
ldr r0, _0807A28C
ldr r2, [r0]
adds r0, r6, 0
adds r1, r5, 0
bl sub_80522F4
_0807A260:
adds r1, r7, 0
adds r1, 0xA8
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
bl sub_80418D4
mov r2, r9
cmp r2, 0
beq _0807A27C
adds r0, r5, 0
movs r1, 0x8
bl sub_806CE68
_0807A27C:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807A28C: .4byte gUnknown_80FA734
thumb_func_end sub_807A124
thumb_func_start sub_807A290
sub_807A290:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A31A
ldr r6, [r4, 0x70]
ldr r0, _0807A2C4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x5
bhi _0807A30C
lsls r0, 2
ldr r1, _0807A2C8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A2C4: .4byte gUnknown_202DF98
_0807A2C8: .4byte _0807A2CC
.align 2, 0
_0807A2CC:
.4byte _0807A30C
.4byte _0807A300
.4byte _0807A2E4
.4byte _0807A2E4
.4byte _0807A2EC
.4byte _0807A30C
_0807A2E4:
ldr r0, _0807A2E8
b _0807A2EE
.align 2, 0
_0807A2E8: .4byte gUnknown_80FA8A8
_0807A2EC:
ldr r0, _0807A2FC
_0807A2EE:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _0807A30C
.align 2, 0
_0807A2FC: .4byte gUnknown_80FA868
_0807A300:
ldr r0, _0807A320
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0807A30C:
adds r1, r6, 0
adds r1, 0xAC
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
_0807A31A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807A320: .4byte gUnknown_80FA888
thumb_func_end sub_807A290
thumb_func_start sub_807A324
sub_807A324:
push {r4-r7,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r7, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A3F4
ldr r6, [r4, 0x70]
ldr r0, _0807A358
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x8
bhi _0807A3DC
lsls r0, 2
ldr r1, _0807A35C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A358: .4byte gUnknown_202DF98
_0807A35C: .4byte _0807A360
.align 2, 0
_0807A360:
.4byte _0807A3DC
.4byte _0807A384
.4byte _0807A3A0
.4byte _0807A3B4
.4byte _0807A3B4
.4byte _0807A3A0
.4byte _0807A3D0
.4byte _0807A398
.4byte _0807A3DC
_0807A384:
ldr r0, _0807A394
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
movs r7, 0x1
b _0807A3DC
.align 2, 0
_0807A394: .4byte gUnknown_80FA8BC
_0807A398:
ldr r0, _0807A39C
b _0807A3A2
.align 2, 0
_0807A39C: .4byte gUnknown_80FA820
_0807A3A0:
ldr r0, _0807A3B0
_0807A3A2:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
b _0807A3DC
.align 2, 0
_0807A3B0: .4byte gUnknown_80FA824
_0807A3B4:
ldr r0, _0807A3CC
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
adds r0, r6, 0
adds r0, 0x9C
ldr r0, [r0]
bl sub_8076CB4
b _0807A3DC
.align 2, 0
_0807A3CC: .4byte gUnknown_80FA81C
_0807A3D0:
ldr r0, _0807A3FC
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
_0807A3DC:
adds r1, r6, 0
adds r1, 0xB0
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
cmp r7, 0
beq _0807A3F4
adds r0, r4, 0
bl sub_8042A74
_0807A3F4:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807A3FC: .4byte gUnknown_80FABF8
thumb_func_end sub_807A324
thumb_func_start sub_807A400
sub_807A400:
push {r4-r6,lr}
adds r4, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A4BC
ldr r6, [r5, 0x70]
ldr r0, _0807A434
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x8
bhi _0807A4A8
lsls r0, 2
ldr r1, _0807A438
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A434: .4byte gUnknown_202DF98
_0807A438: .4byte _0807A43C
.align 2, 0
_0807A43C:
.4byte _0807A4A8
.4byte _0807A49C
.4byte _0807A460
.4byte _0807A478
.4byte _0807A468
.4byte _0807A470
.4byte _0807A488
.4byte _0807A480
.4byte _0807A4A8
_0807A460:
ldr r0, _0807A464
b _0807A48A
.align 2, 0
_0807A464: .4byte gUnknown_80FA800
_0807A468:
ldr r0, _0807A46C
b _0807A48A
.align 2, 0
_0807A46C: .4byte gUnknown_80FA97C
_0807A470:
ldr r0, _0807A474
b _0807A48A
.align 2, 0
_0807A474: .4byte gUnknown_80FA9DC
_0807A478:
ldr r0, _0807A47C
b _0807A48A
.align 2, 0
_0807A47C: .4byte gUnknown_80FAC38
_0807A480:
ldr r0, _0807A484
b _0807A48A
.align 2, 0
_0807A484: .4byte gUnknown_80FAB90
_0807A488:
ldr r0, _0807A498
_0807A48A:
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
b _0807A4A8
.align 2, 0
_0807A498: .4byte gUnknown_80FAAAC
_0807A49C:
ldr r0, _0807A4C4
ldr r2, [r0]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80522F4
_0807A4A8:
adds r1, r6, 0
adds r1, 0xBC
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
bl sub_80418D4
adds r0, r5, 0
bl sub_8070774
_0807A4BC:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807A4C4: .4byte gUnknown_80FAC18
thumb_func_end sub_807A400
thumb_func_start sub_807A4C8
sub_807A4C8:
push {r4,r5,lr}
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807A4DA
b _0807A5C4
_0807A4DA:
ldr r5, [r4, 0x70]
ldr r0, _0807A4FC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xF
bhi _0807A5B6
lsls r0, 2
ldr r1, _0807A500
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A4FC: .4byte gUnknown_202DF98
_0807A500: .4byte _0807A504
.align 2, 0
_0807A504:
.4byte _0807A5B6
.4byte _0807A544
.4byte _0807A54C
.4byte _0807A554
.4byte _0807A55C
.4byte _0807A564
.4byte _0807A56C
.4byte _0807A574
.4byte _0807A57C
.4byte _0807A584
.4byte _0807A55C
.4byte _0807A58C
.4byte _0807A594
.4byte _0807A59C
.4byte _0807A5AC
.4byte _0807A5B6
_0807A544:
ldr r0, _0807A548
b _0807A59E
.align 2, 0
_0807A548: .4byte gUnknown_80FA638
_0807A54C:
ldr r0, _0807A550
b _0807A59E
.align 2, 0
_0807A550: .4byte gUnknown_80FA69C
_0807A554:
ldr r0, _0807A558
b _0807A59E
.align 2, 0
_0807A558: .4byte gUnknown_80FA658
_0807A55C:
ldr r0, _0807A560
b _0807A59E
.align 2, 0
_0807A560: .4byte gUnknown_80FA67C
_0807A564:
ldr r0, _0807A568
b _0807A59E
.align 2, 0
_0807A568: .4byte gUnknown_80FA6BC
_0807A56C:
ldr r0, _0807A570
b _0807A59E
.align 2, 0
_0807A570: .4byte gUnknown_80FA6D4
_0807A574:
ldr r0, _0807A578
b _0807A59E
.align 2, 0
_0807A578: .4byte gUnknown_80FA9C0
_0807A57C:
ldr r0, _0807A580
b _0807A59E
.align 2, 0
_0807A580: .4byte gUnknown_80FAA68
_0807A584:
ldr r0, _0807A588
b _0807A59E
.align 2, 0
_0807A588: .4byte gUnknown_80FAAC8
_0807A58C:
ldr r0, _0807A590
b _0807A59E
.align 2, 0
_0807A590: .4byte gUnknown_80FAAE8
_0807A594:
ldr r0, _0807A598
b _0807A59E
.align 2, 0
_0807A598: .4byte gUnknown_80FAB08
_0807A59C:
ldr r0, _0807A5A8
_0807A59E:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0807A5B6
.align 2, 0
_0807A5A8: .4byte gUnknown_80FAB28
_0807A5AC:
ldr r0, _0807A5CC
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0807A5B6:
adds r1, r5, 0
adds r1, 0xC4
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
_0807A5C4:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807A5CC: .4byte gUnknown_80FAB40
thumb_func_end sub_807A4C8
thumb_func_start sub_807A5D0
sub_807A5D0:
push {r4-r7,lr}
adds r5, r1, 0
lsls r2, 24
lsrs r6, r2, 24
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A6B2
ldr r7, [r5, 0x70]
ldr r0, _0807A604
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r7, 0
adds r0, 0xC8
ldrb r0, [r0]
cmp r0, 0x4
bhi _0807A6A4
lsls r0, 2
ldr r1, _0807A608
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A604: .4byte gUnknown_202DF98
_0807A608: .4byte _0807A60C
.align 2, 0
_0807A60C:
.4byte _0807A6A4
.4byte _0807A620
.4byte _0807A668
.4byte _0807A634
.4byte _0807A6A4
_0807A620:
cmp r6, 0x1
beq _0807A6A4
ldr r0, _0807A630
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807A6A4
.align 2, 0
_0807A630: .4byte gUnknown_80FA7BC
_0807A634:
cmp r6, 0x3
beq _0807A642
ldr r0, _0807A658
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_0807A642:
ldr r0, _0807A65C
ldr r0, [r0]
ldr r2, _0807A660
adds r1, r0, r2
movs r2, 0
str r2, [r1]
ldr r1, _0807A664
adds r0, r1
str r2, [r0]
b _0807A6A4
.align 2, 0
_0807A658: .4byte gUnknown_80FA7DC
_0807A65C: .4byte gUnknown_203B418
_0807A660: .4byte 0x00017b30
_0807A664: .4byte 0x00017b3c
_0807A668:
adds r0, r7, 0
adds r0, 0xC8
movs r4, 0
strb r4, [r0]
adds r0, r5, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_806CCB4
ldr r0, _0807A6B8
ldr r0, [r0]
ldr r2, _0807A6BC
adds r0, r2
strb r4, [r0]
cmp r6, 0x2
beq _0807A6A4
ldr r0, _0807A6C0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807A6C4
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_0807A6A4:
adds r1, r7, 0
adds r1, 0xC8
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
bl sub_80418D4
_0807A6B2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807A6B8: .4byte gUnknown_203B418
_0807A6BC: .4byte 0x000037fc
_0807A6C0: .4byte gUnknown_202DF98
_0807A6C4: .4byte gUnknown_80FA9A0
thumb_func_end sub_807A5D0
thumb_func_start sub_807A6C8
sub_807A6C8:
push {r4,r5,lr}
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A72A
ldr r5, [r4, 0x70]
ldr r0, _0807A6F8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xD0
ldrb r0, [r0]
cmp r0, 0x1
beq _0807A6FC
cmp r0, 0x1
ble _0807A716
cmp r0, 0x2
beq _0807A70C
b _0807A716
.align 2, 0
_0807A6F8: .4byte gUnknown_202DF98
_0807A6FC:
ldr r0, _0807A708
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0807A716
.align 2, 0
_0807A708: .4byte gUnknown_80FA79C
_0807A70C:
ldr r0, _0807A730
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0807A716:
adds r1, r5, 0
adds r1, 0xD0
movs r0, 0
strb r0, [r1]
adds r1, 0x8
movs r0, 0xFF
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
_0807A72A:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807A730: .4byte gUnknown_80FAA8C
thumb_func_end sub_807A6C8
thumb_func_start sub_807A734
sub_807A734:
push {r4,r5,lr}
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A7BC
ldr r5, [r4, 0x70]
ldr r0, _0807A764
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xDC
ldrb r0, [r0]
cmp r0, 0x5
bhi _0807A7AE
lsls r0, 2
ldr r1, _0807A768
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A764: .4byte gUnknown_202DF98
_0807A768: .4byte _0807A76C
.align 2, 0
_0807A76C:
.4byte _0807A7AE
.4byte _0807A784
.4byte _0807A78C
.4byte _0807A794
.4byte _0807A7A4
.4byte _0807A7AE
_0807A784:
ldr r0, _0807A788
b _0807A796
.align 2, 0
_0807A788: .4byte gUnknown_80FA8E0
_0807A78C:
ldr r0, _0807A790
b _0807A796
.align 2, 0
_0807A790: .4byte gUnknown_80FA90C
_0807A794:
ldr r0, _0807A7A0
_0807A796:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0807A7AE
.align 2, 0
_0807A7A0: .4byte gUnknown_80FA934
_0807A7A4:
ldr r0, _0807A7C4
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0807A7AE:
adds r1, r5, 0
adds r1, 0xDC
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
_0807A7BC:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807A7C4: .4byte gUnknown_80FA95C
thumb_func_end sub_807A734
thumb_func_start sub_807A7C8
sub_807A7C8:
push {r4-r6,lr}
adds r4, r1, 0
movs r6, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A87E
ldr r5, [r4, 0x70]
ldr r0, _0807A7FC
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x4
bhi _0807A866
lsls r0, 2
ldr r1, _0807A800
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A7FC: .4byte gUnknown_202DF98
_0807A800: .4byte _0807A804
.align 2, 0
_0807A804:
.4byte _0807A866
.4byte _0807A818
.4byte _0807A834
.4byte _0807A824
.4byte _0807A866
_0807A818:
movs r6, 0x1
ldr r0, _0807A820
b _0807A826
.align 2, 0
_0807A820: .4byte gUnknown_80FA9F4
_0807A824:
ldr r0, _0807A830
_0807A826:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0807A866
.align 2, 0
_0807A830: .4byte gUnknown_80FABBC
_0807A834:
movs r0, 0x2
ldrsh r1, [r5, r0]
adds r0, r4, 0
bl sub_8069F54
strh r0, [r5, 0x4]
movs r1, 0x4
ldrsh r0, [r5, r1]
bl sub_80687D0
str r0, [r4, 0x64]
adds r0, r4, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_806CCB4
ldr r0, _0807A884
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0807A866:
adds r1, r5, 0
adds r1, 0xE4
movs r0, 0
strb r0, [r1]
adds r0, r4, 0
bl sub_80418D4
cmp r6, 0
beq _0807A87E
movs r0, 0x1
bl sub_807EC28
_0807A87E:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807A884: .4byte gUnknown_80FAB6C
thumb_func_end sub_807A7C8
thumb_func_start sub_807A888
sub_807A888:
push {r4,r5,lr}
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A918
ldr r5, [r4, 0x70]
ldr r0, _0807A8B8
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
adds r0, 0xE8
ldrb r0, [r0]
cmp r0, 0x4
bhi _0807A8F6
lsls r0, 2
ldr r1, _0807A8BC
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807A8B8: .4byte gUnknown_202DF98
_0807A8BC: .4byte _0807A8C0
.align 2, 0
_0807A8C0:
.4byte _0807A8F6
.4byte _0807A8D4
.4byte _0807A8DC
.4byte _0807A8EC
.4byte _0807A8F6
_0807A8D4:
ldr r0, _0807A8D8
b _0807A8DE
.align 2, 0
_0807A8D8: .4byte gUnknown_80FAA0C
_0807A8DC:
ldr r0, _0807A8E8
_0807A8DE:
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
b _0807A8F6
.align 2, 0
_0807A8E8: .4byte gUnknown_80FAA2C
_0807A8EC:
ldr r0, _0807A920
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
_0807A8F6:
adds r0, r5, 0
adds r0, 0xE8
movs r1, 0
strb r1, [r0]
adds r0, r4, 0
bl sub_80418D4
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0807A918
movs r0, 0x31
bl sub_803E46C
bl sub_8049ED4
bl sub_8040A84
_0807A918:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807A920: .4byte gUnknown_80FAA48
thumb_func_end sub_807A888
thumb_func_start sub_807A924
sub_807A924:
push {r4,r5,lr}
adds r5, r1, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807A95C
ldr r4, [r5, 0x70]
ldr r0, _0807A964
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r4, 0xEC
ldrb r0, [r4]
cmp r0, 0x1
bne _0807A952
ldr r0, _0807A968
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_0807A952:
movs r0, 0
strb r0, [r4]
adds r0, r5, 0
bl sub_80418D4
_0807A95C:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807A964: .4byte gUnknown_202DF98
_0807A968: .4byte gUnknown_80FABC0
thumb_func_end sub_807A924
thumb_func_start sub_807A96C
sub_807A96C:
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
ldr r0, [r4, 0x70]
adds r5, r0, 0
movs r2, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x6
bne _0807A988
adds r0, r6, 0
bl sub_807A324
movs r2, 0x1
_0807A988:
adds r0, r5, 0
adds r0, 0xA8
ldrh r1, [r0]
ldr r0, _0807A9AC
cmp r1, r0
bne _0807A9A2
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_807A124
movs r2, 0x1
_0807A9A2:
adds r0, r2, 0
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0807A9AC: .4byte 0x00007f01
thumb_func_end sub_807A96C
thumb_func_start sub_807A9B0
sub_807A9B0:
push {r4,lr}
adds r4, r0, 0
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xA8
movs r2, 0
strb r2, [r1]
adds r0, 0xA9
strb r2, [r0]
adds r0, r4, 0
movs r1, 0x1
movs r2, 0x1
bl sub_806A898
adds r0, r4, 0
bl sub_80418D4
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_807A9B0
thumb_func_start sub_807A9D8
sub_807A9D8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807AA20
ldr r2, [r4, 0x70]
adds r3, r2, 0
adds r3, 0xB0
ldrb r0, [r3]
cmp r0, 0x1
bne _0807AA20
movs r1, 0
strb r1, [r3]
adds r0, r2, 0
adds r0, 0xB8
strb r1, [r0]
adds r0, 0x1
strb r1, [r0]
ldr r0, _0807AA28
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807AA2C
ldr r2, [r0]
adds r0, r5, 0
adds r1, r4, 0
bl sub_80522F4
adds r0, r4, 0
bl sub_80418D4
_0807AA20:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0807AA28: .4byte gUnknown_202DF98
_0807AA2C: .4byte gUnknown_80FA8BC
thumb_func_end sub_807A9D8
thumb_func_start sub_807AA30
sub_807AA30:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
movs r4, 0
_0807AA3C:
ldr r0, _0807AAD8
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _0807AADC
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
adds r4, 0x1
mov r10, r4
cmp r0, 0
beq _0807AB22
ldr r1, [r5, 0x70]
adds r0, r1, 0
adds r0, 0xA8
ldrb r0, [r0]
cmp r0, 0x1
bne _0807AB22
adds r0, r1, 0
adds r0, 0xA9
ldrb r0, [r0]
cmp r0, 0x7F
bne _0807AB22
movs r0, 0
mov r9, r0
mov r8, r0
adds r0, r5, 0
bl sub_80450FC
lsls r0, 24
lsrs r7, r0, 24
movs r6, 0
_0807AA82:
ldr r0, _0807AAD8
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0807AAE0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807AB00
adds r0, r4, 0
movs r1, 0x18
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
bne _0807AB00
movs r0, 0x4
ldrsh r1, [r4, r0]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0807AABA
negs r1, r1
_0807AABA:
cmp r1, 0x1
bgt _0807AAE4
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0807AACE
negs r1, r1
_0807AACE:
cmp r1, 0x1
bgt _0807AAE4
movs r0, 0x1
mov r9, r0
b _0807AB06
.align 2, 0
_0807AAD8: .4byte gUnknown_203B418
_0807AADC: .4byte 0x0001358c
_0807AAE0: .4byte 0x0001357c
_0807AAE4:
adds r0, r4, 0
movs r1, 0x1D
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0807AB00
adds r0, r4, 0
bl sub_80450FC
lsls r0, 24
lsrs r0, 24
cmp r7, r0
beq _0807AB1C
_0807AB00:
adds r6, 0x1
cmp r6, 0x3
ble _0807AA82
_0807AB06:
mov r2, r8
cmp r2, 0
bne _0807AB1C
mov r0, r9
cmp r0, 0
beq _0807AB16
movs r2, 0x1
mov r8, r2
_0807AB16:
mov r0, r8
cmp r0, 0
beq _0807AB22
_0807AB1C:
adds r0, r5, 0
bl sub_807A9B0
_0807AB22:
mov r4, r10
cmp r4, 0xF
ble _0807AA3C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807AA30
thumb_func_start sub_807AB38
sub_807AB38:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1A8
adds r2, r0, 0
lsls r1, 24
lsrs r4, r1, 24
ldr r0, [r2, 0x70]
ldrb r0, [r0, 0x6]
cmp r0, 0
beq _0807AB54
b _0807ADA6
_0807AB54:
adds r0, r2, 0
str r2, [sp, 0x1A4]
bl sub_8045128
ldrh r1, [r0]
movs r0, 0x40
ands r0, r1
ldr r2, [sp, 0x1A4]
cmp r0, 0
bne _0807AB6A
b _0807ADA6
_0807AB6A:
ldr r3, _0807AC10
ldr r0, [r3]
ldr r5, _0807AC14
adds r1, r0, r5
ldrb r0, [r1]
cmp r0, 0
beq _0807AB7A
b _0807ADA6
_0807AB7A:
movs r0, 0x1
strb r0, [r1]
ldr r3, [r3]
ldr r1, _0807AC18
adds r0, r3, r1
ldrb r1, [r0]
cmp r1, 0xFF
bne _0807AB8C
b _0807ADA6
_0807AB8C:
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r5, _0807AC1C
adds r0, r5
adds r3, r0
movs r0, 0
mov r8, r0
cmp r4, 0
beq _0807AC20
movs r1, 0x6
ldrsh r0, [r2, r1]
subs r6, r0, 0x4
adds r0, 0x4
cmp r6, r0
ble _0807ABAE
b _0807ACB4
_0807ABAE:
movs r4, 0x4
ldrsh r0, [r2, r4]
subs r4, r0, 0x4
adds r0, 0x4
adds r5, r6, 0x1
mov r9, r5
cmp r4, r0
bgt _0807AC00
mov r1, r8
lsls r0, r1, 2
mov r1, sp
adds r5, r0, r1
_0807ABC6:
adds r0, r4, 0
adds r1, r6, 0
str r2, [sp, 0x1A4]
bl sub_8049590
adds r1, r0, 0
ldr r0, [r1, 0x10]
ldr r2, [sp, 0x1A4]
cmp r0, 0
bne _0807ABF4
ldrh r1, [r1]
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
bne _0807ABF4
mov r0, r8
cmp r0, 0x63
bgt _0807ABF4
strh r4, [r5]
strh r6, [r5, 0x2]
adds r5, 0x4
movs r1, 0x1
add r8, r1
_0807ABF4:
adds r4, 0x1
movs r1, 0x4
ldrsh r0, [r2, r1]
adds r0, 0x4
cmp r4, r0
ble _0807ABC6
_0807AC00:
mov r6, r9
movs r4, 0x6
ldrsh r0, [r2, r4]
adds r0, 0x4
cmp r6, r0
ble _0807ABAE
b _0807ACB4
.align 2, 0
_0807AC10: .4byte gUnknown_203B418
_0807AC14: .4byte 0x00000671
_0807AC18: .4byte 0x00003a0c
_0807AC1C: .4byte 0x000104c4
_0807AC20:
movs r5, 0x4
ldrsh r0, [r2, r5]
subs r1, r0, 0x4
movs r5, 0x2
ldrsh r4, [r3, r5]
mov r10, r4
cmp r10, r1
bge _0807AC32
mov r10, r1
_0807AC32:
adds r1, r0, 0x5
movs r0, 0x6
ldrsh r7, [r3, r0]
cmp r7, r1
ble _0807AC3E
adds r7, r1, 0
_0807AC3E:
movs r1, 0x6
ldrsh r0, [r2, r1]
subs r2, r0, 0x4
movs r4, 0x4
ldrsh r1, [r3, r4]
cmp r1, r2
bge _0807AC4E
adds r1, r2, 0
_0807AC4E:
adds r0, 0x5
movs r5, 0x8
ldrsh r2, [r3, r5]
cmp r2, r0
ble _0807AC5A
adds r2, r0, 0
_0807AC5A:
adds r6, r1, 0
cmp r6, r2
bge _0807ACB4
_0807AC60:
mov r4, r10
adds r0, r6, 0x1
mov r9, r0
cmp r4, r7
bge _0807ACAE
mov r1, r8
lsls r0, r1, 2
mov r1, sp
adds r5, r0, r1
_0807AC72:
adds r0, r4, 0
adds r1, r6, 0
str r2, [sp, 0x1A4]
bl sub_8049590
adds r1, r0, 0
ldr r0, [r1, 0x10]
ldr r2, [sp, 0x1A4]
cmp r0, 0
bne _0807ACA8
ldrh r1, [r1]
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
bne _0807ACA8
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0807ACA8
mov r0, r8
cmp r0, 0x63
bgt _0807ACA8
strh r4, [r5]
strh r6, [r5, 0x2]
adds r5, 0x4
movs r1, 0x1
add r8, r1
_0807ACA8:
adds r4, 0x1
cmp r4, r7
blt _0807AC72
_0807ACAE:
mov r6, r9
cmp r6, r2
blt _0807AC60
_0807ACB4:
ldr r0, _0807AD74
movs r2, 0
ldrsh r0, [r0, r2]
ldr r1, _0807AD78
movs r4, 0
ldrsh r1, [r1, r4]
bl sub_808411C
adds r7, r0, 0
cmp r7, r8
blt _0807ACCC
mov r7, r8
_0807ACCC:
movs r6, 0
cmp r6, r7
bge _0807ADA0
mov r10, r6
_0807ACD4:
mov r0, r8
bl sub_8084100
adds r2, r0, 0
movs r3, 0
cmp r3, r8
bge _0807AD0C
lsls r0, r2, 2
mov r5, sp
adds r1, r5, r0
movs r4, 0
ldrsh r1, [r1, r4]
adds r5, r0, 0
cmp r1, 0
bne _0807AD1C
_0807ACF2:
adds r2, 0x1
cmp r2, r8
blt _0807ACFA
movs r2, 0
_0807ACFA:
adds r3, 0x1
cmp r3, r8
bge _0807AD0C
lsls r0, r2, 2
add r0, sp
movs r5, 0
ldrsh r0, [r0, r5]
cmp r0, 0
beq _0807ACF2
_0807AD0C:
lsls r0, r2, 2
mov r2, sp
adds r1, r2, r0
movs r4, 0
ldrsh r1, [r1, r4]
adds r5, r0, 0
cmp r1, 0
beq _0807ADA0
_0807AD1C:
movs r0, 0x1
bl sub_803D970
add r4, sp, 0x190
movs r1, 0
strh r0, [r4]
mov r0, r10
strh r0, [r4, 0x8]
strb r1, [r4, 0x2]
mov r1, r10
str r1, [r4, 0x4]
movs r0, 0x1
strb r0, [r4, 0x10]
mov r2, sp
adds r1, r2, r5
ldrh r0, [r1]
strh r0, [r4, 0xC]
ldrh r0, [r1, 0x2]
strh r0, [r4, 0xE]
movs r5, 0
ldrsh r0, [r4, r5]
movs r1, 0x1
bl sub_806AA0C
lsls r0, 24
adds r6, 0x1
mov r9, r6
cmp r0, 0
beq _0807AD9A
adds r0, r4, 0
movs r1, 0
bl sub_806B7F8
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807AD9A
movs r0, 0xC8
lsls r0, 8
str r0, [r4, 0x1C]
movs r5, 0
b _0807AD84
.align 2, 0
_0807AD74: .4byte gUnknown_80F4DA2
_0807AD78: .4byte gUnknown_80F4DA4
_0807AD7C:
movs r0, 0x57
bl sub_803E46C
adds r5, 0x1
_0807AD84:
cmp r5, 0x63
bgt _0807AD96
ldr r0, [r4, 0x1C]
movs r1, 0xAA
bl sub_8009DA4
str r0, [r4, 0x1C]
cmp r0, 0xFF
bgt _0807AD7C
_0807AD96:
mov r0, r10
str r0, [r4, 0x1C]
_0807AD9A:
mov r6, r9
cmp r6, r7
blt _0807ACD4
_0807ADA0:
movs r0, 0x1
bl sub_804178C
_0807ADA6:
add sp, 0x1A8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807AB38
thumb_func_start sub_807ADB8
sub_807ADB8:
push {r4-r7,lr}
adds r5, r0, 0
lsls r1, 24
lsrs r7, r1, 24
ldr r4, [r5, 0x70]
adds r0, r4, 0
adds r0, 0x79
movs r6, 0
strb r6, [r0]
adds r0, 0x1
strb r6, [r0]
adds r0, 0x1
strb r6, [r0]
adds r0, r5, 0
movs r1, 0x7
bl sub_80718AC
lsls r0, 24
cmp r0, 0
beq _0807ADFA
movs r1, 0x10
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
movs r2, 0xE
ldrsh r1, [r4, r2]
asrs r0, 1
cmp r1, r0
bgt _0807ADFA
adds r0, r4, 0
adds r0, 0x44
strh r6, [r0]
b _0807AEB4
_0807ADFA:
adds r0, r5, 0
movs r1, 0x9
bl sub_80718AC
lsls r0, 24
cmp r0, 0
beq _0807AE12
adds r1, r4, 0
adds r1, 0x44
movs r0, 0
strh r0, [r1]
b _0807AEB4
_0807AE12:
ldrb r0, [r4, 0x7]
cmp r0, 0
bne _0807AE32
movs r1, 0x9E
lsls r1, 1
adds r0, r4, r1
ldr r0, [r0]
bl sub_8094450
adds r1, r0, 0
cmp r1, 0
bne _0807AE32
adds r0, r4, 0
adds r0, 0x44
strh r1, [r0]
b _0807AEB4
_0807AE32:
adds r0, r4, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x1
bne _0807AE6A
adds r0, r4, 0
adds r0, 0x44
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_8044CA0
movs r0, 0x8
bl sub_8084100
adds r1, r4, 0
adds r1, 0x46
strb r0, [r1]
ldrh r1, [r5, 0x4]
movs r2, 0xB6
lsls r2, 1
adds r0, r4, r2
strh r1, [r0]
ldrh r0, [r5, 0x6]
subs r0, 0x1
adds r2, 0x2
adds r1, r4, r2
strh r0, [r1]
b _0807AEB4
_0807AE6A:
adds r0, r5, 0
adds r1, r7, 0
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _0807AE80
adds r0, r5, 0
bl sub_807B5E0
b _0807AE9C
_0807AE80:
adds r0, r5, 0
bl sub_807AEBC
lsls r0, 24
cmp r0, 0
beq _0807AE96
adds r1, r4, 0
adds r1, 0x44
movs r0, 0x3F
strh r0, [r1]
b _0807AEB4
_0807AE96:
adds r0, r5, 0
bl sub_807AF58
_0807AE9C:
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0807AEAC
adds r0, r4, 0
adds r0, 0x44
strh r2, [r0]
b _0807AEB4
_0807AEAC:
adds r0, r5, 0
adds r1, r7, 0
bl sub_807B2D8
_0807AEB4:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807ADB8
thumb_func_start sub_807AEBC
sub_807AEBC:
push {r4-r6,lr}
adds r4, r0, 0
ldr r5, [r4, 0x70]
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807AF50
adds r0, r4, 0
bl sub_8070C60
lsls r0, 24
cmp r0, 0
bne _0807AF50
adds r0, r4, 0
bl sub_8045128
adds r6, r0, 0
ldr r4, [r6, 0x14]
cmp r4, 0
beq _0807AF50
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x5
bhi _0807AF50
lsls r0, 2
ldr r1, _0807AEFC
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0807AEFC: .4byte _0807AF00
.align 2, 0
_0807AF00:
.4byte _0807AF50
.4byte _0807AF50
.4byte _0807AF50
.4byte _0807AF18
.4byte _0807AF50
.4byte _0807AF50
_0807AF18:
ldrb r0, [r5, 0x7]
cmp r0, 0
bne _0807AF50
adds r0, r5, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0807AF50
ldrh r1, [r6]
movs r0, 0x3
ands r0, r1
cmp r0, 0
bne _0807AF3C
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _0807AF50
_0807AF3C:
adds r0, r4, 0
bl sub_8045108
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0807AF50
movs r0, 0x1
b _0807AF52
_0807AF50:
movs r0, 0
_0807AF52:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_807AEBC
thumb_func_start sub_807AF58
sub_807AF58:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
mov r8, r0
ldr r7, [r0, 0x70]
bl sub_8072C88
lsls r0, 24
cmp r0, 0
beq _0807AF74
b _0807B12C
_0807AF74:
ldr r0, _0807AF8C
ldr r1, [r0]
ldr r2, _0807AF90
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807AF98
ldr r3, _0807AF94
adds r6, r1, r3
movs r4, 0x14
mov r10, r4
b _0807AFB4
.align 2, 0
_0807AF8C: .4byte gUnknown_203B418
_0807AF90: .4byte 0x000037fc
_0807AF94: .4byte 0x000135cc
_0807AF98:
ldrb r0, [r7, 0x6]
cmp r0, 0
beq _0807AFAC
ldr r0, _0807AFA8
adds r6, r1, r0
movs r1, 0x4
mov r10, r1
b _0807AFB4
.align 2, 0
_0807AFA8: .4byte 0x0001357c
_0807AFAC:
ldr r2, _0807B01C
adds r6, r1, r2
movs r3, 0x10
mov r10, r3
_0807AFB4:
mov r0, r8
bl sub_8070460
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x4]
movs r4, 0x1
negs r4, r4
str r4, [sp]
ldr r0, _0807B020
mov r9, r0
movs r5, 0
adds r1, r7, 0
adds r1, 0x78
str r1, [sp, 0x8]
cmp r5, r10
bge _0807B09E
_0807AFD6:
lsls r0, r5, 2
adds r0, r6
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807B098
ldr r0, [r4, 0x70]
adds r1, r0, 0
adds r1, 0xA4
ldrb r1, [r1]
adds r2, r0, 0
cmp r1, 0
bne _0807B098
ldr r0, _0807B024
ldr r0, [r0]
ldr r3, _0807B028
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _0807B02C
mov r0, r8
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0807B098
ldr r2, [r4, 0x70]
b _0807B03C
.align 2, 0
_0807B01C: .4byte 0x0001358c
_0807B020: .4byte 0x000003e7
_0807B024: .4byte gUnknown_203B418
_0807B028: .4byte 0x000037fc
_0807B02C:
ldrb r0, [r7, 0x6]
cmp r0, 0
bne _0807B03C
adds r0, r2, 0
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x6
beq _0807B098
_0807B03C:
ldrb r0, [r2, 0x8]
cmp r0, 0x1
beq _0807B098
ldr r0, [sp, 0x4]
cmp r0, 0
beq _0807B074
mov r2, r8
movs r3, 0x4
ldrsh r1, [r2, r3]
movs r2, 0x4
ldrsh r0, [r4, r2]
subs r1, r0
cmp r1, 0
bge _0807B05A
negs r1, r1
_0807B05A:
cmp r1, 0x5
bgt _0807B074
mov r3, r8
movs r0, 0x6
ldrsh r1, [r3, r0]
movs r2, 0x6
ldrsh r0, [r4, r2]
subs r1, r0
cmp r1, 0
bge _0807B070
negs r1, r1
_0807B070:
cmp r1, 0x5
ble _0807B082
_0807B074:
mov r0, r8
adds r1, r4, 0
bl sub_8045A00
lsls r0, 24
cmp r0, 0
beq _0807B098
_0807B082:
adds r1, r4, 0x4
mov r0, r8
adds r0, 0x4
bl sub_8098434
cmp r9, r0
ble _0807B098
mov r9, r0
str r5, [sp]
cmp r0, 0x1
ble _0807B09E
_0807B098:
adds r5, 0x1
cmp r5, r10
blt _0807AFD6
_0807B09E:
ldr r3, [sp]
cmp r3, 0
blt _0807B12C
movs r2, 0
movs r5, 0x1
ldr r4, [sp, 0x8]
strb r5, [r4]
adds r1, r7, 0
adds r1, 0x88
lsls r0, r3, 2
adds r4, r0, r6
ldr r0, [r4]
ldr r0, [r0, 0x4]
str r0, [r1]
subs r1, 0x8
ldr r0, [r4]
str r0, [r1]
ldrh r1, [r0, 0x26]
adds r0, r7, 0
adds r0, 0x7C
strh r1, [r0]
subs r0, 0x2
strb r5, [r0]
movs r1, 0x8A
lsls r1, 1
adds r0, r7, r1
str r2, [r0]
mov r0, r8
movs r1, 0x8
bl sub_80718AC
lsls r0, 24
cmp r0, 0
bne _0807B0E4
b _0807B2C6
_0807B0E4:
mov r0, r8
bl sub_80719C4
lsls r0, 24
cmp r0, 0
beq _0807B0F2
b _0807B2C6
_0807B0F2:
mov r2, r8
movs r3, 0x4
ldrsh r1, [r2, r3]
ldr r2, [r4]
movs r4, 0x4
ldrsh r0, [r2, r4]
subs r1, r0
cmp r1, 0
bge _0807B106
negs r1, r1
_0807B106:
cmp r1, 0x1
ble _0807B10C
b _0807B2C6
_0807B10C:
mov r0, r8
movs r3, 0x6
ldrsh r1, [r0, r3]
movs r4, 0x6
ldrsh r0, [r2, r4]
subs r0, r1, r0
cmp r0, 0
bge _0807B11E
negs r0, r0
_0807B11E:
cmp r0, 0x1
ble _0807B124
b _0807B2C6
_0807B124:
adds r0, r7, 0
adds r0, 0x7B
strb r5, [r0]
b _0807B2C6
_0807B12C:
mov r0, r8
movs r1, 0x1
bl sub_80718AC
lsls r0, 24
cmp r0, 0
bne _0807B17C
ldrb r5, [r7, 0x6]
adds r0, r7, 0
adds r0, 0x78
str r0, [sp, 0x8]
cmp r5, 0
bne _0807B222
mov r0, r8
bl sub_8072CA8
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807B222
movs r0, 0x1
ldr r1, [sp, 0x8]
strb r0, [r1]
adds r1, r7, 0
adds r1, 0x88
ldr r0, [r4, 0x4]
str r0, [r1]
adds r0, r7, 0
adds r0, 0x80
str r4, [r0]
ldrh r1, [r4, 0x26]
subs r0, 0x4
strh r1, [r0]
movs r2, 0x8A
lsls r2, 1
adds r0, r7, r2
str r5, [r0]
b _0807B2C6
_0807B17C:
ldrb r0, [r7, 0x7]
adds r3, r7, 0
adds r3, 0x78
str r3, [sp, 0x8]
cmp r0, 0
beq _0807B222
ldr r4, _0807B1BC
ldr r0, [r4]
ldr r1, _0807B1C0
adds r0, r1
ldrb r0, [r0]
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
movs r3, 0x6
ldrsh r1, [r2, r3]
bl sub_804954C
ldrb r1, [r0, 0x9]
cmp r1, 0xFF
bne _0807B1C4
mov r4, r8
movs r0, 0x4
ldrsh r1, [r4, r0]
subs r2, r1, 0x2
mov r10, r2
movs r3, 0x6
ldrsh r0, [r4, r3]
subs r2, r0, 0x2
adds r6, r1, 0x2
adds r0, 0x2
b _0807B1EC
.align 2, 0
_0807B1BC: .4byte gUnknown_203B418
_0807B1C0: .4byte 0x00018209
_0807B1C4:
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r1, _0807B26C
adds r0, r1
ldr r1, [r4]
adds r1, r0
movs r2, 0x2
ldrsh r0, [r1, r2]
subs r0, 0x1
mov r10, r0
movs r3, 0x4
ldrsh r0, [r1, r3]
subs r2, r0, 0x1
movs r4, 0x6
ldrsh r0, [r1, r4]
adds r6, r0, 0x1
movs r3, 0x8
ldrsh r0, [r1, r3]
adds r0, 0x1
_0807B1EC:
mov r9, r0
adds r5, r2, 0
adds r4, r7, 0
adds r4, 0x78
str r4, [sp, 0x8]
cmp r5, r9
bgt _0807B222
_0807B1FA:
mov r4, r10
cmp r4, r6
bgt _0807B21C
_0807B200:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8049590
ldr r0, [r0, 0x14]
cmp r0, 0
beq _0807B216
bl sub_80450F8
cmp r0, 0x3
beq _0807B270
_0807B216:
adds r4, 0x1
cmp r4, r6
ble _0807B200
_0807B21C:
adds r5, 0x1
cmp r5, r9
ble _0807B1FA
_0807B222:
ldr r1, [sp, 0x8]
ldrb r0, [r1]
subs r0, 0x1
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bhi _0807B2C0
adds r3, r7, 0
adds r3, 0x80
ldr r1, [r3]
cmp r1, 0
beq _0807B2C0
adds r2, r7, 0
adds r2, 0x7C
ldrh r0, [r1, 0x26]
ldrh r4, [r2]
cmp r0, r4
bne _0807B2B4
ldr r1, [r1, 0x70]
mov r9, r1
movs r5, 0
mov r4, r9
adds r4, 0x68
_0807B250:
lsls r6, r5, 2
mov r0, r8
adds r1, r4, 0
bl sub_8045ABC
lsls r0, 24
cmp r0, 0
bne _0807B294
adds r4, 0x4
adds r5, 0x1
cmp r5, 0x3
ble _0807B250
b _0807B2C0
.align 2, 0
_0807B26C: .4byte 0x000104c4
_0807B270:
movs r1, 0
movs r0, 0x7
ldr r2, [sp, 0x8]
strb r0, [r2]
adds r0, r7, 0
adds r0, 0x88
strh r4, [r0]
adds r0, 0x2
strh r5, [r0]
subs r0, 0xA
str r1, [r0]
subs r0, 0x4
strh r1, [r0]
movs r3, 0x8A
lsls r3, 1
adds r0, r7, r3
str r1, [r0]
b _0807B2C6
_0807B294:
movs r2, 0
movs r0, 0x2
ldr r4, [sp, 0x8]
strb r0, [r4]
adds r1, r7, 0
adds r1, 0x88
mov r0, r9
adds r0, 0x68
adds r0, r6
ldr r0, [r0]
str r0, [r1]
movs r1, 0x8A
lsls r1, 1
adds r0, r7, r1
str r2, [r0]
b _0807B2C6
_0807B2B4:
movs r1, 0
movs r0, 0x6
ldr r4, [sp, 0x8]
strb r0, [r4]
str r1, [r3]
strh r1, [r2]
_0807B2C0:
mov r0, r8
bl sub_807B920
_0807B2C6:
movs r0, 0x1
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807AF58
thumb_func_start sub_807B2D8
sub_807B2D8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x3C
mov r9, r0
lsls r1, 24
lsrs r7, r1, 24
ldr r5, [r0, 0x70]
movs r0, 0xB6
lsls r0, 1
adds r1, r5, r0
adds r4, r5, 0
adds r4, 0x88
ldr r0, [r4]
str r0, [r1]
mov r2, r9
ldr r1, [r2, 0x4]
ldr r0, [r4]
cmp r1, r0
beq _0807B348
mov r6, r9
adds r6, 0x4
adds r0, r6, 0
adds r1, r4, 0
bl sub_80983D8
mov r8, r0
adds r0, r5, 0
adds r0, 0x7A
ldrb r1, [r0]
mov r0, r9
bl sub_8071470
lsls r0, 24
cmp r0, 0
beq _0807B366
adds r0, r5, 0
adds r0, 0x78
ldrb r0, [r0]
cmp r0, 0x1
bne _0807B37C
adds r0, r6, 0
adds r1, r4, 0
bl sub_8083478
lsls r0, 24
cmp r0, 0
beq _0807B37C
adds r0, r6, 0
adds r1, r4, 0
bl sub_8098434
cmp r0, 0x2
bne _0807B354
_0807B348:
adds r0, r5, 0
adds r0, 0x44
movs r1, 0x1
bl sub_8044C94
b _0807B5CE
_0807B354:
cmp r0, 0x1
bgt _0807B37C
movs r3, 0x4
add r8, r3
movs r0, 0x7
mov r1, r8
ands r1, r0
mov r8, r1
b _0807B37C
_0807B366:
adds r0, r5, 0
adds r0, 0x7B
ldrb r0, [r0]
cmp r0, 0
beq _0807B37C
movs r2, 0x4
add r8, r2
movs r0, 0x7
mov r3, r8
ands r3, r0
mov r8, r3
_0807B37C:
add r4, sp, 0x30
mov r0, r9
mov r1, r8
adds r2, r4, 0
bl sub_8071214
lsls r0, 24
cmp r0, 0
beq _0807B3A8
adds r0, r5, 0
adds r0, 0x44
movs r2, 0x2
ldrsh r1, [r5, r2]
bl sub_8044CA0
movs r0, 0x7
mov r3, r8
ands r3, r0
adds r0, r5, 0
adds r0, 0x46
strb r3, [r0]
b _0807B5CE
_0807B3A8:
ldrb r0, [r4]
cmp r0, 0
beq _0807B444
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _0807B3E8
ldr r1, _0807B3E0
adds r0, r5, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807B3E8
adds r0, r5, 0
adds r0, 0x79
movs r4, 0x1
strb r4, [r0]
movs r2, 0xA2
lsls r2, 1
adds r0, r5, r2
strb r4, [r0]
adds r0, r5, 0
adds r0, 0x44
movs r1, 0x1
bl sub_8044C94
ldr r3, _0807B3E4
adds r0, r5, r3
strb r4, [r0]
b _0807B5CE
.align 2, 0
_0807B3E0: .4byte 0x00000145
_0807B3E4: .4byte 0x00000147
_0807B3E8:
mov r0, r9
movs r2, 0x4
ldrsh r1, [r0, r2]
ldr r2, _0807B434
mov r3, r8
lsls r0, r3, 2
adds r2, r0, r2
movs r3, 0
ldrsh r0, [r2, r3]
adds r1, r0
adds r0, r5, 0
adds r0, 0x88
movs r3, 0
ldrsh r0, [r0, r3]
cmp r1, r0
bne _0807B43C
mov r1, r9
movs r3, 0x6
ldrsh r0, [r1, r3]
movs r3, 0x2
ldrsh r1, [r2, r3]
adds r0, r1
adds r1, r5, 0
adds r1, 0x8A
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bne _0807B43C
adds r0, r5, 0
adds r0, 0x44
movs r1, 0x1
bl sub_8044C94
ldr r3, _0807B438
adds r1, r5, r3
movs r0, 0x1
strb r0, [r1]
b _0807B5CE
.align 2, 0
_0807B434: .4byte gUnknown_80F4448
_0807B438: .4byte 0x00000147
_0807B43C:
adds r1, r5, 0
adds r1, 0x79
movs r0, 0x1
strb r0, [r1]
_0807B444:
mov r3, sp
mov r2, sp
mov r1, sp
add r0, sp, 0x28
movs r4, 0x1
strb r4, [r0]
add r0, sp, 0x20
strb r4, [r0]
strb r4, [r1, 0x18]
strb r4, [r2, 0x10]
strb r4, [r3, 0x8]
ldrb r6, [r5, 0x6]
cmp r6, 0
bne _0807B4C8
mov r0, r8
ands r0, r4
cmp r0, 0
beq _0807B4C8
mov r1, r9
movs r2, 0x4
ldrsh r0, [r1, r2]
adds r1, r5, 0
adds r1, 0x88
movs r3, 0
ldrsh r1, [r1, r3]
subs r2, r0, r1
cmp r2, 0
bge _0807B47E
negs r2, r2
_0807B47E:
mov r0, r9
movs r3, 0x6
ldrsh r1, [r0, r3]
adds r0, r5, 0
adds r0, 0x8A
movs r3, 0
ldrsh r0, [r0, r3]
subs r1, r0
cmp r1, 0
bge _0807B494
negs r1, r1
_0807B494:
cmp r2, 0x2
bgt _0807B4C8
cmp r1, 0x2
bgt _0807B4C8
cmp r2, r1
beq _0807B4C8
movs r3, 0x2
mov r0, r8
ands r3, r0
cmp r3, 0
beq _0807B4BA
cmp r2, r1
bge _0807B4B4
mov r0, sp
strb r6, [r0, 0x10]
b _0807B4C8
_0807B4B4:
mov r0, sp
strb r6, [r0, 0x8]
b _0807B4C8
_0807B4BA:
cmp r2, r1
bge _0807B4C4
mov r0, sp
strb r3, [r0, 0x8]
b _0807B4C8
_0807B4C4:
mov r0, sp
strb r3, [r0, 0x10]
_0807B4C8:
movs r1, 0x3
mov r10, r1
mov r0, r9
adds r1, r7, 0
bl sub_8071518
lsls r0, 24
cmp r0, 0
bne _0807B4E4
adds r0, r5, 0
adds r0, 0x7B
ldrb r0, [r0]
cmp r0, 0
beq _0807B4E8
_0807B4E4:
movs r2, 0x5
mov r10, r2
_0807B4E8:
movs r6, 0x1
adds r3, r5, 0
adds r3, 0x44
str r3, [sp, 0x34]
cmp r6, r10
bge _0807B53C
mov r3, sp
mov r4, sp
adds r4, 0xA
add r7, sp, 0x8
_0807B4FC:
lsls r0, r6, 3
add r2, sp, 0x4
adds r2, r0
ldr r1, _0807B598
lsls r0, r6, 2
adds r0, r1
ldr r1, [r0]
add r1, r8
movs r0, 0x7
ands r1, r0
str r1, [r2]
mov r0, r9
adds r2, r4, 0
str r3, [sp, 0x38]
bl sub_8071214
strb r0, [r7, 0x1]
lsls r0, 24
ldr r3, [sp, 0x38]
cmp r0, 0
bne _0807B532
ldrb r0, [r4]
cmp r0, 0
bne _0807B532
movs r0, 0x1
strb r0, [r3, 0x10]
strb r0, [r3, 0x8]
_0807B532:
adds r4, 0x8
adds r7, 0x8
adds r6, 0x1
cmp r6, r10
blt _0807B4FC
_0807B53C:
movs r6, 0x1
cmp r6, r10
bge _0807B56E
adds r3, r5, 0
adds r3, 0x79
add r1, sp, 0x8
movs r4, 0x8
movs r7, 0x1
_0807B54C:
adds r2, r4, 0
ldrb r0, [r1, 0x1]
cmp r0, 0
beq _0807B55A
ldrb r0, [r1]
cmp r0, 0
bne _0807B5A0
_0807B55A:
ldrb r0, [r1, 0x2]
cmp r0, 0
beq _0807B562
strb r7, [r3]
_0807B562:
adds r1, 0x8
adds r4, r2, 0
adds r4, 0x8
adds r6, 0x1
cmp r6, r10
blt _0807B54C
_0807B56E:
ldr r0, [sp, 0x34]
movs r1, 0x1
bl sub_8044C94
ldr r1, _0807B59C
adds r0, r5, r1
movs r1, 0
movs r2, 0x1
strb r2, [r0]
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _0807B5BC
adds r0, r5, 0
adds r0, 0x79
strb r1, [r0]
movs r2, 0xA2
lsls r2, 1
adds r0, r5, r2
strb r1, [r0]
b _0807B5CE
.align 2, 0
_0807B598: .4byte gUnknown_80F4D04
_0807B59C: .4byte 0x00000147
_0807B5A0:
movs r3, 0x2
ldrsh r1, [r5, r3]
ldr r0, [sp, 0x34]
bl sub_8044CA0
add r0, sp, 0x4
adds r0, r4
ldr r0, [r0]
movs r1, 0x7
ands r0, r1
adds r1, r5, 0
adds r1, 0x46
strb r0, [r1]
b _0807B5CE
_0807B5BC:
adds r0, r5, 0
adds r0, 0x79
ldrb r0, [r0]
cmp r0, 0
beq _0807B5CE
movs r1, 0xA2
lsls r1, 1
adds r0, r5, r1
strb r2, [r0]
_0807B5CE:
add sp, 0x3C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807B2D8
thumb_func_start sub_807B5E0
sub_807B5E0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
adds r7, r0, 0
ldr r0, _0807B61C
str r0, [sp, 0x8]
ldr r1, [r7, 0x70]
str r1, [sp, 0x10]
adds r0, r7, 0
bl sub_80450FC
lsls r0, 24
lsrs r0, 24
mov r10, r0
ldr r0, _0807B620
ldr r1, [r0]
ldr r2, _0807B624
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807B62C
ldr r3, _0807B628
adds r0, r1, r3
movs r4, 0x14
mov r9, r4
b _0807B64C
.align 2, 0
_0807B61C: .4byte 0x000f423f
_0807B620: .4byte gUnknown_203B418
_0807B624: .4byte 0x000037fc
_0807B628: .4byte 0x000135cc
_0807B62C:
ldr r2, [sp, 0x10]
ldrb r0, [r2, 0x6]
cmp r0, 0
beq _0807B644
ldr r3, _0807B640
adds r0, r1, r3
movs r4, 0x4
mov r9, r4
b _0807B64C
.align 2, 0
_0807B640: .4byte 0x0001357c
_0807B644:
ldr r2, _0807B790
adds r0, r1, r2
movs r3, 0x10
mov r9, r3
_0807B64C:
movs r4, 0
str r4, [sp, 0xC]
movs r1, 0xFF
str r1, [sp, 0x4]
mov r8, r4
cmp r4, r9
bge _0807B6D8
adds r6, r0, 0
_0807B65C:
ldr r4, [r6]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807B6CE
adds r0, r7, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0807B6CE
ldr r0, _0807B794
ldr r0, [r0]
ldr r2, _0807B798
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807B69A
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0807B6CE
_0807B69A:
adds r1, r4, 0x4
adds r0, r7, 0x4
bl sub_8098434
ldr r3, [sp, 0x8]
cmp r3, r0
ble _0807B6CE
str r0, [sp, 0x8]
str r4, [sp, 0xC]
adds r0, r4, 0
bl sub_80450FC
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x4]
ldr r1, [sp, 0x10]
adds r1, 0x88
ldr r4, [sp, 0xC]
ldr r0, [r4, 0x4]
str r0, [r1]
ldr r0, [sp, 0x10]
movs r2, 0xB6
lsls r2, 1
adds r1, r0, r2
ldr r0, [r4, 0x4]
str r0, [r1]
_0807B6CE:
adds r6, 0x4
movs r3, 0x1
add r8, r3
cmp r8, r9
blt _0807B65C
_0807B6D8:
ldr r0, _0807B79C
ldr r4, [sp, 0x8]
cmp r4, r0
bne _0807B6E2
b _0807B906
_0807B6E2:
ldr r0, [sp, 0x10]
adds r0, 0x88
str r0, [sp, 0x28]
ldr r1, [sp, 0x10]
adds r1, 0x78
str r1, [sp, 0x24]
ldr r2, [sp, 0x4]
cmp r10, r2
beq _0807B6F6
b _0807B8E0
_0807B6F6:
mov r3, r10
cmp r3, 0xFF
bne _0807B6FE
b _0807B8E0
_0807B6FE:
movs r4, 0x4
ldrsh r0, [r7, r4]
movs r2, 0x6
ldrsh r1, [r7, r2]
bl sub_804954C
ldrh r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0807B7B2
ldrh r0, [r7, 0x6]
lsls r0, 16
ldrh r5, [r7, 0x4]
orrs r5, r0
movs r4, 0
_0807B71E:
ldr r1, _0807B7A0
lsls r0, r4, 2
adds r0, r1
ldrh r1, [r0]
ldrh r3, [r7, 0x4]
adds r1, r3
lsls r1, 16
ldrh r0, [r0, 0x2]
ldrh r2, [r7, 0x6]
adds r0, r2
lsls r0, 16
lsrs r5, r1, 16
orrs r5, r0
lsls r0, r5, 16
asrs r0, 16
asrs r1, r5, 16
bl sub_804954C
ldrb r0, [r0, 0x9]
cmp r0, r10
beq _0807B758
adds r0, r7, 0
adds r1, r4, 0
mov r2, sp
bl sub_8071214
lsls r0, 24
cmp r0, 0
bne _0807B75E
_0807B758:
adds r4, 0x1
cmp r4, 0x7
ble _0807B71E
_0807B75E:
cmp r4, 0x8
bne _0807B7A4
movs r0, 0x8
bl sub_8084100
adds r4, r0, 0
movs r0, 0x6
ldr r3, [sp, 0x24]
strb r0, [r3]
ldr r0, _0807B7A0
lsls r1, r4, 2
adds r1, r0
ldrh r0, [r1]
ldrh r4, [r7, 0x4]
adds r0, r4
ldr r2, [sp, 0x28]
strh r0, [r2]
ldrh r0, [r1, 0x2]
ldrh r7, [r7, 0x6]
adds r0, r7
ldr r1, [sp, 0x10]
adds r1, 0x8A
strh r0, [r1]
movs r0, 0x1
b _0807B910
.align 2, 0
_0807B790: .4byte 0x0001358c
_0807B794: .4byte gUnknown_203B418
_0807B798: .4byte 0x000037fc
_0807B79C: .4byte 0x000f423f
_0807B7A0: .4byte gUnknown_80F4448
_0807B7A4:
movs r0, 0x5
ldr r3, [sp, 0x24]
strb r0, [r3]
ldr r4, [sp, 0x28]
str r5, [r4]
movs r0, 0x1
b _0807B910
_0807B7B2:
ldr r0, _0807B8D0
mov r2, r10
lsls r1, r2, 7
ldr r3, _0807B8D4
adds r1, r3
ldr r0, [r0]
adds r1, r0, r1
str r1, [sp, 0x18]
lsls r1, r2, 1
ldr r4, _0807B8D8
adds r0, r4
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
str r1, [sp, 0x14]
ldr r3, _0807B8DC
str r3, [sp, 0x20]
movs r4, 0
str r4, [sp, 0x1C]
ldr r0, [sp, 0xC]
movs r1, 0x4
ldrsh r3, [r0, r1]
movs r2, 0x4
ldrsh r0, [r7, r2]
subs r2, r3, r0
cmp r2, 0
bge _0807B7EA
negs r2, r2
_0807B7EA:
ldr r4, [sp, 0xC]
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r4, 0x6
ldrsh r0, [r7, r4]
subs r1, r0
mov r8, r1
cmp r1, 0
bge _0807B802
mov r0, r8
negs r0, r0
mov r8, r0
_0807B802:
cmp r8, r2
bge _0807B808
mov r8, r2
_0807B808:
movs r1, 0
mov r9, r1
ldr r2, [sp, 0x10]
adds r2, 0x8A
str r2, [sp, 0x2C]
ldr r4, [sp, 0x1C]
ldr r0, [sp, 0x14]
cmp r4, r0
bge _0807B8AA
mov r10, r3
ldr r6, [sp, 0x18]
_0807B81E:
movs r1, 0
ldrsh r3, [r6, r1]
mov r2, r10
subs r0, r2, r3
cmp r0, 0
bge _0807B82C
negs r0, r0
_0807B82C:
ldr r4, [sp, 0xC]
movs r1, 0x6
ldrsh r4, [r4, r1]
mov r12, r4
movs r4, 0x2
ldrsh r2, [r6, r4]
mov r4, r12
subs r1, r4, r2
cmp r1, 0
bge _0807B842
negs r1, r1
_0807B842:
cmp r1, r0
bge _0807B848
adds r1, r0, 0
_0807B848:
movs r0, 0x4
ldrsh r4, [r7, r0]
subs r0, r3, r4
movs r3, 0x6
ldrsh r5, [r7, r3]
subs r3, r2, r5
movs r2, 0x1
negs r2, r2
cmp r0, r2
bge _0807B85E
adds r0, r2, 0
_0807B85E:
cmp r3, r2
bge _0807B864
adds r3, r2, 0
_0807B864:
cmp r0, 0x1
ble _0807B86A
movs r0, 0x1
_0807B86A:
cmp r3, 0x1
ble _0807B870
movs r3, 0x1
_0807B870:
adds r0, r4, r0
mov r4, r10
subs r2, r4, r0
cmp r2, 0
bge _0807B87C
negs r2, r2
_0807B87C:
adds r0, r5, r3
mov r3, r12
subs r0, r3, r0
cmp r0, 0
bge _0807B888
negs r0, r0
_0807B888:
cmp r0, r2
bge _0807B88E
adds r0, r2, 0
_0807B88E:
cmp r0, r8
blt _0807B89E
ldr r4, [sp, 0x20]
cmp r4, r1
bge _0807B89E
mov r0, r9
str r0, [sp, 0x1C]
str r1, [sp, 0x20]
_0807B89E:
adds r6, 0x4
movs r1, 0x1
add r9, r1
ldr r2, [sp, 0x14]
cmp r9, r2
blt _0807B81E
_0807B8AA:
ldr r3, [sp, 0x20]
cmp r3, 0
blt _0807B8E0
movs r0, 0x5
ldr r4, [sp, 0x24]
strb r0, [r4]
ldr r1, [sp, 0x1C]
lsls r0, r1, 2
ldr r2, [sp, 0x18]
adds r0, r2
ldrh r1, [r0]
ldr r3, [sp, 0x28]
strh r1, [r3]
ldrh r0, [r0, 0x2]
ldr r4, [sp, 0x2C]
strh r0, [r4]
movs r0, 0x1
b _0807B910
.align 2, 0
_0807B8D0: .4byte gUnknown_203B418
_0807B8D4: .4byte 0x00010884
_0807B8D8: .4byte 0x00010844
_0807B8DC: .4byte 0xfff0bdc1
_0807B8E0:
movs r0, 0x5
ldr r1, [sp, 0x24]
strb r0, [r1]
ldr r2, [sp, 0xC]
ldrh r1, [r2, 0x4]
ldrh r0, [r7, 0x4]
subs r1, r0
subs r0, r1
ldr r3, [sp, 0x28]
strh r0, [r3]
ldrh r0, [r2, 0x6]
ldrh r1, [r7, 0x6]
subs r0, r1
subs r1, r0
ldr r0, [sp, 0x10]
adds r0, 0x8A
strh r1, [r0]
movs r0, 0x1
b _0807B910
_0807B906:
adds r0, r7, 0
bl sub_807B920
lsls r0, 24
lsrs r0, 24
_0807B910:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807B5E0
thumb_func_start sub_807B920
sub_807B920:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
adds r6, r0, 0
ldr r7, [r6, 0x70]
bl sub_80450FC
lsls r0, 24
lsrs r3, r0, 24
cmp r3, 0xFF
bne _0807B9DC
movs r0, 0
str r0, [sp, 0x4]
adds r4, r7, 0
adds r4, 0x46
ldrb r0, [r4]
adds r0, 0x4
mov r8, r0
movs r0, 0x7
mov r1, r8
ands r1, r0
mov r8, r1
adds r0, r6, 0
bl sub_807138C
lsls r0, 24
mov r9, r4
cmp r0, 0
beq _0807B96C
movs r0, 0x8
bl sub_8084100
strb r0, [r4]
movs r2, 0x1
str r2, [sp, 0x4]
_0807B96C:
movs r3, 0
movs r4, 0x78
adds r4, r7
mov r10, r4
adds r0, r7, 0
adds r0, 0x88
str r0, [sp, 0x8]
adds r7, 0x8A
ldr r5, _0807B9D4
_0807B97E:
mov r1, r9
ldrb r0, [r1]
ldr r1, [r5]
adds r4, r0, r1
movs r0, 0x7
ands r4, r0
ldr r2, [sp, 0x4]
cmp r2, 0
beq _0807B994
cmp r4, r8
beq _0807B9AA
_0807B994:
adds r0, r6, 0
adds r1, r4, 0
mov r2, sp
str r3, [sp, 0xC]
bl sub_8071214
lsls r0, 24
ldr r3, [sp, 0xC]
cmp r0, 0
beq _0807B9AA
b _0807BB42
_0807B9AA:
adds r5, 0x4
adds r3, 0x1
cmp r3, 0x7
ble _0807B97E
movs r0, 0x8
bl sub_8084100
movs r1, 0x6
mov r3, r10
strb r1, [r3]
ldr r1, _0807B9D8
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
ldrh r4, [r6, 0x4]
adds r1, r4
ldr r2, [sp, 0x8]
strh r1, [r2]
ldrh r0, [r0, 0x2]
b _0807BB5A
.align 2, 0
_0807B9D4: .4byte gUnknown_80F4D04
_0807B9D8: .4byte gUnknown_80F4448
_0807B9DC:
ldr r0, _0807BA30
ldr r2, [r0]
lsls r1, r3, 1
ldr r4, _0807BA34
adds r0, r2, r4
adds r0, r1
movs r4, 0
ldrsh r1, [r0, r4]
mov r8, r1
lsls r0, r3, 7
ldr r1, _0807BA38
adds r0, r1
adds r2, r0
mov r9, r2
movs r2, 0x8A
lsls r2, 1
adds r0, r7, r2
ldr r0, [r0]
cmp r0, 0
beq _0807BA40
movs r0, 0x8
bl sub_8084100
adds r2, r7, 0
adds r2, 0x78
movs r1, 0x6
strb r1, [r2]
ldr r1, _0807BA3C
lsls r0, 2
adds r0, r1
ldrh r1, [r0]
ldrh r3, [r6, 0x4]
adds r1, r3
adds r2, 0x10
strh r1, [r2]
ldrh r0, [r0, 0x2]
ldrh r6, [r6, 0x6]
adds r0, r6
adds r1, r7, 0
adds r1, 0x8A
strh r0, [r1]
b _0807BB60
.align 2, 0
_0807BA30: .4byte gUnknown_203B418
_0807BA34: .4byte 0x00010844
_0807BA38: .4byte 0x00010884
_0807BA3C: .4byte gUnknown_80F4448
_0807BA40:
adds r0, r7, 0
adds r0, 0x78
ldrb r1, [r0]
mov r10, r0
cmp r1, 0x4
beq _0807BAA2
mov r4, r8
cmp r4, 0
bne _0807BA84
movs r0, 0x8
bl sub_8084100
adds r4, r0, 0
movs r0, 0x6
mov r1, r10
strb r0, [r1]
ldr r0, _0807BA80
lsls r2, r4, 2
adds r2, r0
ldrh r0, [r2]
ldrh r3, [r6, 0x4]
adds r0, r3
adds r1, r7, 0
adds r1, 0x88
strh r0, [r1]
ldrh r0, [r2, 0x2]
ldrh r6, [r6, 0x6]
adds r0, r6
adds r1, 0x2
strh r0, [r1]
b _0807BB60
.align 2, 0
_0807BA80: .4byte gUnknown_80F4448
_0807BA84:
movs r5, 0
_0807BA86:
mov r0, r8
bl sub_8084100
adds r4, r0, 0
ldr r0, [r6, 0x4]
lsls r1, r4, 2
mov r4, r9
adds r2, r1, r4
ldr r1, [r2]
cmp r0, r1
bne _0807BB18
adds r5, 0x1
cmp r5, 0x9
ble _0807BA86
_0807BAA2:
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
bl sub_804954C
ldrh r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0807BB60
movs r0, 0x8
bl sub_8084100
adds r4, r0, 0
movs r3, 0
mov r9, r3
_0807BAC4:
movs r0, 0x7
ands r4, r0
movs r0, 0x4
ldrsh r2, [r6, r0]
ldr r0, _0807BB14
lsls r1, r4, 2
adds r1, r0
movs r3, 0
ldrsh r0, [r1, r3]
adds r2, r0
mov r8, r2
movs r0, 0x6
ldrsh r2, [r6, r0]
movs r3, 0x2
ldrsh r0, [r1, r3]
adds r5, r2, r0
mov r0, r8
adds r1, r5, 0
bl sub_804954C
ldrb r0, [r0, 0x9]
cmp r0, 0xFF
bne _0807BB04
adds r0, r6, 0
adds r1, r4, 0
mov r2, sp
adds r2, 0x1
bl sub_8071214
lsls r0, 24
cmp r0, 0
bne _0807BB2E
_0807BB04:
movs r0, 0x1
add r9, r0
adds r4, 0x1
mov r1, r9
cmp r1, 0x7
ble _0807BAC4
b _0807BB60
.align 2, 0
_0807BB14: .4byte gUnknown_80F4448
_0807BB18:
movs r0, 0x4
mov r3, r10
strb r0, [r3]
ldrh r1, [r2]
adds r0, r7, 0
adds r0, 0x88
strh r1, [r0]
ldrh r1, [r2, 0x2]
adds r0, 0x2
strh r1, [r0]
b _0807BB60
_0807BB2E:
movs r0, 0x3
mov r4, r10
strb r0, [r4]
adds r0, r7, 0
adds r0, 0x88
mov r1, r8
strh r1, [r0]
adds r0, 0x2
strh r5, [r0]
b _0807BB60
_0807BB42:
movs r0, 0x3
mov r2, r10
strb r0, [r2]
ldr r0, _0807BB74
lsls r1, r4, 2
adds r1, r0
ldrh r0, [r1]
ldrh r3, [r6, 0x4]
adds r0, r3
ldr r4, [sp, 0x8]
strh r0, [r4]
ldrh r0, [r1, 0x2]
_0807BB5A:
ldrh r6, [r6, 0x6]
adds r0, r6
strh r0, [r7]
_0807BB60:
movs r0, 0x1
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807BB74: .4byte gUnknown_80F4448
thumb_func_end sub_807B920
thumb_func_start sub_807BB78
sub_807BB78:
ldr r3, [r0, 0x70]
adds r1, r3, 0
adds r1, 0x78
movs r2, 0
strb r2, [r1]
adds r1, 0x10
ldr r0, [r0, 0x4]
str r0, [r1]
adds r0, r3, 0
adds r0, 0x80
str r2, [r0]
subs r0, 0x4
strh r2, [r0]
bx lr
thumb_func_end sub_807BB78
thumb_func_start sub_807BB94
sub_807BB94:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x5C
mov r10, r0
ldr r0, [r0, 0x70]
mov r8, r0
mov r0, r10
movs r1, 0
bl sub_8070D04
lsls r0, 24
cmp r0, 0
beq _0807BBB6
b _0807C03A
_0807BBB6:
mov r0, r10
movs r1, 0x1
bl sub_8071518
lsls r0, 24
cmp r0, 0
beq _0807BBC6
b _0807C03A
_0807BBC6:
mov r0, r10
movs r1, 0x8
bl sub_80718AC
lsls r0, 24
cmp r0, 0
beq _0807BBD6
b _0807C03A
_0807BBD6:
mov r0, r8
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x2
bne _0807BBF2
ldr r0, _0807BC70
movs r1, 0
ldrsh r0, [r0, r1]
bl sub_8084144
lsls r0, 24
cmp r0, 0
beq _0807BBF2
b _0807C03A
_0807BBF2:
mov r0, r8
adds r0, 0xC0
ldrb r1, [r0]
str r0, [sp, 0x50]
cmp r1, 0
beq _0807BC7C
movs r5, 0
movs r4, 0x8C
lsls r4, 1
add r4, r8
_0807BC06:
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807BC74
mov r0, r10
adds r1, r4, 0
bl sub_80570AC
lsls r0, 24
cmp r0, 0
beq _0807BC74
mov r0, r8
adds r0, 0xC2
ldrb r0, [r0]
cmp r0, r5
bne _0807BC74
mov r0, r8
adds r0, 0x44
movs r1, 0x15
bl sub_8044C94
adds r3, r5, 0
mov r6, r8
adds r6, 0x48
cmp r5, 0
bgt _0807BC3E
b _0807C006
_0807BC3E:
ldrb r1, [r4]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0807BC4A
b _0807C006
_0807BC4A:
movs r4, 0x2
lsls r0, r5, 3
movs r2, 0x8C
lsls r2, 1
adds r0, r2
mov r7, r8
adds r2, r0, r7
_0807BC58:
subs r2, 0x8
subs r3, 0x1
cmp r3, 0
bgt _0807BC62
b _0807C006
_0807BC62:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _0807BC58
b _0807C006
.align 2, 0
_0807BC70: .4byte gUnknown_80F4DB2
_0807BC74:
adds r4, 0x8
adds r5, 0x1
cmp r5, 0x3
ble _0807BC06
_0807BC7C:
movs r0, 0
str r0, [sp, 0x44]
movs r1, 0
str r1, [sp, 0x40]
movs r2, 0x8C
lsls r2, 1
add r2, r8
movs r4, 0x1
movs r3, 0x4
movs r5, 0x3
_0807BC90:
ldrb r1, [r2]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _0807BCB0
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _0807BCA8
ldr r7, [sp, 0x40]
adds r7, 0x1
str r7, [sp, 0x40]
_0807BCA8:
ldrb r0, [r2, 0x4]
ldr r1, [sp, 0x44]
adds r1, r0
str r1, [sp, 0x44]
_0807BCB0:
adds r2, 0x8
subs r5, 0x1
cmp r5, 0
bge _0807BC90
ldr r2, [sp, 0x44]
cmp r2, 0
bne _0807BCF8
add r4, sp, 0x2C
movs r1, 0xB0
lsls r1, 1
adds r0, r4, 0
bl sub_8092A88
mov r0, sp
mov r1, r10
adds r2, r4, 0
bl sub_807C04C
mov r0, sp
ldrb r0, [r0]
cmp r0, 0
bne _0807BCDE
b _0807C03A
_0807BCDE:
mov r0, r8
adds r0, 0x44
movs r1, 0x17
bl sub_8044C94
mov r0, sp
ldrb r1, [r0, 0x1]
movs r0, 0x7
ands r0, r1
mov r1, r8
adds r1, 0x46
strb r0, [r1]
b _0807C008
_0807BCF8:
mov r0, r10
movs r1, 0xB
bl sub_80718D8
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x48]
mov r0, r10
movs r1, 0x6
bl sub_80718D8
lsls r0, 24
lsrs r0, 24
negs r1, r0
orrs r1, r0
lsrs r1, 31
str r1, [sp, 0x3C]
movs r7, 0
str r7, [sp, 0x44]
mov r0, sp
adds r0, 0x28
str r0, [sp, 0x4C]
adds r2, r0, 0
movs r1, 0x1
adds r0, 0x3
_0807BD2A:
strb r1, [r0]
subs r0, 0x1
cmp r0, r2
bge _0807BD2A
ldr r1, [sp, 0x3C]
cmp r1, 0
beq _0807BDC0
movs r2, 0x63
movs r4, 0
movs r5, 0
movs r3, 0x8C
lsls r3, 1
add r3, r8
b _0807BD98
_0807BD46:
cmp r5, 0
beq _0807BD7A
ldrb r1, [r3]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0807BD7A
adds r0, r4, 0x1
adds r6, r5, 0x1
cmp r0, r5
bge _0807BD74
cmp r2, 0x1
bgt _0807BD74
adds r1, r4, 0
cmp r1, r5
bge _0807BD74
ldr r2, [sp, 0x4C]
movs r4, 0
_0807BD6A:
adds r0, r2, r1
strb r4, [r0]
adds r1, 0x1
cmp r1, r5
blt _0807BD6A
_0807BD74:
ldrb r2, [r3, 0x4]
adds r4, r5, 0
b _0807BD86
_0807BD7A:
ldrb r1, [r3, 0x4]
cmp r1, r2
ble _0807BD82
adds r1, r2, 0
_0807BD82:
adds r2, r1, 0
adds r6, r5, 0x1
_0807BD86:
adds r5, r6, 0
cmp r5, 0x3
bgt _0807BDA2
lsls r0, r5, 3
movs r7, 0x8C
lsls r7, 1
adds r0, r7
mov r1, r8
adds r3, r1, r0
_0807BD98:
ldrb r1, [r3]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _0807BD46
_0807BDA2:
adds r0, r4, 0x1
cmp r0, r5
bge _0807BDC0
cmp r2, 0x1
bgt _0807BDC0
adds r1, r4, 0
cmp r1, r5
bge _0807BDC0
ldr r2, [sp, 0x4C]
movs r3, 0
_0807BDB6:
adds r0, r2, r1
strb r3, [r0]
adds r1, 0x1
cmp r1, r5
blt _0807BDB6
_0807BDC0:
movs r5, 0
movs r2, 0
str r2, [sp, 0x54]
add r4, sp, 0x4
movs r7, 0x8C
lsls r7, 1
add r7, r8
adds r6, r7, 0
mov r9, sp
mov r0, sp
str r0, [sp, 0x58]
_0807BDD6:
movs r2, 0
mov r1, r9
strb r2, [r1]
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807BE64
ldr r1, [sp, 0x4C]
adds r0, r1, r5
ldrb r0, [r0]
cmp r0, 0
beq _0807BE64
mov r0, r10
adds r1, r5, 0
ldr r2, [sp, 0x3C]
bl sub_8057348
lsls r0, 24
cmp r0, 0
beq _0807BE64
ldrb r1, [r7]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0807BE64
movs r0, 0x1
mov r2, r9
strb r0, [r2]
ldr r1, [sp, 0x50]
ldrb r0, [r1]
cmp r0, 0xB
bne _0807BE38
ldrh r0, [r7, 0x2]
cmp r0, 0x80
bne _0807BE24
movs r2, 0
str r2, [r4]
b _0807BE64
_0807BE24:
mov r0, r10
adds r1, r6, 0
bl sub_8071A1C
lsls r0, 24
lsrs r0, 24
cmp r0, 0x5
beq _0807BE4A
movs r0, 0x1
b _0807BE54
_0807BE38:
ldr r1, [sp, 0x48]
cmp r1, 0
beq _0807BE4A
ldr r0, [sp, 0x58]
mov r1, r10
adds r2, r6, 0
bl sub_807C04C
b _0807BE54
_0807BE4A:
adds r0, r6, 0
bl sub_8092B90
lsls r0, 24
lsrs r0, 24
_0807BE54:
str r0, [r4]
add r0, sp, 0x4
ldr r2, [sp, 0x54]
adds r0, r2
ldr r0, [r0]
ldr r1, [sp, 0x44]
adds r1, r0
str r1, [sp, 0x44]
_0807BE64:
ldr r2, [sp, 0x54]
adds r2, 0x8
str r2, [sp, 0x54]
adds r4, 0x8
adds r7, 0x8
adds r6, 0x8
movs r0, 0x8
add r9, r0
ldr r1, [sp, 0x58]
adds r1, 0x8
str r1, [sp, 0x58]
adds r5, 0x1
cmp r5, 0x3
ble _0807BDD6
movs r0, 0
str r0, [sp, 0x24]
mov r0, r10
movs r1, 0x17
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807BECA
ldr r2, [sp, 0x50]
ldrb r0, [r2]
cmp r0, 0xB
beq _0807BECA
add r0, sp, 0x20
movs r1, 0x1
strb r1, [r0]
ldrb r0, [r2]
cmp r0, 0xB
bne _0807BEAA
str r1, [sp, 0x24]
b _0807BEC2
_0807BEAA:
ldr r7, [sp, 0x48]
cmp r7, 0
beq _0807BEB4
movs r0, 0x2
b _0807BEC0
_0807BEB4:
ldr r0, _0807BEE8
ldr r2, [sp, 0x40]
lsls r1, r2, 1
adds r1, r0
movs r7, 0
ldrsh r0, [r1, r7]
_0807BEC0:
str r0, [sp, 0x24]
_0807BEC2:
ldr r0, [sp, 0x24]
ldr r1, [sp, 0x44]
adds r1, r0
str r1, [sp, 0x44]
_0807BECA:
ldr r2, [sp, 0x48]
cmp r2, 0
beq _0807BF2A
movs r5, 0
movs r7, 0
str r7, [sp, 0x44]
add r0, sp, 0x4
adds r3, r0, 0
mov r2, sp
movs r4, 0x4
_0807BEDE:
ldrb r1, [r2]
cmp r1, 0
bne _0807BEEC
str r1, [r3]
b _0807BEF4
.align 2, 0
_0807BEE8: .4byte gUnknown_80F4E22
_0807BEEC:
ldr r1, [r3]
cmp r5, r1
bge _0807BEF4
adds r5, r1, 0
_0807BEF4:
adds r3, 0x8
adds r2, 0x8
subs r4, 0x1
cmp r4, 0
bge _0807BEDE
movs r4, 0
movs r6, 0
adds r1, r0, 0
adds r3, r1, 0
mov r2, sp
_0807BF08:
ldrb r0, [r2]
cmp r0, 0
beq _0807BF1E
ldr r0, [r1]
cmp r5, r0
beq _0807BF16
str r6, [r1]
_0807BF16:
ldr r0, [r3]
ldr r7, [sp, 0x44]
adds r7, r0
str r7, [sp, 0x44]
_0807BF1E:
adds r1, 0x8
adds r3, 0x8
adds r2, 0x8
adds r4, 0x1
cmp r4, 0x4
ble _0807BF08
_0807BF2A:
ldr r0, [sp, 0x44]
cmp r0, 0
bne _0807BF32
b _0807C03A
_0807BF32:
bl sub_8084100
str r0, [sp, 0x38]
movs r1, 0
mov r9, r1
mov r0, r10
movs r1, 0x17
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807BF5A
add r1, sp, 0x34
mov r0, r10
movs r2, 0x1
bl sub_807C854
lsls r0, 24
lsrs r6, r0, 24
b _0807BF5E
_0807BF5A:
movs r6, 0
str r6, [sp, 0x34]
_0807BF5E:
movs r5, 0
mov r4, sp
movs r7, 0
_0807BF64:
ldrb r0, [r4]
cmp r0, 0
beq _0807C010
add r0, sp, 0x4
adds r0, r7
ldr r0, [r0]
cmp r0, 0
beq _0807C010
add r9, r0
ldr r2, [sp, 0x38]
cmp r9, r2
blt _0807C010
cmp r5, 0x4
bne _0807BF9C
cmp r6, 0
beq _0807C03A
mov r0, r8
adds r0, 0x44
movs r1, 0x32
bl sub_8044C94
ldr r0, [sp, 0x34]
movs r1, 0x7
ands r0, r1
mov r1, r8
adds r1, 0x46
strb r0, [r1]
b _0807C008
_0807BF9C:
movs r0, 0x8C
lsls r0, 1
mov r9, r0
adds r2, r7, r0
add r2, r8
adds r0, r4, 0
mov r1, r10
bl sub_807C04C
ldrb r0, [r4]
cmp r0, 0
beq _0807C01A
mov r0, r8
adds r0, 0x44
movs r1, 0x15
bl sub_8044C94
adds r3, r5, 0
mov r6, r8
adds r6, 0x48
movs r1, 0x46
add r1, r8
mov r12, r1
cmp r5, 0
ble _0807BFFC
mov r2, r8
adds r0, r2, r7
add r0, r9
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _0807BFFC
movs r7, 0x2
lsls r0, r5, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r2, r0, r2
_0807BFEA:
subs r2, 0x8
subs r3, 0x1
cmp r3, 0
ble _0807BFFC
ldrb r1, [r2]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _0807BFEA
_0807BFFC:
ldrb r1, [r4, 0x1]
movs r0, 0x7
ands r0, r1
mov r2, r12
strb r0, [r2]
_0807C006:
strb r3, [r6]
_0807C008:
mov r0, r10
bl sub_8069DCC
b _0807C03A
_0807C010:
adds r4, 0x8
adds r7, 0x8
adds r5, 0x1
cmp r5, 0x4
ble _0807BF64
_0807C01A:
cmp r6, 0
beq _0807C03A
mov r0, r8
adds r0, 0x44
movs r1, 0x32
bl sub_8044C94
ldr r0, [sp, 0x34]
movs r1, 0x7
ands r0, r1
mov r1, r8
adds r1, 0x46
strb r0, [r1]
mov r0, r10
bl sub_8069DCC
_0807C03A:
add sp, 0x5C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807BB94
thumb_func_start sub_807C04C
sub_807C04C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
str r0, [sp, 0x8]
adds r6, r1, 0
mov r10, r2
movs r0, 0x1
str r0, [sp, 0x10]
ldr r4, [r6, 0x70]
movs r1, 0
mov r8, r1
ldr r1, _0807C0C8
movs r2, 0
adds r0, r1, 0x7
_0807C06E:
strb r2, [r0]
subs r0, 0x1
cmp r0, r1
bge _0807C06E
adds r0, r6, 0
mov r1, r10
movs r2, 0x1
bl sub_807CD64
lsls r0, 16
asrs r0, 16
str r0, [sp, 0xC]
adds r0, r6, 0
movs r1, 0x8
bl sub_80718D8
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x14]
movs r0, 0
ldr r2, [sp, 0x8]
strb r0, [r2]
adds r0, r4, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x5
bne _0807C0B0
mov r0, r10
bl sub_8092C54
lsls r0, 24
cmp r0, 0
beq _0807C0C4
_0807C0B0:
ldr r3, [sp, 0x14]
cmp r3, 0
beq _0807C0CC
adds r0, r6, 0
mov r1, r10
bl sub_805C498
lsls r0, 24
cmp r0, 0
bne _0807C0CC
_0807C0C4:
movs r0, 0x1
b _0807C48C
.align 2, 0
_0807C0C8: .4byte gUnknown_202F380
_0807C0CC:
movs r0, 0xF0
ldr r1, [sp, 0xC]
ands r0, r1
cmp r0, 0
beq _0807C0DE
cmp r0, 0x10
beq _0807C0DE
cmp r0, 0x20
bne _0807C19C
_0807C0DE:
adds r0, r4, 0
adds r0, 0xE8
ldrb r1, [r0]
cmp r1, 0x1
bne _0807C128
subs r0, 0xA2
ldrb r7, [r0]
ldr r0, _0807C118
adds r0, r7, r0
ldrb r3, [r0]
cmp r3, 0
beq _0807C0F8
b _0807C3F6
_0807C0F8:
strb r1, [r0]
ldr r0, _0807C11C
add r0, r8
strb r7, [r0]
ldr r0, _0807C120
mov r4, r8
lsls r2, r4, 2
adds r0, r2, r0
movs r1, 0x63
str r1, [r0]
ldr r0, _0807C124
adds r2, r0
str r3, [r2]
movs r0, 0x1
add r8, r0
b _0807C3F6
.align 2, 0
_0807C118: .4byte gUnknown_202F380
_0807C11C: .4byte gUnknown_202F388
_0807C120: .4byte gUnknown_202F390
_0807C124: .4byte gUnknown_202F3B0
_0807C128:
movs r7, 0
movs r0, 0xF0
ldr r1, [sp, 0xC]
ands r0, r1
lsls r5, r0, 16
_0807C132:
movs r2, 0x4
ldrsh r0, [r6, r2]
ldr r1, _0807C198
lsls r2, r7, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r4, 0x6
ldrsh r1, [r6, r4]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r4, [r0, 0x10]
cmp r4, 0
beq _0807C18E
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807C18E
asrs r0, r5, 16
cmp r0, 0x10
beq _0807C178
cmp r0, 0x20
beq _0807C178
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071138
lsls r0, 24
cmp r0, 0
beq _0807C18E
_0807C178:
mov r0, r10
str r0, [sp]
ldr r1, [sp, 0x14]
str r1, [sp, 0x4]
mov r0, r8
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r4, 0
bl sub_807C580
mov r8, r0
_0807C18E:
adds r7, 0x1
cmp r7, 0x7
ble _0807C132
b _0807C3F6
.align 2, 0
_0807C198: .4byte gUnknown_80F4448
_0807C19C:
cmp r0, 0x30
bne _0807C1F0
movs r5, 0
_0807C1A2:
ldr r0, _0807C1E8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807C1EC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807C1E0
adds r0, r6, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0807C1E0
mov r3, r10
str r3, [sp]
ldr r0, [sp, 0x14]
str r0, [sp, 0x4]
mov r0, r8
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r4, 0
bl sub_807C580
mov r8, r0
_0807C1E0:
adds r5, 0x1
cmp r5, 0x13
ble _0807C1A2
b _0807C3F6
.align 2, 0
_0807C1E8: .4byte gUnknown_203B418
_0807C1EC: .4byte 0x000135cc
_0807C1F0:
cmp r0, 0x40
bne _0807C2A8
movs r7, 0
ldr r1, _0807C2A4
mov r9, r1
_0807C1FA:
movs r2, 0x4
ldrsh r0, [r6, r2]
mov r3, r9
movs r4, 0
ldrsh r1, [r3, r4]
adds r0, r1
movs r2, 0x6
ldrsh r1, [r6, r2]
movs r4, 0x2
ldrsh r2, [r3, r4]
adds r1, r2
bl sub_804954C
adds r4, r0, 0
adds r0, r6, 0
adds r1, r7, 0
bl sub_8071138
lsls r0, 24
cmp r0, 0
beq _0807C296
ldr r5, [r4, 0x10]
cmp r5, 0
beq _0807C250
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807C250
mov r4, r8
mov r0, r10
str r0, [sp]
ldr r1, [sp, 0x14]
str r1, [sp, 0x4]
adds r0, r4, 0
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r5, 0
bl sub_807C580
mov r8, r0
cmp r4, r8
bne _0807C296
_0807C250:
movs r2, 0x4
ldrsh r0, [r6, r2]
mov r3, r9
movs r4, 0
ldrsh r1, [r3, r4]
lsls r1, 1
adds r0, r1
movs r2, 0x6
ldrsh r1, [r6, r2]
movs r4, 0x2
ldrsh r2, [r3, r4]
lsls r2, 1
adds r1, r2
bl sub_804954C
adds r4, r0, 0
ldr r5, [r4, 0x10]
cmp r5, 0
beq _0807C296
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807C296
mov r0, r10
str r0, [sp]
ldr r1, [sp, 0x14]
str r1, [sp, 0x4]
mov r0, r8
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r5, 0
bl sub_807C580
mov r8, r0
_0807C296:
movs r2, 0x4
add r9, r2
adds r7, 0x1
cmp r7, 0x7
ble _0807C1FA
b _0807C3F6
.align 2, 0
_0807C2A4: .4byte gUnknown_80F4448
_0807C2A8:
cmp r0, 0x50
beq _0807C2B0
cmp r0, 0x80
bne _0807C394
_0807C2B0:
movs r3, 0x1
str r3, [sp, 0x18]
cmp r0, 0x50
bne _0807C2BC
movs r4, 0xA
str r4, [sp, 0x18]
_0807C2BC:
movs r0, 0
mov r9, r0
_0807C2C0:
ldr r0, _0807C37C
ldr r0, [r0]
mov r2, r9
lsls r1, r2, 2
ldr r3, _0807C380
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807C370
cmp r6, r4
beq _0807C370
adds r1, r4, 0x4
adds r0, r6, 0x4
bl sub_80983D8
adds r5, r0, 0
ldr r0, _0807C384
adds r7, r5, r0
ldrb r0, [r7]
cmp r0, 0
bne _0807C370
adds r0, r6, 0
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
beq _0807C370
adds r0, r6, 0
adds r1, r4, 0
ldr r2, [sp, 0x18]
bl sub_807C4A0
lsls r0, 24
cmp r0, 0
beq _0807C370
ldr r0, [sp, 0x14]
str r0, [sp]
ldr r0, [sp, 0xC]
adds r1, r6, 0
adds r2, r4, 0
mov r3, r10
bl sub_807C648
lsls r0, 24
cmp r0, 0
beq _0807C370
adds r0, r6, 0
adds r1, r4, 0
adds r2, r5, 0
ldr r3, [sp, 0x18]
bl sub_807C9F8
lsls r0, 24
cmp r0, 0
beq _0807C370
movs r0, 0x1
strb r0, [r7]
ldr r0, _0807C388
add r0, r8
strb r5, [r0]
adds r0, r6, 0
mov r1, r10
bl sub_8071A1C
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
adds r0, r6, 0
ldr r1, [sp, 0xC]
adds r2, r4, 0
bl sub_807C7AC
ldr r1, _0807C38C
mov r3, r8
lsls r2, r3, 2
adds r1, r2, r1
str r0, [r1]
ldr r0, _0807C390
adds r2, r0
str r4, [r2]
movs r4, 0x1
add r8, r4
_0807C370:
movs r0, 0x1
add r9, r0
mov r1, r9
cmp r1, 0x13
ble _0807C2C0
b _0807C3F6
.align 2, 0
_0807C37C: .4byte gUnknown_203B418
_0807C380: .4byte 0x000135cc
_0807C384: .4byte gUnknown_202F380
_0807C388: .4byte gUnknown_202F388
_0807C38C: .4byte gUnknown_202F390
_0807C390: .4byte gUnknown_202F3B0
_0807C394:
cmp r0, 0x60
bne _0807C3DC
movs r5, 0
_0807C39A:
ldr r0, _0807C3D4
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807C3D8
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807C3CA
mov r3, r10
str r3, [sp]
ldr r0, [sp, 0x14]
str r0, [sp, 0x4]
mov r0, r8
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r4, 0
bl sub_807C580
mov r8, r0
_0807C3CA:
adds r5, 0x1
cmp r5, 0x13
ble _0807C39A
b _0807C3F6
.align 2, 0
_0807C3D4: .4byte gUnknown_203B418
_0807C3D8: .4byte 0x000135cc
_0807C3DC:
cmp r0, 0x70
bne _0807C3F6
mov r1, r10
str r1, [sp]
ldr r2, [sp, 0x14]
str r2, [sp, 0x4]
mov r0, r8
ldr r1, [sp, 0xC]
adds r2, r6, 0
adds r3, r6, 0
bl sub_807C580
mov r8, r0
_0807C3F6:
mov r3, r8
cmp r3, 0
bne _0807C402
ldr r4, [sp, 0x8]
strb r3, [r4]
b _0807C48A
_0807C402:
movs r4, 0
movs r3, 0
mov r0, r8
cmp r0, 0
ble _0807C420
ldr r2, _0807C464
mov r1, r8
_0807C410:
ldr r0, [r2]
cmp r3, r0
bge _0807C418
adds r3, r0, 0
_0807C418:
adds r2, 0x4
subs r1, 0x1
cmp r1, 0
bne _0807C410
_0807C420:
mov r1, r8
cmp r1, 0
ble _0807C43A
movs r5, 0
ldr r2, _0807C464
_0807C42A:
ldr r0, [r2]
cmp r3, r0
beq _0807C432
str r5, [r2]
_0807C432:
adds r2, 0x4
subs r1, 0x1
cmp r1, 0
bne _0807C42A
_0807C43A:
str r3, [sp, 0x10]
mov r2, r8
cmp r2, 0
ble _0807C450
ldr r2, _0807C464
mov r1, r8
_0807C446:
ldm r2!, {r0}
adds r4, r0
subs r1, 0x1
cmp r1, 0
bne _0807C446
_0807C450:
adds r0, r4, 0
bl sub_8084100
adds r2, r0, 0
movs r1, 0
cmp r1, r8
bge _0807C478
ldr r3, _0807C464
b _0807C470
.align 2, 0
_0807C464: .4byte gUnknown_202F390
_0807C468:
adds r3, 0x4
adds r1, 0x1
cmp r1, r8
bge _0807C478
_0807C470:
ldr r0, [r3]
subs r2, r0
cmp r2, 0
bge _0807C468
_0807C478:
movs r0, 0x1
ldr r3, [sp, 0x8]
strb r0, [r3]
ldr r0, _0807C49C
adds r0, r1, r0
ldrb r0, [r0]
strb r0, [r3, 0x1]
movs r0, 0x8
str r0, [r3, 0x4]
_0807C48A:
ldr r0, [sp, 0x10]
_0807C48C:
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807C49C: .4byte gUnknown_202F388
thumb_func_end sub_807C04C
thumb_func_start sub_807C4A0
sub_807C4A0:
push {r4-r7,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r0, 0x4
ldrsh r1, [r4, r0]
movs r3, 0x4
ldrsh r0, [r5, r3]
subs r3, r1, r0
cmp r3, 0
bge _0807C4B6
negs r3, r3
_0807C4B6:
movs r6, 0x6
ldrsh r1, [r4, r6]
movs r7, 0x6
ldrsh r0, [r5, r7]
subs r1, r0
cmp r1, 0
bge _0807C4C6
negs r1, r1
_0807C4C6:
adds r0, r1, 0
cmp r1, r3
bge _0807C4CE
adds r0, r3, 0
_0807C4CE:
cmp r0, 0xA
bgt _0807C578
cmp r0, r2
bgt _0807C578
movs r6, 0x1
negs r6, r6
cmp r3, r1
bne _0807C516
movs r0, 0x4
ldrsh r1, [r4, r0]
movs r2, 0x4
ldrsh r0, [r5, r2]
ldrh r2, [r4, 0x4]
ldrh r3, [r5, 0x4]
cmp r1, r0
bge _0807C4FE
movs r6, 0x6
ldrsh r1, [r4, r6]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
blt _0807C574
cmp r1, r0
bgt _0807C574
_0807C4FE:
lsls r1, r2, 16
lsls r0, r3, 16
movs r6, 0x7
cmp r1, r0
ble _0807C570
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
cmp r1, r0
ble _0807C570
b _0807C574
_0807C516:
movs r3, 0x4
ldrsh r1, [r4, r3]
movs r7, 0x4
ldrsh r0, [r5, r7]
ldrh r2, [r4, 0x4]
ldrh r3, [r5, 0x4]
cmp r1, r0
bne _0807C532
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
blt _0807C574
_0807C532:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
bge _0807C546
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
beq _0807C574
_0807C546:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
bne _0807C55A
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r7, 0x6
ldrsh r0, [r5, r7]
cmp r1, r0
bgt _0807C574
_0807C55A:
lsls r1, r2, 16
lsls r0, r3, 16
cmp r1, r0
ble _0807C570
movs r0, 0x6
ldrsh r1, [r4, r0]
movs r2, 0x6
ldrsh r0, [r5, r2]
cmp r1, r0
bne _0807C570
movs r6, 0x6
_0807C570:
cmp r6, 0
blt _0807C578
_0807C574:
movs r0, 0x1
b _0807C57A
_0807C578:
movs r0, 0
_0807C57A:
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807C4A0
thumb_func_start sub_807C580
sub_807C580:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r6, r0, 0
adds r5, r2, 0
adds r7, r3, 0
ldr r0, [sp, 0x28]
lsls r1, 16
asrs r1, 16
mov r9, r1
lsls r0, 24
lsrs r0, 24
mov r10, r0
ldr r2, [r5, 0x70]
ldr r1, [r5, 0x4]
ldr r0, [r7, 0x4]
cmp r1, r0
beq _0807C5BC
movs r0, 0xF0
mov r1, r9
ands r0, r1
cmp r0, 0x30
beq _0807C5BC
cmp r0, 0x60
beq _0807C5BC
cmp r0, 0x70
bne _0807C5C4
_0807C5BC:
adds r0, r2, 0
adds r0, 0x46
ldrb r4, [r0]
b _0807C5CE
_0807C5C4:
adds r0, r5, 0x4
adds r1, r7, 0x4
bl sub_80983D8
adds r4, r0, 0
_0807C5CE:
ldr r0, _0807C638
adds r0, r4
mov r8, r0
ldrb r0, [r0]
cmp r0, 0
bne _0807C624
mov r0, r10
str r0, [sp]
mov r0, r9
adds r1, r5, 0
adds r2, r7, 0
ldr r3, [sp, 0x24]
bl sub_807C648
lsls r0, 24
cmp r0, 0
beq _0807C624
movs r0, 0x1
mov r1, r8
strb r0, [r1]
ldr r0, _0807C63C
adds r0, r6, r0
strb r4, [r0]
adds r0, r5, 0
ldr r1, [sp, 0x24]
bl sub_8071A1C
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
adds r0, r5, 0
mov r1, r9
adds r2, r7, 0
bl sub_807C7AC
ldr r1, _0807C640
lsls r2, r6, 2
adds r1, r2, r1
str r0, [r1]
ldr r0, _0807C644
adds r2, r0
str r7, [r2]
adds r6, 0x1
_0807C624:
adds r0, r6, 0
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807C638: .4byte gUnknown_202F380
_0807C63C: .4byte gUnknown_202F388
_0807C640: .4byte gUnknown_202F390
_0807C644: .4byte gUnknown_202F3B0
thumb_func_end sub_807C580
thumb_func_start sub_807C648
sub_807C648:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r5, r1, 0
adds r4, r2, 0
mov r8, r3
ldr r1, [sp, 0x1C]
lsls r0, 16
asrs r6, r0, 16
lsls r1, 24
lsrs r1, 24
mov r9, r1
movs r7, 0
movs r0, 0xF
ands r0, r6
adds r1, r0, 0
cmp r1, 0
bne _0807C686
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0807C6E0
movs r7, 0x1
b _0807C6E4
_0807C686:
cmp r1, 0x1
beq _0807C6BE
cmp r1, 0x2
bne _0807C692
ldr r1, [r4, 0x70]
b _0807C69C
_0807C692:
cmp r1, 0x5
bne _0807C6B6
ldr r1, [r4, 0x70]
cmp r5, r4
beq _0807C6B2
_0807C69C:
movs r7, 0x1
ldrb r0, [r1, 0x8]
cmp r0, 0x1
beq _0807C6B2
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x4
beq _0807C6B2
cmp r0, 0x1
bne _0807C6E0
_0807C6B2:
movs r0, 0
b _0807C7A0
_0807C6B6:
cmp r1, 0x6
bne _0807C6D4
cmp r5, r4
beq _0807C6B2
_0807C6BE:
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0807C6E0
movs r7, 0x1
b _0807C6E4
_0807C6D4:
subs r0, 0x3
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
bhi _0807C6E0
movs r7, 0x1
_0807C6E0:
cmp r7, 0
beq _0807C79E
_0807C6E4:
mov r0, r9
cmp r0, 0
beq _0807C77C
adds r0, r5, 0
adds r1, r4, 0
mov r2, r8
bl sub_805CEB8
lsls r0, 24
cmp r0, 0
beq _0807C6B2
movs r1, 0xF0
lsls r1, 4
ands r1, r6
movs r0, 0x80
lsls r0, 1
cmp r1, r0
beq _0807C78A
movs r0, 0x80
lsls r0, 2
cmp r1, r0
beq _0807C76E
movs r0, 0xC0
lsls r0, 2
cmp r1, r0
bne _0807C720
adds r0, r4, 0
bl sub_8070A58
b _0807C774
_0807C720:
movs r0, 0x80
lsls r0, 3
cmp r1, r0
bne _0807C730
adds r0, r4, 0
bl sub_8070B28
b _0807C774
_0807C730:
movs r0, 0xC0
lsls r0, 3
cmp r1, r0
bne _0807C75A
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0x5C
ldrb r0, [r0]
cmp r0, 0xE
beq _0807C74E
adds r0, r1, 0
adds r0, 0x5D
ldrb r0, [r0]
cmp r0, 0xE
bne _0807C6B2
_0807C74E:
adds r0, r1, 0
adds r0, 0xF5
ldrb r0, [r0]
cmp r0, 0
beq _0807C79E
b _0807C6B2
_0807C75A:
movs r0, 0xA0
lsls r0, 3
cmp r1, r0
bne _0807C79E
adds r0, r4, 0
bl sub_8070A58
lsls r0, 24
cmp r0, 0
bne _0807C79E
_0807C76E:
adds r0, r4, 0
bl sub_8070B48
_0807C774:
lsls r0, 24
cmp r0, 0
bne _0807C79E
b _0807C6B2
_0807C77C:
movs r0, 0xF0
lsls r0, 4
ands r0, r6
movs r1, 0x80
lsls r1, 1
cmp r0, r1
bne _0807C79E
_0807C78A:
mov r0, r8
movs r1, 0x2
bl sub_8092BD8
adds r4, r0, 0
movs r0, 0x64
bl sub_8084100
cmp r0, r4
bge _0807C6B2
_0807C79E:
adds r0, r7, 0
_0807C7A0:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807C648
thumb_func_start sub_807C7AC
sub_807C7AC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r5, r0, 0
mov r8, r2
lsls r1, 16
asrs r1, 16
lsls r3, 24
lsrs r3, 24
mov r9, r3
movs r6, 0x1
ldr r4, [r2, 0x70]
adds r7, r4, 0
ldrb r0, [r4, 0x6]
cmp r0, 0
beq _0807C7D6
movs r0, 0xF
ands r0, r1
cmp r0, 0
beq _0807C7DA
_0807C7D6:
movs r0, 0x1
b _0807C848
_0807C7DA:
adds r0, r5, 0
movs r1, 0x9
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807C804
ldr r0, _0807C7FC
ldr r0, [r0]
movs r2, 0x2
ldrsh r1, [r4, r2]
ldr r2, _0807C800
adds r0, r2
adds r0, r1
ldrb r6, [r0]
b _0807C846
.align 2, 0
_0807C7FC: .4byte gUnknown_203B418
_0807C800: .4byte 0x0000363c
_0807C804:
adds r0, r5, 0
movs r1, 0xA
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807C828
ldrb r1, [r7, 0xE]
movs r2, 0xC
negs r2, r2
adds r0, r2, 0
subs r0, r1
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
bne _0807C846
movs r6, 0x1
b _0807C846
_0807C828:
adds r0, r5, 0
movs r1, 0xB
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807C846
adds r0, r5, 0
mov r1, r8
mov r2, r9
bl sub_806E654
adds r0, 0x1
lsls r0, 24
lsrs r6, r0, 24
_0807C846:
adds r0, r6, 0
_0807C848:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807C7AC
thumb_func_start sub_807C854
sub_807C854:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x50
adds r7, r0, 0
str r1, [sp, 0x40]
lsls r2, 24
lsrs r2, 24
str r2, [sp, 0x44]
ldr r0, [r7, 0x70]
movs r1, 0
mov r8, r1
adds r1, r0, 0
adds r1, 0x46
ldrb r6, [r1]
adds r0, 0xE8
ldrb r0, [r0]
movs r3, 0x8
mov r10, r3
cmp r0, 0x1
bne _0807C886
movs r0, 0x1
mov r10, r0
_0807C886:
movs r4, 0
adds r0, r7, 0
movs r1, 0x9
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807C8A4
adds r0, r7, 0
movs r1, 0xA
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _0807C8A6
_0807C8A4:
movs r4, 0x1
_0807C8A6:
str r4, [sp, 0x48]
adds r0, r7, 0
movs r1, 0x8
bl sub_80718D8
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x4C]
movs r1, 0
mov r9, r1
cmp r9, r10
bge _0807C952
_0807C8BE:
movs r0, 0x7
ands r6, r0
movs r3, 0x4
ldrsh r0, [r7, r3]
ldr r1, _0807C95C
lsls r2, r6, 2
adds r2, r1
movs r3, 0
ldrsh r1, [r2, r3]
adds r0, r1
movs r3, 0x6
ldrsh r1, [r7, r3]
movs r3, 0x2
ldrsh r2, [r2, r3]
adds r1, r2
bl sub_804954C
ldr r5, [r0, 0x10]
cmp r5, 0
beq _0807C948
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807C948
adds r0, r7, 0
adds r1, r6, 0
bl sub_8071138
lsls r0, 24
cmp r0, 0
beq _0807C948
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0
ldr r3, [sp, 0x44]
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0807C948
ldr r0, [sp, 0x4C]
cmp r0, 0
beq _0807C922
ldr r0, [r5, 0x70]
adds r0, 0xB0
ldrb r0, [r0]
cmp r0, 0x1
beq _0807C948
_0807C922:
mov r1, r8
lsls r4, r1, 2
mov r3, sp
adds r0, r3, r4
str r6, [r0]
adds r0, r7, 0
movs r1, 0
adds r2, r5, 0
movs r3, 0
bl sub_807C7AC
add r1, sp, 0x20
adds r1, r4
str r0, [r1]
ldr r0, [sp, 0x48]
cmp r0, 0
beq _0807C960
movs r1, 0x1
add r8, r1
_0807C948:
movs r3, 0x1
add r9, r3
adds r6, 0x1
cmp r9, r10
blt _0807C8BE
_0807C952:
mov r0, r8
cmp r0, 0
bne _0807C966
movs r0, 0
b _0807C9E8
.align 2, 0
_0807C95C: .4byte gUnknown_80F4448
_0807C960:
ldr r1, [sp, 0x40]
str r6, [r1]
b _0807C9E6
_0807C966:
movs r4, 0
movs r3, 0
mov r0, r8
cmp r0, 0
ble _0807C984
add r1, sp, 0x20
mov r2, r8
_0807C974:
ldr r0, [r1]
cmp r3, r0
bge _0807C97C
adds r3, r0, 0
_0807C97C:
adds r1, 0x4
subs r2, 0x1
cmp r2, 0
bne _0807C974
_0807C984:
mov r1, r8
cmp r1, 0
ble _0807C9A0
movs r5, 0
add r1, sp, 0x20
mov r2, r8
_0807C990:
ldr r0, [r1]
cmp r3, r0
beq _0807C998
str r5, [r1]
_0807C998:
adds r1, 0x4
subs r2, 0x1
cmp r2, 0
bne _0807C990
_0807C9A0:
mov r3, r8
cmp r3, 0
ble _0807C9B4
add r1, sp, 0x20
mov r2, r8
_0807C9AA:
ldm r1!, {r0}
adds r4, r0
subs r2, 0x1
cmp r2, 0
bne _0807C9AA
_0807C9B4:
adds r0, r4, 0
bl sub_8084100
adds r1, r0, 0
movs r2, 0
cmp r2, r8
bge _0807C9DC
ldr r0, [sp, 0x20]
subs r1, r0
cmp r1, 0
blt _0807C9DC
add r3, sp, 0x20
_0807C9CC:
adds r3, 0x4
adds r2, 0x1
cmp r2, r8
bge _0807C9DC
ldr r0, [r3]
subs r1, r0
cmp r1, 0
bge _0807C9CC
_0807C9DC:
lsls r0, r2, 2
add r0, sp
ldr r0, [r0]
ldr r1, [sp, 0x40]
str r0, [r1]
_0807C9E6:
movs r0, 0x1
_0807C9E8:
add sp, 0x50
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807C854
thumb_func_start sub_807C9F8
sub_807C9F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r4, r0, 0
mov r10, r1
adds r7, r2, 0
adds r5, r3, 0
movs r0, 0x4
ldrsh r1, [r4, r0]
mov r2, r10
movs r3, 0x4
ldrsh r0, [r2, r3]
subs r2, r1, r0
cmp r2, 0
bge _0807CA1C
negs r2, r2
_0807CA1C:
movs r6, 0x6
ldrsh r1, [r4, r6]
mov r3, r10
movs r6, 0x6
ldrsh r0, [r3, r6]
subs r6, r1, r0
cmp r6, 0
bge _0807CA2E
negs r6, r6
_0807CA2E:
cmp r6, r2
bge _0807CA34
adds r6, r2, 0
_0807CA34:
cmp r6, r5
ble _0807CA3A
adds r6, r5, 0
_0807CA3A:
adds r0, r4, 0
movs r1, 0x3
bl sub_80718D8
lsls r0, 24
cmp r0, 0
bne _0807CA50
cmp r6, r5
bgt _0807CAAC
_0807CA4C:
movs r0, 0x1
b _0807CAAE
_0807CA50:
movs r0, 0x4
ldrsh r5, [r4, r0]
movs r1, 0x6
ldrsh r4, [r4, r1]
ldr r1, _0807CA70
lsls r0, r7, 2
adds r0, r1
movs r3, 0
ldrsh r2, [r0, r3]
mov r9, r2
movs r2, 0x2
ldrsh r1, [r0, r2]
mov r8, r1
movs r7, 0
b _0807CA94
.align 2, 0
_0807CA70: .4byte gUnknown_80F4448
_0807CA74:
adds r0, r5, 0
adds r1, r4, 0
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0807CAAC
ldr r0, [r2, 0x10]
cmp r0, r10
beq _0807CA4C
cmp r0, 0
bne _0807CAAC
adds r7, 0x1
_0807CA94:
cmp r7, r6
bgt _0807CAAC
add r5, r9
add r4, r8
cmp r5, 0
ble _0807CAAC
cmp r4, 0
ble _0807CAAC
cmp r5, 0x36
bgt _0807CAAC
cmp r4, 0x1E
ble _0807CA74
_0807CAAC:
movs r0, 0
_0807CAAE:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807C9F8
thumb_func_start sub_807CABC
sub_807CABC:
push {r4-r6,lr}
sub sp, 0x4
adds r4, r0, 0
movs r6, 0
b _0807CADC
_0807CAC6:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807CB0A
ldr r1, _0807CB38
adds r0, r5, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807CB0A
adds r6, 0x1
_0807CADC:
adds r0, r4, 0
movs r1, 0x1
bl sub_8070828
cmp r6, r0
bge _0807CB0A
ldr r5, [r4, 0x70]
adds r0, r5, 0
adds r0, 0x48
ldrb r1, [r0]
movs r0, 0
str r0, [sp]
adds r0, r4, 0
movs r2, 0x1
movs r3, 0
bl sub_8055A00
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807CAC6
_0807CB0A:
adds r0, r4, 0
movs r1, 0x1
bl sub_8057588
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807CB2A
ldr r0, [r4, 0x70]
adds r0, 0x48
ldrb r1, [r0]
adds r0, r4, 0
bl sub_806A9B4
_0807CB2A:
adds r0, r4, 0
bl sub_806A1B0
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807CB38: .4byte 0x00000159
thumb_func_end sub_807CABC
thumb_func_start sub_807CB3C
sub_807CB3C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
adds r6, r0, 0
ldr r7, [r6, 0x70]
movs r1, 0
movs r2, 0x15
bl sub_8044D90
adds r2, r0, 0
ldr r5, [r2]
ldrb r1, [r2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _0807CB80
ldr r0, _0807CB78
adds r1, r2, 0
bl sub_8045BF8
ldr r0, _0807CB7C
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _0807CD54
.align 2, 0
_0807CB78: .4byte gUnknown_202DE58
_0807CB7C: .4byte gUnknown_80FE3E8
_0807CB80:
add r0, sp, 0x8
adds r1, r7, 0
adds r1, 0x44
ldm r1!, {r2-r4}
stm r0!, {r2-r4}
ldm r1!, {r2-r4}
stm r0!, {r2-r4}
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _0807CBAC
ldr r0, _0807CBA8
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
movs r4, 0x1
b _0807CCDE
.align 2, 0
_0807CBA8: .4byte gPtrMysteriousPowerPreventedUseMessage
_0807CBAC:
movs r0, 0x1
mov r8, r0
add r4, sp, 0x20
lsls r5, 8
lsrs r0, r5, 24
bl sub_80913CC
adds r1, r0, 0
lsls r1, 16
lsrs r1, 16
adds r0, r4, 0
bl sub_8092A88
ldrb r0, [r7, 0x7]
mov r10, r4
mov r9, r5
cmp r0, 0
bne _0807CC08
ldr r1, _0807CC20
ldr r0, [sp, 0x28]
ands r0, r1
mov r1, r8
orrs r0, r1
str r0, [sp, 0x28]
movs r0, 0xA
add r4, sp, 0x28
str r0, [r4, 0x4]
movs r3, 0x8C
lsls r3, 1
adds r2, r7, r3
adds r0, r4, 0
adds r1, r6, 0
bl sub_807C04C
ldrb r0, [r4]
cmp r0, 0
beq _0807CC08
ldrb r1, [r4, 0x1]
movs r0, 0x7
ands r0, r1
adds r1, r7, 0
adds r1, 0x46
strb r0, [r1]
adds r0, r6, 0
bl sub_8069DCC
_0807CC08:
adds r0, r7, 0
adds r0, 0xBC
ldrb r0, [r0]
cmp r0, 0x1
bne _0807CC2C
ldr r0, _0807CC24
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807CC28
b _0807CC3C
.align 2, 0
_0807CC20: .4byte 0xffffff00
_0807CC24: .4byte gUnknown_202DF98
_0807CC28: .4byte gUnknown_80FC714
_0807CC2C:
cmp r0, 0x7
bne _0807CC50
ldr r0, _0807CC48
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807CC4C
_0807CC3C:
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _0807CCDC
.align 2, 0
_0807CC48: .4byte gUnknown_202DF98
_0807CC4C: .4byte gUnknown_80FC718
_0807CC50:
adds r0, r7, 0
adds r0, 0xAC
ldrb r0, [r0]
cmp r0, 0x4
bne _0807CC72
ldr r0, _0807CCB8
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807CCBC
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
movs r4, 0
mov r8, r4
_0807CC72:
mov r0, r8
cmp r0, 0
beq _0807CCDC
mov r5, r9
lsrs r0, r5, 24
cmp r0, 0xB6
beq _0807CC84
cmp r0, 0xBF
bne _0807CCC0
_0807CC84:
adds r0, r6, 0
movs r1, 0
movs r2, 0x7A
bl sub_8044DF0
mov r2, r10
ldrb r1, [r2]
movs r0, 0x8
movs r4, 0
orrs r0, r1
add r3, sp, 0x20
movs r1, 0x4
orrs r0, r1
strb r0, [r3]
movs r0, 0xA
strb r0, [r3, 0x4]
lsrs r2, r5, 24
str r4, [sp]
str r3, [sp, 0x4]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8055FA0
b _0807CCDE
.align 2, 0
_0807CCB8: .4byte gUnknown_202DF98
_0807CCBC: .4byte gUnknown_80FC6A8
_0807CCC0:
mov r3, r9
lsrs r2, r3, 24
movs r0, 0
str r0, [sp]
mov r4, r10
str r4, [sp, 0x4]
adds r0, r6, 0
movs r1, 0
movs r3, 0
bl sub_8055FA0
lsls r0, 24
lsrs r4, r0, 24
b _0807CCDE
_0807CCDC:
movs r4, 0
_0807CCDE:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807CD38
cmp r4, 0
beq _0807CCF8
adds r0, r6, 0
movs r1, 0
movs r2, 0x7A
bl sub_8044DF0
_0807CCF8:
adds r0, r6, 0
bl sub_8071DA4
adds r0, r6, 0
movs r1, 0x8
bl sub_806CE68
ldrb r0, [r7, 0x7]
cmp r0, 0
beq _0807CD18
adds r0, r6, 0x4
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807CD18:
adds r0, r6, 0
bl sub_806A5B8
ldr r0, _0807CD30
ldr r0, [r0]
ldr r1, _0807CD34
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8075900
b _0807CD44
.align 2, 0
_0807CD30: .4byte gUnknown_203B418
_0807CD34: .4byte 0x00003a08
_0807CD38:
cmp r4, 0
beq _0807CD44
add r0, sp, 0x8
movs r1, 0
bl sub_8044D40
_0807CD44:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807CD54
adds r0, r6, 0
bl sub_806A1B0
_0807CD54:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807CB3C
thumb_func_start sub_807CD64
sub_807CD64:
push {r4,r5,lr}
adds r3, r0, 0
adds r4, r1, 0
adds r5, r2, 0
ldrh r0, [r4, 0x2]
cmp r0, 0xED
bne _0807CD88
cmp r5, 0
bne _0807CD88
adds r0, r3, 0
movs r1, 0xE
bl sub_8071858
lsls r0, 24
cmp r0, 0
bne _0807CD88
movs r0, 0x73
b _0807CD94
_0807CD88:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8092AE0
lsls r0, 16
asrs r0, 16
_0807CD94:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_807CD64
thumb_func_start sub_807CD9C
sub_807CD9C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x34
mov r9, r0
adds r6, r1, 0
adds r4, r2, 0
movs r0, 0xA
str r0, [sp, 0x24]
bl sub_80441E8
lsls r0, 24
cmp r0, 0
beq _0807CDC4
ldr r0, _0807CDC0
b _0807CDFE
.align 2, 0
_0807CDC0: .4byte gUnknown_80FC9E8
_0807CDC4:
cmp r9, r6
bne _0807CDE4
ldr r0, _0807CDDC
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807CDE0
ldr r2, [r0]
adds r0, r6, 0
b _0807CE02
.align 2, 0
_0807CDDC: .4byte gUnknown_202DF98
_0807CDE0: .4byte gUnknown_80FCA10
_0807CDE4:
ldr r0, _0807CE0C
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807CE28
ldr r0, _0807CE10
_0807CDFE:
ldr r2, [r0]
mov r0, r9
_0807CE02:
adds r1, r6, 0
bl sub_80522F4
b _0807D02A
.align 2, 0
_0807CE0C: .4byte gUnknown_202DF98
_0807CE10: .4byte gUnknown_80FCBCC
_0807CE14:
str r0, [sp, 0x28]
b _0807CF26
_0807CE18:
ldrh r0, [r5]
movs r1, 0x3
ands r1, r0
negs r0, r1
orrs r0, r1
lsrs r0, 31
mov r10, r0
b _0807CF20
_0807CE28:
ldr r1, [r6, 0x70]
adds r2, r4, 0x4
movs r3, 0x7
adds r0, r2, 0
ands r0, r3
adds r1, 0x46
strb r0, [r1]
movs r0, 0x7
ands r2, r0
adds r0, r6, 0
movs r1, 0x6
bl sub_806CDD4
ldr r1, _0807D03C
adds r0, r6, 0
bl sub_80421C0
ldr r0, _0807D040
ldr r2, [r0]
mov r0, r9
adds r1, r6, 0
bl sub_80522F4
movs r1, 0x1
mov r10, r1
movs r2, 0
str r2, [sp, 0x28]
lsls r1, r4, 2
ldr r0, _0807D044
adds r1, r0
mov r8, r1
add r7, sp, 0x18
_0807CE68:
ldr r2, [r6, 0x4]
str r2, [sp, 0x18]
ldrh r0, [r7]
mov r3, r8
ldrh r3, [r3]
adds r0, r3
lsls r0, 16
lsrs r0, 16
ldr r1, _0807D048
ands r1, r2
orrs r1, r0
str r1, [sp, 0x18]
asrs r0, r1, 16
mov r2, r8
ldrh r2, [r2, 0x2]
adds r0, r2
lsls r0, 16
ldr r2, _0807D04C
ands r2, r1
orrs r2, r0
str r2, [sp, 0x18]
movs r3, 0
ldrsh r0, [r7, r3]
cmp r0, 0
blt _0807CF20
asrs r1, r2, 16
cmp r1, 0
blt _0807CF20
cmp r0, 0x37
bgt _0807CF20
cmp r1, 0x1F
bgt _0807CF20
mov r1, r8
movs r2, 0
ldrsh r0, [r1, r2]
lsls r0, 10
str r0, [sp, 0x2C]
movs r3, 0x2
ldrsh r0, [r1, r3]
lsls r0, 10
str r0, [sp, 0x30]
movs r4, 0x5
_0807CEBC:
adds r0, r6, 0
ldr r1, [sp, 0x2C]
ldr r2, [sp, 0x30]
bl sub_804539C
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807CED8
movs r0, 0x19
bl sub_803E46C
_0807CED8:
subs r4, 0x1
cmp r4, 0
bge _0807CEBC
movs r1, 0
ldrsh r0, [r7, r1]
ldr r1, [sp, 0x18]
asrs r1, 16
bl sub_804954C
adds r5, r0, 0
ldr r0, [r5, 0x10]
cmp r0, 0
bne _0807CE14
add r4, sp, 0x18
adds r0, r6, 0
adds r1, r4, 0
bl sub_80705F0
lsls r0, 24
cmp r0, 0
bne _0807CE18
movs r2, 0
ldrsh r1, [r7, r2]
movs r3, 0x2
ldrsh r2, [r4, r3]
adds r0, r6, 0
movs r3, 0x1
bl sub_80694C0
ldr r0, [sp, 0x24]
subs r0, 0x1
str r0, [sp, 0x24]
cmp r0, 0
bgt _0807CE68
movs r1, 0x1
mov r10, r1
_0807CF20:
mov r2, r10
cmp r2, 0
bne _0807CF4E
_0807CF26:
adds r1, r6, 0x4
adds r0, r6, 0
bl sub_807D068
ldr r0, _0807D050
movs r3, 0
ldrsh r2, [r0, r3]
movs r1, 0
str r1, [sp]
str r1, [sp, 0x4]
ldr r0, _0807D054
str r0, [sp, 0x8]
str r1, [sp, 0xC]
str r1, [sp, 0x10]
str r1, [sp, 0x14]
mov r0, r9
adds r1, r6, 0
movs r3, 0
bl sub_806F370
_0807CF4E:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807D02A
ldr r0, [sp, 0x28]
cmp r0, 0
beq _0807CF9E
add r4, sp, 0x1C
ldr r1, _0807D058
adds r0, r4, 0
bl sub_8092A88
ldr r0, [sp, 0x28]
adds r1, r4, 0
bl sub_80571F0
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
bne _0807CF9E
mov r0, r9
ldr r1, [sp, 0x28]
bl sub_807A96C
ldr r0, _0807D050
movs r1, 0
ldrsh r2, [r0, r1]
str r4, [sp]
str r4, [sp, 0x4]
ldr r0, _0807D05C
str r0, [sp, 0x8]
str r4, [sp, 0xC]
str r4, [sp, 0x10]
str r4, [sp, 0x14]
mov r0, r9
ldr r1, [sp, 0x28]
movs r3, 0
bl sub_806F370
_0807CF9E:
bl sub_8044B28
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _0807D02A
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807D02A
adds r0, r6, 0
bl sub_806A5B8
adds r4, r6, 0x4
adds r0, r6, 0
adds r1, r4, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _0807CFD8
adds r0, r6, 0
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_0807CFD8:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807D02A
adds r0, r6, 0
movs r1, 0x8
bl sub_806CE68
ldr r0, [r6, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0807D014
ldr r1, _0807D060
ldr r0, [r1]
strb r5, [r0, 0x1]
ldr r0, [r1]
movs r2, 0xB8
lsls r2, 3
adds r0, r2
movs r1, 0x1
negs r1, r1
str r1, [r0]
adds r0, r4, 0
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807D014:
adds r0, r6, 0
bl sub_806A5B8
ldr r0, _0807D060
ldr r0, [r0]
ldr r3, _0807D064
adds r0, r3
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8075900
_0807D02A:
add sp, 0x34
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807D03C: .4byte 0x000001a3
_0807D040: .4byte gUnknown_80F8A0C
_0807D044: .4byte gUnknown_80F4448
_0807D048: .4byte 0xffff0000
_0807D04C: .4byte 0x0000ffff
_0807D050: .4byte gUnknown_80F4F90
_0807D054: .4byte 0x00000219
_0807D058: .4byte 0x00000163
_0807D05C: .4byte 0x0000021a
_0807D060: .4byte gUnknown_203B418
_0807D064: .4byte 0x00003a08
thumb_func_end sub_807CD9C
thumb_func_start sub_807D068
sub_807D068:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x14
adds r6, r0, 0
movs r0, 0
ldrsh r2, [r1, r0]
lsls r0, r2, 1
adds r0, r2
lsls r0, 11
movs r2, 0xC0
lsls r2, 4
adds r2, r0
mov r10, r2
movs r0, 0x2
ldrsh r1, [r1, r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r1, 0x80
lsls r1, 5
adds r1, r0
mov r9, r1
ldr r0, [r6, 0xC]
subs r0, r2
cmp r0, 0
bge _0807D0A4
negs r0, r0
_0807D0A4:
ldr r1, [r6, 0x10]
cmp r0, 0xB
bgt _0807D0B8
mov r2, r9
subs r0, r1, r2
cmp r0, 0
bge _0807D0B4
negs r0, r0
_0807D0B4:
cmp r0, 0xB
ble _0807D11E
_0807D0B8:
movs r0, 0
mov r8, r0
ldr r5, [r6, 0xC]
adds r4, r1, 0
mov r1, r10
subs r0, r1, r5
movs r1, 0xC
bl __divsi3
str r0, [sp, 0x8]
mov r2, r9
subs r0, r2, r4
movs r1, 0xC
bl __divsi3
str r0, [sp, 0xC]
mov r0, sp
str r0, [sp, 0x10]
movs r7, 0xB
_0807D0DE:
ldr r1, [sp, 0x8]
adds r5, r1
ldr r2, [sp, 0xC]
adds r4, r2
str r5, [sp]
ldr r0, [sp, 0x10]
str r4, [r0, 0x4]
mov r0, r8
bl sub_8009C7C
lsls r1, r0, 1
adds r1, r0
lsls r1, 2
str r1, [r6, 0x1C]
adds r0, r6, 0
mov r1, sp
bl sub_804535C
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807D114
movs r0, 0x1A
bl sub_803E46C
_0807D114:
movs r1, 0xAA
add r8, r1
subs r7, 0x1
cmp r7, 0
bge _0807D0DE
_0807D11E:
mov r2, r10
str r2, [sp]
mov r0, r9
str r0, [sp, 0x4]
movs r0, 0
str r0, [r6, 0x1C]
adds r0, r6, 0
mov r1, sp
bl sub_804535C
movs r0, 0x1A
bl sub_803E46C
add sp, 0x14
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807D068
thumb_func_start sub_807D148
sub_807D148:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
mov r8, r0
adds r5, r1, 0
mov r9, r2
str r3, [sp, 0x4]
ldr r0, [r5, 0x70]
mov r10, r0
movs r1, 0
str r1, [sp, 0x8]
ldr r0, _0807D180
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807D188
ldr r0, _0807D184
b _0807D194
.align 2, 0
_0807D180: .4byte gUnknown_202DF98
_0807D184: .4byte gUnknown_80FCAE8
_0807D188:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
beq _0807D1A4
ldr r0, _0807D1A0
_0807D194:
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _0807D3A8
.align 2, 0
_0807D1A0: .4byte gUnknown_80FC97C
_0807D1A4:
mov r2, r9
cmp r2, 0x1
bne _0807D1DC
ldr r0, _0807D1D0
ldr r0, [r0]
ldr r3, _0807D1D4
adds r0, r3
ldr r1, [r0]
ldr r0, [r5, 0x4]
cmp r1, r0
bne _0807D1DC
ldr r0, _0807D1D8
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
mov r0, r8
adds r1, r5, 0
bl sub_8076D10
b _0807D3A8
.align 2, 0
_0807D1D0: .4byte gUnknown_203B418
_0807D1D4: .4byte 0x0000e21c
_0807D1D8: .4byte gUnknown_80FC9A0
_0807D1DC:
ldr r0, _0807D27C
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
adds r0, r5, 0
adds r1, r5, 0
bl sub_807A96C
mov r0, r8
adds r1, r5, 0
bl sub_80421AC
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807D252
mov r0, r10
adds r0, 0x46
ldrb r4, [r0]
ldr r1, [r5, 0x1C]
movs r2, 0x80
lsls r2, 4
adds r1, r2
str r1, [r5, 0x1C]
ldr r2, _0807D280
adds r6, r0, 0
cmp r1, r2
bgt _0807D252
movs r7, 0x7
_0807D21E:
ldr r0, _0807D284
ldr r0, [r0]
movs r1, 0x3
ands r0, r1
cmp r0, 0
bne _0807D23C
adds r4, 0x1
ands r4, r7
adds r0, r4, 0
ands r0, r7
strb r0, [r6]
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
_0807D23C:
movs r0, 0x22
bl sub_803E46C
ldr r1, [r5, 0x1C]
movs r3, 0x80
lsls r3, 4
adds r1, r3
str r1, [r5, 0x1C]
ldr r0, _0807D280
cmp r1, r0
ble _0807D21E
_0807D252:
mov r0, r9
cmp r0, 0x1
beq _0807D288
cmp r0, 0x1
bcc _0807D264
cmp r0, 0x2
beq _0807D2B0
cmp r0, 0x3
beq _0807D2C8
_0807D264:
mov r0, sp
bl sub_8083660
lsls r0, 24
cmp r0, 0
bne _0807D2CE
ldr r0, [r5, 0x4]
str r0, [sp]
movs r1, 0x1
str r1, [sp, 0x8]
b _0807D2CE
.align 2, 0
_0807D27C: .4byte gUnknown_80FC584
_0807D280: .4byte 0x00009fff
_0807D284: .4byte gUnknown_202EDCC
_0807D288:
ldr r0, _0807D2A8
ldr r1, [r0]
ldr r2, _0807D2AC
adds r1, r2
mov r0, sp
bl sub_808384C
lsls r0, 24
cmp r0, 0
bne _0807D2CE
ldr r0, [r5, 0x4]
str r0, [sp]
movs r3, 0x1
str r3, [sp, 0x8]
b _0807D2CE
.align 2, 0
_0807D2A8: .4byte gUnknown_203B418
_0807D2AC: .4byte 0x0000e21c
_0807D2B0:
mov r0, sp
ldr r1, [sp, 0x4]
bl sub_808384C
lsls r0, 24
cmp r0, 0
bne _0807D2CE
ldr r0, [r5, 0x4]
str r0, [sp]
movs r0, 0x1
str r0, [sp, 0x8]
b _0807D2CE
_0807D2C8:
ldr r1, [sp, 0x4]
ldr r0, [r1]
str r0, [sp]
_0807D2CE:
mov r0, sp
movs r2, 0
ldrsh r1, [r0, r2]
movs r3, 0x2
ldrsh r2, [r0, r3]
adds r0, r5, 0
movs r3, 0x1
bl sub_80694C0
adds r0, r5, 0
movs r1, 0
bl sub_804535C
adds r0, r5, 0
bl sub_807BB78
movs r0, 0x1
bl sub_803F580
adds r0, r5, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807D340
mov r1, r10
adds r1, 0x46
ldrb r4, [r1]
movs r0, 0x9C
lsls r0, 8
str r0, [r5, 0x1C]
adds r6, r1, 0
movs r7, 0x7
_0807D310:
ldr r0, _0807D3B8
ldr r0, [r0]
movs r1, 0x3
ands r0, r1
cmp r0, 0
bne _0807D32E
adds r4, 0x1
ands r4, r7
adds r0, r4, 0
ands r0, r7
strb r0, [r6]
adds r0, r5, 0
adds r1, r4, 0
bl sub_806CE68
_0807D32E:
movs r0, 0x22
bl sub_803E46C
ldr r0, [r5, 0x1C]
ldr r1, _0807D3BC
adds r0, r1
str r0, [r5, 0x1C]
cmp r0, 0
bgt _0807D310
_0807D340:
movs r4, 0
str r4, [r5, 0x1C]
movs r0, 0x22
bl sub_803E46C
ldr r2, [sp, 0x8]
cmp r2, 0
beq _0807D35C
ldr r0, _0807D3C0
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
_0807D35C:
mov r3, r9
cmp r3, 0x1
bne _0807D36A
mov r0, r8
adds r1, r5, 0
bl sub_8076D10
_0807D36A:
mov r1, r10
ldrb r0, [r1, 0x7]
cmp r0, 0
beq _0807D392
adds r0, r5, 0x4
bl sub_804AC20
ldr r1, _0807D3C4
ldr r0, [r1]
strb r4, [r0, 0x1]
ldr r0, [r1]
movs r2, 0xB8
lsls r2, 3
adds r0, r2
movs r1, 0x1
negs r1, r1
str r1, [r0]
movs r0, 0
bl sub_807EC28
_0807D392:
adds r0, r5, 0
bl sub_806A5B8
ldr r0, _0807D3C4
ldr r0, [r0]
ldr r3, _0807D3C8
adds r0, r3
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8075900
_0807D3A8:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807D3B8: .4byte gUnknown_202EDCC
_0807D3BC: .4byte 0xfffffc00
_0807D3C0: .4byte gUnknown_80FCB14
_0807D3C4: .4byte gUnknown_203B418
_0807D3C8: .4byte 0x00003a08
thumb_func_end sub_807D148
thumb_func_start sub_807D3CC
sub_807D3CC:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
mov r8, r0
movs r2, 0
ldr r4, _0807D448
ldr r0, [r4]
ldr r1, _0807D44C
adds r0, r1
ldrb r6, [r0]
cmp r6, 0
bne _0807D3E8
movs r6, 0x2
_0807D3E8:
mov r0, r8
str r2, [sp]
bl sub_80450FC
lsls r0, 24
lsrs r1, r0, 24
ldr r2, [sp]
cmp r1, 0xFF
bne _0807D450
mov r3, r8
movs r1, 0x6
ldrsh r0, [r3, r1]
subs r5, r0, r6
adds r0, r6
cmp r5, r0
bgt _0807D4A8
_0807D408:
mov r3, r8
movs r1, 0x4
ldrsh r0, [r3, r1]
subs r4, r0, r6
adds r0, r6
adds r7, r5, 0x1
cmp r4, r0
bgt _0807D438
_0807D418:
adds r0, r4, 0
adds r1, r5, 0
str r2, [sp]
bl sub_807D4E0
ldr r2, [sp]
orrs r2, r0
lsls r0, r2, 24
lsrs r2, r0, 24
adds r4, 0x1
mov r3, r8
movs r1, 0x4
ldrsh r0, [r3, r1]
adds r0, r6
cmp r4, r0
ble _0807D418
_0807D438:
adds r5, r7, 0
mov r3, r8
movs r1, 0x6
ldrsh r0, [r3, r1]
adds r0, r6
cmp r5, r0
ble _0807D408
b _0807D4A8
.align 2, 0
_0807D448: .4byte gUnknown_203B418
_0807D44C: .4byte 0x00018209
_0807D450:
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r3, _0807D468
adds r0, r3
ldr r1, [r4]
adds r6, r1, r0
movs r1, 0x4
ldrsh r0, [r6, r1]
subs r5, r0, 0x1
b _0807D49E
.align 2, 0
_0807D468: .4byte 0x000104c4
_0807D46C:
movs r1, 0x2
ldrsh r0, [r6, r1]
subs r4, r0, 0x1
movs r3, 0x6
ldrsh r0, [r6, r3]
adds r0, 0x1
adds r7, r5, 0x1
cmp r4, r0
bgt _0807D49C
_0807D47E:
adds r0, r4, 0
adds r1, r5, 0
str r2, [sp]
bl sub_807D4E0
ldr r2, [sp]
orrs r2, r0
lsls r0, r2, 24
lsrs r2, r0, 24
adds r4, 0x1
movs r1, 0x6
ldrsh r0, [r6, r1]
adds r0, 0x1
cmp r4, r0
ble _0807D47E
_0807D49C:
adds r5, r7, 0
_0807D49E:
movs r3, 0x8
ldrsh r0, [r6, r3]
adds r0, 0x1
cmp r5, r0
ble _0807D46C
_0807D4A8:
cmp r2, 0
beq _0807D4C4
ldr r0, _0807D4C0
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
bl sub_8040A84
bl sub_8049ED4
b _0807D4CE
.align 2, 0
_0807D4C0: .4byte gUnknown_80FD2F8
_0807D4C4:
ldr r0, _0807D4DC
ldr r1, [r0]
mov r0, r8
bl sub_80522A8
_0807D4CE:
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807D4DC: .4byte gUnknown_80FD320
thumb_func_end sub_807D3CC
thumb_func_start sub_807D4E0
sub_807D4E0:
push {r4,lr}
bl sub_804954C
ldr r4, [r0, 0x14]
cmp r4, 0
beq _0807D506
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x2
bne _0807D506
adds r1, r4, 0
adds r1, 0x20
ldrb r0, [r1]
cmp r0, 0
bne _0807D506
movs r0, 0x1
strb r0, [r1]
b _0807D508
_0807D506:
movs r0, 0
_0807D508:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_807D4E0
thumb_func_start sub_807D510
sub_807D510:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _0807D540
add sp, r4
ldr r1, _0807D544
add r1, sp
str r0, [r1]
movs r2, 0
movs r3, 0xD1
lsls r3, 4
add r3, sp
str r2, [r3]
ldr r4, _0807D548
add r4, sp
str r2, [r4]
add r5, sp, 0x4
mov r8, r5
mov r10, r2
mov r9, r2
add r7, sp, 0x8
b _0807D606
.align 2, 0
_0807D540: .4byte 0xfffff2d4
_0807D544: .4byte 0x00000d08
_0807D548: .4byte 0x00000d0c
_0807D54C:
movs r0, 0x4
ldrsh r1, [r5, r0]
ldr r2, _0807D650
add r2, sp
ldr r2, [r2]
movs r3, 0x4
ldrsh r0, [r2, r3]
subs r1, r0
cmp r1, 0
bge _0807D562
negs r1, r1
_0807D562:
cmp r1, 0x2
bgt _0807D580
movs r3, 0x6
ldrsh r1, [r5, r3]
ldr r4, _0807D650
add r4, sp
ldr r4, [r4]
movs r2, 0x6
ldrsh r0, [r4, r2]
subs r1, r0
cmp r1, 0
bge _0807D57C
negs r1, r1
_0807D57C:
cmp r1, 0x2
ble _0807D5FE
_0807D580:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_804954C
ldrh r1, [r0]
movs r2, 0x3
adds r0, r2, 0
ands r0, r1
cmp r0, 0
beq _0807D5FE
mov r3, r8
str r2, [r3]
ldr r4, _0807D654
add r4, sp
ldr r1, _0807D658
add r1, sp
ldr r1, [r1]
lsls r0, r1, 2
adds r4, r0
str r4, [r7, 0x6C]
ldr r0, [r5, 0x4]
str r0, [r7]
movs r2, 0x4
ldrsh r0, [r5, r2]
lsls r1, r0, 1
adds r1, r0
lsls r1, 3
adds r1, 0x4
lsls r1, 8
movs r3, 0x6
ldrsh r0, [r5, r3]
lsls r2, r0, 1
adds r2, r0
lsls r2, 3
adds r2, 0x4
lsls r2, 8
mov r0, r8
bl sub_8045394
movs r2, 0
movs r1, 0
strh r1, [r7, 0x22]
movs r0, 0x1
strb r0, [r7, 0x1C]
strb r2, [r7, 0x1E]
str r1, [r7, 0x18]
ldr r0, _0807D65C
ldr r0, [r0]
ldr r5, _0807D660
adds r0, r5
add r0, r9
ldr r0, [r0]
str r0, [r4]
adds r7, 0x74
movs r0, 0x74
add r8, r0
ldr r2, _0807D658
add r2, sp
ldr r1, [r2]
adds r1, 0x1
str r1, [r2]
_0807D5FE:
movs r3, 0x4
add r9, r3
movs r4, 0x1
add r10, r4
_0807D606:
ldr r0, _0807D65C
ldr r1, [r0]
ldr r5, _0807D664
adds r0, r1, r5
movs r2, 0
ldrsh r0, [r0, r2]
cmp r10, r0
bge _0807D634
ldr r3, _0807D668
adds r0, r1, r3
add r0, r9
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807D5FE
ldr r4, _0807D658
add r4, sp
ldr r4, [r4]
cmp r4, 0x18
ble _0807D54C
_0807D634:
ldr r5, _0807D658
add r5, sp
ldr r5, [r5]
cmp r5, 0
bne _0807D670
ldr r0, _0807D66C
ldr r1, [r0]
ldr r2, _0807D650
add r2, sp
ldr r0, [r2]
bl sub_80522A8
b _0807D9F4
.align 2, 0
_0807D650: .4byte 0x00000d08
_0807D654: .4byte 0x00000b58
_0807D658: .4byte 0x00000d0c
_0807D65C: .4byte gUnknown_203B418
_0807D660: .4byte 0x00003804
_0807D664: .4byte 0x00003904
_0807D668: .4byte 0x0001361c
_0807D66C: .4byte gUnknown_80FE034
_0807D670:
movs r1, 0
movs r7, 0x1D
ldr r0, _0807D754
add r0, sp
_0807D678:
strb r1, [r0]
subs r0, 0x1
subs r7, 0x1
cmp r7, 0
bge _0807D678
movs r7, 0
ldr r3, _0807D758
add r3, sp
ldr r3, [r3]
cmp r7, r3
blt _0807D690
b _0807D7CC
_0807D690:
ldr r4, _0807D75C
mov r10, r4
ldr r5, _0807D760
movs r0, 0
ldrsh r5, [r5, r0]
ldr r0, _0807D764
add r0, sp
str r5, [r0]
_0807D6A0:
movs r1, 0
mov r9, r1
ldr r2, _0807D768
add r2, sp
ldr r2, [r2]
ldrh r0, [r2, 0x4]
ldr r1, _0807D76C
ands r6, r1
orrs r6, r0
ldrh r0, [r2, 0x6]
lsls r0, 16
mov r4, r10
ands r6, r4
orrs r6, r0
mov r4, r9
adds r5, r7, 0x1
movs r0, 0xD2
lsls r0, 4
add r0, sp
str r5, [r0]
ldr r1, _0807D760
ldr r2, _0807D764
add r2, sp
ldr r2, [r2]
cmp r2, 0x63
beq _0807D790
ldr r3, _0807D770
add r3, sp
mov r8, r3
_0807D6DA:
ldr r0, _0807D774
add r0, sp
adds r0, r4
ldr r5, _0807D778
add r5, sp
str r0, [r5]
ldrb r0, [r0]
cmp r0, 0
bne _0807D77C
lsls r2, r4, 2
adds r2, r1
ldrh r0, [r2]
ldr r1, _0807D768
add r1, sp
ldr r1, [r1]
ldrh r1, [r1, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r1, _0807D76C
ands r6, r1
orrs r6, r0
ldrh r0, [r2, 0x2]
ldr r2, _0807D768
add r2, sp
ldr r2, [r2]
ldrh r2, [r2, 0x6]
adds r0, r2
lsls r0, 16
mov r3, r10
ands r6, r3
orrs r6, r0
lsls r0, r6, 16
asrs r0, 16
asrs r1, r6, 16
bl sub_804954C
adds r2, r0, 0
ldrh r1, [r2]
movs r3, 0x3
ands r3, r1
cmp r3, 0x1
bne _0807D77C
movs r5, 0x80
lsls r5, 2
adds r0, r5, 0
ands r0, r1
cmp r0, 0
bne _0807D77C
ldr r0, [r2, 0x14]
cmp r0, 0
bne _0807D77C
lsls r0, r7, 2
add r0, r8
str r6, [r0]
ldr r0, _0807D778
add r0, sp
ldr r0, [r0]
strb r3, [r0]
b _0807D7B8
.align 2, 0
_0807D754: .4byte 0x00000d05
_0807D758: .4byte 0x00000d0c
_0807D75C: .4byte 0x0000ffff
_0807D760: .4byte gUnknown_80F4468
_0807D764: .4byte 0x00000d18
_0807D768: .4byte 0x00000d08
_0807D76C: .4byte 0xffff0000
_0807D770: .4byte 0x00000bbc
_0807D774: .4byte 0x00000ce8
_0807D778: .4byte 0x00000d28
_0807D77C:
adds r4, 0x1
cmp r4, 0x1D
bgt _0807D790
lsls r0, r4, 2
ldr r1, _0807D9B4
adds r0, r1
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0x63
bne _0807D6DA
_0807D790:
mov r3, r9
cmp r3, 0
bne _0807D7B8
movs r0, 0x74
muls r0, r7
add r0, sp
adds r0, 0x4
str r3, [r0]
ldr r1, _0807D9B8
add r1, sp
lsls r0, r7, 2
adds r1, r0
ldrh r2, [r1]
mov r0, r10
orrs r0, r2
strh r0, [r1]
ldrh r2, [r1, 0x2]
mov r0, r10
orrs r0, r2
strh r0, [r1, 0x2]
_0807D7B8:
movs r4, 0xD2
lsls r4, 4
add r4, sp
ldr r7, [r4]
ldr r5, _0807D9BC
add r5, sp
ldr r5, [r5]
cmp r7, r5
bge _0807D7CC
b _0807D6A0
_0807D7CC:
movs r7, 0
ldr r0, _0807D9BC
add r0, sp
ldr r0, [r0]
cmp r7, r0
bge _0807D866
_0807D7D8:
movs r0, 0x74
adds r1, r7, 0
muls r1, r0
mov r8, r1
mov r4, sp
add r4, r8
adds r4, 0x4
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807D85A
adds r0, r4, 0x4
movs r1, 0x1
bl sub_80461C8
movs r2, 0x4
ldrsh r0, [r4, r2]
movs r3, 0x6
ldrsh r1, [r4, r3]
bl sub_80402AC
movs r5, 0xC2
lsls r5, 4
add r5, sp
lsls r6, r7, 3
adds r5, r6
ldr r4, _0807D9B8
add r4, sp
lsls r0, r7, 2
adds r4, r0
movs r0, 0
ldrsh r1, [r4, r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 3
adds r0, 0x4
lsls r0, 8
add r1, sp, 0x10
add r1, r8
ldr r1, [r1]
subs r0, r1
movs r1, 0x3C
bl __divsi3
str r0, [r5]
ldr r5, _0807D9C0
add r5, sp
adds r5, r6
movs r2, 0x2
ldrsh r1, [r4, r2]
lsls r0, r1, 1
adds r0, r1
lsls r0, 3
adds r0, 0x4
lsls r0, 8
add r1, sp, 0x14
add r1, r8
ldr r1, [r1]
subs r0, r1
movs r1, 0x3C
bl __divsi3
str r0, [r5]
_0807D85A:
adds r7, 0x1
ldr r3, _0807D9BC
add r3, sp
ldr r3, [r3]
cmp r7, r3
blt _0807D7D8
_0807D866:
movs r1, 0xD1
lsls r1, 1
ldr r4, _0807D9C4
add r4, sp
ldr r0, [r4]
bl sub_80421C0
movs r5, 0
mov r9, r5
ldr r0, _0807D9C8
ldr r0, [r0]
ldr r1, _0807D9CC
adds r0, r1
ldrb r0, [r0]
ldr r2, _0807D9D0
add r2, sp
str r0, [r2]
mov r10, r5
movs r6, 0
_0807D88C:
movs r7, 0
mov r3, r10
adds r3, 0x22
ldr r4, _0807D9D4
add r4, sp
str r3, [r4]
adds r5, r6, 0x1
ldr r0, _0807D9D8
add r0, sp
str r5, [r0]
ldr r1, _0807D9BC
add r1, sp
ldr r1, [r1]
cmp r7, r1
bge _0807D916
mov r2, r9
lsls r2, 24
mov r8, r2
_0807D8B0:
movs r0, 0x74
adds r5, r7, 0
muls r5, r0
mov r4, sp
adds r4, r5
adds r4, 0x4
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807D90A
movs r0, 0xC2
lsls r0, 4
add r0, sp
lsls r2, r7, 3
adds r0, r2
ldr r1, [r0]
ldr r0, _0807D9C0
add r0, sp
adds r0, r2
ldr r2, [r0]
adds r0, r4, 0
bl sub_804539C
mov r0, r10
bl sub_8009C7C
add r2, sp, 0x20
adds r2, r5
lsls r1, r0, 1
adds r1, r0
lsls r1, 2
str r1, [r2]
movs r0, 0
str r0, [sp]
adds r0, r4, 0
ldr r3, _0807D9D0
add r3, sp
ldr r1, [r3]
movs r2, 0
mov r4, r8
lsrs r3, r4, 24
bl sub_80462AC
_0807D90A:
adds r7, 0x1
ldr r5, _0807D9BC
add r5, sp
ldr r5, [r5]
cmp r7, r5
blt _0807D8B0
_0807D916:
movs r0, 0x13
bl sub_803E46C
ldr r0, _0807D9D4
add r0, sp
ldr r0, [r0]
mov r10, r0
movs r0, 0x3
ands r0, r6
cmp r0, 0
bne _0807D930
movs r1, 0x1
add r9, r1
_0807D930:
movs r0, 0x7
mov r2, r9
ands r2, r0
mov r9, r2
ldr r3, _0807D9D8
add r3, sp
ldr r6, [r3]
cmp r6, 0x3B
ble _0807D88C
movs r7, 0
ldr r4, _0807D9BC
add r4, sp
ldr r4, [r4]
cmp r7, r4
bge _0807D996
_0807D94E:
ldr r0, _0807D9B8
add r0, sp
lsls r1, r7, 2
adds r4, r0, r1
movs r5, 0
ldrsh r0, [r4, r5]
cmp r0, 0
blt _0807D98A
movs r0, 0x74
muls r0, r7
add r0, sp
adds r0, 0x4
bl sub_8045108
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0x1
bl sub_80460F8
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_80402AC
movs r3, 0x1
movs r4, 0xD1
lsls r4, 4
add r4, sp
str r3, [r4]
_0807D98A:
adds r7, 0x1
ldr r5, _0807D9BC
add r5, sp
ldr r5, [r5]
cmp r7, r5
blt _0807D94E
_0807D996:
movs r0, 0xD1
lsls r0, 4
add r0, sp
ldr r0, [r0]
cmp r0, 0
beq _0807D9E0
ldr r0, _0807D9DC
ldr r1, [r0]
ldr r2, _0807D9C4
add r2, sp
ldr r0, [r2]
bl sub_80522A8
b _0807D9EE
.align 2, 0
_0807D9B4: .4byte gUnknown_80F4468
_0807D9B8: .4byte 0x00000bbc
_0807D9BC: .4byte 0x00000d0c
_0807D9C0: .4byte 0x00000c24
_0807D9C4: .4byte 0x00000d08
_0807D9C8: .4byte gUnknown_203B418
_0807D9CC: .4byte 0x00018210
_0807D9D0: .4byte 0x00000d14
_0807D9D4: .4byte 0x00000d1c
_0807D9D8: .4byte 0x00000d24
_0807D9DC: .4byte gUnknown_80FE060
_0807D9E0:
ldr r0, _0807DA08
ldr r1, [r0]
ldr r3, _0807DA0C
add r3, sp
ldr r0, [r3]
bl sub_80522A8
_0807D9EE:
movs r0, 0x1
bl sub_807EC28
_0807D9F4:
ldr r3, _0807DA10
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807DA08: .4byte gUnknown_80FE034
_0807DA0C: .4byte 0x00000d08
_0807DA10: .4byte 0x00000d2c
thumb_func_end sub_807D510
thumb_func_start sub_807DA14
sub_807DA14:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r5, r0, 0
adds r6, r1, 0
lsls r2, 24
lsrs r4, r2, 24
ldr r0, [r6, 0x70]
mov r10, r0
adds r0, r6, 0
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807DA50
ldr r0, _0807DA48
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0807DA4C
b _0807DA5C
.align 2, 0
_0807DA48: .4byte gUnknown_202DF98
_0807DA4C: .4byte gUnknown_80FCB98
_0807DA50:
bl sub_80441E8
lsls r0, 24
cmp r0, 0
beq _0807DA6C
ldr r0, _0807DA68
_0807DA5C:
ldr r2, [r0]
adds r0, r5, 0
adds r1, r6, 0
bl sub_80522F4
b _0807DB5E
.align 2, 0
_0807DA68: .4byte gUnknown_80FC9C0
_0807DA6C:
cmp r4, 0x8
bne _0807DA76
mov r0, r10
adds r0, 0x46
ldrb r4, [r0]
_0807DA76:
adds r0, r6, 0
movs r1, 0x6
adds r2, r4, 0
bl sub_806CDD4
lsls r1, r4, 2
adds r2, r6, 0x4
mov r9, r2
ldr r0, _0807DAFC
adds r1, r0
mov r8, r1
_0807DA8C:
ldrh r0, [r6, 0x4]
mov r3, r8
ldrh r3, [r3]
adds r0, r3
lsls r0, 16
ldrh r1, [r6, 0x6]
mov r2, r8
ldrh r2, [r2, 0x2]
adds r1, r2
lsls r1, 16
lsrs r7, r0, 16
orrs r7, r1
lsls r0, r7, 16
asrs r5, r0, 16
cmp r5, 0
ble _0807DB00
asrs r4, r7, 16
cmp r4, 0
ble _0807DB00
cmp r5, 0x36
bgt _0807DB00
cmp r4, 0x1E
bgt _0807DB00
adds r0, r5, 0
adds r1, r4, 0
bl sub_804954C
adds r1, r0, 0
ldr r0, [r1, 0x10]
cmp r0, 0
bne _0807DB00
ldrh r1, [r1]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0807DB00
adds r0, r6, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0
bl sub_80694C0
adds r0, r6, 0
movs r1, 0
bl sub_804535C
adds r0, r6, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807DA8C
movs r0, 0x3A
bl sub_803E46C
b _0807DA8C
.align 2, 0
_0807DAFC: .4byte gUnknown_80F4448
_0807DB00:
adds r0, r6, 0
bl sub_806A5B8
mov r1, r9
adds r0, r6, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _0807DB20
adds r0, r6, 0
adds r1, r6, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_0807DB20:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807DB5E
adds r0, r6, 0
movs r1, 0x8
bl sub_806CE68
mov r3, r10
ldrb r0, [r3, 0x7]
cmp r0, 0
beq _0807DB48
mov r0, r9
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807DB48:
adds r0, r6, 0
bl sub_806A5B8
ldr r0, _0807DB6C
ldr r0, [r0]
ldr r1, _0807DB70
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8075900
_0807DB5E:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807DB6C: .4byte gUnknown_203B418
_0807DB70: .4byte 0x00003a08
thumb_func_end sub_807DA14
thumb_func_start sub_807DB74
sub_807DB74:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
movs r0, 0
mov r8, r0
bl sub_80441E8
lsls r0, 24
cmp r0, 0
beq _0807DB94
ldr r0, _0807DB90
b _0807DBA0
.align 2, 0
_0807DB90: .4byte gUnknown_80FD060
_0807DB94:
bl sub_804AF74
lsls r0, 24
cmp r0, 0
beq _0807DBB0
ldr r0, _0807DBAC
_0807DBA0:
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _0807DC54
.align 2, 0
_0807DBAC: .4byte gUnknown_80FD08C
_0807DBB0:
movs r5, 0
ldr r0, _0807DC24
adds r6, r0, 0
_0807DBB6:
movs r4, 0
_0807DBB8:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8049590
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
bne _0807DBE2
adds r0, r1, 0
ands r0, r6
movs r1, 0x1
orrs r0, r1
strh r0, [r2]
adds r0, r4, 0
adds r1, r5, 0
bl sub_80498A8
movs r1, 0x1
mov r8, r1
_0807DBE2:
adds r4, 0x1
cmp r4, 0x37
ble _0807DBB8
adds r5, 0x1
cmp r5, 0x1F
ble _0807DBB6
movs r5, 0
_0807DBF0:
movs r4, 0
adds r6, r5, 0x1
_0807DBF4:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8049BB0
adds r4, 0x1
cmp r4, 0x37
ble _0807DBF4
adds r5, r6, 0
cmp r5, 0x1F
ble _0807DBF0
mov r0, r8
cmp r0, 0
beq _0807DC30
ldr r1, _0807DC28
adds r0, r7, 0
bl sub_80421C0
ldr r0, _0807DC2C
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
b _0807DC3A
.align 2, 0
_0807DC24: .4byte 0x0000fffc
_0807DC28: .4byte 0x000001a1
_0807DC2C: .4byte gUnknown_80FD05C
_0807DC30:
ldr r0, _0807DC60
ldr r1, [r0]
adds r0, r7, 0
bl sub_80522A8
_0807DC3A:
ldr r0, _0807DC64
ldr r0, [r0]
movs r1, 0xCE
lsls r1, 3
adds r0, r1
movs r1, 0x1
strb r1, [r0]
bl sub_806CF60
bl sub_8040A84
bl sub_8049ED4
_0807DC54:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807DC60: .4byte gUnknown_80FD060
_0807DC64: .4byte gUnknown_203B418
thumb_func_end sub_807DB74
thumb_func_start sub_807DC68
sub_807DC68:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r9, r0
ldr r0, _0807DC88
ldr r1, [r0]
ldr r2, _0807DC8C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807DC94
ldr r0, _0807DC90
b _0807DCB8
.align 2, 0
_0807DC88: .4byte gUnknown_203B418
_0807DC8C: .4byte 0x00003a08
_0807DC90: .4byte gUnknown_80FD3C8
_0807DC94:
ldr r3, _0807DCA4
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
beq _0807DCAC
ldr r0, _0807DCA8
b _0807DCB8
.align 2, 0
_0807DCA4: .4byte 0x00003a0b
_0807DCA8: .4byte gUnknown_80FD3CC
_0807DCAC:
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _0807DCC8
ldr r0, _0807DCC4
_0807DCB8:
ldr r1, [r0]
mov r0, r9
bl sub_80522A8
b _0807DF0E
.align 2, 0
_0807DCC4: .4byte gUnknown_80FD3D0
_0807DCC8:
movs r0, 0
mov r8, r0
movs r5, 0x1
movs r1, 0
mov r10, r1
ldr r2, _0807DD68
adds r7, r2, 0
_0807DCD6:
movs r4, 0x1
_0807DCD8:
movs r6, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_8049590
adds r2, r0, 0
ldrh r1, [r2]
ldr r3, _0807DD6C
adds r0, r3, 0
adds r3, r1, 0
ands r3, r0
strh r3, [r2]
mov r0, r10
strb r0, [r2, 0x9]
movs r0, 0x10
ands r0, r3
cmp r0, 0
bne _0807DD94
movs r0, 0x80
lsls r0, 1
adds r1, r0, 0
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0807DD94
ldrh r0, [r2, 0x4]
movs r1, 0x3
orrs r0, r1
strh r0, [r2, 0x4]
ldr r1, _0807DD70
adds r0, r1, 0
adds r1, r3, 0
ands r1, r0
strh r1, [r2]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0807DD28
movs r3, 0x1
mov r8, r3
_0807DD28:
movs r0, 0x3
ands r0, r1
cmp r0, 0x2
beq _0807DD94
cmp r0, 0x3
beq _0807DD94
cmp r5, 0x1
beq _0807DD44
cmp r4, 0x1
beq _0807DD44
cmp r5, 0x36
beq _0807DD44
cmp r4, 0x1E
bne _0807DD5C
_0807DD44:
ldr r0, [r2, 0x14]
cmp r0, 0
bne _0807DD5C
ldr r0, _0807DD74
ldr r0, [r0]
movs r1, 0xCE
lsls r1, 3
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807DD5C
movs r6, 0x1
_0807DD5C:
cmp r6, 0
beq _0807DD78
ldrh r0, [r2]
ands r0, r7
movs r1, 0x2
b _0807DD90
.align 2, 0
_0807DD68: .4byte 0x0000fffc
_0807DD6C: .4byte 0x0000fbff
_0807DD70: .4byte 0x0000fff7
_0807DD74: .4byte gUnknown_203B418
_0807DD78:
ldrh r1, [r2]
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
beq _0807DD94
adds r0, r1, 0
ands r0, r7
movs r1, 0x1
orrs r0, r1
movs r3, 0x80
lsls r3, 3
adds r1, r3, 0
_0807DD90:
orrs r0, r1
strh r0, [r2]
_0807DD94:
adds r4, 0x1
cmp r4, 0x1E
ble _0807DCD8
adds r5, 0x1
cmp r5, 0x36
ble _0807DCD6
ldr r0, _0807DF1C
ldr r1, [r0]
ldr r2, _0807DF20
adds r0, r1, r2
movs r3, 0
ldrsh r0, [r0, r3]
adds r2, 0x2
adds r1, r2
movs r3, 0
ldrsh r1, [r1, r3]
movs r2, 0x1
bl sub_8050C30
lsls r0, 24
cmp r0, 0
beq _0807DE02
movs r5, 0
movs r6, 0x84
lsls r6, 8
movs r7, 0
_0807DDC8:
movs r4, 0
_0807DDCA:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8049590
adds r2, r0, 0
ldrh r1, [r2]
movs r3, 0x80
lsls r3, 1
adds r0, r3, 0
ands r0, r1
cmp r0, 0
bne _0807DDF6
adds r0, r6, 0
ands r0, r1
cmp r0, r6
bne _0807DDF6
ldr r3, _0807DF24
adds r0, r3, 0
ands r0, r1
movs r1, 0x2
orrs r0, r1
strh r0, [r2]
_0807DDF6:
adds r4, 0x1
cmp r4, 0x1F
ble _0807DDCA
adds r5, 0x1
cmp r5, 0x37
ble _0807DDC8
_0807DE02:
mov r0, r8
cmp r0, 0
beq _0807DE14
ldr r0, _0807DF1C
ldr r0, [r0]
ldr r1, _0807DF28
adds r0, r1
movs r1, 0
strb r1, [r0]
_0807DE14:
movs r5, 0
_0807DE16:
movs r4, 0
adds r6, r5, 0x1
_0807DE1A:
mov r2, r8
cmp r2, 0
beq _0807DE30
adds r0, r5, 0
adds r1, r4, 0
bl sub_8049590
ldrh r2, [r0]
movs r1, 0x40
orrs r1, r2
strh r1, [r0]
_0807DE30:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8049BB0
adds r4, 0x1
cmp r4, 0x1F
ble _0807DE1A
adds r5, r6, 0
cmp r5, 0x37
ble _0807DE16
movs r5, 0
_0807DE46:
ldr r0, _0807DF1C
ldr r0, [r0]
lsls r1, r5, 2
ldr r3, _0807DF2C
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807DE74
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_804954C
ldrb r1, [r0, 0x9]
adds r0, r4, 0
adds r0, 0x25
strb r1, [r0]
_0807DE74:
adds r5, 0x1
cmp r5, 0x13
ble _0807DE46
bl sub_804EB30
bl sub_804AAD4
bl sub_8049884
bl sub_806CF60
bl sub_8040A84
bl sub_8049ED4
ldr r0, _0807DF30
ldr r1, [r0]
mov r0, r9
bl sub_80522A8
movs r0, 0x28
movs r1, 0x2B
bl sub_803E708
mov r0, r9
movs r1, 0x1
bl sub_8075900
movs r5, 0
_0807DEAE:
ldr r0, _0807DF1C
ldr r0, [r0]
lsls r1, r5, 2
ldr r3, _0807DF2C
adds r0, r3
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807DEF4
adds r0, r4, 0
bl sub_806A5B8
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807DEF4
adds r1, r4, 0x4
adds r0, r4, 0
bl sub_80706A4
lsls r0, 24
cmp r0, 0
beq _0807DEF4
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_807D148
_0807DEF4:
adds r5, 0x1
cmp r5, 0x13
ble _0807DEAE
ldr r0, _0807DF1C
ldr r0, [r0]
ldr r1, _0807DF34
adds r0, r1
movs r1, 0x1
strb r1, [r0]
movs r0, 0x14
movs r1, 0x2B
bl sub_803E708
_0807DF0E:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807DF1C: .4byte gUnknown_203B418
_0807DF20: .4byte 0x0000e21c
_0807DF24: .4byte 0x0000fffc
_0807DF28: .4byte 0x00003a0c
_0807DF2C: .4byte 0x000135cc
_0807DF30: .4byte gUnknown_80FD3A0
_0807DF34: .4byte 0x00003a08
thumb_func_end sub_807DC68
thumb_func_start sub_807DF38
sub_807DF38:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
str r0, [sp, 0x8]
mov r10, r1
str r2, [sp, 0xC]
adds r6, r3, 0
ldr r0, [sp, 0x40]
ldr r1, [sp, 0x44]
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x10]
lsls r1, 16
asrs r1, 16
str r1, [sp, 0x14]
movs r5, 0
b _0807DF62
_0807DF60:
adds r5, 0x1
_0807DF62:
cmp r5, 0x13
bgt _0807DF8E
ldr r0, _0807DFA8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807DFAC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807DF60
adds r0, r4, 0
movs r1, 0x15
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807DF60
_0807DF8E:
cmp r5, 0x14
beq _0807DFB4
ldr r0, [sp, 0x8]
mov r1, r10
bl sub_804218C
ldr r0, _0807DFB0
mov r1, r10
movs r2, 0
bl sub_8045B94
b _0807DFC2
.align 2, 0
_0807DFA8: .4byte gUnknown_203B418
_0807DFAC: .4byte 0x000135cc
_0807DFB0: .4byte gUnknown_202DF98
_0807DFB4:
mov r0, r10
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r0, 0x4
bne _0807DFD4
_0807DFC2:
ldr r0, _0807DFD0
ldr r2, [r0]
ldr r0, [sp, 0x8]
mov r1, r10
bl sub_80522F4
b _0807E174
.align 2, 0
_0807DFD0: .4byte gUnknown_80F96EC
_0807DFD4:
ldr r0, [sp, 0x8]
mov r1, r10
adds r2, r6, 0
bl sub_804216C
ldr r0, _0807E184
mov r1, r10
movs r2, 0
bl sub_8045B94
ldr r0, _0807E188
ldr r2, [r0]
ldr r0, [sp, 0x8]
mov r1, r10
bl sub_80522F4
movs r5, 0
ldr r0, _0807E18C
lsls r1, r6, 2
adds r0, r1, r0
ldr r0, [r0]
mov r9, r0
ldrh r4, [r0]
movs r3, 0
ldrsh r0, [r0, r3]
str r1, [sp, 0x1C]
cmp r0, 0x63
bne _0807E00E
b _0807E124
_0807E00E:
mov r0, sp
adds r0, 0x4
str r0, [sp, 0x18]
_0807E014:
ldr r1, [sp, 0xC]
ldrh r0, [r1]
adds r0, r4, r0
lsls r0, 16
lsrs r0, 16
ldr r2, _0807E190
ldr r1, [sp, 0x4]
ands r1, r2
orrs r1, r0
str r1, [sp, 0x4]
ldr r2, [sp, 0xC]
ldrh r0, [r2, 0x2]
mov r3, r9
ldrh r3, [r3, 0x2]
adds r0, r3
lsls r0, 16
ldr r2, _0807E194
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
ldr r1, [sp, 0x18]
movs r3, 0
ldrsh r0, [r1, r3]
cmp r0, 0
blt _0807E112
asrs r1, r2, 16
cmp r1, 0
blt _0807E112
cmp r0, 0x37
bgt _0807E112
cmp r1, 0x1F
bgt _0807E112
bl sub_8049590
mov r8, r0
ldr r0, [sp, 0x18]
movs r2, 0
ldrsh r1, [r0, r2]
cmp r1, 0
ble _0807E0BE
ldr r0, [sp, 0x4]
asrs r0, 16
cmp r0, 0
ble _0807E0BE
cmp r1, 0x36
bgt _0807E0BE
cmp r0, 0x1E
bgt _0807E0BE
mov r3, r8
ldrh r1, [r3]
movs r0, 0x3
ands r0, r1
cmp r0, 0
bne _0807E0BE
movs r0, 0x10
ands r0, r1
cmp r0, 0
bne _0807E0BE
ldr r2, _0807E198
adds r0, r2, 0
ands r0, r1
movs r1, 0x1
orrs r0, r1
strh r0, [r3]
movs r5, 0x1
negs r5, r5
add r7, sp, 0x4
_0807E09A:
movs r4, 0x1
negs r4, r4
adds r6, r5, 0x1
_0807E0A0:
movs r3, 0
ldrsh r0, [r7, r3]
adds r0, r4
ldr r1, [sp, 0x4]
asrs r1, 16
adds r1, r5
bl sub_80498A8
adds r4, 0x1
cmp r4, 0x1
ble _0807E0A0
adds r5, r6, 0
cmp r5, 0x1
ble _0807E09A
movs r5, 0x1
_0807E0BE:
mov r0, r8
ldr r4, [r0, 0x14]
cmp r4, 0
beq _0807E0DC
cmp r4, r10
beq _0807E0DC
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x3
bne _0807E0DC
add r0, sp, 0x4
movs r1, 0
bl sub_80461C8
_0807E0DC:
mov r1, r8
ldr r4, [r1, 0x10]
cmp r4, 0
beq _0807E112
cmp r4, r10
beq _0807E112
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807E112
ldr r0, _0807E19C
ldr r2, [sp, 0x1C]
adds r0, r2, r0
ldr r0, [r0]
str r0, [sp]
ldr r0, [sp, 0x8]
adds r1, r4, 0
ldr r2, [sp, 0x10]
ldr r3, [sp, 0x14]
bl sub_807E1A0
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807E124
_0807E112:
movs r3, 0x4
add r9, r3
mov r0, r9
ldrh r4, [r0]
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0x63
beq _0807E124
b _0807E014
_0807E124:
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807E174
mov r0, r10
bl sub_80450F8
cmp r0, 0x1
bne _0807E14E
ldr r0, _0807E19C
ldr r2, [sp, 0x1C]
adds r0, r2, r0
ldr r0, [r0]
str r0, [sp]
ldr r0, [sp, 0x8]
mov r1, r10
ldr r2, [sp, 0x10]
ldr r3, [sp, 0x14]
bl sub_807E1A0
_0807E14E:
cmp r5, 0
beq _0807E174
movs r5, 0
_0807E154:
movs r4, 0
adds r6, r5, 0x1
_0807E158:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8049BB0
adds r4, 0x1
cmp r4, 0x37
ble _0807E158
adds r5, r6, 0
cmp r5, 0x1F
ble _0807E154
bl sub_8040A84
bl sub_8049ED4
_0807E174:
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807E184: .4byte gUnknown_202DF98
_0807E188: .4byte gUnknown_80F96BC
_0807E18C: .4byte gUnknown_8107178
_0807E190: .4byte 0xffff0000
_0807E194: .4byte 0x0000ffff
_0807E198: .4byte 0x0000fffc
_0807E19C: .4byte gUnknown_203B444
thumb_func_end sub_807DF38
thumb_func_start sub_807E1A0
sub_807E1A0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x24
mov r9, r0
adds r6, r1, 0
lsls r2, 24
lsrs r2, 24
mov r8, r2
lsls r3, 16
asrs r7, r3, 16
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807E244
ldr r5, [r6, 0x70]
add r4, sp, 0x1C
ldr r1, _0807E20C
adds r0, r4, 0
bl sub_8092A88
adds r0, r6, 0
adds r1, r4, 0
bl sub_80571F0
lsls r0, 24
cmp r0, 0
bne _0807E244
ldrb r0, [r5, 0x6]
cmp r0, 0
bne _0807E210
movs r0, 0xE
ldrsh r4, [r5, r0]
lsrs r0, r4, 31
adds r5, r4, r0
asrs r4, r5, 1
adds r0, r6, 0
movs r1, 0x2
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0807E202
lsrs r0, r5, 31
adds r0, r4, r0
asrs r4, r0, 1
_0807E202:
cmp r4, 0
bgt _0807E226
movs r4, 0x1
b _0807E226
.align 2, 0
_0807E20C: .4byte 0x00000163
_0807E210:
ldr r4, [sp, 0x40]
adds r0, r6, 0
movs r1, 0x2
bl sub_8071858
lsls r0, 24
cmp r0, 0
beq _0807E226
lsrs r0, r4, 31
adds r0, r4, r0
asrs r4, r0, 1
_0807E226:
add r0, sp, 0x18
str r0, [sp]
mov r0, r8
str r0, [sp, 0x4]
str r7, [sp, 0x8]
movs r0, 0
str r0, [sp, 0xC]
str r0, [sp, 0x10]
str r0, [sp, 0x14]
mov r0, r9
adds r1, r6, 0
adds r2, r4, 0
movs r3, 0
bl sub_806F370
_0807E244:
add sp, 0x24
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807E1A0
thumb_func_start sub_807E254
sub_807E254:
push {r4-r7,lr}
sub sp, 0x8
adds r6, r0, 0
adds r7, r1, 0
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807E274
ldr r0, _0807E270
adds r1, r6, 0
b _0807E286
.align 2, 0
_0807E270: .4byte gUnknown_202DF98
_0807E274:
adds r0, r7, 0
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807E2A4
ldr r0, _0807E29C
adds r1, r7, 0
_0807E286:
movs r2, 0
bl sub_8045B94
ldr r0, _0807E2A0
ldr r2, [r0]
adds r0, r6, 0
adds r1, r7, 0
bl sub_80522F4
b _0807E366
.align 2, 0
_0807E29C: .4byte gUnknown_202DF98
_0807E2A0: .4byte gUnknown_80FCAC0
_0807E2A4:
ldrh r1, [r6, 0x6]
lsls r1, 16
ldrh r0, [r6, 0x4]
orrs r0, r1
str r0, [sp]
ldrh r1, [r7, 0x6]
lsls r1, 16
ldrh r0, [r7, 0x4]
orrs r0, r1
str r0, [sp, 0x4]
mov r5, sp
mov r0, sp
bl nullsub_93
add r4, sp, 0x4
adds r0, r4, 0
bl nullsub_93
movs r0, 0
ldrsh r1, [r4, r0]
movs r0, 0x2
ldrsh r2, [r4, r0]
adds r0, r6, 0
movs r3, 0x1
bl sub_80694C0
mov r0, sp
movs r2, 0
ldrsh r1, [r0, r2]
movs r0, 0x2
ldrsh r2, [r5, r0]
adds r0, r7, 0
movs r3, 0x1
bl sub_80694C0
adds r0, r6, 0
movs r1, 0
bl sub_804535C
adds r0, r7, 0
movs r1, 0
bl sub_804535C
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807E330
ldr r0, [r6, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0807E31A
adds r0, r6, 0x4
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807E31A:
adds r0, r6, 0
bl sub_806A5B8
ldr r0, _0807E370
ldr r0, [r0]
ldr r1, _0807E374
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8075900
_0807E330:
adds r0, r7, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807E366
ldr r0, [r7, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0807E350
adds r0, r7, 0x4
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807E350:
adds r0, r7, 0
bl sub_806A5B8
ldr r0, _0807E370
ldr r0, [r0]
ldr r2, _0807E374
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_8075900
_0807E366:
add sp, 0x8
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807E370: .4byte gUnknown_203B418
_0807E374: .4byte 0x00003a08
thumb_func_end sub_807E254
thumb_func_start sub_807E378
sub_807E378:
push {r4-r7,lr}
bl sub_8083600
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807E38C
b _0807E564
_0807E38C:
ldr r0, _0807E41C
ldr r1, [r0]
ldr r3, _0807E420
adds r2, r1, r3
ldrh r3, [r2]
movs r5, 0
ldrsh r1, [r2, r5]
adds r6, r0, 0
cmp r1, 0
ble _0807E3AA
subs r0, r3, 0x1
strh r0, [r2]
lsls r0, 16
cmp r0, 0
bgt _0807E3B4
_0807E3AA:
ldr r0, [r6]
ldr r1, _0807E424
adds r0, r1
movs r1, 0x3
strb r1, [r0]
_0807E3B4:
adds r5, r6, 0
ldr r1, [r5]
ldr r7, _0807E424
adds r0, r1, r7
ldrb r0, [r0]
cmp r0, 0
bne _0807E434
ldr r2, _0807E420
adds r0, r1, r2
movs r3, 0
ldrsh r0, [r0, r3]
cmp r0, 0xF9
ble _0807E3D0
b _0807E564
_0807E3D0:
bl sub_805E804
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
adds r0, r4, 0
bl sub_807520C
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807E3EE
b _0807E564
_0807E3EE:
ldr r0, _0807E428
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r1, _0807E42C
ldr r0, [r5]
ldr r2, _0807E430
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
movs r1, 0
bl sub_80426C8
ldr r0, [r5]
adds r0, r7
movs r1, 0x1
strb r1, [r0]
b _0807E564
.align 2, 0
_0807E41C: .4byte gUnknown_203B418
_0807E420: .4byte 0x00000666
_0807E424: .4byte 0x0000067a
_0807E428: .4byte gUnknown_80F9C4C
_0807E42C: .4byte gUnknown_80F5FAC
_0807E430: .4byte 0x00003a0e
_0807E434:
cmp r0, 0x1
bne _0807E4A0
ldr r2, _0807E490
adds r0, r1, r2
movs r3, 0
ldrsh r0, [r0, r3]
cmp r0, 0x95
ble _0807E446
b _0807E564
_0807E446:
bl sub_805E804
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
adds r0, r4, 0
bl sub_807520C
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807E464
b _0807E564
_0807E464:
ldr r0, _0807E494
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r1, _0807E498
ldr r0, [r5]
ldr r2, _0807E49C
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
movs r1, 0x1
bl sub_80426C8
ldr r0, [r5]
adds r0, r7
movs r1, 0x2
strb r1, [r0]
b _0807E564
.align 2, 0
_0807E490: .4byte 0x00000666
_0807E494: .4byte gUnknown_80F9C70
_0807E498: .4byte gUnknown_80F5FAC
_0807E49C: .4byte 0x00003a0e
_0807E4A0:
cmp r0, 0x2
bne _0807E508
ldr r2, _0807E4F8
adds r0, r1, r2
movs r3, 0
ldrsh r0, [r0, r3]
cmp r0, 0x31
bgt _0807E564
bl sub_805E804
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
adds r0, r4, 0
bl sub_807520C
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807E564
ldr r0, _0807E4FC
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r1, _0807E500
ldr r0, [r5]
ldr r2, _0807E504
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
movs r1, 0x2
bl sub_80426C8
ldr r0, [r5]
adds r0, r7
movs r1, 0x3
strb r1, [r0]
b _0807E564
.align 2, 0
_0807E4F8: .4byte 0x00000666
_0807E4FC: .4byte gUnknown_80F9C8C
_0807E500: .4byte gUnknown_80F5FAC
_0807E504: .4byte 0x00003a0e
_0807E508:
ldr r5, _0807E56C
adds r0, r1, r5
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bgt _0807E564
bl sub_805E804
adds r0, r4, 0
movs r1, 0x1
bl sub_806A2BC
adds r0, r4, 0
bl sub_807520C
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _0807E564
ldr r0, _0807E570
ldr r1, [r0]
adds r0, r4, 0
bl sub_80522A8
ldr r1, _0807E574
ldr r0, [r6]
ldr r2, _0807E578
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
movs r1, 0x3
bl sub_80426C8
ldr r0, [r6]
adds r0, r7
movs r1, 0x4
strb r1, [r0]
ldr r1, _0807E57C
adds r0, r4, 0
adds r2, r4, 0
bl sub_8068FE0
_0807E564:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807E56C: .4byte 0x00000666
_0807E570: .4byte gUnknown_80F9CBC
_0807E574: .4byte gUnknown_80F5FAC
_0807E578: .4byte 0x00003a0e
_0807E57C: .4byte 0x0000021e
thumb_func_end sub_807E378
thumb_func_start sub_807E580
sub_807E580:
push {lr}
cmp r0, 0
beq _0807E596
movs r1, 0x2D
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0807E596
movs r0, 0
b _0807E5A0
_0807E596:
ldr r0, _0807E5A4
ldr r0, [r0]
ldr r1, _0807E5A8
adds r0, r1
ldrb r0, [r0]
_0807E5A0:
pop {r1}
bx r1
.align 2, 0
_0807E5A4: .4byte gUnknown_203B418
_0807E5A8: .4byte 0x0000e264
thumb_func_end sub_807E580
thumb_func_start sub_807E5AC
sub_807E5AC:
push {lr}
ldr r0, _0807E5DC
ldr r0, [r0]
ldr r1, _0807E5E0
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x8
bne _0807E5C6
movs r0, 0x8
bl sub_8084100
lsls r0, 24
lsrs r0, 24
_0807E5C6:
bl sub_807E5E4
bl sub_8069E8C
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
pop {r0}
bx r0
.align 2, 0
_0807E5DC: .4byte gUnknown_203B418
_0807E5E0: .4byte 0x0001c578
thumb_func_end sub_807E5AC
thumb_func_start sub_807E5E4
sub_807E5E4:
push {r4-r6,lr}
ldr r3, _0807E674
ldr r1, [r3]
ldr r2, _0807E678
adds r1, r2
movs r4, 0
strb r0, [r1]
ldr r0, [r3]
adds r2, r0, r2
ldrb r1, [r2]
ldr r2, _0807E67C
adds r0, r2
strb r1, [r0]
ldr r0, [r3]
ldr r1, _0807E680
adds r0, r1
strb r4, [r0]
movs r2, 0
adds r4, r3, 0
ldr r6, _0807E684
movs r1, 0
ldr r5, _0807E688
_0807E610:
ldr r0, [r4]
adds r0, r6
adds r0, r2
strb r1, [r0]
ldr r0, [r4]
adds r0, r5
adds r0, r2
strb r1, [r0]
adds r2, 0x1
cmp r2, 0x7
ble _0807E610
ldr r0, [r3]
ldr r2, _0807E68C
adds r0, r2
movs r2, 0
movs r1, 0x9
strb r1, [r0]
ldr r0, [r3]
ldr r1, _0807E690
adds r0, r1
strb r2, [r0]
ldr r0, [r3]
adds r1, 0x1
adds r0, r1
strb r2, [r0]
movs r6, 0xBE
lsls r6, 1
ldr r5, _0807E694
movs r4, 0xBF
lsls r4, 1
_0807E64C:
ldr r0, [r3]
lsls r1, r2, 2
adds r0, r1
adds r0, r6
strb r2, [r0]
ldr r0, [r3]
adds r0, r1
adds r0, r5
strb r2, [r0]
ldr r0, [r3]
adds r0, r1
adds r0, r4
strb r2, [r0]
adds r2, 0x1
cmp r2, 0xFF
ble _0807E64C
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807E674: .4byte gUnknown_203B418
_0807E678: .4byte 0x0000e265
_0807E67C: .4byte 0x0000e264
_0807E680: .4byte 0x0000e279
_0807E684: .4byte 0x0000e267
_0807E688: .4byte 0x0000e26f
_0807E68C: .4byte 0x0000e266
_0807E690: .4byte 0x0000e277
_0807E694: .4byte 0x0000017d
thumb_func_end sub_807E5E4
thumb_func_start sub_807E698
sub_807E698:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
lsls r0, 24
lsrs r0, 24
str r0, [sp]
movs r0, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 16
str r0, [sp, 0x4]
ldr r0, _0807E724
ldr r0, [r0]
ldr r0, [r0, 0x4]
mov r10, r0
movs r0, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
ldr r1, [sp]
bl sub_8042818
movs r0, 0x25
bl sub_803E46C
movs r0, 0x1
bl sub_804178C
ldr r1, _0807E728
ldrb r0, [r1]
str r0, [sp, 0x8]
movs r0, 0x1
strb r0, [r1]
movs r1, 0
mov r9, r1
ldr r2, _0807E72C
mov r8, r2
_0807E6EC:
movs r7, 0
movs r0, 0x25
bl sub_803E46C
movs r6, 0
ldr r1, [sp, 0x4]
lsls r0, r1, 2
mov r2, r10
adds r5, r0, r2
movs r0, 0xFF
mov r12, r0
_0807E702:
mov r1, r8
ldr r0, [r1]
adds r0, r6
movs r2, 0xBE
lsls r2, 1
adds r4, r0, r2
ldrb r0, [r4]
ldrb r3, [r5]
subs r1, r0, r3
cmp r1, 0
bge _0807E71A
negs r1, r1
_0807E71A:
cmp r1, 0x9
bgt _0807E730
strb r3, [r4]
b _0807E746
.align 2, 0
_0807E724: .4byte gUnknown_202ECA0
_0807E728: .4byte gUnknown_203B40D
_0807E72C: .4byte gUnknown_203B418
_0807E730:
movs r7, 0x1
adds r2, r0, 0
adds r1, r3, 0
cmp r2, r1
bcs _0807E73E
adds r0, 0xA
b _0807E744
_0807E73E:
cmp r2, r1
bls _0807E746
subs r0, 0xA
_0807E744:
strb r0, [r4]
_0807E746:
mov r1, r8
ldr r0, [r1]
adds r0, r6
ldr r2, _0807E764
adds r4, r0, r2
ldrb r0, [r4]
ldrb r3, [r5, 0x1]
subs r1, r0, r3
cmp r1, 0
bge _0807E75C
negs r1, r1
_0807E75C:
cmp r1, 0x9
bgt _0807E768
strb r3, [r4]
b _0807E77E
.align 2, 0
_0807E764: .4byte 0x0000017d
_0807E768:
movs r7, 0x1
adds r2, r0, 0
adds r1, r3, 0
cmp r2, r1
bcs _0807E776
adds r0, 0xA
b _0807E77C
_0807E776:
cmp r2, r1
bls _0807E77E
subs r0, 0xA
_0807E77C:
strb r0, [r4]
_0807E77E:
mov r1, r8
ldr r0, [r1]
adds r0, r6
movs r2, 0xBF
lsls r2, 1
adds r4, r0, r2
ldrb r0, [r4]
ldrb r3, [r5, 0x2]
subs r1, r0, r3
cmp r1, 0
bge _0807E796
negs r1, r1
_0807E796:
cmp r1, 0x9
bgt _0807E79E
strb r3, [r4]
b _0807E7B4
_0807E79E:
movs r7, 0x1
adds r2, r0, 0
adds r1, r3, 0
cmp r2, r1
bcs _0807E7AC
adds r0, 0xA
b _0807E7B2
_0807E7AC:
cmp r2, r1
bls _0807E7B4
subs r0, 0xA
_0807E7B2:
strb r0, [r4]
_0807E7B4:
adds r6, 0x4
adds r5, 0x4
movs r0, 0x1
negs r0, r0
add r12, r0
mov r1, r12
cmp r1, 0
bge _0807E702
movs r0, 0
movs r1, 0
bl sub_803E874
cmp r7, 0
beq _0807E7DA
movs r2, 0x1
add r9, r2
mov r0, r9
cmp r0, 0x3F
ble _0807E6EC
_0807E7DA:
ldr r0, _0807E7F8
mov r1, sp
ldrb r1, [r1, 0x8]
strb r1, [r0]
ldr r0, [sp]
bl sub_807E7FC
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807E7F8: .4byte gUnknown_203B40D
thumb_func_end sub_807E698
thumb_func_start sub_807E7FC
sub_807E7FC:
push {r4-r6,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r6, _0807E874
ldr r0, [r6]
ldr r1, _0807E878
adds r0, r1
ldr r5, [r0]
cmp r5, 0
bne _0807E816
bl sub_8083600
adds r5, r0, 0
_0807E816:
cmp r4, 0
beq _0807E844
ldr r0, [r6]
ldr r2, _0807E87C
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
bne _0807E844
ldr r4, _0807E880
movs r0, 0
bl sub_807E580
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_807EA18
ldr r0, _0807E884
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
_0807E844:
movs r5, 0
_0807E846:
ldr r0, _0807E874
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807E888
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807E866
adds r0, r4, 0
bl sub_807E8F0
_0807E866:
adds r5, 0x1
cmp r5, 0x13
ble _0807E846
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0807E874: .4byte gUnknown_203B418
_0807E878: .4byte 0x000181f8
_0807E87C: .4byte 0x0001356c
_0807E880: .4byte gUnknown_202DF98
_0807E884: .4byte gUnknown_80FC5E0
_0807E888: .4byte 0x000135cc
thumb_func_end sub_807E7FC
thumb_func_start sub_807E88C
sub_807E88C:
push {r4-r7,lr}
movs r0, 0
bl sub_807E580
lsls r0, 24
ldr r1, _0807E8E4
ldr r1, [r1]
ldr r1, [r1, 0x4]
movs r4, 0
ldr r5, _0807E8E8
lsrs r0, 14
adds r3, r0, r1
movs r6, 0xBE
lsls r6, 1
_0807E8A8:
ldr r0, [r5]
lsls r2, r4, 2
adds r0, r2
ldrb r1, [r3]
adds r0, r6
strb r1, [r0]
ldr r0, [r5]
adds r0, r2
ldrb r1, [r3, 0x1]
ldr r7, _0807E8EC
adds r0, r7
strb r1, [r0]
ldr r0, [r5]
adds r0, r2
ldrb r1, [r3, 0x2]
movs r2, 0xBF
lsls r2, 1
adds r0, r2
strb r1, [r0]
adds r3, 0x4
adds r4, 0x1
cmp r4, 0xFF
ble _0807E8A8
movs r0, 0
movs r1, 0
bl sub_803E874
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807E8E4: .4byte gUnknown_202ECA0
_0807E8E8: .4byte gUnknown_203B418
_0807E8EC: .4byte 0x0000017d
thumb_func_end sub_807E88C
thumb_func_start sub_807E8F0
sub_807E8F0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r5, r0, 0
movs r0, 0
mov r8, r0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807E90E
b _0807EA0A
_0807E90E:
ldr r4, [r5, 0x70]
movs r0, 0x4
ldrsh r1, [r4, r0]
mov r9, r1
mov r1, sp
adds r6, r4, 0
adds r6, 0x5C
ldrb r0, [r6]
strb r0, [r1]
adds r7, r4, 0
adds r7, 0x5D
ldrb r0, [r7]
strb r0, [r1, 0x1]
adds r0, r5, 0
bl sub_8070774
adds r0, r5, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807E958
adds r0, r5, 0
bl sub_807E580
ldr r1, _0807E954
lsls r0, 24
lsrs r0, 22
adds r0, r1
ldrb r0, [r0]
strb r0, [r6]
mov r1, r8
strb r1, [r7]
b _0807E984
.align 2, 0
_0807E954: .4byte gUnknown_80F520C
_0807E958:
adds r0, r4, 0
adds r0, 0xC4
ldrb r0, [r0]
cmp r0, 0xC
beq _0807E984
adds r0, r4, 0
adds r0, 0xF6
ldrb r0, [r0]
cmp r0, 0
bne _0807E984
movs r1, 0x2
ldrsh r0, [r4, r1]
movs r1, 0
bl sub_808DC68
strb r0, [r6]
movs r1, 0x2
ldrsh r0, [r4, r1]
movs r1, 0x1
bl sub_808DC68
strb r0, [r7]
_0807E984:
mov r0, sp
adds r1, r4, 0
adds r1, 0x5C
ldrb r0, [r0]
ldrb r1, [r1]
cmp r0, r1
bne _0807E9A0
mov r0, sp
adds r1, r4, 0
adds r1, 0x5D
ldrb r0, [r0, 0x1]
ldrb r1, [r1]
cmp r0, r1
beq _0807E9A4
_0807E9A0:
movs r0, 0x1
mov r8, r0
_0807E9A4:
ldr r1, _0807E9D0
adds r0, r1, 0
ldrh r1, [r4, 0x2]
adds r0, r1
lsls r0, 16
lsrs r0, 16
cmp r0, 0x3
bhi _0807E9FE
adds r0, r5, 0
movs r1, 0x25
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807E9D4
movs r0, 0x2
ldrsh r1, [r4, r0]
adds r0, r5, 0
bl sub_8069F54
b _0807E9D8
.align 2, 0
_0807E9D0: .4byte 0xfffffe88
_0807E9D4:
movs r0, 0xBC
lsls r0, 1
_0807E9D8:
strh r0, [r4, 0x4]
movs r1, 0x4
ldrsh r0, [r4, r1]
cmp r0, r9
beq _0807E9FE
bl sub_80687D0
str r0, [r5, 0x64]
adds r0, r5, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_806CCB4
movs r0, 0x1
mov r8, r0
_0807E9FE:
mov r1, r8
cmp r1, 0
beq _0807EA0A
adds r0, r5, 0
bl sub_80429D8
_0807EA0A:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807E8F0
thumb_func_start sub_807EA18
sub_807EA18:
push {lr}
lsls r1, 24
ldr r2, _0807EA2C
lsrs r1, 22
adds r1, r2
ldr r1, [r1]
bl strcpy
pop {r0}
bx r0
.align 2, 0
_0807EA2C: .4byte gUnknown_80F9A54
thumb_func_end sub_807EA18
thumb_func_start sub_807EA30
sub_807EA30:
push {lr}
lsls r0, 24
cmp r0, 0
bne _0807EA6C
ldr r1, _0807EA5C
movs r0, 0
movs r2, 0
bl sub_808417C
ldr r1, _0807EA60
ldr r1, [r1]
ldr r2, _0807EA64
adds r1, r2
strb r0, [r1]
bl sub_8083600
ldr r1, _0807EA68
ldr r1, [r1]
bl sub_80522A8
b _0807EA8C
.align 2, 0
_0807EA5C: .4byte gUnknown_80F4EAC
_0807EA60: .4byte gUnknown_203B418
_0807EA64: .4byte 0x0000e277
_0807EA68: .4byte gUnknown_80FAD8C
_0807EA6C:
ldr r1, _0807EA90
movs r0, 0
movs r2, 0
bl sub_808417C
ldr r1, _0807EA94
ldr r1, [r1]
ldr r2, _0807EA98
adds r1, r2
strb r0, [r1]
bl sub_8083600
ldr r1, _0807EA9C
ldr r1, [r1]
bl sub_80522A8
_0807EA8C:
pop {r0}
bx r0
.align 2, 0
_0807EA90: .4byte gUnknown_80F4EAC
_0807EA94: .4byte gUnknown_203B418
_0807EA98: .4byte 0x0000e278
_0807EA9C: .4byte gUnknown_80FADB0
thumb_func_end sub_807EA30
thumb_func_start sub_807EAA0
sub_807EAA0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
lsls r0, 24
lsrs r0, 24
str r0, [sp]
lsls r1, 24
lsrs r1, 24
str r1, [sp, 0x4]
movs r0, 0
mov r8, r0
movs r1, 0x1
negs r1, r1
mov r9, r1
movs r2, 0
str r2, [sp, 0x8]
bl sub_807E580
lsls r0, 24
lsrs r0, 24
mov r10, r0
movs r5, 0
ldr r7, _0807EAF0
ldr r6, _0807EAF4
_0807EAD6:
ldr r3, [r7]
adds r0, r3, r6
adds r4, r0, r5
ldr r1, _0807EAF8
adds r0, r3, r1
adds r0, r5
ldrb r0, [r0]
ldrb r2, [r4]
adds r1, r0, 0
cmp r2, r1
bcs _0807EAFC
strb r0, [r4]
b _0807EB08
.align 2, 0
_0807EAF0: .4byte gUnknown_203B418
_0807EAF4: .4byte 0x0000e267
_0807EAF8: .4byte 0x0000e26f
_0807EAFC:
cmp r2, r1
bls _0807EB08
adds r0, r5, r6
adds r0, r3, r0
bl sub_80838EC
_0807EB08:
ldr r0, [r7]
ldr r2, _0807EB38
adds r0, r2
adds r0, r5
ldrb r1, [r0]
ldr r0, _0807EB3C
cmp r8, r1
bge _0807EB1C
mov r8, r1
mov r9, r5
_0807EB1C:
adds r5, 0x1
cmp r5, 0x7
ble _0807EAD6
mov r1, r9
cmp r1, 0
bge _0807EB44
ldr r0, [r0]
ldr r2, _0807EB40
adds r1, r0, r2
ldrb r1, [r1]
subs r2, 0x1
adds r0, r2
strb r1, [r0]
b _0807EB4E
.align 2, 0
_0807EB38: .4byte 0x0000e267
_0807EB3C: .4byte gUnknown_203B418
_0807EB40: .4byte 0x0000e265
_0807EB44:
ldr r0, [r0]
ldr r1, _0807EB94
adds r0, r1
mov r2, r9
strb r2, [r0]
_0807EB4E:
ldr r0, _0807EB98
ldr r1, [r0]
ldr r2, _0807EB9C
adds r0, r1, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807EB64
ldr r0, _0807EB94
adds r1, r0
movs r0, 0
strb r0, [r1]
_0807EB64:
movs r0, 0
bl sub_807E580
lsls r0, 24
lsrs r0, 24
cmp r10, r0
bne _0807EB78
ldr r1, [sp, 0x4]
cmp r1, 0
beq _0807EB82
_0807EB78:
movs r2, 0x1
str r2, [sp, 0x8]
ldr r0, [sp]
bl sub_807E698
_0807EB82:
ldr r0, _0807EB98
ldr r0, [r0]
ldr r2, _0807EBA0
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
beq _0807EBA4
subs r0, 0x1
b _0807EBA6
.align 2, 0
_0807EB94: .4byte 0x0000e264
_0807EB98: .4byte gUnknown_203B418
_0807EB9C: .4byte 0x0000e279
_0807EBA0: .4byte 0x0000e266
_0807EBA4:
movs r0, 0x9
_0807EBA6:
strb r0, [r1]
ldr r4, _0807EC14
ldr r0, [r4]
ldr r2, _0807EC18
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
beq _0807EBD4
adds r0, r1, 0
bl sub_80838EC
ldr r0, [r4]
ldr r1, _0807EC18
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807EBD4
bl sub_8083600
ldr r1, _0807EC1C
ldr r1, [r1]
bl sub_80522A8
_0807EBD4:
ldr r4, _0807EC14
ldr r0, [r4]
ldr r2, _0807EC20
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
beq _0807EC00
adds r0, r1, 0
bl sub_80838EC
ldr r0, [r4]
ldr r1, _0807EC20
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0807EC00
bl sub_8083600
ldr r1, _0807EC24
ldr r1, [r1]
bl sub_80522A8
_0807EC00:
ldr r0, [sp, 0x8]
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807EC14: .4byte gUnknown_203B418
_0807EC18: .4byte 0x0000e277
_0807EC1C: .4byte gUnknown_80FA778
_0807EC20: .4byte 0x0000e278
_0807EC24: .4byte gUnknown_80FA758
thumb_func_end sub_807EAA0
thumb_func_start sub_807EC28
sub_807EC28:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
lsls r0, 24
lsrs r0, 24
mov r8, r0
bl sub_8044B28
lsls r0, 24
cmp r0, 0
beq _0807EC46
b _0807EF32
_0807EC46:
bl sub_8083600
adds r7, r0, 0
ldr r0, [r7, 0x70]
mov r9, r0
ldr r4, _0807ECB4
ldr r0, [r4]
movs r5, 0xD3
lsls r5, 3
adds r0, r5
ldrb r0, [r0]
str r0, [sp, 0x8]
adds r0, r7, 0
bl sub_8045128
ldrh r0, [r0]
lsrs r0, 5
mov r10, r0
movs r0, 0x1
mov r1, r10
ands r1, r0
mov r10, r1
ldr r0, [r4]
adds r0, r5
strb r1, [r0]
ldr r0, [r4]
ldr r3, _0807ECB8
adds r0, r3
mov r2, r10
strb r2, [r0]
ldr r2, [r4]
ldr r6, _0807ECBC
adds r0, r2, r6
ldrb r1, [r0]
cmp r1, 0
beq _0807EC90
b _0807EF32
_0807EC90:
adds r6, 0x26
adds r0, r2, r6
ldr r0, [r0]
cmp r0, 0
bne _0807EC9C
b _0807EF32
_0807EC9C:
mov r0, r9
adds r0, 0xE4
ldrb r0, [r0]
cmp r0, 0x1
bne _0807ECC0
adds r0, r2, r5
strb r1, [r0]
ldr r0, [r4]
adds r0, r3
strb r1, [r0]
b _0807EF32
.align 2, 0
_0807ECB4: .4byte gUnknown_203B418
_0807ECB8: .4byte 0x00000699
_0807ECBC: .4byte 0x0000066e
_0807ECC0:
movs r0, 0
str r0, [sp, 0xC]
movs r6, 0
_0807ECC6:
ldr r0, _0807ED48
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0807ED4C
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807ED0E
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x8]
cmp r0, 0x1
bne _0807ED0E
adds r0, r5, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
beq _0807ED0E
adds r0, r7, 0
bl sub_80450FC
adds r4, r0, 0
adds r0, r5, 0
bl sub_80450FC
lsls r4, 24
lsls r0, 24
cmp r4, r0
bne _0807ED0E
movs r0, 0x1
str r0, [sp, 0xC]
_0807ED0E:
adds r6, 0x1
cmp r6, 0xF
ble _0807ECC6
ldr r1, _0807ED50
ldr r0, [sp]
ands r0, r1
movs r1, 0xBE
lsls r1, 1
orrs r0, r1
ldr r1, _0807ED54
ands r0, r1
str r0, [sp]
ldr r1, [sp, 0x8]
cmp r1, 0
bne _0807ED5C
mov r2, r10
cmp r2, 0x1
bne _0807ED64
ldr r6, [sp, 0xC]
cmp r6, 0
bne _0807ED3A
b _0807EF32
_0807ED3A:
ldr r0, _0807ED58
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
b _0807EF32
.align 2, 0
_0807ED48: .4byte gUnknown_203B418
_0807ED4C: .4byte 0x0001358c
_0807ED50: .4byte 0xffff0000
_0807ED54: .4byte 0xff00ffff
_0807ED58: .4byte gUnknown_80FE674
_0807ED5C:
mov r0, r10
cmp r0, 0x1
bne _0807ED64
b _0807EF32
_0807ED64:
ldr r1, [sp, 0x8]
cmp r1, 0x1
bne _0807ED70
mov r2, r10
cmp r2, 0
beq _0807ED78
_0807ED70:
mov r6, r8
cmp r6, 0
bne _0807ED78
b _0807EF32
_0807ED78:
movs r0, 0
str r0, [sp, 0x10]
movs r1, 0
str r1, [sp, 0x14]
bl sub_807EF48
lsls r0, 24
cmp r0, 0
bne _0807ED8C
b _0807EECC
_0807ED8C:
movs r2, 0x1
str r2, [sp, 0x14]
movs r6, 0
_0807ED92:
ldr r0, _0807EE90
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _0807EE94
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807EDAE
b _0807EEC4
_0807EDAE:
ldr r0, [r5, 0x70]
ldrb r0, [r0, 0x8]
cmp r0, 0x1
beq _0807EDB8
b _0807EEC4
_0807EDB8:
adds r0, r5, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
bne _0807EDC6
b _0807EEC4
_0807EDC6:
adds r0, r7, 0
bl sub_80450FC
adds r4, r0, 0
adds r0, r5, 0
bl sub_80450FC
lsls r4, 24
lsls r0, 24
cmp r4, r0
bne _0807EEC4
movs r6, 0x1
str r6, [sp, 0x10]
movs r0, 0x4
ldrsh r1, [r7, r0]
movs r2, 0x4
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0807EDF0
negs r1, r1
_0807EDF0:
cmp r1, 0x1
bgt _0807EE10
movs r6, 0x6
ldrsh r1, [r7, r6]
movs r2, 0x6
ldrsh r0, [r5, r2]
subs r1, r0
cmp r1, 0
bge _0807EE04
negs r1, r1
_0807EE04:
adds r6, r7, 0x4
mov r9, r6
adds r0, r5, 0x4
mov r8, r0
cmp r1, 0x1
ble _0807EE72
_0807EE10:
movs r3, 0x1
negs r3, r3
add r6, sp, 0x4
adds r1, r7, 0x4
mov r9, r1
adds r2, r5, 0x4
mov r8, r2
_0807EE1E:
movs r4, 0x1
negs r4, r4
_0807EE22:
ldrh r0, [r7, 0x4]
adds r0, r3
lsls r0, 16
lsrs r0, 16
ldr r1, _0807EE98
ldr r2, [sp, 0x4]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
ldrh r0, [r7, 0x6]
adds r0, r4
lsls r0, 16
ldr r1, _0807EE9C
ands r1, r2
orrs r1, r0
str r1, [sp, 0x4]
movs r2, 0
ldrsh r0, [r6, r2]
asrs r1, 16
str r3, [sp, 0x18]
bl sub_804954C
ldrb r0, [r0, 0x9]
ldr r3, [sp, 0x18]
cmp r0, 0xFF
beq _0807EE66
adds r0, r5, 0
adds r1, r6, 0
bl sub_80703A0
lsls r0, 24
ldr r3, [sp, 0x18]
cmp r0, 0
beq _0807EEA0
_0807EE66:
adds r4, 0x1
cmp r4, 0x1
ble _0807EE22
adds r3, 0x1
cmp r3, 0x1
ble _0807EE1E
_0807EE72:
adds r0, r7, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
beq _0807EEAE
mov r0, r9
mov r1, r8
bl sub_80983D8
adds r1, r0, 0
adds r0, r7, 0
bl sub_806CE34
b _0807EEB2
.align 2, 0
_0807EE90: .4byte gUnknown_203B418
_0807EE94: .4byte 0x0001358c
_0807EE98: .4byte 0xffff0000
_0807EE9C: .4byte 0x0000ffff
_0807EEA0:
adds r0, r7, 0
adds r1, r5, 0
movs r2, 0x3
adds r3, r6, 0
bl sub_807D148
b _0807EE72
_0807EEAE:
movs r6, 0
str r6, [sp, 0x10]
_0807EEB2:
mov r0, r8
mov r1, r9
bl sub_80983D8
adds r1, r0, 0
adds r0, r5, 0
bl sub_806CE68
b _0807EECC
_0807EEC4:
adds r6, 0x1
cmp r6, 0xF
bgt _0807EECC
b _0807ED92
_0807EECC:
ldr r0, [sp, 0x14]
cmp r0, 0
beq _0807EF04
ldr r1, [sp, 0x10]
cmp r1, 0
beq _0807EEDE
ldr r0, [sp, 0xC]
cmp r0, 0
bne _0807EF04
_0807EEDE:
ldr r0, _0807EEF8
ldr r0, [r0]
ldr r2, _0807EEFC
adds r1, r0, r2
ldr r6, _0807EF00
adds r0, r6
ldr r1, [r1]
ldr r0, [r0]
cmp r1, r0
ble _0807EF32
_0807EEF2:
bl sub_807F33C
b _0807EF32
.align 2, 0
_0807EEF8: .4byte gUnknown_203B418
_0807EEFC: .4byte 0x00000694
_0807EF00: .4byte 0x0000068c
_0807EF04:
ldr r0, [sp, 0x10]
bl sub_807EFFC
ldr r0, [sp, 0x10]
bl sub_807F19C
cmp r0, 0
bne _0807EEF2
ldr r0, [sp, 0x8]
cmp r0, 0x1
bne _0807EF32
mov r1, r10
cmp r1, 0
bne _0807EF32
ldr r2, [sp, 0xC]
cmp r2, 0
beq _0807EF32
ldr r0, _0807EF44
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
_0807EF32:
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807EF44: .4byte gUnknown_80FE65C
thumb_func_end sub_807EC28
thumb_func_start sub_807EF48
sub_807EF48:
push {lr}
ldr r0, _0807EF70
ldr r2, [r0]
ldr r1, _0807EF74
adds r0, r2, r1
ldr r3, _0807EF78
adds r1, r2, r3
ldr r0, [r0]
ldr r1, [r1]
subs r0, r1
cmp r0, 0
bgt _0807EF7C
movs r1, 0xD2
lsls r1, 3
adds r0, r2, r1
ldr r0, [r0]
cmp r0, 0
bne _0807EF7C
movs r0, 0
b _0807EF7E
.align 2, 0
_0807EF70: .4byte gUnknown_203B418
_0807EF74: .4byte 0x00000694
_0807EF78: .4byte 0x0000068c
_0807EF7C:
movs r0, 0x1
_0807EF7E:
pop {r1}
bx r1
thumb_func_end sub_807EF48
thumb_func_start sub_807EF84
sub_807EF84:
push {r4,lr}
sub sp, 0x4
ldr r1, _0807EFD0
ldr r0, [sp]
ands r0, r1
movs r1, 0xBE
lsls r1, 1
orrs r0, r1
ldr r1, _0807EFD4
ands r0, r1
str r0, [sp]
movs r0, 0x1
bl sub_807EFFC
movs r0, 0x1
bl sub_807F19C
adds r4, r0, 0
cmp r4, 0
beq _0807EFE2
bl sub_8083600
bl sub_8045128
ldrh r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _0807EFDC
cmp r4, 0x2
beq _0807EFEE
ldr r0, _0807EFD8
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
b _0807EFEE
.align 2, 0
_0807EFD0: .4byte 0xffff0000
_0807EFD4: .4byte 0xff00ffff
_0807EFD8: .4byte gUnknown_80FE63C
_0807EFDC:
bl sub_807F33C
b _0807EFEE
_0807EFE2:
ldr r0, _0807EFF8
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
_0807EFEE:
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0807EFF8: .4byte gUnknown_80FE5F0
thumb_func_end sub_807EF84
thumb_func_start sub_807EFFC
sub_807EFFC:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
lsls r0, 24
lsrs r3, r0, 24
ldr r4, _0807F168
ldr r0, [r4]
movs r5, 0xD2
lsls r5, 3
adds r2, r0, r5
ldr r0, [r2]
cmp r0, 0
bne _0807F01E
b _0807F158
_0807F01E:
ldr r1, _0807F16C
ldr r0, [sp]
ands r0, r1
movs r1, 0xBE
lsls r1, 1
orrs r0, r1
ldr r1, _0807F170
ands r0, r1
str r0, [sp]
cmp r3, 0
bne _0807F036
b _0807F158
_0807F036:
ldr r1, _0807F174
ldr r0, [r2]
str r0, [r1]
ldr r0, _0807F178
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
beq _0807F04E
b _0807F158
_0807F04E:
movs r0, 0xA6
lsls r0, 1
bl sub_8083E38
ldr r0, [r4]
adds r0, r5
ldr r0, [r0]
bl sub_80913A0
ldr r0, [r4]
ldr r2, _0807F17C
adds r1, r0, r2
ldr r1, [r1]
str r1, [sp, 0xC]
ldr r2, _0807F180
adds r1, r0, r2
ldr r6, [r1]
ldr r1, _0807F184
adds r0, r1
ldr r0, [r0]
cmp r6, r0
bgt _0807F134
mov r8, r4
_0807F07C:
mov r2, r8
ldr r0, [r2]
ldr r2, _0807F188
adds r1, r0, r2
ldr r5, [r1]
ldr r1, _0807F18C
adds r0, r1
ldr r0, [r0]
adds r2, r6, 0x1
mov r10, r2
cmp r5, r0
bgt _0807F124
lsls r0, r6, 16
lsrs r0, 16
mov r9, r0
_0807F09A:
lsls r0, r5, 16
mov r1, r9
orrs r0, r1
str r0, [sp, 0x4]
adds r0, r6, 0
adds r1, r5, 0
bl sub_804954C
adds r4, r0, 0
ldrh r1, [r4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _0807F114
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807F114
bl sub_80450F8
cmp r0, 0x3
bne _0807F114
ldr r0, [r4, 0x14]
bl sub_8045108
adds r2, r0, 0
ldrb r1, [r2]
movs r7, 0x2
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _0807F114
ldr r0, [r2]
str r0, [sp, 0x8]
add r4, sp, 0x4
adds r0, r4, 0
movs r1, 0x1
bl sub_80461C8
ldr r0, [sp, 0x8]
lsrs r0, 16
lsls r0, 24
lsrs r0, 24
bl sub_80914E4
lsls r0, 24
add r3, sp, 0x8
cmp r0, 0
beq _0807F10A
ldrb r0, [r3]
adds r2, r7, 0
orrs r2, r0
ldr r1, _0807F190
ldr r0, [sp, 0x8]
ands r0, r1
orrs r0, r2
str r0, [sp, 0x8]
_0807F10A:
adds r0, r4, 0
adds r1, r3, 0
movs r2, 0x1
bl sub_80460F8
_0807F114:
adds r5, 0x1
mov r2, r8
ldr r0, [r2]
ldr r1, _0807F18C
adds r0, r1
ldr r0, [r0]
cmp r5, r0
ble _0807F09A
_0807F124:
mov r6, r10
mov r2, r8
ldr r0, [r2]
ldr r1, _0807F184
adds r0, r1
ldr r0, [r0]
cmp r6, r0
ble _0807F07C
_0807F134:
ldr r0, _0807F168
ldr r0, [r0]
ldr r1, _0807F194
adds r2, r0, r1
subs r1, 0x8
adds r0, r1
ldr r1, [r0]
ldr r0, [sp, 0xC]
subs r1, r0
ldr r0, [r2]
adds r0, r1
str r0, [r2]
ldr r0, _0807F198
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
_0807F158:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807F168: .4byte gUnknown_203B418
_0807F16C: .4byte 0xffff0000
_0807F170: .4byte 0xff00ffff
_0807F174: .4byte gUnknown_202DE30
_0807F178: .4byte gUnknown_80FE5C0
_0807F17C: .4byte 0x0000068c
_0807F180: .4byte 0x0000e240
_0807F184: .4byte 0x0000e248
_0807F188: .4byte 0x0000e244
_0807F18C: .4byte 0x0000e24c
_0807F190: .4byte 0xffffff00
_0807F194: .4byte 0x00000694
_0807F198: .4byte gUnknown_80FE4F4
thumb_func_end sub_807EFFC
thumb_func_start sub_807F19C
sub_807F19C:
push {r4-r7,lr}
sub sp, 0x4
lsls r0, 24
lsrs r2, r0, 24
ldr r1, _0807F1EC
ldr r0, [sp]
ands r0, r1
movs r1, 0xBE
lsls r1, 1
orrs r0, r1
ldr r1, _0807F1F0
ands r0, r1
str r0, [sp]
ldr r0, _0807F1F4
ldr r0, [r0]
ldr r3, _0807F1F8
adds r1, r0, r3
subs r3, 0x8
adds r0, r3
ldr r1, [r1]
ldr r0, [r0]
subs r4, r1, r0
cmp r4, 0
bgt _0807F1CE
b _0807F31A
_0807F1CE:
cmp r2, 0
beq _0807F1E6
ldr r0, _0807F1FC
str r4, [r0]
ldr r0, _0807F200
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
beq _0807F204
_0807F1E6:
movs r0, 0x1
b _0807F31C
.align 2, 0
_0807F1EC: .4byte 0xffff0000
_0807F1F0: .4byte 0xff00ffff
_0807F1F4: .4byte gUnknown_203B418
_0807F1F8: .4byte 0x00000694
_0807F1FC: .4byte gUnknown_202DE30
_0807F200: .4byte gUnknown_80FE568
_0807F204:
ldr r0, _0807F224
ldr r0, [r0]
movs r1, 0x98
lsls r1, 2
adds r0, r1
ldr r0, [r0]
cmp r0, r4
bge _0807F22C
ldr r0, _0807F228
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
movs r0, 0x2
b _0807F31C
.align 2, 0
_0807F224: .4byte gUnknown_203B460
_0807F228: .4byte gUnknown_80FE520
_0807F22C:
movs r0, 0xA6
lsls r0, 1
bl sub_8083E38
negs r0, r4
bl sub_80913A0
movs r6, 0
_0807F23C:
movs r5, 0
adds r7, r6, 0x1
_0807F240:
adds r0, r6, 0
adds r1, r5, 0
bl sub_804954C
adds r4, r0, 0
ldrh r1, [r4]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0807F27E
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807F27E
bl sub_80450F8
cmp r0, 0x3
bne _0807F27E
ldr r0, [r4, 0x14]
bl sub_8045108
adds r4, r0, 0
ldrb r0, [r4, 0x2]
bl sub_80914E4
lsls r0, 24
cmp r0, 0
beq _0807F27E
ldrb r1, [r4]
movs r0, 0xFD
ands r0, r1
strb r0, [r4]
_0807F27E:
adds r5, 0x1
cmp r5, 0x1F
ble _0807F240
adds r6, r7, 0
cmp r6, 0x37
ble _0807F23C
movs r5, 0
_0807F28C:
ldr r0, _0807F324
lsls r1, r5, 2
ldr r0, [r0]
adds r4, r0, r1
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807F2B2
ldrb r0, [r4, 0x2]
bl sub_80914E4
lsls r0, 24
cmp r0, 0
beq _0807F2B2
ldrb r1, [r4]
movs r0, 0xFD
ands r0, r1
strb r0, [r4]
_0807F2B2:
adds r5, 0x1
cmp r5, 0x13
ble _0807F28C
movs r5, 0
_0807F2BA:
ldr r0, _0807F328
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0807F32C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807F2F8
ldr r0, [r4, 0x70]
adds r4, r0, 0
adds r4, 0x60
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807F2F8
ldrb r0, [r4, 0x2]
bl sub_80914E4
lsls r0, 24
cmp r0, 0
beq _0807F2F8
ldrb r1, [r4]
movs r0, 0xFD
ands r0, r1
strb r0, [r4]
_0807F2F8:
adds r5, 0x1
cmp r5, 0x13
ble _0807F2BA
ldr r0, _0807F328
ldr r0, [r0]
ldr r3, _0807F330
adds r1, r0, r3
ldr r2, _0807F334
adds r0, r2
ldr r0, [r0]
str r0, [r1]
ldr r0, _0807F338
ldr r1, [r0]
mov r0, sp
movs r2, 0x1
bl PrintFieldMessage
_0807F31A:
movs r0, 0
_0807F31C:
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_0807F324: .4byte gUnknown_203B460
_0807F328: .4byte gUnknown_203B418
_0807F32C: .4byte 0x000135cc
_0807F330: .4byte 0x00000694
_0807F334: .4byte 0x0000068c
_0807F338: .4byte gUnknown_80FE4D4
thumb_func_end sub_807F19C
thumb_func_start sub_807F33C
sub_807F33C:
push {r4-r7,lr}
ldr r2, _0807F41C
ldr r0, [r2]
ldr r1, _0807F420
adds r0, r1
movs r1, 0x1
strb r1, [r0]
ldr r0, [r2]
ldr r2, _0807F424
adds r0, r2
strb r1, [r0]
bl sub_8083600
ldr r1, _0807F428
ldr r1, [r1]
bl sub_80522A8
movs r6, 0
_0807F360:
movs r5, 0
adds r7, r6, 0x1
_0807F364:
adds r0, r6, 0
adds r1, r5, 0
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807F38A
bl sub_80450F8
cmp r0, 0x3
bne _0807F38A
ldr r0, [r4, 0x14]
bl sub_8045108
ldrb r2, [r0]
movs r1, 0xFD
ands r1, r2
strb r1, [r0]
_0807F38A:
adds r5, 0x1
cmp r5, 0x1F
ble _0807F364
adds r6, r7, 0
cmp r6, 0x37
ble _0807F360
movs r6, 0
ldr r4, _0807F42C
movs r5, 0x1
movs r3, 0xFD
_0807F39E:
lsls r1, r6, 2
ldr r0, [r4]
adds r2, r0, r1
ldrb r1, [r2]
adds r0, r5, 0
ands r0, r1
cmp r0, 0
beq _0807F3B4
adds r0, r3, 0
ands r0, r1
strb r0, [r2]
_0807F3B4:
adds r6, 0x1
cmp r6, 0x13
ble _0807F39E
movs r6, 0
_0807F3BC:
ldr r0, _0807F41C
ldr r0, [r0]
lsls r1, r6, 2
ldr r3, _0807F430
adds r0, r3
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807F3F4
ldr r4, [r5, 0x70]
movs r0, 0
strb r0, [r4, 0x8]
adds r0, r5, 0
bl sub_8070774
adds r4, 0x60
ldrb r1, [r4]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0807F3F4
movs r0, 0xFD
ands r0, r1
strb r0, [r4]
_0807F3F4:
adds r6, 0x1
cmp r6, 0x13
ble _0807F3BC
ldr r0, _0807F41C
ldr r1, [r0]
ldr r2, _0807F434
adds r0, r1, r2
movs r2, 0
str r2, [r0]
ldr r3, _0807F438
adds r0, r1, r3
str r2, [r0]
movs r0, 0xD2
lsls r0, 3
adds r1, r0
str r2, [r1]
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807F41C: .4byte gUnknown_203B418
_0807F420: .4byte 0x0000066e
_0807F424: .4byte 0x0000066f
_0807F428: .4byte gUnknown_80FE4B8
_0807F42C: .4byte gUnknown_203B460
_0807F430: .4byte 0x000135cc
_0807F434: .4byte 0x00000694
_0807F438: .4byte 0x0000068c
thumb_func_end sub_807F33C
thumb_func_start sub_807F43C
sub_807F43C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10C
str r0, [sp, 0xEC]
mov r8, r1
mov r0, r8
movs r1, 0xE
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _0807F470
ldr r0, _0807F468
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _0807F46C
b _0807F694
.align 2, 0
_0807F468: .4byte gUnknown_202DF98
_0807F46C: .4byte gUnknown_80FCB40
_0807F470:
ldr r0, [sp, 0xEC]
cmp r0, r8
bne _0807F490
ldr r0, _0807F488
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _0807F48C
ldr r2, [r0]
mov r0, r8
b _0807F698
.align 2, 0
_0807F488: .4byte gUnknown_202DF98
_0807F48C: .4byte gUnknown_80FCB70
_0807F490:
mov r1, r8
ldr r0, [r1, 0x4]
add r1, sp, 0xD4
str r0, [r1]
movs r2, 0
str r2, [sp, 0xF0]
_0807F49C:
movs r3, 0
mov r9, r3
movs r7, 0
mov r4, sp
adds r4, 0x18
str r4, [sp, 0x108]
_0807F4A8:
ldr r0, _0807F504
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _0807F508
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
adds r3, r7, 0x1
str r3, [sp, 0x104]
cmp r0, 0
bne _0807F4C8
b _0807F602
_0807F4C8:
ldr r0, [sp, 0xEC]
cmp r0, r4
bne _0807F4D0
b _0807F602
_0807F4D0:
cmp r8, r4
bne _0807F4D6
b _0807F602
_0807F4D6:
adds r1, r4, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
bne _0807F4E4
b _0807F602
_0807F4E4:
ldr r1, [sp, 0xF0]
cmp r1, 0
bne _0807F50C
ldr r0, [sp, 0xEC]
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0807F500
b _0807F602
_0807F500:
b _0807F51E
.align 2, 0
_0807F504: .4byte gUnknown_203B418
_0807F508: .4byte 0x000135cc
_0807F50C:
ldr r0, [sp, 0xEC]
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8071598
lsls r0, 24
cmp r0, 0
bne _0807F602
_0807F51E:
ldr r2, [sp, 0xF0]
cmp r2, 0
bne _0807F594
movs r5, 0
add r6, sp, 0xC8
adds r3, r7, 0x1
str r3, [sp, 0x104]
adds r7, r6, 0
ldr r0, _0807F588
mov r10, r0
_0807F532:
ldr r0, _0807F58C
lsls r3, r5, 2
adds r3, r0
ldrh r0, [r4, 0x4]
ldrh r1, [r3]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r1, [r6]
mov r2, r10
ands r1, r2
orrs r1, r0
str r1, [r7]
ldrh r2, [r4, 0x6]
ldrh r3, [r3, 0x2]
adds r2, r3
lsls r2, 16
ldr r0, _0807F590
ands r1, r0
orrs r1, r2
str r1, [r7]
mov r0, r8
add r1, sp, 0xC8
bl sub_80703A0
lsls r0, 24
cmp r0, 0
beq _0807F570
adds r5, 0x1
cmp r5, 0x7
ble _0807F532
_0807F570:
cmp r5, 0x8
beq _0807F602
mov r3, r9
cmp r3, 0x27
bgt _0807F602
ldr r0, [r4, 0x4]
ldr r4, [sp, 0x108]
stm r4!, {r0}
str r4, [sp, 0x108]
movs r0, 0x1
add r9, r0
b _0807F602
.align 2, 0
_0807F588: .4byte 0xffff0000
_0807F58C: .4byte gUnknown_80F4448
_0807F590: .4byte 0x0000ffff
_0807F594:
movs r5, 0
add r6, sp, 0xCC
adds r1, r7, 0x1
str r1, [sp, 0x104]
adds r7, r6, 0
mov r2, r9
lsls r0, r2, 2
add r0, sp
adds r0, 0x18
mov r10, r0
_0807F5A8:
ldr r0, _0807F630
lsls r3, r5, 2
adds r3, r0
ldrh r0, [r4, 0x4]
ldrh r1, [r3]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r2, _0807F634
ldr r1, [r6]
ands r1, r2
orrs r1, r0
str r1, [r7]
ldrh r2, [r4, 0x6]
ldrh r3, [r3, 0x2]
adds r2, r3
lsls r2, 16
ldr r0, _0807F638
ands r1, r0
orrs r1, r2
str r1, [r7]
mov r0, r8
add r1, sp, 0xCC
bl sub_80703A0
lsls r0, 24
cmp r0, 0
bne _0807F5FC
mov r2, r9
cmp r2, 0x27
bgt _0807F5FC
ldr r0, [r6]
mov r3, r10
adds r3, 0x4
mov r10, r3
subs r3, 0x4
stm r3!, {r0}
ldr r0, [sp, 0x108]
adds r0, 0x4
str r0, [sp, 0x108]
movs r1, 0x1
add r9, r1
_0807F5FC:
adds r5, 0x1
cmp r5, 0x7
ble _0807F5A8
_0807F602:
ldr r7, [sp, 0x104]
cmp r7, 0x13
bgt _0807F60A
b _0807F4A8
_0807F60A:
mov r2, r9
cmp r2, 0
bne _0807F63C
ldr r3, [sp, 0xF0]
adds r3, 0x1
str r3, [sp, 0xF0]
cmp r3, 0x1
bgt _0807F61C
b _0807F49C
_0807F61C:
ldr r0, [sp, 0xEC]
adds r0, 0x4
add r4, sp, 0xB8
adds r1, r4, 0
bl sub_80833E8
movs r7, 0
add r5, sp, 0xD0
adds r6, r5, 0
b _0807F654
.align 2, 0
_0807F630: .4byte gUnknown_80F4448
_0807F634: .4byte 0xffff0000
_0807F638: .4byte 0x0000ffff
_0807F63C:
mov r0, r9
bl sub_8084100
lsls r0, 2
add r0, sp
adds r0, 0x18
ldr r0, [r0]
str r0, [sp, 0xD4]
b _0807F6A8
_0807F64E:
ldr r0, [r5]
str r0, [sp, 0xD4]
b _0807F68E
_0807F654:
ldr r0, [r4]
ldr r1, [r4, 0x8]
bl sub_808411C
lsls r0, 16
lsrs r0, 16
ldr r2, _0807F6A0
ldr r1, [r5]
ands r1, r2
orrs r1, r0
str r1, [r6]
ldr r0, [r4, 0x4]
ldr r1, [r4, 0xC]
bl sub_808411C
lsls r0, 16
ldrh r1, [r6]
orrs r1, r0
str r1, [r6]
mov r0, r8
add r1, sp, 0xD0
bl sub_80703A0
lsls r0, 24
cmp r0, 0
beq _0807F64E
adds r7, 0x1
cmp r7, 0x63
ble _0807F654
_0807F68E:
cmp r7, 0x64
bne _0807F6A8
ldr r0, _0807F6A4
_0807F694:
ldr r2, [r0]
ldr r0, [sp, 0xEC]
_0807F698:
mov r1, r8
bl sub_80522F4
b _0807F99C
.align 2, 0
_0807F6A0: .4byte 0xffff0000
_0807F6A4: .4byte gUnknown_80FE6B4
_0807F6A8:
ldr r0, _0807F860
mov r1, r8
movs r2, 0
bl sub_8045B94
ldr r0, _0807F864
ldr r2, [r0]
ldr r0, [sp, 0xEC]
mov r1, r8
bl sub_80522F4
mov r0, r8
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807F6D0
ldr r0, _0807F868
bl sub_8083E38
_0807F6D0:
movs r4, 0
str r4, [sp, 0x100]
mov r1, r8
ldr r0, [r1, 0x70]
adds r0, 0x46
ldrb r0, [r0]
mov r9, r0
add r2, sp, 0xD4
movs r3, 0
ldrsh r1, [r2, r3]
mov r4, r8
movs r3, 0x4
ldrsh r0, [r4, r3]
subs r3, r1, r0
movs r4, 0x2
ldrsh r1, [r2, r4]
mov r2, r8
movs r4, 0x6
ldrsh r0, [r2, r4]
subs r1, r0
cmp r1, r3
bge _0807F6FE
adds r1, r3, 0
_0807F6FE:
lsls r6, r1, 4
cmp r6, 0x50
ble _0807F706
movs r6, 0x50
_0807F706:
cmp r6, 0x9
bgt _0807F70C
movs r6, 0xA
_0807F70C:
mov r1, r8
adds r1, 0x4
add r0, sp, 0xD4
bl sub_80983D8
adds r5, r0, 0
add r2, sp, 0xD4
movs r1, 0
ldrsh r0, [r2, r1]
lsls r4, r0, 1
adds r4, r0
lsls r4, 11
movs r3, 0xC0
lsls r3, 4
adds r4, r3
ldr r0, _0807F86C
lsls r5, 2
adds r5, r0
movs r1, 0
ldrsh r0, [r5, r1]
lsls r0, 8
movs r1, 0x3
bl __divsi3
adds r4, r0
str r4, [sp, 0xF4]
movs r3, 0xD6
add r3, sp
movs r2, 0
ldrsh r0, [r3, r2]
lsls r4, r0, 1
adds r4, r0
lsls r4, 11
movs r0, 0x80
lsls r0, 5
adds r4, r0
movs r1, 0x2
ldrsh r0, [r5, r1]
lsls r0, 8
movs r1, 0x3
bl __divsi3
adds r4, r0
str r4, [sp, 0xF8]
mov r2, r8
ldr r5, [r2, 0xC]
ldr r3, [sp, 0xF4]
subs r0, r3, r5
adds r1, r6, 0
bl __divsi3
str r0, [sp, 0xFC]
mov r0, r8
ldr r4, [r0, 0x10]
ldr r1, [sp, 0xF8]
subs r0, r1, r4
adds r1, r6, 0
bl __divsi3
mov r10, r0
add r0, sp, 0xD8
str r5, [r0]
str r4, [r0, 0x4]
movs r7, 0
adds r5, r0, 0
cmp r7, r6
bge _0807F7FC
adds r4, r5, 0
_0807F794:
ldr r0, [r5]
ldr r2, [sp, 0xFC]
adds r0, r2, r0
str r0, [r4]
ldr r0, [r4, 0x4]
add r0, r10
str r0, [r4, 0x4]
mov r0, r8
adds r1, r4, 0
bl sub_804535C
mov r0, r8
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0807F7E6
ldr r0, [sp, 0x100]
bl sub_8009C7C
lsls r0, 5
mov r3, r8
str r0, [r3, 0x1C]
movs r0, 0x3B
bl sub_803E46C
movs r0, 0x3
ands r0, r7
cmp r0, 0
bne _0807F7E6
movs r0, 0x7
mov r1, r9
ands r1, r0
mov r9, r1
mov r0, r8
movs r1, 0x6
mov r2, r9
bl sub_806CDD4
movs r2, 0x1
add r9, r2
_0807F7E6:
movs r0, 0x80
lsls r0, 4
adds r1, r6, 0
bl __divsi3
ldr r3, [sp, 0x100]
adds r3, r0
str r3, [sp, 0x100]
adds r7, 0x1
cmp r7, r6
blt _0807F794
_0807F7FC:
ldr r4, [sp, 0xF4]
str r4, [r5]
add r1, sp, 0xD8
ldr r0, [sp, 0xF8]
str r0, [r1, 0x4]
movs r0, 0
mov r2, r8
str r0, [r2, 0x1C]
mov r0, r8
bl sub_804535C
movs r0, 0x3B
bl sub_803E46C
mov r3, r8
ldr r0, [r3, 0x70]
movs r1, 0x7
mov r4, r9
ands r4, r1
adds r0, 0x46
strb r4, [r0]
add r2, sp, 0xD4
movs r1, 0
ldrsh r0, [r2, r1]
adds r4, r2, 0
movs r3, 0x2
ldrsh r1, [r4, r3]
bl sub_804954C
ldr r6, [r0, 0x10]
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
bne _0807F876
add r2, sp, 0xD4
movs r0, 0
ldrsh r1, [r2, r0]
movs r3, 0x2
ldrsh r2, [r4, r3]
mov r0, r8
movs r3, 0x1
bl sub_80694C0
mov r0, r8
bl sub_807F9BC
b _0807F99C
.align 2, 0
_0807F860: .4byte gUnknown_202DF98
_0807F864: .4byte gUnknown_80FE690
_0807F868: .4byte 0x000001a3
_0807F86C: .4byte gUnknown_80F4448
_0807F870:
ldr r0, [r7]
str r0, [sp, 0xD4]
b _0807F8BE
_0807F876:
movs r5, 0
add r4, sp, 0xE0
adds r7, r4, 0
_0807F87C:
ldr r0, _0807F8D0
lsls r3, r5, 2
adds r3, r0
add r1, sp, 0xD4
ldrh r0, [r1]
ldrh r2, [r3]
adds r0, r2
lsls r0, 16
lsrs r0, 16
ldr r2, _0807F8D4
ldr r1, [r7]
ands r1, r2
orrs r1, r0
str r1, [r4]
add r0, sp, 0xD4
ldrh r2, [r0, 0x2]
ldrh r3, [r3, 0x2]
adds r2, r3
lsls r2, 16
ldr r0, _0807F8D8
ands r1, r0
orrs r1, r2
str r1, [r4]
mov r0, r8
add r1, sp, 0xE0
bl sub_80703A0
lsls r0, 24
cmp r0, 0
beq _0807F870
adds r5, 0x1
cmp r5, 0x7
ble _0807F87C
_0807F8BE:
cmp r5, 0x8
bne _0807F8DC
ldr r0, [sp, 0xEC]
mov r1, r8
movs r2, 0
movs r3, 0
bl sub_807D148
b _0807F8FA
.align 2, 0
_0807F8D0: .4byte gUnknown_80F4448
_0807F8D4: .4byte 0xffff0000
_0807F8D8: .4byte 0x0000ffff
_0807F8DC:
mov r0, r8
add r1, sp, 0xD4
bl sub_807D068
add r0, sp, 0xD4
movs r3, 0
ldrsh r1, [r0, r3]
movs r0, 0xD6
add r0, sp
movs r4, 0
ldrsh r2, [r0, r4]
mov r0, r8
movs r3, 0x1
bl sub_80694C0
_0807F8FA:
adds r0, r6, 0
bl sub_80450F8
cmp r0, 0x1
bne _0807F954
add r4, sp, 0xE4
ldr r1, _0807F9AC
adds r0, r4, 0
bl sub_8092A88
adds r0, r6, 0
adds r1, r4, 0
bl sub_80571F0
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0807F93C
ldr r0, _0807F9B0
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
str r1, [sp, 0x4]
ldr r0, _0807F9B4
str r0, [sp, 0x8]
str r1, [sp, 0xC]
str r1, [sp, 0x10]
str r1, [sp, 0x14]
ldr r0, [sp, 0xEC]
adds r1, r6, 0
movs r3, 0
bl sub_806F370
_0807F93C:
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807F954
ldr r0, [r6, 0x70]
adds r0, 0x46
ldrb r1, [r0]
adds r0, r6, 0
bl sub_806CE68
_0807F954:
ldr r0, _0807F9B0
movs r4, 0
ldrsh r2, [r0, r4]
movs r1, 0
str r1, [sp]
str r1, [sp, 0x4]
ldr r0, _0807F9B8
str r0, [sp, 0x8]
str r1, [sp, 0xC]
str r1, [sp, 0x10]
str r1, [sp, 0x14]
ldr r0, [sp, 0xEC]
mov r1, r8
movs r3, 0
bl sub_806F370
mov r0, r8
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807F98E
mov r1, r8
ldr r0, [r1, 0x70]
adds r0, 0x46
ldrb r1, [r0]
mov r0, r8
bl sub_806CE68
_0807F98E:
movs r0, 0x1E
movs r1, 0x3B
bl sub_803E708
mov r0, r8
bl sub_807F9BC
_0807F99C:
add sp, 0x10C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807F9AC: .4byte 0x00000163
_0807F9B0: .4byte gUnknown_80F4F92
_0807F9B4: .4byte 0x0000021a
_0807F9B8: .4byte 0x00000219
thumb_func_end sub_807F43C
thumb_func_start sub_807F9BC
sub_807F9BC:
push {r4,lr}
adds r4, r0, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0807FA0A
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0807F9F4
ldr r2, _0807FA10
ldr r1, [r2]
movs r0, 0
strb r0, [r1, 0x1]
ldr r0, [r2]
movs r1, 0xB8
lsls r1, 3
adds r0, r1
movs r1, 0x1
negs r1, r1
str r1, [r0]
adds r0, r4, 0x4
bl sub_804AC20
movs r0, 0
bl sub_807EC28
_0807F9F4:
adds r0, r4, 0
bl sub_806A5B8
ldr r0, _0807FA10
ldr r0, [r0]
ldr r1, _0807FA14
adds r0, r1
ldrb r1, [r0]
adds r0, r4, 0
bl sub_8075900
_0807FA0A:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0807FA10: .4byte gUnknown_203B418
_0807FA14: .4byte 0x00003a08
thumb_func_end sub_807F9BC
thumb_func_start sub_807FA18
sub_807FA18:
push {r4-r7,lr}
sub sp, 0x4
movs r6, 0
_0807FA1E:
movs r5, 0
adds r7, r6, 0x1
_0807FA22:
adds r0, r5, 0
adds r1, r6, 0
bl sub_8049590
adds r4, r0, 0
ldrh r1, [r4, 0x4]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0807FA88
lsls r0, r5, 16
lsls r1, r6, 16
lsrs r0, 16
orrs r0, r1
str r0, [sp]
ldrh r1, [r4, 0x4]
movs r0, 0x40
ands r0, r1
cmp r0, 0
beq _0807FA4E
movs r0, 0x6
b _0807FA56
_0807FA4E:
bl sub_803D6FC
lsls r0, 24
lsrs r0, 24
_0807FA56:
cmp r0, 0x11
bne _0807FA72
movs r0, 0x11
mov r1, sp
movs r2, 0x2
bl sub_8045684
cmp r0, 0
beq _0807FA88
str r0, [r4, 0x14]
adds r1, r0, 0
adds r1, 0x20
movs r0, 0x1
b _0807FA86
_0807FA72:
mov r1, sp
movs r2, 0
bl sub_8045684
cmp r0, 0
beq _0807FA88
str r0, [r4, 0x14]
adds r1, r0, 0
adds r1, 0x20
movs r0, 0
_0807FA86:
strb r0, [r1]
_0807FA88:
adds r5, 0x1
cmp r5, 0x37
ble _0807FA22
adds r6, r7, 0
cmp r6, 0x1F
ble _0807FA1E
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_807FA18
thumb_func_start sub_807FA9C
sub_807FA9C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
ldr r2, _0807FAC4
ldr r0, [r2]
ldr r3, _0807FAC8
adds r1, r0, r3
ldrb r1, [r1]
str r1, [sp]
ldr r1, _0807FACC
adds r0, r1
movs r3, 0
ldrsh r0, [r0, r3]
subs r1, r0, 0x5
mov r8, r1
b _0807FBFE
.align 2, 0
_0807FAC4: .4byte gUnknown_203B418
_0807FAC8: .4byte 0x0001820f
_0807FACC: .4byte 0x000181ea
_0807FAD0:
ldr r0, [r2]
ldr r2, _0807FC18
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
subs r5, r0, 0x6
adds r0, 0x6
mov r1, r8
adds r1, 0x1
str r1, [sp, 0x4]
cmp r5, r0
blt _0807FAEA
b _0807FBEE
_0807FAEA:
ldr r7, _0807FC1C
ldr r2, _0807FC20
mov r10, r2
lsls r0, r5, 1
adds r0, r5
lsls r0, 3
mov r9, r0
_0807FAF8:
movs r6, 0
adds r0, r5, 0
mov r1, r8
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807FB24
bl sub_80450F8
cmp r0, 0x2
bne _0807FB24
ldr r0, [r4, 0x14]
adds r0, 0x20
ldrb r0, [r0]
cmp r0, 0
bne _0807FB22
ldr r3, [sp]
cmp r3, 0
beq _0807FB24
_0807FB22:
movs r6, 0x1
_0807FB24:
ldrh r0, [r4]
movs r2, 0x80
lsls r2, 2
adds r1, r2, 0
ands r0, r1
cmp r0, 0
beq _0807FB34
movs r6, 0x1
_0807FB34:
cmp r6, 0
beq _0807FBD6
ldr r0, _0807FC24
ldr r1, [r0]
ldr r3, _0807FC28
adds r0, r1, r3
movs r2, 0
ldrsh r0, [r0, r2]
mov r2, r9
subs r3, r2, r0
mov r2, r8
lsls r0, r2, 1
add r0, r8
lsls r0, 3
ldr r2, _0807FC2C
adds r1, r2
movs r2, 0
ldrsh r1, [r1, r2]
subs r2, r0, r1
movs r0, 0x20
negs r0, r0
cmp r3, r0
blt _0807FBD6
cmp r2, r0
blt _0807FBD6
movs r0, 0x88
lsls r0, 1
cmp r3, r0
bgt _0807FBD6
cmp r2, 0xC0
bgt _0807FBD6
ldrh r1, [r7]
mov r0, r10
ands r0, r1
strh r0, [r7]
ldr r1, _0807FC30
ands r1, r2
lsls r1, 4
ldrh r2, [r7, 0x6]
movs r0, 0xF
ands r0, r2
orrs r0, r1
strh r0, [r7, 0x6]
ldr r0, _0807FC34
ands r3, r0
ldrh r0, [r7, 0x2]
movs r2, 0xFE
lsls r2, 8
adds r1, r2, 0
ands r0, r1
orrs r0, r3
strh r0, [r7, 0x2]
ldrh r1, [r7, 0x4]
mov r0, r10
ands r0, r1
movs r3, 0xC0
lsls r3, 4
orrs r0, r3
movs r1, 0
orrs r0, r1
movs r1, 0xA0
lsls r1, 8
ldr r2, _0807FC30
ands r0, r2
orrs r0, r1
movs r3, 0
orrs r0, r3
movs r2, 0xFE
lsls r2, 1
movs r3, 0xFC
lsls r3, 8
adds r1, r3, 0
ands r0, r1
orrs r0, r2
strh r0, [r7, 0x4]
adds r0, r7, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl AddSprite
_0807FBD6:
movs r0, 0x18
add r9, r0
adds r5, 0x1
ldr r0, _0807FC24
ldr r0, [r0]
ldr r1, _0807FC18
adds r0, r1
movs r2, 0
ldrsh r0, [r0, r2]
adds r0, 0x6
cmp r5, r0
blt _0807FAF8
_0807FBEE:
ldr r3, [sp, 0x4]
mov r8, r3
ldr r2, _0807FC24
ldr r0, [r2]
ldr r1, _0807FC38
adds r0, r1
movs r3, 0
ldrsh r0, [r0, r3]
_0807FBFE:
adds r0, 0x5
cmp r8, r0
bge _0807FC06
b _0807FAD0
_0807FC06:
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807FC18: .4byte 0x000181e8
_0807FC1C: .4byte gUnknown_202EDC0
_0807FC20: .4byte 0x0000f3ff
_0807FC24: .4byte gUnknown_203B418
_0807FC28: .4byte 0x000181f0
_0807FC2C: .4byte 0x000181f2
_0807FC30: .4byte 0x00000fff
_0807FC34: .4byte 0x000001ff
_0807FC38: .4byte 0x000181ea
thumb_func_end sub_807FA9C
thumb_func_start sub_807FC3C
sub_807FC3C:
push {r4-r7,lr}
ldr r6, _0807FC70
ldr r4, [r6]
ldrh r5, [r0]
ldr r7, _0807FC74
adds r3, r4, r7
strh r5, [r3]
ldrh r3, [r0, 0x2]
ldr r5, _0807FC78
adds r0, r4, r5
strh r3, [r0]
adds r7, 0x4
adds r4, r7
strb r1, [r4]
ldr r0, [r6]
ldr r1, _0807FC7C
adds r0, r1
strb r2, [r0]
ldr r0, [r6]
subs r5, 0x6
adds r0, r5
movs r1, 0x1
strb r1, [r0]
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0807FC70: .4byte gUnknown_203B418
_0807FC74: .4byte 0x00013574
_0807FC78: .4byte 0x00013576
_0807FC7C: .4byte 0x00013579
thumb_func_end sub_807FC3C
thumb_func_start sub_807FC80
sub_807FC80:
push {lr}
movs r1, 0
ldrsh r2, [r0, r1]
movs r3, 0x2
ldrsh r1, [r0, r3]
adds r0, r2, 0
bl sub_8049590
adds r2, r0, 0
ldrh r1, [r2]
movs r0, 0x80
lsls r0, 2
ands r0, r1
cmp r0, 0
bne _0807FCCA
ldrb r0, [r2, 0x9]
cmp r0, 0xFF
beq _0807FCCA
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0807FCCA
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0807FCCA
movs r0, 0x3
ands r0, r1
cmp r0, 0x1
bne _0807FCCA
ldr r0, [r2, 0x14]
cmp r0, 0
beq _0807FCCE
bl sub_80450F8
cmp r0, 0x2
beq _0807FCCE
_0807FCCA:
movs r0, 0
b _0807FCD0
_0807FCCE:
movs r0, 0x1
_0807FCD0:
pop {r1}
bx r1
thumb_func_end sub_807FC80
thumb_func_start sub_807FCD4
sub_807FCD4:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
lsls r1, 24
lsrs r5, r1, 24
lsls r2, 24
lsrs r2, 24
mov r8, r2
movs r1, 0
ldrsh r0, [r7, r1]
movs r2, 0x2
ldrsh r1, [r7, r2]
bl sub_8049590
adds r6, r0, 0
cmp r5, 0x13
bls _0807FD12
movs r4, 0
b _0807FCFE
_0807FCFC:
adds r4, 0x1
_0807FCFE:
cmp r4, 0x1D
bgt _0807FD0C
bl sub_803D6FC
adds r5, r0, 0
cmp r5, 0x11
beq _0807FCFC
_0807FD0C:
cmp r4, 0x1E
bne _0807FD12
movs r5, 0x10
_0807FD12:
ldrh r1, [r6]
movs r0, 0x80
lsls r0, 2
ands r0, r1
cmp r0, 0
bne _0807FD6E
ldrb r0, [r6, 0x9]
cmp r0, 0xFF
beq _0807FD6E
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _0807FD6E
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _0807FD6E
movs r4, 0x3
ands r4, r1
cmp r4, 0x1
bne _0807FD6E
ldr r0, [r6, 0x14]
cmp r0, 0
beq _0807FD60
bl sub_80450F8
cmp r0, 0x2
bne _0807FD6E
ldr r0, [r6, 0x14]
bl sub_8045104
strb r5, [r0]
ldr r0, [r6, 0x14]
bl sub_8045104
mov r1, r8
strb r1, [r0, 0x1]
ldr r0, [r6, 0x14]
b _0807FD74
_0807FD60:
adds r0, r5, 0
adds r1, r7, 0
mov r2, r8
bl sub_8045684
cmp r0, 0
bne _0807FD72
_0807FD6E:
movs r0, 0
b _0807FD7A
_0807FD72:
str r0, [r6, 0x14]
_0807FD74:
adds r0, 0x20
strb r4, [r0]
movs r0, 0x1
_0807FD7A:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_807FCD4
thumb_func_start sub_807FD84
sub_807FD84:
push {r4-r6,lr}
adds r6, r0, 0
movs r5, 0
ldr r4, _0807FD9C
ldr r0, [r4]
ldr r2, _0807FDA0
adds r1, r0, r2
ldrb r0, [r1]
cmp r0, 0
bne _0807FDA4
movs r0, 0
b _0807FDF6
.align 2, 0
_0807FD9C: .4byte gUnknown_203B418
_0807FDA0: .4byte 0x00013570
_0807FDA4:
strb r5, [r1]
ldr r2, [r4]
ldr r3, _0807FDD8
adds r0, r2, r3
adds r3, 0x4
adds r1, r2, r3
ldrb r1, [r1]
adds r3, 0x1
adds r2, r3
ldrb r2, [r2]
bl sub_807FCD4
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
beq _0807FDE0
ldr r1, [r4]
ldr r0, _0807FDD8
adds r1, r0
ldr r0, _0807FDDC
ldr r2, [r0]
adds r0, r6, 0
bl sub_8052364
b _0807FDF0
.align 2, 0
_0807FDD8: .4byte 0x00013574
_0807FDDC: .4byte gUnknown_80FC5F8
_0807FDE0:
ldr r1, [r4]
ldr r2, _0807FDFC
adds r1, r2
ldr r0, _0807FE00
ldr r2, [r0]
adds r0, r6, 0
bl sub_8052364
_0807FDF0:
bl sub_8049ED4
adds r0, r5, 0
_0807FDF6:
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_0807FDFC: .4byte 0x00013574
_0807FE00: .4byte gUnknown_80FC5FC
thumb_func_end sub_807FD84
thumb_func_start sub_807FE04
sub_807FE04:
push {r4,r5,lr}
adds r2, r0, 0
lsls r1, 24
lsrs r5, r1, 24
movs r1, 0
ldrsh r0, [r2, r1]
movs r3, 0x2
ldrsh r1, [r2, r3]
bl sub_8049590
adds r4, r0, 0
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807FE3C
bl sub_80450F8
cmp r0, 0x2
bne _0807FE3C
ldr r1, [r4, 0x14]
movs r0, 0
str r0, [r1]
str r0, [r4, 0x14]
cmp r5, 0
beq _0807FE38
bl sub_8049ED4
_0807FE38:
movs r0, 0x1
b _0807FE3E
_0807FE3C:
movs r0, 0
_0807FE3E:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_807FE04
thumb_func_start sub_807FE44
sub_807FE44:
push {r4,r5,lr}
adds r2, r0, 0
lsls r1, 24
lsrs r5, r1, 24
movs r1, 0
ldrsh r0, [r2, r1]
movs r3, 0x2
ldrsh r1, [r2, r3]
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x14]
cmp r0, 0
beq _0807FE7C
bl sub_80450F8
cmp r0, 0x2
bne _0807FE7C
ldr r0, [r4, 0x14]
adds r0, 0x20
movs r1, 0x1
strb r1, [r0]
cmp r5, 0
beq _0807FE78
bl sub_8049ED4
_0807FE78:
movs r0, 0x1
b _0807FE7E
_0807FE7C:
movs r0, 0
_0807FE7E:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_807FE44
thumb_func_start sub_807FE84
sub_807FE84:
push {lr}
lsls r1, 24
ldr r2, _0807FE98
lsrs r1, 22
adds r1, r2
ldr r1, [r1]
bl strcpy
pop {r0}
bx r0
.align 2, 0
_0807FE98: .4byte gUnknown_80F91F0
thumb_func_end sub_807FE84
thumb_func_start sub_807FE9C
sub_807FE9C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
adds r5, r0, 0
mov r9, r1
str r2, [sp]
lsls r3, 24
lsrs r6, r3, 24
movs r2, 0
ldrsh r0, [r1, r2]
movs r3, 0x2
ldrsh r1, [r1, r3]
bl sub_8049590
str r0, [sp, 0x4]
ldr r0, [r0, 0x14]
mov r10, r0
movs r1, 0
str r1, [sp, 0x8]
cmp r0, 0
bne _0807FECE
b _080801B4
_0807FECE:
bl sub_80450F8
cmp r0, 0x2
beq _0807FED8
b _080801B4
_0807FED8:
mov r0, r10
bl sub_8045104
mov r8, r0
ldr r0, _0807FF58
mov r2, r8
ldrb r1, [r2]
bl sub_807FE84
ldr r3, [sp, 0x4]
ldr r4, [r3, 0x10]
cmp r4, 0
beq _0807FEFE
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x1
beq _0807FEFE
movs r4, 0
_0807FEFE:
mov r1, r10
adds r1, 0x20
ldrb r0, [r1]
str r0, [sp, 0xC]
movs r0, 0x1
strb r0, [r1]
cmp r4, 0
beq _0807FF96
adds r0, r4, 0
bl sub_806A1E8
cmp r6, 0
beq _0807FF96
mov r1, r8
ldrb r0, [r1]
cmp r0, 0x11
beq _0807FF96
movs r0, 0x64
bl sub_8084100
adds r7, r0, 0
movs r6, 0
adds r0, r4, 0
movs r1, 0x1C
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _0807FF3C
ldr r0, _0807FF5C
ldr r6, [r0]
_0807FF3C:
ldr r2, [sp, 0xC]
cmp r2, 0x1
beq _0807FF50
ldr r0, _0807FF60
ldr r0, [r0]
ldr r3, _0807FF64
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _0807FF68
_0807FF50:
cmp r7, 0
bge _0807FF70
b _0807FF6C
.align 2, 0
_0807FF58: .4byte gUnknown_202DF98
_0807FF5C: .4byte gUnknown_80FDB5C
_0807FF60: .4byte gUnknown_203B418
_0807FF64: .4byte 0x0001820f
_0807FF68:
cmp r7, 0xE
bgt _0807FF70
_0807FF6C:
ldr r0, _0807FFD8
ldr r6, [r0]
_0807FF70:
cmp r6, 0
beq _0807FF96
mov r0, r9
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _0807FF84
bl sub_8049ED4
_0807FF84:
adds r0, r5, 0
adds r1, r4, 0
adds r2, r6, 0
bl sub_80522F4
ldr r0, [sp]
cmp r0, 0
bne _0807FF96
b _080801B4
_0807FF96:
mov r0, r9
bl sub_803F428
lsls r0, 24
cmp r0, 0
beq _0807FFFA
movs r1, 0xAE
lsls r1, 1
movs r0, 0
bl sub_80421C0
bl sub_8049ED4
mov r1, r8
ldrb r2, [r1]
adds r0, r5, 0
mov r1, r9
bl sub_804225C
ldr r0, _0807FFDC
ldr r0, [r0]
ldr r2, _0807FFE0
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _0807FFE8
ldr r0, _0807FFE4
ldr r1, [r0]
adds r0, r5, 0
bl sub_80522A8
b _0807FFFA
.align 2, 0
_0807FFD8: .4byte gUnknown_80FDB7C
_0807FFDC: .4byte gUnknown_203B418
_0807FFE0: .4byte 0x0001820a
_0807FFE4: .4byte gUnknown_80FD7F4
_0807FFE8:
ldr r0, _08080010
mov r3, r8
ldrb r1, [r3]
lsls r1, 2
adds r1, r0
ldr r1, [r1]
adds r0, r5, 0
bl sub_80522A8
_0807FFFA:
cmp r4, 0
beq _08080020
mov r1, r8
ldrb r0, [r1, 0x1]
cmp r0, 0x2
bne _08080014
adds r0, r4, 0
movs r1, 0x1
bl sub_806F480
b _08080020
.align 2, 0
_08080010: .4byte gUnknown_80FD7F8
_08080014:
cmp r0, 0x1
bne _08080020
adds r0, r4, 0
movs r1, 0
bl sub_806F480
_08080020:
mov r2, r8
ldrb r0, [r2]
cmp r0, 0x1B
bls _0808002A
b _08080194
_0808002A:
lsls r0, 2
ldr r1, _08080034
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08080034: .4byte _08080038
.align 2, 0
_08080038:
.4byte _080800A8
.4byte _080800B2
.4byte _080800BC
.4byte _080800C6
.4byte _080800D0
.4byte _080800DA
.4byte _080800E6
.4byte _080800F0
.4byte _080800FA
.4byte _08080104
.4byte _0808010E
.4byte _08080118
.4byte _08080122
.4byte _0808012C
.4byte _08080136
.4byte _08080140
.4byte _0808014A
.4byte _08080168
.4byte _08080172
.4byte _08080180
.4byte _08080194
.4byte _08080194
.4byte _08080194
.4byte _08080194
.4byte _08080194
.4byte _08080194
.4byte _08080194
.4byte _080800DA
_080800A8:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080A5C
b _08080194
_080800B2:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80801CC
b _08080194
_080800BC:
adds r0, r5, 0
adds r1, r4, 0
bl sub_808024C
b _08080194
_080800C6:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080418
b _08080194
_080800D0:
adds r0, r5, 0
mov r1, r9
bl sub_8080620
b _0808017A
_080800DA:
adds r0, r5, 0
adds r1, r4, 0
ldr r2, [sp, 0x4]
bl sub_8080504
b _08080194
_080800E6:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080374
b _08080194
_080800F0:
mov r0, r10
adds r1, r4, 0
bl sub_8080884
b _08080194
_080800FA:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080364
b _08080194
_08080104:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080388
b _08080194
_0808010E:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80803B4
b _08080194
_08080118:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80807C0
b _08080194
_08080122:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80803C8
b _08080194
_0808012C:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80803D8
b _08080194
_08080136:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80803F8
b _08080194
_08080140:
adds r0, r5, 0
adds r1, r4, 0
bl sub_8080700
b _08080194
_0808014A:
cmp r4, 0
beq _08080194
ldr r0, _08080160
movs r2, 0
ldrsh r1, [r0, r2]
ldr r3, _08080164
adds r0, r4, 0
movs r2, 0xF
bl sub_806F324
b _08080194
.align 2, 0
_08080160: .4byte gUnknown_80F4F86
_08080164: .4byte 0x00000213
_08080168:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80807B4
b _08080194
_08080172:
adds r0, r5, 0
mov r1, r9
bl sub_80808A4
_0808017A:
movs r3, 0x1
str r3, [sp, 0x8]
b _08080194
_08080180:
cmp r4, 0
beq _08080194
ldr r0, _080801C4
movs r2, 0
ldrsh r1, [r0, r2]
ldr r3, _080801C8
adds r0, r4, 0
movs r2, 0xA
bl sub_806F324
_08080194:
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080801A6
adds r0, r4, 0
bl sub_8071DA4
_080801A6:
ldr r3, [sp, 0x8]
cmp r3, 0
beq _080801B4
mov r0, r9
movs r1, 0x1
bl sub_807FE04
_080801B4:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080801C4: .4byte gUnknown_80F4F84
_080801C8: .4byte 0x00000206
thumb_func_end sub_807FE9C
thumb_func_start sub_80801CC
sub_80801CC:
push {r4,r5,lr}
sub sp, 0x8
adds r5, r0, 0
adds r4, r1, 0
cmp r4, 0
beq _08080240
movs r0, 0x64
bl sub_8084100
adds r1, r0, 0
cmp r0, 0x18
bgt _080801EC
ldr r0, _080801E8
b _080801F2
.align 2, 0
_080801E8: .4byte gUnknown_8106A4C
_080801EC:
cmp r0, 0x31
bgt _0808020C
ldr r0, _08080208
_080801F2:
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8076E20
b _08080240
.align 2, 0
_08080208: .4byte gUnknown_8106A50
_0808020C:
cmp r1, 0x4A
bgt _0808022C
ldr r0, _08080228
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8076F80
b _08080240
.align 2, 0
_08080228: .4byte gUnknown_8106A4C
_0808022C:
ldr r0, _08080248
ldr r2, [r0]
movs r0, 0x1
str r0, [sp]
str r0, [sp, 0x4]
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8076F80
_08080240:
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08080248: .4byte gUnknown_8106A50
thumb_func_end sub_80801CC
thumb_func_start sub_808024C
sub_808024C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x5C
str r0, [sp, 0x54]
mov r10, r1
ldr r0, [r1, 0x70]
mov r8, r0
mov r0, r10
movs r1, 0xE
bl sub_8046CB0
lsls r0, 24
cmp r0, 0
beq _08080278
ldr r0, _08080274
b _08080300
.align 2, 0
_08080274: .4byte gUnknown_80FDC7C
_08080278:
movs r6, 0
mov r1, r8
ldrb r0, [r1, 0x7]
movs r1, 0x60
add r1, r8
mov r9, r1
cmp r0, 0
beq _080802C8
movs r5, 0
ldr r7, _0808030C
mov r0, sp
str r0, [sp, 0x58]
_08080290:
lsls r4, r5, 2
ldr r0, [r7]
adds r2, r4, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080802C2
ldrb r0, [r2, 0x2]
bl sub_8091544
lsls r0, 24
cmp r0, 0
beq _080802C2
ldr r0, [r7]
adds r2, r0, r4
ldrb r1, [r2]
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _080802C2
ldr r1, [sp, 0x58]
stm r1!, {r2}
str r1, [sp, 0x58]
adds r6, 0x1
_080802C2:
adds r5, 0x1
cmp r5, 0x13
ble _08080290
_080802C8:
mov r0, r9
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080802FA
mov r0, r8
adds r0, 0x62
ldrb r0, [r0]
bl sub_8091544
lsls r0, 24
cmp r0, 0
beq _080802FA
mov r0, r9
ldrb r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _080802FA
lsls r0, r6, 2
add r0, sp
mov r1, r9
str r1, [r0]
adds r6, 0x1
_080802FA:
cmp r6, 0
bne _08080314
ldr r0, _08080310
_08080300:
ldr r2, [r0]
ldr r0, [sp, 0x54]
mov r1, r10
bl sub_80522F4
b _0808034A
.align 2, 0
_0808030C: .4byte gUnknown_203B460
_08080310: .4byte gUnknown_80FDC40
_08080314:
adds r0, r6, 0
bl sub_8084100
ldr r2, _0808035C
lsls r0, 2
mov r1, sp
adds r4, r1, r0
ldr r1, [r4]
adds r0, r2, 0
bl sub_8045BF8
ldr r2, [r4]
ldrb r1, [r2]
movs r0, 0x8
orrs r0, r1
strb r0, [r2]
movs r1, 0xC9
lsls r1, 1
mov r0, r10
bl sub_80421C0
ldr r0, _08080360
ldr r2, [r0]
ldr r0, [sp, 0x54]
mov r1, r10
bl sub_80522F4
_0808034A:
add sp, 0x5C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808035C: .4byte gUnknown_202DE58
_08080360: .4byte gUnknown_80FDC18
thumb_func_end sub_808024C
thumb_func_start sub_8080364
sub_8080364:
push {lr}
cmp r1, 0
beq _08080370
movs r2, 0x1
bl sub_8077AE4
_08080370:
pop {r0}
bx r0
thumb_func_end sub_8080364
thumb_func_start sub_8080374
sub_8080374:
push {lr}
cmp r1, 0
beq _08080382
movs r2, 0
movs r3, 0
bl sub_807D148
_08080382:
pop {r0}
bx r0
thumb_func_end sub_8080374
thumb_func_start sub_8080388
sub_8080388:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
cmp r4, 0
beq _080803A8
ldr r1, _080803B0
adds r0, r4, 0
movs r2, 0x1
bl sub_808417C
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8075C58
_080803A8:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080803B0: .4byte gUnknown_80F4E74
thumb_func_end sub_8080388
thumb_func_start sub_80803B4
sub_80803B4:
push {lr}
cmp r1, 0
beq _080803C2
movs r2, 0x1
movs r3, 0x1
bl sub_80779F0
_080803C2:
pop {r0}
bx r0
thumb_func_end sub_80803B4
thumb_func_start sub_80803C8
sub_80803C8:
push {lr}
cmp r1, 0
beq _080803D4
movs r2, 0x1
bl sub_80763F8
_080803D4:
pop {r0}
bx r0
thumb_func_end sub_80803C8
thumb_func_start sub_80803D8
sub_80803D8:
push {lr}
sub sp, 0x8
adds r2, r1, 0x4
movs r3, 0
str r3, [sp]
ldr r3, _080803F4
str r3, [sp, 0x4]
movs r3, 0x1
bl sub_807DF38
add sp, 0x8
pop {r0}
bx r0
.align 2, 0
_080803F4: .4byte 0x00000212
thumb_func_end sub_80803D8
thumb_func_start sub_80803F8
sub_80803F8:
push {lr}
sub sp, 0x8
adds r2, r1, 0x4
movs r3, 0
str r3, [sp]
ldr r3, _08080414
str r3, [sp, 0x4]
movs r3, 0x2
bl sub_807DF38
add sp, 0x8
pop {r0}
bx r0
.align 2, 0
_08080414: .4byte 0x00000212
thumb_func_end sub_80803F8
thumb_func_start sub_8080418
sub_8080418:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x58
mov r8, r0
adds r6, r1, 0
movs r0, 0
mov r9, r0
cmp r6, 0
beq _080804F0
ldr r7, [r6, 0x70]
movs r3, 0
ldrb r0, [r7, 0x7]
cmp r0, 0
beq _0808045A
ldr r0, _080804C0
movs r1, 0x1
mov r12, r1
ldr r2, [r0]
mov r4, sp
movs r5, 0x13
_08080444:
ldrb r1, [r2]
mov r0, r12
ands r0, r1
cmp r0, 0
beq _08080452
stm r4!, {r2}
adds r3, 0x1
_08080452:
adds r2, 0x4
subs r5, 0x1
cmp r5, 0
bge _08080444
_0808045A:
adds r2, r7, 0
adds r2, 0x60
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08080470
lsls r0, r3, 2
add r0, sp
str r2, [r0]
adds r3, 0x1
_08080470:
cmp r3, 0
ble _080804B6
mov r4, sp
adds r5, r3, 0
_08080478:
ldr r0, [r4]
ldrb r0, [r0, 0x2]
bl sub_8090BD0
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
bne _080804AE
ldr r0, [r4]
ldrb r0, [r0, 0x2]
cmp r0, 0x54
beq _080804AE
movs r0, 0x64
bl sub_8084100
ldr r1, _080804C4
movs r2, 0
ldrsh r1, [r1, r2]
cmp r0, r1
bge _080804AE
movs r0, 0x1
add r9, r0
ldr r0, [r4]
movs r1, 0x54
movs r2, 0x2
bl sub_8045C28
_080804AE:
adds r4, 0x4
subs r5, 0x1
cmp r5, 0
bne _08080478
_080804B6:
mov r1, r9
cmp r1, 0x1
bne _080804CC
ldr r0, _080804C8
b _080804D4
.align 2, 0
_080804C0: .4byte gUnknown_203B460
_080804C4: .4byte gUnknown_80F4E0E
_080804C8: .4byte gUnknown_80FD788
_080804CC:
mov r2, r9
cmp r2, 0
bne _080804E4
ldr r0, _080804E0
_080804D4:
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
b _080804F0
.align 2, 0
_080804E0: .4byte gUnknown_80FD7D4
_080804E4:
ldr r0, _08080500
ldr r2, [r0]
mov r0, r8
adds r1, r6, 0
bl sub_80522F4
_080804F0:
add sp, 0x58
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080500: .4byte gUnknown_80FD7AC
thumb_func_end sub_8080418
thumb_func_start sub_8080504
sub_8080504:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r4, r1, 0
adds r7, r2, 0
movs r0, 0
mov r8, r0
cmp r4, 0
bne _0808051A
b _0808060E
_0808051A:
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _08080534
ldr r0, _08080530
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _0808060E
.align 2, 0
_08080530: .4byte gUnknown_80FED0C
_08080534:
ldr r5, [r4, 0x70]
adds r0, r4, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _0808055E
adds r0, r7, 0
movs r1, 0x1B
bl sub_8080B00
movs r1, 0x1
mov r8, r1
ldr r1, _080805A4
adds r0, r4, 0
bl sub_80421C0
movs r0, 0x1E
movs r1, 0x48
bl sub_803E708
_0808055E:
ldrb r0, [r5, 0x7]
cmp r0, 0
beq _080805C4
bl sub_8043D10
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
beq _080805B4
movs r2, 0xAE
lsls r2, 1
adds r0, r5, r2
movs r1, 0x1
strb r1, [r0]
adds r2, 0x2
adds r0, r5, r2
strb r1, [r0]
movs r0, 0x28
movs r1, 0x4B
bl sub_803E708
ldr r0, _080805A8
movs r2, 0
ldrsh r1, [r0, r2]
ldr r3, _080805AC
adds r0, r4, 0
movs r2, 0x11
bl sub_806F324
ldr r0, _080805B0
ldr r1, [r0]
movs r0, 0x2
strb r0, [r1, 0x2]
b _0808060E
.align 2, 0
_080805A4: .4byte 0x00000193
_080805A8: .4byte gUnknown_80F4F8A
_080805AC: .4byte 0x00000215
_080805B0: .4byte gUnknown_203B418
_080805B4:
ldr r0, _080805C0
ldr r1, [r0]
adds r0, r6, 0
bl sub_80522A8
b _08080600
.align 2, 0
_080805C0: .4byte gUnknown_80F9728
_080805C4:
ldr r0, _080805E4
adds r1, r4, 0
movs r2, 0
bl sub_8045B94
ldrb r0, [r5, 0x6]
cmp r0, 0
beq _080805EC
ldr r0, _080805E8
ldr r2, [r0]
adds r0, r6, 0
adds r1, r4, 0
bl sub_80522F4
b _080805F6
.align 2, 0
_080805E4: .4byte gUnknown_202DF98
_080805E8: .4byte gUnknown_80F970C
_080805EC:
ldr r0, _08080618
ldr r1, [r0]
adds r0, r6, 0
bl sub_805239C
_080805F6:
ldr r1, _0808061C
adds r0, r4, 0
adds r2, r6, 0
bl sub_8068FE0
_08080600:
mov r0, r8
cmp r0, 0
beq _0808060E
adds r0, r7, 0
movs r1, 0x5
bl sub_8080B00
_0808060E:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080618: .4byte gUnknown_80F970C
_0808061C: .4byte 0x00000215
thumb_func_end sub_8080504
thumb_func_start sub_8080620
sub_8080620:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
str r0, [sp, 0x14]
adds r7, r1, 0
movs r0, 0x3
bl sub_8084100
adds r6, r0, 0
adds r4, r6, 0x2
movs r0, 0x8
bl sub_8084100
adds r5, r0, 0
bl sub_80441BC
lsls r0, 24
cmp r0, 0
bne _080806CA
movs r0, 0
mov r8, r0
cmp r8, r4
bge _080806BA
mov r4, sp
movs r1, 0
mov r10, r1
movs r2, 0
mov r9, r2
adds r6, 0x2
_08080660:
movs r0, 0
bl sub_803D970
movs r1, 0x7
ands r5, r1
strh r0, [r4]
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0
bl sub_806AA0C
lsls r0, 24
cmp r0, 0
beq _080806B2
mov r2, r9
strh r2, [r4, 0x8]
mov r0, r10
strb r0, [r4, 0x2]
ldr r0, _080806D8
lsls r1, r5, 2
adds r1, r0
ldrh r0, [r1]
ldrh r2, [r7]
adds r0, r2
strh r0, [r4, 0xC]
ldrh r0, [r1, 0x2]
ldrh r1, [r7, 0x2]
adds r0, r1
strh r0, [r4, 0xE]
mov r2, r9
str r2, [sp, 0x4]
mov r0, r10
strb r0, [r4, 0x10]
mov r0, sp
movs r1, 0x1
bl sub_806B7F8
cmp r0, 0
beq _080806B2
movs r1, 0x1
add r8, r1
_080806B2:
adds r5, 0x1
subs r6, 0x1
cmp r6, 0
bne _08080660
_080806BA:
movs r1, 0xCA
lsls r1, 1
adds r0, r7, 0
bl sub_80421EC
mov r2, r8
cmp r2, 0
bne _080806E0
_080806CA:
ldr r0, _080806DC
ldr r1, [r0]
ldr r0, [sp, 0x14]
bl sub_80522A8
b _080806EA
.align 2, 0
_080806D8: .4byte gUnknown_80F4448
_080806DC: .4byte gUnknown_80FED04
_080806E0:
ldr r0, _080806FC
ldr r1, [r0]
ldr r0, [sp, 0x14]
bl sub_80522A8
_080806EA:
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080806FC: .4byte gUnknown_80FED00
thumb_func_end sub_8080620
thumb_func_start sub_8080700
sub_8080700:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x20
mov r8, r0
adds r5, r1, 0
movs r0, 0
mov r12, r0
cmp r5, 0
beq _080807A4
ldr r7, [r5, 0x70]
movs r4, 0
movs r3, 0
mov r6, sp
_0808071C:
lsls r0, r3, 3
movs r1, 0x8C
lsls r1, 1
adds r0, r1
adds r2, r7, r0
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08080742
ldrb r0, [r2, 0x4]
cmp r0, 0
beq _08080742
lsls r1, r4, 2
stm r6!, {r2}
add r0, sp, 0x10
adds r0, r1
str r3, [r0]
adds r4, 0x1
_08080742:
adds r3, 0x1
cmp r3, 0x3
ble _0808071C
cmp r4, 0
beq _0808077A
adds r0, r4, 0
bl sub_8084100
adds r4, r0, 0
lsls r4, 2
mov r0, sp
adds r2, r0, r4
ldr r1, [r2]
movs r0, 0
strb r0, [r1, 0x4]
ldr r0, _08080790
ldr r1, [r2]
movs r2, 0
bl sub_80928C0
add r0, sp, 0x10
adds r0, r4
ldr r1, [r0]
adds r0, r5, 0
bl sub_806A9B4
movs r1, 0x1
mov r12, r1
_0808077A:
mov r0, r12
cmp r0, 0
beq _08080798
ldr r0, _08080794
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
b _080807A4
.align 2, 0
_08080790: .4byte gUnknown_202DE58
_08080794: .4byte gUnknown_80FDA80
_08080798:
ldr r0, _080807B0
ldr r2, [r0]
mov r0, r8
adds r1, r5, 0
bl sub_80522F4
_080807A4:
add sp, 0x20
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080807B0: .4byte gUnknown_80FDAA0
thumb_func_end sub_8080700
thumb_func_start sub_80807B4
sub_80807B4:
push {lr}
movs r2, 0
bl sub_8079E34
pop {r0}
bx r0
thumb_func_end sub_80807B4
thumb_func_start sub_80807C0
sub_80807C0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x10
mov r8, r0
adds r7, r1, 0
movs r0, 0
mov r9, r0
cmp r7, 0
beq _08080870
mov r0, r8
movs r2, 0x1
bl sub_80716E8
lsls r0, 24
cmp r0, 0
bne _08080870
ldr r0, [r7, 0x70]
movs r5, 0
movs r6, 0x1
movs r1, 0x8C
lsls r1, 1
adds r2, r0, r1
adds r3, r2, 0
mov r12, sp
movs r4, 0x3
_080807F6:
ldrb r1, [r2]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _08080816
ldrb r1, [r2, 0x1]
adds r0, r6, 0
ands r0, r1
cmp r0, 0
bne _08080816
mov r0, r12
adds r0, 0x4
mov r12, r0
subs r0, 0x4
stm r0!, {r3}
adds r5, 0x1
_08080816:
adds r2, 0x8
adds r3, 0x8
subs r4, 0x1
cmp r4, 0
bge _080807F6
cmp r5, 0
beq _08080848
adds r0, r5, 0
bl sub_8084100
lsls r0, 2
mov r1, sp
adds r3, r1, r0
ldr r2, [r3]
ldrb r1, [r2, 0x1]
movs r0, 0x1
orrs r0, r1
strb r0, [r2, 0x1]
ldr r0, _0808085C
ldr r1, [r3]
movs r2, 0
bl sub_80928C0
movs r0, 0x1
mov r9, r0
_08080848:
mov r1, r9
cmp r1, 0
beq _08080864
ldr r0, _08080860
ldr r2, [r0]
mov r0, r8
adds r1, r7, 0
bl sub_80522F4
b _08080870
.align 2, 0
_0808085C: .4byte gUnknown_202DE58
_08080860: .4byte gUnknown_80FDB04
_08080864:
ldr r0, _08080880
ldr r2, [r0]
mov r0, r8
adds r1, r7, 0
bl sub_80522F4
_08080870:
add sp, 0x10
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080880: .4byte gUnknown_80FDB2C
thumb_func_end sub_80807C0
thumb_func_start sub_8080884
sub_8080884:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
cmp r4, 0
beq _0808089E
movs r0, 0x8
bl sub_8084100
adds r2, r0, 0
adds r0, r5, 0
adds r1, r4, 0
bl sub_807CD9C
_0808089E:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8080884
thumb_func_start sub_80808A4
sub_80808A4:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x30
str r0, [sp, 0x14]
adds r5, r1, 0
movs r0, 0
str r0, [sp, 0x20]
ldr r6, _080808D0
ldr r0, [r6]
ldr r1, _080808D4
adds r0, r1
ldrb r4, [r0]
bl sub_80441BC
lsls r0, 24
cmp r0, 0
beq _080808DC
ldr r0, _080808D8
b _08080A2E
.align 2, 0
_080808D0: .4byte gUnknown_203B418
_080808D4: .4byte 0x00018209
_080808D8: .4byte gUnknown_80FED08
_080808DC:
cmp r4, 0
bne _080808E2
movs r4, 0x2
_080808E2:
movs r2, 0
ldrsh r0, [r5, r2]
movs r3, 0x2
ldrsh r1, [r5, r3]
bl sub_804954C
ldrb r1, [r0, 0x9]
cmp r1, 0xFF
bne _0808090A
movs r0, 0
ldrsh r1, [r5, r0]
subs r2, r1, r4
str r2, [sp, 0x18]
movs r3, 0x2
ldrsh r0, [r5, r3]
subs r2, r0, r4
adds r1, r4
mov r10, r1
adds r0, r4
b _08080934
_0808090A:
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r1, _08080994
adds r0, r1
ldr r1, [r6]
adds r1, r0
movs r2, 0x2
ldrsh r0, [r1, r2]
subs r0, 0x1
str r0, [sp, 0x18]
movs r3, 0x4
ldrsh r0, [r1, r3]
subs r2, r0, 0x1
movs r3, 0x6
ldrsh r0, [r1, r3]
adds r0, 0x1
mov r10, r0
movs r3, 0x8
ldrsh r0, [r1, r3]
adds r0, 0x1
_08080934:
str r0, [sp, 0x1C]
adds r7, r2, 0
ldr r0, [sp, 0x1C]
cmp r7, r0
bgt _08080A26
_0808093E:
ldr r6, [sp, 0x18]
adds r1, r7, 0x1
str r1, [sp, 0x24]
cmp r6, r10
bgt _08080A1E
mov r5, sp
_0808094A:
adds r0, r6, 0
adds r1, r7, 0
bl sub_804954C
adds r4, r0, 0
ldr r0, [r4, 0x14]
adds r2, r6, 0x1
mov r9, r2
cmp r0, 0
beq _08080A18
bl sub_80450F8
cmp r0, 0x3
bne _08080A18
ldr r0, [r4, 0x14]
bl sub_8045108
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08080A18
movs r0, 0xBE
lsls r0, 1
strh r0, [r5]
movs r2, 0
mov r4, sp
_08080980:
ldr r0, _08080998
ldr r0, [r0]
ldr r3, _0808099C
adds r0, r3
ldrb r0, [r0]
cmp r0, 0
beq _080809A0
movs r0, 0xBE
lsls r0, 1
b _080809AE
.align 2, 0
_08080994: .4byte 0x000104c4
_08080998: .4byte gUnknown_203B418
_0808099C: .4byte 0x0000066e
_080809A0:
movs r0, 0
str r2, [sp, 0x28]
bl sub_803D970
lsls r0, 16
asrs r0, 16
ldr r2, [sp, 0x28]
_080809AE:
movs r1, 0
mov r8, r1
movs r3, 0
strh r0, [r4]
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0
str r2, [sp, 0x28]
str r3, [sp, 0x2C]
bl sub_806AA0C
lsls r0, 24
ldr r2, [sp, 0x28]
ldr r3, [sp, 0x2C]
cmp r0, 0
bne _080809D4
adds r2, 0x1
cmp r2, 0x63
ble _08080980
_080809D4:
movs r2, 0
ldrsh r0, [r5, r2]
movs r1, 0
str r3, [sp, 0x2C]
bl sub_806AA0C
lsls r0, 24
ldr r3, [sp, 0x2C]
cmp r0, 0
beq _08080A10
strh r3, [r5, 0x8]
mov r0, r8
strb r0, [r5, 0x2]
strh r6, [r5, 0xC]
strh r7, [r5, 0xE]
str r3, [sp, 0x4]
strb r0, [r5, 0x10]
mov r0, sp
movs r1, 0x1
bl sub_806B7F8
cmp r0, 0
beq _08080A10
add r0, sp, 0xC
movs r1, 0
bl sub_80461C8
ldr r1, [sp, 0x20]
adds r1, 0x1
str r1, [sp, 0x20]
_08080A10:
adds r0, r6, 0
adds r1, r7, 0
bl sub_80402AC
_08080A18:
mov r6, r9
cmp r6, r10
ble _0808094A
_08080A1E:
ldr r7, [sp, 0x24]
ldr r2, [sp, 0x1C]
cmp r7, r2
ble _0808093E
_08080A26:
ldr r3, [sp, 0x20]
cmp r3, 0
beq _08080A3C
ldr r0, _08080A38
_08080A2E:
ldr r1, [r0]
ldr r0, [sp, 0x14]
bl sub_80522A8
b _08080A46
.align 2, 0
_08080A38: .4byte gUnknown_80FDACC
_08080A3C:
ldr r0, _08080A58
ldr r1, [r0]
ldr r0, [sp, 0x14]
bl sub_80522A8
_08080A46:
add sp, 0x30
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080A58: .4byte gUnknown_80FDAE4
thumb_func_end sub_80808A4
thumb_func_start sub_8080A5C
sub_8080A5C:
push {r4-r7,lr}
sub sp, 0xC
adds r7, r0, 0
adds r4, r1, 0
cmp r4, 0
beq _08080AEC
adds r0, r4, 0
movs r1, 0x6
movs r2, 0x8
bl sub_806CDD4
movs r0, 0x10
movs r1, 0x55
bl sub_803E708
adds r0, r4, 0
movs r1, 0x8
bl sub_806CE68
ldr r5, [r4, 0x70]
adds r2, r5, 0
adds r2, 0x60
ldrb r1, [r2]
movs r6, 0x1
adds r0, r6, 0
ands r0, r1
cmp r0, 0
beq _08080AEC
ldr r0, [r5, 0x60]
str r0, [sp, 0x8]
movs r0, 0
strb r0, [r2]
bl sub_80910B4
movs r1, 0xC8
lsls r1, 1
adds r0, r4, 0
bl sub_80421C0
adds r0, r5, 0
adds r0, 0x46
ldrb r0, [r0]
movs r2, 0x7
ands r2, r0
ldr r0, _08080AF4
lsls r2, 2
adds r2, r0
ldrh r0, [r2]
ldrh r1, [r4, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
ldr r3, _08080AF8
ldr r1, [sp, 0x4]
ands r1, r3
orrs r1, r0
str r1, [sp, 0x4]
ldrh r0, [r2, 0x2]
ldrh r2, [r4, 0x6]
adds r0, r2
lsls r0, 16
ldr r2, _08080AFC
ands r1, r2
orrs r1, r0
str r1, [sp, 0x4]
adds r1, r4, 0x4
add r3, sp, 0x8
str r6, [sp]
adds r0, r7, 0
add r2, sp, 0x4
bl sub_804687C
_08080AEC:
add sp, 0xC
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080AF4: .4byte gUnknown_80F4448
_08080AF8: .4byte 0xffff0000
_08080AFC: .4byte 0x0000ffff
thumb_func_end sub_8080A5C
thumb_func_start sub_8080B00
sub_8080B00:
push {r4,r5,lr}
lsls r1, 24
lsrs r5, r1, 24
ldr r4, [r0, 0x14]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08080B2A
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x2
bne _08080B26
adds r0, r4, 0
bl sub_8045104
strb r5, [r0]
_08080B26:
bl sub_8049ED4
_08080B2A:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8080B00
thumb_func_start sub_8080B30
sub_8080B30:
push {lr}
sub sp, 0x10
adds r3, r0, 0
adds r2, r1, 0
mov r0, sp
adds r1, r3, 0
bl sub_8082F9C
movs r0, 0
str r0, [sp, 0xC]
add r1, sp, 0xC
mov r0, sp
movs r2, 0x4
bl sub_8082FA8
mov r0, sp
bl sub_8080B90
mov r0, sp
bl sub_8081454
mov r0, sp
bl sub_808165C
mov r0, sp
bl sub_808173C
mov r0, sp
bl sub_8080BBC
mov r0, sp
bl sub_8080C44
mov r0, sp
bl sub_8080CF0
ldr r1, _08080B8C
mov r0, sp
bl sub_808300C
mov r0, sp
bl nullsub_98
add sp, 0x10
pop {r0}
bx r0
.align 2, 0
_08080B8C: .4byte gUnknown_81071D4
thumb_func_end sub_8080B30
thumb_func_start sub_8080B90
sub_8080B90:
push {r4,lr}
adds r4, r0, 0
ldr r1, _08080BB0
bl sub_808300C
ldr r0, _08080BB4
ldr r1, [r0]
ldr r0, _08080BB8
adds r1, r0
adds r0, r4, 0
movs r2, 0x58
bl sub_8082FA8
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08080BB0: .4byte gUnknown_81071E0
_08080BB4: .4byte gUnknown_203B418
_08080BB8: .4byte 0x00000644
thumb_func_end sub_8080B90
thumb_func_start sub_8080BBC
sub_8080BBC:
push {r4-r7,lr}
sub sp, 0x8
adds r6, r0, 0
ldr r1, _08080C38
movs r2, 0
add r0, sp, 0x4
_08080BC8:
strb r2, [r0]
subs r0, 0x1
cmp r0, sp
bge _08080BC8
adds r0, r6, 0
bl sub_808300C
movs r7, 0
_08080BD8:
ldr r0, _08080C3C
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _08080C40
adds r0, r2
adds r0, r1
ldr r4, [r0]
movs r5, 0
cmp r4, 0
beq _08080C1A
adds r0, r4, 0
bl sub_80450F8
cmp r0, 0x3
bne _08080C1A
adds r0, r4, 0
bl sub_8045108
adds r1, r0, 0
adds r0, r6, 0
bl sub_8081788
adds r1, r4, 0x4
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0x6
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
movs r5, 0x1
_08080C1A:
cmp r5, 0
bne _08080C28
adds r0, r6, 0
mov r1, sp
movs r2, 0x5
bl sub_8082FA8
_08080C28:
adds r7, 0x1
cmp r7, 0x3F
ble _08080BD8
add sp, 0x8
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080C38: .4byte gUnknown_81071E0
_08080C3C: .4byte gUnknown_203B418
_08080C40: .4byte 0x0001361c
thumb_func_end sub_8080BBC
thumb_func_start sub_8080C44
sub_8080C44:
push {r4-r7,lr}
sub sp, 0x8
adds r6, r0, 0
movs r7, 0
ldr r3, _08080CE4
movs r2, 0xFF
_08080C50:
mov r0, sp
adds r1, r0, r7
ldrb r0, [r1]
orrs r0, r2
strb r0, [r1]
adds r7, 0x1
cmp r7, 0x4
ble _08080C50
adds r0, r6, 0
adds r1, r3, 0
bl sub_808300C
movs r7, 0
_08080C6A:
ldr r0, _08080CE8
ldr r0, [r0]
lsls r1, r7, 2
ldr r2, _08080CEC
adds r0, r2
adds r0, r1
ldr r5, [r0]
movs r4, 0
cmp r5, 0
beq _08080CC8
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x2
bne _08080CC8
adds r0, r5, 0
bl sub_8045104
adds r4, r0, 0
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0x1
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r5, 0
adds r1, 0x20
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r5, 0x4
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r5, 0x6
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
movs r4, 0x1
_08080CC8:
cmp r4, 0
bne _08080CD6
adds r0, r6, 0
mov r1, sp
movs r2, 0x5
bl sub_8082FA8
_08080CD6:
adds r7, 0x1
cmp r7, 0x3F
ble _08080C6A
add sp, 0x8
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08080CE4: .4byte gUnknown_81071E0
_08080CE8: .4byte gUnknown_203B418
_08080CEC: .4byte 0x0001371c
thumb_func_end sub_8080C44
thumb_func_start sub_8080CF0
sub_8080CF0:
push {r4-r6,lr}
adds r6, r0, 0
ldr r1, _08080DD4
bl sub_808300C
ldr r4, _08080DD8
ldr r0, [r4]
ldr r1, _08080DDC
adds r0, r1
ldr r1, [r0]
adds r0, r6, 0
bl sub_8083078
ldr r0, [r4]
ldr r2, _08080DE0
adds r0, r2
ldr r1, [r0]
adds r0, r6, 0
bl sub_8083078
ldr r0, [r4]
ldr r1, _08080DE4
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _08080DE8
adds r0, r2
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08080DEC
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _08080DF0
adds r0, r2
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08080DF4
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _08080DF8
adds r0, r2
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08080DFC
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _08080E00
adds r0, r2
ldrb r1, [r0]
adds r0, r6, 0
bl sub_80830B4
ldr r0, [r4]
movs r1, 0xE0
lsls r1, 6
adds r0, r1
ldrh r1, [r0]
adds r0, r6, 0
bl sub_8083030
movs r5, 0
_08080D9A:
ldr r0, [r4]
lsls r1, r5, 2
ldr r2, _08080E04
adds r0, r2
adds r0, r1
ldr r1, [r0]
adds r0, r6, 0
bl sub_8080E0C
adds r5, 0x1
cmp r5, 0x3
ble _08080D9A
movs r5, 0
ldr r4, _08080DD8
_08080DB6:
ldr r0, [r4]
lsls r1, r5, 2
ldr r2, _08080E08
adds r0, r2
adds r0, r1
ldr r1, [r0]
adds r0, r6, 0
bl sub_8080E0C
adds r5, 0x1
cmp r5, 0xF
ble _08080DB6
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08080DD4: .4byte gUnknown_81071E0
_08080DD8: .4byte gUnknown_203B418
_08080DDC: .4byte 0x000037f0
_08080DE0: .4byte 0x000037f4
_08080DE4: .4byte 0x000037f8
_08080DE8: .4byte 0x000037f9
_08080DEC: .4byte 0x000037fa
_08080DF0: .4byte 0x000037fb
_08080DF4: .4byte 0x000037fc
_08080DF8: .4byte 0x000037fd
_08080DFC: .4byte 0x000037fe
_08080E00: .4byte 0x000037ff
_08080E04: .4byte 0x0001357c
_08080E08: .4byte 0x0001358c
thumb_func_end sub_8080CF0
thumb_func_start sub_8080E0C
sub_8080E0C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _08080E88
add sp, r4
adds r5, r0, 0
adds r4, r1, 0
movs r1, 0
add r0, sp, 0x20C
str r1, [r0]
movs r1, 0x1
movs r6, 0x82
lsls r6, 2
mov r2, sp
adds r0, r2, r6
str r1, [r0]
adds r0, r5, 0
movs r1, 0xAA
bl sub_8083060
adds r0, r5, 0
movs r1, 0x55
bl sub_8083060
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08080E8C
ldr r6, [r4, 0x70]
add r1, sp, 0x208
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0x4
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0x6
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0
adds r1, 0x20
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0
adds r1, 0x26
adds r0, r5, 0
movs r2, 0x2
bl sub_8082FA8
b _08080ECC
.align 2, 0
_08080E88: .4byte 0xfffffd6c
_08080E8C:
mov r0, sp
movs r1, 0
adds r2, r6, 0
bl memset
mov r6, sp
add r4, sp, 0x20C
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x2
bl sub_8082FA8
_08080ECC:
ldrh r1, [r6]
adds r0, r5, 0
bl sub_8083030
movs r0, 0x4
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_80817F4
movs r2, 0x2
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_80817F4
ldrb r1, [r6, 0x6]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r6, 0x7]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r6, 0x8]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r6, 0x9]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r6, 0xA]
adds r0, r5, 0
bl sub_8083060
adds r1, r6, 0
adds r1, 0x40
adds r0, r5, 0
bl sub_80818C8
movs r0, 0xC
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
movs r2, 0xE
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_8083048
movs r0, 0x10
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
movs r2, 0x12
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_8083048
ldrb r1, [r6, 0x14]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r6, 0x15]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r6, 0x16]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r6, 0x17]
adds r0, r5, 0
bl sub_8083060
ldr r1, [r6, 0x18]
adds r0, r5, 0
bl sub_8083078
movs r0, 0x1C
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
movs r2, 0x1E
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_8083048
movs r0, 0x20
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
movs r2, 0x22
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_8083048
movs r0, 0x24
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
movs r2, 0x26
ldrsh r1, [r6, r2]
adds r0, r5, 0
bl sub_8083048
movs r0, 0x28
ldrsh r1, [r6, r0]
adds r0, r5, 0
bl sub_8083048
ldr r1, [r6, 0x2C]
adds r0, r5, 0
bl sub_80830A0
ldr r1, [r6, 0x30]
adds r0, r5, 0
bl sub_80830A0
ldr r1, [r6, 0x34]
adds r0, r5, 0
bl sub_80830A0
ldr r1, [r6, 0x38]
adds r0, r5, 0
bl sub_80830A0
adds r1, r6, 0
adds r1, 0x44
adds r0, r5, 0
bl sub_80817C8
adds r0, r6, 0
adds r0, 0x5C
ldrb r1, [r0]
adds r0, r5, 0
bl sub_808180C
adds r0, r6, 0
adds r0, 0x5D
ldrb r1, [r0]
adds r0, r5, 0
bl sub_808180C
adds r0, r6, 0
adds r0, 0x5E
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8081824
adds r0, r6, 0
adds r0, 0x5F
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8081824
adds r1, r6, 0
adds r1, 0x60
adds r0, r5, 0
bl sub_8081788
adds r0, r6, 0
adds r0, 0x64
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80817B0
movs r1, 0x78
adds r1, r6
mov r8, r1
movs r2, 0x8C
adds r2, r6
mov r9, r2
movs r0, 0x90
adds r0, r6
mov r10, r0
adds r1, r6, 0
adds r1, 0x94
str r1, [sp, 0x214]
adds r2, r6, 0
adds r2, 0x3C
str r2, [sp, 0x210]
adds r0, r6, 0
adds r0, 0x98
str r0, [sp, 0x218]
adds r1, 0x8
str r1, [sp, 0x21C]
adds r2, 0x64
str r2, [sp, 0x220]
adds r0, 0x10
str r0, [sp, 0x228]
adds r1, 0x10
str r1, [sp, 0x22C]
adds r2, 0x10
str r2, [sp, 0x230]
adds r0, 0x14
str r0, [sp, 0x234]
adds r1, 0x14
str r1, [sp, 0x238]
adds r2, 0x14
str r2, [sp, 0x23C]
adds r0, 0xC
str r0, [sp, 0x240]
adds r1, 0x10
str r1, [sp, 0x244]
adds r2, 0x18
str r2, [sp, 0x248]
adds r0, 0x18
str r0, [sp, 0x24C]
adds r1, 0x14
str r1, [sp, 0x250]
adds r2, 0xC
str r2, [sp, 0x254]
adds r0, 0xC
str r0, [sp, 0x258]
adds r1, 0xC
str r1, [sp, 0x25C]
adds r2, 0x9
str r2, [sp, 0x260]
adds r0, 0x6
str r0, [sp, 0x264]
adds r1, 0x3
str r1, [sp, 0x268]
adds r2, 0x3
str r2, [sp, 0x26C]
adds r0, 0x9
str r0, [sp, 0x280]
adds r1, 0x2
str r1, [sp, 0x270]
adds r2, 0x2
str r2, [sp, 0x274]
subs r0, 0x4
str r0, [sp, 0x278]
adds r1, 0x5
str r1, [sp, 0x27C]
adds r2, 0x6
str r2, [sp, 0x284]
adds r0, 0x6
str r0, [sp, 0x288]
adds r1, 0x4
str r1, [sp, 0x28C]
adds r2, 0x3
str r2, [sp, 0x290]
subs r0, 0x59
str r0, [sp, 0x224]
adds r4, r6, 0
adds r4, 0x68
movs r7, 0x3
_080810C2:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80830D8
adds r4, 0x4
subs r7, 0x1
cmp r7, 0
bge _080810C2
adds r0, r5, 0
mov r1, r8
bl sub_80818E4
adds r0, r5, 0
mov r1, r9
bl sub_8081B54
adds r0, r5, 0
mov r1, r10
bl sub_8081B54
ldr r2, [sp, 0x214]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_8081880
adds r0, r5, 0
ldr r1, [sp, 0x210]
bl sub_8081898
ldr r0, [sp, 0x218]
ldr r1, [r0]
adds r0, r5, 0
bl sub_8083078
ldr r2, [sp, 0x21C]
ldr r1, [r2]
adds r0, r5, 0
bl sub_8083078
ldr r0, [sp, 0x220]
ldr r1, [r0]
adds r0, r5, 0
bl sub_8083078
adds r0, r5, 0
ldr r1, [sp, 0x228]
bl sub_8081920
adds r0, r5, 0
ldr r1, [sp, 0x22C]
bl sub_808193C
adds r0, r5, 0
ldr r1, [sp, 0x230]
bl sub_8081968
adds r0, r5, 0
ldr r1, [sp, 0x234]
bl sub_8081994
adds r0, r5, 0
ldr r1, [sp, 0x238]
bl sub_80819B0
adds r0, r5, 0
ldr r1, [sp, 0x23C]
bl sub_80819D4
adds r0, r5, 0
ldr r1, [sp, 0x240]
bl sub_80819F0
adds r0, r5, 0
ldr r1, [sp, 0x244]
bl sub_8081A24
adds r0, r5, 0
ldr r1, [sp, 0x248]
bl sub_8081A58
adds r0, r5, 0
ldr r1, [sp, 0x24C]
bl sub_8081A74
adds r0, r5, 0
ldr r1, [sp, 0x250]
bl sub_8081A80
adds r0, r5, 0
ldr r1, [sp, 0x254]
bl sub_8081A9C
adds r0, r5, 0
ldr r1, [sp, 0x258]
bl sub_8081AB8
ldr r2, [sp, 0x25C]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x260]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, [sp, 0x264]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x268]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, [sp, 0x26C]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x280]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, [sp, 0x270]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x274]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, [sp, 0x278]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x27C]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, [sp, 0x284]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [sp, 0x288]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, [sp, 0x28C]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_8083060
ldr r0, [sp, 0x290]
ldrb r1, [r0]
adds r0, r5, 0
bl sub_808183C
movs r1, 0x80
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8081854
movs r2, 0x82
lsls r2, 1
adds r0, r6, r2
ldr r1, [r0]
adds r0, r5, 0
bl sub_808186C
movs r0, 0x84
lsls r0, 1
adds r1, r6, r0
adds r0, r5, 0
movs r2, 0x5
bl sub_808314C
ldr r2, _08081428
adds r1, r6, r2
adds r0, r5, 0
movs r2, 0x5
bl sub_808314C
movs r1, 0x89
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, _0808142C
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r1, 0x8A
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r2, 0x8C
lsls r2, 1
adds r1, r6, r2
adds r0, r5, 0
bl sub_8081B08
movs r0, 0x9E
lsls r0, 1
adds r1, r6, r0
adds r0, r5, 0
bl sub_8081B34
movs r2, 0xA0
lsls r2, 1
adds r1, r6, r2
adds r0, r5, 0
bl sub_8081B34
movs r1, 0xA2
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, _08081430
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r1, _08081434
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r2, 0xA3
lsls r2, 1
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r1, 0xA4
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, _08081438
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r1, 0xA5
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r2, _0808143C
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r1, 0xA6
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r2, 0xA7
lsls r2, 1
adds r0, r6, r2
ldrh r1, [r0]
adds r0, r5, 0
bl sub_8083030
movs r1, 0xA8
lsls r1, 1
adds r0, r6, r1
ldrh r1, [r0]
adds r0, r5, 0
bl sub_8083030
movs r2, 0xA9
lsls r2, 1
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r1, _08081440
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r2, 0xAA
lsls r2, 1
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r1, _08081444
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r2, 0xAB
lsls r2, 1
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
movs r1, 0xB2
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, _08081448
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r1, 0xB3
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, _0808144C
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r1, 0xB4
lsls r1, 1
adds r0, r6, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r2, _08081450
adds r0, r6, r2
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
movs r0, 0xB6
lsls r0, 1
adds r1, r6, r0
adds r0, r5, 0
bl sub_80830D8
movs r1, 0xBA
lsls r1, 1
adds r0, r6, r1
ldr r1, [r0]
adds r0, r5, 0
bl sub_80830A0
movs r2, 0xBC
lsls r2, 1
adds r0, r6, r2
ldrh r1, [r0]
adds r0, r5, 0
bl sub_8083030
movs r1, 0xFC
lsls r1, 1
adds r0, r6, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r5, 0
bl sub_8083048
movs r1, 0xFD
lsls r1, 1
adds r0, r6, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r5, 0
bl sub_8083048
movs r1, 0xFE
lsls r1, 1
adds r0, r6, r1
ldr r1, [r0]
adds r0, r5, 0
bl sub_8083078
ldr r2, [sp, 0x224]
ldrb r1, [r2]
adds r0, r5, 0
bl sub_80818B8
movs r3, 0xA5
lsls r3, 2
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08081428: .4byte 0x0000010d
_0808142C: .4byte 0x00000113
_08081430: .4byte 0x00000145
_08081434: .4byte 0x00000147
_08081438: .4byte 0x00000149
_0808143C: .4byte 0x0000014b
_08081440: .4byte 0x00000153
_08081444: .4byte 0x00000155
_08081448: .4byte 0x00000165
_0808144C: .4byte 0x00000167
_08081450: .4byte 0x00000169
thumb_func_end sub_8080E0C
thumb_func_start sub_8081454
sub_8081454:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
ldr r1, _08081600
bl sub_808300C
ldr r4, _08081604
ldr r0, [r4]
ldr r1, _08081608
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _0808160C
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081610
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
bl sub_80830B4
ldr r0, [r4]
ldr r2, _08081614
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081618
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
bl sub_8083060
ldr r0, [r4]
ldr r2, _0808161C
adds r0, r2
ldrb r1, [r0]
adds r0, r7, 0
bl sub_8083060
ldr r0, [r4]
ldr r1, _08081620
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _08081624
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _08081628
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _0808162C
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _08081630
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r7, 0
bl sub_8083048
movs r1, 0
mov r9, r4
_08081510:
lsls r0, r1, 2
adds r2, r1, 0x1
mov r8, r2
adds r0, r1
lsls r0, 2
adds r0, r1
lsls r0, 6
ldr r1, _08081634
adds r6, r0, r1
movs r5, 0
movs r4, 0x37
_08081526:
mov r2, r9
ldr r1, [r2]
adds r1, r6
adds r1, r5
adds r0, r7, 0
bl sub_8081B60
adds r5, 0x18
subs r4, 0x1
cmp r4, 0
bge _08081526
mov r1, r8
cmp r1, 0x1F
ble _08081510
ldr r4, _08081604
ldr r1, [r4]
ldr r0, _08081638
adds r1, r0
adds r0, r7, 0
bl sub_80830D8
ldr r1, [r4]
ldr r2, _0808163C
adds r1, r2
adds r0, r7, 0
bl sub_80830D8
ldr r6, _08081640
movs r5, 0x7
_08081560:
ldr r1, [r4]
adds r1, r6
adds r0, r7, 0
bl sub_80830D8
adds r6, 0x4
subs r5, 0x1
cmp r5, 0
bge _08081560
ldr r4, _08081604
ldr r1, [r4]
ldr r0, _08081644
adds r1, r0
adds r0, r7, 0
bl sub_80830F8
ldr r1, [r4]
ldr r2, _08081648
adds r1, r2
adds r0, r7, 0
bl sub_80830F8
ldr r1, [r4]
ldr r0, _0808164C
adds r1, r0
adds r0, r7, 0
bl sub_808312C
movs r1, 0
mov r10, r4
_0808159C:
movs r4, 0
adds r2, r1, 0x1
mov r8, r2
lsls r0, r1, 1
lsls r2, r1, 3
mov r9, r2
adds r0, r1
lsls r0, 6
ldr r1, _08081650
adds r6, r0, r1
movs r5, 0
_080815B2:
mov r2, r10
ldr r1, [r2]
adds r1, r6
adds r1, r5
adds r0, r7, 0
bl sub_8081B60
mov r1, r10
ldr r0, [r1]
mov r2, r9
adds r1, r4, r2
ldr r2, _08081654
adds r0, r2
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
bl sub_8083060
adds r5, 0x18
adds r4, 0x1
cmp r4, 0x7
ble _080815B2
mov r1, r8
cmp r1, 0x7
ble _0808159C
ldr r0, _08081604
ldr r1, [r0]
ldr r0, _08081658
adds r1, r0
adds r0, r7, 0
bl sub_8081B94
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08081600: .4byte gUnknown_81071E0
_08081604: .4byte gUnknown_203B418
_08081608: .4byte 0x00003a08
_0808160C: .4byte 0x00003a09
_08081610: .4byte 0x00003a0a
_08081614: .4byte 0x00003a0b
_08081618: .4byte 0x00003a0c
_0808161C: .4byte 0x00003a0d
_08081620: .4byte 0x00003a0e
_08081624: .4byte 0x00003a10
_08081628: .4byte 0x00003a12
_0808162C: .4byte 0x00003a14
_08081630: .4byte 0x00003a16
_08081634: .4byte 0x00003a18
_08081638: .4byte 0x0000e218
_0808163C: .4byte 0x0000e21c
_08081640: .4byte 0x0000e220
_08081644: .4byte 0x0000e240
_08081648: .4byte 0x0000e250
_0808164C: .4byte 0x0000e260
_08081650: .4byte 0x0000e27c
_08081654: .4byte 0x0000e87c
_08081658: .4byte 0x0000e264
thumb_func_end sub_8081454
thumb_func_start sub_808165C
sub_808165C:
push {r4,r5,lr}
adds r5, r0, 0
ldr r1, _08081708
bl sub_808300C
ldr r4, _0808170C
ldr r0, [r4]
ldr r1, _08081710
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r0, [r4]
ldr r1, _08081714
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_8083060
ldr r0, [r4]
ldr r1, _08081718
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _0808171C
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081720
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081724
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081728
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _0808172C
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081730
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081734
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
ldr r0, [r4]
ldr r1, _08081738
adds r0, r1
ldrb r1, [r0]
adds r0, r5, 0
bl sub_80830B4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08081708: .4byte gUnknown_81071E0
_0808170C: .4byte gUnknown_203B418
_08081710: .4byte 0x00018208
_08081714: .4byte 0x00018209
_08081718: .4byte 0x0001820a
_0808171C: .4byte 0x0001820b
_08081720: .4byte 0x0001820c
_08081724: .4byte 0x0001820d
_08081728: .4byte 0x0001820e
_0808172C: .4byte 0x0001820f
_08081730: .4byte 0x00018210
_08081734: .4byte 0x00018211
_08081738: .4byte 0x00018213
thumb_func_end sub_808165C
thumb_func_start sub_808173C
sub_808173C:
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, _08081778
ldr r0, [r4]
ldr r1, _0808177C
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r5, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _08081780
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r5, 0
bl sub_8083048
ldr r0, [r4]
ldr r1, _08081784
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r5, 0
bl sub_8083048
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08081778: .4byte gUnknown_203B418
_0808177C: .4byte 0x0001ced6
_08081780: .4byte 0x0001ced8
_08081784: .4byte 0x0001ceda
thumb_func_end sub_808173C
thumb_func_start sub_8081788
sub_8081788:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r5, 0x1
adds r0, r4, 0
movs r2, 0x1
bl sub_8082FA8
adds r5, 0x2
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081788
thumb_func_start sub_80817B0
sub_80817B0:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_80817B0
thumb_func_start sub_80817C8
sub_80817C8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r1, r4, 0x2
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0
adds r1, 0x14
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0x16
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80817C8
thumb_func_start sub_80817F4
sub_80817F4:
push {lr}
sub sp, 0x4
mov r2, sp
strh r1, [r2]
mov r1, sp
movs r2, 0x2
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_80817F4
thumb_func_start sub_808180C
sub_808180C:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_808180C
thumb_func_start sub_8081824
sub_8081824:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8081824
thumb_func_start sub_808183C
sub_808183C:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_808183C
thumb_func_start sub_8081854
sub_8081854:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8081854
thumb_func_start sub_808186C
sub_808186C:
push {lr}
sub sp, 0x4
str r1, [sp]
mov r1, sp
movs r2, 0x4
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_808186C
thumb_func_start sub_8081880
sub_8081880:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8081880
thumb_func_start sub_8081898
sub_8081898:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
ldrsh r1, [r4, r0]
adds r0, r5, 0
bl sub_8083048
ldrb r1, [r4, 0x2]
adds r0, r5, 0
bl sub_808180C
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081898
thumb_func_start sub_80818B8
sub_80818B8:
push {lr}
lsls r1, 24
lsrs r1, 24
bl sub_8083060
pop {r0}
bx r0
thumb_func_end sub_80818B8
thumb_func_start sub_80818C8
sub_80818C8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldrb r1, [r4]
bl sub_8083060
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80818C8
thumb_func_start sub_80818E4
sub_80818E4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r4, 0x2]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r4, 0x3]
adds r0, r5, 0
bl sub_80830B4
ldrh r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083030
adds r4, 0x10
adds r0, r5, 0
adds r1, r4, 0
bl sub_80830D8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80818E4
thumb_func_start sub_8081920
sub_8081920:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081920
thumb_func_start sub_808193C
sub_808193C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x2]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x3]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808193C
thumb_func_start sub_8081968
sub_8081968:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x8]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x9]
adds r0, r5, 0
bl sub_8083060
ldr r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083078
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081968
thumb_func_start sub_8081994
sub_8081994:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081994
thumb_func_start sub_80819B0
sub_80819B0:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x2]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80819B0
thumb_func_start sub_80819D4
sub_80819D4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80819D4
thumb_func_start sub_80819F0
sub_80819F0:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r4, 0x2]
adds r0, r5, 0
bl sub_80830B4
ldrb r1, [r4, 0x3]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80819F0
thumb_func_start sub_8081A24
sub_8081A24:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldr r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083078
ldrb r1, [r4, 0x8]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x9]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0xA]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081A24
thumb_func_start sub_8081A58
sub_8081A58:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081A58
thumb_func_start sub_8081A74
sub_8081A74:
push {lr}
movs r2, 0x1
bl sub_8082FA8
pop {r0}
bx r0
thumb_func_end sub_8081A74
thumb_func_start sub_8081A80
sub_8081A80:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081A80
thumb_func_start sub_8081A9C
sub_8081A9C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081A9C
thumb_func_start sub_8081AB8
sub_8081AB8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081AB8
thumb_func_start sub_8081AD4
sub_8081AD4:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldrb r1, [r4]
bl sub_8083060
ldrb r1, [r4, 0x1]
adds r0, r5, 0
bl sub_8083060
adds r1, r4, 0x2
adds r0, r5, 0
movs r2, 0x2
bl sub_8082FA8
ldrb r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083060
ldrb r1, [r4, 0x5]
adds r0, r5, 0
bl sub_8083060
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081AD4
thumb_func_start sub_8081B08
sub_8081B08:
push {r4-r7,lr}
adds r6, r0, 0
adds r7, r1, 0
adds r4, r7, 0
movs r5, 0x3
_08081B12:
adds r0, r6, 0
adds r1, r4, 0
bl sub_8081AD4
adds r4, 0x8
subs r5, 0x1
cmp r5, 0
bge _08081B12
adds r0, r7, 0
adds r0, 0x20
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8083060
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8081B08
thumb_func_start sub_8081B34
sub_8081B34:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
ldrsh r1, [r4, r0]
adds r0, r5, 0
bl sub_8083048
movs r0, 0x2
ldrsh r1, [r4, r0]
adds r0, r5, 0
bl sub_8083048
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081B34
thumb_func_start sub_8081B54
sub_8081B54:
push {lr}
movs r2, 0x3
bl sub_8082FA8
pop {r0}
bx r0
thumb_func_end sub_8081B54
thumb_func_start sub_8081B60
sub_8081B60:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
ldrh r1, [r4]
bl sub_8083030
ldrh r1, [r4, 0x4]
adds r0, r5, 0
bl sub_8083030
adds r1, r4, 0
adds r1, 0x9
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0xE
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8081B60
thumb_func_start sub_8081B94
sub_8081B94:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r5, 0x1
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FA8
movs r4, 0
_08081BAC:
adds r0, r5, 0x3
adds r0, r4
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8083060
adds r0, r5, 0
adds r0, 0xB
adds r0, r4
ldrb r1, [r0]
adds r0, r6, 0
bl sub_8083060
adds r4, 0x1
cmp r4, 0x7
ble _08081BAC
ldrb r1, [r5, 0x2]
adds r0, r6, 0
bl sub_8083060
ldrb r1, [r5, 0x13]
adds r0, r6, 0
bl sub_8083060
ldrb r1, [r5, 0x14]
adds r0, r6, 0
bl sub_8083060
ldrb r1, [r5, 0x15]
adds r0, r6, 0
bl sub_80830B4
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8081B94
thumb_func_start sub_8081BF4
sub_8081BF4:
push {lr}
sub sp, 0x10
adds r3, r0, 0
adds r2, r1, 0
mov r0, sp
adds r1, r3, 0
bl sub_8082FD4
add r1, sp, 0xC
mov r0, sp
movs r2, 0x4
bl sub_8082FE0
mov r0, sp
bl sub_8081C50
mov r0, sp
bl sub_8081C7C
mov r0, sp
bl sub_8081F2C
mov r0, sp
bl sub_808201C
mov r0, sp
bl sub_8082060
mov r0, sp
bl sub_80820D8
mov r0, sp
bl sub_808217C
ldr r1, _08081C4C
mov r0, sp
bl sub_8083018
mov r0, sp
bl nullsub_98
add sp, 0x10
pop {r0}
bx r0
.align 2, 0
_08081C4C: .4byte gUnknown_81071D4
thumb_func_end sub_8081BF4
thumb_func_start sub_8081C50
sub_8081C50:
push {r4,lr}
adds r4, r0, 0
ldr r1, _08081C70
bl sub_8083018
ldr r0, _08081C74
ldr r1, [r0]
ldr r0, _08081C78
adds r1, r0
adds r0, r4, 0
movs r2, 0x58
bl sub_8082FE0
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08081C70: .4byte gUnknown_81071E0
_08081C74: .4byte gUnknown_203B418
_08081C78: .4byte 0x00000644
thumb_func_end sub_8081C50
thumb_func_start sub_8081C7C
sub_8081C7C:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
ldr r1, _08081E20
bl sub_8083018
adds r0, r7, 0
bl sub_80831DC
ldr r4, _08081E24
ldr r1, [r4]
ldr r2, _08081E28
adds r1, r2
strb r0, [r1]
adds r0, r7, 0
bl sub_80831DC
ldr r1, [r4]
ldr r3, _08081E2C
adds r1, r3
strb r0, [r1]
adds r0, r7, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08081E30
adds r1, r2
strb r0, [r1]
adds r0, r7, 0
bl sub_80831DC
ldr r1, [r4]
ldr r3, _08081E34
adds r1, r3
strb r0, [r1]
adds r0, r7, 0
bl sub_8083188
ldr r1, [r4]
ldr r2, _08081E38
adds r1, r2
strb r0, [r1]
adds r0, r7, 0
bl sub_8083188
ldr r1, [r4]
ldr r3, _08081E3C
adds r1, r3
strb r0, [r1]
adds r0, r7, 0
bl sub_8083170
ldr r1, [r4]
ldr r2, _08081E40
adds r1, r2
strh r0, [r1]
adds r0, r7, 0
bl sub_8083170
ldr r1, [r4]
ldr r3, _08081E44
adds r1, r3
strh r0, [r1]
adds r0, r7, 0
bl sub_8083170
ldr r1, [r4]
ldr r2, _08081E48
adds r1, r2
strh r0, [r1]
adds r0, r7, 0
bl sub_8083170
ldr r1, [r4]
ldr r3, _08081E4C
adds r1, r3
strh r0, [r1]
adds r0, r7, 0
bl sub_8083170
ldr r1, [r4]
ldr r2, _08081E50
adds r1, r2
strh r0, [r1]
movs r1, 0
mov r9, r4
_08081D2E:
lsls r0, r1, 2
adds r3, r1, 0x1
mov r8, r3
adds r0, r1
lsls r0, 2
adds r0, r1
lsls r0, 6
ldr r1, _08081E54
adds r6, r0, r1
movs r5, 0
movs r4, 0x37
_08081D44:
mov r2, r9
ldr r1, [r2]
adds r1, r6
adds r1, r5
adds r0, r7, 0
bl sub_8081E7C
adds r5, 0x18
subs r4, 0x1
cmp r4, 0
bge _08081D44
mov r1, r8
cmp r1, 0x1F
ble _08081D2E
ldr r4, _08081E24
ldr r1, [r4]
ldr r3, _08081E58
adds r1, r3
adds r0, r7, 0
bl sub_80831F8
ldr r1, [r4]
ldr r0, _08081E5C
adds r1, r0
adds r0, r7, 0
bl sub_80831F8
ldr r6, _08081E60
movs r5, 0x7
_08081D7E:
ldr r1, [r4]
adds r1, r6
adds r0, r7, 0
bl sub_80831F8
adds r6, 0x4
subs r5, 0x1
cmp r5, 0
bge _08081D7E
ldr r4, _08081E24
ldr r1, [r4]
ldr r2, _08081E64
adds r1, r2
adds r0, r7, 0
bl sub_8083220
ldr r1, [r4]
ldr r3, _08081E68
adds r1, r3
adds r0, r7, 0
bl sub_8083220
ldr r1, [r4]
ldr r0, _08081E6C
adds r1, r0
adds r0, r7, 0
bl sub_8083260
movs r1, 0
mov r10, r4
_08081DBA:
movs r4, 0
adds r2, r1, 0x1
mov r8, r2
lsls r0, r1, 1
lsls r3, r1, 3
mov r9, r3
adds r0, r1
lsls r0, 6
ldr r1, _08081E70
adds r6, r0, r1
movs r5, 0
_08081DD0:
mov r2, r10
ldr r1, [r2]
adds r1, r6
adds r1, r5
adds r0, r7, 0
bl sub_8081E7C
adds r0, r7, 0
bl sub_8083188
mov r3, r10
ldr r1, [r3]
mov r3, r9
adds r2, r4, r3
ldr r3, _08081E74
adds r1, r3
adds r1, r2
strb r0, [r1]
adds r5, 0x18
adds r4, 0x1
cmp r4, 0x7
ble _08081DD0
mov r1, r8
cmp r1, 0x7
ble _08081DBA
ldr r0, _08081E24
ldr r1, [r0]
ldr r0, _08081E78
adds r1, r0
adds r0, r7, 0
bl sub_8081EC0
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08081E20: .4byte gUnknown_81071E0
_08081E24: .4byte gUnknown_203B418
_08081E28: .4byte 0x00003a08
_08081E2C: .4byte 0x00003a09
_08081E30: .4byte 0x00003a0a
_08081E34: .4byte 0x00003a0b
_08081E38: .4byte 0x00003a0c
_08081E3C: .4byte 0x00003a0d
_08081E40: .4byte 0x00003a0e
_08081E44: .4byte 0x00003a10
_08081E48: .4byte 0x00003a12
_08081E4C: .4byte 0x00003a14
_08081E50: .4byte 0x00003a16
_08081E54: .4byte 0x00003a18
_08081E58: .4byte 0x0000e218
_08081E5C: .4byte 0x0000e21c
_08081E60: .4byte 0x0000e220
_08081E64: .4byte 0x0000e240
_08081E68: .4byte 0x0000e250
_08081E6C: .4byte 0x0000e260
_08081E70: .4byte 0x0000e27c
_08081E74: .4byte 0x0000e87c
_08081E78: .4byte 0x0000e264
thumb_func_end sub_8081C7C
thumb_func_start sub_8081E7C
sub_8081E7C:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
adds r0, r4, 0
movs r1, 0
movs r2, 0x18
bl memset
adds r0, r5, 0
bl sub_8083158
movs r6, 0
strh r0, [r4]
adds r0, r5, 0
bl sub_8083158
strh r0, [r4, 0x4]
adds r1, r4, 0
adds r1, 0x9
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r1, r4, 0
adds r1, 0xE
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
str r6, [r4, 0x10]
str r6, [r4, 0x14]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8081E7C
thumb_func_start sub_8081EC0
sub_8081EC0:
push {r4-r6,lr}
adds r6, r0, 0
adds r5, r1, 0
adds r0, r5, 0
movs r1, 0
movs r2, 0x18
bl memset
adds r0, r6, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r1, r5, 0x1
adds r0, r6, 0
movs r2, 0x1
bl sub_8082FE0
movs r4, 0
_08081EE6:
adds r0, r6, 0
bl sub_8083188
adds r1, r5, 0x3
adds r1, r4
strb r0, [r1]
adds r0, r6, 0
bl sub_8083188
adds r1, r5, 0
adds r1, 0xB
adds r1, r4
strb r0, [r1]
adds r4, 0x1
cmp r4, 0x7
ble _08081EE6
adds r0, r6, 0
bl sub_8083188
strb r0, [r5, 0x2]
adds r0, r6, 0
bl sub_8083188
strb r0, [r5, 0x13]
adds r0, r6, 0
bl sub_8083188
strb r0, [r5, 0x14]
adds r0, r6, 0
bl sub_80831DC
strb r0, [r5, 0x15]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8081EC0
thumb_func_start sub_8081F2C
sub_8081F2C:
push {r4,r5,lr}
adds r5, r0, 0
ldr r1, _08081FE4
bl sub_8083018
ldr r4, _08081FE8
ldr r0, [r4]
ldr r1, _08081FEC
adds r0, r1
movs r1, 0
str r1, [r0]
adds r0, r5, 0
bl sub_8083188
ldr r1, [r4]
ldr r2, _08081FF0
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
ldr r1, [r4]
ldr r2, _08081FF4
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08081FF8
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08081FFC
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082000
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082004
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082008
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _0808200C
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082010
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082014
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082018
adds r1, r2
strb r0, [r1]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08081FE4: .4byte gUnknown_81071E0
_08081FE8: .4byte gUnknown_203B418
_08081FEC: .4byte 0x000181f8
_08081FF0: .4byte 0x00018208
_08081FF4: .4byte 0x00018209
_08081FF8: .4byte 0x0001820a
_08081FFC: .4byte 0x0001820b
_08082000: .4byte 0x0001820c
_08082004: .4byte 0x0001820d
_08082008: .4byte 0x0001820e
_0808200C: .4byte 0x0001820f
_08082010: .4byte 0x00018210
_08082014: .4byte 0x00018211
_08082018: .4byte 0x00018213
thumb_func_end sub_8081F2C
thumb_func_start sub_808201C
sub_808201C:
push {r4,r5,lr}
adds r5, r0, 0
bl sub_8083170
ldr r4, _08082050
ldr r1, [r4]
ldr r2, _08082054
adds r1, r2
strh r0, [r1]
adds r0, r5, 0
bl sub_8083170
ldr r1, [r4]
ldr r2, _08082058
adds r1, r2
strh r0, [r1]
adds r0, r5, 0
bl sub_8083170
ldr r1, [r4]
ldr r2, _0808205C
adds r1, r2
strh r0, [r1]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08082050: .4byte gUnknown_203B418
_08082054: .4byte 0x0001ced6
_08082058: .4byte 0x0001ced8
_0808205C: .4byte 0x0001ceda
thumb_func_end sub_808201C
thumb_func_start sub_8082060
sub_8082060:
push {r4-r7,lr}
sub sp, 0x8
adds r5, r0, 0
ldr r1, _080820A4
bl sub_8083018
add r4, sp, 0x4
mov r7, sp
movs r6, 0x3F
_08082072:
adds r0, r5, 0
mov r1, sp
bl sub_80820A8
adds r0, r5, 0
adds r1, r4, 0
bl sub_80831F8
ldrb r1, [r7]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08082096
adds r0, r4, 0
mov r1, sp
movs r2, 0
bl sub_80460F8
_08082096:
subs r6, 0x1
cmp r6, 0
bge _08082072
add sp, 0x8
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080820A4: .4byte gUnknown_81071E0
thumb_func_end sub_8082060
thumb_func_start sub_80820A8
sub_80820A8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
str r0, [r4]
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r1, r4, 0x1
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r4, 0x2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FE0
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80820A8
thumb_func_start sub_80820D8
sub_80820D8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
adds r5, r0, 0
ldr r1, _08082178
bl sub_8083018
movs r0, 0x1
add r0, sp
mov r9, r0
add r1, sp, 0x4
mov r8, r1
mov r7, sp
movs r2, 0x3F
mov r10, r2
_080820FC:
movs r0, 0x6
strb r0, [r7]
movs r0, 0
mov r3, sp
strb r0, [r3, 0x1]
adds r0, r5, 0
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
adds r0, r5, 0
mov r1, sp
adds r1, 0x1
movs r2, 0x1
bl sub_8082FE0
adds r0, r5, 0
bl sub_80831DC
lsls r0, 24
lsrs r6, r0, 24
adds r0, r5, 0
add r1, sp, 0x4
bl sub_80831F8
ldrb r0, [r7]
cmp r0, 0xFF
beq _0808215C
mov r1, r8
movs r2, 0
ldrsh r0, [r1, r2]
mov r3, sp
movs r2, 0x6
ldrsh r1, [r3, r2]
bl sub_8049590
adds r4, r0, 0
ldrb r0, [r7]
mov r3, r9
ldrb r2, [r3]
mov r1, r8
bl sub_8045684
cmp r0, 0
beq _0808215C
str r0, [r4, 0x14]
adds r0, 0x20
strb r6, [r0]
_0808215C:
movs r0, 0x1
negs r0, r0
add r10, r0
mov r1, r10
cmp r1, 0
bge _080820FC
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08082178: .4byte gUnknown_81071E0
thumb_func_end sub_80820D8
thumb_func_start sub_808217C
sub_808217C:
push {r4,r5,lr}
adds r5, r0, 0
ldr r1, _08082250
bl sub_8083018
adds r0, r5, 0
bl sub_80831A0
ldr r4, _08082254
ldr r1, [r4]
ldr r2, _08082258
adds r1, r2
str r0, [r1]
adds r0, r5, 0
bl sub_80831A0
ldr r1, [r4]
ldr r2, _0808225C
adds r1, r2
str r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082260
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082264
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082268
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _0808226C
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082270
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082274
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _08082278
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [r4]
ldr r2, _0808227C
adds r1, r2
strb r0, [r1]
adds r0, r5, 0
bl sub_8083158
ldr r1, [r4]
movs r2, 0xE0
lsls r2, 6
adds r1, r2
strh r0, [r1]
movs r4, 0
_08082226:
adds r0, r5, 0
movs r1, 0x1
adds r2, r4, 0
bl sub_8082280
adds r4, 0x1
cmp r4, 0x3
ble _08082226
movs r4, 0
_08082238:
adds r0, r5, 0
movs r1, 0
adds r2, r4, 0
bl sub_8082280
adds r4, 0x1
cmp r4, 0xF
ble _08082238
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08082250: .4byte gUnknown_81071E0
_08082254: .4byte gUnknown_203B418
_08082258: .4byte 0x000037f0
_0808225C: .4byte 0x000037f4
_08082260: .4byte 0x000037f8
_08082264: .4byte 0x000037f9
_08082268: .4byte 0x000037fa
_0808226C: .4byte 0x000037fb
_08082270: .4byte 0x000037fc
_08082274: .4byte 0x000037fd
_08082278: .4byte 0x000037fe
_0808227C: .4byte 0x000037ff
thumb_func_end sub_808217C
thumb_func_start sub_8082280
sub_8082280:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _0808266C
add sp, r4
adds r5, r0, 0
str r2, [sp, 0x210]
lsls r1, 24
lsrs r1, 24
str r1, [sp, 0x20C]
movs r2, 0x82
lsls r2, 2
mov r0, sp
movs r1, 0
bl memset
adds r0, r5, 0
bl sub_8083188
adds r0, r5, 0
bl sub_8083188
adds r0, r5, 0
bl sub_8083188
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x214]
add r4, sp, 0x208
adds r0, r5, 0
adds r1, r4, 0
bl sub_80831F8
adds r0, r5, 0
bl sub_80831DC
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x218]
adds r0, r5, 0
bl sub_8083158
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x21C]
ldr r1, _08082670
movs r0, 0
str r0, [r1]
adds r0, r5, 0
bl sub_8083158
mov r1, sp
strh r0, [r1]
adds r0, r5, 0
bl sub_8082BC0
mov r1, sp
strh r0, [r1, 0x4]
adds r0, r5, 0
bl sub_8082BC0
mov r1, sp
strh r0, [r1, 0x2]
adds r0, r5, 0
bl sub_80831DC
mov r1, sp
strb r0, [r1, 0x6]
adds r0, r5, 0
bl sub_80831DC
mov r1, sp
strb r0, [r1, 0x7]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x8]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x9]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0xA]
add r1, sp, 0x40
adds r0, r5, 0
bl sub_8082F64
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0xC]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0xE]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x10]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x12]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x14]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x15]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x16]
adds r0, r5, 0
bl sub_8083188
mov r1, sp
strb r0, [r1, 0x17]
adds r0, r5, 0
bl sub_80831A0
str r0, [sp, 0x18]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x1C]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x1E]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x20]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x22]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x24]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x26]
adds r0, r5, 0
bl sub_8083170
mov r1, sp
strh r0, [r1, 0x28]
adds r0, r5, 0
bl sub_80831C8
str r0, [sp, 0x2C]
adds r0, r5, 0
bl sub_80831C8
str r0, [sp, 0x30]
adds r0, r5, 0
bl sub_80831C8
str r0, [sp, 0x34]
adds r0, r5, 0
bl sub_80831C8
str r0, [sp, 0x38]
add r1, sp, 0x44
adds r0, r5, 0
bl sub_8082CBC
adds r0, r5, 0
bl sub_8082BFC
add r1, sp, 0x5C
strb r0, [r1]
adds r0, r5, 0
bl sub_8082BFC
mov r1, sp
adds r1, 0x5D
strb r0, [r1]
adds r0, r5, 0
bl sub_8082C18
mov r1, sp
adds r1, 0x5E
strb r0, [r1]
adds r0, r5, 0
bl sub_8082C18
mov r1, sp
adds r1, 0x5F
strb r0, [r1]
add r1, sp, 0x60
adds r0, r5, 0
bl sub_80820A8
adds r0, r5, 0
bl sub_8082BE0
add r1, sp, 0x64
strb r0, [r1]
add r7, sp, 0x78
add r0, sp, 0x8C
mov r8, r0
add r1, sp, 0x90
mov r9, r1
add r2, sp, 0x94
mov r10, r2
mov r3, sp
adds r3, 0x3C
str r3, [sp, 0x270]
mov r0, sp
adds r0, 0x98
str r0, [sp, 0x274]
mov r1, sp
adds r1, 0x9C
str r1, [sp, 0x278]
mov r2, sp
adds r2, 0xA0
str r2, [sp, 0x27C]
adds r3, 0x6C
str r3, [sp, 0x284]
adds r0, 0x14
str r0, [sp, 0x288]
adds r1, 0x14
str r1, [sp, 0x28C]
adds r2, 0x1C
str r2, [sp, 0x290]
adds r3, 0x18
str r3, [sp, 0x294]
adds r0, 0x18
str r0, [sp, 0x298]
adds r1, 0x18
str r1, [sp, 0x29C]
adds r2, 0x14
str r2, [sp, 0x220]
adds r3, 0x1C
str r3, [sp, 0x224]
adds r0, 0x1C
str r0, [sp, 0x228]
adds r1, 0x1C
str r1, [sp, 0x22C]
adds r2, 0x18
str r2, [sp, 0x230]
adds r3, 0x10
str r3, [sp, 0x234]
adds r0, 0x10
str r0, [sp, 0x238]
adds r1, 0xD
str r1, [sp, 0x23C]
adds r2, 0xA
str r2, [sp, 0x240]
adds r3, 0x7
str r3, [sp, 0x244]
adds r0, 0x4
str r0, [sp, 0x248]
adds r1, 0xA
str r1, [sp, 0x25C]
adds r2, 0x3
str r2, [sp, 0x24C]
adds r3, 0x3
str r3, [sp, 0x250]
adds r0, 0x3
str r0, [sp, 0x254]
subs r1, 0x1
str r1, [sp, 0x258]
adds r2, 0x7
str r2, [sp, 0x260]
adds r3, 0x7
str r3, [sp, 0x264]
adds r0, 0x7
str r0, [sp, 0x268]
adds r1, 0x5
str r1, [sp, 0x26C]
subs r2, 0x58
str r2, [sp, 0x280]
add r4, sp, 0x68
movs r6, 0x3
_080824DC:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80831F8
adds r4, 0x4
subs r6, 0x1
cmp r6, 0
bge _080824DC
adds r0, r5, 0
adds r1, r7, 0
bl sub_8082CE4
adds r0, r5, 0
mov r1, r8
bl sub_8082D28
adds r0, r5, 0
mov r1, r9
bl sub_8082D28
adds r0, r5, 0
bl sub_8082C84
movs r4, 0
mov r3, r10
strb r0, [r3]
adds r0, r5, 0
ldr r1, [sp, 0x270]
bl sub_8082F80
adds r0, r5, 0
bl sub_80831A0
ldr r1, [sp, 0x274]
str r0, [r1]
adds r0, r5, 0
bl sub_80831A0
ldr r2, [sp, 0x278]
str r0, [r2]
adds r0, r5, 0
bl sub_80831A0
ldr r3, [sp, 0x27C]
str r0, [r3]
adds r0, r5, 0
ldr r1, [sp, 0x284]
bl sub_8082D34
adds r0, r5, 0
ldr r1, [sp, 0x288]
bl sub_8082D50
adds r0, r5, 0
ldr r1, [sp, 0x28C]
bl sub_8082D7C
adds r0, r5, 0
ldr r1, [sp, 0x290]
bl sub_8082DA8
adds r0, r5, 0
ldr r1, [sp, 0x294]
bl sub_8082DC4
adds r0, r5, 0
ldr r1, [sp, 0x298]
bl sub_8082DE8
adds r0, r5, 0
ldr r1, [sp, 0x29C]
bl sub_8082E04
adds r0, r5, 0
ldr r1, [sp, 0x220]
bl sub_8082E38
adds r0, r5, 0
ldr r1, [sp, 0x224]
bl sub_8082E6C
adds r0, r5, 0
ldr r1, [sp, 0x228]
bl sub_8082E88
adds r0, r5, 0
ldr r1, [sp, 0x22C]
bl sub_8082E94
adds r0, r5, 0
ldr r1, [sp, 0x230]
bl sub_8082EB0
adds r0, r5, 0
ldr r1, [sp, 0x234]
bl sub_8082ECC
adds r0, r5, 0
bl sub_80831DC
ldr r1, [sp, 0x238]
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r2, [sp, 0x23C]
strb r0, [r2]
adds r0, r5, 0
bl sub_80831DC
ldr r3, [sp, 0x240]
strb r0, [r3]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [sp, 0x244]
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r2, [sp, 0x248]
strb r0, [r2]
adds r0, r5, 0
bl sub_8083188
ldr r3, [sp, 0x25C]
strb r0, [r3]
adds r0, r5, 0
bl sub_80831DC
ldr r1, [sp, 0x24C]
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r2, [sp, 0x250]
strb r0, [r2]
adds r0, r5, 0
bl sub_80831DC
ldr r3, [sp, 0x254]
strb r0, [r3]
adds r0, r5, 0
bl sub_8083188
ldr r1, [sp, 0x258]
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r2, [sp, 0x260]
strb r0, [r2]
adds r0, r5, 0
bl sub_8083188
ldr r3, [sp, 0x264]
strb r0, [r3]
adds r0, r5, 0
bl sub_8083188
ldr r1, [sp, 0x268]
strb r0, [r1]
adds r0, r5, 0
bl sub_8082C34
ldr r2, [sp, 0x26C]
strb r0, [r2]
adds r0, r5, 0
bl sub_8082C50
add r1, sp, 0x100
strb r0, [r1]
adds r0, r5, 0
bl sub_8082C6C
add r1, sp, 0x104
str r0, [r1]
add r1, sp, 0x108
adds r0, r5, 0
movs r2, 0x5
bl sub_8083288
ldr r1, _08082674
add r1, sp
adds r0, r5, 0
movs r2, 0x5
bl sub_8083288
adds r0, r5, 0
bl sub_8083188
movs r1, 0x89
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
b _08082678
.align 2, 0
_0808266C: .4byte 0xfffffd60
_08082670: .4byte gUnknown_203B450
_08082674: .4byte 0x0000010d
_08082678:
ldr r1, _08082818
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
add r1, sp, 0x114
lsls r0, 24
lsrs r0, 24
str r0, [r1]
add r1, sp, 0x118
adds r0, r5, 0
bl sub_8082F1C
add r1, sp, 0x13C
adds r0, r5, 0
bl sub_8082F48
add r1, sp, 0x140
adds r0, r5, 0
bl sub_8082F48
adds r0, r5, 0
bl sub_80831DC
add r1, sp, 0x144
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, _0808281C
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, _08082820
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
movs r1, 0xA3
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
add r1, sp, 0x148
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, _08082824
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
movs r1, 0xA5
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, _08082828
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
add r1, sp, 0x14C
strb r0, [r1]
adds r0, r5, 0
bl sub_8083158
movs r1, 0xA7
lsls r1, 1
add r1, sp
strh r0, [r1]
adds r0, r5, 0
bl sub_8083158
add r1, sp, 0x150
strh r0, [r1]
adds r0, r5, 0
bl sub_80831DC
movs r1, 0xA9
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
ldr r1, _0808282C
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
add r1, sp, 0x154
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
ldr r1, _08082830
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_80831DC
movs r1, 0xAB
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
add r1, sp, 0x164
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
ldr r1, _08082834
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
movs r1, 0xB3
lsls r1, 1
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
ldr r1, _08082838
add r1, sp
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
add r1, sp, 0x168
strb r0, [r1]
adds r0, r5, 0
bl sub_8083188
ldr r1, _0808283C
add r1, sp
strb r0, [r1]
add r1, sp, 0x16C
adds r0, r5, 0
bl sub_80831F8
adds r0, r5, 0
bl sub_80831C8
add r1, sp, 0x174
str r0, [r1]
adds r0, r5, 0
bl sub_8083158
add r1, sp, 0x178
strh r0, [r1]
adds r0, r5, 0
bl sub_8083170
add r1, sp, 0x1F8
strh r0, [r1]
adds r0, r5, 0
bl sub_8083170
movs r1, 0xFD
lsls r1, 1
add r1, sp
strh r0, [r1]
adds r0, r5, 0
bl sub_80831A0
add r1, sp, 0x1FC
str r0, [r1]
adds r0, r5, 0
bl sub_8082CA0
ldr r3, [sp, 0x280]
strb r0, [r3]
ldr r0, _08082840
str r4, [r0]
ldr r0, [sp, 0x214]
cmp r0, 0
beq _080828BE
ldr r1, [sp, 0x20C]
cmp r1, 0
beq _08082844
mov r0, sp
movs r2, 0x2
ldrsh r0, [r0, r2]
mov r1, sp
movs r3, 0x4
ldrsh r1, [r1, r3]
ldr r2, [sp, 0x210]
bl sub_80828E0
b _08082856
.align 2, 0
_08082818: .4byte 0x00000113
_0808281C: .4byte 0x00000145
_08082820: .4byte 0x00000147
_08082824: .4byte 0x00000149
_08082828: .4byte 0x0000014b
_0808282C: .4byte 0x00000153
_08082830: .4byte 0x00000155
_08082834: .4byte 0x00000165
_08082838: .4byte 0x00000167
_0808283C: .4byte 0x00000169
_08082840: .4byte gUnknown_203B450
_08082844:
mov r0, sp
movs r1, 0x2
ldrsh r0, [r0, r1]
mov r1, sp
movs r2, 0x4
ldrsh r1, [r1, r2]
ldr r2, [sp, 0x210]
bl sub_8082A08
_08082856:
adds r7, r0, 0
cmp r7, 0
beq _080828BE
ldr r6, [r7, 0x70]
movs r5, 0x82
lsls r5, 2
mov r3, sp
adds r4, r3, r5
movs r1, 0
ldrsh r0, [r4, r1]
ldr r3, _080828D4
add r3, sp
movs r2, 0
ldrsh r1, [r3, r2]
bl sub_8049590
ldr r1, [r4]
str r1, [r7, 0x8]
ldr r1, [r4]
str r1, [r7, 0x4]
str r7, [r0, 0x10]
adds r0, r7, 0
adds r0, 0x20
movs r4, 0
add r1, sp, 0x218
ldrb r1, [r1]
strb r1, [r0]
add r2, sp, 0x21C
ldrh r2, [r2]
strh r2, [r7, 0x26]
adds r0, r6, 0
mov r1, sp
adds r2, r5, 0
bl memcpy
ldr r0, _080828D8
str r4, [r0]
ldrb r0, [r6, 0x7]
cmp r0, 0
beq _080828B0
ldr r0, _080828DC
ldrh r1, [r7, 0x4]
strh r1, [r0]
ldrh r1, [r7, 0x6]
strh r1, [r0, 0x2]
_080828B0:
adds r0, r7, 0
bl sub_807191C
adds r0, r7, 0
movs r1, 0
bl sub_804535C
_080828BE:
movs r3, 0xA8
lsls r3, 2
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080828D4: .4byte 0x0000020a
_080828D8: .4byte gUnknown_203B450
_080828DC: .4byte gUnknown_203B410
thumb_func_end sub_8082280
thumb_func_start sub_80828E0
sub_80828E0:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r5, r2, 0
lsls r0, 16
asrs r0, 16
mov r10, r0
lsls r1, 16
asrs r1, 16
mov r8, r1
movs r4, 0x1
negs r4, r4
mov r0, r8
bl GetPokemonSize
lsls r0, 24
lsrs r6, r0, 24
movs r3, 0
movs r0, 0x6
subs r7, r0, r6
ldr r0, _08082914
mov r9, r0
b _0808291A
.align 2, 0
_08082914: .4byte gUnknown_202EE70
_08082918:
adds r3, 0x1
_0808291A:
cmp r3, r7
bgt _0808293E
movs r2, 0
cmp r2, r6
bge _08082938
mov r0, r9
adds r1, r3, r0
b _08082932
_0808292A:
adds r1, 0x1
adds r2, 0x1
cmp r2, r6
bge _08082938
_08082932:
ldrb r0, [r1]
cmp r0, 0
beq _0808292A
_08082938:
cmp r2, r6
bne _08082918
adds r4, r3, 0
_0808293E:
movs r0, 0x1
negs r0, r0
cmp r4, r0
bne _0808294A
movs r0, 0
b _080829E6
_0808294A:
ldr r2, _080829F4
ldr r0, [r2]
lsls r1, r5, 2
ldr r3, _080829F8
adds r0, r3
adds r0, r1
ldr r7, [r0]
movs r0, 0x1
mov r9, r0
str r0, [r7]
adds r0, r7, 0
adds r0, 0x24
strb r5, [r0]
lsls r0, r5, 6
adds r0, r5
lsls r0, 3
ldr r1, _080829FC
adds r0, r1
ldr r1, [r2]
adds r1, r0
str r1, [r7, 0x70]
movs r5, 0
mov r3, r10
strh r3, [r1, 0x2]
ldr r0, [r7, 0x70]
mov r1, r8
strh r1, [r0, 0x4]
ldr r0, [r7, 0x70]
strb r5, [r0, 0x6]
mov r0, r8
bl sub_80687D0
str r0, [r7, 0x64]
lsls r0, r4, 4
adds r0, 0x40
adds r1, r7, 0
adds r1, 0x68
strh r0, [r1]
adds r1, 0x2
movs r0, 0x7
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x6C
strb r5, [r0]
adds r1, 0x1
movs r0, 0xFF
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x6D
mov r3, r9
strb r3, [r0]
adds r0, 0x2
strb r3, [r0]
movs r0, 0
str r0, [r7, 0x1C]
bl sub_8045ACC
ldr r0, [r7, 0x70]
ldr r1, _08082A00
adds r0, r1
strb r4, [r0]
ldr r0, [r7, 0x70]
movs r3, 0xB4
lsls r3, 1
adds r0, r3
strb r6, [r0]
cmp r6, 0
beq _080829E4
ldr r3, _08082A04
movs r2, 0x1
adds r1, r6, 0
_080829D8:
adds r0, r4, r3
strb r2, [r0]
adds r4, 0x1
subs r1, 0x1
cmp r1, 0
bne _080829D8
_080829E4:
adds r0, r7, 0
_080829E6:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080829F4: .4byte gUnknown_203B418
_080829F8: .4byte 0x0001357c
_080829FC: .4byte 0x0000069c
_08082A00: .4byte 0x00000167
_08082A04: .4byte gUnknown_202EE70
thumb_func_end sub_80828E0
thumb_func_start sub_8082A08
sub_8082A08:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r5, r2, 0
lsls r0, 16
asrs r0, 16
str r0, [sp]
lsls r1, 16
asrs r1, 16
mov r9, r1
movs r0, 0x1
negs r0, r0
mov r8, r0
mov r0, r9
bl GetPokemonSize
lsls r0, 24
lsrs r6, r0, 24
movs r3, 0
movs r0, 0x10
subs r4, r0, r6
ldr r7, _08082A3C
b _08082A42
.align 2, 0
_08082A3C: .4byte gUnknown_202EE76
_08082A40:
adds r3, 0x1
_08082A42:
cmp r3, r4
bgt _08082A64
movs r2, 0
cmp r2, r6
bge _08082A5E
adds r1, r3, r7
b _08082A58
_08082A50:
adds r1, 0x1
adds r2, 0x1
cmp r2, r6
bge _08082A5E
_08082A58:
ldrb r0, [r1]
cmp r0, 0
beq _08082A50
_08082A5E:
cmp r2, r6
bne _08082A40
mov r8, r3
_08082A64:
movs r0, 0x1
negs r0, r0
cmp r8, r0
bne _08082A70
movs r0, 0
b _08082B1C
_08082A70:
ldr r2, _08082B2C
ldr r0, [r2]
lsls r1, r5, 2
ldr r3, _08082B30
adds r0, r3
adds r0, r1
ldr r7, [r0]
movs r4, 0x1
str r4, [r7]
adds r0, r7, 0
adds r0, 0x24
movs r1, 0
mov r10, r1
strb r5, [r0]
subs r0, 0x2
mov r3, r10
strb r3, [r0]
lsls r0, r5, 6
adds r0, r5
lsls r0, 3
ldr r1, _08082B34
adds r0, r1
ldr r1, [r2]
adds r1, r0
str r1, [r7, 0x70]
movs r5, 0
mov r2, sp
ldrh r2, [r2]
strh r2, [r1, 0x2]
ldr r0, [r7, 0x70]
mov r3, r9
strh r3, [r0, 0x4]
ldr r0, [r7, 0x70]
strb r4, [r0, 0x6]
mov r0, r9
bl sub_80687D0
str r0, [r7, 0x64]
mov r1, r8
lsls r0, r1, 4
adds r0, 0xA0
adds r1, r7, 0
adds r1, 0x68
strh r0, [r1]
adds r1, 0x2
movs r0, 0x7
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x6C
strb r5, [r0]
adds r1, 0x1
movs r0, 0xFF
strb r0, [r1]
adds r0, r7, 0
adds r0, 0x6D
strb r4, [r0]
adds r0, 0x2
strb r4, [r0]
mov r2, r10
str r2, [r7, 0x1C]
ldr r0, [r7, 0x70]
ldr r3, _08082B38
adds r0, r3
mov r4, r8
strb r4, [r0]
ldr r0, [r7, 0x70]
movs r1, 0xB4
lsls r1, 1
adds r0, r1
strb r6, [r0]
cmp r6, 0
beq _08082B16
ldr r3, _08082B3C
movs r2, 0x1
adds r1, r6, 0
_08082B06:
mov r4, r8
adds r0, r4, r3
strb r2, [r0]
movs r0, 0x1
add r8, r0
subs r1, 0x1
cmp r1, 0
bne _08082B06
_08082B16:
bl sub_8045ACC
adds r0, r7, 0
_08082B1C:
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08082B2C: .4byte gUnknown_203B418
_08082B30: .4byte 0x0001358c
_08082B34: .4byte 0x00000ebc
_08082B38: .4byte 0x00000167
_08082B3C: .4byte gUnknown_202EE76
thumb_func_end sub_8082A08
thumb_func_start sub_8082B40
sub_8082B40:
push {r4-r6,lr}
sub sp, 0x4
movs r6, 0
_08082B46:
ldr r0, _08082BB8
ldr r0, [r0]
lsls r1, r6, 2
ldr r2, _08082BBC
adds r0, r2
adds r0, r1
ldr r5, [r0]
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08082BA8
ldr r4, [r5, 0x70]
movs r1, 0x4
ldrsh r0, [r4, r1]
bl sub_80687D0
str r0, [r5, 0x64]
adds r0, r5, 0
bl sub_806CEBC
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_806CCB4
ldr r0, [r5, 0x4]
str r0, [sp]
adds r0, r4, 0
adds r0, 0x98
ldr r0, [r0]
movs r2, 0x4
ldrsh r1, [r4, r2]
mov r2, sp
movs r3, 0x3
bl sub_800F8D0
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8049590
ldrb r1, [r0, 0x9]
adds r0, r5, 0
adds r0, 0x25
strb r1, [r0]
_08082BA8:
adds r6, 0x1
cmp r6, 0x13
ble _08082B46
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08082BB8: .4byte gUnknown_203B418
_08082BBC: .4byte 0x000135cc
thumb_func_end sub_8082B40
thumb_func_start sub_8082BC0
sub_8082BC0:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strh r1, [r2]
mov r1, sp
movs r2, 0x2
bl sub_8082FE0
mov r0, sp
movs r1, 0
ldrsh r0, [r0, r1]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082BC0
thumb_func_start sub_8082BE0
sub_8082BE0:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082BE0
thumb_func_start sub_8082BFC
sub_8082BFC:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082BFC
thumb_func_start sub_8082C18
sub_8082C18:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082C18
thumb_func_start sub_8082C34
sub_8082C34:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082C34
thumb_func_start sub_8082C50
sub_8082C50:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082C50
thumb_func_start sub_8082C6C
sub_8082C6C:
push {lr}
sub sp, 0x4
movs r1, 0
str r1, [sp]
mov r1, sp
movs r2, 0x4
bl sub_8082FE0
ldr r0, [sp]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082C6C
thumb_func_start sub_8082C84
sub_8082C84:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082C84
thumb_func_start sub_8082CA0
sub_8082CA0:
push {lr}
sub sp, 0x4
mov r2, sp
movs r1, 0
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8082CA0
thumb_func_start sub_8082CBC
sub_8082CBC:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
strh r0, [r4]
adds r1, r4, 0x2
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
movs r0, 0x7
strb r0, [r4, 0x3]
adds r4, 0x14
adds r0, r5, 0
adds r1, r4, 0
bl sub_80831F8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082CBC
thumb_func_start sub_8082CE4
sub_8082CE4:
push {r4-r6,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r5, 0
bl sub_80831DC
movs r6, 0
strb r0, [r4, 0x1]
adds r0, r5, 0
bl sub_80831DC
strb r0, [r4, 0x2]
adds r0, r5, 0
bl sub_80831DC
strb r0, [r4, 0x3]
adds r0, r5, 0
bl sub_8083158
strh r0, [r4, 0x4]
str r6, [r4, 0x8]
str r6, [r4, 0xC]
adds r4, 0x10
adds r0, r5, 0
adds r1, r4, 0
bl sub_80831F8
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8082CE4
thumb_func_start sub_8082D28
sub_8082D28:
push {lr}
movs r2, 0x3
bl sub_8082FE0
pop {r0}
bx r0
thumb_func_end sub_8082D28
thumb_func_start sub_8082D34
sub_8082D34:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082D34
thumb_func_start sub_8082D50
sub_8082D50:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x2]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x3]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082D50
thumb_func_start sub_8082D7C
sub_8082D7C:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x8]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x9]
adds r0, r4, 0
bl sub_80831A0
str r0, [r5, 0x4]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082D7C
thumb_func_start sub_8082DA8
sub_8082DA8:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082DA8
thumb_func_start sub_8082DC4
sub_8082DC4:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x2]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082DC4
thumb_func_start sub_8082DE8
sub_8082DE8:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082DE8
thumb_func_start sub_8082E04
sub_8082E04:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_80831DC
strb r0, [r5, 0x1]
adds r0, r4, 0
bl sub_80831DC
strb r0, [r5, 0x2]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x3]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x4]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082E04
thumb_func_start sub_8082E38
sub_8082E38:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_80831A0
str r0, [r5, 0x4]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x8]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x9]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0xA]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082E38
thumb_func_start sub_8082E6C
sub_8082E6C:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082E6C
thumb_func_start sub_8082E88
sub_8082E88:
push {lr}
movs r2, 0x1
bl sub_8082FE0
pop {r0}
bx r0
thumb_func_end sub_8082E88
thumb_func_start sub_8082E94
sub_8082E94:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082E94
thumb_func_start sub_8082EB0
sub_8082EB0:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082EB0
thumb_func_start sub_8082ECC
sub_8082ECC:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r2, 0x1
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082ECC
thumb_func_start sub_8082EE8
sub_8082EE8:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8083188
strb r0, [r5]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
adds r1, r5, 0x2
adds r0, r4, 0
movs r2, 0x2
bl sub_8082FE0
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x4]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x5]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082EE8
thumb_func_start sub_8082F1C
sub_8082F1C:
push {r4-r7,lr}
adds r6, r0, 0
adds r7, r1, 0
adds r4, r7, 0
movs r5, 0x3
_08082F26:
adds r0, r6, 0
adds r1, r4, 0
bl sub_8082EE8
adds r4, 0x8
subs r5, 0x1
cmp r5, 0
bge _08082F26
adds r0, r6, 0
bl sub_8083188
adds r1, r7, 0
adds r1, 0x20
strb r0, [r1]
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8082F1C
thumb_func_start sub_8082F48
sub_8082F48:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8083170
strh r0, [r5]
adds r0, r4, 0
bl sub_8083170
strh r0, [r5, 0x2]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082F48
thumb_func_start sub_8082F64
sub_8082F64:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8083188
strb r0, [r5]
adds r0, r4, 0
bl sub_8083188
strb r0, [r5, 0x1]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082F64
thumb_func_start sub_8082F80
sub_8082F80:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8083170
strh r0, [r5]
adds r0, r4, 0
bl sub_8082BFC
strb r0, [r5, 0x2]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8082F80
thumb_func_start sub_8082F9C
sub_8082F9C:
str r1, [r0]
movs r3, 0
str r3, [r0, 0x8]
adds r1, r2
str r1, [r0, 0x4]
bx lr
thumb_func_end sub_8082F9C
thumb_func_start sub_8082FA8
sub_8082FA8:
push {r4,lr}
adds r3, r0, 0
adds r4, r1, 0
cmp r2, 0
beq _08082FCC
_08082FB2:
ldr r1, [r3]
ldrb r0, [r4]
strb r0, [r1]
ldr r0, [r3]
adds r0, 0x1
str r0, [r3]
adds r4, 0x1
subs r2, 0x1
ldr r0, [r3, 0x8]
adds r0, 0x1
str r0, [r3, 0x8]
cmp r2, 0
bne _08082FB2
_08082FCC:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8082FA8
thumb_func_start sub_8082FD4
sub_8082FD4:
str r1, [r0]
movs r3, 0
str r3, [r0, 0x8]
adds r1, r2
str r1, [r0, 0x4]
bx lr
thumb_func_end sub_8082FD4
thumb_func_start sub_8082FE0
sub_8082FE0:
push {r4,lr}
adds r3, r0, 0
adds r4, r1, 0
cmp r2, 0
beq _08083002
_08082FEA:
ldr r1, [r3]
ldrb r0, [r1]
strb r0, [r4]
adds r1, 0x1
str r1, [r3]
adds r4, 0x1
subs r2, 0x1
ldr r0, [r3, 0x8]
adds r0, 0x1
str r0, [r3, 0x8]
cmp r2, 0
bne _08082FEA
_08083002:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8082FE0
thumb_func_start nullsub_98
nullsub_98:
bx lr
thumb_func_end nullsub_98
thumb_func_start sub_808300C
sub_808300C:
push {lr}
movs r2, 0x8
bl sub_8082FA8
pop {r0}
bx r0
thumb_func_end sub_808300C
thumb_func_start sub_8083018
sub_8083018:
push {lr}
sub sp, 0xC
mov r1, sp
movs r2, 0x8
bl sub_8082FE0
mov r1, sp
movs r0, 0
strb r0, [r1, 0x8]
add sp, 0xC
pop {r0}
bx r0
thumb_func_end sub_8083018
thumb_func_start sub_8083030
sub_8083030:
push {lr}
sub sp, 0x4
mov r2, sp
strh r1, [r2]
mov r1, sp
movs r2, 0x2
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8083030
thumb_func_start sub_8083048
sub_8083048:
push {lr}
sub sp, 0x4
mov r2, sp
strh r1, [r2]
mov r1, sp
movs r2, 0x2
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8083048
thumb_func_start sub_8083060
sub_8083060:
push {lr}
sub sp, 0x4
mov r2, sp
strb r1, [r2]
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8083060
thumb_func_start sub_8083078
sub_8083078:
push {lr}
sub sp, 0x4
str r1, [sp]
mov r1, sp
movs r2, 0x4
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_8083078
thumb_func_start sub_808308C
sub_808308C:
push {lr}
sub sp, 0x4
str r1, [sp]
mov r1, sp
movs r2, 0x4
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_808308C
thumb_func_start sub_80830A0
sub_80830A0:
push {lr}
sub sp, 0x4
str r1, [sp]
mov r1, sp
movs r2, 0x4
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_80830A0
thumb_func_start sub_80830B4
sub_80830B4:
push {lr}
sub sp, 0x4
adds r3, r0, 0
lsls r1, 24
movs r2, 0
cmp r1, 0
beq _080830C4
movs r2, 0xFF
_080830C4:
mov r0, sp
strb r2, [r0]
adds r0, r3, 0
mov r1, sp
movs r2, 0x1
bl sub_8082FA8
add sp, 0x4
pop {r0}
bx r0
thumb_func_end sub_80830B4
thumb_func_start sub_80830D8
sub_80830D8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0x2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80830D8
thumb_func_start sub_80830F8
sub_80830F8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0x4
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r1, r4, 0
adds r1, 0x8
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0xC
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80830F8
thumb_func_start sub_808312C
sub_808312C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r2, 0x1
bl sub_8082FA8
adds r4, 0x2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FA8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808312C
thumb_func_start sub_808314C
sub_808314C:
push {lr}
bl sub_8082FA8
pop {r0}
bx r0
thumb_func_end sub_808314C
thumb_func_start sub_8083158
sub_8083158:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x2
bl sub_8082FE0
mov r0, sp
ldrh r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8083158
thumb_func_start sub_8083170
sub_8083170:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x2
bl sub_8082FE0
mov r0, sp
movs r1, 0
ldrsh r0, [r0, r1]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8083170
thumb_func_start sub_8083188
sub_8083188:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r0, [r0]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_8083188
thumb_func_start sub_80831A0
sub_80831A0:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x4
bl sub_8082FE0
ldr r0, [sp]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_80831A0
thumb_func_start sub_80831B4
sub_80831B4:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x4
bl sub_8082FE0
ldr r0, [sp]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_80831B4
thumb_func_start sub_80831C8
sub_80831C8:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x4
bl sub_8082FE0
ldr r0, [sp]
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_80831C8
thumb_func_start sub_80831DC
sub_80831DC:
push {lr}
sub sp, 0x4
mov r1, sp
movs r2, 0x1
bl sub_8082FE0
mov r0, sp
ldrb r1, [r0]
negs r0, r1
orrs r0, r1
lsrs r0, 31
add sp, 0x4
pop {r1}
bx r1
thumb_func_end sub_80831DC
thumb_func_start sub_80831F8
sub_80831F8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
strh r0, [r4]
strh r0, [r4, 0x2]
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r4, 0x2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FE0
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80831F8
thumb_func_start sub_8083220
sub_8083220:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
str r0, [r4]
str r0, [r4, 0x4]
str r0, [r4, 0x8]
str r0, [r4, 0xC]
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r1, r4, 0x4
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r1, r4, 0
adds r1, 0x8
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r4, 0xC
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FE0
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8083220
thumb_func_start sub_8083260
sub_8083260:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r0, 0
strh r0, [r4]
strh r0, [r4, 0x2]
adds r0, r5, 0
movs r2, 0x1
bl sub_8082FE0
adds r4, 0x2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8082FE0
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8083260
thumb_func_start sub_8083288
sub_8083288:
push {lr}
bl sub_8082FE0
pop {r0}
bx r0
thumb_func_end sub_8083288
thumb_func_start sub_8083294
sub_8083294:
push {r4-r7,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r7, _080832E8
ldr r0, [r7]
ldr r1, _080832EC
adds r0, r1
ldrb r5, [r0]
cmp r5, 0
bne _080832AA
movs r5, 0x2
_080832AA:
movs r2, 0
ldrsh r0, [r4, r2]
movs r3, 0x2
ldrsh r1, [r4, r3]
bl sub_804954C
ldrb r1, [r0, 0x9]
cmp r1, 0xFF
bne _080832F0
movs r0, 0
ldrsh r1, [r4, r0]
movs r2, 0
ldrsh r0, [r6, r2]
subs r1, r0
cmp r1, 0
bge _080832CC
negs r1, r1
_080832CC:
cmp r1, r5
bgt _0808332E
movs r3, 0x2
ldrsh r1, [r4, r3]
movs r4, 0x2
ldrsh r0, [r6, r4]
subs r0, r1, r0
cmp r0, 0
bge _080832E0
negs r0, r0
_080832E0:
cmp r0, r5
bgt _0808332E
_080832E4:
movs r0, 0x1
b _08083330
.align 2, 0
_080832E8: .4byte gUnknown_203B418
_080832EC: .4byte 0x00018209
_080832F0:
lsls r0, r1, 3
subs r0, r1
lsls r0, 2
ldr r1, _08083338
adds r0, r1
ldr r1, [r7]
adds r1, r0
movs r2, 0x2
ldrsh r0, [r1, r2]
subs r0, 0x1
movs r4, 0
ldrsh r3, [r6, r4]
cmp r0, r3
bgt _0808332E
movs r2, 0x4
ldrsh r0, [r1, r2]
subs r0, 0x1
movs r4, 0x2
ldrsh r2, [r6, r4]
cmp r0, r2
bgt _0808332E
movs r4, 0x6
ldrsh r0, [r1, r4]
adds r0, 0x1
cmp r0, r3
ble _0808332E
movs r3, 0x8
ldrsh r0, [r1, r3]
adds r0, 0x1
cmp r0, r2
bgt _080832E4
_0808332E:
movs r0, 0
_08083330:
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08083338: .4byte 0x000104c4
thumb_func_end sub_8083294
thumb_func_start sub_808333C
sub_808333C:
push {r4-r6,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r1, 0
ldrsh r0, [r4, r1]
movs r2, 0x2
ldrsh r1, [r4, r2]
bl sub_804954C
ldrb r2, [r0, 0x9]
cmp r2, 0xFF
beq _08083394
ldr r1, _080833C4
lsls r0, r2, 3
subs r0, r2
lsls r0, 2
ldr r3, _080833C8
adds r0, r3
ldr r1, [r1]
adds r1, r0
movs r6, 0x2
ldrsh r0, [r1, r6]
subs r0, 0x1
movs r2, 0
ldrsh r3, [r5, r2]
cmp r0, r3
bgt _08083394
movs r6, 0x4
ldrsh r0, [r1, r6]
subs r0, 0x1
movs r6, 0x2
ldrsh r2, [r5, r6]
cmp r0, r2
bgt _08083394
movs r6, 0x6
ldrsh r0, [r1, r6]
adds r0, 0x1
cmp r0, r3
ble _08083394
movs r3, 0x8
ldrsh r0, [r1, r3]
adds r0, 0x1
cmp r0, r2
bgt _080833DE
_08083394:
movs r6, 0
ldrsh r3, [r4, r6]
movs r0, 0
ldrsh r2, [r5, r0]
movs r6, 0x2
ldrsh r1, [r4, r6]
movs r6, 0x2
ldrsh r0, [r5, r6]
subs r1, r0
subs r3, r2
cmp r3, 0
bge _080833AE
negs r3, r3
_080833AE:
cmp r1, 0
bge _080833B4
negs r1, r1
_080833B4:
cmp r1, r3
bge _080833BA
adds r1, r3, 0
_080833BA:
cmp r1, 0x2
ble _080833CC
_080833BE:
movs r0, 0
b _080833E0
.align 2, 0
_080833C4: .4byte gUnknown_203B418
_080833C8: .4byte 0x000104c4
_080833CC:
cmp r1, 0x2
bne _080833DE
adds r0, r4, 0
adds r1, r5, 0
bl sub_8083478
lsls r0, 24
cmp r0, 0
beq _080833BE
_080833DE:
movs r0, 0x1
_080833E0:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_808333C
thumb_func_start sub_80833E8
sub_80833E8:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
movs r1, 0
ldrsh r0, [r5, r1]
movs r2, 0x2
ldrsh r1, [r5, r2]
bl sub_804954C
adds r1, r0, 0
ldr r0, _08083438
ldr r3, [r0]
ldr r2, _0808343C
adds r0, r3, r2
ldrb r2, [r0]
cmp r2, 0
bne _0808340C
movs r2, 0x2
_0808340C:
ldrb r0, [r1, 0x9]
cmp r0, 0xFF
bne _08083440
movs r1, 0
ldrsh r0, [r5, r1]
subs r0, r2
str r0, [r4]
movs r1, 0
ldrsh r0, [r5, r1]
adds r0, r2
adds r0, 0x1
str r0, [r4, 0x8]
movs r1, 0x2
ldrsh r0, [r5, r1]
subs r0, r2
str r0, [r4, 0x4]
movs r1, 0x2
ldrsh r0, [r5, r1]
adds r0, r2
adds r0, 0x1
b _0808346A
.align 2, 0
_08083438: .4byte gUnknown_203B418
_0808343C: .4byte 0x00018209
_08083440:
lsls r1, r0, 3
subs r1, r0
lsls r1, 2
ldr r2, _08083474
adds r1, r2
adds r1, r3, r1
movs r2, 0x2
ldrsh r0, [r1, r2]
subs r0, 0x1
str r0, [r4]
movs r2, 0x6
ldrsh r0, [r1, r2]
adds r0, 0x2
str r0, [r4, 0x8]
movs r2, 0x4
ldrsh r0, [r1, r2]
subs r0, 0x1
str r0, [r4, 0x4]
movs r2, 0x8
ldrsh r0, [r1, r2]
adds r0, 0x2
_0808346A:
str r0, [r4, 0xC]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08083474: .4byte 0x000104c4
thumb_func_end sub_80833E8
thumb_func_start sub_8083478
sub_8083478:
push {r4-r7,lr}
sub sp, 0x4
adds r3, r0, 0
adds r6, r1, 0
movs r0, 0
ldrsh r1, [r3, r0]
movs r2, 0
ldrsh r0, [r6, r2]
subs r1, r0
cmp r1, 0
bge _08083490
negs r1, r1
_08083490:
cmp r1, 0x1
bgt _080834A8
movs r5, 0x2
ldrsh r1, [r3, r5]
movs r2, 0x2
ldrsh r0, [r6, r2]
subs r1, r0
cmp r1, 0
bge _080834A4
negs r1, r1
_080834A4:
cmp r1, 0x1
ble _0808355A
_080834A8:
movs r5, 0
ldrsh r4, [r3, r5]
movs r1, 0
ldrsh r0, [r6, r1]
subs r2, r4, r0
cmp r2, 0
bge _080834B8
negs r2, r2
_080834B8:
movs r5, 0x2
ldrsh r1, [r3, r5]
movs r5, 0x2
ldrsh r0, [r6, r5]
subs r0, r1, r0
cmp r0, 0
bge _080834C8
negs r0, r0
_080834C8:
cmp r0, r2
bge _080834CE
adds r0, r2, 0
_080834CE:
cmp r0, 0x2
bne _0808355E
adds r5, r4, 0
adds r4, r1, 0
movs r7, 0
_080834D8:
movs r1, 0
ldrsh r0, [r6, r1]
cmp r5, r0
bge _080834E2
adds r5, 0x1
_080834E2:
cmp r5, r0
ble _080834E8
subs r5, 0x1
_080834E8:
movs r2, 0x2
ldrsh r0, [r6, r2]
cmp r4, r0
bge _080834F2
adds r4, 0x1
_080834F2:
cmp r4, r0
ble _080834F8
subs r4, 0x1
_080834F8:
adds r0, r5, 0
adds r1, r4, 0
str r3, [sp]
bl sub_804954C
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
ldr r3, [sp]
cmp r0, 0
beq _0808355E
adds r7, 0x1
cmp r7, 0x1
ble _080834D8
movs r0, 0
ldrsh r5, [r6, r0]
movs r1, 0x2
ldrsh r4, [r6, r1]
movs r7, 0
_0808351E:
movs r2, 0
ldrsh r0, [r3, r2]
cmp r5, r0
bge _08083528
adds r5, 0x1
_08083528:
cmp r5, r0
ble _0808352E
subs r5, 0x1
_0808352E:
movs r1, 0x2
ldrsh r0, [r3, r1]
cmp r4, r0
bge _08083538
adds r4, 0x1
_08083538:
cmp r4, r0
ble _0808353E
subs r4, 0x1
_0808353E:
adds r0, r5, 0
adds r1, r4, 0
str r3, [sp]
bl sub_804954C
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
ldr r3, [sp]
cmp r0, 0
beq _0808355E
adds r7, 0x1
cmp r7, 0x1
ble _0808351E
_0808355A:
movs r0, 0x1
b _08083560
_0808355E:
movs r0, 0
_08083560:
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8083478
thumb_func_start sub_8083568
sub_8083568:
push {r4,r5,lr}
lsls r2, 24
lsrs r5, r2, 24
ldr r2, _080835E0
ldr r2, [r2]
ldr r4, _080835E4
adds r3, r2, r4
movs r4, 0
ldrsh r3, [r3, r4]
subs r3, r0, r3
ldr r0, _080835E8
adds r2, r0
movs r4, 0
ldrsh r0, [r2, r4]
subs r4, r1, r0
movs r0, 0x10
negs r0, r0
cmp r3, r0
blt _080835F8
cmp r4, r0
blt _080835F8
cmp r3, 0xFF
bgt _080835F8
cmp r4, 0xAF
bgt _080835F8
ldr r1, _080835EC
lsls r0, r5, 1
adds r0, r5
lsls r0, 2
adds r0, r1
movs r1, 0x8
ldrsh r2, [r0, r1]
adds r2, r3, r2
ldr r1, _080835F0
ands r2, r1
ldrh r3, [r0, 0x2]
movs r1, 0xFE
lsls r1, 8
ands r1, r3
orrs r1, r2
strh r1, [r0, 0x2]
movs r1, 0xA
ldrsh r2, [r0, r1]
adds r2, r4, r2
ldr r1, _080835F4
ands r2, r1
lsls r2, 4
ldrh r3, [r0, 0x6]
movs r1, 0xF
ands r1, r3
orrs r1, r2
strh r1, [r0, 0x6]
movs r1, 0
movs r2, 0
movs r3, 0
bl AddSprite
movs r0, 0x1
b _080835FA
.align 2, 0
_080835E0: .4byte gUnknown_203B418
_080835E4: .4byte 0x000181f0
_080835E8: .4byte 0x000181f2
_080835EC: .4byte gUnknown_202ED28
_080835F0: .4byte 0x000001ff
_080835F4: .4byte 0x00000fff
_080835F8:
movs r0, 0
_080835FA:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8083568
thumb_func_start sub_8083600
sub_8083600:
push {r4,r5,lr}
ldr r0, _08083638
ldr r0, [r0]
cmp r0, 0
bne _0808364A
movs r5, 0
_0808360C:
ldr r0, _0808363C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08083640
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0808362E
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
bne _08083644
_0808362E:
adds r5, 0x1
cmp r5, 0x3
ble _0808360C
movs r0, 0
b _0808364A
.align 2, 0
_08083638: .4byte gUnknown_203B450
_0808363C: .4byte gUnknown_203B418
_08083640: .4byte 0x0001357c
_08083644:
ldr r0, _08083650
str r4, [r0]
adds r0, r4, 0
_0808364A:
pop {r4,r5}
pop {r1}
bx r1
.align 2, 0
_08083650: .4byte gUnknown_203B450
thumb_func_end sub_8083600
thumb_func_start sub_8083654
sub_8083654:
push {lr}
bl sub_8083600
ldr r0, [r0, 0x70]
pop {r1}
bx r1
thumb_func_end sub_8083654
thumb_func_start sub_8083660
sub_8083660:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
ldr r4, _080836D4
add sp, r4
movs r1, 0xE0
lsls r1, 5
add r1, sp
str r0, [r1]
bl sub_8083600
ldr r2, _080836D8
add r2, sp
str r0, [r2]
movs r7, 0
movs r0, 0
ldr r1, _080836DC
add r1, sp
str r0, [r1]
_0808368A:
movs r0, 0x38
bl sub_8084100
adds r4, r0, 0
movs r0, 0x20
bl sub_8084100
ldr r2, _080836E0
add r2, sp
str r0, [r2]
ldr r0, _080836D8
add r0, sp
ldr r0, [r0]
ldr r3, [r0, 0x4]
adds r5, r4, 0
movs r1, 0
ldr r4, [r2]
ldr r0, _080836E4
cmp r7, r0
ble _080836B4
b _080837E6
_080836B4:
movs r2, 0x3
mov r10, r2
lsls r0, r7, 2
mov r2, sp
adds r6, r0, r2
_080836BE:
movs r0, 0
mov r8, r0
adds r2, r5, 0x1
ldr r0, _080836E8
add r0, sp
str r2, [r0]
adds r1, 0x1
ldr r2, _080836EC
add r2, sp
str r1, [r2]
b _0808379C
.align 2, 0
_080836D4: .4byte 0xffffe3e4
_080836D8: .4byte 0x00001c04
_080836DC: .4byte 0x00001c0c
_080836E0: .4byte 0x00001c08
_080836E4: .4byte 0x000006ff
_080836E8: .4byte 0x00001c14
_080836EC: .4byte 0x00001c10
_080836F0:
ldr r0, _08083738
add r0, sp
ldr r0, [r0]
cmp r0, 0
bne _0808373C
ldrh r1, [r2]
mov r0, r10
ands r0, r1
cmp r0, 0x1
bne _08083782
ldrb r0, [r2, 0x9]
cmp r0, 0xFF
beq _08083782
ldr r0, [r2, 0x14]
cmp r0, 0
bne _08083782
ldr r0, [r2, 0x10]
cmp r0, 0
bne _08083782
lsls r0, r3, 16
asrs r0, 16
subs r0, r5
cmp r0, 0
bge _08083722
negs r0, r0
_08083722:
cmp r0, 0x5
bgt _08083788
asrs r0, r3, 16
subs r0, r4
cmp r0, 0
bge _08083730
negs r0, r0
_08083730:
cmp r0, 0x5
ble _08083782
b _08083788
.align 2, 0
_08083738: .4byte 0x00001c0c
_0808373C:
ldr r1, _08083764
add r1, sp
ldr r1, [r1]
cmp r1, 0x1
bne _08083768
ldrh r1, [r2]
mov r0, r10
ands r0, r1
cmp r0, 0x1
bne _08083782
ldrb r0, [r2, 0x9]
cmp r0, 0xFF
beq _08083782
ldr r0, [r2, 0x14]
cmp r0, 0
bne _08083782
ldr r0, [r2, 0x10]
cmp r0, 0
bne _08083782
b _08083788
.align 2, 0
_08083764: .4byte 0x00001c0c
_08083768:
ldrh r1, [r2]
mov r0, r10
ands r0, r1
cmp r0, 0x1
bne _08083782
ldr r0, [r2, 0x14]
cmp r0, 0
bne _08083782
ldr r0, [r2, 0x10]
cmp r0, 0
bne _08083782
movs r2, 0x1
mov r9, r2
_08083782:
mov r0, r9
cmp r0, 0
beq _08083790
_08083788:
strb r5, [r6]
strb r4, [r6, 0x1]
adds r6, 0x4
adds r7, 0x1
_08083790:
adds r4, 0x1
cmp r4, 0x1F
ble _08083798
movs r4, 0
_08083798:
movs r1, 0x1
add r8, r1
_0808379C:
mov r2, r8
cmp r2, 0x1F
bgt _080837C2
movs r0, 0
mov r9, r0
adds r0, r5, 0
adds r1, r4, 0
ldr r2, _0808380C
add r2, sp
str r3, [r2]
bl sub_804954C
adds r2, r0, 0
ldr r0, _08083810
ldr r1, _0808380C
add r1, sp
ldr r3, [r1]
cmp r7, r0
ble _080836F0
_080837C2:
ldr r2, _08083814
add r2, sp
ldr r5, [r2]
cmp r5, 0x37
ble _080837CE
movs r5, 0
_080837CE:
ldr r0, _08083818
add r0, sp
ldr r1, [r0]
cmp r1, 0x37
bgt _080837E6
ldr r2, _0808381C
add r2, sp
ldr r4, [r2]
ldr r0, _08083810
cmp r7, r0
bgt _080837E6
b _080836BE
_080837E6:
cmp r7, 0
beq _08083820
adds r0, r7, 0
bl sub_8084100
lsls r0, 2
mov r2, sp
adds r1, r2, r0
ldrb r0, [r1]
movs r2, 0xE0
lsls r2, 5
add r2, sp
ldr r2, [r2]
strh r0, [r2]
ldrb r0, [r1, 0x1]
strh r0, [r2, 0x2]
movs r0, 0x1
b _08083832
.align 2, 0
_0808380C: .4byte 0x00001c18
_08083810: .4byte 0x000006ff
_08083814: .4byte 0x00001c14
_08083818: .4byte 0x00001c10
_0808381C: .4byte 0x00001c08
_08083820:
ldr r0, _08083844
add r0, sp
ldr r2, [r0]
adds r2, 0x1
str r2, [r0]
cmp r2, 0x2
bgt _08083830
b _0808368A
_08083830:
movs r0, 0
_08083832:
ldr r3, _08083848
add sp, r3
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08083844: .4byte 0x00001c0c
_08083848: .4byte 0x00001c1c
thumb_func_end sub_8083660
thumb_func_start sub_808384C
sub_808384C:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r3, r0, 0
mov r9, r1
movs r0, 0
mov r8, r0
ldr r0, _080838BC
movs r2, 0
ldrsh r1, [r0, r2]
cmp r1, 0x63
beq _080838D8
movs r6, 0
_0808386A:
adds r2, r6, r0
movs r4, 0
ldrsh r1, [r2, r4]
mov r5, r9
movs r7, 0
ldrsh r0, [r5, r7]
adds r5, r1, r0
movs r0, 0x2
ldrsh r1, [r2, r0]
mov r2, r9
movs r4, 0x2
ldrsh r0, [r2, r4]
adds r4, r1, r0
adds r0, r5, 0
adds r1, r4, 0
str r3, [sp]
bl sub_804954C
adds r1, r0, 0
ldrh r2, [r1]
movs r7, 0x80
lsls r7, 4
adds r0, r7, 0
ands r0, r2
ldr r3, [sp]
cmp r0, 0
bne _080838C0
movs r0, 0x3
ands r0, r2
cmp r0, 0x1
bne _080838C0
ldr r0, [r1, 0x14]
cmp r0, 0
bne _080838C0
ldr r0, [r1, 0x10]
cmp r0, 0
bne _080838C0
strh r5, [r3]
strh r4, [r3, 0x2]
movs r0, 0x1
b _080838DA
.align 2, 0
_080838BC: .4byte gUnknown_80F4468
_080838C0:
adds r6, 0x4
movs r0, 0x1
add r8, r0
mov r2, r8
cmp r2, 0x18
bgt _080838D8
ldr r0, _080838E8
adds r1, r6, r0
movs r4, 0
ldrsh r1, [r1, r4]
cmp r1, 0x63
bne _0808386A
_080838D8:
movs r0, 0
_080838DA:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080838E8: .4byte gUnknown_80F4468
thumb_func_end sub_808384C
thumb_func_start sub_80838EC
sub_80838EC:
push {lr}
adds r2, r0, 0
ldrb r0, [r2]
adds r1, r0, 0
cmp r1, 0x7F
beq _08083900
cmp r1, 0
beq _08083900
subs r0, 0x1
strb r0, [r2]
_08083900:
pop {r0}
bx r0
thumb_func_end sub_80838EC
thumb_func_start sub_8083904
sub_8083904:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
str r0, [sp]
mov r10, r1
ldr r4, [r1, 0x70]
str r4, [sp, 0x4]
adds r5, r4, 0
adds r5, 0x46
ldrb r6, [r5]
mov r0, r10
movs r1, 0x1
bl sub_8070B6C
lsls r0, 24
cmp r0, 0
beq _08083954
ldr r0, _08083950
lsls r2, r6, 2
adds r2, r0
movs r0, 0
ldrsh r1, [r2, r0]
lsls r0, r1, 1
adds r0, r1
mov r1, r10
ldrh r1, [r1, 0x4]
adds r0, r1
ldr r3, [sp]
strh r0, [r3]
movs r4, 0x2
ldrsh r1, [r2, r4]
lsls r0, r1, 1
adds r0, r1
b _08083A6E
.align 2, 0
_08083950: .4byte gUnknown_80F4448
_08083954:
ldr r1, [r4, 0x58]
movs r0, 0x1
negs r0, r0
cmp r1, r0
beq _08083960
b _08083A8C
_08083960:
ldrb r0, [r5]
ldr r1, _080839A0
lsls r0, 3
adds r0, r1
ldr r7, [r0]
movs r3, 0x4
ldrsh r2, [r0, r3]
str r2, [sp, 0x8]
movs r2, 0x6
ldrsh r1, [r0, r2]
str r1, [sp, 0xC]
mov r3, r10
movs r0, 0x4
ldrsh r3, [r3, r0]
str r3, [sp, 0x10]
mov r1, r10
movs r2, 0x6
ldrsh r1, [r1, r2]
str r1, [sp, 0x14]
ldr r0, _080839A4
ldr r1, [r0]
ldr r3, _080839A8
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, 0
beq _080839B0
ldr r4, _080839AC
adds r4, r1, r4
str r4, [sp, 0x18]
movs r0, 0x14
b _080839D0
.align 2, 0
_080839A0: .4byte gUnknown_80F4CC4
_080839A4: .4byte gUnknown_203B418
_080839A8: .4byte 0x000037fc
_080839AC: .4byte 0x000135cc
_080839B0:
ldrb r0, [r4, 0x6]
cmp r0, 0
bne _080839C8
ldr r2, _080839C4
adds r2, r1, r2
str r2, [sp, 0x18]
movs r3, 0x10
str r3, [sp, 0x1C]
b _080839D2
.align 2, 0
_080839C4: .4byte 0x0001358c
_080839C8:
ldr r4, _08083A78
adds r4, r1, r4
str r4, [sp, 0x18]
movs r0, 0x4
_080839D0:
str r0, [sp, 0x1C]
_080839D2:
movs r1, 0
ldrsh r0, [r7, r1]
cmp r0, 0x63
beq _08083A46
_080839DA:
movs r2, 0
ldrsh r0, [r7, r2]
ldr r3, [sp, 0x8]
muls r0, r3
ldr r4, [sp, 0x10]
adds r4, r0
mov r9, r4
movs r1, 0x2
ldrsh r0, [r7, r1]
ldr r2, [sp, 0xC]
muls r0, r2
ldr r3, [sp, 0x14]
adds r3, r0
mov r8, r3
movs r6, 0
ldr r4, [sp, 0x1C]
cmp r6, r4
bge _08083A3C
ldr r5, [sp, 0x18]
_08083A00:
ldr r4, [r5]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08083A32
movs r1, 0x4
ldrsh r0, [r4, r1]
cmp r0, r9
bne _08083A32
movs r2, 0x6
ldrsh r0, [r4, r2]
cmp r0, r8
bne _08083A32
mov r0, r10
adds r1, r4, 0
movs r2, 0
movs r3, 0
bl sub_8071598
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _08083A80
_08083A32:
adds r5, 0x4
adds r6, 0x1
ldr r3, [sp, 0x1C]
cmp r6, r3
blt _08083A00
_08083A3C:
adds r7, 0x4
movs r4, 0
ldrsh r0, [r7, r4]
cmp r0, 0x63
bne _080839DA
_08083A46:
ldr r2, _08083A7C
ldr r1, [sp, 0x4]
adds r1, 0x46
ldrb r0, [r1]
lsls r0, 2
adds r0, r2
movs r3, 0
ldrsh r0, [r0, r3]
lsls r0, 1
mov r4, r10
ldrh r4, [r4, 0x4]
adds r0, r4
ldr r3, [sp]
strh r0, [r3]
ldrb r0, [r1]
lsls r0, 2
adds r0, r2
movs r4, 0x2
ldrsh r0, [r0, r4]
lsls r0, 1
_08083A6E:
mov r1, r10
ldrh r1, [r1, 0x6]
adds r0, r1
strh r0, [r3, 0x2]
b _08083A9E
.align 2, 0
_08083A78: .4byte 0x0001357c
_08083A7C: .4byte gUnknown_80F4448
_08083A80:
mov r3, r9
ldr r2, [sp]
strh r3, [r2]
mov r4, r8
strh r4, [r2, 0x2]
b _08083A9E
_08083A8C:
ldr r0, [sp, 0x4]
adds r0, 0x58
ldrh r0, [r0]
ldr r1, [sp]
strh r0, [r1]
ldr r0, [sp, 0x4]
adds r0, 0x5A
ldrh r0, [r0]
strh r0, [r1, 0x2]
_08083A9E:
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8083904
thumb_func_start sub_8083AB0
sub_8083AB0:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x14
adds r5, r1, 0
adds r7, r2, 0
lsls r0, 16
asrs r0, 16
mov r8, r0
ldr r0, _08083AFC
ldr r0, [r0]
ldr r1, _08083B00
adds r4, r0, r1
movs r6, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08083AE4
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _08083AE4
ldr r6, [r5, 0x70]
_08083AE4:
ldr r5, [r7, 0x70]
cmp r6, 0
beq _08083B04
mov r0, sp
adds r1, r6, 0
bl sub_80709C8
adds r0, r4, 0
mov r1, sp
bl sub_80922F4
b _08083B0E
.align 2, 0
_08083AFC: .4byte gUnknown_203B418
_08083B00: .4byte 0x0001ce98
_08083B04:
ldr r0, _08083C04
ldr r1, [r0]
adds r0, r4, 0
bl sub_80922F4
_08083B0E:
mov r0, sp
adds r1, r5, 0
bl sub_80709C8
adds r0, r4, 0
adds r0, 0xA
mov r1, sp
bl sub_80922F4
movs r2, 0
mov r3, r8
strh r3, [r4, 0x14]
ldr r0, [r5, 0x60]
str r0, [r4, 0x1C]
ldr r0, [r5, 0x18]
str r0, [r4, 0x20]
ldrb r0, [r5, 0x9]
adds r1, r4, 0
adds r1, 0x2A
strb r0, [r1]
ldrh r0, [r5, 0x10]
strh r0, [r4, 0x24]
ldrb r0, [r5, 0x14]
subs r1, 0x4
strb r0, [r1]
ldrb r0, [r5, 0x15]
adds r1, 0x1
strb r0, [r1]
ldrb r1, [r5, 0x16]
adds r0, r4, 0
adds r0, 0x28
strb r1, [r0]
ldrb r0, [r5, 0x17]
adds r1, r4, 0
adds r1, 0x29
strb r0, [r1]
ldr r0, _08083C08
ldr r0, [r0]
ldr r1, _08083C0C
adds r0, r1
ldr r0, [r0]
str r0, [r4, 0x18]
adds r3, r4, 0
adds r3, 0x2B
strb r2, [r3]
adds r6, r4, 0
adds r6, 0x2C
strb r2, [r6]
movs r0, 0x2D
adds r0, r4
mov r12, r0
strb r2, [r0]
adds r4, 0x2E
strb r2, [r4]
adds r0, r5, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08083BF8
movs r0, 0x8
ands r0, r1
cmp r0, 0
bne _08083BF8
adds r1, r5, 0
adds r1, 0x62
ldrb r0, [r1]
cmp r0, 0x13
bne _08083BA4
ldr r0, _08083C10
ldrb r0, [r0]
ldrb r2, [r3]
adds r0, r2
strb r0, [r3]
_08083BA4:
ldrb r0, [r1]
cmp r0, 0x2B
bne _08083BB4
ldr r0, _08083C14
ldrb r0, [r0]
ldrb r2, [r3]
adds r0, r2
strb r0, [r3]
_08083BB4:
ldrb r0, [r1]
cmp r0, 0x21
bne _08083BC4
ldr r0, _08083C18
ldrb r0, [r0]
ldrb r3, [r6]
adds r0, r3
strb r0, [r6]
_08083BC4:
ldrb r0, [r1]
cmp r0, 0x2B
bne _08083BD4
ldr r0, _08083C14
ldrb r0, [r0]
ldrb r2, [r6]
adds r0, r2
strb r0, [r6]
_08083BD4:
ldrb r0, [r1]
cmp r0, 0x1E
bne _08083BE8
ldr r0, _08083C1C
ldrb r0, [r0]
mov r3, r12
ldrb r3, [r3]
adds r0, r3
mov r2, r12
strb r0, [r2]
_08083BE8:
ldrb r0, [r1]
cmp r0, 0x22
bne _08083BF8
ldr r0, _08083C20
ldrb r0, [r0]
ldrb r3, [r4]
adds r0, r3
strb r0, [r4]
_08083BF8:
add sp, 0x14
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08083C04: .4byte gUnknown_80FE6F4
_08083C08: .4byte gUnknown_203B418
_08083C0C: .4byte 0x00000644
_08083C10: .4byte gUnknown_810AC60
_08083C14: .4byte gUnknown_810AC68
_08083C18: .4byte gUnknown_810AC62
_08083C1C: .4byte gUnknown_810AC64
_08083C20: .4byte gUnknown_810AC66
thumb_func_end sub_8083AB0
thumb_func_start sub_8083C24
sub_8083C24:
push {lr}
ldr r0, _08083C3C
ldr r0, [r0]
ldr r1, _08083C40
adds r0, r1
movs r2, 0x14
ldrsh r1, [r0, r2]
ldr r0, _08083C44
cmp r1, r0
ble _08083C48
movs r0, 0
b _08083C4A
.align 2, 0
_08083C3C: .4byte gUnknown_203B418
_08083C40: .4byte 0x0001ce98
_08083C44: .4byte 0x00000225
_08083C48:
movs r0, 0x1
_08083C4A:
pop {r1}
bx r1
thumb_func_end sub_8083C24
thumb_func_start sub_8083C50
sub_8083C50:
push {lr}
ldr r0, _08083C74
ldr r0, [r0]
ldr r1, _08083C78
adds r0, r1
movs r2, 0x14
ldrsh r1, [r0, r2]
ldr r0, _08083C7C
cmp r1, r0
beq _08083C70
adds r0, 0x3
cmp r1, r0
beq _08083C70
subs r0, 0x2
cmp r1, r0
bne _08083C80
_08083C70:
movs r0, 0x1
b _08083C82
.align 2, 0
_08083C74: .4byte gUnknown_203B418
_08083C78: .4byte 0x0001ce98
_08083C7C: .4byte 0x00000227
_08083C80:
movs r0, 0
_08083C82:
pop {r1}
bx r1
thumb_func_end sub_8083C50
thumb_func_start sub_8083C88
sub_8083C88:
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r4, _08083CC4
ldr r0, [r4]
ldr r1, _08083CC8
adds r5, r0, r1
ldr r1, _08083CCC
adds r0, r1
ldrb r0, [r0]
bl GetUnk9
lsls r0, 24
cmp r0, 0
bne _08083CB6
ldr r0, [r4]
ldr r1, _08083CD0
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _08083CC0
cmp r6, 0
bne _08083CC0
_08083CB6:
movs r0, 0x14
ldrsh r1, [r5, r0]
ldr r0, _08083CD4
cmp r1, r0
beq _08083CD8
_08083CC0:
movs r0, 0x1
b _08083CDA
.align 2, 0
_08083CC4: .4byte gUnknown_203B418
_08083CC8: .4byte 0x0001ce98
_08083CCC: .4byte 0x00000644
_08083CD0: .4byte 0x0000065c
_08083CD4: .4byte 0x00000227
_08083CD8:
movs r0, 0
_08083CDA:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8083C88
thumb_func_start sub_8083CE0
sub_8083CE0:
push {lr}
lsls r0, 24
cmp r0, 0
beq _08083CF2
ldr r0, _08083D00
movs r1, 0x1A
ldrsh r0, [r0, r1]
cmp r0, 0x1
ble _08083CFC
_08083CF2:
ldr r0, _08083D04
movs r1, 0x80
lsls r1, 1
bl sub_800C074
_08083CFC:
pop {r0}
bx r0
.align 2, 0
_08083D00: .4byte gUnknown_202EE10
_08083D04: .4byte 0x0000012d
thumb_func_end sub_8083CE0
thumb_func_start sub_8083D08
sub_8083D08:
push {lr}
movs r0, 0x97
lsls r0, 1
movs r1, 0x80
lsls r1, 1
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D08
thumb_func_start sub_8083D1C
sub_8083D1C:
push {lr}
ldr r0, _08083D2C
movs r1, 0x80
lsls r1, 1
bl sub_800C074
pop {r0}
bx r0
.align 2, 0
_08083D2C: .4byte 0x00000133
thumb_func_end sub_8083D1C
thumb_func_start sub_8083D30
sub_8083D30:
push {lr}
ldr r0, _08083D40
movs r1, 0x80
lsls r1, 1
bl sub_800C074
pop {r0}
bx r0
.align 2, 0
_08083D40: .4byte 0x0000012f
thumb_func_end sub_8083D30
thumb_func_start sub_8083D44
sub_8083D44:
push {lr}
movs r0, 0x98
lsls r0, 1
movs r1, 0x80
lsls r1, 1
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D44
thumb_func_start sub_8083D58
sub_8083D58:
push {lr}
movs r1, 0x80
lsls r1, 1
movs r0, 0xC8
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D58
thumb_func_start sub_8083D68
sub_8083D68:
push {lr}
movs r1, 0x80
lsls r1, 1
movs r0, 0xCF
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D68
thumb_func_start sub_8083D78
sub_8083D78:
push {lr}
movs r1, 0x80
lsls r1, 1
movs r0, 0xD3
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D78
thumb_func_start sub_8083D88
sub_8083D88:
push {lr}
movs r1, 0x80
lsls r1, 1
movs r0, 0xCC
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083D88
thumb_func_start sub_8083D98
sub_8083D98:
push {lr}
movs r0, 0x33
bl sub_8083E88
ldr r2, _08083DCC
ldr r0, [r2]
ldr r1, _08083DD0
adds r0, r1
movs r1, 0
strb r1, [r0]
ldr r0, [r2]
ldr r3, _08083DD4
adds r0, r3
strb r1, [r0]
ldr r0, [r2]
adds r3, 0x27
adds r0, r3
strb r1, [r0]
ldr r0, [r2]
ldr r1, _08083DD8
adds r0, r1
ldr r1, _08083DDC
strh r1, [r0]
pop {r0}
bx r0
.align 2, 0
_08083DCC: .4byte gUnknown_203B418
_08083DD0: .4byte 0x0000066f
_08083DD4: .4byte 0x00000672
_08083DD8: .4byte 0x0000066a
_08083DDC: .4byte 0x000003e7
thumb_func_end sub_8083D98
thumb_func_start sub_8083DE0
sub_8083DE0:
push {lr}
movs r0, 0x34
bl sub_8083E88
ldr r2, _08083E14
ldr r0, [r2]
ldr r1, _08083E18
adds r0, r1
movs r1, 0
strb r1, [r0]
ldr r0, [r2]
ldr r3, _08083E1C
adds r0, r3
strb r1, [r0]
ldr r0, [r2]
adds r3, 0x27
adds r0, r3
strb r1, [r0]
ldr r0, [r2]
ldr r1, _08083E20
adds r0, r1
ldr r1, _08083E24
strh r1, [r0]
pop {r0}
bx r0
.align 2, 0
_08083E14: .4byte gUnknown_203B418
_08083E18: .4byte 0x0000066f
_08083E1C: .4byte 0x00000672
_08083E20: .4byte 0x0000066a
_08083E24: .4byte 0x000003e7
thumb_func_end sub_8083DE0
thumb_func_start sub_8083E28
sub_8083E28:
push {lr}
movs r1, 0x80
lsls r1, 1
movs r0, 0xCF
bl sub_800C074
pop {r0}
bx r0
thumb_func_end sub_8083E28
thumb_func_start sub_8083E38
sub_8083E38:
push {lr}
lsls r0, 16
lsrs r2, r0, 16
ldr r0, _08083E54
cmp r2, r0
beq _08083E4E
movs r1, 0x80
lsls r1, 1
adds r0, r2, 0
bl sub_800C074
_08083E4E:
pop {r0}
bx r0
.align 2, 0
_08083E54: .4byte 0x000003e5
thumb_func_end sub_8083E38
thumb_func_start sub_8083E58
sub_8083E58:
push {lr}
lsls r0, 16
lsrs r1, r0, 16
ldr r0, _08083E70
cmp r1, r0
beq _08083E6A
adds r0, r1, 0
bl sub_800C298
_08083E6A:
pop {r0}
bx r0
.align 2, 0
_08083E70: .4byte 0x000003e5
thumb_func_end sub_8083E58
thumb_func_start sub_8083E74
sub_8083E74:
push {lr}
lsls r0, 16
lsrs r0, 16
bl sub_800C5D0
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
thumb_func_end sub_8083E74
thumb_func_start sub_8083E88
sub_8083E88:
ldr r1, _08083E9C
ldr r1, [r1]
ldr r3, _08083EA0
adds r2, r1, r3
movs r3, 0
strh r0, [r2]
ldr r0, _08083EA4
adds r1, r0
strh r3, [r1]
bx lr
.align 2, 0
_08083E9C: .4byte gUnknown_203B418
_08083EA0: .4byte 0x0001ceda
_08083EA4: .4byte 0x0001ced4
thumb_func_end sub_8083E88
thumb_func_start sub_8083EA8
sub_8083EA8:
push {r4,r5,lr}
lsls r0, 16
lsrs r0, 16
ldr r2, _08083ECC
ldr r2, [r2]
movs r4, 0x80
lsls r4, 8
adds r3, r4, 0
ldr r5, _08083ED0
adds r4, r2, r5
orrs r0, r3
strh r0, [r4]
ldr r0, _08083ED4
adds r2, r0
strh r1, [r2]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08083ECC: .4byte gUnknown_203B418
_08083ED0: .4byte 0x0001ceda
_08083ED4: .4byte 0x0001ced4
thumb_func_end sub_8083EA8
thumb_func_start sub_8083ED8
sub_8083ED8:
push {lr}
lsls r0, 16
lsrs r0, 16
bl sub_80118C4
ldr r0, _08083F00
ldr r1, [r0]
ldr r2, _08083F04
adds r0, r1, r2
ldr r2, _08083F08
strh r2, [r0]
ldr r3, _08083F0C
adds r0, r1, r3
strh r2, [r0]
ldr r0, _08083F10
adds r1, r0
strh r2, [r1]
pop {r0}
bx r0
.align 2, 0
_08083F00: .4byte gUnknown_203B418
_08083F04: .4byte 0x0001ced6
_08083F08: .4byte 0x000003e7
_08083F0C: .4byte 0x0001ced8
_08083F10: .4byte 0x0001ceda
thumb_func_end sub_8083ED8
thumb_func_start sub_8083F14
sub_8083F14:
push {lr}
bl sub_8083F34
bl sub_8011924
pop {r0}
bx r0
thumb_func_end sub_8083F14
thumb_func_start sub_8083F24
sub_8083F24:
push {lr}
bl sub_800C068
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
thumb_func_end sub_8083F24
thumb_func_start sub_8083F34
sub_8083F34:
ldr r0, _08083F4C
ldr r0, [r0]
ldr r1, _08083F50
adds r0, r1
movs r1, 0
str r1, [r0]
str r1, [r0, 0x4]
ldr r1, _08083F54
strh r1, [r0, 0xA]
strh r1, [r0, 0xC]
strh r1, [r0, 0xE]
bx lr
.align 2, 0
_08083F4C: .4byte gUnknown_203B418
_08083F50: .4byte 0x0001cecc
_08083F54: .4byte 0x000003e7
thumb_func_end sub_8083F34
thumb_func_start sub_8083F58
sub_8083F58:
push {r4,lr}
ldr r0, _08083F7C
ldr r2, [r0]
ldr r0, _08083F80
adds r4, r2, r0
ldr r1, _08083F84
adds r3, r2, r1
ldrh r1, [r3]
ldr r0, _08083F88
cmp r1, r0
bne _08083FB2
ldr r1, _08083F8C
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
beq _08083F90
movs r1, 0x12
b _08083FB2
.align 2, 0
_08083F7C: .4byte gUnknown_203B418
_08083F80: .4byte 0x0001cecc
_08083F84: .4byte 0x0000066a
_08083F88: .4byte 0x000003e7
_08083F8C: .4byte 0x0000066f
_08083F90:
ldr r1, _08083FA0
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
beq _08083FA4
movs r1, 0x80
b _08083FB2
.align 2, 0
_08083FA0: .4byte 0x00000672
_08083FA4:
ldr r1, _08083FC4
adds r0, r2, r1
ldrb r0, [r0]
movs r1, 0x11
cmp r0, 0
bne _08083FB2
ldrh r1, [r4, 0xE]
_08083FB2:
ldr r0, [r4]
cmp r0, 0x4
bne _08083FC8
ldrh r0, [r4, 0xC]
cmp r1, r0
beq _08083FDA
movs r0, 0x2
b _08083FD6
.align 2, 0
_08083FC4: .4byte 0x00000699
_08083FC8:
ldr r2, _08083FEC
cmp r1, r2
beq _08083FDA
ldrh r0, [r4, 0xA]
cmp r0, r2
bne _08083FDA
movs r0, 0x1
_08083FD6:
str r0, [r4]
strh r1, [r4, 0xA]
_08083FDA:
ldr r0, [r4]
cmp r0, 0x4
bhi _08084084
lsls r0, 2
ldr r1, _08083FF0
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08083FEC: .4byte 0x000003e7
_08083FF0: .4byte _08083FF4
.align 2, 0
_08083FF4:
.4byte _08084084
.4byte _08084008
.4byte _08084050
.4byte _0808405E
.4byte _08084084
_08084008:
ldrh r1, [r4, 0xA]
ldr r0, _08084014
cmp r1, r0
bne _08084018
movs r0, 0
b _08084040
.align 2, 0
_08084014: .4byte 0x000003e7
_08084018:
movs r0, 0x80
lsls r0, 8
ands r0, r1
cmp r0, 0
beq _08084030
ldr r0, _0808402C
ands r0, r1
bl sub_800BDFC
b _0808403A
.align 2, 0
_0808402C: .4byte 0x00007fff
_08084030:
ldr r0, _08084048
ands r0, r1
ldrh r1, [r4, 0x8]
bl FadeInNewBGM
_0808403A:
ldrh r0, [r4, 0xA]
strh r0, [r4, 0xC]
movs r0, 0x4
_08084040:
str r0, [r4]
ldr r0, _0808404C
strh r0, [r4, 0xA]
b _08084084
.align 2, 0
_08084048: .4byte 0x00007fff
_0808404C: .4byte 0x000003e7
_08084050:
movs r0, 0x1E
bl sub_800BFD0
movs r0, 0x1E
str r0, [r4, 0x4]
movs r0, 0x3
b _08084082
_0808405E:
ldr r0, [r4, 0x4]
cmp r0, 0
beq _0808406C
subs r0, 0x1
str r0, [r4, 0x4]
cmp r0, 0
bne _08084084
_0808406C:
ldrh r1, [r4, 0xA]
ldr r0, _0808407C
cmp r1, r0
bne _08084080
bl sub_800BF80
movs r0, 0
b _08084082
.align 2, 0
_0808407C: .4byte 0x000003e7
_08084080:
movs r0, 0x1
_08084082:
str r0, [r4]
_08084084:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8083F58
thumb_func_start sub_808408C
sub_808408C:
ldr r2, _0808409C
movs r1, 0x1
orrs r1, r0
ldr r0, _080840A0
ands r0, r1
str r0, [r2]
bx lr
.align 2, 0
_0808409C: .4byte gUnknown_203B458
_080840A0: .4byte 0x00ffffff
thumb_func_end sub_808408C
thumb_func_start sub_80840A4
sub_80840A4:
ldr r3, _080840C8
ldr r0, [r3]
ldr r2, _080840CC
adds r1, r0, 0
muls r1, r2
adds r1, 0x1
lsrs r0, r1, 16
muls r1, r2
adds r1, 0x1
str r1, [r3]
ldr r2, _080840D0
ands r1, r2
orrs r0, r1
ldr r1, _080840D4
ands r0, r1
movs r1, 0x1
orrs r0, r1
bx lr
.align 2, 0
_080840C8: .4byte gUnknown_203B458
_080840CC: .4byte 0x5d588b65
_080840D0: .4byte 0xffff0000
_080840D4: .4byte 0x00ffffff
thumb_func_end sub_80840A4
thumb_func_start sub_80840D8
sub_80840D8:
ldr r2, _080840E4
movs r1, 0x1
orrs r1, r0
str r1, [r2]
bx lr
.align 2, 0
_080840E4: .4byte gUnknown_203B454
thumb_func_end sub_80840D8
thumb_func_start sub_80840E8
sub_80840E8:
ldr r2, _080840F8
ldr r1, [r2]
ldr r0, _080840FC
muls r0, r1
adds r0, 0x1
str r0, [r2]
lsrs r0, 16
bx lr
.align 2, 0
_080840F8: .4byte gUnknown_203B454
_080840FC: .4byte 0x5d588b65
thumb_func_end sub_80840E8
thumb_func_start sub_8084100
sub_8084100:
push {r4,lr}
adds r4, r0, 0
bl sub_80840E8
ldr r1, _08084118
ands r0, r1
muls r0, r4
asrs r0, 16
ands r0, r1
pop {r4}
pop {r1}
bx r1
.align 2, 0
_08084118: .4byte 0x0000ffff
thumb_func_end sub_8084100
thumb_func_start sub_808411C
sub_808411C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
cmp r5, r4
beq _0808413C
cmp r5, r4
blt _08084134
subs r0, r5, r4
bl sub_8084100
adds r0, r4
b _0808413C
_08084134:
subs r0, r4, r5
bl sub_8084100
adds r0, r5
_0808413C:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_808411C
thumb_func_start sub_8084144
sub_8084144:
push {r4,lr}
adds r4, r0, 0
movs r0, 0x64
bl sub_8084100
cmp r0, r4
blt _08084156
movs r0, 0
b _08084158
_08084156:
movs r0, 0x1
_08084158:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8084144
thumb_func_start sub_8084160
sub_8084160:
push {r4,lr}
adds r4, r0, 0
movs r0, 0x64
bl sub_8084100
cmp r0, r4
blt _08084172
movs r0, 0
b _08084174
_08084172:
movs r0, 0x1
_08084174:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8084160
thumb_func_start sub_808417C
sub_808417C:
push {r4-r6,lr}
adds r5, r0, 0
lsls r2, 24
lsrs r6, r2, 24
movs r2, 0
ldrsh r0, [r1, r2]
movs r2, 0x2
ldrsh r1, [r1, r2]
bl sub_808411C
adds r4, r0, 0
adds r0, r5, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080841DC
adds r0, r5, 0
bl sub_80450F8
cmp r0, 0x1
bne _080841DC
cmp r6, 0
beq _080841DC
adds r0, r5, 0
movs r1, 0x12
bl sub_80718D8
lsls r0, 24
cmp r0, 0
beq _080841C4
cmp r4, 0x7F
beq _080841C4
lsrs r0, r4, 31
adds r0, r4, r0
asrs r4, r0, 1
_080841C4:
adds r0, r5, 0
movs r1, 0x14
bl sub_8071824
lsls r0, 24
cmp r0, 0
beq _080841DC
cmp r4, 0x7F
beq _080841DC
cmp r4, 0x4
ble _080841DC
movs r4, 0x5
_080841DC:
cmp r4, 0
bgt _080841E2
movs r4, 0x1
_080841E2:
adds r0, r4, 0
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_808417C
thumb_func_start sub_80841EC
sub_80841EC:
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0xC4
add r0, sp, 0x60
mov r8, r0
movs r1, 0
movs r2, 0x60
bl memset
movs r0, 0x6
str r0, [sp, 0x64]
add r1, sp, 0x68
movs r6, 0
movs r0, 0x4
strh r0, [r1]
movs r2, 0x3
strh r2, [r1, 0x2]
add r1, sp, 0x6C
movs r0, 0x16
strh r0, [r1]
mov r0, sp
adds r0, 0x6E
movs r5, 0xE
movs r1, 0xE
strh r1, [r0]
add r0, sp, 0x70
strh r1, [r0]
add r4, sp, 0xC0
str r4, [sp, 0x74]
str r2, [sp, 0x7C]
add r0, sp, 0x90
str r2, [r0, 0x4]
add r0, sp, 0xA8
str r2, [r0, 0x4]
mov r0, sp
mov r1, r8
movs r2, 0x60
bl memcpy
movs r0, 0x1
strb r0, [r4]
strb r6, [r4, 0x1]
strb r5, [r4, 0x2]
strb r6, [r4, 0x3]
mov r1, sp
movs r0, 0x14
strh r0, [r1, 0xA]
mov r0, sp
movs r1, 0x1
bl sub_803ECB4
ldr r0, _0808426C
ldr r0, [r0]
ldr r1, _08084270
adds r0, r1
movs r2, 0
ldrsh r1, [r0, r2]
ldr r0, _08084274
cmp r1, r0
ble _08084278
bl sub_8083DE0
b _0808427C
.align 2, 0
_0808426C: .4byte gUnknown_203B418
_08084270: .4byte 0x0001ceac
_08084274: .4byte 0x00000225
_08084278:
bl sub_8083D98
_0808427C:
ldr r0, _080842B8
ldr r1, [r0]
ldr r0, _080842BC
ldr r2, [r0]
ldr r0, _080842C0
adds r2, r0
movs r0, 0
bl sub_8094558
mov r4, sp
_08084290:
movs r0, 0x36
bl sub_803E668
bl sub_8083F58
ldrh r1, [r4, 0xA]
movs r2, 0xA
ldrsh r0, [r4, r2]
cmp r0, 0x3
ble _080842C4
subs r0, r1, 0x1
strh r0, [r4, 0xA]
movs r0, 0xA0
strb r0, [r4]
mov r0, sp
movs r1, 0x1
bl sub_803ECB4
b _08084290
.align 2, 0
_080842B8: .4byte gUnknown_80FE6E8
_080842BC: .4byte gUnknown_203B418
_080842C0: .4byte 0x0001ce98
_080842C4:
bl sub_8094D14
lsls r0, 24
cmp r0, 0
bne _080842DA
ldr r0, _080842EC
ldrh r1, [r0, 0x2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08084290
_080842DA:
bl sub_8083D08
add sp, 0xC4
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080842EC: .4byte gUnknown_20255F0
thumb_func_end sub_80841EC
thumb_func_start sub_80842F0
sub_80842F0:
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r1, _0808436C
ldr r0, [r1]
ldr r2, _08084370
adds r0, r2
movs r2, 0
strb r2, [r0]
ldr r0, [r1]
ldr r3, _08084374
adds r0, r3
strb r2, [r0]
ldr r0, [r1]
movs r5, 0xCF
lsls r5, 3
adds r0, r5
ldrb r0, [r0]
cmp r0, 0x2
bne _080843AE
movs r6, 0
ldr r0, _08084378
mov r8, r0
movs r7, 0x1
_08084320:
lsls r0, r6, 24
lsrs r0, 24
bl sub_8096AB4
adds r4, r0, 0
ldrb r0, [r4]
cmp r0, 0x6
bne _080843A8
ldr r3, _0808436C
ldr r5, [r3]
ldr r1, _0808437C
adds r0, r5, r1
ldrh r0, [r0]
ldrh r2, [r4, 0x4]
mov r1, r8
ands r1, r0
mov r0, r8
ands r0, r2
cmp r1, r0
bne _080843A8
ldrb r0, [r4, 0x1]
cmp r0, 0x3
beq _080843A8
cmp r0, 0x4
bne _08084380
ldrb r1, [r4, 0x10]
ldr r2, _08084374
adds r0, r5, r2
strb r1, [r0]
ldr r2, [r3]
ldrh r1, [r4, 0xE]
movs r3, 0xD1
lsls r3, 3
adds r0, r2, r3
strh r1, [r0]
strb r7, [r2, 0x9]
b _080843A8
.align 2, 0
_0808436C: .4byte gUnknown_203B418
_08084370: .4byte 0x00000677
_08084374: .4byte 0x0000068a
_08084378: .4byte 0x0000ffff
_0808437C: .4byte 0x00000644
_08084380:
cmp r0, 0
beq _0808438C
cmp r0, 0x2
beq _0808438C
cmp r0, 0x1
bne _080843A8
_0808438C:
ldr r2, [r3]
ldrh r0, [r4, 0xE]
movs r5, 0xD1
lsls r5, 3
adds r1, r2, r5
strh r0, [r1]
ldrb r0, [r4, 0x1]
cmp r0, 0x2
bne _080843A4
ldr r1, _080843B8
adds r0, r2, r1
strb r7, [r0]
_080843A4:
ldr r0, [r3]
strb r7, [r0, 0x9]
_080843A8:
adds r6, 0x1
cmp r6, 0x7
ble _08084320
_080843AE:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080843B8: .4byte 0x00000677
thumb_func_end sub_80842F0
thumb_func_start sub_80843BC
sub_80843BC:
push {r4-r6,lr}
lsls r0, 16
asrs r6, r0, 16
movs r4, 0
ldr r5, _08084418
_080843C6:
lsls r0, r4, 24
lsrs r0, 24
bl sub_8096AB4
adds r3, r0, 0
ldrb r0, [r3]
cmp r0, 0x6
bne _0808440C
ldr r0, _0808441C
ldr r0, [r0]
ldr r1, _08084420
adds r0, r1
ldrh r0, [r0]
ldrh r2, [r3, 0x4]
adds r1, r5, 0
ands r1, r0
adds r0, r5, 0
ands r0, r2
cmp r1, r0
bne _0808440C
ldrb r0, [r3, 0x1]
cmp r0, 0
beq _08084400
cmp r0, 0x4
beq _08084400
cmp r0, 0x2
beq _08084400
cmp r0, 0x1
bne _0808440C
_08084400:
movs r1, 0xE
ldrsh r0, [r3, r1]
cmp r6, r0
bne _0808440C
movs r0, 0x8
strb r0, [r3]
_0808440C:
adds r4, 0x1
cmp r4, 0x7
ble _080843C6
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08084418: .4byte 0x0000ffff
_0808441C: .4byte gUnknown_203B418
_08084420: .4byte 0x00000644
thumb_func_end sub_80843BC
thumb_func_start sub_8084424
sub_8084424:
push {r4,lr}
movs r4, 0
_08084428:
lsls r0, r4, 24
lsrs r0, 24
bl sub_8096AB4
adds r1, r0, 0
ldrb r0, [r1]
cmp r0, 0x8
bne _0808443C
movs r0, 0x9
strb r0, [r1]
_0808443C:
adds r4, 0x1
cmp r4, 0x7
ble _08084428
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8084424
thumb_func_start sub_8084448
sub_8084448:
push {r4-r7,lr}
adds r5, r0, 0
ldr r7, [r5, 0x70]
ldr r4, _0808447C
bl sub_8083600
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_8045B94
adds r0, r5, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
bne _08084484
ldr r0, _08084480
b _080844F0
.align 2, 0
_0808447C: .4byte gUnknown_202DF98
_08084480: .4byte gUnknown_80FA464
_08084484:
ldr r4, _080844FC
ldr r0, [r4]
ldr r6, _08084500
adds r0, r6
ldrb r0, [r0]
cmp r0, 0
beq _08084540
ldr r0, _08084504
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
beq _080844A4
b _080845D4
_080844A4:
ldr r0, _08084508
ldr r1, [r4]
adds r1, r6
ldrb r1, [r1]
movs r2, 0
bl sub_8090DC4
movs r3, 0
ldr r0, _0808450C
adds r6, r0, 0
ldr r2, [r6]
_080844BA:
ldrb r1, [r2]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _080844E2
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _080844E2
movs r0, 0x18
ands r0, r1
cmp r0, 0x18
beq _080844E2
ldr r0, [r4]
ldr r1, _08084500
adds r0, r1
ldrb r1, [r2, 0x2]
ldrb r0, [r0]
cmp r1, r0
beq _080844EA
_080844E2:
adds r2, 0x4
adds r3, 0x1
cmp r3, 0x13
ble _080844BA
_080844EA:
cmp r3, 0x14
bne _08084514
ldr r0, _08084510
_080844F0:
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _080845D4
.align 2, 0
_080844FC: .4byte gUnknown_203B418
_08084500: .4byte 0x0000068a
_08084504: .4byte gUnknown_80FA32C
_08084508: .4byte gUnknown_202DE58
_0808450C: .4byte gUnknown_203B460
_08084510: .4byte gUnknown_80FA448
_08084514:
lsls r1, r3, 2
ldr r0, [r6]
adds r1, r0
movs r0, 0
strb r0, [r1, 0x2]
strb r0, [r1, 0x1]
strb r0, [r1]
bl sub_80910B4
ldr r0, _08084538
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
ldr r0, _0808453C
b _0808455E
.align 2, 0
_08084538: .4byte gUnknown_80FA2B0
_0808453C: .4byte gUnknown_80FA370
_08084540:
ldr r0, _080845B0
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _080845D4
ldr r0, _080845B4
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
ldr r0, _080845B8
_0808455E:
ldr r4, [r0]
movs r1, 0x2
ldrsh r0, [r7, r1]
bl sub_80843BC
adds r0, r5, 0x4
bl sub_8042A34
movs r1, 0x87
lsls r1, 2
adds r0, r5, 0
movs r2, 0
bl sub_8068FE0
movs r0, 0x1
bl sub_804178C
ldr r5, _080845BC
_08084582:
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _080845C4
ldr r0, _080845C0
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
adds r1, r0, 0
cmp r1, 0x1
bne _08084582
ldr r0, [r5]
strb r1, [r0, 0x4]
ldr r1, [r5]
movs r0, 0x2
strb r0, [r1, 0x11]
b _080845D4
.align 2, 0
_080845B0: .4byte gUnknown_80FA2F0
_080845B4: .4byte gUnknown_80FA260
_080845B8: .4byte gUnknown_80FA36C
_080845BC: .4byte gUnknown_203B418
_080845C0: .4byte gUnknown_80FA394
_080845C4:
ldr r0, _080845DC
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0x1
bne _08084582
_080845D4:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080845DC: .4byte gUnknown_80FA3B8
thumb_func_end sub_8084448
thumb_func_start sub_80845E0
sub_80845E0:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r6, r0, 0
ldr r0, [r6, 0x70]
mov r8, r0
movs r7, 0
movs r1, 0
mov r9, r1
ldr r4, _08084620
bl sub_8083600
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
adds r4, 0x50
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8045B94
adds r0, r6, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
bne _08084630
ldr r0, _08084624
b _080846B4
.align 2, 0
_08084620: .4byte gUnknown_202DF98
_08084624: .4byte gUnknown_80FA530
_08084628:
adds r7, r4, 0
ldr r2, [r7, 0x70]
mov r9, r2
b _08084674
_08084630:
movs r5, 0
_08084632:
ldr r0, _08084660
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08084664
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0808466E
ldr r0, [r4, 0x70]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x4A
beq _0808465A
cmp r0, 0x47
bne _08084668
_0808465A:
movs r0, 0x1
b _0808466A
.align 2, 0
_08084660: .4byte gUnknown_203B418
_08084664: .4byte 0x0001357c
_08084668:
movs r0, 0
_0808466A:
cmp r0, 0
bne _08084628
_0808466E:
adds r5, 0x1
cmp r5, 0x3
ble _08084632
_08084674:
cmp r7, 0
bne _08084680
ldr r0, _0808467C
b _080846B4
.align 2, 0
_0808467C: .4byte gUnknown_80FA52C
_08084680:
ldr r0, _0808469C
adds r1, r7, 0
movs r2, 0
bl sub_8045B94
adds r0, r7, 0
bl sub_8070BC0
lsls r0, 24
cmp r0, 0
bne _080846A4
ldr r0, _080846A0
b _080846B4
.align 2, 0
_0808469C: .4byte gUnknown_202E038
_080846A0: .4byte gUnknown_80FA54C
_080846A4:
adds r0, r6, 0
adds r1, r7, 0
bl sub_8045990
lsls r0, 24
cmp r0, 0
bne _080846C4
ldr r0, _080846C0
_080846B4:
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
b _08084768
.align 2, 0
_080846C0: .4byte gUnknown_80FA500
_080846C4:
ldr r0, _08084744
ldr r1, [r0]
movs r0, 0
movs r2, 0x1
bl PrintFieldMessage
mov r1, r8
movs r2, 0x2
ldrsh r0, [r1, r2]
bl sub_80843BC
ldr r5, _08084748
ldr r0, [r5]
ldr r1, _0808474C
adds r0, r1
ldrb r1, [r0]
mov r0, r9
adds r0, 0x40
strb r1, [r0]
adds r0, r6, 0x4
bl sub_8042A34
adds r0, r7, 0x4
bl sub_8042A34
movs r4, 0x87
lsls r4, 2
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
adds r0, r7, 0
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
movs r0, 0x1
bl sub_804178C
ldr r4, _08084750
_08084716:
movs r0, 0
ldr r1, [r4]
movs r2, 0x1
bl sub_8052B8C
cmp r0, 0x1
bne _08084758
ldr r0, _08084754
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
adds r1, r0, 0
cmp r1, 0x1
bne _08084716
ldr r0, [r5]
strb r1, [r0, 0x4]
ldr r1, [r5]
movs r0, 0x2
strb r0, [r1, 0x11]
b _08084768
.align 2, 0
_08084744: .4byte gUnknown_80FA4D4
_08084748: .4byte gUnknown_203B418
_0808474C: .4byte 0x00000644
_08084750: .4byte gUnknown_80FA4D8
_08084754: .4byte gUnknown_80FA394
_08084758:
ldr r0, _08084774
ldr r1, [r0]
movs r0, 0
movs r2, 0
bl sub_8052B8C
cmp r0, 0x1
bne _08084716
_08084768:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08084774: .4byte gUnknown_80FA3B8
thumb_func_end sub_80845E0
thumb_func_start sub_8084778
sub_8084778:
push {r4,lr}
ldr r0, _080847B8
ldr r1, _080847BC
bl strcpy
movs r4, 0
_08084784:
lsls r0, r4, 24
lsrs r0, 24
bl sub_8096AB4
adds r1, r0, 0
ldrb r0, [r1]
cmp r0, 0x6
bne _080847C8
ldr r0, _080847C0
ldr r0, [r0]
ldr r2, _080847C4
adds r0, r2
ldrb r0, [r0]
ldrb r2, [r1, 0x4]
cmp r0, r2
bne _080847C8
ldrb r0, [r1, 0x1]
cmp r0, 0x2
bne _080847C8
movs r0, 0xE
ldrsh r1, [r1, r0]
ldr r0, _080847B8
bl sub_808D908
b _080847CE
.align 2, 0
_080847B8: .4byte gUnknown_202E088
_080847BC: .4byte gUnknown_8107224
_080847C0: .4byte gUnknown_203B418
_080847C4: .4byte 0x00000644
_080847C8:
adds r4, 0x1
cmp r4, 0x7
ble _08084784
_080847CE:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8084778
thumb_func_start sub_80847D4
sub_80847D4:
push {r4,r5,lr}
ldr r2, _08084820
ldr r0, [r2]
ldr r1, _08084824
adds r0, r1
movs r1, 0
strb r1, [r0]
ldr r0, [r2]
ldr r2, _08084828
adds r0, r2
strb r1, [r0]
bl sub_8040A84
movs r4, 0
ldr r0, _0808482C
ldrb r0, [r0]
cmp r0, 0
beq _08084846
movs r3, 0
_080847FA:
ldr r0, _08084820
ldr r0, [r0]
ldr r5, _08084830
adds r0, r5
movs r2, 0
ldrsh r1, [r0, r2]
adds r0, r1, 0
subs r0, 0x1C
cmp r0, 0x15
bhi _08084810
movs r1, 0x1B
_08084810:
ldr r2, _0808482C
adds r0, r3, r2
ldrb r5, [r0]
cmp r1, r5
bne _08084834
bl sub_8084854
b _08084846
.align 2, 0
_08084820: .4byte gUnknown_203B418
_08084824: .4byte 0x00003a0d
_08084828: .4byte 0x0001356c
_0808482C: .4byte gUnknown_8107234
_08084830: .4byte 0x00003a14
_08084834:
adds r3, 0x8
adds r4, 0x1
ldr r0, _08084850
cmp r4, r0
bgt _08084846
adds r0, r3, r2
ldrb r0, [r0]
cmp r0, 0
bne _080847FA
_08084846:
bl sub_8097FF8
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08084850: .4byte 0x000003e6
thumb_func_end sub_80847D4
thumb_func_start sub_8084854
sub_8084854:
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, _08084874
ldr r2, [r5]
movs r1, 0xCF
lsls r1, 3
adds r0, r2, r1
ldrb r0, [r0]
cmp r0, 0
beq _0808487C
ldrb r1, [r4, 0x5]
ldr r3, _08084878
adds r0, r2, r3
strb r1, [r0]
b _080848C8
.align 2, 0
_08084874: .4byte gUnknown_203B418
_08084878: .4byte 0x00003a0d
_0808487C:
ldrb r0, [r4, 0x4]
bl sub_8098100
lsls r0, 24
cmp r0, 0
beq _08084898
ldr r0, [r5]
ldrb r1, [r4, 0x5]
ldr r2, _08084894
adds r0, r2
strb r1, [r0]
b _080848C8
.align 2, 0
_08084894: .4byte 0x00003a0d
_08084898:
ldrb r0, [r4, 0x2]
bl sub_8098100
lsls r0, 24
cmp r0, 0
beq _080848B4
ldr r0, [r5]
ldrb r1, [r4, 0x3]
ldr r3, _080848B0
adds r0, r3
strb r1, [r0]
b _080848C8
.align 2, 0
_080848B0: .4byte 0x00003a0d
_080848B4:
ldr r0, [r5]
ldrb r1, [r4, 0x1]
ldr r2, _080848E0
adds r0, r2
strb r1, [r0]
ldrb r0, [r4, 0x2]
cmp r0, 0x40
beq _080848C8
bl sub_8097FA8
_080848C8:
ldr r0, _080848E4
ldr r0, [r0]
ldr r3, _080848E8
adds r0, r3
movs r1, 0x1
strb r1, [r0]
movs r0, 0
bl sub_807E5E4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080848E0: .4byte 0x00003a0d
_080848E4: .4byte gUnknown_203B418
_080848E8: .4byte 0x00000675
thumb_func_end sub_8084854
thumb_func_start sub_80848EC
sub_80848EC:
movs r0, 0x1
bx lr
thumb_func_end sub_80848EC
thumb_func_start sub_80848F0
sub_80848F0:
push {lr}
ldr r2, _08084918
ldr r0, [r2]
ldr r1, _0808491C
adds r0, r1
movs r1, 0x1
strb r1, [r0]
ldr r0, [r2]
ldr r1, _08084920
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x3C
bls _0808490C
b _08084B5C
_0808490C:
lsls r0, 2
ldr r1, _08084924
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08084918: .4byte gUnknown_203B418
_0808491C: .4byte 0x0001356c
_08084920: .4byte 0x00003a0d
_08084924: .4byte _08084928
.align 2, 0
_08084928:
.4byte _08084A1C
.4byte _08084A2C
.4byte _08084A2C
.4byte _08084A32
.4byte _08084A38
.4byte _08084A38
.4byte _08084A3E
.4byte _08084A44
.4byte _08084A44
.4byte _08084A4A
.4byte _08084A50
.4byte _08084A50
.4byte _08084A56
.4byte _08084A5C
.4byte _08084A62
.4byte _08084A68
.4byte _08084A6E
.4byte _08084A74
.4byte _08084A7A
.4byte _08084A80
.4byte _08084A86
.4byte _08084A8C
.4byte _08084A92
.4byte _08084A98
.4byte _08084A98
.4byte _08084A9E
.4byte _08084AA4
.4byte _08084AA4
.4byte _08084AAA
.4byte _08084AB0
.4byte _08084AB0
.4byte _08084AB6
.4byte _08084ABC
.4byte _08084ABC
.4byte _08084AC2
.4byte _08084AC8
.4byte _08084ACE
.4byte _08084AD4
.4byte _08084ADA
.4byte _08084AE0
.4byte _08084AE6
.4byte _08084AEC
.4byte _08084AF2
.4byte _08084AF8
.4byte _08084AFE
.4byte _08084B04
.4byte _08084B0A
.4byte _08084B10
.4byte _08084B16
.4byte _08084B1C
.4byte _08084B22
.4byte _08084B28
.4byte _08084B2E
.4byte _08084B34
.4byte _08084B3A
.4byte _08084B40
.4byte _08084B46
.4byte _08084B4C
.4byte _08084B52
.4byte _08084B58
.4byte _08084A1C
_08084A1C:
ldr r0, [r2]
ldr r1, _08084A28
adds r0, r1
movs r1, 0
strb r1, [r0]
b _08084B5C
.align 2, 0
_08084A28: .4byte 0x0001356c
_08084A2C:
bl sub_8086B14
b _08084B5C
_08084A32:
bl sub_8086B94
b _08084B5C
_08084A38:
bl sub_8086E9C
b _08084B5C
_08084A3E:
bl sub_8086F00
b _08084B5C
_08084A44:
bl sub_8087230
b _08084B5C
_08084A4A:
bl sub_808729C
b _08084B5C
_08084A50:
bl sub_80877E8
b _08084B5C
_08084A56:
bl sub_8087848
b _08084B5C
_08084A5C:
bl sub_8087F54
b _08084B5C
_08084A62:
bl sub_8087FB4
b _08084B5C
_08084A68:
bl sub_8087FF8
b _08084B5C
_08084A6E:
bl sub_80885A0
b _08084B5C
_08084A74:
bl sub_80885C4
b _08084B5C
_08084A7A:
bl sub_808862C
b _08084B5C
_08084A80:
bl sub_80886C4
b _08084B5C
_08084A86:
bl sub_808875C
b _08084B5C
_08084A8C:
bl sub_8088DC0
b _08084B5C
_08084A92:
bl sub_8088E5C
b _08084B5C
_08084A98:
bl sub_80892C8
b _08084B5C
_08084A9E:
bl sub_8089328
b _08084B5C
_08084AA4:
bl sub_808970C
b _08084B5C
_08084AAA:
bl sub_808974C
b _08084B5C
_08084AB0:
bl sub_8089914
b _08084B5C
_08084AB6:
bl sub_8089978
b _08084B5C
_08084ABC:
bl sub_8089C44
b _08084B5C
_08084AC2:
bl sub_8089C90
b _08084B5C
_08084AC8:
bl sub_8089EFC
b _08084B5C
_08084ACE:
bl sub_8089F44
b _08084B5C
_08084AD4:
bl sub_8089F8C
b _08084B5C
_08084ADA:
bl sub_808A264
b _08084B5C
_08084AE0:
bl sub_808A2C0
b _08084B5C
_08084AE6:
bl sub_808A308
b _08084B5C
_08084AEC:
bl sub_808A608
b _08084B5C
_08084AF2:
bl sub_808A668
b _08084B5C
_08084AF8:
bl sub_808A9E4
b _08084B5C
_08084AFE:
bl sub_808AA3C
b _08084B5C
_08084B04:
bl sub_808AA94
b _08084B5C
_08084B0A:
bl sub_808ACC0
b _08084B5C
_08084B10:
bl sub_808AD48
b _08084B5C
_08084B16:
bl sub_808ADCC
b _08084B5C
_08084B1C:
bl sub_808B2F4
b _08084B5C
_08084B22:
bl sub_808B35C
b _08084B5C
_08084B28:
bl sub_808BDEC
b _08084B5C
_08084B2E:
bl sub_808C10C
b _08084B5C
_08084B34:
bl sub_808C3A0
b _08084B5C
_08084B3A:
bl sub_808C5C0
b _08084B5C
_08084B40:
bl sub_808C938
b _08084B5C
_08084B46:
bl sub_808C9C4
b _08084B5C
_08084B4C:
bl sub_808CB5C
b _08084B5C
_08084B52:
bl sub_808CBB0
b _08084B5C
_08084B58:
bl sub_808CD44
_08084B5C:
bl sub_8097FF8
pop {r0}
bx r0
thumb_func_end sub_80848F0
thumb_func_start sub_8084B64
sub_8084B64:
push {lr}
ldr r0, _08084B80
ldr r0, [r0]
ldr r1, _08084B84
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x3C
bls _08084B76
b _08084DDA
_08084B76:
lsls r0, 2
ldr r1, _08084B88
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08084B80: .4byte gUnknown_203B418
_08084B84: .4byte 0x00003a0d
_08084B88: .4byte _08084B8C
.align 2, 0
_08084B8C:
.4byte _08084DDA
.4byte _08084C80
.4byte _08084C86
.4byte _08084C8C
.4byte _08084C92
.4byte _08084C98
.4byte _08084C9E
.4byte _08084CA4
.4byte _08084CAA
.4byte _08084CB0
.4byte _08084CB6
.4byte _08084CBC
.4byte _08084CC2
.4byte _08084CC8
.4byte _08084CCE
.4byte _08084CD4
.4byte _08084CDA
.4byte _08084CE0
.4byte _08084CE6
.4byte _08084CEC
.4byte _08084CF2
.4byte _08084CF8
.4byte _08084CFE
.4byte _08084D04
.4byte _08084D0A
.4byte _08084D10
.4byte _08084D16
.4byte _08084D1C
.4byte _08084D22
.4byte _08084D28
.4byte _08084D28
.4byte _08084D2E
.4byte _08084D34
.4byte _08084D3A
.4byte _08084D40
.4byte _08084D46
.4byte _08084D4C
.4byte _08084D52
.4byte _08084D58
.4byte _08084D5E
.4byte _08084D64
.4byte _08084D6A
.4byte _08084D70
.4byte _08084D76
.4byte _08084D7C
.4byte _08084D82
.4byte _08084D88
.4byte _08084D8E
.4byte _08084D94
.4byte _08084D9A
.4byte _08084DA0
.4byte _08084DA6
.4byte _08084DAC
.4byte _08084DB2
.4byte _08084DB8
.4byte _08084DBE
.4byte _08084DC4
.4byte _08084DCA
.4byte _08084DD0
.4byte _08084DD6
.4byte _08084DDA
_08084C80:
bl sub_8086C0C
b _08084DDA
_08084C86:
bl sub_8086DAC
b _08084DDA
_08084C8C:
bl sub_8086E40
b _08084DDA
_08084C92:
bl sub_8086FB8
b _08084DDA
_08084C98:
bl sub_8087064
b _08084DDA
_08084C9E:
bl sub_8087130
b _08084DDA
_08084CA4:
bl sub_8087364
b _08084DDA
_08084CAA:
bl sub_80875C0
b _08084DDA
_08084CB0:
bl sub_808765C
b _08084DDA
_08084CB6:
bl sub_8087924
b _08084DDA
_08084CBC:
bl sub_8087B20
b _08084DDA
_08084CC2:
bl sub_8087C38
b _08084DDA
_08084CC8:
bl sub_80880B8
b _08084DDA
_08084CCE:
bl sub_8088304
b _08084DDA
_08084CD4:
bl sub_8088398
b _08084DDA
_08084CDA:
bl sub_8088608
b _08084DDA
_08084CE0:
bl sub_8088618
b _08084DDA
_08084CE6:
bl sub_8088854
b _08084DDA
_08084CEC:
bl sub_8088A9C
b _08084DDA
_08084CF2:
bl sub_8088B60
b _08084DDA
_08084CF8:
bl sub_8088EF4
b _08084DDA
_08084CFE:
bl sub_8089168
b _08084DDA
_08084D04:
bl sub_80893E4
b _08084DDA
_08084D0A:
bl sub_8089500
b _08084DDA
_08084D10:
bl sub_8089588
b _08084DDA
_08084D16:
bl sub_80897F0
b _08084DDA
_08084D1C:
bl sub_8089878
b _08084DDA
_08084D22:
bl sub_80898E4
b _08084DDA
_08084D28:
bl sub_8089A30
b _08084DDA
_08084D2E:
bl sub_8089AD4
b _08084DDA
_08084D34:
bl sub_8089D2C
b _08084DDA
_08084D3A:
bl sub_8089D8C
b _08084DDA
_08084D40:
bl sub_8089DEC
b _08084DDA
_08084D46:
bl sub_808A020
b _08084DDA
_08084D4C:
bl sub_808A0C8
b _08084DDA
_08084D52:
bl sub_808A144
b _08084DDA
_08084D58:
bl sub_808A39C
b _08084DDA
_08084D5E:
bl sub_808A454
b _08084DDA
_08084D64:
bl sub_808A4B0
b _08084DDA
_08084D6A:
bl sub_808A724
b _08084DDA
_08084D70:
bl sub_808A828
b _08084DDA
_08084D76:
bl sub_808AB20
b _08084DDA
_08084D7C:
bl sub_808ABD8
b _08084DDA
_08084D82:
bl sub_808AC3C
b _08084DDA
_08084D88:
bl sub_808B130
b _08084DDA
_08084D8E:
bl sub_808B164
b _08084DDA
_08084D94:
bl sub_808B198
b _08084DDA
_08084D9A:
bl sub_808B45C
b _08084DDA
_08084DA0:
bl sub_808BA78
b _08084DDA
_08084DA6:
bl sub_808BE94
b _08084DDA
_08084DAC:
bl sub_808C1CC
b _08084DDA
_08084DB2:
bl sub_808C43C
b _08084DDA
_08084DB8:
bl sub_808C628
b _08084DDA
_08084DBE:
bl sub_808C998
b _08084DDA
_08084DC4:
bl sub_808CA1C
b _08084DDA
_08084DCA:
bl nullsub_101
b _08084DDA
_08084DD0:
bl sub_808CC04
b _08084DDA
_08084DD6:
bl sub_808CD9C
_08084DDA:
bl sub_8085764
bl sub_80857B8
ldr r0, _08084DF8
ldr r0, [r0]
ldr r1, _08084DFC
adds r0, r1
movs r1, 0
strb r1, [r0]
bl sub_8097FF8
pop {r0}
bx r0
.align 2, 0
_08084DF8: .4byte gUnknown_203B418
_08084DFC: .4byte 0x0001356c
thumb_func_end sub_8084B64
thumb_func_start sub_8084E00
sub_8084E00:
push {r4,r5,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r3, r1, 24
lsls r2, 24
lsrs r5, r2, 24
cmp r3, 0
bne _08084E12
b _0808512E
_08084E12:
ldr r1, _08084E30
ldr r0, [r1]
ldr r2, _08084E34
adds r0, r2
ldrb r0, [r0]
adds r2, r1, 0
cmp r0, 0x3C
bls _08084E24
b _0808511A
_08084E24:
lsls r0, 2
ldr r1, _08084E38
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08084E30: .4byte gUnknown_203B418
_08084E34: .4byte 0x00003a0d
_08084E38: .4byte _08084E3C
.align 2, 0
_08084E3C:
.4byte _0808511A
.4byte _08084F30
.4byte _08084F30
.4byte _0808511A
.4byte _08084F44
.4byte _08084F44
.4byte _0808511A
.4byte _08084F58
.4byte _08084F58
.4byte _08084F58
.4byte _08084F6C
.4byte _08084F6C
.4byte _08084F6C
.4byte _08084F80
.4byte _08084F80
.4byte _08084F80
.4byte _0808511A
.4byte _0808511A
.4byte _08084F94
.4byte _08084F94
.4byte _08084F94
.4byte _0808511A
.4byte _0808511A
.4byte _08084FA8
.4byte _08084FA8
.4byte _08084FA8
.4byte _08084FBC
.4byte _08084FBC
.4byte _0808511A
.4byte _08084FD4
.4byte _08084FD4
.4byte _08084FD4
.4byte _08084FE8
.4byte _08084FE8
.4byte _08084FE8
.4byte _08084FFC
.4byte _08084FFC
.4byte _08084FFC
.4byte _08085010
.4byte _08085010
.4byte _08085010
.4byte _08085024
.4byte _08085024
.4byte _08085038
.4byte _08085038
.4byte _08085038
.4byte _0808504C
.4byte _08085064
.4byte _0808507C
.4byte _08085094
.4byte _08085094
.4byte _080850AC
.4byte _080850C4
.4byte _080850DC
.4byte _080850F4
.4byte _0808510C
.4byte _0808511A
.4byte _0808511A
.4byte _0808511A
.4byte _0808511A
.4byte _0808511A
_08084F30:
ldr r0, [r2]
ldr r1, _08084F40
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8086BDC
b _0808511A
.align 2, 0
_08084F40: .4byte 0x00003a0d
_08084F44:
ldr r0, [r2]
ldr r2, _08084F54
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8086F54
b _0808511A
.align 2, 0
_08084F54: .4byte 0x00003a0d
_08084F58:
ldr r0, [r2]
ldr r1, _08084F68
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8087334
b _0808511A
.align 2, 0
_08084F68: .4byte 0x00003a0d
_08084F6C:
ldr r0, [r2]
ldr r2, _08084F7C
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_80878F4
b _0808511A
.align 2, 0
_08084F7C: .4byte 0x00003a0d
_08084F80:
ldr r0, [r2]
ldr r1, _08084F90
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8088088
b _0808511A
.align 2, 0
_08084F90: .4byte 0x00003a0d
_08084F94:
ldr r0, [r2]
ldr r2, _08084FA4
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8088818
b _0808511A
.align 2, 0
_08084FA4: .4byte 0x00003a0d
_08084FA8:
ldr r0, [r2]
ldr r1, _08084FB8
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_80893B4
b _0808511A
.align 2, 0
_08084FB8: .4byte 0x00003a0d
_08084FBC:
ldr r0, [r2]
ldr r2, _08084FD0
adds r0, r2
ldrb r2, [r0]
adds r0, r4, 0
adds r1, r3, 0
bl sub_8089788
b _0808511A
.align 2, 0
_08084FD0: .4byte 0x00003a0d
_08084FD4:
ldr r0, [r2]
ldr r1, _08084FE4
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8089A00
b _0808511A
.align 2, 0
_08084FE4: .4byte 0x00003a0d
_08084FE8:
ldr r0, [r2]
ldr r2, _08084FF8
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8089CFC
b _0808511A
.align 2, 0
_08084FF8: .4byte 0x00003a0d
_08084FFC:
ldr r0, [r2]
ldr r1, _0808500C
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_8089FF0
b _0808511A
.align 2, 0
_0808500C: .4byte 0x00003a0d
_08085010:
ldr r0, [r2]
ldr r2, _08085020
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_808A36C
b _0808511A
.align 2, 0
_08085020: .4byte 0x00003a0d
_08085024:
ldr r0, [r2]
ldr r1, _08085034
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
bl sub_808A6E8
b _0808511A
.align 2, 0
_08085034: .4byte 0x00003a0d
_08085038:
ldr r0, [r2]
ldr r2, _08085048
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
bl sub_808AAF0
b _0808511A
.align 2, 0
_08085048: .4byte 0x00003a0d
_0808504C:
ldr r0, [r2]
ldr r1, _08085060
adds r0, r1
ldrb r1, [r0]
adds r2, r4, 0x4
adds r0, r3, 0
bl sub_808AE54
b _0808511A
.align 2, 0
_08085060: .4byte 0x00003a0d
_08085064:
ldr r0, [r2]
ldr r2, _08085078
adds r0, r2
ldrb r1, [r0]
adds r2, r4, 0x4
adds r0, r3, 0
bl sub_808AEC8
b _0808511A
.align 2, 0
_08085078: .4byte 0x00003a0d
_0808507C:
ldr r0, [r2]
ldr r1, _08085090
adds r0, r1
ldrb r1, [r0]
adds r2, r4, 0x4
adds r0, r3, 0
bl sub_808AF3C
b _0808511A
.align 2, 0
_08085090: .4byte 0x00003a0d
_08085094:
ldr r0, [r2]
ldr r2, _080850A8
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
adds r2, r5, 0
bl sub_808B3E4
b _0808511A
.align 2, 0
_080850A8: .4byte 0x00003a0d
_080850AC:
ldr r0, [r2]
ldr r1, _080850C0
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
adds r2, r5, 0
bl sub_808BE70
b _0808511A
.align 2, 0
_080850C0: .4byte 0x00003a0d
_080850C4:
ldr r0, [r2]
ldr r2, _080850D8
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
adds r2, r5, 0
bl sub_808C1A4
b _0808511A
.align 2, 0
_080850D8: .4byte 0x00003a0d
_080850DC:
ldr r0, [r2]
ldr r1, _080850F0
adds r0, r1
ldrb r1, [r0]
adds r0, r3, 0
adds r2, r5, 0
bl sub_808C414
b _0808511A
.align 2, 0
_080850F0: .4byte 0x00003a0d
_080850F4:
ldr r0, [r2]
ldr r2, _08085108
adds r0, r2
ldrb r1, [r0]
adds r0, r3, 0
adds r2, r5, 0
bl nullsub_100
b _0808511A
.align 2, 0
_08085108: .4byte 0x00003a0d
_0808510C:
ldr r0, [r2]
ldr r1, _08085134
adds r0, r1
ldrb r1, [r0]
adds r0, r4, 0
bl sub_808C948
_0808511A:
cmp r5, 0
bne _0808512E
ldr r0, _08085138
ldr r0, [r0]
ldrb r0, [r0, 0x2]
cmp r0, 0
beq _0808512E
ldr r0, _0808513C
bl sub_8083E88
_0808512E:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08085134: .4byte 0x00003a0d
_08085138: .4byte gUnknown_203B418
_0808513C: .4byte 0x000003e7
thumb_func_end sub_8084E00
thumb_func_start sub_8085140
sub_8085140:
push {lr}
ldr r1, _08085160
ldr r0, [r1]
ldr r2, _08085164
adds r0, r2
ldrb r0, [r0]
adds r2, r1, 0
cmp r0, 0x3C
bls _08085154
b _08085294
_08085154:
lsls r0, 2
ldr r1, _08085168
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08085160: .4byte gUnknown_203B418
_08085164: .4byte 0x00003a0d
_08085168: .4byte _0808516C
.align 2, 0
_0808516C:
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085260
.4byte _08085274
.4byte _08085288
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
.4byte _08085294
_08085260:
ldr r0, [r2]
ldr r1, _08085270
adds r0, r1
ldrb r0, [r0]
bl sub_808AFB0
b _08085294
.align 2, 0
_08085270: .4byte 0x00003a0d
_08085274:
ldr r0, [r2]
ldr r2, _08085284
adds r0, r2
ldrb r0, [r0]
bl sub_808B030
b _08085294
.align 2, 0
_08085284: .4byte 0x00003a0d
_08085288:
ldr r0, [r2]
ldr r1, _08085298
adds r0, r1
ldrb r0, [r0]
bl sub_808B0B0
_08085294:
pop {r0}
bx r0
.align 2, 0
_08085298: .4byte 0x00003a0d
thumb_func_end sub_8085140
thumb_func_start sub_808529C
sub_808529C:
push {lr}
lsls r0, 16
asrs r1, r0, 16
adds r2, r1, 0
movs r3, 0x40
movs r0, 0x86
lsls r0, 1
cmp r1, r0
beq _08085348
cmp r1, r0
bgt _080852E0
cmp r1, 0x90
beq _08085334
cmp r1, 0x90
bgt _080852CE
cmp r1, 0x38
beq _08085354
cmp r1, 0x38
bgt _080852C8
cmp r1, 0x17
beq _08085328
b _0808535A
_080852C8:
cmp r1, 0x5E
beq _08085328
b _0808535A
_080852CE:
cmp r1, 0x92
beq _08085330
cmp r1, 0x92
blt _0808532C
cmp r1, 0x96
beq _08085340
cmp r1, 0xFC
beq _08085324
b _0808535A
_080852E0:
ldr r0, _08085304
cmp r1, r0
beq _08085358
cmp r1, r0
bgt _08085308
subs r0, 0x87
cmp r1, r0
beq _0808534C
cmp r1, r0
blt _08085344
adds r0, 0x5
cmp r1, r0
beq _08085350
adds r0, 0x3A
cmp r1, r0
beq _08085328
b _0808535A
.align 2, 0
_08085304: .4byte 0x00000195
_08085308:
ldr r0, _08085320
cmp r2, r0
beq _08085358
cmp r2, r0
blt _08085358
adds r0, 0x4
cmp r2, r0
beq _08085338
adds r0, 0x1
cmp r2, r0
beq _0808533C
b _0808535A
.align 2, 0
_08085320: .4byte 0x00000197
_08085324:
movs r3, 0x1
b _0808535A
_08085328:
movs r3, 0x3
b _0808535A
_0808532C:
movs r3, 0x5
b _0808535A
_08085330:
movs r3, 0x7
b _0808535A
_08085334:
movs r3, 0x9
b _0808535A
_08085338:
movs r3, 0xC
b _0808535A
_0808533C:
movs r3, 0xF
b _0808535A
_08085340:
movs r3, 0x13
b _0808535A
_08085344:
movs r3, 0x15
b _0808535A
_08085348:
movs r3, 0x17
b _0808535A
_0808534C:
movs r3, 0x19
b _0808535A
_08085350:
movs r3, 0x1A
b _0808535A
_08085354:
movs r3, 0x11
b _0808535A
_08085358:
movs r3, 0x1D
_0808535A:
cmp r3, 0x40
beq _0808536E
adds r0, r3, 0
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808536E
movs r0, 0
b _08085370
_0808536E:
movs r0, 0x1
_08085370:
pop {r1}
bx r1
thumb_func_end sub_808529C
thumb_func_start sub_8085374
sub_8085374:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x14
movs r7, 0
movs r6, 0
bl sub_808D3F8
movs r2, 0x8
ldrsh r1, [r0, r2]
mov r8, r1
movs r5, 0
_0808538E:
ldr r0, _08085444
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08085448
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080853BE
ldr r1, [r4, 0x70]
ldrb r0, [r1, 0x7]
cmp r0, 0
beq _080853B2
adds r7, r4, 0
_080853B2:
adds r0, r1, 0
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _080853BE
adds r6, r4, 0
_080853BE:
adds r5, 0x1
cmp r5, 0x3
ble _0808538E
cmp r7, 0
beq _0808546E
cmp r6, 0
bne _0808546E
ldr r0, _08085444
ldr r0, [r0]
ldr r1, _0808544C
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
bne _0808546E
movs r6, 0
ldr r0, _08085450
ldr r4, [r0]
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0x63
beq _0808546E
mov r5, sp
movs r0, 0
mov r9, r0
_080853EE:
ldrh r0, [r7, 0x4]
adds r0, r4
lsls r0, 16
lsrs r0, 16
ldr r1, _08085454
ands r4, r1
orrs r4, r0
asrs r1, r4, 16
ldrh r2, [r7, 0x6]
adds r1, r2
lsls r1, 16
ldr r0, _08085458
ands r4, r0
orrs r4, r1
lsls r0, r4, 16
asrs r0, 16
asrs r1, r4, 16
bl sub_804954C
adds r1, r0, 0
mov r0, r8
bl sub_807034C
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0808545C
mov r0, r8
strh r0, [r5]
movs r0, 0x1
strh r0, [r5, 0x8]
movs r0, 0x2
strb r0, [r5, 0x2]
str r4, [sp, 0xC]
str r1, [sp, 0x4]
mov r1, r9
strb r1, [r5, 0x10]
mov r0, sp
movs r1, 0x1
bl sub_806B7F8
b _0808546E
.align 2, 0
_08085444: .4byte gUnknown_203B418
_08085448: .4byte 0x0001357c
_0808544C: .4byte 0x0000065c
_08085450: .4byte gUnknown_80F4598
_08085454: .4byte 0xffff0000
_08085458: .4byte 0x0000ffff
_0808545C:
adds r6, 0x1
ldr r0, _0808547C
lsls r1, r6, 2
adds r1, r0
ldr r4, [r1]
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0x63
bne _080853EE
_0808546E:
add sp, 0x14
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808547C: .4byte gUnknown_80F4598
thumb_func_end sub_8085374
thumb_func_start sub_8085480
sub_8085480:
push {lr}
bl sub_8083600
pop {r1}
bx r1
thumb_func_end sub_8085480
thumb_func_start sub_808548C
sub_808548C:
push {r4,r5,lr}
movs r5, 0
_08085490:
ldr r0, _080854B8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080854BC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080854C0
ldr r0, [r4, 0x70]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _080854C0
adds r0, r4, 0
b _080854CC
.align 2, 0
_080854B8: .4byte gUnknown_203B418
_080854BC: .4byte 0x0001357c
_080854C0:
adds r5, 0x1
cmp r5, 0x3
ble _08085490
movs r0, 0x2
bl sub_8085680
_080854CC:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_808548C
thumb_func_start sub_80854D4
sub_80854D4:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x20
movs r6, 0
movs r5, 0
add r0, sp, 0x10
mov r8, r0
mov r7, sp
_080854E6:
ldr r0, _080855D8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080855DC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08085504
stm r7!, {r4}
adds r6, 0x1
_08085504:
adds r5, 0x1
cmp r5, 0x3
ble _080854E6
cmp r6, 0x3
bgt _0808551C
movs r1, 0
lsls r0, r6, 2
add r0, sp
_08085514:
stm r0!, {r1}
adds r6, 0x1
cmp r6, 0x3
ble _08085514
_0808551C:
movs r6, 0
movs r4, 0
mov r2, sp
mov r3, r8
movs r5, 0x3
_08085526:
ldr r1, [r2]
cmp r1, 0
beq _0808553A
ldr r0, [r1, 0x70]
ldrb r0, [r0, 0x7]
cmp r0, 0
beq _0808553A
str r4, [r2]
stm r3!, {r1}
adds r6, 0x1
_0808553A:
adds r2, 0x4
subs r5, 0x1
cmp r5, 0
bge _08085526
movs r4, 0
mov r2, sp
lsls r0, r6, 2
mov r1, r8
adds r3, r0, r1
movs r5, 0x3
_0808554E:
ldr r1, [r2]
cmp r1, 0
beq _08085564
ldr r0, [r1, 0x70]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _08085564
str r4, [r2]
stm r3!, {r1}
adds r6, 0x1
_08085564:
adds r2, 0x4
subs r5, 0x1
cmp r5, 0
bge _0808554E
movs r3, 0
mov r2, sp
lsls r0, r6, 2
add r0, r8
movs r5, 0x3
_08085576:
ldr r1, [r2]
cmp r1, 0
beq _08085582
str r3, [r2]
stm r0!, {r1}
adds r6, 0x1
_08085582:
adds r2, 0x4
subs r5, 0x1
cmp r5, 0
bge _08085576
cmp r6, 0x3
bgt _0808559C
movs r1, 0
lsls r0, r6, 2
add r0, r8
_08085594:
stm r0!, {r1}
adds r6, 0x1
cmp r6, 0x3
ble _08085594
_0808559C:
movs r5, 0
mov r4, r8
_080855A0:
lsls r1, r5, 2
ldr r3, [r4]
cmp r3, 0
beq _080855C4
ldr r0, _080855D8
ldr r0, [r0]
adds r0, r1
ldr r2, _080855E0
adds r1, r0, r2
movs r6, 0
ldrsh r1, [r1, r6]
adds r2, 0x2
adds r0, r2
movs r6, 0
ldrsh r2, [r0, r6]
adds r0, r3, 0
bl sub_80856C8
_080855C4:
adds r4, 0x4
adds r5, 0x1
cmp r5, 0x3
ble _080855A0
add sp, 0x20
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080855D8: .4byte gUnknown_203B418
_080855DC: .4byte 0x0001357c
_080855E0: .4byte 0x0000e220
thumb_func_end sub_80854D4
thumb_func_start sub_80855E4
sub_80855E4:
push {r4-r7,lr}
adds r6, r0, 0
movs r7, 0
movs r5, 0
_080855EC:
ldr r0, _08085634
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08085638
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08085618
ldr r0, [r4, 0x70]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
bne _08085612
movs r7, 0x1
_08085612:
adds r0, r4, 0
bl _call_via_r6
_08085618:
adds r5, 0x1
cmp r5, 0x3
ble _080855EC
cmp r7, 0
bne _0808562E
bl sub_808548C
cmp r0, 0
beq _0808562E
bl _call_via_r6
_0808562E:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08085634: .4byte gUnknown_203B418
_08085638: .4byte 0x0001357c
thumb_func_end sub_80855E4
thumb_func_start sub_808563C
sub_808563C:
push {r4-r6,lr}
adds r6, r0, 0
movs r5, 0
_08085642:
ldr r0, _08085678
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _0808567C
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0808566C
ldr r0, [r4, 0x70]
adds r0, 0x40
ldrb r0, [r0]
cmp r0, 0x41
beq _0808566C
adds r0, r4, 0
bl _call_via_r6
_0808566C:
adds r5, 0x1
cmp r5, 0xF
ble _08085642
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08085678: .4byte gUnknown_203B418
_0808567C: .4byte 0x0001358c
thumb_func_end sub_808563C
thumb_func_start sub_8085680
sub_8085680:
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
movs r5, 0
_08085688:
ldr r0, _080856B0
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080856B4
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080856B8
ldr r0, [r4, 0x70]
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, r6
bne _080856B8
adds r0, r4, 0
b _080856C0
.align 2, 0
_080856B0: .4byte gUnknown_203B418
_080856B4: .4byte 0x000135cc
_080856B8:
adds r5, 0x1
cmp r5, 0x13
ble _08085688
movs r0, 0
_080856C0:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_8085680
thumb_func_start sub_80856C8
sub_80856C8:
push {r4,lr}
adds r4, r0, 0
movs r3, 0x1
bl sub_80694C0
adds r0, r4, 0
movs r1, 0
bl sub_804535C
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80856C8
thumb_func_start sub_80856E0
sub_80856E0:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r6, r0, 0
adds r7, r1, 0
ldr r0, [r6, 0x70]
mov r8, r0
adds r0, r6, 0
movs r1, 0x6
adds r2, r7, 0
bl sub_80861D4
movs r5, 0xBA
lsls r5, 1
add r5, r8
movs r4, 0x4
_08085700:
ldr r0, [r5]
movs r1, 0x80
lsls r1, 2
adds r0, r1
str r0, [r5]
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08085700
movs r1, 0x7
adds r0, r7, 0
ands r0, r1
mov r1, r8
adds r1, 0x46
strb r0, [r1]
adds r0, r6, 0
adds r1, r7, 0
bl sub_806CE68
movs r5, 0xBA
lsls r5, 1
add r5, r8
movs r4, 0x4
_08085732:
ldr r0, [r5]
ldr r1, _08085760
adds r0, r1
str r0, [r5]
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _08085732
movs r1, 0xBA
lsls r1, 1
add r1, r8
movs r0, 0
str r0, [r1]
movs r0, 0x46
bl sub_803E46C
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08085760: .4byte 0xfffffe00
thumb_func_end sub_80856E0
thumb_func_start sub_8085764
sub_8085764:
push {r4,r5,lr}
sub sp, 0x74
mov r0, sp
bl sub_80457DC
movs r5, 0
_08085770:
ldr r0, _080857AC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080857B0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0808579E
ldr r0, [r4, 0x70]
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x2
bne _0808579E
adds r0, r4, 0
ldr r1, _080857B4
mov r2, sp
bl sub_8068FE0
_0808579E:
adds r5, 0x1
cmp r5, 0xF
ble _08085770
add sp, 0x74
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080857AC: .4byte gUnknown_203B418
_080857B0: .4byte 0x0001358c
_080857B4: .4byte 0x00000207
thumb_func_end sub_8085764
thumb_func_start sub_80857B8
sub_80857B8:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
movs r7, 0
ldr r0, _08085854
mov r9, r0
ldr r1, _08085858
mov r8, r1
_080857CA:
mov r2, r9
ldr r0, [r2]
lsls r1, r7, 2
ldr r3, _0808585C
adds r0, r3
adds r0, r1
ldr r6, [r0]
adds r0, r6, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08085840
ldr r5, [r6, 0x70]
mov r0, r9
ldr r1, [r0]
ldrb r0, [r1, 0x4]
cmp r0, 0
bne _08085840
ldrb r4, [r1, 0x2]
cmp r4, 0
bne _08085840
adds r0, r6, 0
movs r1, 0
bl sub_804535C
movs r1, 0xAE
lsls r1, 1
adds r0, r5, r1
strb r4, [r0]
adds r1, r5, 0
adds r1, 0xFE
movs r0, 0x63
strb r0, [r1]
adds r2, r5, 0
adds r2, 0x46
ldrb r0, [r2]
lsls r0, 2
add r0, r8
ldrh r1, [r6, 0x4]
ldrh r0, [r0]
adds r1, r0
movs r3, 0xB6
lsls r3, 1
adds r0, r5, r3
strh r1, [r0]
ldrb r0, [r2]
lsls r0, 2
add r0, r8
ldrh r1, [r6, 0x6]
ldrh r0, [r0, 0x2]
adds r1, r0
adds r3, 0x2
adds r0, r5, r3
strh r1, [r0]
ldrb r1, [r2]
adds r0, r6, 0
bl sub_806CE68
_08085840:
adds r7, 0x1
cmp r7, 0x13
ble _080857CA
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08085854: .4byte gUnknown_203B418
_08085858: .4byte gUnknown_80F4448
_0808585C: .4byte 0x000135cc
thumb_func_end sub_80857B8
thumb_func_start sub_8085860
sub_8085860:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r0, 0
bl sub_803F4A0
lsls r0, r4, 1
adds r0, r4
lsls r0, 11
movs r1, 0xC0
lsls r1, 4
adds r0, r1
lsls r1, r5, 1
adds r1, r5
lsls r1, 11
movs r2, 0x80
lsls r2, 5
adds r1, r2
bl sub_803F878
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8085860
thumb_func_start sub_8085890
sub_8085890:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r0, 0
bl sub_803F4A0
adds r0, r4, 0
adds r1, r5, 0
bl sub_803F878
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8085890
thumb_func_start sub_80858AC
sub_80858AC:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
adds r4, r1, 0
bl sub_803F994
adds r6, r0, 0
bl sub_803F9B0
adds r5, r0, 0
ldr r0, [r7]
subs r0, r6
adds r1, r4, 0
bl __divsi3
mov r9, r0
ldr r0, [r7, 0x4]
subs r0, r5
adds r1, r4, 0
bl __divsi3
mov r8, r0
movs r0, 0
bl sub_803F4A0
cmp r4, 0
ble _080858FE
_080858E6:
add r6, r9
add r5, r8
adds r0, r6, 0
adds r1, r5, 0
bl sub_803F878
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bne _080858E6
_080858FE:
ldr r0, [r7]
ldr r1, [r7, 0x4]
bl sub_803F878
movs r0, 0x46
bl sub_803E46C
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80858AC
thumb_func_start sub_8085918
sub_8085918:
push {r4,lr}
ldr r3, [r0, 0x70]
movs r4, 0x7
adds r2, r1, 0
ands r2, r4
adds r3, 0x46
strb r2, [r3]
bl sub_806CE68
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8085918
thumb_func_start sub_8085930
sub_8085930:
push {r4-r7,lr}
adds r6, r0, 0
movs r5, 0
movs r0, 0x7
adds r7, r6, 0
ands r7, r0
_0808593C:
ldr r0, _0808596C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08085970
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08085982
cmp r6, 0x7
ble _08085974
movs r0, 0x8
bl RandomCapped
adds r1, r0, 0
adds r0, r4, 0
bl sub_806CE68
b _08085982
.align 2, 0
_0808596C: .4byte gUnknown_203B418
_08085970: .4byte 0x0001357c
_08085974:
ldr r0, [r4, 0x70]
adds r0, 0x46
strb r7, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_806CE68
_08085982:
adds r5, 0x1
cmp r5, 0x3
ble _0808593C
movs r5, 0
movs r0, 0x7
adds r7, r6, 0
ands r7, r0
_08085990:
ldr r0, _080859CC
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080859D0
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080859E2
ldr r1, [r4, 0x70]
adds r0, r1, 0
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x2
bne _080859E2
cmp r6, 0x7
ble _080859D4
movs r0, 0x8
bl RandomCapped
adds r1, r0, 0
adds r0, r4, 0
bl sub_806CE68
b _080859E2
.align 2, 0
_080859CC: .4byte gUnknown_203B418
_080859D0: .4byte 0x0001358c
_080859D4:
adds r0, r1, 0
adds r0, 0x46
strb r7, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_806CE68
_080859E2:
adds r5, 0x1
cmp r5, 0xF
ble _08085990
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_8085930
thumb_func_start sub_80859F0
sub_80859F0:
push {r4-r7,lr}
adds r6, r0, 0
movs r5, 0
movs r0, 0x7
adds r7, r6, 0
ands r7, r0
_080859FC:
ldr r0, _08085A2C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08085A30
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08085A42
cmp r6, 0x7
ble _08085A34
movs r0, 0x8
bl RandomCapped
adds r1, r0, 0
adds r0, r4, 0
bl sub_806CE68
b _08085A42
.align 2, 0
_08085A2C: .4byte gUnknown_203B418
_08085A30: .4byte 0x0001358c
_08085A34:
ldr r0, [r4, 0x70]
adds r0, 0x46
strb r7, [r0]
adds r0, r4, 0
adds r1, r6, 0
bl sub_806CE68
_08085A42:
adds r5, 0x1
cmp r5, 0xF
ble _080859FC
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80859F0
thumb_func_start sub_8085A50
sub_8085A50:
push {lr}
ldr r0, [r0, 0x70]
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, 0x24
bhi _08085B04
lsls r0, 2
ldr r1, _08085A68
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08085A68: .4byte _08085A6C
.align 2, 0
_08085A6C:
.4byte _08085B04
.4byte _08085B00
.4byte _08085B04
.4byte _08085B00
.4byte _08085B04
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B04
.4byte _08085B04
.4byte _08085B04
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
.4byte _08085B00
_08085B00:
movs r0, 0x1
b _08085B06
_08085B04:
movs r0, 0
_08085B06:
pop {r1}
bx r1
thumb_func_end sub_8085A50
thumb_func_start sub_8085B0C
sub_8085B0C:
push {r4,r5,lr}
sub sp, 0x1C
adds r5, r0, 0
ldr r1, _08085B48
mov r0, sp
movs r2, 0x19
bl memcpy
mov r0, sp
ldrb r0, [r0]
cmp r0, 0
beq _08085B3E
mov r4, sp
_08085B26:
ldrb r1, [r4]
adds r0, r5, 0
bl sub_8085918
movs r0, 0x6
movs r1, 0x46
bl sub_803E708
adds r4, 0x1
ldrb r0, [r4]
cmp r0, 0
bne _08085B26
_08085B3E:
add sp, 0x1C
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08085B48: .4byte gUnknown_8107358
thumb_func_end sub_8085B0C
thumb_func_start sub_8085B4C
sub_8085B4C:
push {r4-r6,lr}
adds r5, r0, 0
ldr r0, _08085B7C
str r3, [r0]
cmp r3, 0
ble _08085B76
movs r6, 0x1
adds r4, r1, 0
adds r1, r5, 0
_08085B5E:
strb r6, [r1]
ldm r2!, {r0}
str r0, [r1, 0x4]
ldm r4!, {r0}
str r0, [r1, 0xC]
movs r5, 0x4
ldrsh r0, [r0, r5]
str r0, [r1, 0x8]
adds r1, 0x10
subs r3, 0x1
cmp r3, 0
bne _08085B5E
_08085B76:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08085B7C: .4byte gUnknown_202F3D8
thumb_func_end sub_8085B4C
thumb_func_start sub_8085B80
sub_8085B80:
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r1, r0, 0
movs r0, 0
mov r8, r0
movs r7, 0
ldr r0, _08085BE4
ldr r0, [r0]
cmp r8, r0
bge _08085C3E
adds r5, r1, 0
_08085B98:
ldr r6, [r5, 0x4]
ldr r2, [r6, 0x70]
adds r3, r2, 0
ldr r4, [r5, 0xC]
ldrb r0, [r5]
cmp r0, 0
beq _08085C32
movs r1, 0x1
mov r8, r1
ldr r0, [r5, 0x8]
cmp r0, 0
bne _08085C08
adds r4, 0x8
movs r1, 0x4
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08085BE8
strb r0, [r5]
ldrb r1, [r4]
movs r0, 0x7
ands r0, r1
adds r1, r2, 0
adds r1, 0x46
strb r0, [r1]
movs r3, 0
ldrsh r2, [r4, r3]
adds r0, r6, 0
movs r1, 0x7
bl sub_806CDD4
movs r0, 0xA
ldrsh r1, [r4, r0]
movs r3, 0xC
ldrsh r2, [r4, r3]
adds r0, r6, 0
bl sub_80856C8
b _08085C32
.align 2, 0
_08085BE4: .4byte gUnknown_202F3D8
_08085BE8:
movs r1, 0x4
ldrsh r0, [r4, r1]
str r0, [r5, 0x8]
str r4, [r5, 0xC]
ldrb r1, [r4]
movs r0, 0x7
ands r0, r1
adds r1, r3, 0
adds r1, 0x46
strb r0, [r1]
movs r3, 0
ldrsh r2, [r4, r3]
adds r0, r6, 0
movs r1, 0
bl sub_806CDD4
_08085C08:
ldr r0, [r5, 0x8]
subs r0, 0x1
str r0, [r5, 0x8]
ldr r1, _08085C4C
movs r2, 0
ldrsh r0, [r4, r2]
lsls r0, 2
adds r0, r1
movs r3, 0
ldrsh r1, [r0, r3]
movs r3, 0x2
ldrsh r2, [r4, r3]
muls r1, r2
lsls r1, 8
movs r3, 0x2
ldrsh r0, [r0, r3]
muls r2, r0
lsls r2, 8
adds r0, r6, 0
bl sub_804539C
_08085C32:
adds r5, 0x10
adds r7, 0x1
ldr r0, _08085C50
ldr r0, [r0]
cmp r7, r0
blt _08085B98
_08085C3E:
mov r0, r8
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_08085C4C: .4byte gUnknown_80F4448
_08085C50: .4byte gUnknown_202F3D8
thumb_func_end sub_8085B80
thumb_func_start sub_8085C54
sub_8085C54:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x28
str r0, [sp, 0x14]
mov r10, r1
mov r9, r2
ldr r4, [sp, 0x48]
lsls r3, 24
lsrs r3, 24
str r3, [sp, 0x18]
lsls r4, 24
lsrs r4, 24
bl sub_8085E98
movs r0, 0
mov r8, r0
ldr r0, _08085E70
ldr r0, [r0]
ldr r5, [r0, 0x4]
cmp r4, 0
beq _08085CAE
ldr r1, [sp, 0x14]
cmp r1, 0
blt _08085C92
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
str r0, [sp, 0x14]
_08085C92:
mov r2, r10
cmp r2, 0
blt _08085CA0
lsrs r0, r2, 31
add r0, r10
asrs r0, 1
mov r10, r0
_08085CA0:
mov r3, r9
cmp r3, 0
blt _08085CAE
lsrs r0, r3, 31
add r0, r9
asrs r0, 1
mov r9, r0
_08085CAE:
ldr r1, _08085E74
ldr r0, [sp, 0x8]
ands r0, r1
ldr r1, _08085E78
ands r0, r1
ldr r1, _08085E7C
ands r0, r1
str r0, [sp, 0x8]
ldr r0, _08085E80
ldr r2, [r0]
ldr r0, _08085E84
ldr r3, [r0]
movs r0, 0xBE
lsls r0, 1
adds r3, r0
mov r0, r8
add r1, sp, 0x8
bl SetBGPaletteBufferColorRGB
adds r5, 0x4
movs r1, 0x1
add r8, r1
ldr r2, [sp, 0x14]
lsls r2, 16
str r2, [sp, 0x1C]
mov r3, r10
lsls r3, 16
str r3, [sp, 0x20]
mov r0, r9
lsls r0, 16
str r0, [sp, 0x24]
add r7, sp, 0xC
movs r1, 0xA0
cmp r1, 0x1
ble _08085D56
add r6, sp, 0x8
movs r4, 0xA0
subs r4, 0x1
_08085CFA:
ldrb r0, [r5]
ldr r3, [sp, 0x14]
adds r2, r0, r3
ldrb r0, [r5, 0x1]
mov r3, r10
adds r1, r0, r3
ldrb r0, [r5, 0x2]
add r0, r9
cmp r2, 0xFF
ble _08085D10
movs r2, 0xFF
_08085D10:
cmp r1, 0xFF
ble _08085D16
movs r1, 0xFF
_08085D16:
cmp r0, 0xFF
ble _08085D1C
movs r0, 0xFF
_08085D1C:
cmp r2, 0
bge _08085D22
movs r2, 0
_08085D22:
cmp r1, 0
bge _08085D28
movs r1, 0
_08085D28:
cmp r0, 0
bge _08085D2E
movs r0, 0
_08085D2E:
strb r2, [r6]
strb r1, [r6, 0x1]
strb r0, [r6, 0x2]
ldr r0, _08085E80
ldr r2, [r0]
ldr r0, _08085E84
ldr r3, [r0]
movs r0, 0xBE
lsls r0, 1
adds r3, r0
mov r0, r8
add r1, sp, 0x8
bl SetBGPaletteBufferColorRGB
adds r5, 0x4
movs r1, 0x1
add r8, r1
subs r4, 0x1
cmp r4, 0
bne _08085CFA
_08085D56:
ldr r2, _08085E88
ldr r3, [sp, 0x1C]
lsrs r0, r3, 16
ldr r1, [sp, 0x20]
orrs r0, r1
str r0, [sp, 0xC]
ldr r3, [sp, 0x24]
lsrs r1, r3, 16
ldr r0, [r7, 0x4]
ands r0, r2
orrs r0, r1
str r0, [r7, 0x4]
ldr r0, _08085E8C
ldr r1, _08085E80
ldr r3, [r1]
ldr r1, _08085E84
ldr r1, [r1]
movs r2, 0xBE
lsls r2, 1
adds r1, r2
str r1, [sp]
str r7, [sp, 0x4]
movs r1, 0xA0
movs r2, 0x20
bl sub_8004C00
movs r3, 0x20
add r8, r3
ldr r5, _08085E90
add r6, sp, 0x8
movs r4, 0x20
_08085D94:
ldrb r0, [r5]
ldr r1, [sp, 0x14]
adds r2, r0, r1
ldrb r0, [r5, 0x1]
mov r3, r10
adds r1, r0, r3
ldrb r0, [r5, 0x2]
add r0, r9
cmp r2, 0xFF
ble _08085DAA
movs r2, 0xFF
_08085DAA:
cmp r1, 0xFF
ble _08085DB0
movs r1, 0xFF
_08085DB0:
cmp r0, 0xFF
ble _08085DB6
movs r0, 0xFF
_08085DB6:
cmp r2, 0
bge _08085DBC
movs r2, 0
_08085DBC:
cmp r1, 0
bge _08085DC2
movs r1, 0
_08085DC2:
cmp r0, 0
bge _08085DC8
movs r0, 0
_08085DC8:
strb r2, [r6]
strb r1, [r6, 0x1]
strb r0, [r6, 0x2]
ldr r0, _08085E80
ldr r2, [r0]
ldr r7, _08085E84
ldr r3, [r7]
movs r0, 0xBE
lsls r0, 1
adds r3, r0
mov r0, r8
add r1, sp, 0x8
bl SetBGPaletteBufferColorRGB
adds r5, 0x4
movs r1, 0x1
add r8, r1
subs r4, 0x1
cmp r4, 0
bne _08085D94
ldr r2, [sp, 0x18]
cmp r2, 0
beq _08085E5E
ldr r0, [r7]
ldr r3, _08085E94
adds r0, r3
ldr r0, [r0]
ldr r5, [r0, 0x4]
movs r0, 0x80
lsls r0, 1
mov r8, r0
add r6, sp, 0x8
movs r4, 0xD0
_08085E0A:
ldrb r0, [r5]
ldr r1, [sp, 0x14]
adds r2, r0, r1
ldrb r0, [r5, 0x1]
mov r3, r10
adds r1, r0, r3
ldrb r0, [r5, 0x2]
add r0, r9
cmp r2, 0xFF
ble _08085E20
movs r2, 0xFF
_08085E20:
cmp r1, 0xFF
ble _08085E26
movs r1, 0xFF
_08085E26:
cmp r0, 0xFF
ble _08085E2C
movs r0, 0xFF
_08085E2C:
cmp r2, 0
bge _08085E32
movs r2, 0
_08085E32:
cmp r1, 0
bge _08085E38
movs r1, 0
_08085E38:
cmp r0, 0
bge _08085E3E
movs r0, 0
_08085E3E:
strb r2, [r6]
strb r1, [r6, 0x1]
strb r0, [r6, 0x2]
ldr r0, _08085E80
ldr r2, [r0]
mov r0, r8
add r1, sp, 0x8
movs r3, 0
bl SetBGPaletteBufferColorRGB
adds r5, 0x4
movs r0, 0x1
add r8, r0
subs r4, 0x1
cmp r4, 0
bne _08085E0A
_08085E5E:
add sp, 0x28
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_08085E70: .4byte gUnknown_202EE88
_08085E74: .4byte 0xffffff00
_08085E78: .4byte 0xffff00ff
_08085E7C: .4byte 0xff00ffff
_08085E80: .4byte gUnknown_202EDC8
_08085E84: .4byte gUnknown_203B418
_08085E88: .4byte 0xffff0000
_08085E8C: .4byte gUnknown_202EE8C
_08085E90: .4byte gUnknown_202ECA4
_08085E94: .4byte 0x000181e4
thumb_func_end sub_8085C54
thumb_func_start sub_8085E98
sub_8085E98:
ldr r0, _08085EA8
ldr r0, [r0]
ldr r1, _08085EAC
adds r0, r1
movs r1, 0
strb r1, [r0]
bx lr
.align 2, 0
_08085EA8: .4byte gUnknown_203B418
_08085EAC: .4byte 0x00018215
thumb_func_end sub_8085E98
thumb_func_start sub_8085EB0
sub_8085EB0:
ldr r0, _08085EC0
ldr r0, [r0]
ldr r1, _08085EC4
adds r0, r1
movs r1, 0x1
strb r1, [r0]
bx lr
.align 2, 0
_08085EC0: .4byte gUnknown_203B418
_08085EC4: .4byte 0x00018215
thumb_func_end sub_8085EB0
thumb_func_start sub_8085EC8
sub_8085EC8:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x28
adds r4, r0, 0
mov r8, r1
mov r9, r2
adds r6, r3, 0
ldr r5, [sp, 0x40]
lsls r4, 16
asrs r4, 16
lsls r5, 24
lsrs r5, 24
adds r0, r4, 0
bl sub_800EE5C
bl sub_800EF64
movs r0, 0x46
bl sub_803E46C
str r4, [sp]
mov r0, r8
str r0, [sp, 0x4]
mov r2, r9
str r2, [sp, 0x8]
mov r1, sp
ldrh r0, [r6]
movs r2, 0
strh r0, [r1, 0xC]
ldrh r0, [r6, 0x2]
strh r0, [r1, 0xE]
mov r0, sp
strh r2, [r0, 0x10]
strh r2, [r0, 0x12]
ldr r0, _08085F3C
str r0, [sp, 0x18]
add r1, sp, 0x1C
ldr r0, _08085F40
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
mov r0, sp
bl sub_800E890
cmp r5, 0
beq _08085F2E
bl sub_8085F44
movs r0, 0x1
negs r0, r0
_08085F2E:
add sp, 0x28
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r1}
bx r1
.align 2, 0
_08085F3C: .4byte 0x0000ffff
_08085F40: .4byte gUnknown_8107374
thumb_func_end sub_8085EC8
thumb_func_start sub_8085F44
sub_8085F44:
push {r4,lr}
adds r4, r0, 0
b _08085F5C
_08085F4A:
ldr r0, _08085F70
ldr r0, [r0]
ldr r1, _08085F74
adds r0, r1
bl sub_800E90C
movs r0, 0x46
bl sub_803E46C
_08085F5C:
adds r0, r4, 0
bl sub_800E9A8
lsls r0, 24
cmp r0, 0
bne _08085F4A
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08085F70: .4byte gUnknown_203B418
_08085F74: .4byte 0x000181f0
thumb_func_end sub_8085F44
thumb_func_start sub_8085F78
sub_8085F78:
push {lr}
ldr r0, _08085F94
ldr r0, [r0]
ldr r1, _08085F98
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x3C
bls _08085F8A
b _080860A4
_08085F8A:
lsls r0, 2
ldr r1, _08085F9C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_08085F94: .4byte gUnknown_203B418
_08085F98: .4byte 0x00003a0d
_08085F9C: .4byte _08085FA0
.align 2, 0
_08085FA0:
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _08086094
.4byte _08086094
.4byte _08086094
.4byte _0808609A
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A0
.4byte _080860A0
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
.4byte _080860A4
_08086094:
bl sub_8088848
b _080860A4
_0808609A:
bl sub_8088EE8
b _080860A4
_080860A0:
bl sub_808A718
_080860A4:
pop {r0}
bx r0
thumb_func_end sub_8085F78
thumb_func_start sub_80860A8
sub_80860A8:
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
movs r5, 0
ldr r0, _08086108
ldr r2, [r0]
movs r3, 0x1
_080860B6:
ldrb r1, [r2]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _080860C6
ldrb r0, [r2, 0x2]
cmp r0, r6
beq _08086104
_080860C6:
adds r2, 0x4
adds r5, 0x1
cmp r5, 0x13
ble _080860B6
movs r5, 0
_080860D0:
ldr r0, _0808610C
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08086110
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08086114
ldr r2, [r4, 0x70]
adds r0, r2, 0
adds r0, 0x60
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08086114
adds r0, r2, 0
adds r0, 0x62
ldrb r0, [r0]
cmp r0, r6
bne _08086114
_08086104:
movs r0, 0x1
b _0808611C
.align 2, 0
_08086108: .4byte gUnknown_203B460
_0808610C: .4byte gUnknown_203B418
_08086110: .4byte 0x0001357c
_08086114:
adds r5, 0x1
cmp r5, 0x3
ble _080860D0
movs r0, 0
_0808611C:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_80860A8
thumb_func_start sub_8086124
sub_8086124:
ldr r0, [r0, 0x70]
movs r2, 0xB0
lsls r2, 1
adds r0, r2
strb r1, [r0]
bx lr
thumb_func_end sub_8086124
thumb_func_start sub_8086130
sub_8086130:
push {lr}
movs r0, 0x3C
bl sub_8083ED8
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08086194
ldr r0, [r0]
bl sub_8052FB8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08086198
ldr r0, [r0]
bl sub_8052FB8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _0808619C
ldr r0, [r0]
bl sub_8052FB8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _080861A0
ldr r0, [r0]
bl sub_8052FB8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _080861A4
ldr r0, [r0]
bl sub_8052FB8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
pop {r0}
bx r0
.align 2, 0
_08086194: .4byte gUnknown_810665C
_08086198: .4byte gUnknown_810668C
_0808619C: .4byte gUnknown_81066D4
_080861A0: .4byte gUnknown_81066F0
_080861A4: .4byte gUnknown_810671C
thumb_func_end sub_8086130
thumb_func_start sub_80861A8
sub_80861A8:
push {lr}
movs r1, 0
movs r2, 0x8
bl sub_806CDD4
pop {r0}
bx r0
thumb_func_end sub_80861A8
thumb_func_start sub_80861B8
sub_80861B8:
push {r4,r5,lr}
adds r4, r1, 0
lsls r4, 24
lsrs r4, 24
ldr r5, [r0, 0x70]
adds r1, r4, 0
bl sub_806CDD4
adds r5, 0xFE
strb r4, [r5]
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80861B8
thumb_func_start sub_80861D4
sub_80861D4:
push {r4,lr}
adds r4, r0, 0
lsls r1, 24
lsrs r1, 24
bl sub_806CDD4
adds r0, r4, 0
bl sub_80861EC
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80861D4
thumb_func_start sub_80861EC
sub_80861EC:
ldr r0, [r0, 0x70]
adds r0, 0xFE
movs r1, 0x63
strb r1, [r0]
bx lr
thumb_func_end sub_80861EC
thumb_func_start sub_80861F8
sub_80861F8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x2C
adds r6, r1, 0
lsls r0, 16
asrs r0, 16
adds r5, r0, 0
lsls r2, 24
lsrs r2, 24
mov r10, r2
bl sub_800EE5C
bl sub_800EF64
movs r0, 0x46
bl sub_803E46C
ldr r0, [r6, 0x70]
mov r8, r0
movs r1, 0
mov r9, r1
str r1, [sp, 0x28]
adds r0, r5, 0
bl sub_800E700
adds r7, r0, 0
add r4, sp, 0x28
movs r2, 0x1
negs r2, r2
cmp r7, r2
beq _0808624A
adds r1, r6, 0
adds r1, 0x28
lsls r2, r7, 24
lsrs r2, 24
adds r0, r4, 0
bl sub_800569C
_0808624A:
str r5, [sp]
mov r3, r9
str r3, [sp, 0x4]
mov r0, r8
adds r0, 0x46
ldrb r0, [r0]
str r0, [sp, 0x8]
mov r1, sp
ldr r0, [r6, 0xC]
cmp r0, 0
bge _08086262
adds r0, 0xFF
_08086262:
asrs r0, 8
strh r0, [r1, 0xC]
mov r1, sp
ldr r0, [r6, 0x10]
cmp r0, 0
bge _08086270
adds r0, 0xFF
_08086270:
asrs r0, 8
strh r0, [r1, 0xE]
mov r1, sp
ldrh r0, [r4]
strh r0, [r1, 0x10]
add r0, sp, 0x28
ldrh r0, [r0, 0x2]
strh r0, [r1, 0x12]
str r7, [sp, 0x14]
ldr r0, _080862B4
str r0, [sp, 0x18]
add r1, sp, 0x1C
ldr r0, _080862B8
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
mov r0, sp
bl sub_800E890
mov r4, r10
cmp r4, 0
beq _080862A2
bl sub_8085F44
movs r0, 0x1
negs r0, r0
_080862A2:
add sp, 0x2C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.align 2, 0
_080862B4: .4byte 0x0000ffff
_080862B8: .4byte gUnknown_8107380
thumb_func_end sub_80861F8
thumb_func_start sub_80862BC
sub_80862BC:
push {r4,lr}
adds r4, r0, 0
movs r0, 0xE8
lsls r0, 1
bl sub_8083E38
ldr r0, _080862D8
adds r1, r4, 0
movs r2, 0
bl sub_80861F8
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080862D8: .4byte 0x00000143
thumb_func_end sub_80862BC
thumb_func_start sub_80862DC
sub_80862DC:
push {r4,lr}
sub sp, 0x8
adds r4, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp]
ldr r0, [r4, 0x10]
movs r1, 0xE0
lsls r1, 6
adds r0, r1
str r0, [sp, 0x4]
adds r0, r4, 0
mov r1, sp
bl sub_804535C
adds r0, r4, 0
movs r1, 0
movs r2, 0x4
bl sub_806CDD4
adds r0, r4, 0
bl sub_8086A54
add sp, 0x8
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_80862DC
thumb_func_start sub_8086310
sub_8086310:
push {r4,lr}
sub sp, 0x8
adds r4, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp]
ldr r0, [r4, 0x10]
movs r1, 0x90
lsls r1, 8
adds r0, r1
str r0, [sp, 0x4]
adds r0, r4, 0
mov r1, sp
bl sub_804535C
adds r0, r4, 0
movs r1, 0
bl sub_806CE68
adds r0, r4, 0
bl sub_8086A3C
adds r4, 0x20
movs r0, 0
strb r0, [r4]
add sp, 0x8
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8086310
thumb_func_start sub_8086348
sub_8086348:
push {r4,lr}
sub sp, 0x8
adds r4, r0, 0
ldr r0, [r4, 0xC]
movs r1, 0xF0
lsls r1, 7
adds r0, r1
str r0, [sp]
ldr r0, [r4, 0x10]
ldr r1, _08086380
adds r0, r1
str r0, [sp, 0x4]
adds r0, r4, 0
mov r1, sp
bl sub_804535C
adds r0, r4, 0
movs r1, 0
movs r2, 0x6
bl sub_806CDD4
adds r0, r4, 0
bl sub_8086A54
add sp, 0x8
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08086380: .4byte 0xffffe000
thumb_func_end sub_8086348
thumb_func_start sub_8086384
sub_8086384:
push {r4,lr}
sub sp, 0x8
adds r4, r0, 0
ldr r0, [r4, 0xC]
movs r1, 0xF0
lsls r1, 7
adds r0, r1
str r0, [sp]
ldr r0, [r4, 0x10]
str r0, [sp, 0x4]
adds r0, r4, 0
mov r1, sp
bl sub_804535C
adds r0, r4, 0
movs r1, 0
movs r2, 0x6
bl sub_806CDD4
adds r0, r4, 0
bl sub_8086A54
add sp, 0x8
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8086384
thumb_func_start sub_80863B8
sub_80863B8:
push {lr}
movs r1, 0
movs r2, 0x4
bl sub_806CDD4
pop {r0}
bx r0
thumb_func_end sub_80863B8
thumb_func_start sub_80863C8
sub_80863C8:
push {lr}
movs r1, 0
movs r2, 0
bl sub_806CDD4
pop {r0}
bx r0
thumb_func_end sub_80863C8
thumb_func_start sub_80863D8
sub_80863D8:
push {lr}
movs r1, 0
movs r2, 0x6
bl sub_806CDD4
pop {r0}
bx r0
thumb_func_end sub_80863D8
thumb_func_start sub_80863E8
sub_80863E8:
push {lr}
movs r1, 0x6
movs r2, 0x4
bl sub_806CDD4
pop {r0}
bx r0
thumb_func_end sub_80863E8
thumb_func_start sub_80863F8
sub_80863F8:
push {lr}
movs r1, 0x4
bl sub_806CE68
pop {r0}
bx r0
thumb_func_end sub_80863F8
thumb_func_start sub_8086404
sub_8086404:
push {lr}
movs r1, 0x6
bl sub_806CE68
pop {r0}
bx r0
thumb_func_end sub_8086404
thumb_func_start sub_8086410
sub_8086410:
push {lr}
ldr r2, _08086420
movs r1, 0
bl sub_804539C
pop {r0}
bx r0
.align 2, 0
_08086420: .4byte 0xffffff00
thumb_func_end sub_8086410
thumb_func_start sub_8086424
sub_8086424:
push {lr}
movs r2, 0x80
lsls r2, 1
movs r1, 0
bl sub_804539C
pop {r0}
bx r0
thumb_func_end sub_8086424
thumb_func_start sub_8086434
sub_8086434:
push {lr}
ldr r1, _08086444
movs r2, 0
bl sub_804539C
pop {r0}
bx r0
.align 2, 0
_08086444: .4byte 0xffffff00
thumb_func_end sub_8086434
thumb_func_start sub_8086448
sub_8086448:
push {r4,r5,lr}
ldr r0, _08086488
bl sub_80855E4
movs r5, 0x37
_08086452:
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
movs r0, 0x80
lsls r0, 1
adds r1, r0
adds r0, r4, 0
bl sub_803F878
ldr r0, _0808648C
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _08086452
ldr r0, _08086490
bl sub_80855E4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08086488: .4byte sub_80862DC
_0808648C: .4byte sub_8086410
_08086490: .4byte sub_80863F8
thumb_func_end sub_8086448
thumb_func_start sub_8086494
sub_8086494:
push {r4,lr}
movs r0, 0x3
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x2
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
ldr r0, _080864F4
bl sub_80855E4
movs r4, 0x8F
_080864D6:
ldr r0, _080864F8
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _080864D6
ldr r0, _080864FC
bl sub_80855E4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080864F4: .4byte sub_80863C8
_080864F8: .4byte sub_8086424
_080864FC: .4byte sub_8086310
thumb_func_end sub_8086494
thumb_func_start sub_8086500
sub_8086500:
push {r4,r5,lr}
ldr r0, _08086540
bl sub_80855E4
movs r5, 0x47
_0808650A:
bl sub_803F994
adds r4, r0, 0
movs r0, 0x80
lsls r0, 1
adds r4, r0
bl sub_803F9B0
adds r1, r0, 0
adds r0, r4, 0
bl sub_803F878
ldr r0, _08086544
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _0808650A
ldr r0, _08086548
bl sub_80855E4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08086540: .4byte sub_8086348
_08086544: .4byte sub_8086434
_08086548: .4byte sub_8086404
thumb_func_end sub_8086500
thumb_func_start sub_808654C
sub_808654C:
push {r4,r5,lr}
ldr r0, _0808658C
bl sub_80855E4
movs r5, 0x77
_08086556:
bl sub_803F994
adds r4, r0, 0
movs r0, 0x80
lsls r0, 1
adds r4, r0
bl sub_803F9B0
adds r1, r0, 0
adds r0, r4, 0
bl sub_803F878
ldr r0, _08086590
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _08086556
ldr r0, _08086594
bl sub_80855E4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808658C: .4byte sub_8086384
_08086590: .4byte sub_8086434
_08086594: .4byte sub_8086404
thumb_func_end sub_808654C
thumb_func_start sub_8086598
sub_8086598:
push {r4,r5,lr}
ldr r0, _080865D8
bl sub_80855E4
movs r5, 0x17
_080865A2:
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
ldr r0, _080865DC
adds r1, r0
adds r0, r4, 0
bl sub_803F878
ldr r0, _080865E0
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _080865A2
ldr r0, _080865E4
bl sub_80855E4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080865D8: .4byte sub_80863B8
_080865DC: .4byte 0xffffff00
_080865E0: .4byte sub_8086410
_080865E4: .4byte sub_80863F8
thumb_func_end sub_8086598
thumb_func_start sub_80865E8
sub_80865E8:
push {r4-r6,lr}
ldr r0, _08086630
bl sub_80855E4
ldr r6, _08086634
movs r5, 0xB
_080865F4:
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
movs r0, 0x80
lsls r0, 2
adds r1, r0
adds r0, r4, 0
bl sub_803F878
adds r0, r6, 0
bl sub_80855E4
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _080865F4
ldr r0, _08086638
bl sub_80855E4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086630: .4byte sub_80863E8
_08086634: .4byte sub_8086424
_08086638: .4byte sub_80863F8
thumb_func_end sub_80865E8
thumb_func_start sub_808663C
sub_808663C:
push {r4-r6,lr}
ldr r0, _08086684
bl sub_80855E4
ldr r6, _08086688
movs r5, 0xF
_08086648:
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
movs r0, 0x80
lsls r0, 2
adds r1, r0
adds r0, r4, 0
bl sub_803F878
adds r0, r6, 0
bl sub_80855E4
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r5, 0x1
cmp r5, 0
bge _08086648
ldr r0, _0808668C
bl sub_80855E4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086684: .4byte sub_80863E8
_08086688: .4byte sub_8086424
_0808668C: .4byte sub_80863F8
thumb_func_end sub_808663C
thumb_func_start sub_8086690
sub_8086690:
push {r4,lr}
ldr r0, _080866B8
bl sub_80855E4
movs r4, 0x2F
_0808669A:
ldr r0, _080866BC
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0808669A
ldr r0, _080866C0
bl sub_80855E4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080866B8: .4byte sub_80863D8
_080866BC: .4byte sub_8086434
_080866C0: .4byte sub_8086404
thumb_func_end sub_8086690
thumb_func_start sub_80866C4
sub_80866C4:
push {r4,lr}
adds r4, r0, 0
bl sub_8085480
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8086494
ldr r0, _080866F8
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080866F8: .4byte gUnknown_203B418
thumb_func_end sub_80866C4
thumb_func_start sub_80866FC
sub_80866FC:
push {r4-r6,lr}
sub sp, 0x4
movs r4, 0
movs r6, 0
movs r5, 0xFA
negs r5, r5
_08086708:
str r6, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, r5
bge _08086708
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80866FC
thumb_func_start sub_808672C
sub_808672C:
push {lr}
bl sub_803E748
pop {r0}
bx r0
thumb_func_end sub_808672C
thumb_func_start sub_8086738
sub_8086738:
push {r4,r5,lr}
sub sp, 0x4
movs r4, 0
movs r5, 0
_08086740:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
adds r4, 0xA
cmp r4, 0xF9
ble _08086740
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8086738
thumb_func_start sub_8086764
sub_8086764:
push {r4,r5,lr}
sub sp, 0x4
movs r4, 0xFA
movs r5, 0
_0808676C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0x5
cmp r4, 0
bge _0808676C
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8086764
thumb_func_start sub_8086794
sub_8086794:
push {r4,r5,lr}
sub sp, 0x4
ldr r1, _080867A4
movs r0, 0
str r0, [r1]
movs r4, 0
adds r5, r1, 0
b _080867AA
.align 2, 0
_080867A4: .4byte gUnknown_202EDC8
_080867A8:
adds r4, 0x1
_080867AA:
cmp r4, 0xC7
bgt _080867D8
movs r0, 0
str r0, [sp]
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
bl sub_803E9D0
movs r0, 0x46
bl sub_803E46C
movs r0, 0x3
ands r0, r4
cmp r0, 0
bne _080867A8
ldr r0, [r5]
adds r0, 0x1
str r0, [r5]
cmp r0, 0x1F
bne _080867A8
_080867D8:
movs r0, 0x46
bl sub_803E46C
ldr r0, _080867F0
ldr r1, [r0]
movs r0, 0
strb r0, [r1, 0x7]
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080867F0: .4byte gUnknown_203B418
thumb_func_end sub_8086794
thumb_func_start sub_80867F4
sub_80867F4:
ldr r1, _08086808
movs r0, 0
strb r0, [r1]
strb r0, [r1, 0x1]
strb r0, [r1, 0x2]
strb r0, [r1, 0x3]
strb r0, [r1, 0x4]
strb r0, [r1, 0x5]
bx lr
.align 2, 0
_08086808: .4byte gUnknown_202F3D0
thumb_func_end sub_80867F4
thumb_func_start sub_808680C
sub_808680C:
push {lr}
ldr r0, _08086824
movs r1, 0x1
strb r1, [r0]
ldrb r0, [r0, 0x3]
cmp r0, 0
beq _08086820
ldr r0, _08086828
bl sub_8083E38
_08086820:
pop {r0}
bx r0
.align 2, 0
_08086824: .4byte gUnknown_202F3D0
_08086828: .4byte 0x000001f9
thumb_func_end sub_808680C
thumb_func_start sub_808682C
sub_808682C:
ldr r1, _08086834
movs r0, 0
strb r0, [r1]
bx lr
.align 2, 0
_08086834: .4byte gUnknown_202F3D0
thumb_func_end sub_808682C
thumb_func_start sub_8086838
sub_8086838:
ldr r3, _08086844
strb r0, [r3, 0x1]
strb r1, [r3, 0x2]
strb r2, [r3, 0x3]
bx lr
.align 2, 0
_08086844: .4byte gUnknown_202F3D0
thumb_func_end sub_8086838
thumb_func_start sub_8086848
sub_8086848:
ldr r2, _08086850
strb r0, [r2, 0x4]
strb r1, [r2, 0x5]
bx lr
.align 2, 0
_08086850: .4byte gUnknown_202F3D0
thumb_func_end sub_8086848
thumb_func_start sub_8086854
sub_8086854:
push {r4,lr}
ldr r4, _08086874
ldrb r1, [r4]
cmp r1, 0
beq _080868DC
ldrb r0, [r4, 0x4]
cmp r0, 0
bne _080868A4
ldrb r0, [r4, 0x1]
cmp r0, 0
beq _08086878
movs r0, 0x50
strb r0, [r4, 0x4]
movs r0, 0x10
b _0808688A
.align 2, 0
_08086874: .4byte gUnknown_202F3D0
_08086878:
movs r0, 0x6
bl RandomCapped
adds r0, 0x2
strb r0, [r4, 0x4]
movs r0, 0x6
bl RandomCapped
adds r0, 0x2
_0808688A:
strb r0, [r4, 0x5]
ldr r0, _0808689C
ldrb r0, [r0, 0x3]
cmp r0, 0
beq _080868A8
ldr r0, _080868A0
bl sub_8083E38
b _080868A8
.align 2, 0
_0808689C: .4byte gUnknown_202F3D0
_080868A0: .4byte 0x000001f9
_080868A4:
subs r0, 0x1
strb r0, [r4, 0x4]
_080868A8:
ldr r3, _080868CC
ldrb r0, [r3, 0x5]
cmp r0, 0
beq _080868B4
subs r0, 0x1
strb r0, [r3, 0x5]
_080868B4:
ldr r0, _080868D0
ldr r1, [r0]
ldr r0, _080868D4
adds r1, r0
ldr r2, _080868D8
ldrb r0, [r3, 0x5]
lsls r0, 2
adds r0, r2
ldr r0, [r0]
str r0, [r1]
b _080868E6
.align 2, 0
_080868CC: .4byte gUnknown_202F3D0
_080868D0: .4byte gUnknown_203B418
_080868D4: .4byte 0x000181fc
_080868D8: .4byte gUnknown_8107314
_080868DC:
ldr r0, _080868EC
ldr r0, [r0]
ldr r2, _080868F0
adds r0, r2
str r1, [r0]
_080868E6:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080868EC: .4byte gUnknown_203B418
_080868F0: .4byte 0x000181fc
thumb_func_end sub_8086854
thumb_func_start sub_80868F4
sub_80868F4:
ldr r1, [r0, 0x70]
movs r2, 0xAE
lsls r2, 1
adds r1, r2
movs r2, 0x1
strb r2, [r1]
ldr r0, [r0, 0x70]
ldr r1, _0808690C
adds r0, r1
strb r2, [r0]
bx lr
.align 2, 0
_0808690C: .4byte 0x0000015d
thumb_func_end sub_80868F4
thumb_func_start sub_8086910
sub_8086910:
ldr r1, [r0, 0x70]
movs r2, 0xAE
lsls r2, 1
adds r1, r2
movs r2, 0
strb r2, [r1]
ldr r0, [r0, 0x70]
ldr r1, _08086928
adds r0, r1
strb r2, [r0]
bx lr
.align 2, 0
_08086928: .4byte 0x0000015d
thumb_func_end sub_8086910
thumb_func_start sub_808692C
sub_808692C:
push {lr}
movs r0, 0x5
bl sub_80859F0
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x6
bl sub_80859F0
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x7
bl sub_80859F0
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0
bl sub_80859F0
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
pop {r0}
bx r0
thumb_func_end sub_808692C
thumb_func_start sub_808696C
sub_808696C:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, [r5, 0x70]
adds r0, 0x46
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
movs r1, 0x4
bl sub_8002984
adds r4, r0, 0
lsls r4, 24
asrs r4, 24
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
adds r3, r4, 0
bl sub_80869E4
movs r0, 0xF
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x5
bl sub_8002984
adds r4, r0, 0
lsls r4, 24
asrs r4, 24
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
adds r3, r4, 0
bl sub_80869E4
movs r0, 0xF
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
bl sub_8002984
adds r3, r0, 0
lsls r3, 24
asrs r3, 24
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
bl sub_80869E4
movs r0, 0xF
movs r1, 0x46
bl sub_803E708
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808696C
thumb_func_start sub_80869E4
sub_80869E4:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
mov r9, r1
lsls r2, 24
lsrs r2, 24
mov r8, r2
lsls r3, 24
asrs r6, r3, 24
ldr r0, [r7, 0x70]
adds r0, 0x46
movs r4, 0
ldrsb r4, [r0, r4]
cmp r4, r6
beq _08086A30
adds r5, r0, 0
_08086A08:
adds r0, r4, 0
adds r1, r6, 0
mov r2, r8
bl sub_8002A70
lsls r0, 24
asrs r4, r0, 24
movs r0, 0x7
ands r0, r4
strb r0, [r5]
ldrb r1, [r5]
adds r0, r7, 0
bl sub_806CE68
mov r0, r9
movs r1, 0x46
bl sub_803E708
cmp r4, r6
bne _08086A08
_08086A30:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_80869E4
thumb_func_start sub_8086A3C
sub_8086A3C:
ldr r1, [r0, 0x70]
movs r2, 0xAE
lsls r2, 1
adds r1, r2
movs r2, 0x1
strb r2, [r1]
ldr r0, [r0, 0x70]
movs r1, 0xAF
lsls r1, 1
adds r0, r1
strb r2, [r0]
bx lr
thumb_func_end sub_8086A3C
thumb_func_start sub_8086A54
sub_8086A54:
ldr r1, [r0, 0x70]
movs r2, 0xAE
lsls r2, 1
adds r1, r2
movs r3, 0
movs r2, 0x1
strb r2, [r1]
ldr r0, [r0, 0x70]
movs r1, 0xAF
lsls r1, 1
adds r0, r1
strb r3, [r0]
bx lr
thumb_func_end sub_8086A54
thumb_func_start sub_8086A70
sub_8086A70:
push {r4-r6,lr}
adds r5, r0, 0
lsls r2, 16
lsrs r4, r2, 16
ldr r3, [r5, 0x70]
adds r2, r3, 0
movs r0, 0xF7
adds r0, r3
mov r12, r0
movs r0, 0x1
mov r6, r12
strb r0, [r6]
ldrh r0, [r3, 0x10]
strh r0, [r3, 0x12]
cmp r1, 0
beq _08086A94
strh r1, [r3, 0x10]
strh r1, [r3, 0xE]
_08086A94:
ldr r0, _08086AB8
ldr r0, [r0]
ldr r1, _08086ABC
adds r0, r1
strh r4, [r0]
adds r0, r2, 0
adds r0, 0x8C
mov r2, r12
ldrb r1, [r2]
bl sub_808EC94
adds r0, r5, 0
bl sub_807191C
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086AB8: .4byte gUnknown_203B418
_08086ABC: .4byte 0x0000066a
thumb_func_end sub_8086A70
thumb_func_start sub_8086AC0
sub_8086AC0:
push {lr}
bl sub_8044B28
lsls r0, 24
cmp r0, 0
bne _08086ADA
ldr r0, _08086AE0
ldr r0, [r0]
ldrb r0, [r0, 0x2]
cmp r0, 0
bne _08086ADA
bl sub_8097FF8
_08086ADA:
pop {r0}
bx r0
.align 2, 0
_08086AE0: .4byte gUnknown_203B418
thumb_func_end sub_8086AC0
thumb_func_start sub_8086AE4
sub_8086AE4:
push {lr}
lsls r0, 16
asrs r1, r0, 16
ldr r0, _08086B04
ldr r0, [r0]
ldr r2, _08086B08
adds r0, r2
ldrb r0, [r0]
cmp r0, 0
beq _08086B0C
adds r0, r1, 0
bl sub_808E734
lsls r0, 24
lsrs r0, 24
b _08086B0E
.align 2, 0
_08086B04: .4byte gUnknown_203B418
_08086B08: .4byte 0x0000065c
_08086B0C:
movs r0, 0x1
_08086B0E:
pop {r1}
bx r1
thumb_func_end sub_8086AE4
thumb_func_start sub_8086B14
sub_8086B14:
push {r4-r6,lr}
mov r6, r8
push {r6}
bl sub_8085480
mov r8, r0
movs r0, 0x4
bl sub_8085680
adds r6, r0, 0
movs r0, 0x3
bl sub_8085680
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08086B8C
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
bl _call_via_r4
ldr r0, [r6, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r1, 0x1
strb r1, [r0]
mov r2, r8
movs r3, 0x4
ldrsh r0, [r2, r3]
movs r3, 0x6
ldrsh r1, [r2, r3]
subs r1, 0x2
bl sub_8085860
ldr r4, _08086B90
adds r0, r4, 0
movs r1, 0x32
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0xFC
bl sub_808D8BC
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086B8C: .4byte sub_8086A3C
_08086B90: .4byte gUnknown_202E038
thumb_func_end sub_8086B14
thumb_func_start sub_8086B94
sub_8086B94:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x4
bl sub_8085680
adds r5, r0, 0
movs r0, 0x3
bl sub_8085680
movs r4, 0x87
lsls r4, 2
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
bl sub_8085860
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8086B94
thumb_func_start sub_8086BDC
sub_8086BDC:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xFF
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x1
bhi _08086C02
cmp r0, 0x3
bne _08086C02
movs r0, 0x1
bl sub_8097FA8
ldr r0, _08086C08
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_08086C02:
pop {r0}
bx r0
.align 2, 0
_08086C08: .4byte gUnknown_203B418
thumb_func_end sub_8086BDC
thumb_func_start sub_8086C0C
sub_8086C0C:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x10
bl sub_8085480
mov r8, r0
bl sub_808548C
mov r9, r0
movs r0, 0x4
bl sub_8085680
adds r4, r0, 0
movs r0, 0x3
bl sub_8085680
adds r6, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp]
ldr r0, [r4, 0x10]
movs r1, 0xC0
lsls r1, 6
adds r0, r1
str r0, [sp, 0x4]
ldr r0, [r6, 0xC]
str r0, [sp, 0x8]
ldr r0, [r6, 0x10]
movs r2, 0x80
lsls r2, 6
adds r0, r2
add r5, sp, 0x8
str r0, [r5, 0x4]
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r9
bl sub_80862BC
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086D84
bl sub_8052910
mov r0, sp
movs r1, 0x40
bl sub_80858AC
movs r0, 0x40
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x30
bl sub_80858AC
ldr r0, _08086D88
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, [r4, 0x70]
ldr r2, _08086D8C
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
mov r0, sp
movs r1, 0x30
bl sub_80858AC
ldr r0, _08086D90
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x20
bl sub_80858AC
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_8086E74
ldr r0, _08086D94
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086D98
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086D9C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086DA0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0xD
movs r2, 0
bl sub_806CDD4
ldr r0, _08086DA4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r9
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
mov r0, r8
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _08086DA8
bl sub_8052910
mov r0, r9
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
mov r0, r8
movs r1, 0x4
movs r2, 0x1
movs r3, 0x4
bl sub_80869E4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xB
bl sub_8083E88
movs r0, 0xC
add r8, r0
mov r0, r8
movs r1, 0x10
bl sub_80858AC
add sp, 0x10
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086D84: .4byte gUnknown_8100768
_08086D88: .4byte gUnknown_8100798
_08086D8C: .4byte 0x0000015d
_08086D90: .4byte gUnknown_8100820
_08086D94: .4byte gUnknown_8100844
_08086D98: .4byte gUnknown_8100880
_08086D9C: .4byte gUnknown_8100928
_08086DA0: .4byte gUnknown_8100A04
_08086DA4: .4byte gUnknown_8100B80
_08086DA8: .4byte gUnknown_8100BC0
thumb_func_end sub_8086C0C
thumb_func_start sub_8086DAC
sub_8086DAC:
push {r4,r5,lr}
sub sp, 0x8
bl sub_8085480
adds r5, r0, 0
movs r0, 0x3
bl sub_8085680
adds r4, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp]
ldr r0, [r4, 0x10]
movs r1, 0x80
lsls r1, 6
adds r0, r1
str r0, [sp, 0x4]
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8086E74
mov r0, sp
movs r1, 0x10
bl sub_80858AC
ldr r0, _08086E34
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086E38
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0xD
movs r2, 0
bl sub_806CDD4
ldr r0, _08086E3C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
movs r0, 0xB
bl sub_8083E88
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08086E34: .4byte gUnknown_8100C90
_08086E38: .4byte gUnknown_8100CBC
_08086E3C: .4byte gUnknown_8100CDC
thumb_func_end sub_8086DAC
thumb_func_start sub_8086E40
sub_8086E40:
push {lr}
bl sub_8085480
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086E6C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08086E70
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
pop {r0}
bx r0
.align 2, 0
_08086E6C: .4byte gUnknown_8100D3C
_08086E70: .4byte gUnknown_203B418
thumb_func_end sub_8086E40
thumb_func_start sub_8086E74
sub_8086E74:
push {r4,lr}
adds r4, r0, 0
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
adds r0, r4, 0
bl sub_8086A54
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
movs r0, 0x44
movs r1, 0x46
bl sub_803E708
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8086E74
thumb_func_start sub_8086E9C
sub_8086E9C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08086EF8
adds r0, r4, 0
bl sub_80855E4
adds r0, r4, 0
bl sub_808563C
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r4, _08086EFC
adds r0, r4, 0
movs r1, 0xB
bl sub_808D8BC
adds r0, r4, 0
adds r0, 0x50
movs r1, 0x5E
bl sub_808D8BC
adds r4, 0xA0
adds r0, r4, 0
movs r1, 0xA
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08086EF8: .4byte sub_8086A3C
_08086EFC: .4byte gUnknown_202E038
thumb_func_end sub_8086E9C
thumb_func_start sub_8086F00
sub_8086F00:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08086F4C
bl sub_80855E4
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x3
bl sub_8085860
ldr r4, _08086F50
adds r0, r4, 0
movs r1, 0xB
bl sub_808D8BC
adds r0, r4, 0
adds r0, 0x50
movs r1, 0x5E
bl sub_808D8BC
adds r4, 0xA0
adds r0, r4, 0
movs r1, 0xA
bl sub_808D8BC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08086F4C: .4byte sub_8086A3C
_08086F50: .4byte gUnknown_202E038
thumb_func_end sub_8086F00
thumb_func_start sub_8086F54
sub_8086F54:
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
lsls r1, 24
movs r0, 0xFC
lsls r0, 24
adds r1, r0
lsrs r1, 24
cmp r1, 0x1
bhi _08086FA8
movs r5, 0
_08086F6A:
ldr r0, _08086FB0
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _08086FB4
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _08086F8E
ldr r0, [r4, 0x70]
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, r6
bne _08086FA8
_08086F8E:
adds r5, 0x1
cmp r5, 0xF
ble _08086F6A
movs r0, 0
cmp r0, 0
bne _08086FA8
movs r0, 0x3
bl sub_8097FA8
ldr r0, _08086FB0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_08086FA8:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08086FB0: .4byte gUnknown_203B418
_08086FB4: .4byte 0x0001358c
thumb_func_end sub_8086F54
thumb_func_start sub_8086FB8
sub_8086FB8:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087048
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808704C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8087144
movs r0, 0xA
bl sub_8083E88
ldr r0, _08087050
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087054
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087058
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808705C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087060
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08087048: .4byte gUnknown_8100DB0
_0808704C: .4byte gUnknown_8100E64
_08087050: .4byte gUnknown_8100E88
_08087054: .4byte gUnknown_8100F14
_08087058: .4byte gUnknown_8101004
_0808705C: .4byte gUnknown_8101050
_08087060: .4byte gUnknown_81010D0
thumb_func_end sub_8086FB8
thumb_func_start sub_8087064
sub_8087064:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_808548C
adds r5, r0, 0
bl sub_8086448
ldr r0, _08087118
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808711C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8087144
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087120
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087124
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x6
movs r2, 0x4
bl sub_806CDD4
adds r0, r5, 0
movs r1, 0x6
movs r2, 0x4
bl sub_806CDD4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x7
movs r2, 0x4
bl sub_806CDD4
adds r0, r5, 0
movs r1, 0x7
movs r2, 0x4
bl sub_806CDD4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087128
bl sub_8052910
ldr r0, _0808712C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08087118: .4byte gUnknown_8101164
_0808711C: .4byte gUnknown_8100E64
_08087120: .4byte gUnknown_8101240
_08087124: .4byte gUnknown_8101310
_08087128: .4byte gUnknown_810137C
_0808712C: .4byte gUnknown_8101408
thumb_func_end sub_8087064
thumb_func_start sub_8087130
sub_8087130:
push {lr}
bl sub_8086448
ldr r0, _08087140
bl sub_80866C4
pop {r0}
bx r0
.align 2, 0
_08087140: .4byte gUnknown_8101440
thumb_func_end sub_8087130
thumb_func_start sub_8087144
sub_8087144:
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0xF0
movs r0, 0x5
bl sub_8085680
adds r7, r0, 0
movs r0, 0x6
bl sub_8085680
mov r8, r0
movs r0, 0x7
bl sub_8085680
mov r9, r0
ldr r1, _080871E0
mov r0, sp
movs r2, 0x38
bl memcpy
add r6, sp, 0x38
ldr r1, _080871E4
adds r0, r6, 0
movs r2, 0x38
bl memcpy
add r4, sp, 0x70
ldr r1, _080871E8
adds r0, r4, 0
movs r2, 0x38
bl memcpy
add r5, sp, 0xA8
mov r0, sp
str r0, [r5]
str r6, [r5, 0x4]
str r4, [r5, 0x8]
add r4, sp, 0xB4
str r7, [r4]
mov r3, r8
str r3, [r4, 0x4]
mov r0, r9
str r0, [r4, 0x8]
movs r0, 0xA
bl sub_8083E88
adds r0, r7, 0
bl sub_8086A54
mov r0, r8
bl sub_8086A54
mov r0, r9
bl sub_8086A54
add r6, sp, 0xC0
adds r0, r6, 0
adds r1, r5, 0
adds r2, r4, 0
movs r3, 0x3
bl sub_8085B4C
ldr r0, [r7, 0x70]
ldr r2, _080871EC
adds r0, r2
movs r1, 0x1
strb r1, [r0]
mov r3, r8
ldr r0, [r3, 0x70]
adds r0, r2
strb r1, [r0]
mov r3, r9
ldr r0, [r3, 0x70]
adds r0, r2
strb r1, [r0]
b _080871F6
.align 2, 0
_080871E0: .4byte gUnknown_810739C
_080871E4: .4byte gUnknown_81073D4
_080871E8: .4byte gUnknown_810740C
_080871EC: .4byte 0x0000015f
_080871F0:
movs r0, 0x46
bl sub_803E46C
_080871F6:
adds r0, r6, 0
bl sub_8085B80
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _080871F0
ldr r0, [r7, 0x70]
ldr r1, _0808722C
adds r0, r1
strb r2, [r0]
mov r3, r8
ldr r0, [r3, 0x70]
adds r0, r1
strb r2, [r0]
mov r3, r9
ldr r0, [r3, 0x70]
adds r0, r1
strb r2, [r0]
add sp, 0xF0
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808722C: .4byte 0x0000015f
thumb_func_end sub_8087144
thumb_func_start sub_8087230
sub_8087230:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x8
bl sub_8085680
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08087294
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r4, _08087298
movs r1, 0x96
lsls r1, 1
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x91
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087294: .4byte sub_8086A3C
_08087298: .4byte gUnknown_202E038
thumb_func_end sub_8087230
thumb_func_start sub_808729C
sub_808729C:
push {r4-r6,lr}
sub sp, 0x4
bl sub_8085480
adds r5, r0, 0
movs r0, 0x8
bl sub_8085680
adds r4, r0, 0
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r6, _080872DC
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x91
bl sub_8086AE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _080872E0
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _08087300
.align 2, 0
_080872DC: .4byte sub_8086A3C
_080872E0:
ldr r0, _0808732C
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0
bl sub_8072008
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl _call_via_r6
_08087300:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r4, _08087330
movs r1, 0x96
lsls r1, 1
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x91
bl sub_808D8BC
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808732C: .4byte gUnknown_80F57CC
_08087330: .4byte gUnknown_202E038
thumb_func_end sub_808729C
thumb_func_start sub_8087334
sub_8087334:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xF9
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808735A
cmp r0, 0x8
bne _0808735A
movs r0, 0x5
bl sub_8097FA8
ldr r0, _08087360
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808735A:
pop {r0}
bx r0
.align 2, 0
_08087360: .4byte gUnknown_203B418
thumb_func_end sub_8087334
thumb_func_start sub_8087364
sub_8087364:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x70
bl sub_8085480
mov r9, r0
bl sub_808548C
adds r6, r0, 0
movs r0, 0x8
bl sub_8085680
str r0, [sp, 0x68]
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
mov r0, r9
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _08087470
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
mov r0, r9
movs r1, 0x4
movs r2, 0x1
movs r3, 0x4
bl sub_80869E4
ldr r0, _08087474
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x3
bl sub_808775C
bl sub_8083F14
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _08087478
bl sub_8052910
ldr r0, [sp, 0x68]
bl sub_8087704
movs r0, 0x9
bl sub_8083E88
adds r0, r6, 0
movs r1, 0x6
movs r2, 0x4
bl sub_806CDD4
ldr r0, _0808747C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0x2
movs r2, 0x1
movs r3, 0x1
bl sub_80869E4
mov r1, sp
ldr r0, _08087480
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
mov r0, sp
str r0, [sp, 0x58]
str r6, [sp, 0x5C]
add r4, sp, 0x18
add r1, sp, 0x58
add r2, sp, 0x5C
adds r0, r4, 0
movs r3, 0x1
bl sub_8085B4C
ldr r0, [r6, 0x70]
ldr r2, _08087484
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
add r7, sp, 0x28
add r3, sp, 0x48
mov r8, r3
add r0, sp, 0x60
mov r10, r0
mov r1, sp
adds r1, 0x64
str r1, [sp, 0x6C]
b _0808748E
.align 2, 0
_08087470: .4byte gUnknown_81014B0
_08087474: .4byte gUnknown_8101504
_08087478: .4byte gUnknown_81015A0
_0808747C: .4byte gUnknown_81015D4
_08087480: .4byte gUnknown_810744C
_08087484: .4byte 0x0000015f
_08087488:
movs r0, 0x46
bl sub_803E46C
_0808748E:
adds r0, r4, 0
bl sub_8085B80
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08087488
ldr r0, [r6, 0x70]
ldr r2, _08087510
adds r0, r2
strb r5, [r0]
ldr r0, [r6, 0x70]
ldr r4, _08087514
adds r0, r4
movs r1, 0x1
strb r1, [r0]
adds r0, r6, 0
movs r1, 0x2
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
ldr r0, _08087518
bl sub_8052910
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _0808751C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, [r6, 0x70]
adds r0, r4
strb r5, [r0]
adds r0, r6, 0
movs r1, 0x2
movs r2, 0x2
movs r3, 0x5
bl sub_80869E4
adds r1, r7, 0
ldr r0, _08087520
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r3,r4}
stm r1!, {r3,r4}
str r7, [sp, 0x60]
str r6, [sp, 0x64]
mov r0, r8
mov r1, r10
ldr r2, [sp, 0x6C]
movs r3, 0x1
bl sub_8085B4C
mov r4, r9
adds r4, 0xC
b _0808752A
.align 2, 0
_08087510: .4byte 0x0000015f
_08087514: .4byte 0x0000015d
_08087518: .4byte gUnknown_81015E8
_0808751C: .4byte gUnknown_8101624
_08087520: .4byte gUnknown_8107464
_08087524:
movs r0, 0x46
bl sub_803E46C
_0808752A:
mov r0, r8
bl sub_8085B80
lsls r0, 24
cmp r0, 0
bne _08087524
adds r0, r6, 0
movs r1, 0x2
movs r2, 0x1
movs r3, 0x3
bl sub_80869E4
ldr r0, _080875B0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x3
bl sub_808775C
ldr r0, _080875B4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
bl sub_808775C
ldr r0, _080875B8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x2
bl sub_808775C
ldr r0, _080875BC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 1
ldr r0, [sp, 0x68]
movs r2, 0xB
bl sub_8086A70
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
add sp, 0x70
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080875B0: .4byte gUnknown_810165C
_080875B4: .4byte gUnknown_8101750
_080875B8: .4byte gUnknown_810178C
_080875BC: .4byte gUnknown_81017B4
thumb_func_end sub_8087364
thumb_func_start sub_80875C0
sub_80875C0:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x8
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087648
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _0808764C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8087704
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087650
bl sub_8052910
movs r0, 0x1
bl sub_808775C
ldr r0, _08087654
bl sub_8052910
movs r0, 0x2
bl sub_808775C
ldr r0, _08087658
bl sub_8052910
movs r1, 0x96
lsls r1, 1
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08087648: .4byte gUnknown_81017E4
_0808764C: .4byte gUnknown_81015A0
_08087650: .4byte gUnknown_8101898
_08087654: .4byte gUnknown_81018EC
_08087658: .4byte gUnknown_8101918
thumb_func_end sub_80875C0
thumb_func_start sub_808765C
sub_808765C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x8
bl sub_8085680
adds r4, r0, 0
bl sub_8086448
movs r0, 0x91
bl sub_8086AE4
lsls r0, 24
cmp r0, 0
beq _08087688
ldr r0, _08087684
bl sub_80866C4
b _080876EA
.align 2, 0
_08087684: .4byte gUnknown_8101A38
_08087688:
movs r0, 0x1
bl sub_808775C
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _080876F0
bl sub_8052910
adds r0, r4, 0
bl sub_8087704
ldr r0, _080876F4
bl sub_8052910
movs r0, 0x1
bl sub_808775C
ldr r0, _080876F8
bl sub_8052910
movs r0, 0x2
bl sub_808775C
ldr r0, _080876FC
bl sub_8052910
movs r0, 0x2
bl sub_808775C
ldr r0, _08087700
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 1
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_080876EA:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_080876F0: .4byte gUnknown_810193C
_080876F4: .4byte gUnknown_8101970
_080876F8: .4byte gUnknown_8101994
_080876FC: .4byte gUnknown_81019E4
_08087700: .4byte gUnknown_8101A04
thumb_func_end sub_808765C
thumb_func_start sub_8087704
sub_8087704:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, [r5, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r2, 0
movs r1, 0x1
strb r1, [r0]
ldr r0, [r5, 0x70]
movs r1, 0xAF
lsls r1, 1
adds r0, r1
strb r2, [r0]
ldr r0, [r5, 0x70]
adds r1, 0x16
adds r0, r1
movs r1, 0xC8
str r1, [r0]
movs r0, 0xF5
lsls r0, 1
bl sub_8083E38
movs r4, 0xC8
_08087734:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
lsls r1, r4, 8
str r1, [r0]
movs r0, 0x46
bl sub_803E46C
subs r4, 0x5
cmp r4, 0
bge _08087734
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8087704
thumb_func_start sub_808775C
sub_808775C:
push {r4,r5,lr}
sub sp, 0x4
adds r5, r0, 0
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
cmp r5, 0x2
ble _08087790
movs r4, 0xFA
_08087770:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08087770
_08087790:
cmp r5, 0x1
ble _080877B6
movs r4, 0xFA
_08087796:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08087796
_080877B6:
movs r4, 0xFA
_080877B8:
adds r2, r4, 0
cmp r4, 0
bge _080877C0
adds r2, r4, 0x3
_080877C0:
asrs r2, 2
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _080877B8
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808775C
thumb_func_start sub_80877E8
sub_80877E8:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x9
bl sub_8085680
adds r5, r0, 0
movs r0, 0x26
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x6
bl sub_8085930
ldr r4, _08087840
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
subs r0, 0x3
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x2
bl sub_8085860
ldr r0, _08087844
movs r1, 0x92
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087840: .4byte sub_8086A3C
_08087844: .4byte gUnknown_202E038
thumb_func_end sub_80877E8
thumb_func_start sub_8087848
sub_8087848:
push {r4-r6,lr}
sub sp, 0x4
bl sub_8085480
adds r5, r0, 0
movs r0, 0x9
bl sub_8085680
adds r4, r0, 0
movs r0, 0x26
bl sub_8083E88
bl sub_80854D4
movs r0, 0x6
bl sub_8085930
ldr r6, _08087890
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x92
bl sub_8086AE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _08087894
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _080878B4
.align 2, 0
_08087890: .4byte sub_8086A3C
_08087894:
ldr r0, _080878E8
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0
bl sub_8072008
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl _call_via_r6
_080878B4:
movs r1, 0x4
ldrsh r0, [r5, r1]
subs r0, 0x5
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
ldr r3, _080878EC
adds r1, r3
adds r0, r4, 0
bl sub_803F878
ldr r0, _080878F0
movs r1, 0x92
bl sub_808D8BC
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080878E8: .4byte gUnknown_80F57CE
_080878EC: .4byte 0xfffff000
_080878F0: .4byte gUnknown_202E038
thumb_func_end sub_8087848
thumb_func_start sub_80878F4
sub_80878F4:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xF6
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808791A
cmp r0, 0x9
bne _0808791A
movs r0, 0x7
bl sub_8097FA8
ldr r0, _08087920
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808791A:
pop {r0}
bx r0
.align 2, 0
_08087920: .4byte gUnknown_203B418
thumb_func_end sub_80878F4
thumb_func_start sub_8087924
sub_8087924:
push {r4-r6,lr}
bl sub_8085480
adds r5, r0, 0
bl sub_808548C
adds r4, r0, 0
movs r0, 0x9
bl sub_8085680
adds r6, r0, 0
movs r0, 0xC
movs r1, 0x5
bl sub_8087D80
bl sub_8086500
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087AE8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x5
bl sub_80869E4
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087AEC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xC
movs r1, 0x5
bl sub_8087D80
movs r0, 0x9
movs r1, 0x5
bl sub_8087DE8
ldr r0, _08087AF0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _08087AF4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
bl sub_8086690
ldr r0, _08087AF8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x5
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
ldr r0, _08087AFC
bl sub_8083E38
bl sub_8083F14
bl sub_8087F24
ldr r0, _08087B00
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087B04
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087B08
bl sub_8083E38
adds r0, r4, 0
movs r1, 0x4
bl sub_80856E0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087B0C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8087EB0
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _08087B10
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x9
movs r1, 0x5
bl sub_8087D80
movs r0, 0xB
movs r1, 0x5
bl sub_8087DE8
ldr r0, _08087B14
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xC
movs r1, 0x5
bl sub_8087D80
movs r0, 0x9
movs r1, 0x5
bl sub_8087DE8
adds r0, r6, 0
bl sub_8087D30
bl sub_808663C
bl sub_8087EB0
ldr r0, _08087B18
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xB
movs r1, 0x6
bl sub_8087DE8
ldr r0, _08087B1C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xC8
lsls r1, 1
adds r0, r6, 0
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087AE8: .4byte gUnknown_8101A9C
_08087AEC: .4byte gUnknown_8101AD4
_08087AF0: .4byte gUnknown_8101C30
_08087AF4: .4byte gUnknown_8101CBC
_08087AF8: .4byte gUnknown_8101D8C
_08087AFC: .4byte 0x000002f2
_08087B00: .4byte gUnknown_8101DA0
_08087B04: .4byte gUnknown_8101E1C
_08087B08: .4byte 0x000001cf
_08087B0C: .4byte gUnknown_8101EAC
_08087B10: .4byte gUnknown_8102070
_08087B14: .4byte gUnknown_81020A4
_08087B18: .4byte gUnknown_81020D4
_08087B1C: .4byte gUnknown_8102108
thumb_func_end sub_8087924
thumb_func_start sub_8087B20
sub_8087B20:
push {r4-r6,lr}
bl sub_8085480
adds r5, r0, 0
bl sub_808548C
adds r4, r0, 0
movs r0, 0x9
bl sub_8085680
adds r6, r0, 0
movs r0, 0xA
movs r1, 0x5
bl sub_8087D80
bl sub_8086500
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087C24
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _08087C28
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
bl sub_8086690
bl sub_8087F24
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x5
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
adds r0, r6, 0
bl sub_8087D30
bl sub_808663C
bl sub_8087EB0
ldr r0, _08087C2C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xB
movs r1, 0x6
bl sub_8087DE8
ldr r0, _08087C30
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087C34
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xC8
lsls r1, 1
adds r0, r6, 0
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087C24: .4byte gUnknown_8102158
_08087C28: .4byte gUnknown_8102190
_08087C2C: .4byte gUnknown_8102200
_08087C30: .4byte gUnknown_8102254
_08087C34: .4byte gUnknown_81022F8
thumb_func_end sub_8087B20
thumb_func_start sub_8087C38
sub_8087C38:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x9
bl sub_8085680
adds r4, r0, 0
movs r0, 0xC
movs r1, 0x5
bl sub_8087D80
bl sub_808654C
movs r0, 0x92
bl sub_8086AE4
lsls r0, 24
cmp r0, 0
beq _08087CA4
movs r0, 0x5
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087C9C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08087CA0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
b _08087D16
.align 2, 0
_08087C9C: .4byte gUnknown_8100D3C
_08087CA0: .4byte gUnknown_203B418
_08087CA4:
ldr r0, _08087D1C
bl sub_8052910
movs r0, 0x5
bl sub_8085930
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
bl sub_8087D30
ldr r0, _08087D20
bl sub_8052910
movs r0, 0xC
movs r1, 0x5
bl sub_8087D80
movs r0, 0x9
movs r1, 0x5
bl sub_8087DE8
ldr r0, _08087D24
bl sub_8052910
bl sub_8087EB0
ldr r0, _08087D28
bl sub_8052910
movs r0, 0xB
movs r1, 0x6
bl sub_8087DE8
ldr r0, _08087D2C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xC8
lsls r1, 1
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08087D16:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08087D1C: .4byte gUnknown_810232C
_08087D20: .4byte gUnknown_8102398
_08087D24: .4byte gUnknown_81023C4
_08087D28: .4byte gUnknown_8102400
_08087D2C: .4byte gUnknown_8102454
thumb_func_end sub_8087C38
thumb_func_start sub_8087D30
sub_8087D30:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, [r5, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r2, 0
movs r1, 0x1
strb r1, [r0]
ldr r0, [r5, 0x70]
movs r1, 0xAF
lsls r1, 1
adds r0, r1
strb r2, [r0]
ldr r0, [r5, 0x70]
adds r1, 0x16
adds r0, r1
movs r1, 0xC8
lsls r1, 8
str r1, [r0]
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
movs r4, 0xC8
_08087D62:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
lsls r1, r4, 8
str r1, [r0]
movs r0, 0x46
bl sub_803E46C
subs r4, 0x5
cmp r4, 0
bge _08087D62
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8087D30
thumb_func_start sub_8087D80
sub_8087D80:
push {lr}
sub sp, 0x8
adds r3, r1, 0
lsls r1, r0, 1
adds r1, r0
lsls r1, 11
movs r2, 0xC0
lsls r2, 4
adds r0, r1, r2
cmp r0, 0
bge _08087D98
adds r0, 0xFF
_08087D98:
lsls r0, 8
lsrs r0, 16
ldr r1, _08087DE0
ldr r2, [sp, 0x4]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 11
movs r1, 0x80
lsls r1, 5
adds r0, r1
cmp r0, 0
bge _08087DB8
adds r0, 0xFF
_08087DB8:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _08087DE4
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
movs r0, 0xB9
lsls r0, 1
movs r1, 0
str r1, [sp]
movs r1, 0x10
movs r2, 0
add r3, sp, 0x4
bl sub_8085EC8
add sp, 0x8
pop {r0}
bx r0
.align 2, 0
_08087DE0: .4byte 0xffff0000
_08087DE4: .4byte 0x0000ffff
thumb_func_end sub_8087D80
thumb_func_start sub_8087DE8
sub_8087DE8:
push {r4-r6,lr}
sub sp, 0x8
adds r3, r1, 0
lsls r1, r0, 1
adds r1, r0
lsls r1, 11
movs r2, 0xC0
lsls r2, 4
adds r0, r1, r2
cmp r0, 0
bge _08087E00
adds r0, 0xFF
_08087E00:
lsls r0, 8
lsrs r0, 16
ldr r1, _08087EA8
ldr r2, [sp, 0x4]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 11
movs r1, 0x80
lsls r1, 5
adds r0, r1
cmp r0, 0
bge _08087E20
adds r0, 0xFF
_08087E20:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _08087EAC
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
movs r0, 0xB9
lsls r0, 1
movs r1, 0
str r1, [sp]
movs r1, 0x16
movs r2, 0
add r3, sp, 0x4
bl sub_8085EC8
adds r6, r0, 0
movs r0, 0xF6
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_08087E4E:
str r5, [sp]
adds r0, r4, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x13
bgt _08087E4E
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_08087E74:
str r5, [sp]
adds r0, r4, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08087E74
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
adds r0, r6, 0
bl sub_8085F44
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087EA8: .4byte 0xffff0000
_08087EAC: .4byte 0x0000ffff
thumb_func_end sub_8087DE8
thumb_func_start sub_8087EB0
sub_8087EB0:
push {r4,lr}
sub sp, 0x4
ldr r0, _08087F20
bl sub_8083E38
movs r4, 0xFA
_08087EBC:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x9
bgt _08087EBC
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08087F20
bl sub_8083E38
movs r4, 0xFA
_08087EEC:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08087EEC
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08087F20: .4byte 0x000001ed
thumb_func_end sub_8087EB0
thumb_func_start sub_8087F24
sub_8087F24:
push {r4-r6,lr}
sub sp, 0x4
movs r4, 0
movs r6, 0
movs r5, 0x50
negs r5, r5
_08087F30:
str r6, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0x8
cmp r4, r5
bge _08087F30
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8087F24
thumb_func_start sub_8087F54
sub_8087F54:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0xD
bl sub_8085680
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08087FAC
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _08087FB0
movs r1, 0x90
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08087FAC: .4byte sub_8086A3C
_08087FB0: .4byte gUnknown_202E038
thumb_func_end sub_8087F54
thumb_func_start sub_8087FB4
sub_8087FB4:
push {r4,lr}
movs r0, 0xD
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
ldr r0, _08087FF4
movs r1, 0x90
bl sub_808D8BC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08087FF4: .4byte gUnknown_202E038
thumb_func_end sub_8087FB4
thumb_func_start sub_8087FF8
sub_8087FF8:
push {r4-r6,lr}
sub sp, 0x4
bl sub_8085480
adds r5, r0, 0
movs r0, 0xD
bl sub_8085680
adds r4, r0, 0
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r6, _0808803C
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x90
bl sub_8086AE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _08088040
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _08088060
.align 2, 0
_0808803C: .4byte sub_8086A3C
_08088040:
ldr r0, _08088080
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0
bl sub_8072008
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl _call_via_r6
_08088060:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _08088084
movs r1, 0x90
bl sub_808D8BC
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08088080: .4byte gUnknown_80F57D0
_08088084: .4byte gUnknown_202E038
thumb_func_end sub_8087FF8
thumb_func_start sub_8088088
sub_8088088:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xF3
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _080880AE
cmp r0, 0xD
bne _080880AE
movs r0, 0x9
bl sub_8097FA8
ldr r0, _080880B4
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_080880AE:
pop {r0}
bx r0
.align 2, 0
_080880B4: .4byte gUnknown_203B418
thumb_func_end sub_8088088
thumb_func_start sub_80880B8
sub_80880B8:
push {r4-r6,lr}
mov r6, r8
push {r6}
bl sub_8085480
adds r5, r0, 0
bl sub_808548C
adds r6, r0, 0
movs r0, 0xD
bl sub_8085680
mov r8, r0
bl sub_8086448
adds r0, r6, 0
bl sub_808696C
ldr r0, _080882C8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8086598
bl sub_8083F14
ldr r0, _080882CC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _080882D0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x6
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x5
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x6
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x7
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x6
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x5
bl sub_8085918
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x6
bl sub_8085918
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080882D4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080882D8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x4
bl sub_80869E4
adds r0, r6, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
ldr r4, _080882DC
adds r0, r4, 0
bl sub_8083E38
adds r0, r6, 0
bl sub_808696C
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
bl sub_808696C
ldr r0, _080882E0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080882E4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0
bl sub_8083E38
ldr r0, _080882E8
ldr r0, [r0]
ldr r1, _080882EC
adds r0, r1
movs r1, 0x7
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
movs r0, 0xF7
lsls r0, 1
bl sub_8083E38
bl sub_8088574
ldr r0, _080882F0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_80884E0
bl sub_8086738
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _080882F4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0xF5
lsls r0, 1
bl sub_8083E38
mov r0, r8
bl sub_8088484
bl sub_80865E8
bl sub_80884E0
ldr r0, _080882F8
bl sub_8052910
mov r0, r8
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
bl sub_80884E0
ldr r0, _080882FC
bl sub_8052910
mov r0, r8
movs r1, 0x10
movs r2, 0
bl sub_806CDD4
bl sub_80884E0
ldr r0, _08088300
bl sub_8052910
mov r0, r8
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
movs r0, 0x10
movs r1, 0x46
bl sub_803E708
movs r1, 0xE1
lsls r1, 1
mov r0, r8
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080882C8: .4byte gUnknown_8102478
_080882CC: .4byte gUnknown_81025B4
_080882D0: .4byte gUnknown_81025D4
_080882D4: .4byte gUnknown_8102610
_080882D8: .4byte gUnknown_81026C4
_080882DC: .4byte 0x000001d5
_080882E0: .4byte gUnknown_810270C
_080882E4: .4byte gUnknown_810272C
_080882E8: .4byte gUnknown_203B418
_080882EC: .4byte 0x0000e265
_080882F0: .4byte gUnknown_81027BC
_080882F4: .4byte gUnknown_8102810
_080882F8: .4byte gUnknown_8102840
_080882FC: .4byte gUnknown_810286C
_08088300: .4byte gUnknown_81028B8
thumb_func_end sub_80880B8
thumb_func_start sub_8088304
sub_8088304:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0xD
bl sub_8085680
adds r4, r0, 0
ldr r0, _08088384
ldr r0, [r0]
ldr r1, _08088388
adds r0, r1
movs r1, 0x7
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808838C
bl sub_8052910
adds r0, r4, 0
movs r1, 0x10
movs r2, 0
bl sub_806CDD4
bl sub_80884E0
ldr r0, _08088390
bl sub_8052910
bl sub_80884E0
ldr r0, _08088394
bl sub_8052910
adds r0, r4, 0
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
movs r0, 0x28
movs r1, 0x46
bl sub_803E708
movs r1, 0xE1
lsls r1, 1
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08088384: .4byte gUnknown_203B418
_08088388: .4byte 0x0000e265
_0808838C: .4byte gUnknown_81028D4
_08088390: .4byte gUnknown_8102918
_08088394: .4byte gUnknown_8102948
thumb_func_end sub_8088304
thumb_func_start sub_8088398
sub_8088398:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0xD
bl sub_8085680
adds r4, r0, 0
bl sub_8086448
movs r0, 0x90
bl sub_8086AE4
lsls r0, 24
cmp r0, 0
beq _080883C4
ldr r0, _080883C0
bl sub_80866C4
b _08088460
.align 2, 0
_080883C0: .4byte gUnknown_8102A9C
_080883C4:
ldr r0, _08088468
ldr r0, [r0]
ldr r1, _0808846C
adds r0, r1
movs r1, 0x7
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
bl sub_80884E0
bl sub_8086738
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _08088470
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8088484
bl sub_80884E0
ldr r0, _08088474
bl sub_8052910
adds r0, r4, 0
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
bl sub_80884E0
ldr r0, _08088478
bl sub_8052910
adds r0, r4, 0
movs r1, 0x10
movs r2, 0
bl sub_806CDD4
bl sub_80884E0
ldr r0, _0808847C
bl sub_8052910
bl sub_80884E0
ldr r0, _08088480
bl sub_8052910
adds r0, r4, 0
movs r1, 0xF
movs r2, 0
bl sub_806CDD4
movs r0, 0x28
movs r1, 0x46
bl sub_803E708
movs r1, 0xE1
lsls r1, 1
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08088460:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08088468: .4byte gUnknown_203B418
_0808846C: .4byte 0x0000e265
_08088470: .4byte gUnknown_8102984
_08088474: .4byte gUnknown_81029B4
_08088478: .4byte gUnknown_8102A18
_0808847C: .4byte gUnknown_8102A24
_08088480: .4byte gUnknown_8102A74
thumb_func_end sub_8088398
thumb_func_start sub_8088484
sub_8088484:
push {r4,r5,lr}
sub sp, 0x4
adds r5, r0, 0
ldr r0, [r5, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r2, 0
movs r1, 0x1
strb r1, [r0]
ldr r0, [r5, 0x70]
movs r1, 0xAF
lsls r1, 1
adds r0, r1
strb r2, [r0]
movs r0, 0xF5
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
_080884AC:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
lsls r1, r4, 8
str r1, [r0]
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0
str r0, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0x5
cmp r4, 0
bge _080884AC
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8088484
thumb_func_start sub_80884E0
sub_80884E0:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _08088570
bl sub_8083E38
movs r4, 0xFA
_080884EC:
lsrs r0, r4, 31
adds r0, r4, r0
asrs r0, 1
movs r1, 0x1
str r1, [sp]
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _080884EC
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_08088518:
str r5, [sp]
movs r0, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08088518
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_0808853C:
lsrs r0, r4, 31
adds r0, r4, r0
asrs r0, 1
movs r1, 0x1
str r1, [sp]
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808853C
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08088570: .4byte 0x000002ad
thumb_func_end sub_80884E0
thumb_func_start sub_8088574
sub_8088574:
push {r4,r5,lr}
sub sp, 0x4
movs r4, 0
movs r5, 0
_0808857C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
adds r4, 0x8
cmp r4, 0x50
ble _0808857C
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8088574
thumb_func_start sub_80885A0
sub_80885A0:
push {lr}
movs r0, 0x3C
bl sub_8083ED8
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
bl sub_8083F14
ldr r0, _080885C0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
pop {r0}
bx r0
.align 2, 0
_080885C0: .4byte gUnknown_203B418
thumb_func_end sub_80885A0
thumb_func_start sub_80885C4
sub_80885C4:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x3C
bl sub_8083ED8
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
bl sub_8083F14
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08088604
bl sub_80855E4
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x3
bl sub_8085860
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08088604: .4byte sub_8086A3C
thumb_func_end sub_80885C4
thumb_func_start sub_8088608
sub_8088608:
ldr r0, _08088614
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
bx lr
.align 2, 0
_08088614: .4byte gUnknown_203B418
thumb_func_end sub_8088608
thumb_func_start sub_8088618
sub_8088618:
push {lr}
bl sub_8086448
ldr r0, _08088628
bl sub_80866C4
pop {r0}
bx r0
.align 2, 0
_08088628: .4byte gUnknown_8102B10
thumb_func_end sub_8088618
thumb_func_start sub_808862C
sub_808862C:
push {r4-r6,lr}
mov r6, r8
push {r6}
bl sub_8085480
mov r8, r0
movs r0, 0xA
bl sub_8085680
adds r5, r0, 0
movs r0, 0xE
bl sub_8085680
adds r6, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80867F4
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _080886B8
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0x4
bl sub_8085918
adds r0, r5, 0
movs r1, 0xD
movs r2, 0x4
bl sub_80861D4
adds r0, r6, 0
movs r1, 0
bl sub_8085918
adds r0, r6, 0
bl _call_via_r4
mov r1, r8
movs r2, 0x4
ldrsh r0, [r1, r2]
movs r3, 0x6
ldrsh r1, [r1, r3]
subs r1, 0x3
bl sub_8085860
ldr r4, _080886BC
ldr r1, _080886C0
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x41
bl sub_808D8BC
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080886B8: .4byte sub_8086A3C
_080886BC: .4byte gUnknown_202E038
_080886C0: .4byte 0x0000019b
thumb_func_end sub_808862C
thumb_func_start sub_80886C4
sub_80886C4:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0xA
bl sub_8085680
adds r5, r0, 0
movs r0, 0xE
bl sub_8085680
adds r4, r0, 0
ldr r0, _0808874C
bl sub_8083E38
bl sub_80867F4
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r1, 0x87
lsls r1, 2
adds r0, r5, 0
movs r2, 0
bl sub_8068FE0
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl sub_8086A3C
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
bl sub_8085860
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
ldr r0, _08088750
adds r1, r0
adds r0, r4, 0
bl sub_803F878
ldr r4, _08088754
ldr r1, _08088758
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x41
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808874C: .4byte 0x000003e5
_08088750: .4byte 0xfffff000
_08088754: .4byte gUnknown_202E038
_08088758: .4byte 0x0000019b
thumb_func_end sub_80886C4
thumb_func_start sub_808875C
sub_808875C:
push {r4-r7,lr}
sub sp, 0x4
bl sub_8085480
adds r7, r0, 0
movs r0, 0xA
bl sub_8085680
adds r4, r0, 0
movs r0, 0xE
bl sub_8085680
adds r5, r0, 0
bl sub_80867F4
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _080887B4
bl sub_80855E4
movs r6, 0x87
lsls r6, 2
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8068FE0
ldr r0, _080887B8
bl sub_8086AE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _080887BC
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
bl sub_8068FE0
b _080887E0
.align 2, 0
_080887B4: .4byte sub_8086A3C
_080887B8: .4byte 0x0000019b
_080887BC:
ldr r0, _0808880C
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
adds r0, r5, 0
adds r1, r5, 0
movs r3, 0
bl sub_8072008
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
movs r1, 0xF
movs r2, 0
bl sub_80861D4
_080887E0:
movs r1, 0x4
ldrsh r0, [r7, r1]
movs r2, 0x6
ldrsh r1, [r7, r2]
subs r1, 0x3
bl sub_8085860
ldr r4, _08088810
ldr r1, _08088814
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x41
bl sub_808D8BC
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808880C: .4byte gUnknown_80F57D2
_08088810: .4byte gUnknown_202E038
_08088814: .4byte 0x0000019b
thumb_func_end sub_808875C
thumb_func_start sub_8088818
sub_8088818:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xEE
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808883E
cmp r0, 0xE
bne _0808883E
movs r0, 0xC
bl sub_8097FA8
ldr r0, _08088844
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808883E:
pop {r0}
bx r0
.align 2, 0
_08088844: .4byte gUnknown_203B418
thumb_func_end sub_8088818
thumb_func_start sub_8088848
sub_8088848:
push {lr}
bl sub_8086854
pop {r0}
bx r0
thumb_func_end sub_8088848
thumb_func_start sub_8088854
sub_8088854:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
bl sub_8085480
adds r5, r0, 0
bl sub_808548C
mov r8, r0
movs r0, 0xA
bl sub_8085680
adds r6, r0, 0
movs r0, 0xE
bl sub_8085680
mov r9, r0
bl sub_8086448
ldr r0, _08088A5C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A60
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl sub_8086838
bl sub_808680C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
bl sub_808682C
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A64
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl sub_8086838
bl sub_808680C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A68
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8088CA0
ldr r0, _08088A6C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A70
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r4, _08088A74
adds r0, r4, 0
bl sub_8083E38
mov r0, r8
bl sub_808696C
ldr r0, _08088A78
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808682C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0x6
movs r2, 0x4
bl sub_80861B8
ldr r0, _08088A7C
bl sub_8083E38
bl sub_8086738
movs r1, 0x87
lsls r1, 2
adds r0, r6, 0
movs r2, 0
bl sub_8068FE0
ldr r0, _08088A80
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A84
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
bl sub_8086764
movs r0, 0x28
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E38
mov r0, r8
bl sub_808696C
ldr r0, _08088A88
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl sub_8086838
bl sub_808680C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A8C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8083F14
bl sub_8088D30
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A90
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08088A94
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
bl sub_808682C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
movs r0, 0xFD
lsls r0, 1
bl sub_8083E38
bl sub_8086738
movs r0, 0x4
bl sub_8085930
ldr r0, _08088A98
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r9
bl sub_8086A54
movs r0, 0x4
bl sub_8085930
bl sub_8086764
movs r1, 0xFA
lsls r1, 1
mov r0, r9
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08088A5C: .4byte gUnknown_8102E70
_08088A60: .4byte gUnknown_8102EBC
_08088A64: .4byte gUnknown_8102EE0
_08088A68: .4byte gUnknown_8102EF8
_08088A6C: .4byte gUnknown_8102F30
_08088A70: .4byte gUnknown_8102F64
_08088A74: .4byte 0x000001d5
_08088A78: .4byte gUnknown_8102F84
_08088A7C: .4byte 0x00000205
_08088A80: .4byte gUnknown_8102FAC
_08088A84: .4byte gUnknown_8102FC4
_08088A88: .4byte gUnknown_8102FD8
_08088A8C: .4byte gUnknown_8103054
_08088A90: .4byte gUnknown_81030D8
_08088A94: .4byte gUnknown_8103110
_08088A98: .4byte gUnknown_8103140
thumb_func_end sub_8088854
thumb_func_start sub_8088A9C
sub_8088A9C:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0xE
bl sub_8085680
adds r5, r0, 0
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl sub_8086838
bl sub_808680C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08088B50
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8088CA0
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08088B54
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08088B58
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808682C
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
bl sub_8083F14
movs r0, 0xFD
lsls r0, 1
bl sub_8083E38
bl sub_8086738
ldr r0, _08088B5C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8086A54
movs r0, 0x4
bl sub_8085930
bl sub_8086764
movs r1, 0xFA
lsls r1, 1
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08088B50: .4byte gUnknown_8103188
_08088B54: .4byte gUnknown_8103228
_08088B58: .4byte gUnknown_8103310
_08088B5C: .4byte gUnknown_8103340
thumb_func_end sub_8088A9C
thumb_func_start sub_8088B60
sub_8088B60:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0xE
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
ldr r0, _08088B88
bl sub_8086AE4
lsls r0, 24
cmp r0, 0
beq _08088B90
ldr r0, _08088B8C
bl sub_80866C4
b _08088BF2
.align 2, 0
_08088B88: .4byte 0x0000019b
_08088B8C: .4byte gUnknown_8103488
_08088B90:
ldr r0, _08088BF8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8088C08
adds r0, r5, 0
bl sub_8088C08
ldr r0, _08088BFC
bl sub_8052910
movs r4, 0xFB
lsls r4, 1
adds r0, r4, 0
bl sub_8083E38
bl sub_8088CA0
ldr r0, _08088C00
bl sub_8052910
adds r0, r4, 0
bl sub_8083E38
bl sub_8088CA0
ldr r0, _08088C04
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xFA
lsls r1, 1
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r6, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08088BF2:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08088BF8: .4byte gUnknown_81033A0
_08088BFC: .4byte gUnknown_81033AC
_08088C00: .4byte gUnknown_810343C
_08088C04: .4byte gUnknown_810347C
thumb_func_end sub_8088B60
thumb_func_start sub_8088C08
sub_8088C08:
push {r4,r5,lr}
adds r5, r0, 0
movs r0, 0x18
movs r1, 0x10
bl sub_8086848
adds r0, r5, 0
movs r1, 0
movs r2, 0
bl sub_806CDD4
movs r4, 0
_08088C20:
cmp r4, 0xA
beq _08088C28
cmp r4, 0x20
bne _08088C3C
_08088C28:
ldr r0, _08088C9C
bl sub_8083E38
movs r0, 0
movs r1, 0x1
movs r2, 0
bl sub_8086838
bl sub_808680C
_08088C3C:
adds r0, r4, 0
subs r0, 0xA
cmp r0, 0xB
bls _08088C48
cmp r4, 0x1F
ble _08088C54
_08088C48:
adds r0, r5, 0
movs r1, 0
movs r2, 0x80
lsls r2, 1
bl sub_804539C
_08088C54:
movs r0, 0x46
bl sub_803E46C
adds r4, 0x1
cmp r4, 0x2B
ble _08088C20
movs r0, 0x4
ldrsh r1, [r5, r0]
movs r0, 0x6
ldrsh r2, [r5, r0]
adds r2, 0x1
adds r0, r5, 0
bl sub_80856C8
adds r0, r5, 0
movs r1, 0xF
movs r2, 0
bl sub_80861D4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808682C
movs r0, 0x4
bl sub_8085930
movs r0, 0x22
movs r1, 0x46
bl sub_803E708
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08088C9C: .4byte 0x000001f9
thumb_func_end sub_8088C08
thumb_func_start sub_8088CA0
sub_8088CA0:
push {r4,lr}
sub sp, 0x4
movs r4, 0xFA
_08088CA6:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _08088CA6
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_08088CD0:
lsrs r1, r4, 31
adds r1, r4, r1
asrs r1, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08088CD0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_08088CFA:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08088CFA
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8088CA0
thumb_func_start sub_8088D30
sub_8088D30:
push {r4,lr}
sub sp, 0x4
movs r4, 0xFA
_08088D36:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _08088D36
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_08088D60:
lsrs r1, r4, 31
adds r1, r4, r1
asrs r1, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08088D60
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_08088D8A:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08088D8A
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8088D30
thumb_func_start sub_8088DC0
sub_8088DC0:
push {r4-r6,lr}
mov r6, r8
push {r6}
bl sub_8085480
mov r8, r0
movs r0, 0xB
bl sub_8085680
adds r5, r0, 0
movs r0, 0xC
bl sub_8085680
adds r6, r0, 0
bl sub_80867F4
movs r0, 0
movs r1, 0x1
movs r2, 0
bl sub_8086838
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08088E50
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
bl _call_via_r4
adds r0, r5, 0
movs r1, 0xE
movs r2, 0
bl sub_806CDD4
adds r0, r6, 0
bl _call_via_r4
adds r0, r6, 0
movs r1, 0xE
movs r2, 0
bl sub_806CDD4
mov r1, r8
movs r2, 0x4
ldrsh r0, [r1, r2]
movs r3, 0x6
ldrsh r1, [r1, r3]
subs r1, 0x3
bl sub_8085860
ldr r4, _08088E54
ldr r1, _08088E58
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x41
bl sub_808D8BC
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08088E50: .4byte sub_8086A3C
_08088E54: .4byte gUnknown_202E038
_08088E58: .4byte 0x0000019b
thumb_func_end sub_8088DC0
thumb_func_start sub_8088E5C
sub_8088E5C:
push {r4-r6,lr}
mov r6, r8
push {r6}
bl sub_8085480
mov r8, r0
movs r0, 0xB
bl sub_8085680
adds r5, r0, 0
movs r0, 0xC
bl sub_8085680
adds r6, r0, 0
bl sub_80867F4
movs r0, 0
movs r1, 0x1
movs r2, 0
bl sub_8086838
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08088EDC
bl sub_80855E4
movs r4, 0x87
lsls r4, 2
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
adds r0, r6, 0
adds r1, r4, 0
movs r2, 0
bl sub_8068FE0
mov r1, r8
movs r2, 0x4
ldrsh r0, [r1, r2]
movs r3, 0x6
ldrsh r1, [r1, r3]
subs r1, 0x3
bl sub_8085860
ldr r4, _08088EE0
ldr r1, _08088EE4
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
adds r0, r4, 0
movs r1, 0x41
bl sub_808D8BC
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08088EDC: .4byte sub_8086A3C
_08088EE0: .4byte gUnknown_202E038
_08088EE4: .4byte 0x0000019b
thumb_func_end sub_8088E5C
thumb_func_start sub_8088EE8
sub_8088EE8:
push {lr}
bl sub_8086854
pop {r0}
bx r0
thumb_func_end sub_8088EE8
thumb_func_start sub_8088EF4
sub_8088EF4:
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0xC
bl sub_8085480
mov r9, r0
bl sub_808548C
adds r5, r0, 0
movs r0, 0xB
bl sub_8085680
mov r8, r0
movs r0, 0xC
bl sub_8085680
adds r6, r0, 0
mov r0, sp
mov r1, r9
adds r2, r5, 0
bl sub_8052D44
bl sub_8086448
adds r0, r5, 0
bl sub_808696C
ldr r0, _08089118
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
mov r0, r9
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _0808911C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8083F14
ldr r0, _08089120
bl sub_80855E4
bl sub_808680C
ldr r4, _08089124
adds r0, r4, 0
bl sub_8083E38
movs r0, 0x28
movs r1, 0x46
bl sub_803E708
ldr r0, _08089128
bl sub_8052910
movs r0, 0x78
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E58
bl sub_808682C
ldr r0, _0808912C
bl sub_80855E4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
movs r0, 0x4
bl sub_8085930
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08089130
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0x10
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
bl sub_808696C
ldr r0, _08089134
bl sub_8083E38
adds r0, r5, 0
movs r1, 0x4
bl sub_80856E0
ldr r0, _08089138
bl sub_8052910
mov r1, r8
ldr r0, [r1, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r0, r2
movs r1, 0
strb r1, [r0]
ldr r0, [r6, 0x70]
adds r0, r2
strb r1, [r0]
mov r1, r8
ldr r0, [r1, 0xC]
ldr r1, [r6, 0xC]
adds r0, r1
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
str r0, [sp, 0x4]
mov r0, r8
ldr r1, [r0, 0x10]
ldr r0, [r6, 0x10]
adds r1, r0
lsrs r0, r1, 31
adds r1, r0
asrs r1, 1
movs r0, 0x80
lsls r0, 4
adds r1, r0
add r0, sp, 0x4
str r1, [r0, 0x4]
movs r1, 0x20
bl sub_80858AC
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
bl sub_80891F0
ldr r0, _0808913C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08089140
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r9
movs r1, 0x4
movs r2, 0x2
movs r3, 0x5
bl sub_80869E4
ldr r0, _08089144
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08089148
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808914C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r9
movs r1, 0x4
movs r2, 0x1
movs r3, 0x3
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x3
bl sub_80869E4
ldr r0, _08089150
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
bl sub_808696C
ldr r0, _08089154
bl sub_8052910
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _08089158
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
mov r0, r9
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _0808915C
bl sub_8052910
bl sub_8089294
ldr r0, _08089160
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08089164
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
add sp, 0xC
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08089118: .4byte gUnknown_8102B1C
_0808911C: .4byte gUnknown_8102B54
_08089120: .4byte sub_80868F4
_08089124: .4byte 0x000001c5
_08089128: .4byte gUnknown_8102BC4
_0808912C: .4byte sub_8086910
_08089130: .4byte gUnknown_8102BE4
_08089134: .4byte 0x000001c7
_08089138: .4byte gUnknown_8102C30
_0808913C: .4byte gUnknown_8102C54
_08089140: .4byte gUnknown_8102C98
_08089144: .4byte gUnknown_8102CB0
_08089148: .4byte gUnknown_8102CF8
_0808914C: .4byte gUnknown_8102D34
_08089150: .4byte gUnknown_8102D4C
_08089154: .4byte gUnknown_8102D7C
_08089158: .4byte gUnknown_8102DFC
_0808915C: .4byte gUnknown_8102E2C
_08089160: .4byte gUnknown_8102E54
_08089164: .4byte gUnknown_203B418
thumb_func_end sub_8088EF4
thumb_func_start sub_8089168
sub_8089168:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8089168
thumb_func_start sub_808919C
sub_808919C:
push {lr}
ldr r2, _080891AC
movs r1, 0
bl sub_804539C
pop {r0}
bx r0
.align 2, 0
_080891AC: .4byte 0xfffffe00
thumb_func_end sub_808919C
thumb_func_start sub_80891B0
sub_80891B0:
push {r4,lr}
adds r4, r0, 0
movs r1, 0
movs r2, 0x4
bl sub_806CDD4
ldr r0, [r4, 0x70]
ldr r2, _080891CC
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080891CC: .4byte 0x0000015f
thumb_func_end sub_80891B0
thumb_func_start sub_80891D0
sub_80891D0:
push {r4,lr}
adds r4, r0, 0
movs r1, 0x7
movs r2, 0x4
bl sub_806CDD4
ldr r0, [r4, 0x70]
ldr r2, _080891EC
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080891EC: .4byte 0x0000015f
thumb_func_end sub_80891D0
thumb_func_start sub_80891F0
sub_80891F0:
push {r4,lr}
ldr r0, _08089218
bl sub_80855E4
movs r4, 0x2F
_080891FA:
ldr r0, _0808921C
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _080891FA
ldr r0, _08089220
bl sub_80855E4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08089218: .4byte sub_80891B0
_0808921C: .4byte sub_808919C
_08089220: .4byte sub_80891D0
thumb_func_end sub_80891F0
thumb_func_start sub_8089224
sub_8089224:
push {lr}
adds r3, r0, 0
ldr r1, [r3, 0x10]
movs r0, 0x90
lsls r0, 8
cmp r1, r0
ble _0808928C
ldr r1, [r3, 0xC]
ldr r0, _08089248
cmp r1, r0
bgt _08089250
movs r0, 0xB4
lsls r0, 8
cmp r1, r0
ble _08089256
ldr r1, _0808924C
b _08089278
.align 2, 0
_08089248: .4byte 0x0000e3ff
_0808924C: .4byte 0xfffffe00
_08089250:
ldr r0, _08089264
cmp r1, r0
bgt _0808926C
_08089256:
ldr r2, _08089268
adds r0, r3, 0
movs r1, 0
bl sub_804539C
b _0808928C
.align 2, 0
_08089264: .4byte 0x0000fbff
_08089268: .4byte 0xfffffe00
_0808926C:
movs r0, 0x8A
lsls r0, 9
cmp r1, r0
bgt _08089282
movs r1, 0x80
lsls r1, 2
_08089278:
adds r0, r3, 0
movs r2, 0
bl sub_804539C
b _0808928C
_08089282:
ldr r2, _08089290
adds r0, r3, 0
movs r1, 0
bl sub_804539C
_0808928C:
pop {r0}
bx r0
.align 2, 0
_08089290: .4byte 0xfffffe00
thumb_func_end sub_8089224
thumb_func_start sub_8089294
sub_8089294:
push {r4,lr}
ldr r0, _080892BC
bl sub_80855E4
movs r4, 0x77
_0808929E:
ldr r0, _080892C0
bl sub_80855E4
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0808929E
ldr r0, _080892C4
bl sub_80855E4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080892BC: .4byte sub_80891B0
_080892C0: .4byte sub_8089224
_080892C4: .4byte sub_80891D0
thumb_func_end sub_8089294
thumb_func_start sub_80892C8
sub_80892C8:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0xF
bl sub_8085680
adds r5, r0, 0
movs r0, 0x1A
bl sub_8083E88
bl sub_8085374
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08089320
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _08089324
movs r1, 0xCE
lsls r1, 1
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_08089320: .4byte sub_8086A3C
_08089324: .4byte gUnknown_202E038
thumb_func_end sub_80892C8
thumb_func_start sub_8089328
sub_8089328:
push {r4-r6,lr}
sub sp, 0x4
bl sub_8085480
adds r5, r0, 0
movs r0, 0xF
bl sub_8085680
adds r4, r0, 0
movs r0, 0x1A
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r6, _08089370
adds r0, r6, 0
bl sub_80855E4
movs r0, 0xCE
lsls r0, 1
bl sub_8086AE4
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _08089374
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808938C
.align 2, 0
_08089370: .4byte sub_8086A3C
_08089374:
ldr r0, _080893AC
movs r3, 0
ldrsh r2, [r0, r3]
str r1, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0
bl sub_8072008
adds r0, r4, 0
bl _call_via_r6
_0808938C:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _080893B0
movs r1, 0xCE
lsls r1, 1
bl sub_808D8BC
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080893AC: .4byte gUnknown_80F57CA
_080893B0: .4byte gUnknown_202E038
thumb_func_end sub_8089328
thumb_func_start sub_80893B4
sub_80893B4:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xE9
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _080893DA
cmp r0, 0xF
bne _080893DA
movs r0, 0xF
bl sub_8097FA8
ldr r0, _080893E0
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_080893DA:
pop {r0}
bx r0
.align 2, 0
_080893E0: .4byte gUnknown_203B418
thumb_func_end sub_80893B4
thumb_func_start sub_80893E4
sub_80893E4:
push {r4-r6,lr}
bl sub_8085480
adds r5, r0, 0
bl sub_808548C
adds r4, r0, 0
movs r0, 0xF
bl sub_8085680
adds r6, r0, 0
bl sub_8086448
ldr r0, _080894D4
bl sub_8052910
bl sub_8089674
ldr r0, _080894D8
bl sub_8052910
adds r0, r4, 0
movs r1, 0x4
bl sub_80856E0
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x2
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x6
bl sub_80869E4
ldr r0, _080894DC
bl sub_8052910
adds r0, r4, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x1
movs r3, 0x4
bl sub_80869E4
ldr r0, _080894E0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080894E4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080894E8
bl sub_8052910
bl sub_8089674
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _080894EC
bl sub_8052910
adds r0, r6, 0
bl sub_8089620
ldr r0, _080894F0
bl sub_8052910
bl sub_8089674
ldr r0, _080894F4
bl sub_8052910
bl sub_8089674
ldr r0, _080894F8
bl sub_8052910
bl sub_8089674
ldr r0, _080894FC
bl sub_8052910
movs r1, 0x96
lsls r1, 2
adds r0, r6, 0
movs r2, 0x20
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080894D4: .4byte gUnknown_8103500
_080894D8: .4byte gUnknown_810352C
_080894DC: .4byte gUnknown_8103578
_080894E0: .4byte gUnknown_81035D4
_080894E4: .4byte gUnknown_8103618
_080894E8: .4byte gUnknown_810367C
_080894EC: .4byte gUnknown_8103690
_080894F0: .4byte gUnknown_81036C8
_080894F4: .4byte gUnknown_81037A0
_080894F8: .4byte gUnknown_81037D4
_080894FC: .4byte gUnknown_8103820
thumb_func_end sub_80893E4
thumb_func_start sub_8089500
sub_8089500:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0xF
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
bl sub_8089674
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _08089574
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8089620
ldr r0, _08089578
bl sub_8052910
bl sub_8089674
ldr r0, _0808957C
bl sub_8052910
bl sub_8089674
ldr r0, _08089580
bl sub_8052910
bl sub_8089674
ldr r0, _08089584
bl sub_8052910
movs r1, 0x96
lsls r1, 2
adds r0, r5, 0
movs r2, 0x20
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089574: .4byte gUnknown_8103690
_08089578: .4byte gUnknown_8103844
_0808957C: .4byte gUnknown_8103874
_08089580: .4byte gUnknown_81038A8
_08089584: .4byte gUnknown_81038F8
thumb_func_end sub_8089500
thumb_func_start sub_8089588
sub_8089588:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0xF
bl sub_8085680
adds r4, r0, 0
bl sub_8086448
movs r0, 0xCE
lsls r0, 1
bl sub_8086AE4
lsls r0, 24
cmp r0, 0
beq _080895B8
ldr r0, _080895B4
bl sub_80866C4
b _08089606
.align 2, 0
_080895B4: .4byte gUnknown_8103B58
_080895B8:
movs r0, 0xED
lsls r0, 1
bl sub_8083E38
ldr r0, _0808960C
bl sub_8052910
adds r0, r4, 0
bl sub_8089620
ldr r0, _08089610
bl sub_8052910
bl sub_8089674
ldr r0, _08089614
bl sub_8052910
bl sub_8089674
ldr r0, _08089618
bl sub_8052910
bl sub_8089674
ldr r0, _0808961C
bl sub_8052910
movs r1, 0x96
lsls r1, 2
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08089606:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808960C: .4byte gUnknown_8103904
_08089610: .4byte gUnknown_8103938
_08089614: .4byte gUnknown_8103AA4
_08089618: .4byte gUnknown_8103AE4
_0808961C: .4byte gUnknown_8103B30
thumb_func_end sub_8089588
thumb_func_start sub_8089620
sub_8089620:
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, [r6, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
movs r5, 0xC8
lsls r5, 8
movs r4, 0xC0
lsls r4, 3
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
b _08089652
_08089642:
ldr r0, [r6, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
str r5, [r0]
movs r0, 0x46
bl sub_803E46C
_08089652:
subs r5, r4
subs r4, 0x18
cmp r4, 0x13
bgt _0808965C
movs r4, 0x14
_0808965C:
cmp r5, 0
bge _08089642
ldr r0, [r6, 0x70]
movs r2, 0xBA
lsls r2, 1
adds r0, r2
movs r1, 0
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8089620
thumb_func_start sub_8089674
sub_8089674:
push {r4,lr}
sub sp, 0x4
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
_08089682:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r2, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _08089682
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_080896AC:
lsrs r0, r4, 31
adds r0, r4, r0
asrs r0, 1
movs r1, 0x1
str r1, [sp]
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _080896AC
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_080896D6:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r2, 0
adds r1, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _080896D6
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8089674
thumb_func_start sub_808970C
sub_808970C:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x7D
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08089744
bl sub_80855E4
ldr r0, _08089748
bl sub_808563C
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x3
bl sub_8085860
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08089744: .4byte sub_8086A3C
_08089748: .4byte sub_8089908
thumb_func_end sub_808970C
thumb_func_start sub_808974C
sub_808974C:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08089780
bl sub_80855E4
ldr r0, _08089784
bl sub_808563C
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x3
bl sub_8085860
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08089780: .4byte sub_8086A3C
_08089784: .4byte sub_80898F8
thumb_func_end sub_808974C
thumb_func_start sub_8089788
sub_8089788:
push {r4-r7,lr}
adds r7, r0, 0
lsls r1, 24
lsrs r6, r1, 24
lsls r2, 24
movs r0, 0xE6
lsls r0, 24
adds r2, r0
lsrs r2, 24
cmp r2, 0x1
bhi _080897E2
movs r5, 0
_080897A0:
ldr r0, _080897E8
ldr r0, [r0]
lsls r1, r5, 2
ldr r2, _080897EC
adds r0, r2
adds r0, r1
ldr r4, [r0]
adds r0, r4, 0
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _080897C8
cmp r4, r7
beq _080897C8
ldr r0, [r4, 0x70]
adds r0, 0xA4
ldrb r0, [r0]
cmp r0, r6
beq _080897E2
_080897C8:
adds r5, 0x1
cmp r5, 0xF
ble _080897A0
movs r0, 0
cmp r0, 0
bne _080897E2
movs r0, 0x11
bl sub_8097FA8
ldr r0, _080897E8
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_080897E2:
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_080897E8: .4byte gUnknown_203B418
_080897EC: .4byte 0x0001358c
thumb_func_end sub_8089788
thumb_func_start sub_80897F0
sub_80897F0:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _08089858
bl sub_808563C
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
bl sub_808692C
ldr r0, _0808985C
bl sub_8052910
ldr r0, _08089860
bl sub_8052910
ldr r0, _08089864
bl sub_8052910
ldr r0, _08089868
bl sub_8052910
ldr r0, _0808986C
bl sub_8052910
ldr r0, _08089870
bl sub_8052910
ldr r0, _08089874
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_08089858: .4byte sub_80862BC
_0808985C: .4byte gUnknown_8103BD8
_08089860: .4byte gUnknown_8103C00
_08089864: .4byte gUnknown_8103C3C
_08089868: .4byte gUnknown_8103C74
_0808986C: .4byte gUnknown_8103CC4
_08089870: .4byte gUnknown_8103D0C
_08089874: .4byte gUnknown_8103D50
thumb_func_end sub_80897F0
thumb_func_start sub_8089878
sub_8089878:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8086448
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _080898D0
bl sub_808563C
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
bl sub_808692C
ldr r0, _080898D4
bl sub_8052910
ldr r0, _080898D8
bl sub_8052910
ldr r0, _080898DC
bl sub_8052910
ldr r0, _080898E0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_080898D0: .4byte sub_80862BC
_080898D4: .4byte gUnknown_8103D8C
_080898D8: .4byte gUnknown_8103D98
_080898DC: .4byte gUnknown_8103DD8
_080898E0: .4byte gUnknown_8103E28
thumb_func_end sub_8089878
thumb_func_start sub_80898E4
sub_80898E4:
push {lr}
bl sub_8086448
ldr r0, _080898F4
bl sub_80866C4
pop {r0}
bx r0
.align 2, 0
_080898F4: .4byte gUnknown_8103E34
thumb_func_end sub_80898E4
thumb_func_start sub_80898F8
sub_80898F8:
push {lr}
movs r1, 0x87
lsls r1, 2
movs r2, 0
bl sub_8068FE0
pop {r0}
bx r0
thumb_func_end sub_80898F8
thumb_func_start sub_8089908
sub_8089908:
push {lr}
movs r1, 0x4
bl sub_8085918
pop {r0}
bx r0
thumb_func_end sub_8089908
thumb_func_start sub_8089914
sub_8089914:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x11
bl sub_8085680
adds r5, r0, 0
bl sub_8083F14
ldr r0, _0808996C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _08089970
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _08089974
movs r1, 0x96
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808996C: .4byte gUnknown_203B418
_08089970: .4byte sub_8086A3C
_08089974: .4byte gUnknown_202E038
thumb_func_end sub_8089914
thumb_func_start sub_8089978
sub_8089978:
push {r4-r6,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x11
bl sub_8085680
adds r4, r0, 0
bl sub_8083F14
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r6, _080899C0
adds r0, r6, 0
bl sub_80855E4
movs r0, 0x96
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _080899C4
movs r0, 0x23
bl sub_8083E88
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _080899DA
.align 2, 0
_080899C0: .4byte sub_8086A3C
_080899C4:
ldr r0, _080899F8
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl _call_via_r6
_080899DA:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _080899FC
movs r1, 0x96
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080899F8: .4byte gUnknown_203B418
_080899FC: .4byte gUnknown_202E038
thumb_func_end sub_8089978
thumb_func_start sub_8089A00
sub_8089A00:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xE3
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _08089A26
cmp r0, 0x11
bne _08089A26
movs r0, 0x13
bl sub_8097FA8
ldr r0, _08089A2C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_08089A26:
pop {r0}
bx r0
.align 2, 0
_08089A2C: .4byte gUnknown_203B418
thumb_func_end sub_8089A00
thumb_func_start sub_8089A30
sub_8089A30:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x11
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
ldr r0, _08089AC0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x23
bl sub_8083E88
bl sub_8086794
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8089B64
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08089AC4
bl sub_8052910
ldr r0, _08089AC8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8089BB8
ldr r0, _08089ACC
bl sub_8052910
bl sub_8089BB8
ldr r0, _08089AD0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xE1
lsls r1, 2
adds r0, r5, 0
movs r2, 0x20
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089AC0: .4byte gUnknown_8103EA4
_08089AC4: .4byte gUnknown_8103F0C
_08089AC8: .4byte gUnknown_8103F4C
_08089ACC: .4byte gUnknown_8103FCC
_08089AD0: .4byte gUnknown_8104008
thumb_func_end sub_8089A30
thumb_func_start sub_8089AD4
sub_8089AD4:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x11
bl sub_8085680
adds r4, r0, 0
bl sub_8086448
movs r0, 0x96
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _08089B00
ldr r0, _08089AFC
bl sub_80866C4
b _08089B4E
.align 2, 0
_08089AFC: .4byte gUnknown_8104144
_08089B00:
ldr r0, _08089B54
bl sub_8052910
movs r0, 0x23
bl sub_8083E88
bl sub_8086794
adds r0, r4, 0
bl sub_8089B64
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _08089B58
bl sub_8052910
bl sub_8089BB8
ldr r0, _08089B5C
bl sub_8052910
bl sub_8089BB8
ldr r0, _08089B60
bl sub_8052910
movs r1, 0xE1
lsls r1, 2
adds r0, r4, 0
movs r2, 0x20
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08089B4E:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089B54: .4byte gUnknown_8104044
_08089B58: .4byte gUnknown_8104050
_08089B5C: .4byte gUnknown_81040CC
_08089B60: .4byte gUnknown_8104114
thumb_func_end sub_8089AD4
thumb_func_start sub_8089B64
sub_8089B64:
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, [r6, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
movs r5, 0xC8
lsls r5, 8
movs r4, 0x80
lsls r4, 3
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
b _08089B96
_08089B86:
ldr r0, [r6, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
str r5, [r0]
movs r0, 0x46
bl sub_803E46C
_08089B96:
subs r5, r4
subs r4, 0xB
cmp r4, 0x1D
bgt _08089BA0
movs r4, 0x1E
_08089BA0:
cmp r5, 0
bge _08089B86
ldr r0, [r6, 0x70]
movs r2, 0xBA
lsls r2, 1
adds r0, r2
movs r1, 0
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8089B64
thumb_func_start sub_8089BB8
sub_8089BB8:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_08089BC8:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _08089BC8
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_08089BEE:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08089BEE
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_08089C14:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08089C14
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8089BB8
thumb_func_start sub_8089C44
sub_8089C44:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x12
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _08089C88
ldr r1, _08089C8C
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089C88: .4byte gUnknown_202E038
_08089C8C: .4byte 0x0000010d
thumb_func_end sub_8089C44
thumb_func_start sub_8089C90
sub_8089C90:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x12
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _08089CCC
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _08089CD0
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _08089CD8
.align 2, 0
_08089CCC: .4byte 0x0000010d
_08089CD0:
adds r0, r4, 0
movs r1, 0
bl sub_8085918
_08089CD8:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _08089CF4
ldr r1, _08089CF8
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089CF4: .4byte gUnknown_202E038
_08089CF8: .4byte 0x0000010d
thumb_func_end sub_8089C90
thumb_func_start sub_8089CFC
sub_8089CFC:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xE0
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _08089D22
cmp r0, 0x12
bne _08089D22
movs r0, 0x15
bl sub_8097FA8
ldr r0, _08089D28
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_08089D22:
pop {r0}
bx r0
.align 2, 0
_08089D28: .4byte gUnknown_203B418
thumb_func_end sub_8089CFC
thumb_func_start sub_8089D2C
sub_8089D2C:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x12
bl sub_8085680
adds r5, r0, 0
bl sub_8089E68
ldr r0, _08089D80
bl sub_8052910
bl sub_8089E68
ldr r0, _08089D84
bl sub_8052910
bl sub_8089E68
ldr r0, _08089D88
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089D80: .4byte gUnknown_8104150
_08089D84: .4byte gUnknown_81041AC
_08089D88: .4byte gUnknown_81041F8
thumb_func_end sub_8089D2C
thumb_func_start sub_8089D8C
sub_8089D8C:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x12
bl sub_8085680
adds r5, r0, 0
bl sub_8089E68
ldr r0, _08089DE0
bl sub_8052910
bl sub_8089E68
ldr r0, _08089DE4
bl sub_8052910
bl sub_8089E68
ldr r0, _08089DE8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089DE0: .4byte gUnknown_8104240
_08089DE4: .4byte gUnknown_81042AC
_08089DE8: .4byte gUnknown_81042B8
thumb_func_end sub_8089D8C
thumb_func_start sub_8089DEC
sub_8089DEC:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x12
bl sub_8085680
adds r4, r0, 0
ldr r0, _08089E10
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _08089E18
ldr r0, _08089E14
bl sub_80866C4
b _08089E54
.align 2, 0
_08089E10: .4byte 0x0000010d
_08089E14: .4byte gUnknown_81043DC
_08089E18:
bl sub_8089E68
ldr r0, _08089E5C
bl sub_8052910
bl sub_8089E68
ldr r0, _08089E60
bl sub_8052910
bl sub_8089E68
ldr r0, _08089E64
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_08089E54:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089E5C: .4byte gUnknown_8104310
_08089E60: .4byte gUnknown_810439C
_08089E64: .4byte gUnknown_81043C0
thumb_func_end sub_8089DEC
thumb_func_start sub_8089E68
sub_8089E68:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _08089EF8
bl sub_8083E38
movs r4, 0xFA
_08089E74:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _08089E74
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_08089EA0:
str r5, [sp]
adds r0, r4, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _08089EA0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
_08089EC4:
lsrs r2, r4, 31
adds r2, r4, r2
asrs r2, 1
movs r0, 0x1
str r0, [sp]
adds r0, r4, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _08089EC4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089EF8: .4byte 0x000001ed
thumb_func_end sub_8089E68
thumb_func_start sub_8089EFC
sub_8089EFC:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x13
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _08089F40
movs r1, 0x86
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089F40: .4byte gUnknown_202E038
thumb_func_end sub_8089EFC
thumb_func_start sub_8089F44
sub_8089F44:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x13
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _08089F88
movs r1, 0x86
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089F88: .4byte gUnknown_202E038
thumb_func_end sub_8089F44
thumb_func_start sub_8089F8C
sub_8089F8C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x13
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r0, 0x86
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _08089FC8
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _08089FD0
_08089FC8:
adds r0, r4, 0
movs r1, 0
bl sub_8085918
_08089FD0:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _08089FEC
movs r1, 0x86
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_08089FEC: .4byte gUnknown_202E038
thumb_func_end sub_8089F8C
thumb_func_start sub_8089FF0
sub_8089FF0:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xDD
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808A016
cmp r0, 0x13
bne _0808A016
movs r0, 0x17
bl sub_8097FA8
ldr r0, _0808A01C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808A016:
pop {r0}
bx r0
.align 2, 0
_0808A01C: .4byte gUnknown_203B418
thumb_func_end sub_8089FF0
thumb_func_start sub_808A020
sub_808A020:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x13
bl sub_8085680
adds r5, r0, 0
ldr r0, _0808A0A4
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A0A8
bl sub_8052910
ldr r0, _0808A0AC
ldr r0, [r0]
ldr r1, _0808A0B0
adds r0, r1
movs r1, 0x4
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A0B4
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A0B8
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A0BC
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A0C0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A0C4
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A0A4: .4byte gUnknown_8104450
_0808A0A8: .4byte gUnknown_81044B4
_0808A0AC: .4byte gUnknown_203B418
_0808A0B0: .4byte 0x0000e265
_0808A0B4: .4byte gUnknown_8104510
_0808A0B8: .4byte gUnknown_810453C
_0808A0BC: .4byte gUnknown_8104570
_0808A0C0: .4byte gUnknown_81045B0
_0808A0C4: .4byte 0x0000028a
thumb_func_end sub_808A020
thumb_func_start sub_808A0C8
sub_808A0C8:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x13
bl sub_8085680
adds r5, r0, 0
ldr r0, _0808A12C
ldr r0, [r0]
ldr r1, _0808A130
adds r0, r1
movs r1, 0x4
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
bl sub_808A1D8
ldr r0, _0808A134
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A138
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A13C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A140
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A12C: .4byte gUnknown_203B418
_0808A130: .4byte 0x0000e265
_0808A134: .4byte gUnknown_81045F8
_0808A138: .4byte gUnknown_8104674
_0808A13C: .4byte gUnknown_81046A0
_0808A140: .4byte 0x0000028a
thumb_func_end sub_808A0C8
thumb_func_start sub_808A144
sub_808A144:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x13
bl sub_8085680
adds r4, r0, 0
movs r0, 0x86
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808A170
ldr r0, _0808A16C
bl sub_80866C4
b _0808A1BA
.align 2, 0
_0808A16C: .4byte gUnknown_8104778
_0808A170:
ldr r0, _0808A1C0
ldr r0, [r0]
ldr r1, _0808A1C4
adds r0, r1
movs r1, 0x4
strb r1, [r0]
movs r0, 0
movs r1, 0x1
bl sub_807EAA0
ldr r0, _0808A1C8
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A1CC
bl sub_8052910
bl sub_808A1D8
ldr r0, _0808A1D0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A1D4
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808A1BA:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A1C0: .4byte gUnknown_203B418
_0808A1C4: .4byte 0x0000e265
_0808A1C8: .4byte gUnknown_81046CC
_0808A1CC: .4byte gUnknown_8104744
_0808A1D0: .4byte gUnknown_810476C
_0808A1D4: .4byte 0x0000028a
thumb_func_end sub_808A144
thumb_func_start sub_808A1D8
sub_808A1D8:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808A1E8:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808A1E8
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A20E:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808A20E
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A234:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808A234
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808A1D8
thumb_func_start sub_808A264
sub_808A264:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x14
bl sub_8085680
adds r5, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _0808A2B8
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808A2BC
movs r1, 0x87
lsls r1, 1
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808A2B8: .4byte sub_8086A3C
_0808A2BC: .4byte gUnknown_202E038
thumb_func_end sub_808A264
thumb_func_start sub_808A2C0
sub_808A2C0:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x14
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _0808A304
movs r1, 0x87
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A304: .4byte gUnknown_202E038
thumb_func_end sub_808A2C0
thumb_func_start sub_808A308
sub_808A308:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x14
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r0, 0x87
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808A344
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808A34C
_0808A344:
adds r0, r4, 0
movs r1, 0
bl sub_8085918
_0808A34C:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _0808A368
movs r1, 0x87
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A368: .4byte gUnknown_202E038
thumb_func_end sub_808A308
thumb_func_start sub_808A36C
sub_808A36C:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xDA
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808A392
cmp r0, 0x14
bne _0808A392
movs r0, 0x19
bl sub_8097FA8
ldr r0, _0808A398
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808A392:
pop {r0}
bx r0
.align 2, 0
_0808A398: .4byte gUnknown_203B418
thumb_func_end sub_808A36C
thumb_func_start sub_808A39C
sub_808A39C:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x14
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
ldr r0, _0808A434
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A438
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x1
movs r1, 0x2
bl sub_80426C8
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A43C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_808A528
ldr r0, _0808A440
bl sub_8052910
ldr r0, _0808A444
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A448
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A44C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A450
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A434: .4byte gUnknown_8104784
_0808A438: .4byte gUnknown_8104790
_0808A43C: .4byte gUnknown_81047B0
_0808A440: .4byte gUnknown_810484C
_0808A444: .4byte gUnknown_8104888
_0808A448: .4byte gUnknown_81048C8
_0808A44C: .4byte gUnknown_8104914
_0808A450: .4byte 0x0000028a
thumb_func_end sub_808A39C
thumb_func_start sub_808A454
sub_808A454:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x14
bl sub_8085680
adds r5, r0, 0
ldr r0, _0808A4A0
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A4A4
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A4A8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A4AC
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A4A0: .4byte gUnknown_8104930
_0808A4A4: .4byte gUnknown_8104980
_0808A4A8: .4byte gUnknown_8104998
_0808A4AC: .4byte 0x0000028a
thumb_func_end sub_808A454
thumb_func_start sub_808A4B0
sub_808A4B0:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x14
bl sub_8085680
adds r4, r0, 0
movs r0, 0x87
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808A4DC
ldr r0, _0808A4D8
bl sub_80866C4
b _0808A512
.align 2, 0
_0808A4D8: .4byte gUnknown_8104AC8
_0808A4DC:
ldr r0, _0808A518
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A51C
bl sub_8052910
bl sub_808A57C
ldr r0, _0808A520
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, _0808A524
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r0, r5, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808A512:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A518: .4byte gUnknown_81049D4
_0808A51C: .4byte gUnknown_8104A80
_0808A520: .4byte gUnknown_8104A9C
_0808A524: .4byte 0x0000028a
thumb_func_end sub_808A4B0
thumb_func_start sub_808A528
sub_808A528:
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, [r6, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
movs r5, 0xC8
lsls r5, 8
movs r4, 0xC0
lsls r4, 4
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
b _0808A55A
_0808A54A:
ldr r0, [r6, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
str r5, [r0]
movs r0, 0x46
bl sub_803E46C
_0808A55A:
subs r5, r4
subs r4, 0x60
cmp r4, 0x13
bgt _0808A564
movs r4, 0x14
_0808A564:
cmp r5, 0
bge _0808A54A
ldr r0, [r6, 0x70]
movs r2, 0xBA
lsls r2, 1
adds r0, r2
movs r1, 0
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_808A528
thumb_func_start sub_808A57C
sub_808A57C:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xF7
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808A58C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808A58C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A5B2:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808A5B2
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A5D8:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808A5D8
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808A57C
thumb_func_start sub_808A608
sub_808A608:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x15
bl sub_8085680
adds r4, r0, 0
movs r0, 0x1C
bl sub_8083E88
bl sub_80867F4
movs r0, 0
movs r1, 0
movs r2, 0
bl sub_8086838
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl sub_8086A3C
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x6
bl sub_8085860
ldr r0, _0808A660
ldr r1, _0808A664
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A660: .4byte gUnknown_202E038
_0808A664: .4byte 0x00000113
thumb_func_end sub_808A608
thumb_func_start sub_808A668
sub_808A668:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x15
bl sub_8085680
adds r4, r0, 0
movs r0, 0x1C
bl sub_8083E88
bl sub_80867F4
movs r0, 0
movs r1, 0
movs r2, 0
bl sub_8086838
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808A6B0
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808A6B4
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808A6C2
.align 2, 0
_0808A6B0: .4byte 0x00000113
_0808A6B4:
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl sub_8086A3C
_0808A6C2:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x6
bl sub_8085860
ldr r0, _0808A6E0
ldr r1, _0808A6E4
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A6E0: .4byte gUnknown_202E038
_0808A6E4: .4byte 0x00000113
thumb_func_end sub_808A668
thumb_func_start sub_808A6E8
sub_808A6E8:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xD7
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x1
bhi _0808A70E
cmp r0, 0x15
bne _0808A70E
movs r0, 0x1A
bl sub_8097FA8
ldr r0, _0808A714
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808A70E:
pop {r0}
bx r0
.align 2, 0
_0808A714: .4byte gUnknown_203B418
thumb_func_end sub_808A6E8
thumb_func_start sub_808A718
sub_808A718:
push {lr}
bl sub_8086854
pop {r0}
bx r0
thumb_func_end sub_808A718
thumb_func_start sub_808A724
sub_808A724:
push {r4-r6,lr}
sub sp, 0x8
bl sub_8085480
adds r5, r0, 0
movs r0, 0x15
bl sub_8085680
adds r6, r0, 0
ldr r0, [r5, 0xC]
str r0, [sp]
ldr r0, [r5, 0x10]
ldr r1, _0808A800
adds r0, r1
str r0, [sp, 0x4]
mov r0, sp
movs r1, 0x88
bl sub_80858AC
movs r0, 0x40
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A804
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808A958
ldr r0, _0808A808
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A80C
bl sub_80855E4
bl sub_808680C
ldr r4, _0808A810
adds r0, r4, 0
bl sub_8083E38
movs r0, 0xFA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808A904
adds r0, r4, 0
bl sub_8083E58
bl sub_808682C
ldr r0, _0808A814
bl sub_80855E4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808A818
bl sub_8052910
ldr r0, _0808A81C
bl sub_8052910
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
bl sub_808A958
ldr r0, _0808A820
bl sub_8052910
bl sub_808A958
ldr r0, _0808A824
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xC8
lsls r1, 2
adds r0, r6, 0
movs r2, 0x20
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808A800: .4byte 0xfffff000
_0808A804: .4byte gUnknown_8104AD4
_0808A808: .4byte gUnknown_8104BEC
_0808A80C: .4byte sub_80868F4
_0808A810: .4byte 0x000001c5
_0808A814: .4byte sub_8086910
_0808A818: .4byte gUnknown_8104C10
_0808A81C: .4byte gUnknown_8104C54
_0808A820: .4byte gUnknown_8104CB4
_0808A824: .4byte gUnknown_8104CE0
thumb_func_end sub_808A724
thumb_func_start sub_808A828
sub_808A828:
push {r4,r5,lr}
sub sp, 0x8
bl sub_8085480
adds r4, r0, 0
movs r0, 0x15
bl sub_8085680
adds r5, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp]
ldr r0, [r4, 0x10]
ldr r1, _0808A86C
adds r0, r1
str r0, [sp, 0x4]
mov r0, sp
movs r1, 0x88
bl sub_80858AC
movs r0, 0x40
movs r1, 0x46
bl sub_803E708
ldr r0, _0808A870
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808A878
ldr r0, _0808A874
bl sub_80866C4
b _0808A8E2
.align 2, 0
_0808A86C: .4byte 0xfffff000
_0808A870: .4byte 0x00000113
_0808A874: .4byte gUnknown_8104E54
_0808A878:
ldr r0, _0808A8EC
bl sub_8052910
bl sub_808A958
ldr r0, _0808A8F0
bl sub_80855E4
bl sub_808680C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_808A904
bl sub_808682C
ldr r0, _0808A8F4
bl sub_80855E4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808A8F8
bl sub_8052910
bl sub_808A958
ldr r0, _0808A8FC
bl sub_8052910
bl sub_808A958
ldr r0, _0808A900
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xC8
lsls r1, 2
adds r0, r5, 0
movs r2, 0x20
bl sub_8086A70
adds r0, r4, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808A8E2:
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A8EC: .4byte gUnknown_8104CEC
_0808A8F0: .4byte sub_80868F4
_0808A8F4: .4byte sub_8086910
_0808A8F8: .4byte gUnknown_8104D60
_0808A8FC: .4byte gUnknown_8104DDC
_0808A900: .4byte gUnknown_8104E0C
thumb_func_end sub_808A828
thumb_func_start sub_808A904
sub_808A904:
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, [r6, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
movs r5, 0xC8
lsls r5, 8
movs r4, 0xC0
lsls r4, 4
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
b _0808A936
_0808A926:
ldr r0, [r6, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
str r5, [r0]
movs r0, 0x46
bl sub_803E46C
_0808A936:
subs r5, r4
subs r4, 0x60
cmp r4, 0x13
bgt _0808A940
movs r4, 0x14
_0808A940:
cmp r5, 0
bge _0808A926
ldr r0, [r6, 0x70]
movs r2, 0xBA
lsls r2, 1
adds r0, r2
movs r1, 0
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_808A904
thumb_func_start sub_808A958
sub_808A958:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _0808A9E0
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808A966:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808A966
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A98C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808A98C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808A9B2:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808A9B2
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808A9E0: .4byte 0x000001ed
thumb_func_end sub_808A958
thumb_func_start sub_808A9E4
sub_808A9E4:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x16
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808AA30
bl sub_80855E4
adds r0, r4, 0
movs r1, 0x4
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x4
bl sub_8085860
ldr r0, _0808AA34
ldr r1, _0808AA38
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808AA30: .4byte sub_8086A3C
_0808AA34: .4byte gUnknown_202E038
_0808AA38: .4byte 0x00000199
thumb_func_end sub_808A9E4
thumb_func_start sub_808AA3C
sub_808AA3C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x16
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808AA88
bl sub_80855E4
adds r0, r4, 0
movs r1, 0x4
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808AA8C
ldr r1, _0808AA90
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808AA88: .4byte sub_8086A3C
_0808AA8C: .4byte gUnknown_202E038
_0808AA90: .4byte 0x00000199
thumb_func_end sub_808AA3C
thumb_func_start sub_808AA94
sub_808AA94:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x16
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808AAE4
bl sub_80855E4
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808AAE8
ldr r1, _0808AAEC
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808AAE4: .4byte sub_8086A3C
_0808AAE8: .4byte gUnknown_202E038
_0808AAEC: .4byte 0x00000199
thumb_func_end sub_808AA94
thumb_func_start sub_808AAF0
sub_808AAF0:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
movs r2, 0xD5
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x2
bhi _0808AB16
cmp r0, 0x16
bne _0808AB16
movs r0, 0x1C
bl sub_8097FA8
ldr r0, _0808AB1C
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808AB16:
pop {r0}
bx r0
.align 2, 0
_0808AB1C: .4byte gUnknown_203B418
thumb_func_end sub_808AAF0
thumb_func_start sub_808AB20
sub_808AB20:
push {r4,r5,lr}
sub sp, 0x10
bl sub_8085480
adds r5, r0, 0
movs r0, 0x16
bl sub_8085680
adds r4, r0, 0
ldr r0, [r4, 0xC]
str r0, [sp, 0x4]
ldr r0, [r4, 0x10]
movs r1, 0x80
lsls r1, 6
adds r0, r1
str r0, [sp, 0x8]
ldr r0, _0808ABC4
str r0, [sp, 0xC]
ldr r0, _0808ABC8
add r3, sp, 0xC
movs r1, 0x1
str r1, [sp]
movs r1, 0
movs r2, 0
bl sub_8085EC8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
bl sub_8086448
add r0, sp, 0x4
movs r1, 0x18
bl sub_80858AC
movs r0, 0x2
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_80862BC
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
bl sub_808692C
ldr r0, _0808ABCC
bl sub_8052910
bl sub_808AC50
ldr r0, _0808ABD0
bl sub_8052910
bl sub_808AC50
ldr r0, _0808ABD4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r4, 0
movs r2, 0xB
bl sub_8086A70
adds r5, 0xC
adds r0, r5, 0
movs r1, 0x10
bl sub_80858AC
add sp, 0x10
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808ABC4: .4byte 0x007000fc
_0808ABC8: .4byte 0x000001bd
_0808ABCC: .4byte gUnknown_8104E60
_0808ABD0: .4byte gUnknown_8104EFC
_0808ABD4: .4byte gUnknown_8104F30
thumb_func_end sub_808AB20
thumb_func_start sub_808ABD8
sub_808ABD8:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x16
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
bl sub_808692C
ldr r0, _0808AC30
bl sub_8052910
bl sub_808AC50
ldr r0, _0808AC34
bl sub_8052910
bl sub_808AC50
ldr r0, _0808AC38
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808AC30: .4byte gUnknown_8104F64
_0808AC34: .4byte gUnknown_8104EFC
_0808AC38: .4byte gUnknown_8104F30
thumb_func_end sub_808ABD8
thumb_func_start sub_808AC3C
sub_808AC3C:
push {lr}
bl sub_8086448
ldr r0, _0808AC4C
bl sub_80866C4
pop {r0}
bx r0
.align 2, 0
_0808AC4C: .4byte gUnknown_8104FC8
thumb_func_end sub_808AC3C
thumb_func_start sub_808AC50
sub_808AC50:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xF7
lsls r0, 1
bl sub_8083E38
ldr r1, _0808ACBC
movs r0, 0x1F
str r0, [r1]
movs r4, 0xFA
movs r5, 0x1
_0808AC66:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808AC66
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808AC8C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808AC8C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808ACBC: .4byte gUnknown_202EDC8
thumb_func_end sub_808AC50
thumb_func_start sub_808ACC0
sub_808ACC0:
push {r4,lr}
ldr r4, _0808ACF4
adds r0, r4, 0
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808ACF8
movs r0, 0x17
bl sub_8085680
movs r1, 0x87
lsls r1, 2
movs r2, 0
bl sub_8068FE0
movs r0, 0x22
bl sub_8097FA8
movs r0, 0x1D
bl sub_8097FA8
movs r0, 0x79
bl sub_808B1CC
b _0808AD38
.align 2, 0
_0808ACF4: .4byte 0x00000195
_0808ACF8:
movs r0, 0x79
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _0808AD10
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808AD1E
_0808AD10:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8097FA8
b _0808AD38
_0808AD1E:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8098044
ldr r0, _0808AD40
bl sub_80855E4
ldr r0, _0808AD44
adds r1, r4, 0
bl sub_808D8BC
_0808AD38:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808AD40: .4byte sub_808B2B0
_0808AD44: .4byte gUnknown_202E038
thumb_func_end sub_808ACC0
thumb_func_start sub_808AD48
sub_808AD48:
push {r4,lr}
movs r4, 0xCB
lsls r4, 1
adds r0, r4, 0
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808AD7E
movs r0, 0x18
bl sub_8085680
movs r1, 0x87
lsls r1, 2
movs r2, 0
bl sub_8068FE0
movs r0, 0x22
bl sub_8097FA8
movs r0, 0x1D
bl sub_8097FA8
movs r0, 0x77
bl sub_808B1CC
b _0808ADBE
_0808AD7E:
movs r0, 0x77
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _0808AD96
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808ADA4
_0808AD96:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8097FA8
b _0808ADBE
_0808ADA4:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8098044
ldr r0, _0808ADC4
bl sub_80855E4
ldr r0, _0808ADC8
adds r1, r4, 0
bl sub_808D8BC
_0808ADBE:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808ADC4: .4byte sub_808B2B0
_0808ADC8: .4byte gUnknown_202E038
thumb_func_end sub_808AD48
thumb_func_start sub_808ADCC
sub_808ADCC:
push {r4,lr}
ldr r4, _0808AE00
adds r0, r4, 0
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808AE04
movs r0, 0x19
bl sub_8085680
movs r1, 0x87
lsls r1, 2
movs r2, 0
bl sub_8068FE0
movs r0, 0x22
bl sub_8097FA8
movs r0, 0x1D
bl sub_8097FA8
movs r0, 0x78
bl sub_808B1CC
b _0808AE44
.align 2, 0
_0808AE00: .4byte 0x00000197
_0808AE04:
movs r0, 0x78
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _0808AE1C
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808AE2A
_0808AE1C:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8097FA8
b _0808AE44
_0808AE2A:
movs r0, 0x22
bl sub_8098044
movs r0, 0x1D
bl sub_8098044
ldr r0, _0808AE4C
bl sub_80855E4
ldr r0, _0808AE50
adds r1, r4, 0
bl sub_808D8BC
_0808AE44:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808AE4C: .4byte sub_808B2B0
_0808AE50: .4byte gUnknown_202E038
thumb_func_end sub_808ADCC
thumb_func_start sub_808AE54
sub_808AE54:
push {r4-r6,lr}
sub sp, 0x8
adds r6, r2, 0
lsls r0, 24
lsrs r5, r0, 24
lsls r1, 24
lsrs r4, r1, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AEBA
cmp r4, 0x2E
bne _0808AEBA
cmp r5, 0x17
bne _0808AEBA
movs r0, 0
bl sub_808B1CC
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AEBA
add r4, sp, 0x4
adds r0, r4, 0
movs r1, 0x79
movs r2, 0
bl sub_8090A8C
bl sub_8083600
adds r1, r6, 0
adds r2, r4, 0
bl sub_80464C8
movs r0, 0x72
bl sub_8083E88
ldr r0, _0808AEC4
bl sub_8052910
_0808AEBA:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808AEC4: .4byte gUnknown_8105040
thumb_func_end sub_808AE54
thumb_func_start sub_808AEC8
sub_808AEC8:
push {r4-r6,lr}
sub sp, 0x8
adds r6, r2, 0
lsls r0, 24
lsrs r5, r0, 24
lsls r1, 24
lsrs r4, r1, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AF2E
cmp r4, 0x2F
bne _0808AF2E
cmp r5, 0x18
bne _0808AF2E
movs r0, 0
bl sub_808B1CC
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AF2E
add r4, sp, 0x4
adds r0, r4, 0
movs r1, 0x77
movs r2, 0
bl sub_8090A8C
bl sub_8083600
adds r1, r6, 0
adds r2, r4, 0
bl sub_80464C8
movs r0, 0x72
bl sub_8083E88
ldr r0, _0808AF38
bl sub_8052910
_0808AF2E:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808AF38: .4byte gUnknown_810510C
thumb_func_end sub_808AEC8
thumb_func_start sub_808AF3C
sub_808AF3C:
push {r4-r6,lr}
sub sp, 0x8
adds r6, r2, 0
lsls r0, 24
lsrs r5, r0, 24
lsls r1, 24
lsrs r4, r1, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AFA2
cmp r4, 0x30
bne _0808AFA2
cmp r5, 0x19
bne _0808AFA2
movs r0, 0
bl sub_808B1CC
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808AFA2
add r4, sp, 0x4
adds r0, r4, 0
movs r1, 0x78
movs r2, 0
bl sub_8090A8C
bl sub_8083600
adds r1, r6, 0
adds r2, r4, 0
bl sub_80464C8
movs r0, 0x72
bl sub_8083E88
ldr r0, _0808AFAC
bl sub_8052910
_0808AFA2:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808AFAC: .4byte gUnknown_81051D0
thumb_func_end sub_808AF3C
thumb_func_start sub_808AFB0
sub_808AFB0:
push {r4,lr}
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B01E
cmp r4, 0x2E
bne _0808B01E
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B01E
movs r0, 0x79
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808B01E
movs r0, 0x1D
bl sub_8097FD0
ldr r4, _0808B028
bl sub_8083600
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0808B02C
bl sub_8052910
movs r0, 0
movs r1, 0xD4
bl sub_80421C0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8046D20
_0808B01E:
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808B028: .4byte gUnknown_202DF98
_0808B02C: .4byte gUnknown_81050B4
thumb_func_end sub_808AFB0
thumb_func_start sub_808B030
sub_808B030:
push {r4,lr}
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B09E
cmp r4, 0x2F
bne _0808B09E
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B09E
movs r0, 0x77
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808B09E
movs r0, 0x1D
bl sub_8097FD0
ldr r4, _0808B0A8
bl sub_8083600
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0808B0AC
bl sub_8052910
movs r0, 0
movs r1, 0xD4
bl sub_80421C0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8046D20
_0808B09E:
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808B0A8: .4byte gUnknown_202DF98
_0808B0AC: .4byte gUnknown_810517C
thumb_func_end sub_808B030
thumb_func_start sub_808B0B0
sub_808B0B0:
push {r4,lr}
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
bl sub_8085480
adds r1, r0, 0
mov r0, sp
movs r2, 0
bl sub_8052D44
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B11E
cmp r4, 0x30
bne _0808B11E
movs r0, 0x1D
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B11E
movs r0, 0x78
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808B11E
movs r0, 0x1D
bl sub_8097FD0
ldr r4, _0808B128
bl sub_8083600
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
bl sub_8045B94
ldr r0, _0808B12C
bl sub_8052910
movs r0, 0
movs r1, 0xD4
bl sub_80421C0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8046D20
_0808B11E:
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808B128: .4byte gUnknown_202DF98
_0808B12C: .4byte gUnknown_8105244
thumb_func_end sub_808B0B0
thumb_func_start sub_808B130
sub_808B130:
push {lr}
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B158
movs r0, 0x4
bl sub_8085930
ldr r0, _0808B15C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B160
bl sub_808563C
_0808B158:
pop {r0}
bx r0
.align 2, 0
_0808B15C: .4byte gUnknown_8104FD4
_0808B160: .4byte sub_808B2C4
thumb_func_end sub_808B130
thumb_func_start sub_808B164
sub_808B164:
push {lr}
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B18C
movs r0, 0x4
bl sub_8085930
ldr r0, _0808B190
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B194
bl sub_808563C
_0808B18C:
pop {r0}
bx r0
.align 2, 0
_0808B190: .4byte gUnknown_8105028
_0808B194: .4byte sub_808B2D4
thumb_func_end sub_808B164
thumb_func_start sub_808B198
sub_808B198:
push {lr}
movs r0, 0x22
bl sub_8098100
lsls r0, 24
cmp r0, 0
bne _0808B1C0
movs r0, 0x4
bl sub_8085930
ldr r0, _0808B1C4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B1C8
bl sub_808563C
_0808B1C0:
pop {r0}
bx r0
.align 2, 0
_0808B1C4: .4byte gUnknown_8105034
_0808B1C8: .4byte sub_808B2E4
thumb_func_end sub_808B198
thumb_func_start sub_808B1CC
sub_808B1CC:
push {r4-r7,lr}
sub sp, 0x8
lsls r0, 24
lsrs r6, r0, 24
ldr r7, _0808B21C
ldr r2, [r7]
ldr r1, _0808B220
adds r0, r2, r1
ldrh r0, [r0]
ldr r5, _0808B224
ldr r1, [sp]
ands r1, r5
orrs r1, r0
str r1, [sp]
ldr r3, _0808B228
adds r2, r3
ldrh r0, [r2]
lsls r0, 16
ldr r4, _0808B22C
adds r2, r4, 0
ands r2, r1
orrs r2, r0
str r2, [sp]
mov r0, sp
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
blt _0808B208
cmp r2, 0
bge _0808B244
_0808B208:
bl sub_8083600
adds r2, r0, 0
cmp r2, 0
bne _0808B230
ldr r1, [r7]
movs r0, 0x1
strb r0, [r1, 0x2]
b _0808B2A8
.align 2, 0
_0808B21C: .4byte gUnknown_203B418
_0808B220: .4byte 0x00000684
_0808B224: .4byte 0xffff0000
_0808B228: .4byte 0x00000686
_0808B22C: .4byte 0x0000ffff
_0808B230:
ldrh r0, [r2, 0x4]
ldr r1, [sp]
ands r1, r5
orrs r1, r0
str r1, [sp]
ldrh r0, [r2, 0x6]
lsls r0, 16
ands r1, r4
orrs r1, r0
str r1, [sp]
_0808B244:
mov r5, sp
mov r0, sp
movs r1, 0
bl sub_807FE04
mov r0, sp
movs r2, 0
ldrsh r0, [r0, r2]
movs r3, 0x2
ldrsh r1, [r5, r3]
bl sub_8049590
ldrh r2, [r0]
movs r3, 0x80
lsls r3, 2
adds r1, r3, 0
orrs r1, r2
strh r1, [r0]
cmp r6, 0
beq _0808B2A0
adds r0, r6, 0
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _0808B2A0
movs r0, 0x7A
bl sub_80860A8
lsls r0, 24
cmp r0, 0
bne _0808B2A0
add r4, sp, 0x4
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0
bl sub_8090A8C
ldrh r0, [r5, 0x2]
subs r0, 0x1
strh r0, [r5, 0x2]
mov r0, sp
adds r1, r4, 0
movs r2, 0x1
bl sub_80460F8
_0808B2A0:
bl sub_8049ED4
bl sub_8040A84
_0808B2A8:
add sp, 0x8
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_808B1CC
thumb_func_start sub_808B2B0
sub_808B2B0:
push {lr}
ldr r1, [r0, 0x70]
adds r1, 0x46
movs r2, 0x4
strb r2, [r1]
movs r1, 0x4
bl sub_806CE68
pop {r0}
bx r0
thumb_func_end sub_808B2B0
thumb_func_start sub_808B2C4
sub_808B2C4:
push {lr}
movs r1, 0xE1
lsls r1, 1
movs r2, 0xB
bl sub_8086A70
pop {r0}
bx r0
thumb_func_end sub_808B2C4
thumb_func_start sub_808B2D4
sub_808B2D4:
push {lr}
movs r1, 0xE1
lsls r1, 1
movs r2, 0xB
bl sub_8086A70
pop {r0}
bx r0
thumb_func_end sub_808B2D4
thumb_func_start sub_808B2E4
sub_808B2E4:
push {lr}
movs r1, 0xE1
lsls r1, 1
movs r2, 0xB
bl sub_8086A70
pop {r0}
bx r0
thumb_func_end sub_808B2E4
thumb_func_start sub_808B2F4
sub_808B2F4:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x1A
bl sub_8085680
adds r5, r0, 0
movs r0, 0x79
bl sub_8083E88
bl sub_808BCE4
bl sub_8049ED4
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r4, _0808B350
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
movs r1, 0
bl sub_8085918
adds r0, r5, 0
bl _call_via_r4
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808B354
ldr r1, _0808B358
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808B350: .4byte sub_8086A3C
_0808B354: .4byte gUnknown_202E038
_0808B358: .4byte 0x0000019d
thumb_func_end sub_808B2F4
thumb_func_start sub_808B35C
sub_808B35C:
push {r4-r6,lr}
bl sub_8085480
adds r6, r0, 0
movs r0, 0x1A
bl sub_8085680
adds r4, r0, 0
movs r0, 0x79
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r5, _0808B3A0
adds r0, r5, 0
bl sub_80855E4
ldr r0, _0808B3A4
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808B3A8
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808B3BE
.align 2, 0
_0808B3A0: .4byte sub_8086A3C
_0808B3A4: .4byte 0x0000019d
_0808B3A8:
adds r0, r4, 0
movs r1, 0
bl sub_8085918
adds r0, r4, 0
bl _call_via_r5
bl sub_808BCE4
bl sub_8049ED4
_0808B3BE:
movs r1, 0x4
ldrsh r0, [r6, r1]
movs r2, 0x6
ldrsh r1, [r6, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808B3DC
ldr r1, _0808B3E0
bl sub_808D8BC
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808B3DC: .4byte gUnknown_202E038
_0808B3E0: .4byte 0x0000019d
thumb_func_end sub_808B35C
thumb_func_start sub_808B3E4
sub_808B3E4:
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsls r2, 24
lsrs r4, r2, 24
movs r2, 0xCF
lsls r2, 24
adds r1, r2
lsrs r1, 24
cmp r1, 0x1
bhi _0808B44E
cmp r0, 0x1A
bne _0808B44E
movs r0, 0x1E
bl sub_8097FA8
cmp r4, 0
beq _0808B418
ldr r0, _0808B414
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
b _0808B44E
.align 2, 0
_0808B414: .4byte gUnknown_203B418
_0808B418:
ldr r0, _0808B434
ldr r0, [r0]
ldr r1, _0808B438
adds r0, r1
ldrb r4, [r0]
movs r0, 0x36
bl sub_80860A8
lsls r0, 24
cmp r0, 0
beq _0808B43C
bl sub_808B5B8
b _0808B440
.align 2, 0
_0808B434: .4byte gUnknown_203B418
_0808B438: .4byte 0x0001356c
_0808B43C:
bl sub_808B50C
_0808B440:
ldr r0, _0808B454
ldr r0, [r0]
ldr r2, _0808B458
adds r0, r2
strb r4, [r0]
bl sub_8040A84
_0808B44E:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808B454: .4byte gUnknown_203B418
_0808B458: .4byte 0x0001356c
thumb_func_end sub_808B3E4
thumb_func_start sub_808B45C
sub_808B45C:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x1A
bl sub_8085680
adds r5, r0, 0
bl sub_8086448
movs r0, 0x40
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B4F8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B4FC
bl sub_8052910
movs r0, 0x37
adds r1, r5, 0
movs r2, 0x1
bl sub_80861F8
ldr r0, _0808B500
bl sub_80855E4
movs r0, 0x3C
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_808BBB8
movs r0, 0x5A
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B504
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B508
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0xAF
lsls r1, 1
adds r0, r5, 0
movs r2, 0x20
bl sub_8086A70
adds r4, 0xC
adds r0, r4, 0
movs r1, 0x10
bl sub_80858AC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808B4F8: .4byte gUnknown_8105438
_0808B4FC: .4byte gUnknown_81054A0
_0808B500: .4byte sub_80862BC
_0808B504: .4byte gUnknown_81054E4
_0808B508: .4byte gUnknown_810550C
thumb_func_end sub_808B45C
thumb_func_start sub_808B50C
sub_808B50C:
push {r4,r5,lr}
movs r0, 0x1A
bl sub_8085680
adds r5, r0, 0
ldr r0, _0808B59C
ldr r1, _0808B5A0
bl sub_808D8BC
ldr r4, _0808B5A4
adds r0, r4, 0
bl sub_80855E4
adds r0, r5, 0
bl _call_via_r4
movs r0, 0
bl sub_8041888
ldr r0, [r5, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r1, 0
movs r4, 0x1
strb r4, [r0]
ldr r0, [r5, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r0, r2
strb r1, [r0]
adds r0, r5, 0
movs r1, 0xE
movs r2, 0
bl sub_80861B8
movs r0, 0x1E
bl sub_8083ED8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B5A8
bl sub_8052910
movs r0, 0x79
bl sub_8083E88
ldr r0, _0808B5AC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_808BC20
ldr r0, _0808B5B0
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B5B4
ldr r0, [r0]
strb r4, [r0, 0x2]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808B59C: .4byte gUnknown_202E038
_0808B5A0: .4byte 0x0000019d
_0808B5A4: .4byte sub_808BBA8
_0808B5A8: .4byte gUnknown_810554C
_0808B5AC: .4byte gUnknown_8105558
_0808B5B0: .4byte gUnknown_81055F4
_0808B5B4: .4byte gUnknown_203B418
thumb_func_end sub_808B50C
thumb_func_start sub_808B5B8
sub_808B5B8:
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x78
movs r0, 0x1A
bl sub_8085680
adds r6, r0, 0
ldr r0, _0808B82C
ldr r1, _0808B830
bl sub_808D8BC
ldr r4, _0808B834
adds r0, r4, 0
bl sub_80855E4
adds r0, r6, 0
bl _call_via_r4
movs r0, 0
bl sub_8041888
ldr r0, [r6, 0x70]
movs r1, 0xAE
lsls r1, 1
adds r0, r1
movs r1, 0
movs r4, 0x1
strb r4, [r0]
ldr r0, [r6, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r0, r2
strb r1, [r0]
adds r0, r6, 0
movs r1, 0xE
movs r2, 0
bl sub_80861B8
ldr r0, _0808B838
bl sub_80855E4
ldr r0, _0808B83C
ldr r0, [r0]
ldr r1, _0808B840
adds r0, r1
strb r4, [r0]
movs r0, 0x1E
bl sub_8083ED8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B844
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808B848
bl sub_8083E38
movs r0, 0x96
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_80862BC
ldr r0, _0808B84C
bl sub_8052910
movs r0, 0x79
bl sub_8083E88
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
movs r1, 0
bl sub_80856E0
movs r0, 0xB5
lsls r0, 1
bl sub_8083E38
ldr r0, _0808B850
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808696C
ldr r0, _0808B854
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
_0808B690:
ldr r4, _0808B858
_0808B692:
movs r0, 0
ldr r1, [r4]
ldr r2, _0808B85C
ldr r3, _0808B860
bl sub_8052C68
mov r9, r0
cmp r0, 0
ble _0808B692
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r2, r9
cmp r2, 0x1
bne _0808B754
ldr r0, _0808B864
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808BC70
movs r0, 0
add r7, sp, 0x6C
_0808B6CA:
adds r0, 0x1
mov r8, r0
mov r4, sp
movs r5, 0x8
_0808B6D2:
adds r0, r4, 0
movs r1, 0x69
movs r2, 0
bl sub_8045C28
adds r4, 0x4
subs r5, 0x1
cmp r5, 0
bge _0808B6D2
movs r0, 0x3
bl sub_8084100
ldrh r1, [r6, 0x4]
adds r1, r0
subs r1, 0x1
lsls r1, 16
lsrs r1, 16
ldr r2, _0808B868
ldr r0, [sp, 0x6C]
ands r0, r2
orrs r0, r1
str r0, [sp, 0x6C]
movs r0, 0x3
bl sub_8084100
ldrh r2, [r6, 0x6]
adds r2, r0
subs r2, 0x1
lsls r2, 16
ldr r0, _0808B86C
ldr r1, [sp, 0x6C]
ands r1, r0
orrs r1, r2
str r1, [sp, 0x6C]
movs r2, 0
ldrsh r0, [r7, r2]
asrs r1, 16
bl sub_8049590
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0808B744
movs r0, 0xA6
lsls r0, 1
bl sub_8083E38
adds r0, r7, 0
bl sub_808BB3C
adds r0, r6, 0
adds r1, r7, 0
mov r2, sp
movs r3, 0x9
bl sub_8046860
_0808B744:
mov r0, r8
cmp r0, 0x5
ble _0808B6CA
ldr r0, [r6, 0x70]
ldr r2, _0808B870
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
_0808B754:
mov r0, r9
cmp r0, 0x2
bne _0808B80A
ldr r0, _0808B874
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808BC70
movs r0, 0
add r1, sp, 0x24
mov r8, r1
add r7, sp, 0x70
_0808B776:
adds r0, 0x1
mov r10, r0
mov r4, r8
movs r5, 0x8
_0808B77E:
movs r0, 0
bl sub_803D73C
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
movs r2, 0
bl sub_8045C28
adds r4, 0x4
subs r5, 0x1
cmp r5, 0
bge _0808B77E
movs r0, 0x3
bl sub_8084100
ldrh r1, [r6, 0x4]
adds r1, r0
subs r1, 0x1
lsls r1, 16
lsrs r1, 16
ldr r2, _0808B868
ldr r0, [sp, 0x70]
ands r0, r2
orrs r0, r1
str r0, [sp, 0x70]
movs r0, 0x3
bl sub_8084100
ldrh r2, [r6, 0x6]
adds r2, r0
subs r2, 0x1
lsls r2, 16
ldr r0, _0808B86C
ldr r1, [sp, 0x70]
ands r1, r0
orrs r1, r2
str r1, [sp, 0x70]
movs r2, 0
ldrsh r0, [r7, r2]
asrs r1, 16
bl sub_8049590
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0808B7FA
movs r0, 0xC8
lsls r0, 1
bl sub_8083E38
adds r0, r7, 0
bl sub_808BB3C
adds r0, r6, 0
adds r1, r7, 0
mov r2, r8
movs r3, 0x9
bl sub_8046860
_0808B7FA:
mov r0, r10
cmp r0, 0x5
ble _0808B776
ldr r0, [r6, 0x70]
ldr r2, _0808B870
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
_0808B80A:
mov r0, r9
cmp r0, 0x3
bne _0808B8CA
bl sub_808BD94
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0x3A
bne _0808B87C
ldr r0, _0808B878
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
b _0808B690
.align 2, 0
_0808B82C: .4byte gUnknown_202E038
_0808B830: .4byte 0x0000019d
_0808B834: .4byte sub_808BBA8
_0808B838: .4byte sub_80861A8
_0808B83C: .4byte gUnknown_203B418
_0808B840: .4byte 0x0001356c
_0808B844: .4byte gUnknown_8105668
_0808B848: .4byte 0x000001a7
_0808B84C: .4byte gUnknown_8105674
_0808B850: .4byte gUnknown_81056B8
_0808B854: .4byte gUnknown_81056DC
_0808B858: .4byte gUnknown_8105798
_0808B85C: .4byte gUnknown_810579C
_0808B860: .4byte 0x00000705
_0808B864: .4byte gUnknown_810581C
_0808B868: .4byte 0xffff0000
_0808B86C: .4byte 0x0000ffff
_0808B870: .4byte 0x0000015d
_0808B874: .4byte gUnknown_8105974
_0808B878: .4byte gUnknown_8105A08
_0808B87C:
ldr r0, _0808BA30
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808BC70
ldr r0, [r6, 0x70]
ldr r2, _0808BA34
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
ldr r0, _0808BA38
bl sub_8052910
adds r0, r4, 0
bl sub_80925EC
movs r0, 0xD4
bl sub_8083E38
bl sub_8083600
adds r1, r0, 0
ldr r0, _0808BA3C
movs r2, 0
bl sub_8045B94
ldr r0, _0808BA40
adds r1, r4, 0
movs r2, 0
bl sub_8092578
ldr r0, _0808BA44
bl sub_8052910
_0808B8CA:
mov r0, r9
cmp r0, 0x4
bne _0808B98E
ldr r0, _0808BA48
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808BC70
movs r0, 0
add r1, sp, 0x48
mov r8, r1
add r7, sp, 0x74
_0808B8EC:
adds r0, 0x1
mov r10, r0
mov r4, r8
movs r5, 0x3
_0808B8F4:
movs r0, 0x8
bl sub_8084100
ldr r2, _0808BA4C
adds r0, r2
ldrb r1, [r0]
adds r0, r4, 0
movs r2, 0
bl sub_8045C28
adds r4, 0x4
subs r5, 0x1
cmp r5, 0
bge _0808B8F4
movs r0, 0x3
bl sub_8084100
ldrh r1, [r6, 0x4]
adds r1, r0
subs r1, 0x1
lsls r1, 16
lsrs r1, 16
ldr r2, _0808BA50
ldr r0, [sp, 0x74]
ands r0, r2
orrs r0, r1
str r0, [sp, 0x74]
movs r0, 0x3
bl sub_8084100
ldrh r2, [r6, 0x6]
adds r2, r0
subs r2, 0x1
lsls r2, 16
ldr r0, _0808BA54
ldr r1, [sp, 0x74]
ands r1, r0
orrs r1, r2
str r1, [sp, 0x74]
movs r2, 0
ldrsh r0, [r7, r2]
asrs r1, 16
bl sub_8049590
ldrh r1, [r0]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0808B970
movs r0, 0xC8
lsls r0, 1
bl sub_8083E38
adds r0, r7, 0
bl sub_808BB3C
adds r0, r6, 0
adds r1, r7, 0
mov r2, r8
movs r3, 0x4
bl sub_8046860
_0808B970:
mov r0, r10
cmp r0, 0x4
ble _0808B8EC
ldr r0, [r6, 0x70]
ldr r2, _0808BA34
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
ldr r0, _0808BA58
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
_0808B98E:
mov r0, r9
cmp r0, 0x5
bne _0808B9F8
ldr r0, _0808BA5C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_808BC70
ldr r0, [r6, 0x70]
ldr r2, _0808BA34
adds r1, r0, r2
movs r0, 0
strb r0, [r1]
ldr r0, _0808BA60
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8083600
adds r1, r0, 0
adds r1, 0x4
adds r0, r6, 0x4
bl sub_80983D8
adds r1, r0, 0
adds r0, r6, 0
bl sub_8085918
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808BA64
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808BA68
ldr r0, [r0]
ldr r1, _0808BA6C
adds r0, r1
movs r1, 0x1
strb r1, [r0]
_0808B9F8:
ldr r0, _0808BA70
bl sub_8052910
adds r0, r6, 0
bl sub_808BC20
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808BA74
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808BD38
add sp, 0x78
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808BA30: .4byte gUnknown_8105AD4
_0808BA34: .4byte 0x0000015d
_0808BA38: .4byte gUnknown_8105B20
_0808BA3C: .4byte gUnknown_202DF98
_0808BA40: .4byte gUnknown_202DE58
_0808BA44: .4byte gUnknown_8105B68
_0808BA48: .4byte gUnknown_8105BA8
_0808BA4C: .4byte gUnknown_81074FC
_0808BA50: .4byte 0xffff0000
_0808BA54: .4byte 0x0000ffff
_0808BA58: .4byte gUnknown_8105BF4
_0808BA5C: .4byte gUnknown_8105D2C
_0808BA60: .4byte gUnknown_8105D80
_0808BA64: .4byte gUnknown_8105D9C
_0808BA68: .4byte gUnknown_203B418
_0808BA6C: .4byte 0x00000674
_0808BA70: .4byte gUnknown_81058E0
_0808BA74: .4byte gUnknown_810593C
thumb_func_end sub_808B5B8
thumb_func_start sub_808BA78
sub_808BA78:
push {lr}
ldr r0, _0808BA94
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808BA9C
bl sub_8086448
ldr r0, _0808BA98
bl sub_80866C4
b _0808BAA0
.align 2, 0
_0808BA94: .4byte 0x0000019d
_0808BA98: .4byte gUnknown_8105E14
_0808BA9C:
bl sub_808B45C
_0808BAA0:
pop {r0}
bx r0
thumb_func_end sub_808BA78
thumb_func_start sub_808BAA4
sub_808BAA4:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _0808BB34
bl sub_8083E38
ldr r1, _0808BB38
movs r0, 0x1F
str r0, [r1]
movs r4, 0xFA
movs r5, 0x1
_0808BAB8:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808BAB8
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808BADE:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808BADE
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808BB04:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808BB04
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808BB34: .4byte 0x000002c1
_0808BB38: .4byte gUnknown_202EDC8
thumb_func_end sub_808BAA4
thumb_func_start sub_808BB3C
sub_808BB3C:
push {lr}
sub sp, 0x8
adds r3, r0, 0
movs r0, 0
ldrsh r1, [r3, r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r1, 0xC0
lsls r1, 4
adds r0, r1
cmp r0, 0
bge _0808BB58
adds r0, 0xFF
_0808BB58:
lsls r0, 8
lsrs r0, 16
ldr r1, _0808BBA0
ldr r2, [sp, 0x4]
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
movs r0, 0x2
ldrsh r1, [r3, r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 11
movs r1, 0x80
lsls r1, 5
adds r0, r1
cmp r0, 0
bge _0808BB7C
adds r0, 0xFF
_0808BB7C:
lsls r0, 8
lsrs r0, 16
lsls r0, 16
ldr r1, _0808BBA4
ands r2, r1
orrs r2, r0
str r2, [sp, 0x4]
movs r0, 0
str r0, [sp]
movs r0, 0x64
movs r1, 0
movs r2, 0
add r3, sp, 0x4
bl sub_8085EC8
add sp, 0x8
pop {r0}
bx r0
.align 2, 0
_0808BBA0: .4byte 0xffff0000
_0808BBA4: .4byte 0x0000ffff
thumb_func_end sub_808BB3C
thumb_func_start sub_808BBA8
sub_808BBA8:
push {lr}
ldr r0, [r0, 0x70]
movs r1, 0
bl sub_806BFC0
pop {r0}
bx r0
thumb_func_end sub_808BBA8
thumb_func_start sub_808BBB8
sub_808BBB8:
push {r4-r7,lr}
adds r5, r0, 0
movs r0, 0x1B
adds r1, r5, 0
movs r2, 0
bl sub_80861F8
adds r0, r5, 0
bl sub_8086A54
adds r0, r5, 0
movs r1, 0xE
movs r2, 0
bl sub_80861B8
movs r4, 0xA0
lsls r4, 8
movs r6, 0x80
lsls r6, 2
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
ldr r7, _0808BBEC
b _0808BC00
.align 2, 0
_0808BBEC: .4byte 0x000017ff
_0808BBF0:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
str r4, [r0]
movs r0, 0x46
bl sub_803E46C
_0808BC00:
subs r4, r6
cmp r4, r7
bgt _0808BC0A
movs r6, 0x80
lsls r6, 1
_0808BC0A:
cmp r4, 0
bge _0808BBF0
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
movs r1, 0
str r1, [r0]
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_808BBB8
thumb_func_start sub_808BC20
sub_808BC20:
push {r4-r6,lr}
adds r5, r0, 0
movs r0, 0xA6
lsls r0, 2
bl sub_8083E38
movs r4, 0
movs r6, 0x7
_0808BC30:
adds r1, r4, 0
ands r1, r6
adds r0, r5, 0
bl sub_8085918
movs r0, 0x3
movs r1, 0x46
bl sub_803E708
adds r4, 0x1
cmp r4, 0x18
ble _0808BC30
ldr r0, [r5, 0x70]
movs r2, 0xAF
lsls r2, 1
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
ldr r0, _0808BC6C
bl sub_8083E38
movs r0, 0x63
adds r1, r5, 0
movs r2, 0x1
bl sub_80861F8
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808BC6C: .4byte 0x0000027f
thumb_func_end sub_808BC20
thumb_func_start sub_808BC70
sub_808BC70:
push {r4,lr}
adds r4, r0, 0
ldr r0, [r4, 0x70]
ldr r2, _0808BCD4
adds r1, r0, r2
movs r0, 0x1
strb r0, [r1]
ldr r0, _0808BCD8
bl sub_8052910
ldr r0, _0808BCDC
bl sub_8083E38
movs r0, 0x67
adds r1, r4, 0
movs r2, 0x1
bl sub_80861F8
movs r0, 0xAA
lsls r0, 2
bl sub_8083E38
movs r0, 0x68
adds r1, r4, 0
movs r2, 0
bl sub_80861F8
adds r4, r0, 0
ldr r0, _0808BCE0
bl sub_8052910
adds r0, r4, 0
bl sub_800E9A8
lsls r0, 24
cmp r0, 0
beq _0808BCC0
adds r0, r4, 0
bl sub_800DC14
_0808BCC0:
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_808BAA4
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808BCD4: .4byte 0x0000015d
_0808BCD8: .4byte gUnknown_81058A8
_0808BCDC: .4byte 0x00000375
_0808BCE0: .4byte gUnknown_81058C4
thumb_func_end sub_808BC70
thumb_func_start sub_808BCE4
sub_808BCE4:
push {lr}
ldr r0, _0808BD24
ldr r1, [r0]
ldr r2, _0808BD28
adds r0, r1, r2
movs r2, 0
ldrsh r0, [r0, r2]
ldr r2, _0808BD2C
adds r1, r2
movs r2, 0
ldrsh r1, [r1, r2]
bl sub_8049590
ldrh r2, [r0]
ldr r1, _0808BD30
ands r1, r2
movs r2, 0x10
orrs r1, r2
ldr r2, _0808BD34
ands r1, r2
strh r1, [r0]
bl sub_8049884
bl sub_8049B8C
bl sub_8049ED4
bl sub_8040A84
pop {r0}
bx r0
.align 2, 0
_0808BD24: .4byte gUnknown_203B418
_0808BD28: .4byte 0x0000e23c
_0808BD2C: .4byte 0x0000e23e
_0808BD30: .4byte 0x0000fffc
_0808BD34: .4byte 0x0000fdff
thumb_func_end sub_808BCE4
thumb_func_start sub_808BD38
sub_808BD38:
push {r4,lr}
ldr r0, _0808BD84
ldr r1, [r0]
ldr r2, _0808BD88
adds r0, r1, r2
movs r4, 0
ldrsh r0, [r0, r4]
adds r2, 0x2
adds r1, r2
movs r4, 0
ldrsh r1, [r1, r4]
bl sub_8049590
ldrh r2, [r0]
ldr r1, _0808BD8C
ands r1, r2
movs r3, 0x1
orrs r1, r3
ldr r2, _0808BD90
ands r1, r2
movs r4, 0x80
lsls r4, 2
adds r2, r4, 0
orrs r1, r2
strh r1, [r0]
strb r3, [r0, 0x8]
bl sub_8049884
bl sub_8049B8C
bl sub_8049ED4
bl sub_8040A84
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808BD84: .4byte gUnknown_203B418
_0808BD88: .4byte 0x0000e23c
_0808BD8C: .4byte 0x0000fffc
_0808BD90: .4byte 0x0000ffef
thumb_func_end sub_808BD38
thumb_func_start sub_808BD94
sub_808BD94:
push {r4,r5,lr}
sub sp, 0x3C
movs r5, 0
movs r4, 0x1
_0808BD9C:
lsls r0, r4, 24
lsrs r0, 24
bl sub_8092534
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
beq _0808BDC4
cmp r0, 0x2
beq _0808BDC4
ldr r0, _0808BDDC
ldr r0, [r0]
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
bne _0808BDC4
mov r1, sp
adds r0, r1, r5
strb r4, [r0]
adds r5, 0x1
_0808BDC4:
adds r4, 0x1
cmp r4, 0x39
ble _0808BD9C
cmp r5, 0
beq _0808BDE0
adds r0, r5, 0
bl sub_8084100
add r0, sp
ldrb r0, [r0]
b _0808BDE2
.align 2, 0
_0808BDDC: .4byte gUnknown_203B468
_0808BDE0:
movs r0, 0x3A
_0808BDE2:
add sp, 0x3C
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_808BD94
thumb_func_start sub_808BDEC
sub_808BDEC:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x1B
bl sub_8085680
adds r4, r0, 0
bl sub_8083F14
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808BE34
bl sub_80855E4
movs r0, 0x89
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808BE38
movs r0, 0x23
bl sub_8083E88
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808BE48
.align 2, 0
_0808BE34: .4byte sub_8086A3C
_0808BE38:
ldr r0, _0808BE68
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
adds r0, r4, 0
movs r1, 0
bl sub_8085918
_0808BE48:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808BE6C
movs r1, 0x89
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808BE68: .4byte gUnknown_203B418
_0808BE6C: .4byte gUnknown_202E038
thumb_func_end sub_808BDEC
thumb_func_start sub_808BE70
sub_808BE70:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
cmp r1, 0x33
bne _0808BE8A
cmp r0, 0x1B
bne _0808BE8A
ldr r0, _0808BE90
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808BE8A:
pop {r0}
bx r0
.align 2, 0
_0808BE90: .4byte gUnknown_203B418
thumb_func_end sub_808BE70
thumb_func_start sub_808BE94
sub_808BE94:
push {r4-r6,lr}
sub sp, 0x4
bl sub_8085480
adds r6, r0, 0
movs r0, 0x1B
bl sub_8085680
adds r4, r0, 0
movs r0, 0x89
lsls r0, 1
bl sub_808E734
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
beq _0808BEC8
bl sub_8086448
ldr r0, _0808BEC4
bl sub_80866C4
b _0808BF7C
.align 2, 0
_0808BEC4: .4byte gUnknown_8106068
_0808BEC8:
bl sub_8083F14
bl sub_8086448
ldr r0, _0808BF84
bl sub_8052910
movs r0, 0x23
movs r1, 0x3C
bl sub_8083EA8
bl sub_808C0CC
ldr r0, _0808BF88
bl sub_8052910
bl sub_808BFA0
ldr r0, _0808BF8C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808BF90
bl sub_8052910
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
adds r0, r4, 0
movs r1, 0xD
movs r2, 0
bl sub_80861D4
movs r0, 0x2B
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
movs r1, 0
movs r2, 0
bl sub_80861B8
ldr r0, _0808BF94
bl sub_8052910
bl sub_808BFA0
ldr r0, _0808BF98
bl sub_8052910
bl sub_808C02C
movs r2, 0xFA
negs r2, r2
str r5, [sp]
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x1
bl sub_8085C54
bl sub_8083F14
adds r0, r4, 0
movs r1, 0x7
movs r2, 0
bl sub_80861D4
ldr r0, _0808BF9C
bl sub_8052910
bl sub_808BFA0
movs r1, 0xC8
lsls r1, 2
adds r0, r4, 0
movs r2, 0x20
bl sub_8086A70
movs r0, 0x23
bl sub_8083E88
adds r0, r6, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808BF7C:
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808BF84: .4byte gUnknown_8105E88
_0808BF88: .4byte gUnknown_8105EF8
_0808BF8C: .4byte gUnknown_8105F38
_0808BF90: .4byte gUnknown_8105F74
_0808BF94: .4byte gUnknown_8105FA0
_0808BF98: .4byte gUnknown_8105FD8
_0808BF9C: .4byte gUnknown_8106024
thumb_func_end sub_808BE94
thumb_func_start sub_808BFA0
sub_808BFA0:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808BFB0:
str r5, [sp]
movs r0, 0
movs r1, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808BFB0
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808BFD6:
str r5, [sp]
movs r0, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808BFD6
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808BFFC:
str r5, [sp]
movs r0, 0
movs r1, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808BFFC
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808BFA0
thumb_func_start sub_808C02C
sub_808C02C:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xFB
lsls r0, 1
bl sub_8083E38
movs r4, 0
movs r5, 0
_0808C03C:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
adds r4, 0x64
cmp r4, 0xC7
ble _0808C03C
movs r4, 0xC8
movs r5, 0
_0808C05A:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0x64
cmp r4, 0
bge _0808C05A
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
movs r4, 0
movs r5, 0
_0808C080:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
adds r4, 0x64
cmp r4, 0xC7
ble _0808C080
movs r4, 0xC8
movs r5, 0
_0808C09E:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0x64
cmp r4, 0
bge _0808C09E
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808C02C
thumb_func_start sub_808C0CC
sub_808C0CC:
push {lr}
sub sp, 0x4
ldr r1, _0808C104
movs r0, 0x1F
str r0, [r1]
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
bl sub_803E9D0
movs r0, 0x46
bl sub_803E46C
ldr r0, _0808C108
ldr r1, [r0]
movs r0, 0
strb r0, [r1, 0x7]
bl sub_808BFA0
add sp, 0x4
pop {r0}
bx r0
.align 2, 0
_0808C104: .4byte gUnknown_202EDC8
_0808C108: .4byte gUnknown_203B418
thumb_func_end sub_808C0CC
thumb_func_start sub_808C10C
sub_808C10C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x1C
bl sub_8085680
adds r4, r0, 0
bl sub_8083F14
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r0, 0xCD
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808C146
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
b _0808C156
_0808C146:
ldr r0, _0808C194
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
adds r0, r4, 0
movs r1, 0
bl sub_8085918
_0808C156:
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
ldr r0, _0808C198
adds r1, r0
adds r0, r4, 0
bl sub_803F878
ldr r4, _0808C19C
movs r1, 0xCD
lsls r1, 1
adds r0, r4, 0
bl sub_808D8BC
adds r4, 0x50
ldr r1, _0808C1A0
adds r0, r4, 0
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808C194: .4byte gUnknown_203B418
_0808C198: .4byte 0xfffff000
_0808C19C: .4byte gUnknown_202E038
_0808C1A0: .4byte 0x0000019b
thumb_func_end sub_808C10C
thumb_func_start sub_808C1A4
sub_808C1A4:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
cmp r1, 0x34
bne _0808C1C4
cmp r0, 0x1C
bne _0808C1C4
ldr r0, _0808C1C8
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
movs r0, 0x23
bl sub_8083E88
_0808C1C4:
pop {r0}
bx r0
.align 2, 0
_0808C1C8: .4byte gUnknown_203B418
thumb_func_end sub_808C1A4
thumb_func_start sub_808C1CC
sub_808C1CC:
push {r4,r5,lr}
bl sub_8085480
adds r4, r0, 0
movs r0, 0x1C
bl sub_8085680
adds r5, r0, 0
bl sub_8083F14
movs r0, 0xCD
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808C224
movs r0, 0x23
movs r1, 0x3C
bl sub_8083EA8
adds r0, r4, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C21C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C220
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
b _0808C2AE
.align 2, 0
_0808C21C: .4byte gUnknown_81062A8
_0808C220: .4byte gUnknown_203B418
_0808C224:
ldr r0, _0808C2B4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C2B8
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl nullsub_99
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C2BC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x23
movs r1, 0x3C
bl sub_8083EA8
bl sub_808C360
ldr r0, _0808C2C0
bl sub_8052910
bl sub_808C2D4
ldr r0, _0808C2C4
bl sub_8052910
bl sub_808C2D4
ldr r0, _0808C2C8
bl sub_8052910
bl sub_808C2D4
ldr r0, _0808C2CC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r1, 0x96
lsls r1, 2
adds r0, r5, 0
movs r2, 0xB
bl sub_8086A70
movs r0, 0x23
bl sub_8083E88
adds r0, r4, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808C2AE:
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808C2B4: .4byte gUnknown_8106074
_0808C2B8: .4byte gUnknown_81060BC
_0808C2BC: .4byte gUnknown_8106104
_0808C2C0: .4byte gUnknown_8106140
_0808C2C4: .4byte gUnknown_8106214
_0808C2C8: .4byte gUnknown_8106244
_0808C2CC: .4byte gUnknown_810627C
thumb_func_end sub_808C1CC
thumb_func_start nullsub_99
nullsub_99:
bx lr
thumb_func_end nullsub_99
thumb_func_start sub_808C2D4
sub_808C2D4:
push {r4,r5,lr}
sub sp, 0x4
movs r0, 0xFC
lsls r0, 1
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808C2E4:
str r5, [sp]
movs r0, 0
movs r1, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808C2E4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808C30A:
str r5, [sp]
movs r0, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808C30A
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808C330:
str r5, [sp]
movs r0, 0
movs r1, 0
adds r2, r4, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808C330
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_808C2D4
thumb_func_start sub_808C360
sub_808C360:
push {lr}
sub sp, 0x4
ldr r1, _0808C398
movs r0, 0x1F
str r0, [r1]
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
bl sub_803E9D0
movs r0, 0x46
bl sub_803E46C
ldr r0, _0808C39C
ldr r1, [r0]
movs r0, 0
strb r0, [r1, 0x7]
bl sub_808C2D4
add sp, 0x4
pop {r0}
bx r0
.align 2, 0
_0808C398: .4byte gUnknown_202EDC8
_0808C39C: .4byte gUnknown_203B418
thumb_func_end sub_808C360
thumb_func_start sub_808C3A0
sub_808C3A0:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8083F14
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808C3D4
bl sub_80855E4
movs r0, 0xCF
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808C3DC
ldr r0, _0808C3D8
bl sub_808563C
b _0808C3EA
.align 2, 0
_0808C3D4: .4byte sub_8086A3C
_0808C3D8: .4byte sub_808C590
_0808C3DC:
ldr r0, _0808C408
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x7]
ldr r0, _0808C40C
bl sub_808563C
_0808C3EA:
movs r1, 0x4
ldrsh r0, [r4, r1]
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808C410
movs r1, 0xCF
lsls r1, 1
bl sub_808D8BC
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808C408: .4byte gUnknown_203B418
_0808C40C: .4byte sub_808C5A0
_0808C410: .4byte gUnknown_202E038
thumb_func_end sub_808C3A0
thumb_func_start sub_808C414
sub_808C414:
push {lr}
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
cmp r1, 0x35
bne _0808C434
cmp r0, 0x1D
bne _0808C434
ldr r0, _0808C438
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
movs r0, 0x1A
bl sub_8083E88
_0808C434:
pop {r0}
bx r0
.align 2, 0
_0808C438: .4byte gUnknown_203B418
thumb_func_end sub_808C414
thumb_func_start sub_808C43C
sub_808C43C:
push {r4,lr}
bl sub_8085480
adds r4, r0, 0
bl sub_8086448
movs r0, 0xCF
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
beq _0808C464
ldr r0, _0808C460
bl sub_80866C4
b _0808C4A8
.align 2, 0
_0808C460: .4byte gUnknown_81063C4
_0808C464:
ldr r0, _0808C4B0
bl sub_8052910
movs r0, 0x1A
movs r1, 0x3C
bl sub_8083EA8
bl sub_808C550
ldr r0, _0808C4B4
bl sub_8052910
bl sub_808C4C4
ldr r0, _0808C4B8
bl sub_8052910
bl sub_808C4C4
ldr r0, _0808C4BC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C4C0
bl sub_808563C
adds r0, r4, 0
adds r0, 0xC
movs r1, 0x10
bl sub_80858AC
_0808C4A8:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0808C4B0: .4byte gUnknown_81062B4
_0808C4B4: .4byte gUnknown_81062E8
_0808C4B8: .4byte gUnknown_8106368
_0808C4BC: .4byte gUnknown_8106390
_0808C4C0: .4byte sub_808C5AC
thumb_func_end sub_808C43C
thumb_func_start sub_808C4C4
sub_808C4C4:
push {r4,r5,lr}
sub sp, 0x4
ldr r0, _0808C54C
bl sub_8083E38
movs r4, 0xFA
movs r5, 0x1
_0808C4D2:
str r5, [sp]
adds r0, r4, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0x95
bgt _0808C4D2
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808C4F8:
str r5, [sp]
adds r0, r4, 0
adds r1, r4, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0xC7
bgt _0808C4F8
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r4, 0xFA
movs r5, 0x1
_0808C51E:
str r5, [sp]
adds r0, r4, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
movs r0, 0x46
bl sub_803E46C
subs r4, 0xA
cmp r4, 0
bge _0808C51E
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8085EB0
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808C54C: .4byte 0x000002c1
thumb_func_end sub_808C4C4
thumb_func_start sub_808C550
sub_808C550:
push {lr}
sub sp, 0x4
ldr r1, _0808C588
movs r0, 0x1F
str r0, [r1]
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0x1
bl sub_8085C54
bl sub_803E9D0
movs r0, 0x46
bl sub_803E46C
ldr r0, _0808C58C
ldr r1, [r0]
movs r0, 0
strb r0, [r1, 0x7]
bl sub_808C4C4
add sp, 0x4
pop {r0}
bx r0
.align 2, 0
_0808C588: .4byte gUnknown_202EDC8
_0808C58C: .4byte gUnknown_203B418
thumb_func_end sub_808C550
thumb_func_start sub_808C590
sub_808C590:
push {lr}
movs r1, 0x87
lsls r1, 2
movs r2, 0
bl sub_8068FE0
pop {r0}
bx r0
thumb_func_end sub_808C590
thumb_func_start sub_808C5A0
sub_808C5A0:
push {lr}
movs r1, 0
bl sub_8085918
pop {r0}
bx r0
thumb_func_end sub_808C5A0
thumb_func_start sub_808C5AC
sub_808C5AC:
push {lr}
ldr r1, _0808C5BC
movs r2, 0x20
bl sub_8086A70
pop {r0}
bx r0
.align 2, 0
_0808C5BC: .4byte 0x000003b6
thumb_func_end sub_808C5AC
thumb_func_start sub_808C5C0
sub_808C5C0:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x1E
bl sub_8085680
adds r4, r0, 0
movs r0, 0x7F
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
bl sub_803F994
adds r4, r0, 0
bl sub_803F9B0
adds r1, r0, 0
ldr r0, _0808C61C
adds r1, r0
adds r0, r4, 0
bl sub_803F878
ldr r0, _0808C620
movs r1, 0x8A
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808C61C: .4byte 0xfffff000
_0808C620: .4byte gUnknown_202E038
thumb_func_end sub_808C5C0
thumb_func_start nullsub_100
nullsub_100:
bx lr
thumb_func_end nullsub_100
thumb_func_start sub_808C628
sub_808C628:
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
bl sub_8085480
adds r7, r0, 0
movs r0, 0x1E
bl sub_8085680
str r0, [sp]
movs r0, 0x8A
lsls r0, 1
bl sub_808E734
lsls r0, 24
cmp r0, 0
bne _0808C658
ldr r0, [sp]
bl sub_806FD18
lsls r0, 24
cmp r0, 0
bne _0808C680
_0808C658:
movs r1, 0x87
lsls r1, 2
ldr r0, [sp]
movs r2, 0
bl sub_8068FE0
adds r0, r7, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C67C
bl sub_8052910
b _0808C8AC
.align 2, 0
_0808C67C: .4byte gUnknown_810663C
_0808C680:
adds r0, r7, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r7, 0
bl sub_80862BC
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C71C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8086598
bl sub_8086598
bl sub_8086598
bl sub_8086598
ldr r0, _0808C720
bl sub_8052910
ldr r4, _0808C724
adds r0, r4, 0
bl sub_8083E38
ldr r0, [sp]
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
ldr r0, [sp]
movs r1, 0
bl sub_806CE68
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E38
ldr r0, [sp]
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
ldr r0, _0808C728
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0
mov r8, r4
ldr r6, _0808C72C
_0808C70E:
cmp r0, 0
beq _0808C730
cmp r0, 0x1
bne _0808C718
b _0808C828
_0808C718:
b _0808C8A6
.align 2, 0
_0808C71C: .4byte gUnknown_81063D0
_0808C720: .4byte gUnknown_8106400
_0808C724: .4byte 0x000001c7
_0808C728: .4byte gUnknown_810643C
_0808C72C: .4byte 0x000001d5
_0808C730:
ldr r5, _0808C75C
_0808C732:
movs r0, 0
ldr r1, [r5]
ldr r2, _0808C760
ldr r3, _0808C764
bl sub_8052C68
adds r4, r0, 0
cmp r4, 0
ble _0808C732
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
cmp r4, 0x1
bne _0808C824
bl sub_8083F14
movs r0, 0xCC
bl sub_8083E38
b _0808C76E
.align 2, 0
_0808C75C: .4byte gPtrPurityForestAllowCelebiToJoinText
_0808C760: .4byte gPurityForestAllowCelebiToJoinPrompt
_0808C764: .4byte 0x00000701
_0808C768:
movs r0, 0x46
bl sub_803E46C
_0808C76E:
movs r0, 0xCC
bl sub_8083E74
lsls r0, 24
cmp r0, 0
bne _0808C768
movs r0, 0x7F
bl sub_8083E88
mov r0, r8
bl sub_8083E38
ldr r0, [sp]
movs r1, 0xD
movs r2, 0
bl sub_80861D4
movs r0, 0x37
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_8083E38
movs r0, 0x1A
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_8083E38
movs r0, 0x1C
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C818
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r1, [sp]
adds r0, r7, 0
mov r2, sp
bl sub_806FDF4
movs r0, 0x7F
bl sub_8083E88
ldr r0, _0808C81C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
mov r0, r8
bl sub_8083E38
ldr r0, [sp]
movs r1, 0xD
movs r2, 0
bl sub_80861D4
movs r0, 0x37
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_8083E38
movs r0, 0x1A
movs r1, 0x46
bl sub_803E708
adds r0, r6, 0
bl sub_8083E38
movs r0, 0x1B
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C820
b _0808C898
.align 2, 0
_0808C818: .4byte gUnknown_8106468
_0808C81C: .4byte gUnknown_810648C
_0808C820: .4byte gUnknown_81064BC
_0808C824:
movs r0, 0x1
b _0808C8A6
_0808C828:
ldr r5, _0808C844
_0808C82A:
movs r0, 0
ldr r1, [r5]
ldr r2, _0808C848
ldr r3, _0808C84C
bl sub_8052C68
adds r4, r0, 0
cmp r4, 0
ble _0808C82A
cmp r4, 0x1
bne _0808C850
movs r0, 0
b _0808C8A6
.align 2, 0
_0808C844: .4byte gPtrPurityForestRefuseCelebiConfirmText
_0808C848: .4byte gPurityForestRefuseCelebiConfirmPrompt
_0808C84C: .4byte 0x00000701
_0808C850:
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C8D0
bl sub_8052910
ldr r1, [sp]
movs r0, 0x3E
movs r2, 0x1
bl sub_80861F8
movs r0, 0x18
movs r1, 0x46
bl sub_803E708
ldr r1, [sp]
movs r0, 0x3E
movs r2, 0x1
bl sub_80861F8
movs r0, 0xE
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C8D4
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, [sp]
bl sub_808C8E0
ldr r0, _0808C8D8
_0808C898:
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
movs r0, 0x2
_0808C8A6:
cmp r0, 0x2
beq _0808C8AC
b _0808C70E
_0808C8AC:
movs r0, 0x1E
bl sub_8083ED8
movs r0, 0x1E
movs r1, 0x46
bl sub_803E708
ldr r0, _0808C8DC
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0808C8D0: .4byte gUnknown_8106500
_0808C8D4: .4byte gUnknown_8106534
_0808C8D8: .4byte gUnknown_8106560
_0808C8DC: .4byte gUnknown_203B418
thumb_func_end sub_808C628
thumb_func_start sub_808C8E0
sub_808C8E0:
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, _0808C934
bl sub_8083E38
adds r0, r5, 0
movs r1, 0
movs r2, 0
bl sub_806CDD4
movs r4, 0
_0808C8F6:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
lsls r1, r4, 8
str r1, [r0]
movs r0, 0x46
bl sub_803E46C
adds r4, 0x1
cmp r4, 0xF
ble _0808C8F6
movs r4, 0x10
_0808C910:
ldr r0, [r5, 0x70]
movs r1, 0xBA
lsls r1, 1
adds r0, r1
lsls r1, r4, 8
str r1, [r0]
movs r0, 0x46
bl sub_803E46C
adds r4, 0x4
cmp r4, 0xC7
ble _0808C910
adds r0, r5, 0
bl sub_8086A3C
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808C934: .4byte 0x000001a5
thumb_func_end sub_808C8E0
thumb_func_start sub_808C938
sub_808C938:
push {lr}
ldr r0, _0808C944
bl sub_80855E4
pop {r0}
bx r0
.align 2, 0
_0808C944: .4byte sub_808C9B0
thumb_func_end sub_808C938
thumb_func_start sub_808C948
sub_808C948:
push {r4-r6,lr}
adds r6, r0, 0
lsls r1, 24
lsrs r1, 24
cmp r1, 0x37
bne _0808C98A
movs r5, 0
movs r4, 0
b _0808C95C
_0808C95A:
adds r4, 0x1
_0808C95C:
cmp r4, 0xF
bgt _0808C97E
ldr r0, _0808C990
ldr r0, [r0]
lsls r1, r4, 2
ldr r2, _0808C994
adds r0, r2
adds r0, r1
ldr r0, [r0]
cmp r0, r6
beq _0808C95A
bl sub_80450E0
lsls r0, 24
cmp r0, 0
beq _0808C95A
movs r5, 0x1
_0808C97E:
cmp r5, 0
bne _0808C98A
ldr r0, _0808C990
ldr r1, [r0]
movs r0, 0x1
strb r0, [r1, 0x2]
_0808C98A:
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0808C990: .4byte gUnknown_203B418
_0808C994: .4byte 0x0001358c
thumb_func_end sub_808C948
thumb_func_start sub_808C998
sub_808C998:
push {lr}
ldr r0, _0808C9AC
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
pop {r0}
bx r0
.align 2, 0
_0808C9AC: .4byte gUnknown_8106720
thumb_func_end sub_808C998
thumb_func_start sub_808C9B0
sub_808C9B0:
push {lr}
ldr r1, [r0, 0x70]
adds r1, 0x46
movs r2, 0x4
strb r2, [r1]
movs r1, 0x4
bl sub_806CE68
pop {r0}
bx r0
thumb_func_end sub_808C9B0
thumb_func_start sub_808C9C4
sub_808C9C4:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x7
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808CA10
bl sub_80855E4
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808CA14
ldr r1, _0808CA18
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CA10: .4byte sub_8086A3C
_0808CA14: .4byte gUnknown_202E038
_0808CA18: .4byte 0x0000014d
thumb_func_end sub_808C9C4
thumb_func_start sub_808CA1C
sub_808CA1C:
push {r4,r5,lr}
movs r0, 0x7
bl sub_8085680
adds r5, r0, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CB44
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CB48
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8086448
bl sub_8086598
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_80862BC
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0
bl sub_80869E4
ldr r0, _0808CB4C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r4, _0808CB50
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0
bl sub_806CE68
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CB54
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0
movs r2, 0
bl sub_806CDD4
movs r4, 0x17
_0808CAF6:
adds r0, r5, 0
movs r1, 0
movs r2, 0x80
lsls r2, 1
bl sub_804539C
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0808CAF6
adds r0, r5, 0
movs r1, 0
bl sub_806CE68
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8042B0C
movs r1, 0x87
lsls r1, 2
adds r0, r5, 0
movs r2, 0
bl sub_8068FE0
ldr r2, _0808CB58
ldr r1, [r2]
movs r0, 0x1
strb r0, [r1, 0x4]
ldr r1, [r2]
movs r0, 0x4
strb r0, [r1, 0x11]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CB44: .4byte gUnknown_8106778
_0808CB48: .4byte gUnknown_81067BC
_0808CB4C: .4byte gUnknown_81067E0
_0808CB50: .4byte 0x000001c7
_0808CB54: .4byte gUnknown_8106834
_0808CB58: .4byte gUnknown_203B418
thumb_func_end sub_808CA1C
thumb_func_start sub_808CB5C
sub_808CB5C:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x7
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
bl sub_8085860
ldr r0, _0808CBA4
ldr r1, _0808CBA8
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CBA4: .4byte gUnknown_202E038
_0808CBA8: .4byte 0x0000014d
thumb_func_end sub_808CB5C
thumb_func_start nullsub_101
nullsub_101:
bx lr
thumb_func_end nullsub_101
thumb_func_start sub_808CBB0
sub_808CBB0:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x1F
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808CBFC
bl sub_80855E4
adds r0, r4, 0
movs r1, 0
bl sub_8085918
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808CC00
movs r1, 0x82
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CBFC: .4byte sub_8086A3C
_0808CC00: .4byte gUnknown_202E038
thumb_func_end sub_808CBB0
thumb_func_start sub_808CC04
sub_808CC04:
push {r4,r5,lr}
movs r0, 0x1F
bl sub_8085680
adds r5, r0, 0
bl sub_808696C
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CD2C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0x4
bl sub_80869E4
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CD30
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
bl sub_8086448
bl sub_8086598
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_80862BC
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0x4
movs r2, 0x2
movs r3, 0
bl sub_80869E4
ldr r0, _0808CD34
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
ldr r4, _0808CD38
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0
bl sub_806CE68
movs r0, 0x4
movs r1, 0x46
bl sub_803E708
adds r0, r4, 0
bl sub_8083E38
adds r0, r5, 0
movs r1, 0xA
movs r2, 0
bl sub_806CDD4
movs r0, 0x14
movs r1, 0x46
bl sub_803E708
ldr r0, _0808CD3C
bl sub_8052910
movs r0, 0xA
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
movs r1, 0
movs r2, 0
bl sub_806CDD4
movs r4, 0x17
_0808CCDE:
adds r0, r5, 0
movs r1, 0
movs r2, 0x80
lsls r2, 1
bl sub_804539C
movs r0, 0x46
bl sub_803E46C
subs r4, 0x1
cmp r4, 0
bge _0808CCDE
adds r0, r5, 0
movs r1, 0
bl sub_806CE68
movs r0, 0x20
movs r1, 0x46
bl sub_803E708
adds r0, r5, 0
bl sub_8042B0C
movs r1, 0x87
lsls r1, 2
adds r0, r5, 0
movs r2, 0
bl sub_8068FE0
ldr r2, _0808CD40
ldr r1, [r2]
movs r0, 0x1
strb r0, [r1, 0x4]
ldr r1, [r2]
movs r0, 0x4
strb r0, [r1, 0x11]
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CD2C: .4byte gUnknown_810688C
_0808CD30: .4byte gUnknown_81068D0
_0808CD34: .4byte gUnknown_8106918
_0808CD38: .4byte 0x000001c7
_0808CD3C: .4byte gUnknown_8106934
_0808CD40: .4byte gUnknown_203B418
thumb_func_end sub_808CC04
thumb_func_start sub_808CD44
sub_808CD44:
push {r4,r5,lr}
bl sub_8085480
adds r5, r0, 0
movs r0, 0x1F
bl sub_8085680
adds r4, r0, 0
movs r0, 0x72
bl sub_8083E88
bl sub_80854D4
movs r0, 0x4
bl sub_8085930
ldr r0, _0808CD94
bl sub_80855E4
movs r1, 0x87
lsls r1, 2
adds r0, r4, 0
movs r2, 0
bl sub_8068FE0
movs r1, 0x4
ldrsh r0, [r5, r1]
movs r2, 0x6
ldrsh r1, [r5, r2]
subs r1, 0x3
bl sub_8085860
ldr r0, _0808CD98
movs r1, 0x82
lsls r1, 1
bl sub_808D8BC
pop {r4,r5}
pop {r0}
bx r0
.align 2, 0
_0808CD94: .4byte sub_8086A3C
_0808CD98: .4byte gUnknown_202E038
thumb_func_end sub_808CD44
.align 2,0 @ Don't pad with nop