donut-decomp/asm/libMobiclip/MoSdkSeek.s

197 lines
8.9 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global seekingLoop__5MoSdkFv
seekingLoop__5MoSdkFv:
/* 80153C90 0014FAD0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80153C94 0014FAD4 7C 08 02 A6 */ mflr r0
/* 80153C98 0014FAD8 90 01 00 14 */ stw r0, 0x14(r1)
/* 80153C9C 0014FADC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80153CA0 0014FAE0 7C 7F 1B 78 */ mr r31, r3
/* 80153CA4 0014FAE4 80 A3 00 14 */ lwz r5, 0x14(r3)
/* 80153CA8 0014FAE8 80 83 00 18 */ lwz r4, 0x18(r3)
/* 80153CAC 0014FAEC 81 85 00 04 */ lwz r12, 0x4(r5)
/* 80153CB0 0014FAF0 7D 89 03 A6 */ mtctr r12
/* 80153CB4 0014FAF4 4E 80 04 21 */ bctrl
/* 80153CB8 0014FAF8 2C 03 00 03 */ cmpwi r3, 0x3
/* 80153CBC 0014FAFC 40 82 00 48 */ bne lbl_80153D04
/* 80153CC0 0014FB00 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80153CC4 0014FB04 38 80 00 04 */ li r4, 0x4
/* 80153CC8 0014FB08 4B FF F9 19 */ bl needBytes__10MoSdkInputFUl
/* 80153CCC 0014FB0C 28 03 00 01 */ cmplwi r3, 0x1
/* 80153CD0 0014FB10 40 82 00 34 */ bne lbl_80153D04
/* 80153CD4 0014FB14 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80153CD8 0014FB18 4B FF F6 39 */ bl read32__10MoSdkInputFv
/* 80153CDC 0014FB1C 54 64 00 3C */ clrrwi r4, r3, 1
/* 80153CE0 0014FB20 54 63 07 FE */ clrlwi r3, r3, 31
/* 80153CE4 0014FB24 38 04 00 04 */ addi r0, r4, 0x4
/* 80153CE8 0014FB28 90 7F 00 08 */ stw r3, 0x8(r31)
/* 80153CEC 0014FB2C 7F E3 FB 78 */ mr r3, r31
/* 80153CF0 0014FB30 38 80 00 04 */ li r4, 0x4
/* 80153CF4 0014FB34 90 1F 00 00 */ stw r0, 0x0(r31)
/* 80153CF8 0014FB38 4B FF DC D9 */ bl setState__5MoSdkF9SDK_State
/* 80153CFC 0014FB3C 38 60 00 02 */ li r3, 0x2
/* 80153D00 0014FB40 48 00 00 14 */ b lbl_80153D14
.global lbl_80153D04
lbl_80153D04:
/* 80153D04 0014FB44 7F E3 FB 78 */ mr r3, r31
/* 80153D08 0014FB48 38 80 00 05 */ li r4, 0x5
/* 80153D0C 0014FB4C 4B FF DC C5 */ bl setState__5MoSdkF9SDK_State
/* 80153D10 0014FB50 38 60 00 05 */ li r3, 0x5
.global lbl_80153D14
lbl_80153D14:
/* 80153D14 0014FB54 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80153D18 0014FB58 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80153D1C 0014FB5C 7C 08 03 A6 */ mtlr r0
/* 80153D20 0014FB60 38 21 00 10 */ addi r1, r1, 0x10
/* 80153D24 0014FB64 4E 80 00 20 */ blr
/* 80153D28 0014FB68 00 00 00 00 */ .4byte 0x00000000
/* 80153D2C 0014FB6C 00 00 00 00 */ .4byte 0x00000000
.global goToIFrame__5MoSdkFUl
goToIFrame__5MoSdkFUl:
/* 80153D30 0014FB70 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80153D34 0014FB74 7C 08 02 A6 */ mflr r0
/* 80153D38 0014FB78 39 00 00 00 */ li r8, 0x0
/* 80153D3C 0014FB7C 38 C0 00 00 */ li r6, 0x0
/* 80153D40 0014FB80 90 01 00 24 */ stw r0, 0x24(r1)
/* 80153D44 0014FB84 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80153D48 0014FB88 7C 7F 1B 78 */ mr r31, r3
/* 80153D4C 0014FB8C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80153D50 0014FB90 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80153D54 0014FB94 80 03 00 1C */ lwz r0, 0x1c(r3)
/* 80153D58 0014FB98 7C 09 03 A6 */ mtctr r0
/* 80153D5C 0014FB9C 28 00 00 00 */ cmplwi r0, 0x0
/* 80153D60 0014FBA0 40 81 01 3C */ ble lbl_80153E9C
/* 80153D64 0014FBA4 60 00 00 00 */ nop
.global lbl_80153D68
lbl_80153D68:
/* 80153D68 0014FBA8 80 E3 00 20 */ lwz r7, 0x20(r3)
/* 80153D6C 0014FBAC 7C A7 32 14 */ add r5, r7, r6
/* 80153D70 0014FBB0 80 05 00 04 */ lwz r0, 0x4(r5)
/* 80153D74 0014FBB4 7C 04 00 40 */ cmplw r4, r0
/* 80153D78 0014FBB8 40 82 01 18 */ bne lbl_80153E90
/* 80153D7C 0014FBBC 80 BF 00 14 */ lwz r5, 0x14(r31)
/* 80153D80 0014FBC0 55 1E 18 38 */ slwi r30, r8, 3
/* 80153D84 0014FBC4 7F E3 FB 78 */ mr r3, r31
/* 80153D88 0014FBC8 80 9F 00 18 */ lwz r4, 0x18(r31)
/* 80153D8C 0014FBCC 81 85 00 14 */ lwz r12, 0x14(r5)
/* 80153D90 0014FBD0 7C A7 F0 2E */ lwzx r5, r7, r30
/* 80153D94 0014FBD4 7D 89 03 A6 */ mtctr r12
/* 80153D98 0014FBD8 4E 80 04 21 */ bctrl
/* 80153D9C 0014FBDC 2C 03 00 00 */ cmpwi r3, 0x0
/* 80153DA0 0014FBE0 41 82 00 0C */ beq lbl_80153DAC
/* 80153DA4 0014FBE4 38 60 00 04 */ li r3, 0x4
/* 80153DA8 0014FBE8 48 00 00 F8 */ b lbl_80153EA0
.global lbl_80153DAC
lbl_80153DAC:
/* 80153DAC 0014FBEC 80 BF 00 20 */ lwz r5, 0x20(r31)
/* 80153DB0 0014FBF0 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80153DB4 0014FBF4 7C 85 F2 14 */ add r4, r5, r30
/* 80153DB8 0014FBF8 80 04 00 04 */ lwz r0, 0x4(r4)
/* 80153DBC 0014FBFC 90 1F 00 58 */ stw r0, 0x58(r31)
/* 80153DC0 0014FC00 7C 85 F0 2E */ lwzx r4, r5, r30
/* 80153DC4 0014FC04 4B FF F9 1D */ bl jumpTo__10MoSdkInputFUl
/* 80153DC8 0014FC08 80 1F 00 F4 */ lwz r0, 0xf4(r31)
/* 80153DCC 0014FC0C 2C 00 00 00 */ cmpwi r0, 0x0
/* 80153DD0 0014FC10 41 82 00 3C */ beq lbl_80153E0C
/* 80153DD4 0014FC14 3B A0 00 00 */ li r29, 0x0
/* 80153DD8 0014FC18 3B C0 00 00 */ li r30, 0x0
/* 80153DDC 0014FC1C 48 00 00 24 */ b lbl_80153E00
.global lbl_80153DE0
lbl_80153DE0:
/* 80153DE0 0014FC20 80 7F 00 F4 */ lwz r3, 0xf4(r31)
/* 80153DE4 0014FC24 7C 63 F0 2E */ lwzx r3, r3, r30
/* 80153DE8 0014FC28 81 83 00 10 */ lwz r12, 0x10(r3)
/* 80153DEC 0014FC2C 81 8C 00 18 */ lwz r12, 0x18(r12)
/* 80153DF0 0014FC30 7D 89 03 A6 */ mtctr r12
/* 80153DF4 0014FC34 4E 80 04 21 */ bctrl
/* 80153DF8 0014FC38 3B DE 00 04 */ addi r30, r30, 0x4
/* 80153DFC 0014FC3C 3B BD 00 01 */ addi r29, r29, 0x1
.global lbl_80153E00
lbl_80153E00:
/* 80153E00 0014FC40 80 1F 00 FC */ lwz r0, 0xfc(r31)
/* 80153E04 0014FC44 7C 1D 00 40 */ cmplw r29, r0
/* 80153E08 0014FC48 41 80 FF D8 */ blt lbl_80153DE0
.global lbl_80153E0C
lbl_80153E0C:
/* 80153E0C 0014FC4C 7F E3 FB 78 */ mr r3, r31
/* 80153E10 0014FC50 38 80 00 05 */ li r4, 0x5
/* 80153E14 0014FC54 4B FF DB BD */ bl setState__5MoSdkF9SDK_State
/* 80153E18 0014FC58 80 BF 00 14 */ lwz r5, 0x14(r31)
/* 80153E1C 0014FC5C 7F E3 FB 78 */ mr r3, r31
/* 80153E20 0014FC60 80 9F 00 18 */ lwz r4, 0x18(r31)
/* 80153E24 0014FC64 81 85 00 04 */ lwz r12, 0x4(r5)
/* 80153E28 0014FC68 7D 89 03 A6 */ mtctr r12
/* 80153E2C 0014FC6C 4E 80 04 21 */ bctrl
/* 80153E30 0014FC70 2C 03 00 03 */ cmpwi r3, 0x3
/* 80153E34 0014FC74 40 82 00 48 */ bne lbl_80153E7C
/* 80153E38 0014FC78 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80153E3C 0014FC7C 38 80 00 04 */ li r4, 0x4
/* 80153E40 0014FC80 4B FF F7 A1 */ bl needBytes__10MoSdkInputFUl
/* 80153E44 0014FC84 28 03 00 01 */ cmplwi r3, 0x1
/* 80153E48 0014FC88 40 82 00 34 */ bne lbl_80153E7C
/* 80153E4C 0014FC8C 80 7F 00 10 */ lwz r3, 0x10(r31)
/* 80153E50 0014FC90 4B FF F4 C1 */ bl read32__10MoSdkInputFv
/* 80153E54 0014FC94 54 64 00 3C */ clrrwi r4, r3, 1
/* 80153E58 0014FC98 54 63 07 FE */ clrlwi r3, r3, 31
/* 80153E5C 0014FC9C 38 04 00 04 */ addi r0, r4, 0x4
/* 80153E60 0014FCA0 90 7F 00 08 */ stw r3, 0x8(r31)
/* 80153E64 0014FCA4 7F E3 FB 78 */ mr r3, r31
/* 80153E68 0014FCA8 38 80 00 04 */ li r4, 0x4
/* 80153E6C 0014FCAC 90 1F 00 00 */ stw r0, 0x0(r31)
/* 80153E70 0014FCB0 4B FF DB 61 */ bl setState__5MoSdkF9SDK_State
/* 80153E74 0014FCB4 38 60 00 02 */ li r3, 0x2
/* 80153E78 0014FCB8 48 00 00 28 */ b lbl_80153EA0
.global lbl_80153E7C
lbl_80153E7C:
/* 80153E7C 0014FCBC 7F E3 FB 78 */ mr r3, r31
/* 80153E80 0014FCC0 38 80 00 05 */ li r4, 0x5
/* 80153E84 0014FCC4 4B FF DB 4D */ bl setState__5MoSdkF9SDK_State
/* 80153E88 0014FCC8 38 60 00 05 */ li r3, 0x5
/* 80153E8C 0014FCCC 48 00 00 14 */ b lbl_80153EA0
.global lbl_80153E90
lbl_80153E90:
/* 80153E90 0014FCD0 38 C6 00 08 */ addi r6, r6, 0x8
/* 80153E94 0014FCD4 39 08 00 01 */ addi r8, r8, 0x1
/* 80153E98 0014FCD8 42 00 FE D0 */ bdnz lbl_80153D68
.global lbl_80153E9C
lbl_80153E9C:
/* 80153E9C 0014FCDC 38 60 00 04 */ li r3, 0x4
.global lbl_80153EA0
lbl_80153EA0:
/* 80153EA0 0014FCE0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80153EA4 0014FCE4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80153EA8 0014FCE8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80153EAC 0014FCEC 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80153EB0 0014FCF0 7C 08 03 A6 */ mtlr r0
/* 80153EB4 0014FCF4 38 21 00 20 */ addi r1, r1, 0x20
/* 80153EB8 0014FCF8 4E 80 00 20 */ blr
/* 80153EBC 0014FCFC 00 00 00 00 */ .4byte 0x00000000
.global getPreviousIntraFrameNumber__5MoSdkFUl
getPreviousIntraFrameNumber__5MoSdkFUl:
/* 80153EC0 0014FD00 80 A3 00 1C */ lwz r5, 0x1c(r3)
/* 80153EC4 0014FD04 34 05 FF FF */ addic. r0, r5, -0x1
/* 80153EC8 0014FD08 54 06 18 38 */ slwi r6, r0, 3
/* 80153ECC 0014FD0C 7C 09 03 A6 */ mtctr r0
/* 80153ED0 0014FD10 40 81 00 2C */ ble lbl_80153EFC
/* 80153ED4 0014FD14 60 00 00 00 */ nop
.global lbl_80153ED8
lbl_80153ED8:
/* 80153ED8 0014FD18 80 03 00 20 */ lwz r0, 0x20(r3)
/* 80153EDC 0014FD1C 7C A0 32 14 */ add r5, r0, r6
/* 80153EE0 0014FD20 80 05 00 04 */ lwz r0, 0x4(r5)
/* 80153EE4 0014FD24 7C 00 20 40 */ cmplw r0, r4
/* 80153EE8 0014FD28 41 81 00 0C */ bgt lbl_80153EF4
/* 80153EEC 0014FD2C 7C 03 03 78 */ mr r3, r0
/* 80153EF0 0014FD30 4E 80 00 20 */ blr
.global lbl_80153EF4
lbl_80153EF4:
/* 80153EF4 0014FD34 38 C6 FF F8 */ addi r6, r6, -0x8
/* 80153EF8 0014FD38 42 00 FF E0 */ bdnz lbl_80153ED8
.global lbl_80153EFC
lbl_80153EFC:
/* 80153EFC 0014FD3C 38 60 00 00 */ li r3, 0x0
/* 80153F00 0014FD40 4E 80 00 20 */ blr
/* 80153F04 0014FD44 00 00 00 00 */ .4byte 0x00000000
/* 80153F08 0014FD48 00 00 00 00 */ .4byte 0x00000000
/* 80153F0C 0014FD4C 00 00 00 00 */ .4byte 0x00000000