prime/asm/Kyoto/CToken.s

259 lines
11 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax"
.global __as__6CTokenFRC6CToken
__as__6CTokenFRC6CToken:
/* 80340CC4 0033DC24 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340CC8 0033DC28 7C 08 02 A6 */ mflr r0
/* 80340CCC 0033DC2C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340CD0 0033DC30 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340CD4 0033DC34 7C 9F 23 78 */ mr r31, r4
/* 80340CD8 0033DC38 93 C1 00 08 */ stw r30, 8(r1)
/* 80340CDC 0033DC3C 7C 7E 1B 78 */ mr r30, r3
/* 80340CE0 0033DC40 7C 1F F0 40 */ cmplw r31, r30
/* 80340CE4 0033DC44 40 82 00 08 */ bne lbl_80340CEC
/* 80340CE8 0033DC48 48 00 00 40 */ b lbl_80340D28
lbl_80340CEC:
/* 80340CEC 0033DC4C 48 00 00 55 */ bl Unlock__6CTokenFv
/* 80340CF0 0033DC50 7F C3 F3 78 */ mr r3, r30
/* 80340CF4 0033DC54 48 00 00 D5 */ bl RemoveRef__6CTokenFv
/* 80340CF8 0033DC58 80 1F 00 00 */ lwz r0, 0(r31)
/* 80340CFC 0033DC5C 90 1E 00 00 */ stw r0, 0(r30)
/* 80340D00 0033DC60 80 9E 00 00 */ lwz r4, 0(r30)
/* 80340D04 0033DC64 A8 64 00 00 */ lha r3, 0(r4)
/* 80340D08 0033DC68 38 03 00 01 */ addi r0, r3, 1
/* 80340D0C 0033DC6C B0 04 00 00 */ sth r0, 0(r4)
/* 80340D10 0033DC70 88 1F 00 04 */ lbz r0, 4(r31)
/* 80340D14 0033DC74 28 00 00 00 */ cmplwi r0, 0
/* 80340D18 0033DC78 41 82 00 0C */ beq lbl_80340D24
/* 80340D1C 0033DC7C 7F C3 F3 78 */ mr r3, r30
/* 80340D20 0033DC80 48 00 00 65 */ bl Lock__6CTokenFv
lbl_80340D24:
/* 80340D24 0033DC84 7F C3 F3 78 */ mr r3, r30
lbl_80340D28:
/* 80340D28 0033DC88 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340D2C 0033DC8C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340D30 0033DC90 83 C1 00 08 */ lwz r30, 8(r1)
/* 80340D34 0033DC94 7C 08 03 A6 */ mtlr r0
/* 80340D38 0033DC98 38 21 00 10 */ addi r1, r1, 0x10
/* 80340D3C 0033DC9C 4E 80 00 20 */ blr
.global Unlock__6CTokenFv
Unlock__6CTokenFv:
/* 80340D40 0033DCA0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340D44 0033DCA4 7C 08 02 A6 */ mflr r0
/* 80340D48 0033DCA8 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340D4C 0033DCAC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340D50 0033DCB0 7C 7F 1B 78 */ mr r31, r3
/* 80340D54 0033DCB4 88 03 00 04 */ lbz r0, 4(r3)
/* 80340D58 0033DCB8 28 00 00 00 */ cmplwi r0, 0
/* 80340D5C 0033DCBC 41 82 00 14 */ beq lbl_80340D70
/* 80340D60 0033DCC0 80 7F 00 00 */ lwz r3, 0(r31)
/* 80340D64 0033DCC4 4B FF ED 81 */ bl Unlock__16CObjectReferenceFv
/* 80340D68 0033DCC8 38 00 00 00 */ li r0, 0
/* 80340D6C 0033DCCC 98 1F 00 04 */ stb r0, 4(r31)
lbl_80340D70:
/* 80340D70 0033DCD0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340D74 0033DCD4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340D78 0033DCD8 7C 08 03 A6 */ mtlr r0
/* 80340D7C 0033DCDC 38 21 00 10 */ addi r1, r1, 0x10
/* 80340D80 0033DCE0 4E 80 00 20 */ blr
.global Lock__6CTokenFv
Lock__6CTokenFv:
/* 80340D84 0033DCE4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340D88 0033DCE8 7C 08 02 A6 */ mflr r0
/* 80340D8C 0033DCEC 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340D90 0033DCF0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340D94 0033DCF4 7C 7F 1B 78 */ mr r31, r3
/* 80340D98 0033DCF8 88 03 00 04 */ lbz r0, 4(r3)
/* 80340D9C 0033DCFC 28 00 00 00 */ cmplwi r0, 0
/* 80340DA0 0033DD00 40 82 00 14 */ bne lbl_80340DB4
/* 80340DA4 0033DD04 80 7F 00 00 */ lwz r3, 0(r31)
/* 80340DA8 0033DD08 4B FF EF E1 */ bl Lock__16CObjectReferenceFv
/* 80340DAC 0033DD0C 38 00 00 01 */ li r0, 1
/* 80340DB0 0033DD10 98 1F 00 04 */ stb r0, 4(r31)
lbl_80340DB4:
/* 80340DB4 0033DD14 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340DB8 0033DD18 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340DBC 0033DD1C 7C 08 03 A6 */ mtlr r0
/* 80340DC0 0033DD20 38 21 00 10 */ addi r1, r1, 0x10
/* 80340DC4 0033DD24 4E 80 00 20 */ blr
.global RemoveRef__6CTokenFv
RemoveRef__6CTokenFv:
/* 80340DC8 0033DD28 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340DCC 0033DD2C 7C 08 02 A6 */ mflr r0
/* 80340DD0 0033DD30 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340DD4 0033DD34 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340DD8 0033DD38 7C 7F 1B 78 */ mr r31, r3
/* 80340DDC 0033DD3C 80 63 00 00 */ lwz r3, 0(r3)
/* 80340DE0 0033DD40 4B FF ED 91 */ bl RemoveReference__16CObjectReferenceFv
/* 80340DE4 0033DD44 2C 03 00 00 */ cmpwi r3, 0
/* 80340DE8 0033DD48 40 82 00 10 */ bne lbl_80340DF8
/* 80340DEC 0033DD4C 80 7F 00 00 */ lwz r3, 0(r31)
/* 80340DF0 0033DD50 38 80 00 01 */ li r4, 1
/* 80340DF4 0033DD54 4B FF F0 35 */ bl __dt__16CObjectReferenceFv
lbl_80340DF8:
/* 80340DF8 0033DD58 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340DFC 0033DD5C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340E00 0033DD60 7C 08 03 A6 */ mtlr r0
/* 80340E04 0033DD64 38 21 00 10 */ addi r1, r1, 0x10
/* 80340E08 0033DD68 4E 80 00 20 */ blr
.global GetObj__6CTokenFv
GetObj__6CTokenFv:
/* 80340E0C 0033DD6C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340E10 0033DD70 7C 08 02 A6 */ mflr r0
/* 80340E14 0033DD74 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340E18 0033DD78 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340E1C 0033DD7C 7C 7F 1B 78 */ mr r31, r3
/* 80340E20 0033DD80 4B FF FF 65 */ bl Lock__6CTokenFv
/* 80340E24 0033DD84 80 7F 00 00 */ lwz r3, 0(r31)
/* 80340E28 0033DD88 4B FF EE A9 */ bl GetObject__16CObjectReferenceFv
/* 80340E2C 0033DD8C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340E30 0033DD90 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340E34 0033DD94 7C 08 03 A6 */ mtlr r0
/* 80340E38 0033DD98 38 21 00 10 */ addi r1, r1, 0x10
/* 80340E3C 0033DD9C 4E 80 00 20 */ blr
.global __dt__6CTokenFv
__dt__6CTokenFv:
/* 80340E40 0033DDA0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340E44 0033DDA4 7C 08 02 A6 */ mflr r0
/* 80340E48 0033DDA8 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340E4C 0033DDAC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340E50 0033DDB0 7C 9F 23 78 */ mr r31, r4
/* 80340E54 0033DDB4 93 C1 00 08 */ stw r30, 8(r1)
/* 80340E58 0033DDB8 7C 7E 1B 79 */ or. r30, r3, r3
/* 80340E5C 0033DDBC 41 82 00 30 */ beq lbl_80340E8C
/* 80340E60 0033DDC0 88 1E 00 04 */ lbz r0, 4(r30)
/* 80340E64 0033DDC4 28 00 00 00 */ cmplwi r0, 0
/* 80340E68 0033DDC8 41 82 00 0C */ beq lbl_80340E74
/* 80340E6C 0033DDCC 80 7E 00 00 */ lwz r3, 0(r30)
/* 80340E70 0033DDD0 4B FF EC 75 */ bl Unlock__16CObjectReferenceFv
lbl_80340E74:
/* 80340E74 0033DDD4 7F C3 F3 78 */ mr r3, r30
/* 80340E78 0033DDD8 4B FF FF 51 */ bl RemoveRef__6CTokenFv
/* 80340E7C 0033DDDC 7F E0 07 35 */ extsh. r0, r31
/* 80340E80 0033DDE0 40 81 00 0C */ ble lbl_80340E8C
/* 80340E84 0033DDE4 7F C3 F3 78 */ mr r3, r30
/* 80340E88 0033DDE8 4B FD 4A A9 */ bl Free__7CMemoryFPCv
lbl_80340E8C:
/* 80340E8C 0033DDEC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340E90 0033DDF0 7F C3 F3 78 */ mr r3, r30
/* 80340E94 0033DDF4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340E98 0033DDF8 83 C1 00 08 */ lwz r30, 8(r1)
/* 80340E9C 0033DDFC 7C 08 03 A6 */ mtlr r0
/* 80340EA0 0033DE00 38 21 00 10 */ addi r1, r1, 0x10
/* 80340EA4 0033DE04 4E 80 00 20 */ blr
.global __ct__6CTokenFRC6CToken
__ct__6CTokenFRC6CToken:
/* 80340EA8 0033DE08 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80340EAC 0033DE0C 7C 08 02 A6 */ mflr r0
/* 80340EB0 0033DE10 90 01 00 14 */ stw r0, 0x14(r1)
/* 80340EB4 0033DE14 38 00 00 00 */ li r0, 0
/* 80340EB8 0033DE18 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340EBC 0033DE1C 7C 7F 1B 78 */ mr r31, r3
/* 80340EC0 0033DE20 80 A4 00 00 */ lwz r5, 0(r4)
/* 80340EC4 0033DE24 90 A3 00 00 */ stw r5, 0(r3)
/* 80340EC8 0033DE28 98 03 00 04 */ stb r0, 4(r3)
/* 80340ECC 0033DE2C 80 C3 00 00 */ lwz r6, 0(r3)
/* 80340ED0 0033DE30 A8 A6 00 00 */ lha r5, 0(r6)
/* 80340ED4 0033DE34 38 05 00 01 */ addi r0, r5, 1
/* 80340ED8 0033DE38 B0 06 00 00 */ sth r0, 0(r6)
/* 80340EDC 0033DE3C 88 04 00 04 */ lbz r0, 4(r4)
/* 80340EE0 0033DE40 28 00 00 00 */ cmplwi r0, 0
/* 80340EE4 0033DE44 41 82 00 08 */ beq lbl_80340EEC
/* 80340EE8 0033DE48 4B FF FE 9D */ bl Lock__6CTokenFv
lbl_80340EEC:
/* 80340EEC 0033DE4C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80340EF0 0033DE50 7F E3 FB 78 */ mr r3, r31
/* 80340EF4 0033DE54 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80340EF8 0033DE58 7C 08 03 A6 */ mtlr r0
/* 80340EFC 0033DE5C 38 21 00 10 */ addi r1, r1, 0x10
/* 80340F00 0033DE60 4E 80 00 20 */ blr
.global __ct__6CTokenFP4IObj
__ct__6CTokenFP4IObj:
/* 80340F04 0033DE64 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80340F08 0033DE68 7C 08 02 A6 */ mflr r0
/* 80340F0C 0033DE6C 3C A0 80 3D */ lis r5, lbl_803D7AA0@ha
/* 80340F10 0033DE70 90 01 00 24 */ stw r0, 0x24(r1)
/* 80340F14 0033DE74 38 05 7A A0 */ addi r0, r5, lbl_803D7AA0@l
/* 80340F18 0033DE78 38 A0 00 00 */ li r5, 0
/* 80340F1C 0033DE7C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80340F20 0033DE80 7C 9F 23 78 */ mr r31, r4
/* 80340F24 0033DE84 7C 04 03 78 */ mr r4, r0
/* 80340F28 0033DE88 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80340F2C 0033DE8C 7C 7E 1B 78 */ mr r30, r3
/* 80340F30 0033DE90 38 60 00 18 */ li r3, 0x18
/* 80340F34 0033DE94 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80340F38 0033DE98 3B A0 00 00 */ li r29, 0
/* 80340F3C 0033DE9C 4B FD 49 31 */ bl __nw__FUlPCcPCc
/* 80340F40 0033DEA0 7C 64 1B 79 */ or. r4, r3, r3
/* 80340F44 0033DEA4 41 82 00 28 */ beq lbl_80340F6C
/* 80340F48 0033DEA8 7C 1F 00 D0 */ neg r0, r31
/* 80340F4C 0033DEAC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80340F50 0033DEB0 7C 00 FB 78 */ or r0, r0, r31
/* 80340F54 0033DEB4 38 81 00 08 */ addi r4, r1, 8
/* 80340F58 0033DEB8 54 00 0F FE */ srwi r0, r0, 0x1f
/* 80340F5C 0033DEBC 3B A0 00 01 */ li r29, 1
/* 80340F60 0033DEC0 98 01 00 08 */ stb r0, 8(r1)
/* 80340F64 0033DEC4 4B FF EF 8D */ bl "__ct__16CObjectReferenceFRCQ24rstl15auto_ptr<4IObj>"
/* 80340F68 0033DEC8 7C 64 1B 78 */ mr r4, r3
lbl_80340F6C:
/* 80340F6C 0033DECC 7F A0 07 75 */ extsb. r0, r29
/* 80340F70 0033DED0 90 9E 00 00 */ stw r4, 0(r30)
/* 80340F74 0033DED4 41 82 00 30 */ beq lbl_80340FA4
/* 80340F78 0033DED8 88 01 00 08 */ lbz r0, 8(r1)
/* 80340F7C 0033DEDC 28 00 00 00 */ cmplwi r0, 0
/* 80340F80 0033DEE0 41 82 00 24 */ beq lbl_80340FA4
/* 80340F84 0033DEE4 80 61 00 0C */ lwz r3, 0xc(r1)
/* 80340F88 0033DEE8 28 03 00 00 */ cmplwi r3, 0
/* 80340F8C 0033DEEC 41 82 00 18 */ beq lbl_80340FA4
/* 80340F90 0033DEF0 81 83 00 00 */ lwz r12, 0(r3)
/* 80340F94 0033DEF4 38 80 00 01 */ li r4, 1
/* 80340F98 0033DEF8 81 8C 00 08 */ lwz r12, 8(r12)
/* 80340F9C 0033DEFC 7D 89 03 A6 */ mtctr r12
/* 80340FA0 0033DF00 4E 80 04 21 */ bctrl
lbl_80340FA4:
/* 80340FA4 0033DF04 38 00 00 00 */ li r0, 0
/* 80340FA8 0033DF08 7F C3 F3 78 */ mr r3, r30
/* 80340FAC 0033DF0C 98 1E 00 04 */ stb r0, 4(r30)
/* 80340FB0 0033DF10 80 BE 00 00 */ lwz r5, 0(r30)
/* 80340FB4 0033DF14 A8 85 00 00 */ lha r4, 0(r5)
/* 80340FB8 0033DF18 38 04 00 01 */ addi r0, r4, 1
/* 80340FBC 0033DF1C B0 05 00 00 */ sth r0, 0(r5)
/* 80340FC0 0033DF20 4B FF FD C5 */ bl Lock__6CTokenFv
/* 80340FC4 0033DF24 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80340FC8 0033DF28 7F C3 F3 78 */ mr r3, r30
/* 80340FCC 0033DF2C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80340FD0 0033DF30 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80340FD4 0033DF34 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80340FD8 0033DF38 7C 08 03 A6 */ mtlr r0
/* 80340FDC 0033DF3C 38 21 00 20 */ addi r1, r1, 0x20
/* 80340FE0 0033DF40 4E 80 00 20 */ blr
.global __ct__6CTokenFP16CObjectReference
__ct__6CTokenFP16CObjectReference:
/* 80340FE4 0033DF44 90 83 00 00 */ stw r4, 0(r3)
/* 80340FE8 0033DF48 38 00 00 00 */ li r0, 0
/* 80340FEC 0033DF4C 98 03 00 04 */ stb r0, 4(r3)
/* 80340FF0 0033DF50 80 A3 00 00 */ lwz r5, 0(r3)
/* 80340FF4 0033DF54 A8 85 00 00 */ lha r4, 0(r5)
/* 80340FF8 0033DF58 38 04 00 01 */ addi r0, r4, 1
/* 80340FFC 0033DF5C B0 05 00 00 */ sth r0, 0(r5)
/* 80341000 0033DF60 4E 80 00 20 */ blr
.section .rodata
.balign 8
.global lbl_803D7AA0
lbl_803D7AA0:
# ROM: 0x3D4AA0
.asciz "??(??)"
.balign 4