prime/asm/Dolphin/GX/GXBump.s

434 lines
21 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .text, "ax"
.global GXSetTevIndirect
GXSetTevIndirect:
/* 8037AE2C 00377D8C 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 8037AE30 00377D90 54 84 07 B6 */ rlwinm r4, r4, 0, 0x1e, 0x1b
/* 8037AE34 00377D94 54 A0 10 3A */ slwi r0, r5, 2
/* 8037AE38 00377D98 7C 80 03 78 */ or r0, r4, r0
/* 8037AE3C 00377D9C 81 61 00 34 */ lwz r11, 0x34(r1)
/* 8037AE40 00377DA0 54 05 07 30 */ rlwinm r5, r0, 0, 0x1c, 0x18
/* 8037AE44 00377DA4 89 81 00 33 */ lbz r12, 0x33(r1)
/* 8037AE48 00377DA8 54 C0 20 36 */ slwi r0, r6, 4
/* 8037AE4C 00377DAC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 8037AE50 00377DB0 7C A0 03 78 */ or r0, r5, r0
/* 8037AE54 00377DB4 54 05 06 6C */ rlwinm r5, r0, 0, 0x19, 0x16
/* 8037AE58 00377DB8 55 60 38 30 */ slwi r0, r11, 7
/* 8037AE5C 00377DBC 7C A0 03 78 */ or r0, r5, r0
/* 8037AE60 00377DC0 54 05 05 E4 */ rlwinm r5, r0, 0, 0x17, 0x12
/* 8037AE64 00377DC4 54 E0 48 2C */ slwi r0, r7, 9
/* 8037AE68 00377DC8 7C A0 03 78 */ or r0, r5, r0
/* 8037AE6C 00377DCC 54 05 04 DE */ rlwinm r5, r0, 0, 0x13, 0xf
/* 8037AE70 00377DD0 55 00 68 24 */ slwi r0, r8, 0xd
/* 8037AE74 00377DD4 7C A0 03 78 */ or r0, r5, r0
/* 8037AE78 00377DD8 38 A3 00 10 */ addi r5, r3, 0x10
/* 8037AE7C 00377DDC 54 03 04 18 */ rlwinm r3, r0, 0, 0x10, 0xc
/* 8037AE80 00377DE0 55 20 80 1E */ slwi r0, r9, 0x10
/* 8037AE84 00377DE4 7C 60 03 78 */ or r0, r3, r0
/* 8037AE88 00377DE8 54 03 03 56 */ rlwinm r3, r0, 0, 0xd, 0xb
/* 8037AE8C 00377DEC 55 80 98 18 */ slwi r0, r12, 0x13
/* 8037AE90 00377DF0 7C 60 03 78 */ or r0, r3, r0
/* 8037AE94 00377DF4 54 03 03 14 */ rlwinm r3, r0, 0, 0xc, 0xa
/* 8037AE98 00377DF8 55 40 A1 16 */ rlwinm r0, r10, 0x14, 4, 0xb
/* 8037AE9C 00377DFC 7C 66 03 78 */ or r6, r3, r0
/* 8037AEA0 00377E00 38 00 00 61 */ li r0, 0x61
/* 8037AEA4 00377E04 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 8037AEA8 00377E08 98 03 80 00 */ stb r0, 0xCC008000@l(r3)
/* 8037AEAC 00377E0C 54 A0 C0 0E */ slwi r0, r5, 0x18
/* 8037AEB0 00377E10 50 C0 02 3E */ rlwimi r0, r6, 0, 8, 0x1f
/* 8037AEB4 00377E14 90 03 80 00 */ stw r0, 0xCC008000@l(r3)
/* 8037AEB8 00377E18 38 00 00 00 */ li r0, 0
/* 8037AEBC 00377E1C B0 04 00 02 */ sth r0, 2(r4)
/* 8037AEC0 00377E20 38 21 00 28 */ addi r1, r1, 0x28
/* 8037AEC4 00377E24 4E 80 00 20 */ blr
.global GXSetIndTexMtx
GXSetIndTexMtx:
/* 8037AEC8 00377E28 2C 03 00 08 */ cmpwi r3, 8
/* 8037AECC 00377E2C 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 8037AED0 00377E30 41 82 00 44 */ beq lbl_8037AF14
/* 8037AED4 00377E34 40 80 00 1C */ bge lbl_8037AEF0
/* 8037AED8 00377E38 2C 03 00 04 */ cmpwi r3, 4
/* 8037AEDC 00377E3C 41 82 00 38 */ beq lbl_8037AF14
/* 8037AEE0 00377E40 40 80 00 24 */ bge lbl_8037AF04
/* 8037AEE4 00377E44 2C 03 00 01 */ cmpwi r3, 1
/* 8037AEE8 00377E48 40 80 00 14 */ bge lbl_8037AEFC
/* 8037AEEC 00377E4C 48 00 00 28 */ b lbl_8037AF14
lbl_8037AEF0:
/* 8037AEF0 00377E50 2C 03 00 0C */ cmpwi r3, 0xc
/* 8037AEF4 00377E54 40 80 00 20 */ bge lbl_8037AF14
/* 8037AEF8 00377E58 48 00 00 14 */ b lbl_8037AF0C
lbl_8037AEFC:
/* 8037AEFC 00377E5C 38 03 FF FF */ addi r0, r3, -1
/* 8037AF00 00377E60 48 00 00 18 */ b lbl_8037AF18
lbl_8037AF04:
/* 8037AF04 00377E64 38 03 FF FB */ addi r0, r3, -5
/* 8037AF08 00377E68 48 00 00 10 */ b lbl_8037AF18
lbl_8037AF0C:
/* 8037AF0C 00377E6C 38 03 FF F7 */ addi r0, r3, -9
/* 8037AF10 00377E70 48 00 00 08 */ b lbl_8037AF18
lbl_8037AF14:
/* 8037AF14 00377E74 38 00 00 00 */ li r0, 0
lbl_8037AF18:
/* 8037AF18 00377E78 C0 42 CE 90 */ lfs f2, lbl_805AEBB0@sda21(r2)
/* 8037AF1C 00377E7C 1C 60 00 03 */ mulli r3, r0, 3
/* 8037AF20 00377E80 C0 24 00 00 */ lfs f1, 0(r4)
/* 8037AF24 00377E84 C0 04 00 0C */ lfs f0, 0xc(r4)
/* 8037AF28 00377E88 EC 22 00 72 */ fmuls f1, f2, f1
/* 8037AF2C 00377E8C 39 65 00 11 */ addi r11, r5, 0x11
/* 8037AF30 00377E90 EC 02 00 32 */ fmuls f0, f2, f0
/* 8037AF34 00377E94 38 03 00 06 */ addi r0, r3, 6
/* 8037AF38 00377E98 7D 6B 07 74 */ extsb r11, r11
/* 8037AF3C 00377E9C FC 20 08 1E */ fctiwz f1, f1
/* 8037AF40 00377EA0 39 40 00 61 */ li r10, 0x61
/* 8037AF44 00377EA4 FC 00 00 1E */ fctiwz f0, f0
/* 8037AF48 00377EA8 3D 20 CC 01 */ lis r9, 0xCC008000@ha
/* 8037AF4C 00377EAC 99 49 80 00 */ stb r10, 0xCC008000@l(r9)
/* 8037AF50 00377EB0 D8 21 00 70 */ stfd f1, 0x70(r1)
/* 8037AF54 00377EB4 54 00 C0 0E */ slwi r0, r0, 0x18
/* 8037AF58 00377EB8 38 C3 00 07 */ addi r6, r3, 7
/* 8037AF5C 00377EBC D8 01 00 68 */ stfd f0, 0x68(r1)
/* 8037AF60 00377EC0 38 A3 00 08 */ addi r5, r3, 8
/* 8037AF64 00377EC4 81 01 00 74 */ lwz r8, 0x74(r1)
/* 8037AF68 00377EC8 80 E1 00 6C */ lwz r7, 0x6c(r1)
/* 8037AF6C 00377ECC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 8037AF70 00377ED0 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14
/* 8037AF74 00377ED4 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f
/* 8037AF78 00377ED8 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7
/* 8037AF7C 00377EDC 51 67 B2 12 */ rlwimi r7, r11, 0x16, 8, 9
/* 8037AF80 00377EE0 50 E0 02 3E */ rlwimi r0, r7, 0, 8, 0x1f
/* 8037AF84 00377EE4 90 09 80 00 */ stw r0, 0xCC008000@l(r9)
/* 8037AF88 00377EE8 38 00 00 00 */ li r0, 0
/* 8037AF8C 00377EEC C0 24 00 04 */ lfs f1, 4(r4)
/* 8037AF90 00377EF0 C0 04 00 10 */ lfs f0, 0x10(r4)
/* 8037AF94 00377EF4 EC 22 00 72 */ fmuls f1, f2, f1
/* 8037AF98 00377EF8 EC 02 00 32 */ fmuls f0, f2, f0
/* 8037AF9C 00377EFC 99 49 80 00 */ stb r10, 0xCC008000@l(r9)
/* 8037AFA0 00377F00 FC 20 08 1E */ fctiwz f1, f1
/* 8037AFA4 00377F04 FC 00 00 1E */ fctiwz f0, f0
/* 8037AFA8 00377F08 D8 21 00 60 */ stfd f1, 0x60(r1)
/* 8037AFAC 00377F0C D8 01 00 58 */ stfd f0, 0x58(r1)
/* 8037AFB0 00377F10 81 01 00 64 */ lwz r8, 0x64(r1)
/* 8037AFB4 00377F14 80 E1 00 5C */ lwz r7, 0x5c(r1)
/* 8037AFB8 00377F18 54 E7 5A A8 */ rlwinm r7, r7, 0xb, 0xa, 0x14
/* 8037AFBC 00377F1C 51 07 05 7E */ rlwimi r7, r8, 0, 0x15, 0x1f
/* 8037AFC0 00377F20 54 E7 02 8E */ rlwinm r7, r7, 0, 0xa, 7
/* 8037AFC4 00377F24 51 67 A2 12 */ rlwimi r7, r11, 0x14, 8, 9
/* 8037AFC8 00377F28 54 E7 02 3E */ clrlwi r7, r7, 8
/* 8037AFCC 00377F2C 50 C7 C0 0E */ rlwimi r7, r6, 0x18, 0, 7
/* 8037AFD0 00377F30 90 E9 80 00 */ stw r7, 0xCC008000@l(r9)
/* 8037AFD4 00377F34 C0 24 00 08 */ lfs f1, 8(r4)
/* 8037AFD8 00377F38 C0 04 00 14 */ lfs f0, 0x14(r4)
/* 8037AFDC 00377F3C EC 22 00 72 */ fmuls f1, f2, f1
/* 8037AFE0 00377F40 EC 02 00 32 */ fmuls f0, f2, f0
/* 8037AFE4 00377F44 99 49 80 00 */ stb r10, 0xCC008000@l(r9)
/* 8037AFE8 00377F48 FC 20 08 1E */ fctiwz f1, f1
/* 8037AFEC 00377F4C FC 00 00 1E */ fctiwz f0, f0
/* 8037AFF0 00377F50 D8 21 00 50 */ stfd f1, 0x50(r1)
/* 8037AFF4 00377F54 D8 01 00 48 */ stfd f0, 0x48(r1)
/* 8037AFF8 00377F58 80 C1 00 54 */ lwz r6, 0x54(r1)
/* 8037AFFC 00377F5C 80 81 00 4C */ lwz r4, 0x4c(r1)
/* 8037B000 00377F60 54 84 5A A8 */ rlwinm r4, r4, 0xb, 0xa, 0x14
/* 8037B004 00377F64 50 C4 05 7E */ rlwimi r4, r6, 0, 0x15, 0x1f
/* 8037B008 00377F68 54 84 02 8E */ rlwinm r4, r4, 0, 0xa, 7
/* 8037B00C 00377F6C 51 64 92 12 */ rlwimi r4, r11, 0x12, 8, 9
/* 8037B010 00377F70 54 84 02 3E */ clrlwi r4, r4, 8
/* 8037B014 00377F74 50 A4 C0 0E */ rlwimi r4, r5, 0x18, 0, 7
/* 8037B018 00377F78 90 89 80 00 */ stw r4, 0xCC008000@l(r9)
/* 8037B01C 00377F7C B0 03 00 02 */ sth r0, 2(r3)
/* 8037B020 00377F80 38 21 00 78 */ addi r1, r1, 0x78
/* 8037B024 00377F84 4E 80 00 20 */ blr
.global GXSetIndTexCoordScale
GXSetIndTexCoordScale:
/* 8037B028 00377F88 2C 03 00 02 */ cmpwi r3, 2
/* 8037B02C 00377F8C 41 82 00 C8 */ beq lbl_8037B0F4
/* 8037B030 00377F90 40 80 00 14 */ bge lbl_8037B044
/* 8037B034 00377F94 2C 03 00 00 */ cmpwi r3, 0
/* 8037B038 00377F98 41 82 00 18 */ beq lbl_8037B050
/* 8037B03C 00377F9C 40 80 00 64 */ bge lbl_8037B0A0
/* 8037B040 00377FA0 48 00 01 54 */ b lbl_8037B194
lbl_8037B044:
/* 8037B044 00377FA4 2C 03 00 04 */ cmpwi r3, 4
/* 8037B048 00377FA8 40 80 01 4C */ bge lbl_8037B194
/* 8037B04C 00377FAC 48 00 00 F8 */ b lbl_8037B144
lbl_8037B050:
/* 8037B050 00377FB0 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2)
/* 8037B054 00377FB4 54 A5 20 36 */ slwi r5, r5, 4
/* 8037B058 00377FB8 38 00 00 61 */ li r0, 0x61
/* 8037B05C 00377FBC 80 C7 01 28 */ lwz r6, 0x128(r7)
/* 8037B060 00377FC0 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 8037B064 00377FC4 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b
/* 8037B068 00377FC8 7C C4 23 78 */ or r4, r6, r4
/* 8037B06C 00377FCC 90 87 01 28 */ stw r4, 0x128(r7)
/* 8037B070 00377FD0 80 87 01 28 */ lwz r4, 0x128(r7)
/* 8037B074 00377FD4 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17
/* 8037B078 00377FD8 7C 84 2B 78 */ or r4, r4, r5
/* 8037B07C 00377FDC 90 87 01 28 */ stw r4, 0x128(r7)
/* 8037B080 00377FE0 80 87 01 28 */ lwz r4, 0x128(r7)
/* 8037B084 00377FE4 54 84 02 3E */ clrlwi r4, r4, 8
/* 8037B088 00377FE8 64 84 25 00 */ oris r4, r4, 0x2500
/* 8037B08C 00377FEC 90 87 01 28 */ stw r4, 0x128(r7)
/* 8037B090 00377FF0 98 03 80 00 */ stb r0, 0xCC008000@l(r3)
/* 8037B094 00377FF4 80 07 01 28 */ lwz r0, 0x128(r7)
/* 8037B098 00377FF8 90 03 80 00 */ stw r0, 0xCC008000@l(r3)
/* 8037B09C 00377FFC 48 00 00 F8 */ b lbl_8037B194
lbl_8037B0A0:
/* 8037B0A0 00378000 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2)
/* 8037B0A4 00378004 54 86 40 2E */ slwi r6, r4, 8
/* 8037B0A8 00378008 54 A4 60 26 */ slwi r4, r5, 0xc
/* 8037B0AC 0037800C 80 A7 01 28 */ lwz r5, 0x128(r7)
/* 8037B0B0 00378010 38 00 00 61 */ li r0, 0x61
/* 8037B0B4 00378014 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 8037B0B8 00378018 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13
/* 8037B0BC 0037801C 7C A5 33 78 */ or r5, r5, r6
/* 8037B0C0 00378020 90 A7 01 28 */ stw r5, 0x128(r7)
/* 8037B0C4 00378024 80 A7 01 28 */ lwz r5, 0x128(r7)
/* 8037B0C8 00378028 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf
/* 8037B0CC 0037802C 7C A4 23 78 */ or r4, r5, r4
/* 8037B0D0 00378030 90 87 01 28 */ stw r4, 0x128(r7)
/* 8037B0D4 00378034 80 87 01 28 */ lwz r4, 0x128(r7)
/* 8037B0D8 00378038 54 84 02 3E */ clrlwi r4, r4, 8
/* 8037B0DC 0037803C 64 84 25 00 */ oris r4, r4, 0x2500
/* 8037B0E0 00378040 90 87 01 28 */ stw r4, 0x128(r7)
/* 8037B0E4 00378044 98 03 80 00 */ stb r0, 0xCC008000@l(r3)
/* 8037B0E8 00378048 80 07 01 28 */ lwz r0, 0x128(r7)
/* 8037B0EC 0037804C 90 03 80 00 */ stw r0, 0xCC008000@l(r3)
/* 8037B0F0 00378050 48 00 00 A4 */ b lbl_8037B194
lbl_8037B0F4:
/* 8037B0F4 00378054 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2)
/* 8037B0F8 00378058 54 A5 20 36 */ slwi r5, r5, 4
/* 8037B0FC 0037805C 38 00 00 61 */ li r0, 0x61
/* 8037B100 00378060 80 C7 01 2C */ lwz r6, 0x12c(r7)
/* 8037B104 00378064 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 8037B108 00378068 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b
/* 8037B10C 0037806C 7C C4 23 78 */ or r4, r6, r4
/* 8037B110 00378070 90 87 01 2C */ stw r4, 0x12c(r7)
/* 8037B114 00378074 80 87 01 2C */ lwz r4, 0x12c(r7)
/* 8037B118 00378078 54 84 07 2E */ rlwinm r4, r4, 0, 0x1c, 0x17
/* 8037B11C 0037807C 7C 84 2B 78 */ or r4, r4, r5
/* 8037B120 00378080 90 87 01 2C */ stw r4, 0x12c(r7)
/* 8037B124 00378084 80 87 01 2C */ lwz r4, 0x12c(r7)
/* 8037B128 00378088 54 84 02 3E */ clrlwi r4, r4, 8
/* 8037B12C 0037808C 64 84 26 00 */ oris r4, r4, 0x2600
/* 8037B130 00378090 90 87 01 2C */ stw r4, 0x12c(r7)
/* 8037B134 00378094 98 03 80 00 */ stb r0, 0xCC008000@l(r3)
/* 8037B138 00378098 80 07 01 2C */ lwz r0, 0x12c(r7)
/* 8037B13C 0037809C 90 03 80 00 */ stw r0, 0xCC008000@l(r3)
/* 8037B140 003780A0 48 00 00 54 */ b lbl_8037B194
lbl_8037B144:
/* 8037B144 003780A4 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2)
/* 8037B148 003780A8 54 86 40 2E */ slwi r6, r4, 8
/* 8037B14C 003780AC 54 A4 60 26 */ slwi r4, r5, 0xc
/* 8037B150 003780B0 80 A7 01 2C */ lwz r5, 0x12c(r7)
/* 8037B154 003780B4 38 00 00 61 */ li r0, 0x61
/* 8037B158 003780B8 3C 60 CC 01 */ lis r3, 0xCC008000@ha
/* 8037B15C 003780BC 54 A5 06 26 */ rlwinm r5, r5, 0, 0x18, 0x13
/* 8037B160 003780C0 7C A5 33 78 */ or r5, r5, r6
/* 8037B164 003780C4 90 A7 01 2C */ stw r5, 0x12c(r7)
/* 8037B168 003780C8 80 A7 01 2C */ lwz r5, 0x12c(r7)
/* 8037B16C 003780CC 54 A5 05 1E */ rlwinm r5, r5, 0, 0x14, 0xf
/* 8037B170 003780D0 7C A4 23 78 */ or r4, r5, r4
/* 8037B174 003780D4 90 87 01 2C */ stw r4, 0x12c(r7)
/* 8037B178 003780D8 80 87 01 2C */ lwz r4, 0x12c(r7)
/* 8037B17C 003780DC 54 84 02 3E */ clrlwi r4, r4, 8
/* 8037B180 003780E0 64 84 26 00 */ oris r4, r4, 0x2600
/* 8037B184 003780E4 90 87 01 2C */ stw r4, 0x12c(r7)
/* 8037B188 003780E8 98 03 80 00 */ stb r0, 0xCC008000@l(r3)
/* 8037B18C 003780EC 80 07 01 2C */ lwz r0, 0x12c(r7)
/* 8037B190 003780F0 90 03 80 00 */ stw r0, 0xCC008000@l(r3)
lbl_8037B194:
/* 8037B194 003780F4 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 8037B198 003780F8 38 00 00 00 */ li r0, 0
/* 8037B19C 003780FC B0 03 00 02 */ sth r0, 2(r3)
/* 8037B1A0 00378100 4E 80 00 20 */ blr
.global GXSetIndTexOrder
GXSetIndTexOrder:
/* 8037B1A4 00378104 2C 03 00 02 */ cmpwi r3, 2
/* 8037B1A8 00378108 41 82 00 84 */ beq lbl_8037B22C
/* 8037B1AC 0037810C 40 80 00 14 */ bge lbl_8037B1C0
/* 8037B1B0 00378110 2C 03 00 00 */ cmpwi r3, 0
/* 8037B1B4 00378114 41 82 00 18 */ beq lbl_8037B1CC
/* 8037B1B8 00378118 40 80 00 44 */ bge lbl_8037B1FC
/* 8037B1BC 0037811C 48 00 00 CC */ b lbl_8037B288
lbl_8037B1C0:
/* 8037B1C0 00378120 2C 03 00 04 */ cmpwi r3, 4
/* 8037B1C4 00378124 40 80 00 C4 */ bge lbl_8037B288
/* 8037B1C8 00378128 48 00 00 94 */ b lbl_8037B25C
lbl_8037B1CC:
/* 8037B1CC 0037812C 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 8037B1D0 00378130 54 80 18 38 */ slwi r0, r4, 3
/* 8037B1D4 00378134 38 83 01 20 */ addi r4, r3, 0x120
/* 8037B1D8 00378138 80 63 01 20 */ lwz r3, 0x120(r3)
/* 8037B1DC 0037813C 54 63 00 38 */ rlwinm r3, r3, 0, 0, 0x1c
/* 8037B1E0 00378140 7C 63 2B 78 */ or r3, r3, r5
/* 8037B1E4 00378144 90 64 00 00 */ stw r3, 0(r4)
/* 8037B1E8 00378148 80 64 00 00 */ lwz r3, 0(r4)
/* 8037B1EC 0037814C 54 63 07 72 */ rlwinm r3, r3, 0, 0x1d, 0x19
/* 8037B1F0 00378150 7C 60 03 78 */ or r0, r3, r0
/* 8037B1F4 00378154 90 04 00 00 */ stw r0, 0(r4)
/* 8037B1F8 00378158 48 00 00 90 */ b lbl_8037B288
lbl_8037B1FC:
/* 8037B1FC 0037815C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2)
/* 8037B200 00378160 54 80 48 2C */ slwi r0, r4, 9
/* 8037B204 00378164 54 A3 30 32 */ slwi r3, r5, 6
/* 8037B208 00378168 80 86 01 20 */ lwz r4, 0x120(r6)
/* 8037B20C 0037816C 54 84 06 AC */ rlwinm r4, r4, 0, 0x1a, 0x16
/* 8037B210 00378170 7C 83 1B 78 */ or r3, r4, r3
/* 8037B214 00378174 90 66 01 20 */ stw r3, 0x120(r6)
/* 8037B218 00378178 80 66 01 20 */ lwz r3, 0x120(r6)
/* 8037B21C 0037817C 54 63 05 E6 */ rlwinm r3, r3, 0, 0x17, 0x13
/* 8037B220 00378180 7C 60 03 78 */ or r0, r3, r0
/* 8037B224 00378184 90 06 01 20 */ stw r0, 0x120(r6)
/* 8037B228 00378188 48 00 00 60 */ b lbl_8037B288
lbl_8037B22C:
/* 8037B22C 0037818C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2)
/* 8037B230 00378190 54 80 78 20 */ slwi r0, r4, 0xf
/* 8037B234 00378194 54 A3 60 26 */ slwi r3, r5, 0xc
/* 8037B238 00378198 80 86 01 20 */ lwz r4, 0x120(r6)
/* 8037B23C 0037819C 54 84 05 20 */ rlwinm r4, r4, 0, 0x14, 0x10
/* 8037B240 003781A0 7C 83 1B 78 */ or r3, r4, r3
/* 8037B244 003781A4 90 66 01 20 */ stw r3, 0x120(r6)
/* 8037B248 003781A8 80 66 01 20 */ lwz r3, 0x120(r6)
/* 8037B24C 003781AC 54 63 04 5A */ rlwinm r3, r3, 0, 0x11, 0xd
/* 8037B250 003781B0 7C 60 03 78 */ or r0, r3, r0
/* 8037B254 003781B4 90 06 01 20 */ stw r0, 0x120(r6)
/* 8037B258 003781B8 48 00 00 30 */ b lbl_8037B288
lbl_8037B25C:
/* 8037B25C 003781BC 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2)
/* 8037B260 003781C0 54 80 A8 14 */ slwi r0, r4, 0x15
/* 8037B264 003781C4 54 A3 90 1A */ slwi r3, r5, 0x12
/* 8037B268 003781C8 80 86 01 20 */ lwz r4, 0x120(r6)
/* 8037B26C 003781CC 54 84 03 94 */ rlwinm r4, r4, 0, 0xe, 0xa
/* 8037B270 003781D0 7C 83 1B 78 */ or r3, r4, r3
/* 8037B274 003781D4 90 66 01 20 */ stw r3, 0x120(r6)
/* 8037B278 003781D8 80 66 01 20 */ lwz r3, 0x120(r6)
/* 8037B27C 003781DC 54 63 02 CE */ rlwinm r3, r3, 0, 0xb, 7
/* 8037B280 003781E0 7C 60 03 78 */ or r0, r3, r0
/* 8037B284 003781E4 90 06 01 20 */ stw r0, 0x120(r6)
lbl_8037B288:
/* 8037B288 003781E8 38 00 00 61 */ li r0, 0x61
/* 8037B28C 003781EC 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 8037B290 003781F0 3C A0 CC 01 */ lis r5, 0xCC008000@ha
/* 8037B294 003781F4 98 05 80 00 */ stb r0, 0xCC008000@l(r5)
/* 8037B298 003781F8 38 00 00 00 */ li r0, 0
/* 8037B29C 003781FC 80 64 01 20 */ lwz r3, 0x120(r4)
/* 8037B2A0 00378200 90 65 80 00 */ stw r3, 0xCC008000@l(r5)
/* 8037B2A4 00378204 80 64 04 F4 */ lwz r3, 0x4f4(r4)
/* 8037B2A8 00378208 60 63 00 03 */ ori r3, r3, 3
/* 8037B2AC 0037820C 90 64 04 F4 */ stw r3, 0x4f4(r4)
/* 8037B2B0 00378210 B0 04 00 02 */ sth r0, 2(r4)
/* 8037B2B4 00378214 4E 80 00 20 */ blr
.global GXSetNumIndStages
GXSetNumIndStages:
/* 8037B2B8 00378218 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 8037B2BC 0037821C 54 60 82 1E */ rlwinm r0, r3, 0x10, 8, 0xf
/* 8037B2C0 00378220 80 64 02 04 */ lwz r3, 0x204(r4)
/* 8037B2C4 00378224 54 63 04 18 */ rlwinm r3, r3, 0, 0x10, 0xc
/* 8037B2C8 00378228 7C 60 03 78 */ or r0, r3, r0
/* 8037B2CC 0037822C 90 04 02 04 */ stw r0, 0x204(r4)
/* 8037B2D0 00378230 80 04 04 F4 */ lwz r0, 0x4f4(r4)
/* 8037B2D4 00378234 60 00 00 06 */ ori r0, r0, 6
/* 8037B2D8 00378238 90 04 04 F4 */ stw r0, 0x4f4(r4)
/* 8037B2DC 0037823C 4E 80 00 20 */ blr
.global GXSetTevDirect
GXSetTevDirect:
/* 8037B2E0 00378240 7C 08 02 A6 */ mflr r0
/* 8037B2E4 00378244 38 80 00 00 */ li r4, 0
/* 8037B2E8 00378248 90 01 00 04 */ stw r0, 4(r1)
/* 8037B2EC 0037824C 38 00 00 00 */ li r0, 0
/* 8037B2F0 00378250 38 A0 00 00 */ li r5, 0
/* 8037B2F4 00378254 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 8037B2F8 00378258 38 C0 00 00 */ li r6, 0
/* 8037B2FC 0037825C 38 E0 00 00 */ li r7, 0
/* 8037B300 00378260 90 01 00 08 */ stw r0, 8(r1)
/* 8037B304 00378264 39 00 00 00 */ li r8, 0
/* 8037B308 00378268 39 20 00 00 */ li r9, 0
/* 8037B30C 0037826C 90 01 00 0C */ stw r0, 0xc(r1)
/* 8037B310 00378270 39 40 00 00 */ li r10, 0
/* 8037B314 00378274 4B FF FB 19 */ bl GXSetTevIndirect
/* 8037B318 00378278 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 8037B31C 0037827C 38 21 00 18 */ addi r1, r1, 0x18
/* 8037B320 00378280 7C 08 03 A6 */ mtlr r0
/* 8037B324 00378284 4E 80 00 20 */ blr
.global __GXUpdateBPMask
__GXUpdateBPMask:
/* 8037B328 00378288 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2)
/* 8037B32C 0037828C 38 C0 00 00 */ li r6, 0
/* 8037B330 00378290 38 80 00 00 */ li r4, 0
/* 8037B334 00378294 80 03 02 04 */ lwz r0, 0x204(r3)
/* 8037B338 00378298 54 00 87 7E */ rlwinm r0, r0, 0x10, 0x1d, 0x1f
/* 8037B33C 0037829C 28 00 00 00 */ cmplwi r0, 0
/* 8037B340 003782A0 7C 09 03 A6 */ mtctr r0
/* 8037B344 003782A4 40 81 00 6C */ ble lbl_8037B3B0
lbl_8037B348:
/* 8037B348 003782A8 2C 04 00 02 */ cmpwi r4, 2
/* 8037B34C 003782AC 41 82 00 3C */ beq lbl_8037B388
/* 8037B350 003782B0 40 80 00 14 */ bge lbl_8037B364
/* 8037B354 003782B4 2C 04 00 00 */ cmpwi r4, 0
/* 8037B358 003782B8 41 82 00 18 */ beq lbl_8037B370
/* 8037B35C 003782BC 40 80 00 20 */ bge lbl_8037B37C
/* 8037B360 003782C0 48 00 00 3C */ b lbl_8037B39C
lbl_8037B364:
/* 8037B364 003782C4 2C 04 00 04 */ cmpwi r4, 4
/* 8037B368 003782C8 40 80 00 34 */ bge lbl_8037B39C
/* 8037B36C 003782CC 48 00 00 28 */ b lbl_8037B394
lbl_8037B370:
/* 8037B370 003782D0 80 03 01 20 */ lwz r0, 0x120(r3)
/* 8037B374 003782D4 54 05 07 7E */ clrlwi r5, r0, 0x1d
/* 8037B378 003782D8 48 00 00 24 */ b lbl_8037B39C
lbl_8037B37C:
/* 8037B37C 003782DC 80 03 01 20 */ lwz r0, 0x120(r3)
/* 8037B380 003782E0 54 05 D7 7E */ rlwinm r5, r0, 0x1a, 0x1d, 0x1f
/* 8037B384 003782E4 48 00 00 18 */ b lbl_8037B39C
lbl_8037B388:
/* 8037B388 003782E8 80 03 01 20 */ lwz r0, 0x120(r3)
/* 8037B38C 003782EC 54 05 A7 7E */ rlwinm r5, r0, 0x14, 0x1d, 0x1f
/* 8037B390 003782F0 48 00 00 0C */ b lbl_8037B39C
lbl_8037B394:
/* 8037B394 003782F4 80 03 01 20 */ lwz r0, 0x120(r3)
/* 8037B398 003782F8 54 05 77 7E */ rlwinm r5, r0, 0xe, 0x1d, 0x1f
lbl_8037B39C:
/* 8037B39C 003782FC 38 00 00 01 */ li r0, 1
/* 8037B3A0 00378300 7C 00 28 30 */ slw r0, r0, r5
/* 8037B3A4 00378304 7C C6 03 78 */ or r6, r6, r0
/* 8037B3A8 00378308 38 84 00 01 */ addi r4, r4, 1
/* 8037B3AC 0037830C 42 00 FF 9C */ bdnz lbl_8037B348
lbl_8037B3B0:
/* 8037B3B0 00378310 38 83 01 24 */ addi r4, r3, 0x124
/* 8037B3B4 00378314 80 63 01 24 */ lwz r3, 0x124(r3)
/* 8037B3B8 00378318 54 60 06 3E */ clrlwi r0, r3, 0x18
/* 8037B3BC 0037831C 7C 00 30 40 */ cmplw r0, r6
/* 8037B3C0 00378320 4D 82 00 20 */ beqlr
/* 8037B3C4 00378324 54 60 00 2E */ rlwinm r0, r3, 0, 0, 0x17
/* 8037B3C8 00378328 7C 00 33 78 */ or r0, r0, r6
/* 8037B3CC 0037832C 90 04 00 00 */ stw r0, 0(r4)
/* 8037B3D0 00378330 38 00 00 61 */ li r0, 0x61
/* 8037B3D4 00378334 3C A0 CC 01 */ lis r5, 0xCC008000@ha
/* 8037B3D8 00378338 98 05 80 00 */ stb r0, 0xCC008000@l(r5)
/* 8037B3DC 0037833C 38 00 00 00 */ li r0, 0
/* 8037B3E0 00378340 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 8037B3E4 00378344 80 64 01 24 */ lwz r3, 0x124(r4)
/* 8037B3E8 00378348 90 65 80 00 */ stw r3, 0xCC008000@l(r5)
/* 8037B3EC 0037834C B0 04 00 02 */ sth r0, 2(r4)
/* 8037B3F0 00378350 4E 80 00 20 */ blr
.global __GXFlushTextureState
__GXFlushTextureState:
/* 8037B3F4 00378354 38 00 00 61 */ li r0, 0x61
/* 8037B3F8 00378358 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2)
/* 8037B3FC 0037835C 3C A0 CC 01 */ lis r5, 0xCC008000@ha
/* 8037B400 00378360 98 05 80 00 */ stb r0, 0xCC008000@l(r5)
/* 8037B404 00378364 38 00 00 00 */ li r0, 0
/* 8037B408 00378368 80 64 01 24 */ lwz r3, 0x124(r4)
/* 8037B40C 0037836C 90 65 80 00 */ stw r3, 0xCC008000@l(r5)
/* 8037B410 00378370 B0 04 00 02 */ sth r0, 2(r4)
/* 8037B414 00378374 4E 80 00 20 */ blr