246 lines
11 KiB
ArmAsm
246 lines
11 KiB
ArmAsm
.include "macros.inc"
|
|
|
|
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
|
|
.global WENCGetEncodeData
|
|
WENCGetEncodeData:
|
|
/* 8004D474 000492B4 94 21 FF 70 */ stwu r1, -0x90(r1)
|
|
/* 8004D478 000492B8 7C 08 02 A6 */ mflr r0
|
|
/* 8004D47C 000492BC 90 01 00 94 */ stw r0, 0x94(r1)
|
|
/* 8004D480 000492C0 39 61 00 90 */ addi r11, r1, 0x90
|
|
/* 8004D484 000492C4 4B FB 9E 95 */ bl lbl_80007318
|
|
/* 8004D488 000492C8 3D 40 80 40 */ lis r10, "@1993"@ha
|
|
/* 8004D48C 000492CC 85 2A 7C A8 */ lwzu r9, "@1993"@l(r10)
|
|
/* 8004D490 000492D0 39 66 00 01 */ addi r11, r6, 0x1
|
|
/* 8004D494 000492D4 7C 99 23 78 */ mr r25, r4
|
|
/* 8004D498 000492D8 55 64 0F FE */ srwi r4, r11, 31
|
|
/* 8004D49C 000492DC 81 0A 00 04 */ lwz r8, 0x4(r10)
|
|
/* 8004D4A0 000492E0 7C FF 3B 78 */ mr r31, r7
|
|
/* 8004D4A4 000492E4 80 0A 00 08 */ lwz r0, 0x8(r10)
|
|
/* 8004D4A8 000492E8 7C 84 5A 14 */ add r4, r4, r11
|
|
/* 8004D4AC 000492EC 82 4A 00 0C */ lwz r18, 0xc(r10)
|
|
/* 8004D4B0 000492F0 83 6A 00 10 */ lwz r27, 0x10(r10)
|
|
/* 8004D4B4 000492F4 7C DE 33 78 */ mr r30, r6
|
|
/* 8004D4B8 000492F8 83 4A 00 14 */ lwz r26, 0x14(r10)
|
|
/* 8004D4BC 000492FC 7C 7C 1B 78 */ mr r28, r3
|
|
/* 8004D4C0 00049300 83 0A 00 18 */ lwz r24, 0x18(r10)
|
|
/* 8004D4C4 00049304 7C BD 2B 78 */ mr r29, r5
|
|
/* 8004D4C8 00049308 82 EA 00 1C */ lwz r23, 0x1c(r10)
|
|
/* 8004D4CC 0004930C 7C 85 0E 70 */ srawi r5, r4, 1
|
|
/* 8004D4D0 00049310 82 CA 00 20 */ lwz r22, 0x20(r10)
|
|
/* 8004D4D4 00049314 7F E3 FB 78 */ mr r3, r31
|
|
/* 8004D4D8 00049318 82 AA 00 24 */ lwz r21, 0x24(r10)
|
|
/* 8004D4DC 0004931C 38 80 00 00 */ li r4, 0x0
|
|
/* 8004D4E0 00049320 82 8A 00 28 */ lwz r20, 0x28(r10)
|
|
/* 8004D4E4 00049324 82 6A 00 2C */ lwz r19, 0x2c(r10)
|
|
/* 8004D4E8 00049328 81 8A 00 30 */ lwz r12, 0x30(r10)
|
|
/* 8004D4EC 0004932C 81 6A 00 34 */ lwz r11, 0x34(r10)
|
|
/* 8004D4F0 00049330 80 EA 00 38 */ lwz r7, 0x38(r10)
|
|
/* 8004D4F4 00049334 80 CA 00 3C */ lwz r6, 0x3c(r10)
|
|
/* 8004D4F8 00049338 91 21 00 08 */ stw r9, 0x8(r1)
|
|
/* 8004D4FC 0004933C 91 01 00 0C */ stw r8, 0xc(r1)
|
|
/* 8004D500 00049340 90 01 00 10 */ stw r0, 0x10(r1)
|
|
/* 8004D504 00049344 92 41 00 14 */ stw r18, 0x14(r1)
|
|
/* 8004D508 00049348 93 61 00 18 */ stw r27, 0x18(r1)
|
|
/* 8004D50C 0004934C 93 41 00 1C */ stw r26, 0x1c(r1)
|
|
/* 8004D510 00049350 93 01 00 20 */ stw r24, 0x20(r1)
|
|
/* 8004D514 00049354 92 E1 00 24 */ stw r23, 0x24(r1)
|
|
/* 8004D518 00049358 92 C1 00 28 */ stw r22, 0x28(r1)
|
|
/* 8004D51C 0004935C 92 A1 00 2C */ stw r21, 0x2c(r1)
|
|
/* 8004D520 00049360 92 81 00 30 */ stw r20, 0x30(r1)
|
|
/* 8004D524 00049364 92 61 00 34 */ stw r19, 0x34(r1)
|
|
/* 8004D528 00049368 91 81 00 38 */ stw r12, 0x38(r1)
|
|
/* 8004D52C 0004936C 91 61 00 3C */ stw r11, 0x3c(r1)
|
|
/* 8004D530 00049370 90 E1 00 40 */ stw r7, 0x40(r1)
|
|
/* 8004D534 00049374 90 C1 00 44 */ stw r6, 0x44(r1)
|
|
/* 8004D538 00049378 4B FB 6E 19 */ bl memset
|
|
/* 8004D53C 0004937C 57 20 07 FF */ clrlwi. r0, r25, 31
|
|
/* 8004D540 00049380 40 82 00 20 */ bne lbl_8004D560
|
|
/* 8004D544 00049384 39 60 00 00 */ li r11, 0x0
|
|
/* 8004D548 00049388 39 80 00 7F */ li r12, 0x7f
|
|
/* 8004D54C 0004938C 38 A0 00 00 */ li r5, 0x0
|
|
/* 8004D550 00049390 3B 60 00 00 */ li r27, 0x0
|
|
/* 8004D554 00049394 3B 40 00 00 */ li r26, 0x0
|
|
/* 8004D558 00049398 3B 20 00 00 */ li r25, 0x0
|
|
/* 8004D55C 0004939C 48 00 00 1C */ b lbl_8004D578
|
|
.global lbl_8004D560
|
|
lbl_8004D560:
|
|
/* 8004D560 000493A0 81 7C 00 00 */ lwz r11, 0x0(r28)
|
|
/* 8004D564 000493A4 81 9C 00 04 */ lwz r12, 0x4(r28)
|
|
/* 8004D568 000493A8 80 BC 00 08 */ lwz r5, 0x8(r28)
|
|
/* 8004D56C 000493AC 83 7C 00 0C */ lwz r27, 0xc(r28)
|
|
/* 8004D570 000493B0 83 5C 00 10 */ lwz r26, 0x10(r28)
|
|
/* 8004D574 000493B4 83 3C 00 14 */ lwz r25, 0x14(r28)
|
|
.global lbl_8004D578
|
|
lbl_8004D578:
|
|
/* 8004D578 000493B8 3C 60 00 01 */ lis r3, 0x1
|
|
/* 8004D57C 000493BC 3B 01 00 08 */ addi r24, r1, 0x8
|
|
/* 8004D580 000493C0 C8 42 87 C0 */ lfd f2, "@2084_8055E740"@sda21(r2)
|
|
/* 8004D584 000493C4 38 83 FF FF */ addi r4, r3, -0x1
|
|
/* 8004D588 000493C8 38 C0 00 00 */ li r6, 0x0
|
|
/* 8004D58C 000493CC 3C 00 FF FF */ lis r0, 0xffff
|
|
/* 8004D590 000493D0 3E E0 43 30 */ lis r23, 0x4330
|
|
/* 8004D594 000493D4 7F C9 03 A6 */ mtctr r30
|
|
/* 8004D598 000493D8 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
/* 8004D59C 000493DC 40 81 01 7C */ ble lbl_8004D718
|
|
.global lbl_8004D5A0
|
|
lbl_8004D5A0:
|
|
/* 8004D5A0 000493E0 A8 BD 00 00 */ lha r5, 0x0(r29)
|
|
/* 8004D5A4 000493E4 39 40 00 00 */ li r10, 0x0
|
|
/* 8004D5A8 000493E8 39 20 00 00 */ li r9, 0x0
|
|
/* 8004D5AC 000493EC 39 00 00 00 */ li r8, 0x0
|
|
/* 8004D5B0 000493F0 7C 05 58 00 */ cmpw r5, r11
|
|
/* 8004D5B4 000493F4 38 E0 00 00 */ li r7, 0x0
|
|
/* 8004D5B8 000493F8 3B BD 00 02 */ addi r29, r29, 0x2
|
|
/* 8004D5BC 000493FC 40 80 00 08 */ bge lbl_8004D5C4
|
|
/* 8004D5C0 00049400 38 E0 00 01 */ li r7, 0x1
|
|
.global lbl_8004D5C4
|
|
lbl_8004D5C4:
|
|
/* 8004D5C4 00049404 7E 6B 28 50 */ subf r19, r11, r5
|
|
/* 8004D5C8 00049408 7E 65 FE 70 */ srawi r5, r19, 31
|
|
/* 8004D5CC 0004940C 7C BB 9A 78 */ xor r27, r5, r19
|
|
/* 8004D5D0 00049410 7F 65 D8 50 */ subf r27, r5, r27
|
|
/* 8004D5D4 00049414 7C 1B 60 00 */ cmpw r27, r12
|
|
/* 8004D5D8 00049418 41 80 00 0C */ blt lbl_8004D5E4
|
|
/* 8004D5DC 0004941C 39 00 00 01 */ li r8, 0x1
|
|
/* 8004D5E0 00049420 7F 6C D8 50 */ subf r27, r12, r27
|
|
.global lbl_8004D5E4
|
|
lbl_8004D5E4:
|
|
/* 8004D5E4 00049424 55 85 0F FE */ srwi r5, r12, 31
|
|
/* 8004D5E8 00049428 7C A5 62 14 */ add r5, r5, r12
|
|
/* 8004D5EC 0004942C 7C BA 0E 70 */ srawi r26, r5, 1
|
|
/* 8004D5F0 00049430 7C 1B D0 00 */ cmpw r27, r26
|
|
/* 8004D5F4 00049434 41 80 00 0C */ blt lbl_8004D600
|
|
/* 8004D5F8 00049438 39 20 00 01 */ li r9, 0x1
|
|
/* 8004D5FC 0004943C 7F 7A D8 50 */ subf r27, r26, r27
|
|
.global lbl_8004D600
|
|
lbl_8004D600:
|
|
/* 8004D600 00049440 57 45 0F FE */ srwi r5, r26, 31
|
|
/* 8004D604 00049444 7C A5 D2 14 */ add r5, r5, r26
|
|
/* 8004D608 00049448 7C B9 0E 70 */ srawi r25, r5, 1
|
|
/* 8004D60C 0004944C 7C 1B C8 00 */ cmpw r27, r25
|
|
/* 8004D610 00049450 41 80 00 0C */ blt lbl_8004D61C
|
|
/* 8004D614 00049454 39 40 00 01 */ li r10, 0x1
|
|
/* 8004D618 00049458 7F 79 D8 50 */ subf r27, r25, r27
|
|
.global lbl_8004D61C
|
|
lbl_8004D61C:
|
|
/* 8004D61C 0004945C 7E 99 51 D6 */ mullw r20, r25, r10
|
|
/* 8004D620 00049460 54 E5 08 3C */ slwi r5, r7, 1
|
|
/* 8004D624 00049464 57 33 0F FE */ srwi r19, r25, 31
|
|
/* 8004D628 00049468 20 A5 00 01 */ subfic r5, r5, 0x1
|
|
/* 8004D62C 0004946C 7E 73 CA 14 */ add r19, r19, r25
|
|
/* 8004D630 00049470 7E AC 41 D6 */ mullw r21, r12, r8
|
|
/* 8004D634 00049474 7E 73 0E 70 */ srawi r19, r19, 1
|
|
/* 8004D638 00049478 7E DA 49 D6 */ mullw r22, r26, r9
|
|
/* 8004D63C 0004947C 7E B4 AA 14 */ add r21, r20, r21
|
|
/* 8004D640 00049480 7E D3 B2 14 */ add r22, r19, r22
|
|
/* 8004D644 00049484 7E D5 B2 14 */ add r22, r21, r22
|
|
/* 8004D648 00049488 7C A5 B1 D6 */ mullw r5, r5, r22
|
|
/* 8004D64C 0004948C 7C 05 20 00 */ cmpw r5, r4
|
|
/* 8004D650 00049490 40 81 00 08 */ ble lbl_8004D658
|
|
/* 8004D654 00049494 38 A3 FF FF */ addi r5, r3, -0x1
|
|
.global lbl_8004D658
|
|
lbl_8004D658:
|
|
/* 8004D658 00049498 7C 05 00 00 */ cmpw r5, r0
|
|
/* 8004D65C 0004949C 40 80 00 08 */ bge lbl_8004D664
|
|
/* 8004D660 000494A0 3C A0 FF FF */ lis r5, 0xffff
|
|
.global lbl_8004D664
|
|
lbl_8004D664:
|
|
/* 8004D664 000494A4 7D 6B 2A 14 */ add r11, r11, r5
|
|
/* 8004D668 000494A8 2C 0B 7F FF */ cmpwi r11, 0x7fff
|
|
/* 8004D66C 000494AC 40 81 00 08 */ ble lbl_8004D674
|
|
/* 8004D670 000494B0 39 60 7F FF */ li r11, 0x7fff
|
|
.global lbl_8004D674
|
|
lbl_8004D674:
|
|
/* 8004D674 000494B4 2C 0B 80 00 */ cmpwi r11, -0x8000
|
|
/* 8004D678 000494B8 40 80 00 08 */ bge lbl_8004D680
|
|
/* 8004D67C 000494BC 39 60 80 00 */ li r11, -0x8000
|
|
.global lbl_8004D680
|
|
lbl_8004D680:
|
|
/* 8004D680 000494C0 6D 8C 80 00 */ xoris r12, r12, 0x8000
|
|
/* 8004D684 000494C4 55 12 10 3A */ slwi r18, r8, 2
|
|
/* 8004D688 000494C8 91 81 00 4C */ stw r12, 0x4c(r1)
|
|
/* 8004D68C 000494CC 54 D6 07 FE */ clrlwi r22, r6, 31
|
|
/* 8004D690 000494D0 55 29 08 3C */ slwi r9, r9, 1
|
|
/* 8004D694 000494D4 7D 0A 92 14 */ add r8, r10, r18
|
|
/* 8004D698 000494D8 92 E1 00 48 */ stw r23, 0x48(r1)
|
|
/* 8004D69C 000494DC 7D 09 42 14 */ add r8, r9, r8
|
|
/* 8004D6A0 000494E0 55 08 18 38 */ slwi r8, r8, 3
|
|
/* 8004D6A4 000494E4 54 CC 0F FE */ srwi r12, r6, 31
|
|
/* 8004D6A8 000494E8 C8 21 00 48 */ lfd f1, 0x48(r1)
|
|
/* 8004D6AC 000494EC 7D 29 92 14 */ add r9, r9, r18
|
|
/* 8004D6B0 000494F0 7C 18 44 AE */ lfdx f0, r24, r8
|
|
/* 8004D6B4 000494F4 7D 0C 32 14 */ add r8, r12, r6
|
|
/* 8004D6B8 000494F8 FC 21 10 28 */ fsub f1, f1, f2
|
|
/* 8004D6BC 000494FC 7D 0C 0E 70 */ srawi r12, r8, 1
|
|
/* 8004D6C0 00049500 54 E8 18 38 */ slwi r8, r7, 3
|
|
/* 8004D6C4 00049504 7C EA 4A 14 */ add r7, r10, r9
|
|
/* 8004D6C8 00049508 7C E8 3A 14 */ add r7, r8, r7
|
|
/* 8004D6CC 0004950C 3A D6 FF FF */ addi r22, r22, -0x1
|
|
/* 8004D6D0 00049510 FC 01 00 32 */ fmul f0, f1, f0
|
|
/* 8004D6D4 00049514 56 C9 07 7A */ rlwinm r9, r22, 0, 29, 29
|
|
/* 8004D6D8 00049518 54 E7 06 3E */ clrlwi r7, r7, 24
|
|
/* 8004D6DC 0004951C 7D 1F 60 AE */ lbzx r8, r31, r12
|
|
/* 8004D6E0 00049520 7C E7 48 30 */ slw r7, r7, r9
|
|
/* 8004D6E4 00049524 7D 07 3B 78 */ or r7, r8, r7
|
|
/* 8004D6E8 00049528 FC 00 00 1E */ fctiwz f0, f0
|
|
/* 8004D6EC 0004952C 7C FF 61 AE */ stbx r7, r31, r12
|
|
/* 8004D6F0 00049530 D8 01 00 50 */ stfd f0, 0x50(r1)
|
|
/* 8004D6F4 00049534 81 81 00 54 */ lwz r12, 0x54(r1)
|
|
/* 8004D6F8 00049538 2C 0C 00 7F */ cmpwi r12, 0x7f
|
|
/* 8004D6FC 0004953C 41 81 00 08 */ bgt lbl_8004D704
|
|
/* 8004D700 00049540 39 80 00 7F */ li r12, 0x7f
|
|
.global lbl_8004D704
|
|
lbl_8004D704:
|
|
/* 8004D704 00049544 2C 0C 60 00 */ cmpwi r12, 0x6000
|
|
/* 8004D708 00049548 41 80 00 08 */ blt lbl_8004D710
|
|
/* 8004D70C 0004954C 39 80 60 00 */ li r12, 0x6000
|
|
.global lbl_8004D710
|
|
lbl_8004D710:
|
|
/* 8004D710 00049550 38 C6 00 01 */ addi r6, r6, 0x1
|
|
/* 8004D714 00049554 42 00 FE 8C */ bdnz lbl_8004D5A0
|
|
.global lbl_8004D718
|
|
lbl_8004D718:
|
|
/* 8004D718 00049558 91 7C 00 00 */ stw r11, 0x0(r28)
|
|
/* 8004D71C 0004955C 39 61 00 90 */ addi r11, r1, 0x90
|
|
/* 8004D720 00049560 7F C3 F3 78 */ mr r3, r30
|
|
/* 8004D724 00049564 91 9C 00 04 */ stw r12, 0x4(r28)
|
|
/* 8004D728 00049568 90 BC 00 08 */ stw r5, 0x8(r28)
|
|
/* 8004D72C 0004956C 93 7C 00 0C */ stw r27, 0xc(r28)
|
|
/* 8004D730 00049570 93 5C 00 10 */ stw r26, 0x10(r28)
|
|
/* 8004D734 00049574 93 3C 00 14 */ stw r25, 0x14(r28)
|
|
/* 8004D738 00049578 4B FB 9C 2D */ bl lbl_80007364
|
|
/* 8004D73C 0004957C 80 01 00 94 */ lwz r0, 0x94(r1)
|
|
/* 8004D740 00049580 7C 08 03 A6 */ mtlr r0
|
|
/* 8004D744 00049584 38 21 00 90 */ addi r1, r1, 0x90
|
|
/* 8004D748 00049588 4E 80 00 20 */ blr
|
|
/* 8004D74C 0004958C 00 00 00 00 */ .4byte 0x00000000
|
|
.include "macros.inc"
|
|
|
|
.section .rodata, "wa" # 0x80406560 - 0x80421040 ; 0x0001AAE0
|
|
.global "@1993"
|
|
"@1993":
|
|
|
|
.4byte 0x3FECC000
|
|
.4byte 0
|
|
.4byte 0x3FECC000
|
|
.4byte 0
|
|
.4byte 0x3FECC000
|
|
.4byte 0
|
|
.4byte 0x3FECC000
|
|
.4byte 0
|
|
.4byte 0x3FF33000
|
|
.4byte 0
|
|
.4byte 0x3FF99000
|
|
.4byte 0
|
|
.4byte 0x40000000
|
|
.4byte 0
|
|
.4byte 0x40033000
|
|
.4byte 0
|
|
.include "macros.inc"
|
|
|
|
.section .sdata2, "wa" # 0x8055DF80 - 0x805643C0 ; 0x00006440
|
|
.global "@2084_8055E740"
|
|
"@2084_8055E740":
|
|
|
|
.4byte 0x43300000
|
|
.4byte 0x80000000
|