prime/asm/Kyoto_CWD/Player/CGameOptions.s

1354 lines
67 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .text, "ax" # 0x80003640 - 0x803CB1C0
.global SetControls__12CGameOptionsFi
SetControls__12CGameOptionsFi:
/* 8020E998 0020B8F8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020E99C 0020B8FC 7C 08 02 A6 */ mflr r0
/* 8020E9A0 0020B900 2C 04 00 01 */ cmpwi r4, 1
/* 8020E9A4 0020B904 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020E9A8 0020B908 41 82 00 20 */ beq lbl_8020E9C8
/* 8020E9AC 0020B90C 40 80 00 24 */ bge lbl_8020E9D0
/* 8020E9B0 0020B910 2C 04 00 00 */ cmpwi r4, 0
/* 8020E9B4 0020B914 40 80 00 08 */ bge lbl_8020E9BC
/* 8020E9B8 0020B918 48 00 00 18 */ b lbl_8020E9D0
lbl_8020E9BC:
/* 8020E9BC 0020B91C 80 0D A1 2C */ lwz r0, gpTweakPlayerControl1@sda21(r13)
/* 8020E9C0 0020B920 90 0D A1 28 */ stw r0, gpTweakPlayerControlCurrent@sda21(r13)
/* 8020E9C4 0020B924 48 00 00 0C */ b lbl_8020E9D0
lbl_8020E9C8:
/* 8020E9C8 0020B928 80 0D A1 30 */ lwz r0, gpTweakPlayerControl2@sda21(r13)
/* 8020E9CC 0020B92C 90 0D A1 28 */ stw r0, gpTweakPlayerControlCurrent@sda21(r13)
lbl_8020E9D0:
/* 8020E9D0 0020B930 48 00 00 15 */ bl ResetControllerAssets__12CGameOptionsFv
/* 8020E9D4 0020B934 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020E9D8 0020B938 7C 08 03 A6 */ mtlr r0
/* 8020E9DC 0020B93C 38 21 00 10 */ addi r1, r1, 0x10
/* 8020E9E0 0020B940 4E 80 00 20 */ blr
.global ResetControllerAssets__12CGameOptionsFv
ResetControllerAssets__12CGameOptionsFv:
/* 8020E9E4 0020B944 94 21 FF 30 */ stwu r1, -0xd0(r1)
/* 8020E9E8 0020B948 7C 08 02 A6 */ mflr r0
/* 8020E9EC 0020B94C 2C 04 00 01 */ cmpwi r4, 1
/* 8020E9F0 0020B950 90 01 00 D4 */ stw r0, 0xd4(r1)
/* 8020E9F4 0020B954 BE 81 00 A0 */ stmw r20, 0xa0(r1)
/* 8020E9F8 0020B958 7C 7D 1B 78 */ mr r29, r3
/* 8020E9FC 0020B95C 41 82 00 74 */ beq lbl_8020EA70
/* 8020EA00 0020B960 40 80 02 A0 */ bge lbl_8020ECA0
/* 8020EA04 0020B964 2C 04 00 00 */ cmpwi r4, 0
/* 8020EA08 0020B968 40 80 00 08 */ bge lbl_8020EA10
/* 8020EA0C 0020B96C 48 00 02 94 */ b lbl_8020ECA0
lbl_8020EA10:
/* 8020EA10 0020B970 38 00 00 00 */ li r0, 0
/* 8020EA14 0020B974 38 7D 00 6C */ addi r3, r29, 0x6c
/* 8020EA18 0020B978 90 01 00 38 */ stw r0, 0x38(r1)
/* 8020EA1C 0020B97C 38 81 00 34 */ addi r4, r1, 0x34
/* 8020EA20 0020B980 90 01 00 3C */ stw r0, 0x3c(r1)
/* 8020EA24 0020B984 90 01 00 40 */ stw r0, 0x40(r1)
/* 8020EA28 0020B988 4B DF 4E A9 */ bl sub_800038d0
/* 8020EA2C 0020B98C 80 01 00 38 */ lwz r0, 0x38(r1)
/* 8020EA30 0020B990 80 61 00 40 */ lwz r3, 0x40(r1)
/* 8020EA34 0020B994 54 00 18 38 */ slwi r0, r0, 3
/* 8020EA38 0020B998 7C 03 02 14 */ add r0, r3, r0
/* 8020EA3C 0020B99C 90 61 00 28 */ stw r3, 0x28(r1)
/* 8020EA40 0020B9A0 7C 64 1B 78 */ mr r4, r3
/* 8020EA44 0020B9A4 90 01 00 30 */ stw r0, 0x30(r1)
/* 8020EA48 0020B9A8 90 01 00 2C */ stw r0, 0x2c(r1)
/* 8020EA4C 0020B9AC 90 61 00 24 */ stw r3, 0x24(r1)
/* 8020EA50 0020B9B0 48 00 00 08 */ b lbl_8020EA58
lbl_8020EA54:
/* 8020EA54 0020B9B4 38 84 00 08 */ addi r4, r4, 8
lbl_8020EA58:
/* 8020EA58 0020B9B8 7C 04 00 40 */ cmplw r4, r0
/* 8020EA5C 0020B9BC 40 82 FF F8 */ bne lbl_8020EA54
/* 8020EA60 0020B9C0 28 03 00 00 */ cmplwi r3, 0
/* 8020EA64 0020B9C4 41 82 02 3C */ beq lbl_8020ECA0
/* 8020EA68 0020B9C8 48 10 6E C9 */ bl Free__7CMemoryFPCv
/* 8020EA6C 0020B9CC 48 00 02 34 */ b lbl_8020ECA0
lbl_8020EA70:
/* 8020EA70 0020B9D0 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EA74 0020B9D4 2C 00 00 00 */ cmpwi r0, 0
/* 8020EA78 0020B9D8 40 82 02 28 */ bne lbl_8020ECA0
/* 8020EA7C 0020B9DC 82 8D 94 5C */ lwz r20, lbl_805A801C@sda21(r13)
/* 8020EA80 0020B9E0 38 7D 00 6C */ addi r3, r29, 0x6c
/* 8020EA84 0020B9E4 82 AD 94 60 */ lwz r21, lbl_805A8020@sda21(r13)
/* 8020EA88 0020B9E8 38 80 00 0F */ li r4, 0xf
/* 8020EA8C 0020B9EC 82 CD 94 64 */ lwz r22, lbl_805A8024@sda21(r13)
/* 8020EA90 0020B9F0 82 ED 94 68 */ lwz r23, lbl_805A8028@sda21(r13)
/* 8020EA94 0020B9F4 83 0D 94 6C */ lwz r24, lbl_805A802C@sda21(r13)
/* 8020EA98 0020B9F8 83 2D 94 70 */ lwz r25, lbl_805A8030@sda21(r13)
/* 8020EA9C 0020B9FC 83 4D 94 74 */ lwz r26, lbl_805A8034@sda21(r13)
/* 8020EAA0 0020BA00 83 6D 94 78 */ lwz r27, lbl_805A8038@sda21(r13)
/* 8020EAA4 0020BA04 83 8D 94 7C */ lwz r28, lbl_805A803C@sda21(r13)
/* 8020EAA8 0020BA08 83 ED 94 80 */ lwz r31, lbl_805A8040@sda21(r13)
/* 8020EAAC 0020BA0C 83 CD 94 84 */ lwz r30, lbl_805A8044@sda21(r13)
/* 8020EAB0 0020BA10 81 8D 94 88 */ lwz r12, lbl_805A8048@sda21(r13)
/* 8020EAB4 0020BA14 81 6D 94 8C */ lwz r11, lbl_805A804C@sda21(r13)
/* 8020EAB8 0020BA18 81 4D 94 90 */ lwz r10, lbl_805A8050@sda21(r13)
/* 8020EABC 0020BA1C 81 2D 94 94 */ lwz r9, lbl_805A8054@sda21(r13)
/* 8020EAC0 0020BA20 81 0D 94 98 */ lwz r8, lbl_805A8058@sda21(r13)
/* 8020EAC4 0020BA24 80 ED 94 9C */ lwz r7, lbl_805A805C@sda21(r13)
/* 8020EAC8 0020BA28 80 CD 94 A0 */ lwz r6, lbl_805A8060@sda21(r13)
/* 8020EACC 0020BA2C 80 AD 94 A4 */ lwz r5, lbl_805A8064@sda21(r13)
/* 8020EAD0 0020BA30 80 0D 94 A8 */ lwz r0, lbl_805A8068@sda21(r13)
/* 8020EAD4 0020BA34 92 81 00 6C */ stw r20, 0x6c(r1)
/* 8020EAD8 0020BA38 92 A1 00 70 */ stw r21, 0x70(r1)
/* 8020EADC 0020BA3C 92 C1 00 74 */ stw r22, 0x74(r1)
/* 8020EAE0 0020BA40 92 E1 00 78 */ stw r23, 0x78(r1)
/* 8020EAE4 0020BA44 93 01 00 7C */ stw r24, 0x7c(r1)
/* 8020EAE8 0020BA48 93 21 00 80 */ stw r25, 0x80(r1)
/* 8020EAEC 0020BA4C 93 41 00 84 */ stw r26, 0x84(r1)
/* 8020EAF0 0020BA50 93 61 00 88 */ stw r27, 0x88(r1)
/* 8020EAF4 0020BA54 93 81 00 8C */ stw r28, 0x8c(r1)
/* 8020EAF8 0020BA58 93 E1 00 90 */ stw r31, 0x90(r1)
/* 8020EAFC 0020BA5C 93 C1 00 44 */ stw r30, 0x44(r1)
/* 8020EB00 0020BA60 91 81 00 48 */ stw r12, 0x48(r1)
/* 8020EB04 0020BA64 91 61 00 4C */ stw r11, 0x4c(r1)
/* 8020EB08 0020BA68 91 41 00 50 */ stw r10, 0x50(r1)
/* 8020EB0C 0020BA6C 91 21 00 54 */ stw r9, 0x54(r1)
/* 8020EB10 0020BA70 91 01 00 58 */ stw r8, 0x58(r1)
/* 8020EB14 0020BA74 90 E1 00 5C */ stw r7, 0x5c(r1)
/* 8020EB18 0020BA78 90 C1 00 60 */ stw r6, 0x60(r1)
/* 8020EB1C 0020BA7C 90 A1 00 64 */ stw r5, 0x64(r1)
/* 8020EB20 0020BA80 90 01 00 68 */ stw r0, 0x68(r1)
/* 8020EB24 0020BA84 4B DF 9F 29 */ bl "reserve__Q24rstl47vector<10SScanState,Q24rstl17rmemory_allocator>Fi"
/* 8020EB28 0020BA88 3B C0 00 00 */ li r30, 0
/* 8020EB2C 0020BA8C 3B E1 00 6C */ addi r31, r1, 0x6c
lbl_8020EB30:
/* 8020EB30 0020BA90 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EB34 0020BA94 80 BD 00 74 */ lwz r5, 0x74(r29)
/* 8020EB38 0020BA98 82 9F 00 00 */ lwz r20, 0(r31)
/* 8020EB3C 0020BA9C 7C 00 28 00 */ cmpw r0, r5
/* 8020EB40 0020BAA0 82 BF 00 04 */ lwz r21, 4(r31)
/* 8020EB44 0020BAA4 41 80 00 1C */ blt lbl_8020EB60
/* 8020EB48 0020BAA8 2C 05 00 00 */ cmpwi r5, 0
/* 8020EB4C 0020BAAC 38 7D 00 6C */ addi r3, r29, 0x6c
/* 8020EB50 0020BAB0 38 80 00 04 */ li r4, 4
/* 8020EB54 0020BAB4 41 82 00 08 */ beq lbl_8020EB5C
/* 8020EB58 0020BAB8 54 A4 08 3C */ slwi r4, r5, 1
lbl_8020EB5C:
/* 8020EB5C 0020BABC 4B DF 9E F1 */ bl "reserve__Q24rstl47vector<10SScanState,Q24rstl17rmemory_allocator>Fi"
lbl_8020EB60:
/* 8020EB60 0020BAC0 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EB64 0020BAC4 80 7D 00 78 */ lwz r3, 0x78(r29)
/* 8020EB68 0020BAC8 54 00 18 38 */ slwi r0, r0, 3
/* 8020EB6C 0020BACC 7C 63 02 15 */ add. r3, r3, r0
/* 8020EB70 0020BAD0 41 82 00 0C */ beq lbl_8020EB7C
/* 8020EB74 0020BAD4 92 83 00 00 */ stw r20, 0(r3)
/* 8020EB78 0020BAD8 92 A3 00 04 */ stw r21, 4(r3)
lbl_8020EB7C:
/* 8020EB7C 0020BADC 80 7D 00 70 */ lwz r3, 0x70(r29)
/* 8020EB80 0020BAE0 82 9F 00 04 */ lwz r20, 4(r31)
/* 8020EB84 0020BAE4 38 03 00 01 */ addi r0, r3, 1
/* 8020EB88 0020BAE8 82 BF 00 00 */ lwz r21, 0(r31)
/* 8020EB8C 0020BAEC 90 1D 00 70 */ stw r0, 0x70(r29)
/* 8020EB90 0020BAF0 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EB94 0020BAF4 80 BD 00 74 */ lwz r5, 0x74(r29)
/* 8020EB98 0020BAF8 7C 00 28 00 */ cmpw r0, r5
/* 8020EB9C 0020BAFC 41 80 00 1C */ blt lbl_8020EBB8
/* 8020EBA0 0020BB00 2C 05 00 00 */ cmpwi r5, 0
/* 8020EBA4 0020BB04 38 7D 00 6C */ addi r3, r29, 0x6c
/* 8020EBA8 0020BB08 38 80 00 04 */ li r4, 4
/* 8020EBAC 0020BB0C 41 82 00 08 */ beq lbl_8020EBB4
/* 8020EBB0 0020BB10 54 A4 08 3C */ slwi r4, r5, 1
lbl_8020EBB4:
/* 8020EBB4 0020BB14 4B DF 9E 99 */ bl "reserve__Q24rstl47vector<10SScanState,Q24rstl17rmemory_allocator>Fi"
lbl_8020EBB8:
/* 8020EBB8 0020BB18 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EBBC 0020BB1C 80 7D 00 78 */ lwz r3, 0x78(r29)
/* 8020EBC0 0020BB20 54 00 18 38 */ slwi r0, r0, 3
/* 8020EBC4 0020BB24 7C 63 02 15 */ add. r3, r3, r0
/* 8020EBC8 0020BB28 41 82 00 0C */ beq lbl_8020EBD4
/* 8020EBCC 0020BB2C 92 83 00 00 */ stw r20, 0(r3)
/* 8020EBD0 0020BB30 92 A3 00 04 */ stw r21, 4(r3)
lbl_8020EBD4:
/* 8020EBD4 0020BB34 80 7D 00 70 */ lwz r3, 0x70(r29)
/* 8020EBD8 0020BB38 3B DE 00 01 */ addi r30, r30, 1
/* 8020EBDC 0020BB3C 2C 1E 00 05 */ cmpwi r30, 5
/* 8020EBE0 0020BB40 3B FF 00 08 */ addi r31, r31, 8
/* 8020EBE4 0020BB44 38 03 00 01 */ addi r0, r3, 1
/* 8020EBE8 0020BB48 90 1D 00 70 */ stw r0, 0x70(r29)
/* 8020EBEC 0020BB4C 41 80 FF 44 */ blt lbl_8020EB30
/* 8020EBF0 0020BB50 3A E0 00 00 */ li r23, 0
/* 8020EBF4 0020BB54 3A C1 00 44 */ addi r22, r1, 0x44
lbl_8020EBF8:
/* 8020EBF8 0020BB58 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EBFC 0020BB5C 80 BD 00 74 */ lwz r5, 0x74(r29)
/* 8020EC00 0020BB60 82 96 00 00 */ lwz r20, 0(r22)
/* 8020EC04 0020BB64 7C 00 28 00 */ cmpw r0, r5
/* 8020EC08 0020BB68 82 B6 00 04 */ lwz r21, 4(r22)
/* 8020EC0C 0020BB6C 41 80 00 1C */ blt lbl_8020EC28
/* 8020EC10 0020BB70 2C 05 00 00 */ cmpwi r5, 0
/* 8020EC14 0020BB74 38 7D 00 6C */ addi r3, r29, 0x6c
/* 8020EC18 0020BB78 38 80 00 04 */ li r4, 4
/* 8020EC1C 0020BB7C 41 82 00 08 */ beq lbl_8020EC24
/* 8020EC20 0020BB80 54 A4 08 3C */ slwi r4, r5, 1
lbl_8020EC24:
/* 8020EC24 0020BB84 4B DF 9E 29 */ bl "reserve__Q24rstl47vector<10SScanState,Q24rstl17rmemory_allocator>Fi"
lbl_8020EC28:
/* 8020EC28 0020BB88 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EC2C 0020BB8C 80 7D 00 78 */ lwz r3, 0x78(r29)
/* 8020EC30 0020BB90 54 00 18 38 */ slwi r0, r0, 3
/* 8020EC34 0020BB94 7C 63 02 15 */ add. r3, r3, r0
/* 8020EC38 0020BB98 41 82 00 0C */ beq lbl_8020EC44
/* 8020EC3C 0020BB9C 92 83 00 00 */ stw r20, 0(r3)
/* 8020EC40 0020BBA0 92 A3 00 04 */ stw r21, 4(r3)
lbl_8020EC44:
/* 8020EC44 0020BBA4 80 7D 00 70 */ lwz r3, 0x70(r29)
/* 8020EC48 0020BBA8 3A F7 00 01 */ addi r23, r23, 1
/* 8020EC4C 0020BBAC 2C 17 00 05 */ cmpwi r23, 5
/* 8020EC50 0020BBB0 3A D6 00 08 */ addi r22, r22, 8
/* 8020EC54 0020BBB4 38 03 00 01 */ addi r0, r3, 1
/* 8020EC58 0020BBB8 90 1D 00 70 */ stw r0, 0x70(r29)
/* 8020EC5C 0020BBBC 41 80 FF 9C */ blt lbl_8020EBF8
/* 8020EC60 0020BBC0 88 E1 00 10 */ lbz r7, 0x10(r1)
/* 8020EC64 0020BBC4 38 61 00 14 */ addi r3, r1, 0x14
/* 8020EC68 0020BBC8 38 81 00 1C */ addi r4, r1, 0x1c
/* 8020EC6C 0020BBCC 38 A1 00 08 */ addi r5, r1, 8
/* 8020EC70 0020BBD0 98 E1 00 08 */ stb r7, 8(r1)
/* 8020EC74 0020BBD4 80 1D 00 70 */ lwz r0, 0x70(r29)
/* 8020EC78 0020BBD8 80 DD 00 78 */ lwz r6, 0x78(r29)
/* 8020EC7C 0020BBDC 54 00 18 38 */ slwi r0, r0, 3
/* 8020EC80 0020BBE0 98 E1 00 0C */ stb r7, 0xc(r1)
/* 8020EC84 0020BBE4 7C C6 02 14 */ add r6, r6, r0
/* 8020EC88 0020BBE8 90 C1 00 1C */ stw r6, 0x1c(r1)
/* 8020EC8C 0020BBEC 80 1D 00 78 */ lwz r0, 0x78(r29)
/* 8020EC90 0020BBF0 90 C1 00 20 */ stw r6, 0x20(r1)
/* 8020EC94 0020BBF4 90 01 00 18 */ stw r0, 0x18(r1)
/* 8020EC98 0020BBF8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020EC9C 0020BBFC 48 00 0D 05 */ bl sub_8020f9a0
lbl_8020ECA0:
/* 8020ECA0 0020BC00 BA 81 00 A0 */ lmw r20, 0xa0(r1)
/* 8020ECA4 0020BC04 80 01 00 D4 */ lwz r0, 0xd4(r1)
/* 8020ECA8 0020BC08 7C 08 03 A6 */ mtlr r0
/* 8020ECAC 0020BC0C 38 21 00 D0 */ addi r1, r1, 0xd0
/* 8020ECB0 0020BC10 4E 80 00 20 */ blr
.global ToggleControls__12CGameOptionsFb
ToggleControls__12CGameOptionsFb:
/* 8020ECB4 0020BC14 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020ECB8 0020BC18 7C 08 02 A6 */ mflr r0
/* 8020ECBC 0020BC1C 54 84 06 3F */ clrlwi. r4, r4, 0x18
/* 8020ECC0 0020BC20 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020ECC4 0020BC24 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020ECC8 0020BC28 50 80 26 F6 */ rlwimi r0, r4, 4, 0x1b, 0x1b
/* 8020ECCC 0020BC2C 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020ECD0 0020BC30 41 82 00 10 */ beq lbl_8020ECE0
/* 8020ECD4 0020BC34 38 80 00 01 */ li r4, 1
/* 8020ECD8 0020BC38 4B FF FC C1 */ bl SetControls__12CGameOptionsFi
/* 8020ECDC 0020BC3C 48 00 00 0C */ b lbl_8020ECE8
lbl_8020ECE0:
/* 8020ECE0 0020BC40 38 80 00 00 */ li r4, 0
/* 8020ECE4 0020BC44 4B FF FC B5 */ bl SetControls__12CGameOptionsFi
lbl_8020ECE8:
/* 8020ECE8 0020BC48 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020ECEC 0020BC4C 7C 08 03 A6 */ mtlr r0
/* 8020ECF0 0020BC50 38 21 00 10 */ addi r1, r1, 0x10
/* 8020ECF4 0020BC54 4E 80 00 20 */ blr
.global SetIsRumbleEnabled__12CGameOptionsFb
SetIsRumbleEnabled__12CGameOptionsFb:
/* 8020ECF8 0020BC58 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020ECFC 0020BC5C 50 80 2E B4 */ rlwimi r0, r4, 5, 0x1a, 0x1a
/* 8020ED00 0020BC60 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020ED04 0020BC64 4E 80 00 20 */ blr
.global SetInvertYAxis__12CGameOptionsFb
SetInvertYAxis__12CGameOptionsFb:
/* 8020ED08 0020BC68 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020ED0C 0020BC6C 50 80 36 72 */ rlwimi r0, r4, 6, 0x19, 0x19
/* 8020ED10 0020BC70 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020ED14 0020BC74 4E 80 00 20 */ blr
.global SetIsHintSystemEnabled__12CGameOptionsFb
SetIsHintSystemEnabled__12CGameOptionsFb:
/* 8020ED18 0020BC78 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020ED1C 0020BC7C 50 80 1F 38 */ rlwimi r0, r4, 3, 0x1c, 0x1c
/* 8020ED20 0020BC80 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020ED24 0020BC84 4E 80 00 20 */ blr
.global SetHUDLag__12CGameOptionsFb
SetHUDLag__12CGameOptionsFb:
/* 8020ED28 0020BC88 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020ED2C 0020BC8C 50 80 3E 30 */ rlwimi r0, r4, 7, 0x18, 0x18
/* 8020ED30 0020BC90 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020ED34 0020BC94 4E 80 00 20 */ blr
.global SetHelmetAlpha__12CGameOptionsFi
SetHelmetAlpha__12CGameOptionsFi:
/* 8020ED38 0020BC98 90 83 00 64 */ stw r4, 0x64(r3)
/* 8020ED3C 0020BC9C 4E 80 00 20 */ blr
.global GetHelmetAlpha__12CGameOptionsCFv
GetHelmetAlpha__12CGameOptionsCFv:
/* 8020ED40 0020BCA0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020ED44 0020BCA4 3C 00 43 30 */ lis r0, 0x4330
/* 8020ED48 0020BCA8 C8 22 B2 30 */ lfd f1, lbl_805ACF50@sda21(r2)
/* 8020ED4C 0020BCAC 80 63 00 64 */ lwz r3, 0x64(r3)
/* 8020ED50 0020BCB0 90 01 00 08 */ stw r0, 8(r1)
/* 8020ED54 0020BCB4 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8020ED58 0020BCB8 C0 42 B2 28 */ lfs f2, lbl_805ACF48@sda21(r2)
/* 8020ED5C 0020BCBC 90 01 00 0C */ stw r0, 0xc(r1)
/* 8020ED60 0020BCC0 C8 01 00 08 */ lfd f0, 8(r1)
/* 8020ED64 0020BCC4 EC 00 08 28 */ fsubs f0, f0, f1
/* 8020ED68 0020BCC8 EC 22 00 32 */ fmuls f1, f2, f0
/* 8020ED6C 0020BCCC 38 21 00 10 */ addi r1, r1, 0x10
/* 8020ED70 0020BCD0 4E 80 00 20 */ blr
.global GetHudAlpha__12CGameOptionsCFv
GetHudAlpha__12CGameOptionsCFv:
/* 8020ED74 0020BCD4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020ED78 0020BCD8 3C 00 43 30 */ lis r0, 0x4330
/* 8020ED7C 0020BCDC C8 22 B2 30 */ lfd f1, lbl_805ACF50@sda21(r2)
/* 8020ED80 0020BCE0 80 63 00 60 */ lwz r3, 0x60(r3)
/* 8020ED84 0020BCE4 90 01 00 08 */ stw r0, 8(r1)
/* 8020ED88 0020BCE8 6C 60 80 00 */ xoris r0, r3, 0x8000
/* 8020ED8C 0020BCEC C0 42 B2 28 */ lfs f2, lbl_805ACF48@sda21(r2)
/* 8020ED90 0020BCF0 90 01 00 0C */ stw r0, 0xc(r1)
/* 8020ED94 0020BCF4 C8 01 00 08 */ lfd f0, 8(r1)
/* 8020ED98 0020BCF8 EC 00 08 28 */ fsubs f0, f0, f1
/* 8020ED9C 0020BCFC EC 22 00 32 */ fmuls f1, f2, f0
/* 8020EDA0 0020BD00 38 21 00 10 */ addi r1, r1, 0x10
/* 8020EDA4 0020BD04 4E 80 00 20 */ blr
.global SetSurroundMode__12CGameOptionsFQ29CAudioSys14ESurroundModesi
SetSurroundMode__12CGameOptionsFQ29CAudioSys14ESurroundModesi:
/* 8020EDA8 0020BD08 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EDAC 0020BD0C 7C 08 02 A6 */ mflr r0
/* 8020EDB0 0020BD10 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EDB4 0020BD14 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EDB8 0020BD18 7C BF 2B 78 */ mr r31, r5
/* 8020EDBC 0020BD1C 38 AD 94 58 */ addi r5, r13, lbl_805A8018@sda21
/* 8020EDC0 0020BD20 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EDC4 0020BD24 7C 7E 1B 78 */ mr r30, r3
/* 8020EDC8 0020BD28 38 6D 94 54 */ addi r3, r13, lbl_805A8014@sda21
/* 8020EDCC 0020BD2C 90 81 00 08 */ stw r4, 8(r1)
/* 8020EDD0 0020BD30 38 81 00 08 */ addi r4, r1, 8
/* 8020EDD4 0020BD34 4B E4 B2 91 */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020EDD8 0020BD38 80 63 00 00 */ lwz r3, 0(r3)
/* 8020EDDC 0020BD3C 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020EDE0 0020BD40 90 7E 00 44 */ stw r3, 0x44(r30)
/* 8020EDE4 0020BD44 41 82 00 0C */ beq lbl_8020EDF0
/* 8020EDE8 0020BD48 80 7E 00 44 */ lwz r3, 0x44(r30)
/* 8020EDEC 0020BD4C 48 13 BA 31 */ bl SetSurroundMode__9CAudioSysFQ29CAudioSys14ESurroundModes
lbl_8020EDF0:
/* 8020EDF0 0020BD50 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020EDF4 0020BD54 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020EDF8 0020BD58 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020EDFC 0020BD5C 7C 08 03 A6 */ mtlr r0
/* 8020EE00 0020BD60 38 21 00 20 */ addi r1, r1, 0x20
/* 8020EE04 0020BD64 4E 80 00 20 */ blr
.global SetMusicVolume__12CGameOptionsFib
SetMusicVolume__12CGameOptionsFib:
/* 8020EE08 0020BD68 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EE0C 0020BD6C 7C 08 02 A6 */ mflr r0
/* 8020EE10 0020BD70 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EE14 0020BD74 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EE18 0020BD78 7C BF 2B 78 */ mr r31, r5
/* 8020EE1C 0020BD7C 38 AD 94 50 */ addi r5, r13, lbl_805A8010@sda21
/* 8020EE20 0020BD80 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EE24 0020BD84 7C 7E 1B 78 */ mr r30, r3
/* 8020EE28 0020BD88 38 6D 94 4C */ addi r3, r13, lbl_805A800C@sda21
/* 8020EE2C 0020BD8C 90 81 00 08 */ stw r4, 8(r1)
/* 8020EE30 0020BD90 38 81 00 08 */ addi r4, r1, 8
/* 8020EE34 0020BD94 4B E4 B2 31 */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020EE38 0020BD98 80 63 00 00 */ lwz r3, 0(r3)
/* 8020EE3C 0020BD9C 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020EE40 0020BDA0 90 7E 00 5C */ stw r3, 0x5c(r30)
/* 8020EE44 0020BDA4 41 82 00 0C */ beq lbl_8020EE50
/* 8020EE48 0020BDA8 80 7E 00 5C */ lwz r3, 0x5c(r30)
/* 8020EE4C 0020BDAC 48 15 6B E9 */ bl SetMusicVolume__19CStreamAudioManagerFi
lbl_8020EE50:
/* 8020EE50 0020BDB0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020EE54 0020BDB4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020EE58 0020BDB8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020EE5C 0020BDBC 7C 08 03 A6 */ mtlr r0
/* 8020EE60 0020BDC0 38 21 00 20 */ addi r1, r1, 0x20
/* 8020EE64 0020BDC4 4E 80 00 20 */ blr
.global SetSfxVolume__12CGameOptionsFib
SetSfxVolume__12CGameOptionsFib:
/* 8020EE68 0020BDC8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EE6C 0020BDCC 7C 08 02 A6 */ mflr r0
/* 8020EE70 0020BDD0 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EE74 0020BDD4 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EE78 0020BDD8 7C BF 2B 78 */ mr r31, r5
/* 8020EE7C 0020BDDC 38 AD 94 48 */ addi r5, r13, lbl_805A8008@sda21
/* 8020EE80 0020BDE0 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EE84 0020BDE4 7C 7E 1B 78 */ mr r30, r3
/* 8020EE88 0020BDE8 38 6D 94 44 */ addi r3, r13, lbl_805A8004@sda21
/* 8020EE8C 0020BDEC 90 81 00 08 */ stw r4, 8(r1)
/* 8020EE90 0020BDF0 38 81 00 08 */ addi r4, r1, 8
/* 8020EE94 0020BDF4 4B E4 B1 D1 */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020EE98 0020BDF8 80 63 00 00 */ lwz r3, 0(r3)
/* 8020EE9C 0020BDFC 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020EEA0 0020BE00 90 7E 00 58 */ stw r3, 0x58(r30)
/* 8020EEA4 0020BE04 41 82 00 30 */ beq lbl_8020EED4
/* 8020EEA8 0020BE08 80 1E 00 58 */ lwz r0, 0x58(r30)
/* 8020EEAC 0020BE0C 38 80 00 01 */ li r4, 1
/* 8020EEB0 0020BE10 38 A0 00 01 */ li r5, 1
/* 8020EEB4 0020BE14 38 C0 00 01 */ li r6, 1
/* 8020EEB8 0020BE18 54 03 06 3E */ clrlwi r3, r0, 0x18
/* 8020EEBC 0020BE1C 48 13 D6 31 */ bl SysSetSfxVolume__9CAudioSysFUcUsUcUc
/* 8020EEC0 0020BE20 80 7E 00 58 */ lwz r3, 0x58(r30)
/* 8020EEC4 0020BE24 48 15 6B 59 */ bl SetSfxVolume__21CStreamedAudioManagerFUc
/* 8020EEC8 0020BE28 80 1E 00 58 */ lwz r0, 0x58(r30)
/* 8020EECC 0020BE2C 54 03 06 3E */ clrlwi r3, r0, 0x18
/* 8020EED0 0020BE30 48 14 C7 0D */ bl SetSfxVolume__12CMoviePlayerFUc
lbl_8020EED4:
/* 8020EED4 0020BE34 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020EED8 0020BE38 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020EEDC 0020BE3C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020EEE0 0020BE40 7C 08 03 A6 */ mtlr r0
/* 8020EEE4 0020BE44 38 21 00 20 */ addi r1, r1, 0x20
/* 8020EEE8 0020BE48 4E 80 00 20 */ blr
.global SetScreenStretch__12CGameOptionsFib
SetScreenStretch__12CGameOptionsFib:
/* 8020EEEC 0020BE4C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EEF0 0020BE50 7C 08 02 A6 */ mflr r0
/* 8020EEF4 0020BE54 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EEF8 0020BE58 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EEFC 0020BE5C 7C BF 2B 78 */ mr r31, r5
/* 8020EF00 0020BE60 38 AD 94 40 */ addi r5, r13, lbl_805A8000@sda21
/* 8020EF04 0020BE64 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EF08 0020BE68 7C 7E 1B 78 */ mr r30, r3
/* 8020EF0C 0020BE6C 38 6D 94 3C */ addi r3, r13, lbl_805A7FFC@sda21
/* 8020EF10 0020BE70 90 81 00 08 */ stw r4, 8(r1)
/* 8020EF14 0020BE74 38 81 00 08 */ addi r4, r1, 8
/* 8020EF18 0020BE78 4B E4 B1 4D */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020EF1C 0020BE7C 80 63 00 00 */ lwz r3, 0(r3)
/* 8020EF20 0020BE80 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020EF24 0020BE84 90 7E 00 54 */ stw r3, 0x54(r30)
/* 8020EF28 0020BE88 41 82 00 24 */ beq lbl_8020EF4C
/* 8020EF2C 0020BE8C 38 61 00 14 */ addi r3, r1, 0x14
/* 8020EF30 0020BE90 38 81 00 10 */ addi r4, r1, 0x10
/* 8020EF34 0020BE94 38 A1 00 0C */ addi r5, r1, 0xc
/* 8020EF38 0020BE98 48 0F A6 2D */ bl sub_80309564
/* 8020EF3C 0020BE9C 80 7E 00 54 */ lwz r3, 0x54(r30)
/* 8020EF40 0020BEA0 80 81 00 10 */ lwz r4, 0x10(r1)
/* 8020EF44 0020BEA4 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 8020EF48 0020BEA8 48 0F A5 69 */ bl sub_803094b0
lbl_8020EF4C:
/* 8020EF4C 0020BEAC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020EF50 0020BEB0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020EF54 0020BEB4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020EF58 0020BEB8 7C 08 03 A6 */ mtlr r0
/* 8020EF5C 0020BEBC 38 21 00 20 */ addi r1, r1, 0x20
/* 8020EF60 0020BEC0 4E 80 00 20 */ blr
.global SetScreenPositionY__12CGameOptionsFib
SetScreenPositionY__12CGameOptionsFib:
/* 8020EF64 0020BEC4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EF68 0020BEC8 7C 08 02 A6 */ mflr r0
/* 8020EF6C 0020BECC 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EF70 0020BED0 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EF74 0020BED4 7C BF 2B 78 */ mr r31, r5
/* 8020EF78 0020BED8 38 AD 94 38 */ addi r5, r13, lbl_805A7FF8@sda21
/* 8020EF7C 0020BEDC 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EF80 0020BEE0 7C 7E 1B 78 */ mr r30, r3
/* 8020EF84 0020BEE4 38 6D 94 34 */ addi r3, r13, lbl_805A7FF4@sda21
/* 8020EF88 0020BEE8 90 81 00 08 */ stw r4, 8(r1)
/* 8020EF8C 0020BEEC 38 81 00 08 */ addi r4, r1, 8
/* 8020EF90 0020BEF0 4B E4 B0 D5 */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020EF94 0020BEF4 80 63 00 00 */ lwz r3, 0(r3)
/* 8020EF98 0020BEF8 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020EF9C 0020BEFC 90 7E 00 50 */ stw r3, 0x50(r30)
/* 8020EFA0 0020BF00 41 82 00 24 */ beq lbl_8020EFC4
/* 8020EFA4 0020BF04 38 61 00 14 */ addi r3, r1, 0x14
/* 8020EFA8 0020BF08 38 81 00 10 */ addi r4, r1, 0x10
/* 8020EFAC 0020BF0C 38 A1 00 0C */ addi r5, r1, 0xc
/* 8020EFB0 0020BF10 48 0F A5 B5 */ bl sub_80309564
/* 8020EFB4 0020BF14 80 61 00 14 */ lwz r3, 0x14(r1)
/* 8020EFB8 0020BF18 80 81 00 10 */ lwz r4, 0x10(r1)
/* 8020EFBC 0020BF1C 80 BE 00 50 */ lwz r5, 0x50(r30)
/* 8020EFC0 0020BF20 48 0F A4 F1 */ bl sub_803094b0
lbl_8020EFC4:
/* 8020EFC4 0020BF24 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020EFC8 0020BF28 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020EFCC 0020BF2C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020EFD0 0020BF30 7C 08 03 A6 */ mtlr r0
/* 8020EFD4 0020BF34 38 21 00 20 */ addi r1, r1, 0x20
/* 8020EFD8 0020BF38 4E 80 00 20 */ blr
.global SetScreenPositionX__12CGameOptionsFib
SetScreenPositionX__12CGameOptionsFib:
/* 8020EFDC 0020BF3C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020EFE0 0020BF40 7C 08 02 A6 */ mflr r0
/* 8020EFE4 0020BF44 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020EFE8 0020BF48 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020EFEC 0020BF4C 7C BF 2B 78 */ mr r31, r5
/* 8020EFF0 0020BF50 38 AD 94 30 */ addi r5, r13, lbl_805A7FF0@sda21
/* 8020EFF4 0020BF54 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020EFF8 0020BF58 7C 7E 1B 78 */ mr r30, r3
/* 8020EFFC 0020BF5C 38 6D 94 2C */ addi r3, r13, lbl_805A7FEC@sda21
/* 8020F000 0020BF60 90 81 00 08 */ stw r4, 8(r1)
/* 8020F004 0020BF64 38 81 00 08 */ addi r4, r1, 8
/* 8020F008 0020BF68 4B E4 B0 5D */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020F00C 0020BF6C 80 63 00 00 */ lwz r3, 0(r3)
/* 8020F010 0020BF70 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020F014 0020BF74 90 7E 00 4C */ stw r3, 0x4c(r30)
/* 8020F018 0020BF78 41 82 00 24 */ beq lbl_8020F03C
/* 8020F01C 0020BF7C 38 61 00 14 */ addi r3, r1, 0x14
/* 8020F020 0020BF80 38 81 00 10 */ addi r4, r1, 0x10
/* 8020F024 0020BF84 38 A1 00 0C */ addi r5, r1, 0xc
/* 8020F028 0020BF88 48 0F A5 3D */ bl sub_80309564
/* 8020F02C 0020BF8C 80 61 00 14 */ lwz r3, 0x14(r1)
/* 8020F030 0020BF90 80 9E 00 4C */ lwz r4, 0x4c(r30)
/* 8020F034 0020BF94 80 A1 00 0C */ lwz r5, 0xc(r1)
/* 8020F038 0020BF98 48 0F A4 79 */ bl sub_803094b0
lbl_8020F03C:
/* 8020F03C 0020BF9C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020F040 0020BFA0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020F044 0020BFA4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020F048 0020BFA8 7C 08 03 A6 */ mtlr r0
/* 8020F04C 0020BFAC 38 21 00 20 */ addi r1, r1, 0x20
/* 8020F050 0020BFB0 4E 80 00 20 */ blr
.global TuneScreenBrightness__12CGameOptionsFv
TuneScreenBrightness__12CGameOptionsFv:
/* 8020F054 0020BFB4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020F058 0020BFB8 3C 00 43 30 */ lis r0, 0x4330
/* 8020F05C 0020BFBC C8 62 B2 30 */ lfd f3, lbl_805ACF50@sda21(r2)
/* 8020F060 0020BFC0 80 63 00 48 */ lwz r3, 0x48(r3)
/* 8020F064 0020BFC4 90 01 00 08 */ stw r0, 8(r1)
/* 8020F068 0020BFC8 38 03 FF FC */ addi r0, r3, -4
/* 8020F06C 0020BFCC C0 22 B2 40 */ lfs f1, lbl_805ACF60@sda21(r2)
/* 8020F070 0020BFD0 6C 00 80 00 */ xoris r0, r0, 0x8000
/* 8020F074 0020BFD4 C0 82 B2 3C */ lfs f4, lbl_805ACF5C@sda21(r2)
/* 8020F078 0020BFD8 90 01 00 0C */ stw r0, 0xc(r1)
/* 8020F07C 0020BFDC C0 02 B2 38 */ lfs f0, lbl_805ACF58@sda21(r2)
/* 8020F080 0020BFE0 C8 41 00 08 */ lfd f2, 8(r1)
/* 8020F084 0020BFE4 EC 42 18 28 */ fsubs f2, f2, f3
/* 8020F088 0020BFE8 EC 22 00 72 */ fmuls f1, f2, f1
/* 8020F08C 0020BFEC EC 24 00 7A */ fmadds f1, f4, f1, f0
/* 8020F090 0020BFF0 38 21 00 10 */ addi r1, r1, 0x10
/* 8020F094 0020BFF4 4E 80 00 20 */ blr
.global SetScreenBrightness__12CGameOptionsFib
SetScreenBrightness__12CGameOptionsFib:
/* 8020F098 0020BFF8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020F09C 0020BFFC 7C 08 02 A6 */ mflr r0
/* 8020F0A0 0020C000 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020F0A4 0020C004 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020F0A8 0020C008 7C BF 2B 78 */ mr r31, r5
/* 8020F0AC 0020C00C 38 AD 94 28 */ addi r5, r13, lbl_805A7FE8@sda21
/* 8020F0B0 0020C010 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020F0B4 0020C014 7C 7E 1B 78 */ mr r30, r3
/* 8020F0B8 0020C018 38 6D 94 24 */ addi r3, r13, lbl_805A7FE4@sda21
/* 8020F0BC 0020C01C 90 81 00 08 */ stw r4, 8(r1)
/* 8020F0C0 0020C020 38 81 00 08 */ addi r4, r1, 8
/* 8020F0C4 0020C024 4B E4 AF A1 */ bl "Clamp<i>__5CMathFRCiRCiRCi"
/* 8020F0C8 0020C028 80 63 00 00 */ lwz r3, 0(r3)
/* 8020F0CC 0020C02C 57 E0 06 3F */ clrlwi. r0, r31, 0x18
/* 8020F0D0 0020C030 90 7E 00 48 */ stw r3, 0x48(r30)
/* 8020F0D4 0020C034 41 82 00 10 */ beq lbl_8020F0E4
/* 8020F0D8 0020C038 7F C3 F3 78 */ mr r3, r30
/* 8020F0DC 0020C03C 4B FF FF 79 */ bl TuneScreenBrightness__12CGameOptionsFv
/* 8020F0E0 0020C040 D0 2D 9C 84 */ stfs f1, lbl_805A8844@sda21(r13)
lbl_8020F0E4:
/* 8020F0E4 0020C044 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020F0E8 0020C048 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020F0EC 0020C04C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020F0F0 0020C050 7C 08 03 A6 */ mtlr r0
/* 8020F0F4 0020C054 38 21 00 20 */ addi r1, r1, 0x20
/* 8020F0F8 0020C058 4E 80 00 20 */ blr
.global EnsureOptions__12CGameOptionsFv
EnsureOptions__12CGameOptionsFv:
/* 8020F0FC 0020C05C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020F100 0020C060 7C 08 02 A6 */ mflr r0
/* 8020F104 0020C064 38 A0 00 01 */ li r5, 1
/* 8020F108 0020C068 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020F10C 0020C06C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8020F110 0020C070 7C 7F 1B 78 */ mr r31, r3
/* 8020F114 0020C074 80 83 00 48 */ lwz r4, 0x48(r3)
/* 8020F118 0020C078 4B FF FF 81 */ bl SetScreenBrightness__12CGameOptionsFib
/* 8020F11C 0020C07C 80 9F 00 4C */ lwz r4, 0x4c(r31)
/* 8020F120 0020C080 7F E3 FB 78 */ mr r3, r31
/* 8020F124 0020C084 38 A0 00 01 */ li r5, 1
/* 8020F128 0020C088 4B FF FE B5 */ bl SetScreenPositionX__12CGameOptionsFib
/* 8020F12C 0020C08C 80 9F 00 50 */ lwz r4, 0x50(r31)
/* 8020F130 0020C090 7F E3 FB 78 */ mr r3, r31
/* 8020F134 0020C094 38 A0 00 01 */ li r5, 1
/* 8020F138 0020C098 4B FF FE 2D */ bl SetScreenPositionY__12CGameOptionsFib
/* 8020F13C 0020C09C 80 9F 00 54 */ lwz r4, 0x54(r31)
/* 8020F140 0020C0A0 7F E3 FB 78 */ mr r3, r31
/* 8020F144 0020C0A4 38 A0 00 01 */ li r5, 1
/* 8020F148 0020C0A8 4B FF FD A5 */ bl SetScreenStretch__12CGameOptionsFib
/* 8020F14C 0020C0AC 80 9F 00 58 */ lwz r4, 0x58(r31)
/* 8020F150 0020C0B0 7F E3 FB 78 */ mr r3, r31
/* 8020F154 0020C0B4 38 A0 00 01 */ li r5, 1
/* 8020F158 0020C0B8 4B FF FD 11 */ bl SetSfxVolume__12CGameOptionsFib
/* 8020F15C 0020C0BC 80 9F 00 5C */ lwz r4, 0x5c(r31)
/* 8020F160 0020C0C0 7F E3 FB 78 */ mr r3, r31
/* 8020F164 0020C0C4 38 A0 00 01 */ li r5, 1
/* 8020F168 0020C0C8 4B FF FC A1 */ bl SetMusicVolume__12CGameOptionsFib
/* 8020F16C 0020C0CC 80 9F 00 44 */ lwz r4, 0x44(r31)
/* 8020F170 0020C0D0 7F E3 FB 78 */ mr r3, r31
/* 8020F174 0020C0D4 38 A0 00 01 */ li r5, 1
/* 8020F178 0020C0D8 4B FF FC 31 */ bl SetSurroundMode__12CGameOptionsFQ29CAudioSys14ESurroundModesi
/* 8020F17C 0020C0DC 80 9F 00 64 */ lwz r4, 0x64(r31)
/* 8020F180 0020C0E0 7F E3 FB 78 */ mr r3, r31
/* 8020F184 0020C0E4 4B FF FB B5 */ bl SetHelmetAlpha__12CGameOptionsFi
/* 8020F188 0020C0E8 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F18C 0020C0EC 7F E3 FB 78 */ mr r3, r31
/* 8020F190 0020C0F0 54 04 CF FE */ rlwinm r4, r0, 0x19, 0x1f, 0x1f
/* 8020F194 0020C0F4 4B FF FB 95 */ bl SetHUDLag__12CGameOptionsFb
/* 8020F198 0020C0F8 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F19C 0020C0FC 7F E3 FB 78 */ mr r3, r31
/* 8020F1A0 0020C100 54 04 D7 FE */ rlwinm r4, r0, 0x1a, 0x1f, 0x1f
/* 8020F1A4 0020C104 4B FF FB 65 */ bl SetInvertYAxis__12CGameOptionsFb
/* 8020F1A8 0020C108 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F1AC 0020C10C 7F E3 FB 78 */ mr r3, r31
/* 8020F1B0 0020C110 54 04 DF FE */ rlwinm r4, r0, 0x1b, 0x1f, 0x1f
/* 8020F1B4 0020C114 4B FF FB 45 */ bl SetIsRumbleEnabled__12CGameOptionsFb
/* 8020F1B8 0020C118 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F1BC 0020C11C 7F E3 FB 78 */ mr r3, r31
/* 8020F1C0 0020C120 54 04 EF FE */ rlwinm r4, r0, 0x1d, 0x1f, 0x1f
/* 8020F1C4 0020C124 4B FF FB 55 */ bl SetIsHintSystemEnabled__12CGameOptionsFb
/* 8020F1C8 0020C128 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F1CC 0020C12C 7F E3 FB 78 */ mr r3, r31
/* 8020F1D0 0020C130 54 04 E7 FE */ rlwinm r4, r0, 0x1c, 0x1f, 0x1f
/* 8020F1D4 0020C134 4B FF FA E1 */ bl ToggleControls__12CGameOptionsFb
/* 8020F1D8 0020C138 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020F1DC 0020C13C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8020F1E0 0020C140 7C 08 03 A6 */ mtlr r0
/* 8020F1E4 0020C144 38 21 00 10 */ addi r1, r1, 0x10
/* 8020F1E8 0020C148 4E 80 00 20 */ blr
.global ResetToDefaults__12CGameOptionsFv
ResetToDefaults__12CGameOptionsFv:
/* 8020F1EC 0020C14C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020F1F0 0020C150 7C 08 02 A6 */ mflr r0
/* 8020F1F4 0020C154 38 C0 00 00 */ li r6, 0
/* 8020F1F8 0020C158 38 A0 00 7F */ li r5, 0x7f
/* 8020F1FC 0020C15C 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020F200 0020C160 38 00 00 04 */ li r0, 4
/* 8020F204 0020C164 38 80 00 01 */ li r4, 1
/* 8020F208 0020C168 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8020F20C 0020C16C 7C 7F 1B 78 */ mr r31, r3
/* 8020F210 0020C170 90 03 00 48 */ stw r0, 0x48(r3)
/* 8020F214 0020C174 38 00 00 FF */ li r0, 0xff
/* 8020F218 0020C178 90 C3 00 4C */ stw r6, 0x4c(r3)
/* 8020F21C 0020C17C 90 C3 00 50 */ stw r6, 0x50(r3)
/* 8020F220 0020C180 90 C3 00 54 */ stw r6, 0x54(r3)
/* 8020F224 0020C184 90 A3 00 58 */ stw r5, 0x58(r3)
/* 8020F228 0020C188 90 A3 00 5C */ stw r5, 0x5c(r3)
/* 8020F22C 0020C18C 90 83 00 44 */ stw r4, 0x44(r3)
/* 8020F230 0020C190 90 03 00 60 */ stw r0, 0x60(r3)
/* 8020F234 0020C194 90 03 00 64 */ stw r0, 0x64(r3)
/* 8020F238 0020C198 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020F23C 0020C19C 50 80 3E 30 */ rlwimi r0, r4, 7, 0x18, 0x18
/* 8020F240 0020C1A0 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020F244 0020C1A4 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020F248 0020C1A8 50 C0 36 72 */ rlwimi r0, r6, 6, 0x19, 0x19
/* 8020F24C 0020C1AC 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020F250 0020C1B0 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020F254 0020C1B4 50 80 2E B4 */ rlwimi r0, r4, 5, 0x1a, 0x1a
/* 8020F258 0020C1B8 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020F25C 0020C1BC 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020F260 0020C1C0 50 C0 26 F6 */ rlwimi r0, r6, 4, 0x1b, 0x1b
/* 8020F264 0020C1C4 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020F268 0020C1C8 88 03 00 68 */ lbz r0, 0x68(r3)
/* 8020F26C 0020C1CC 50 80 1F 38 */ rlwimi r0, r4, 3, 0x1c, 0x1c
/* 8020F270 0020C1D0 98 03 00 68 */ stb r0, 0x68(r3)
/* 8020F274 0020C1D4 48 00 06 B5 */ bl InitSoundMode__12CGameOptionsFi
/* 8020F278 0020C1D8 7F E3 FB 78 */ mr r3, r31
/* 8020F27C 0020C1DC 4B FF FE 81 */ bl EnsureOptions__12CGameOptionsFv
/* 8020F280 0020C1E0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020F284 0020C1E4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8020F288 0020C1E8 7C 08 03 A6 */ mtlr r0
/* 8020F28C 0020C1EC 38 21 00 10 */ addi r1, r1, 0x10
/* 8020F290 0020C1F0 4E 80 00 20 */ blr
.global PutTo__12CGameOptionsFR16CMemoryStreamOut
PutTo__12CGameOptionsFR16CMemoryStreamOut:
/* 8020F294 0020C1F4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020F298 0020C1F8 7C 08 02 A6 */ mflr r0
/* 8020F29C 0020C1FC 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020F2A0 0020C200 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020F2A4 0020C204 7C 9F 23 78 */ mr r31, r4
/* 8020F2A8 0020C208 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020F2AC 0020C20C 7C 7E 1B 78 */ mr r30, r3
/* 8020F2B0 0020C210 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8020F2B4 0020C214 3B A0 00 00 */ li r29, 0
/* 8020F2B8 0020C218 48 00 00 1C */ b lbl_8020F2D4
lbl_8020F2BC:
/* 8020F2BC 0020C21C 7C 9E EA 14 */ add r4, r30, r29
/* 8020F2C0 0020C220 7F E3 FB 78 */ mr r3, r31
/* 8020F2C4 0020C224 88 84 00 04 */ lbz r4, 4(r4)
/* 8020F2C8 0020C228 38 A0 00 08 */ li r5, 8
/* 8020F2CC 0020C22C 48 13 00 F1 */ bl WriteBits__13COutputStreamFii
/* 8020F2D0 0020C230 3B BD 00 01 */ addi r29, r29, 1
lbl_8020F2D4:
/* 8020F2D4 0020C234 80 1E 00 00 */ lwz r0, 0(r30)
/* 8020F2D8 0020C238 7C 1D 00 00 */ cmpw r29, r0
/* 8020F2DC 0020C23C 41 80 FF E0 */ blt lbl_8020F2BC
/* 8020F2E0 0020C240 83 BE 00 44 */ lwz r29, 0x44(r30)
/* 8020F2E4 0020C244 38 60 00 02 */ li r3, 2
/* 8020F2E8 0020C248 48 00 06 99 */ bl CalculateBits__Fi
/* 8020F2EC 0020C24C 7C 65 1B 78 */ mr r5, r3
/* 8020F2F0 0020C250 7F E3 FB 78 */ mr r3, r31
/* 8020F2F4 0020C254 7F A4 EB 78 */ mr r4, r29
/* 8020F2F8 0020C258 48 13 00 C5 */ bl WriteBits__13COutputStreamFii
/* 8020F2FC 0020C25C 83 BE 00 48 */ lwz r29, 0x48(r30)
/* 8020F300 0020C260 38 60 00 08 */ li r3, 8
/* 8020F304 0020C264 48 00 06 7D */ bl CalculateBits__Fi
/* 8020F308 0020C268 7C 65 1B 78 */ mr r5, r3
/* 8020F30C 0020C26C 7F E3 FB 78 */ mr r3, r31
/* 8020F310 0020C270 7F A4 EB 78 */ mr r4, r29
/* 8020F314 0020C274 48 13 00 A9 */ bl WriteBits__13COutputStreamFii
/* 8020F318 0020C278 80 9E 00 4C */ lwz r4, 0x4c(r30)
/* 8020F31C 0020C27C 38 60 00 3C */ li r3, 0x3c
/* 8020F320 0020C280 3B A4 00 1E */ addi r29, r4, 0x1e
/* 8020F324 0020C284 48 00 06 5D */ bl CalculateBits__Fi
/* 8020F328 0020C288 7C 65 1B 78 */ mr r5, r3
/* 8020F32C 0020C28C 7F E3 FB 78 */ mr r3, r31
/* 8020F330 0020C290 7F A4 EB 78 */ mr r4, r29
/* 8020F334 0020C294 48 13 00 89 */ bl WriteBits__13COutputStreamFii
/* 8020F338 0020C298 80 9E 00 50 */ lwz r4, 0x50(r30)
/* 8020F33C 0020C29C 38 60 00 3C */ li r3, 0x3c
/* 8020F340 0020C2A0 3B A4 00 1E */ addi r29, r4, 0x1e
/* 8020F344 0020C2A4 48 00 06 3D */ bl CalculateBits__Fi
/* 8020F348 0020C2A8 7C 65 1B 78 */ mr r5, r3
/* 8020F34C 0020C2AC 7F E3 FB 78 */ mr r3, r31
/* 8020F350 0020C2B0 7F A4 EB 78 */ mr r4, r29
/* 8020F354 0020C2B4 48 13 00 69 */ bl WriteBits__13COutputStreamFii
/* 8020F358 0020C2B8 80 9E 00 54 */ lwz r4, 0x54(r30)
/* 8020F35C 0020C2BC 38 60 00 14 */ li r3, 0x14
/* 8020F360 0020C2C0 3B A4 00 0A */ addi r29, r4, 0xa
/* 8020F364 0020C2C4 48 00 06 1D */ bl CalculateBits__Fi
/* 8020F368 0020C2C8 7C 65 1B 78 */ mr r5, r3
/* 8020F36C 0020C2CC 7F E3 FB 78 */ mr r3, r31
/* 8020F370 0020C2D0 7F A4 EB 78 */ mr r4, r29
/* 8020F374 0020C2D4 48 13 00 49 */ bl WriteBits__13COutputStreamFii
/* 8020F378 0020C2D8 83 BE 00 58 */ lwz r29, 0x58(r30)
/* 8020F37C 0020C2DC 38 60 00 7F */ li r3, 0x7f
/* 8020F380 0020C2E0 48 00 06 01 */ bl CalculateBits__Fi
/* 8020F384 0020C2E4 7C 65 1B 78 */ mr r5, r3
/* 8020F388 0020C2E8 7F E3 FB 78 */ mr r3, r31
/* 8020F38C 0020C2EC 7F A4 EB 78 */ mr r4, r29
/* 8020F390 0020C2F0 48 13 00 2D */ bl WriteBits__13COutputStreamFii
/* 8020F394 0020C2F4 83 BE 00 5C */ lwz r29, 0x5c(r30)
/* 8020F398 0020C2F8 38 60 00 7F */ li r3, 0x7f
/* 8020F39C 0020C2FC 48 00 05 E5 */ bl CalculateBits__Fi
/* 8020F3A0 0020C300 7C 65 1B 78 */ mr r5, r3
/* 8020F3A4 0020C304 7F E3 FB 78 */ mr r3, r31
/* 8020F3A8 0020C308 7F A4 EB 78 */ mr r4, r29
/* 8020F3AC 0020C30C 48 13 00 11 */ bl WriteBits__13COutputStreamFii
/* 8020F3B0 0020C310 83 BE 00 60 */ lwz r29, 0x60(r30)
/* 8020F3B4 0020C314 38 60 00 FF */ li r3, 0xff
/* 8020F3B8 0020C318 48 00 05 C9 */ bl CalculateBits__Fi
/* 8020F3BC 0020C31C 7C 65 1B 78 */ mr r5, r3
/* 8020F3C0 0020C320 7F E3 FB 78 */ mr r3, r31
/* 8020F3C4 0020C324 7F A4 EB 78 */ mr r4, r29
/* 8020F3C8 0020C328 48 12 FF F5 */ bl WriteBits__13COutputStreamFii
/* 8020F3CC 0020C32C 83 BE 00 64 */ lwz r29, 0x64(r30)
/* 8020F3D0 0020C330 38 60 00 FF */ li r3, 0xff
/* 8020F3D4 0020C334 48 00 05 AD */ bl CalculateBits__Fi
/* 8020F3D8 0020C338 7C 65 1B 78 */ mr r5, r3
/* 8020F3DC 0020C33C 7F E3 FB 78 */ mr r3, r31
/* 8020F3E0 0020C340 7F A4 EB 78 */ mr r4, r29
/* 8020F3E4 0020C344 48 12 FF D9 */ bl WriteBits__13COutputStreamFii
/* 8020F3E8 0020C348 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F3EC 0020C34C 7F E3 FB 78 */ mr r3, r31
/* 8020F3F0 0020C350 38 A0 00 01 */ li r5, 1
/* 8020F3F4 0020C354 54 04 CF FE */ rlwinm r4, r0, 0x19, 0x1f, 0x1f
/* 8020F3F8 0020C358 7C 04 00 D0 */ neg r0, r4
/* 8020F3FC 0020C35C 7C 00 23 78 */ or r0, r0, r4
/* 8020F400 0020C360 54 04 0F FE */ srwi r4, r0, 0x1f
/* 8020F404 0020C364 48 12 FF B9 */ bl WriteBits__13COutputStreamFii
/* 8020F408 0020C368 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F40C 0020C36C 7F E3 FB 78 */ mr r3, r31
/* 8020F410 0020C370 38 A0 00 01 */ li r5, 1
/* 8020F414 0020C374 54 04 EF FE */ rlwinm r4, r0, 0x1d, 0x1f, 0x1f
/* 8020F418 0020C378 7C 04 00 D0 */ neg r0, r4
/* 8020F41C 0020C37C 7C 00 23 78 */ or r0, r0, r4
/* 8020F420 0020C380 54 04 0F FE */ srwi r4, r0, 0x1f
/* 8020F424 0020C384 48 12 FF 99 */ bl WriteBits__13COutputStreamFii
/* 8020F428 0020C388 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F42C 0020C38C 7F E3 FB 78 */ mr r3, r31
/* 8020F430 0020C390 38 A0 00 01 */ li r5, 1
/* 8020F434 0020C394 54 04 D7 FE */ rlwinm r4, r0, 0x1a, 0x1f, 0x1f
/* 8020F438 0020C398 7C 04 00 D0 */ neg r0, r4
/* 8020F43C 0020C39C 7C 00 23 78 */ or r0, r0, r4
/* 8020F440 0020C3A0 54 04 0F FE */ srwi r4, r0, 0x1f
/* 8020F444 0020C3A4 48 12 FF 79 */ bl WriteBits__13COutputStreamFii
/* 8020F448 0020C3A8 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F44C 0020C3AC 7F E3 FB 78 */ mr r3, r31
/* 8020F450 0020C3B0 38 A0 00 01 */ li r5, 1
/* 8020F454 0020C3B4 54 04 DF FE */ rlwinm r4, r0, 0x1b, 0x1f, 0x1f
/* 8020F458 0020C3B8 7C 04 00 D0 */ neg r0, r4
/* 8020F45C 0020C3BC 7C 00 23 78 */ or r0, r0, r4
/* 8020F460 0020C3C0 54 04 0F FE */ srwi r4, r0, 0x1f
/* 8020F464 0020C3C4 48 12 FF 59 */ bl WriteBits__13COutputStreamFii
/* 8020F468 0020C3C8 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F46C 0020C3CC 7F E3 FB 78 */ mr r3, r31
/* 8020F470 0020C3D0 38 A0 00 01 */ li r5, 1
/* 8020F474 0020C3D4 54 04 E7 FE */ rlwinm r4, r0, 0x1c, 0x1f, 0x1f
/* 8020F478 0020C3D8 7C 04 00 D0 */ neg r0, r4
/* 8020F47C 0020C3DC 7C 00 23 78 */ or r0, r0, r4
/* 8020F480 0020C3E0 54 04 0F FE */ srwi r4, r0, 0x1f
/* 8020F484 0020C3E4 48 12 FF 39 */ bl WriteBits__13COutputStreamFii
/* 8020F488 0020C3E8 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020F48C 0020C3EC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020F490 0020C3F0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020F494 0020C3F4 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8020F498 0020C3F8 7C 08 03 A6 */ mtlr r0
/* 8020F49C 0020C3FC 38 21 00 20 */ addi r1, r1, 0x20
/* 8020F4A0 0020C400 4E 80 00 20 */ blr
.global __ct__12CGameOptionsFR12CInputStream
__ct__12CGameOptionsFR12CInputStream:
/* 8020F4A4 0020C404 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8020F4A8 0020C408 7C 08 02 A6 */ mflr r0
/* 8020F4AC 0020C40C 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020F4B0 0020C410 38 00 00 08 */ li r0, 8
/* 8020F4B4 0020C414 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8020F4B8 0020C418 7C 9F 23 78 */ mr r31, r4
/* 8020F4BC 0020C41C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8020F4C0 0020C420 7C 7E 1B 78 */ mr r30, r3
/* 8020F4C4 0020C424 38 60 00 40 */ li r3, 0x40
/* 8020F4C8 0020C428 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8020F4CC 0020C42C 38 9E 00 04 */ addi r4, r30, 4
/* 8020F4D0 0020C430 90 7E 00 00 */ stw r3, 0(r30)
/* 8020F4D4 0020C434 38 60 00 00 */ li r3, 0
/* 8020F4D8 0020C438 7C 09 03 A6 */ mtctr r0
lbl_8020F4DC:
/* 8020F4DC 0020C43C 28 04 00 00 */ cmplwi r4, 0
/* 8020F4E0 0020C440 41 82 00 0C */ beq lbl_8020F4EC
/* 8020F4E4 0020C444 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F4E8 0020C448 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F4EC:
/* 8020F4EC 0020C44C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F4F0 0020C450 41 82 00 0C */ beq lbl_8020F4FC
/* 8020F4F4 0020C454 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F4F8 0020C458 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F4FC:
/* 8020F4FC 0020C45C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F500 0020C460 41 82 00 0C */ beq lbl_8020F50C
/* 8020F504 0020C464 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F508 0020C468 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F50C:
/* 8020F50C 0020C46C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F510 0020C470 41 82 00 0C */ beq lbl_8020F51C
/* 8020F514 0020C474 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F518 0020C478 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F51C:
/* 8020F51C 0020C47C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F520 0020C480 41 82 00 0C */ beq lbl_8020F52C
/* 8020F524 0020C484 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F528 0020C488 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F52C:
/* 8020F52C 0020C48C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F530 0020C490 41 82 00 0C */ beq lbl_8020F53C
/* 8020F534 0020C494 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F538 0020C498 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F53C:
/* 8020F53C 0020C49C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F540 0020C4A0 41 82 00 0C */ beq lbl_8020F54C
/* 8020F544 0020C4A4 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F548 0020C4A8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F54C:
/* 8020F54C 0020C4AC 34 84 00 01 */ addic. r4, r4, 1
/* 8020F550 0020C4B0 41 82 00 0C */ beq lbl_8020F55C
/* 8020F554 0020C4B4 88 0D 94 21 */ lbz r0, lbl_805A7FE1@sda21(r13)
/* 8020F558 0020C4B8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F55C:
/* 8020F55C 0020C4BC 38 63 00 07 */ addi r3, r3, 7
/* 8020F560 0020C4C0 38 84 00 01 */ addi r4, r4, 1
/* 8020F564 0020C4C4 42 00 FF 78 */ bdnz lbl_8020F4DC
/* 8020F568 0020C4C8 38 C0 00 01 */ li r6, 1
/* 8020F56C 0020C4CC 38 A0 00 04 */ li r5, 4
/* 8020F570 0020C4D0 90 DE 00 44 */ stw r6, 0x44(r30)
/* 8020F574 0020C4D4 38 80 00 00 */ li r4, 0
/* 8020F578 0020C4D8 38 60 00 7F */ li r3, 0x7f
/* 8020F57C 0020C4DC 38 00 00 FF */ li r0, 0xff
/* 8020F580 0020C4E0 90 BE 00 48 */ stw r5, 0x48(r30)
/* 8020F584 0020C4E4 3B A0 00 00 */ li r29, 0
/* 8020F588 0020C4E8 90 9E 00 4C */ stw r4, 0x4c(r30)
/* 8020F58C 0020C4EC 90 9E 00 50 */ stw r4, 0x50(r30)
/* 8020F590 0020C4F0 90 9E 00 54 */ stw r4, 0x54(r30)
/* 8020F594 0020C4F4 90 7E 00 58 */ stw r3, 0x58(r30)
/* 8020F598 0020C4F8 90 7E 00 5C */ stw r3, 0x5c(r30)
/* 8020F59C 0020C4FC 90 1E 00 60 */ stw r0, 0x60(r30)
/* 8020F5A0 0020C500 90 1E 00 64 */ stw r0, 0x64(r30)
/* 8020F5A4 0020C504 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F5A8 0020C508 50 C0 3E 30 */ rlwimi r0, r6, 7, 0x18, 0x18
/* 8020F5AC 0020C50C 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F5B0 0020C510 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F5B4 0020C514 50 80 36 72 */ rlwimi r0, r4, 6, 0x19, 0x19
/* 8020F5B8 0020C518 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F5BC 0020C51C 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F5C0 0020C520 50 C0 2E B4 */ rlwimi r0, r6, 5, 0x1a, 0x1a
/* 8020F5C4 0020C524 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F5C8 0020C528 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F5CC 0020C52C 50 80 26 F6 */ rlwimi r0, r4, 4, 0x1b, 0x1b
/* 8020F5D0 0020C530 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F5D4 0020C534 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F5D8 0020C538 50 C0 1F 38 */ rlwimi r0, r6, 3, 0x1c, 0x1c
/* 8020F5DC 0020C53C 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F5E0 0020C540 90 9E 00 70 */ stw r4, 0x70(r30)
/* 8020F5E4 0020C544 90 9E 00 74 */ stw r4, 0x74(r30)
/* 8020F5E8 0020C548 90 9E 00 78 */ stw r4, 0x78(r30)
/* 8020F5EC 0020C54C 48 00 00 1C */ b lbl_8020F608
lbl_8020F5F0:
/* 8020F5F0 0020C550 7F E3 FB 78 */ mr r3, r31
/* 8020F5F4 0020C554 38 80 00 08 */ li r4, 8
/* 8020F5F8 0020C558 48 12 F7 41 */ bl ReadBits__12CInputStreamFi
/* 8020F5FC 0020C55C 7C 9E EA 14 */ add r4, r30, r29
/* 8020F600 0020C560 3B BD 00 01 */ addi r29, r29, 1
/* 8020F604 0020C564 98 64 00 04 */ stb r3, 4(r4)
lbl_8020F608:
/* 8020F608 0020C568 80 1E 00 00 */ lwz r0, 0(r30)
/* 8020F60C 0020C56C 7C 1D 00 00 */ cmpw r29, r0
/* 8020F610 0020C570 41 80 FF E0 */ blt lbl_8020F5F0
/* 8020F614 0020C574 38 60 00 02 */ li r3, 2
/* 8020F618 0020C578 48 00 03 69 */ bl CalculateBits__Fi
/* 8020F61C 0020C57C 7C 64 1B 78 */ mr r4, r3
/* 8020F620 0020C580 7F E3 FB 78 */ mr r3, r31
/* 8020F624 0020C584 48 12 F7 15 */ bl ReadBits__12CInputStreamFi
/* 8020F628 0020C588 90 7E 00 44 */ stw r3, 0x44(r30)
/* 8020F62C 0020C58C 38 60 00 08 */ li r3, 8
/* 8020F630 0020C590 48 00 03 51 */ bl CalculateBits__Fi
/* 8020F634 0020C594 7C 64 1B 78 */ mr r4, r3
/* 8020F638 0020C598 7F E3 FB 78 */ mr r3, r31
/* 8020F63C 0020C59C 48 12 F6 FD */ bl ReadBits__12CInputStreamFi
/* 8020F640 0020C5A0 90 7E 00 48 */ stw r3, 0x48(r30)
/* 8020F644 0020C5A4 38 60 00 3C */ li r3, 0x3c
/* 8020F648 0020C5A8 48 00 03 39 */ bl CalculateBits__Fi
/* 8020F64C 0020C5AC 7C 64 1B 78 */ mr r4, r3
/* 8020F650 0020C5B0 7F E3 FB 78 */ mr r3, r31
/* 8020F654 0020C5B4 48 12 F6 E5 */ bl ReadBits__12CInputStreamFi
/* 8020F658 0020C5B8 38 03 FF E2 */ addi r0, r3, -30
/* 8020F65C 0020C5BC 38 60 00 3C */ li r3, 0x3c
/* 8020F660 0020C5C0 90 1E 00 4C */ stw r0, 0x4c(r30)
/* 8020F664 0020C5C4 48 00 03 1D */ bl CalculateBits__Fi
/* 8020F668 0020C5C8 7C 64 1B 78 */ mr r4, r3
/* 8020F66C 0020C5CC 7F E3 FB 78 */ mr r3, r31
/* 8020F670 0020C5D0 48 12 F6 C9 */ bl ReadBits__12CInputStreamFi
/* 8020F674 0020C5D4 38 03 FF E2 */ addi r0, r3, -30
/* 8020F678 0020C5D8 38 60 00 14 */ li r3, 0x14
/* 8020F67C 0020C5DC 90 1E 00 50 */ stw r0, 0x50(r30)
/* 8020F680 0020C5E0 48 00 03 01 */ bl CalculateBits__Fi
/* 8020F684 0020C5E4 7C 64 1B 78 */ mr r4, r3
/* 8020F688 0020C5E8 7F E3 FB 78 */ mr r3, r31
/* 8020F68C 0020C5EC 48 12 F6 AD */ bl ReadBits__12CInputStreamFi
/* 8020F690 0020C5F0 38 03 FF F6 */ addi r0, r3, -10
/* 8020F694 0020C5F4 38 60 00 7F */ li r3, 0x7f
/* 8020F698 0020C5F8 90 1E 00 54 */ stw r0, 0x54(r30)
/* 8020F69C 0020C5FC 48 00 02 E5 */ bl CalculateBits__Fi
/* 8020F6A0 0020C600 7C 64 1B 78 */ mr r4, r3
/* 8020F6A4 0020C604 7F E3 FB 78 */ mr r3, r31
/* 8020F6A8 0020C608 48 12 F6 91 */ bl ReadBits__12CInputStreamFi
/* 8020F6AC 0020C60C 90 7E 00 58 */ stw r3, 0x58(r30)
/* 8020F6B0 0020C610 38 60 00 7F */ li r3, 0x7f
/* 8020F6B4 0020C614 48 00 02 CD */ bl CalculateBits__Fi
/* 8020F6B8 0020C618 7C 64 1B 78 */ mr r4, r3
/* 8020F6BC 0020C61C 7F E3 FB 78 */ mr r3, r31
/* 8020F6C0 0020C620 48 12 F6 79 */ bl ReadBits__12CInputStreamFi
/* 8020F6C4 0020C624 90 7E 00 5C */ stw r3, 0x5c(r30)
/* 8020F6C8 0020C628 38 60 00 FF */ li r3, 0xff
/* 8020F6CC 0020C62C 48 00 02 B5 */ bl CalculateBits__Fi
/* 8020F6D0 0020C630 7C 64 1B 78 */ mr r4, r3
/* 8020F6D4 0020C634 7F E3 FB 78 */ mr r3, r31
/* 8020F6D8 0020C638 48 12 F6 61 */ bl ReadBits__12CInputStreamFi
/* 8020F6DC 0020C63C 90 7E 00 60 */ stw r3, 0x60(r30)
/* 8020F6E0 0020C640 38 60 00 FF */ li r3, 0xff
/* 8020F6E4 0020C644 48 00 02 9D */ bl CalculateBits__Fi
/* 8020F6E8 0020C648 7C 64 1B 78 */ mr r4, r3
/* 8020F6EC 0020C64C 7F E3 FB 78 */ mr r3, r31
/* 8020F6F0 0020C650 48 12 F6 49 */ bl ReadBits__12CInputStreamFi
/* 8020F6F4 0020C654 90 7E 00 64 */ stw r3, 0x64(r30)
/* 8020F6F8 0020C658 7F E3 FB 78 */ mr r3, r31
/* 8020F6FC 0020C65C 38 80 00 01 */ li r4, 1
/* 8020F700 0020C660 48 12 F6 39 */ bl ReadBits__12CInputStreamFi
/* 8020F704 0020C664 7C 83 00 D0 */ neg r4, r3
/* 8020F708 0020C668 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F70C 0020C66C 7C 84 1B 78 */ or r4, r4, r3
/* 8020F710 0020C670 7F E3 FB 78 */ mr r3, r31
/* 8020F714 0020C674 54 85 0F FE */ srwi r5, r4, 0x1f
/* 8020F718 0020C678 38 80 00 01 */ li r4, 1
/* 8020F71C 0020C67C 50 A0 3E 30 */ rlwimi r0, r5, 7, 0x18, 0x18
/* 8020F720 0020C680 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F724 0020C684 48 12 F6 15 */ bl ReadBits__12CInputStreamFi
/* 8020F728 0020C688 7C 83 00 D0 */ neg r4, r3
/* 8020F72C 0020C68C 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F730 0020C690 7C 84 1B 78 */ or r4, r4, r3
/* 8020F734 0020C694 7F E3 FB 78 */ mr r3, r31
/* 8020F738 0020C698 54 85 0F FE */ srwi r5, r4, 0x1f
/* 8020F73C 0020C69C 38 80 00 01 */ li r4, 1
/* 8020F740 0020C6A0 50 A0 1F 38 */ rlwimi r0, r5, 3, 0x1c, 0x1c
/* 8020F744 0020C6A4 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F748 0020C6A8 48 12 F5 F1 */ bl ReadBits__12CInputStreamFi
/* 8020F74C 0020C6AC 7C 83 00 D0 */ neg r4, r3
/* 8020F750 0020C6B0 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F754 0020C6B4 7C 84 1B 78 */ or r4, r4, r3
/* 8020F758 0020C6B8 7F E3 FB 78 */ mr r3, r31
/* 8020F75C 0020C6BC 54 85 0F FE */ srwi r5, r4, 0x1f
/* 8020F760 0020C6C0 38 80 00 01 */ li r4, 1
/* 8020F764 0020C6C4 50 A0 36 72 */ rlwimi r0, r5, 6, 0x19, 0x19
/* 8020F768 0020C6C8 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F76C 0020C6CC 48 12 F5 CD */ bl ReadBits__12CInputStreamFi
/* 8020F770 0020C6D0 7C 83 00 D0 */ neg r4, r3
/* 8020F774 0020C6D4 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F778 0020C6D8 7C 84 1B 78 */ or r4, r4, r3
/* 8020F77C 0020C6DC 7F E3 FB 78 */ mr r3, r31
/* 8020F780 0020C6E0 54 85 0F FE */ srwi r5, r4, 0x1f
/* 8020F784 0020C6E4 38 80 00 01 */ li r4, 1
/* 8020F788 0020C6E8 50 A0 2E B4 */ rlwimi r0, r5, 5, 0x1a, 0x1a
/* 8020F78C 0020C6EC 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F790 0020C6F0 48 12 F5 A9 */ bl ReadBits__12CInputStreamFi
/* 8020F794 0020C6F4 7C 83 00 D0 */ neg r4, r3
/* 8020F798 0020C6F8 88 1E 00 68 */ lbz r0, 0x68(r30)
/* 8020F79C 0020C6FC 7C 84 1B 78 */ or r4, r4, r3
/* 8020F7A0 0020C700 7F C3 F3 78 */ mr r3, r30
/* 8020F7A4 0020C704 50 80 2E F6 */ rlwimi r0, r4, 5, 0x1b, 0x1b
/* 8020F7A8 0020C708 98 1E 00 68 */ stb r0, 0x68(r30)
/* 8020F7AC 0020C70C 48 00 01 7D */ bl InitSoundMode__12CGameOptionsFi
/* 8020F7B0 0020C710 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8020F7B4 0020C714 7F C3 F3 78 */ mr r3, r30
/* 8020F7B8 0020C718 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8020F7BC 0020C71C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8020F7C0 0020C720 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8020F7C4 0020C724 7C 08 03 A6 */ mtlr r0
/* 8020F7C8 0020C728 38 21 00 20 */ addi r1, r1, 0x20
/* 8020F7CC 0020C72C 4E 80 00 20 */ blr
.global __ct__12CGameOptionsFv
__ct__12CGameOptionsFv:
/* 8020F7D0 0020C730 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020F7D4 0020C734 7C 08 02 A6 */ mflr r0
/* 8020F7D8 0020C738 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020F7DC 0020C73C 38 00 00 08 */ li r0, 8
/* 8020F7E0 0020C740 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8020F7E4 0020C744 7C 7F 1B 78 */ mr r31, r3
/* 8020F7E8 0020C748 38 60 00 40 */ li r3, 0x40
/* 8020F7EC 0020C74C 90 7F 00 00 */ stw r3, 0(r31)
/* 8020F7F0 0020C750 38 9F 00 04 */ addi r4, r31, 4
/* 8020F7F4 0020C754 38 60 00 00 */ li r3, 0
/* 8020F7F8 0020C758 7C 09 03 A6 */ mtctr r0
lbl_8020F7FC:
/* 8020F7FC 0020C75C 28 04 00 00 */ cmplwi r4, 0
/* 8020F800 0020C760 41 82 00 0C */ beq lbl_8020F80C
/* 8020F804 0020C764 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F808 0020C768 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F80C:
/* 8020F80C 0020C76C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F810 0020C770 41 82 00 0C */ beq lbl_8020F81C
/* 8020F814 0020C774 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F818 0020C778 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F81C:
/* 8020F81C 0020C77C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F820 0020C780 41 82 00 0C */ beq lbl_8020F82C
/* 8020F824 0020C784 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F828 0020C788 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F82C:
/* 8020F82C 0020C78C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F830 0020C790 41 82 00 0C */ beq lbl_8020F83C
/* 8020F834 0020C794 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F838 0020C798 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F83C:
/* 8020F83C 0020C79C 34 84 00 01 */ addic. r4, r4, 1
/* 8020F840 0020C7A0 41 82 00 0C */ beq lbl_8020F84C
/* 8020F844 0020C7A4 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F848 0020C7A8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F84C:
/* 8020F84C 0020C7AC 34 84 00 01 */ addic. r4, r4, 1
/* 8020F850 0020C7B0 41 82 00 0C */ beq lbl_8020F85C
/* 8020F854 0020C7B4 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F858 0020C7B8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F85C:
/* 8020F85C 0020C7BC 34 84 00 01 */ addic. r4, r4, 1
/* 8020F860 0020C7C0 41 82 00 0C */ beq lbl_8020F86C
/* 8020F864 0020C7C4 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F868 0020C7C8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F86C:
/* 8020F86C 0020C7CC 34 84 00 01 */ addic. r4, r4, 1
/* 8020F870 0020C7D0 41 82 00 0C */ beq lbl_8020F87C
/* 8020F874 0020C7D4 88 0D 94 20 */ lbz r0, lbl_805A7FE0@sda21(r13)
/* 8020F878 0020C7D8 98 04 00 00 */ stb r0, 0(r4)
lbl_8020F87C:
/* 8020F87C 0020C7DC 38 63 00 07 */ addi r3, r3, 7
/* 8020F880 0020C7E0 38 84 00 01 */ addi r4, r4, 1
/* 8020F884 0020C7E4 42 00 FF 78 */ bdnz lbl_8020F7FC
/* 8020F888 0020C7E8 38 C0 00 01 */ li r6, 1
/* 8020F88C 0020C7EC 38 60 00 04 */ li r3, 4
/* 8020F890 0020C7F0 90 DF 00 44 */ stw r6, 0x44(r31)
/* 8020F894 0020C7F4 38 A0 00 00 */ li r5, 0
/* 8020F898 0020C7F8 38 80 00 7F */ li r4, 0x7f
/* 8020F89C 0020C7FC 38 00 00 FF */ li r0, 0xff
/* 8020F8A0 0020C800 90 7F 00 48 */ stw r3, 0x48(r31)
/* 8020F8A4 0020C804 7F E3 FB 78 */ mr r3, r31
/* 8020F8A8 0020C808 90 BF 00 4C */ stw r5, 0x4c(r31)
/* 8020F8AC 0020C80C 90 BF 00 50 */ stw r5, 0x50(r31)
/* 8020F8B0 0020C810 90 BF 00 54 */ stw r5, 0x54(r31)
/* 8020F8B4 0020C814 90 9F 00 58 */ stw r4, 0x58(r31)
/* 8020F8B8 0020C818 90 9F 00 5C */ stw r4, 0x5c(r31)
/* 8020F8BC 0020C81C 90 1F 00 60 */ stw r0, 0x60(r31)
/* 8020F8C0 0020C820 90 1F 00 64 */ stw r0, 0x64(r31)
/* 8020F8C4 0020C824 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F8C8 0020C828 50 C0 3E 30 */ rlwimi r0, r6, 7, 0x18, 0x18
/* 8020F8CC 0020C82C 98 1F 00 68 */ stb r0, 0x68(r31)
/* 8020F8D0 0020C830 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F8D4 0020C834 50 A0 36 72 */ rlwimi r0, r5, 6, 0x19, 0x19
/* 8020F8D8 0020C838 98 1F 00 68 */ stb r0, 0x68(r31)
/* 8020F8DC 0020C83C 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F8E0 0020C840 50 C0 2E B4 */ rlwimi r0, r6, 5, 0x1a, 0x1a
/* 8020F8E4 0020C844 98 1F 00 68 */ stb r0, 0x68(r31)
/* 8020F8E8 0020C848 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F8EC 0020C84C 50 A0 26 F6 */ rlwimi r0, r5, 4, 0x1b, 0x1b
/* 8020F8F0 0020C850 98 1F 00 68 */ stb r0, 0x68(r31)
/* 8020F8F4 0020C854 88 1F 00 68 */ lbz r0, 0x68(r31)
/* 8020F8F8 0020C858 50 C0 1F 38 */ rlwimi r0, r6, 3, 0x1c, 0x1c
/* 8020F8FC 0020C85C 98 1F 00 68 */ stb r0, 0x68(r31)
/* 8020F900 0020C860 90 BF 00 70 */ stw r5, 0x70(r31)
/* 8020F904 0020C864 90 BF 00 74 */ stw r5, 0x74(r31)
/* 8020F908 0020C868 90 BF 00 78 */ stw r5, 0x78(r31)
/* 8020F90C 0020C86C 48 00 00 1D */ bl InitSoundMode__12CGameOptionsFi
/* 8020F910 0020C870 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020F914 0020C874 7F E3 FB 78 */ mr r3, r31
/* 8020F918 0020C878 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8020F91C 0020C87C 7C 08 03 A6 */ mtlr r0
/* 8020F920 0020C880 38 21 00 10 */ addi r1, r1, 0x10
/* 8020F924 0020C884 4E 80 00 20 */ blr
.global InitSoundMode__12CGameOptionsFi
InitSoundMode__12CGameOptionsFi:
/* 8020F928 0020C888 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020F92C 0020C88C 7C 08 02 A6 */ mflr r0
/* 8020F930 0020C890 90 01 00 14 */ stw r0, 0x14(r1)
/* 8020F934 0020C894 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8020F938 0020C898 7C 7F 1B 78 */ mr r31, r3
/* 8020F93C 0020C89C 48 17 46 D5 */ bl OSGetSoundMode
/* 8020F940 0020C8A0 28 03 00 00 */ cmplwi r3, 0
/* 8020F944 0020C8A4 40 82 00 10 */ bne lbl_8020F954
/* 8020F948 0020C8A8 38 00 00 00 */ li r0, 0
/* 8020F94C 0020C8AC 90 1F 00 44 */ stw r0, 0x44(r31)
/* 8020F950 0020C8B0 48 00 00 1C */ b lbl_8020F96C
lbl_8020F954:
/* 8020F954 0020C8B4 80 7F 00 44 */ lwz r3, 0x44(r31)
/* 8020F958 0020C8B8 38 00 00 01 */ li r0, 1
/* 8020F95C 0020C8BC 2C 03 00 00 */ cmpwi r3, 0
/* 8020F960 0020C8C0 41 82 00 08 */ beq lbl_8020F968
/* 8020F964 0020C8C4 7C 60 1B 78 */ mr r0, r3
lbl_8020F968:
/* 8020F968 0020C8C8 90 1F 00 44 */ stw r0, 0x44(r31)
lbl_8020F96C:
/* 8020F96C 0020C8CC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8020F970 0020C8D0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8020F974 0020C8D4 7C 08 03 A6 */ mtlr r0
/* 8020F978 0020C8D8 38 21 00 10 */ addi r1, r1, 0x10
/* 8020F97C 0020C8DC 4E 80 00 20 */ blr
.global CalculateBits__Fi
CalculateBits__Fi:
/* 8020F980 0020C8E0 38 80 00 00 */ li r4, 0
/* 8020F984 0020C8E4 48 00 00 0C */ b lbl_8020F990
lbl_8020F988:
/* 8020F988 0020C8E8 54 63 F8 7E */ srwi r3, r3, 1
/* 8020F98C 0020C8EC 38 84 00 01 */ addi r4, r4, 1
lbl_8020F990:
/* 8020F990 0020C8F0 28 03 00 00 */ cmplwi r3, 0
/* 8020F994 0020C8F4 40 82 FF F4 */ bne lbl_8020F988
/* 8020F998 0020C8F8 7C 83 23 78 */ mr r3, r4
/* 8020F99C 0020C8FC 4E 80 00 20 */ blr
.global sub_8020f9a0
sub_8020f9a0:
/* 8020F9A0 0020C900 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 8020F9A4 0020C904 7C 08 02 A6 */ mflr r0
/* 8020F9A8 0020C908 90 01 00 54 */ stw r0, 0x54(r1)
/* 8020F9AC 0020C90C 93 E1 00 4C */ stw r31, 0x4c(r1)
/* 8020F9B0 0020C910 7C BF 2B 78 */ mr r31, r5
/* 8020F9B4 0020C914 93 C1 00 48 */ stw r30, 0x48(r1)
/* 8020F9B8 0020C918 7C 9E 23 78 */ mr r30, r4
/* 8020F9BC 0020C91C 93 A1 00 44 */ stw r29, 0x44(r1)
/* 8020F9C0 0020C920 7C 7D 1B 78 */ mr r29, r3
/* 8020F9C4 0020C924 93 81 00 40 */ stw r28, 0x40(r1)
/* 8020F9C8 0020C928 80 63 00 00 */ lwz r3, 0(r3)
/* 8020F9CC 0020C92C 80 A4 00 00 */ lwz r5, 0(r4)
/* 8020F9D0 0020C930 7C 03 28 50 */ subf r0, r3, r5
/* 8020F9D4 0020C934 7C 00 1E 70 */ srawi r0, r0, 3
/* 8020F9D8 0020C938 7C 80 01 94 */ addze r4, r0
/* 8020F9DC 0020C93C 2C 04 00 01 */ cmpwi r4, 1
/* 8020F9E0 0020C940 40 81 01 64 */ ble lbl_8020FB44
/* 8020F9E4 0020C944 2C 04 00 14 */ cmpwi r4, 0x14
/* 8020F9E8 0020C948 41 81 00 30 */ bgt lbl_8020FA18
/* 8020F9EC 0020C94C 88 FF 00 00 */ lbz r7, 0(r31)
/* 8020F9F0 0020C950 38 61 00 34 */ addi r3, r1, 0x34
/* 8020F9F4 0020C954 80 DE 00 00 */ lwz r6, 0(r30)
/* 8020F9F8 0020C958 38 81 00 30 */ addi r4, r1, 0x30
/* 8020F9FC 0020C95C 80 1D 00 00 */ lwz r0, 0(r29)
/* 8020FA00 0020C960 38 A1 00 14 */ addi r5, r1, 0x14
/* 8020FA04 0020C964 98 E1 00 14 */ stb r7, 0x14(r1)
/* 8020FA08 0020C968 90 C1 00 30 */ stw r6, 0x30(r1)
/* 8020FA0C 0020C96C 90 01 00 34 */ stw r0, 0x34(r1)
/* 8020FA10 0020C970 48 00 01 CD */ bl sub_8020fbdc
/* 8020FA14 0020C974 48 00 01 30 */ b lbl_8020FB44
lbl_8020FA18:
/* 8020FA18 0020C978 54 80 0F FE */ srwi r0, r4, 0x1f
/* 8020FA1C 0020C97C 38 A5 FF F8 */ addi r5, r5, -8
/* 8020FA20 0020C980 7C 80 22 14 */ add r4, r0, r4
/* 8020FA24 0020C984 88 1F 00 00 */ lbz r0, 0(r31)
/* 8020FA28 0020C988 7C 84 0E 70 */ srawi r4, r4, 1
/* 8020FA2C 0020C98C 90 A1 00 3C */ stw r5, 0x3c(r1)
/* 8020FA30 0020C990 54 84 18 38 */ slwi r4, r4, 3
/* 8020FA34 0020C994 38 C1 00 10 */ addi r6, r1, 0x10
/* 8020FA38 0020C998 7F 83 22 14 */ add r28, r3, r4
/* 8020FA3C 0020C99C 98 01 00 10 */ stb r0, 0x10(r1)
/* 8020FA40 0020C9A0 7F 84 E3 78 */ mr r4, r28
/* 8020FA44 0020C9A4 48 00 01 21 */ bl sub_8020fb64
/* 8020FA48 0020C9A8 80 9D 00 00 */ lwz r4, 0(r29)
/* 8020FA4C 0020C9AC 80 61 00 3C */ lwz r3, 0x3c(r1)
/* 8020FA50 0020C9B0 38 84 00 08 */ addi r4, r4, 8
/* 8020FA54 0020C9B4 80 FC 00 00 */ lwz r7, 0(r28)
/* 8020FA58 0020C9B8 38 03 FF F8 */ addi r0, r3, -8
/* 8020FA5C 0020C9BC 90 81 00 38 */ stw r4, 0x38(r1)
/* 8020FA60 0020C9C0 90 01 00 3C */ stw r0, 0x3c(r1)
/* 8020FA64 0020C9C4 48 00 00 10 */ b lbl_8020FA74
lbl_8020FA68:
/* 8020FA68 0020C9C8 80 61 00 38 */ lwz r3, 0x38(r1)
/* 8020FA6C 0020C9CC 38 03 00 08 */ addi r0, r3, 8
/* 8020FA70 0020C9D0 90 01 00 38 */ stw r0, 0x38(r1)
lbl_8020FA74:
/* 8020FA74 0020C9D4 80 61 00 38 */ lwz r3, 0x38(r1)
/* 8020FA78 0020C9D8 80 03 00 00 */ lwz r0, 0(r3)
/* 8020FA7C 0020C9DC 7C 00 38 40 */ cmplw r0, r7
/* 8020FA80 0020C9E0 41 80 FF E8 */ blt lbl_8020FA68
/* 8020FA84 0020C9E4 48 00 00 10 */ b lbl_8020FA94
lbl_8020FA88:
/* 8020FA88 0020C9E8 80 61 00 3C */ lwz r3, 0x3c(r1)
/* 8020FA8C 0020C9EC 38 03 FF F8 */ addi r0, r3, -8
/* 8020FA90 0020C9F0 90 01 00 3C */ stw r0, 0x3c(r1)
lbl_8020FA94:
/* 8020FA94 0020C9F4 80 61 00 3C */ lwz r3, 0x3c(r1)
/* 8020FA98 0020C9F8 80 03 00 00 */ lwz r0, 0(r3)
/* 8020FA9C 0020C9FC 7C 07 00 40 */ cmplw r7, r0
/* 8020FAA0 0020CA00 41 80 FF E8 */ blt lbl_8020FA88
/* 8020FAA4 0020CA04 80 01 00 38 */ lwz r0, 0x38(r1)
/* 8020FAA8 0020CA08 7C 00 18 40 */ cmplw r0, r3
/* 8020FAAC 0020CA0C 40 80 00 48 */ bge lbl_8020FAF4
/* 8020FAB0 0020CA10 80 A1 00 38 */ lwz r5, 0x38(r1)
/* 8020FAB4 0020CA14 80 C1 00 3C */ lwz r6, 0x3c(r1)
/* 8020FAB8 0020CA18 81 05 00 00 */ lwz r8, 0(r5)
/* 8020FABC 0020CA1C 38 65 00 08 */ addi r3, r5, 8
/* 8020FAC0 0020CA20 81 25 00 04 */ lwz r9, 4(r5)
/* 8020FAC4 0020CA24 38 06 FF F8 */ addi r0, r6, -8
/* 8020FAC8 0020CA28 80 86 00 00 */ lwz r4, 0(r6)
/* 8020FACC 0020CA2C 90 C1 00 28 */ stw r6, 0x28(r1)
/* 8020FAD0 0020CA30 90 85 00 00 */ stw r4, 0(r5)
/* 8020FAD4 0020CA34 80 86 00 04 */ lwz r4, 4(r6)
/* 8020FAD8 0020CA38 90 A1 00 2C */ stw r5, 0x2c(r1)
/* 8020FADC 0020CA3C 90 85 00 04 */ stw r4, 4(r5)
/* 8020FAE0 0020CA40 91 06 00 00 */ stw r8, 0(r6)
/* 8020FAE4 0020CA44 91 26 00 04 */ stw r9, 4(r6)
/* 8020FAE8 0020CA48 90 61 00 38 */ stw r3, 0x38(r1)
/* 8020FAEC 0020CA4C 90 01 00 3C */ stw r0, 0x3c(r1)
/* 8020FAF0 0020CA50 4B FF FF 84 */ b lbl_8020FA74
lbl_8020FAF4:
/* 8020FAF4 0020CA54 88 FF 00 00 */ lbz r7, 0(r31)
/* 8020FAF8 0020CA58 38 61 00 24 */ addi r3, r1, 0x24
/* 8020FAFC 0020CA5C 80 C1 00 38 */ lwz r6, 0x38(r1)
/* 8020FB00 0020CA60 38 81 00 20 */ addi r4, r1, 0x20
/* 8020FB04 0020CA64 80 1D 00 00 */ lwz r0, 0(r29)
/* 8020FB08 0020CA68 38 A1 00 0C */ addi r5, r1, 0xc
/* 8020FB0C 0020CA6C 98 E1 00 0C */ stb r7, 0xc(r1)
/* 8020FB10 0020CA70 90 C1 00 20 */ stw r6, 0x20(r1)
/* 8020FB14 0020CA74 90 01 00 24 */ stw r0, 0x24(r1)
/* 8020FB18 0020CA78 4B FF FE 89 */ bl sub_8020f9a0
/* 8020FB1C 0020CA7C 88 FF 00 00 */ lbz r7, 0(r31)
/* 8020FB20 0020CA80 38 61 00 1C */ addi r3, r1, 0x1c
/* 8020FB24 0020CA84 80 DE 00 00 */ lwz r6, 0(r30)
/* 8020FB28 0020CA88 38 81 00 18 */ addi r4, r1, 0x18
/* 8020FB2C 0020CA8C 80 01 00 38 */ lwz r0, 0x38(r1)
/* 8020FB30 0020CA90 38 A1 00 08 */ addi r5, r1, 8
/* 8020FB34 0020CA94 98 E1 00 08 */ stb r7, 8(r1)
/* 8020FB38 0020CA98 90 C1 00 18 */ stw r6, 0x18(r1)
/* 8020FB3C 0020CA9C 90 01 00 1C */ stw r0, 0x1c(r1)
/* 8020FB40 0020CAA0 4B FF FE 61 */ bl sub_8020f9a0
lbl_8020FB44:
/* 8020FB44 0020CAA4 80 01 00 54 */ lwz r0, 0x54(r1)
/* 8020FB48 0020CAA8 83 E1 00 4C */ lwz r31, 0x4c(r1)
/* 8020FB4C 0020CAAC 83 C1 00 48 */ lwz r30, 0x48(r1)
/* 8020FB50 0020CAB0 83 A1 00 44 */ lwz r29, 0x44(r1)
/* 8020FB54 0020CAB4 83 81 00 40 */ lwz r28, 0x40(r1)
/* 8020FB58 0020CAB8 7C 08 03 A6 */ mtlr r0
/* 8020FB5C 0020CABC 38 21 00 50 */ addi r1, r1, 0x50
/* 8020FB60 0020CAC0 4E 80 00 20 */ blr
.global sub_8020fb64
sub_8020fb64:
/* 8020FB64 0020CAC4 80 04 00 00 */ lwz r0, 0(r4)
/* 8020FB68 0020CAC8 80 E3 00 00 */ lwz r7, 0(r3)
/* 8020FB6C 0020CACC 7C 00 38 40 */ cmplw r0, r7
/* 8020FB70 0020CAD0 40 80 00 1C */ bge lbl_8020FB8C
/* 8020FB74 0020CAD4 80 C3 00 04 */ lwz r6, 4(r3)
/* 8020FB78 0020CAD8 90 03 00 00 */ stw r0, 0(r3)
/* 8020FB7C 0020CADC 80 04 00 04 */ lwz r0, 4(r4)
/* 8020FB80 0020CAE0 90 03 00 04 */ stw r0, 4(r3)
/* 8020FB84 0020CAE4 90 E4 00 00 */ stw r7, 0(r4)
/* 8020FB88 0020CAE8 90 C4 00 04 */ stw r6, 4(r4)
lbl_8020FB8C:
/* 8020FB8C 0020CAEC 80 E5 00 00 */ lwz r7, 0(r5)
/* 8020FB90 0020CAF0 80 04 00 00 */ lwz r0, 0(r4)
/* 8020FB94 0020CAF4 7C 07 00 40 */ cmplw r7, r0
/* 8020FB98 0020CAF8 4C 80 00 20 */ bgelr
/* 8020FB9C 0020CAFC 80 C5 00 04 */ lwz r6, 4(r5)
/* 8020FBA0 0020CB00 90 05 00 00 */ stw r0, 0(r5)
/* 8020FBA4 0020CB04 80 04 00 04 */ lwz r0, 4(r4)
/* 8020FBA8 0020CB08 90 05 00 04 */ stw r0, 4(r5)
/* 8020FBAC 0020CB0C 80 03 00 00 */ lwz r0, 0(r3)
/* 8020FBB0 0020CB10 7C 07 00 40 */ cmplw r7, r0
/* 8020FBB4 0020CB14 40 80 00 1C */ bge lbl_8020FBD0
/* 8020FBB8 0020CB18 90 04 00 00 */ stw r0, 0(r4)
/* 8020FBBC 0020CB1C 80 03 00 04 */ lwz r0, 4(r3)
/* 8020FBC0 0020CB20 90 04 00 04 */ stw r0, 4(r4)
/* 8020FBC4 0020CB24 90 E3 00 00 */ stw r7, 0(r3)
/* 8020FBC8 0020CB28 90 C3 00 04 */ stw r6, 4(r3)
/* 8020FBCC 0020CB2C 4E 80 00 20 */ blr
lbl_8020FBD0:
/* 8020FBD0 0020CB30 90 E4 00 00 */ stw r7, 0(r4)
/* 8020FBD4 0020CB34 90 C4 00 04 */ stw r6, 4(r4)
/* 8020FBD8 0020CB38 4E 80 00 20 */ blr
.global sub_8020fbdc
sub_8020fbdc:
/* 8020FBDC 0020CB3C 80 A3 00 00 */ lwz r5, 0(r3)
/* 8020FBE0 0020CB40 38 A5 00 08 */ addi r5, r5, 8
/* 8020FBE4 0020CB44 48 00 00 54 */ b lbl_8020FC38
lbl_8020FBE8:
/* 8020FBE8 0020CB48 80 C5 00 00 */ lwz r6, 0(r5)
/* 8020FBEC 0020CB4C 7C A9 2B 78 */ mr r9, r5
/* 8020FBF0 0020CB50 80 E5 00 04 */ lwz r7, 4(r5)
/* 8020FBF4 0020CB54 39 05 FF F8 */ addi r8, r5, -8
/* 8020FBF8 0020CB58 48 00 00 1C */ b lbl_8020FC14
lbl_8020FBFC:
/* 8020FBFC 0020CB5C 80 08 00 00 */ lwz r0, 0(r8)
/* 8020FC00 0020CB60 90 09 00 00 */ stw r0, 0(r9)
/* 8020FC04 0020CB64 80 08 00 04 */ lwz r0, 4(r8)
/* 8020FC08 0020CB68 39 08 FF F8 */ addi r8, r8, -8
/* 8020FC0C 0020CB6C 90 09 00 04 */ stw r0, 4(r9)
/* 8020FC10 0020CB70 39 29 FF F8 */ addi r9, r9, -8
lbl_8020FC14:
/* 8020FC14 0020CB74 80 03 00 00 */ lwz r0, 0(r3)
/* 8020FC18 0020CB78 7C 00 48 40 */ cmplw r0, r9
/* 8020FC1C 0020CB7C 40 80 00 10 */ bge lbl_8020FC2C
/* 8020FC20 0020CB80 80 08 00 00 */ lwz r0, 0(r8)
/* 8020FC24 0020CB84 7C 06 00 40 */ cmplw r6, r0
/* 8020FC28 0020CB88 41 80 FF D4 */ blt lbl_8020FBFC
lbl_8020FC2C:
/* 8020FC2C 0020CB8C 90 C9 00 00 */ stw r6, 0(r9)
/* 8020FC30 0020CB90 38 A5 00 08 */ addi r5, r5, 8
/* 8020FC34 0020CB94 90 E9 00 04 */ stw r7, 4(r9)
lbl_8020FC38:
/* 8020FC38 0020CB98 80 04 00 00 */ lwz r0, 0(r4)
/* 8020FC3C 0020CB9C 7C 05 00 40 */ cmplw r5, r0
/* 8020FC40 0020CBA0 41 80 FF A8 */ blt lbl_8020FBE8
/* 8020FC44 0020CBA4 4E 80 00 20 */ blr