.include "macros.inc"
.section .text, "ax"
.global __GXXfVtxSpecs
__GXXfVtxSpecs:
lwz r5, gx@sda21(r13)
lwz r4, 0x14(r5)
rlwinm. r0, r4, 0x13, 0x1e, 0x1f
beq lbl_800A67A8
li r3, 1
b lbl_800A67AC
lbl_800A67A8:
li r3, 0
lbl_800A67AC:
rlwinm. r0, r4, 0x11, 0x1e, 0x1f
beq lbl_800A67BC
li r4, 1
b lbl_800A67C0
lbl_800A67BC:
li r4, 0
lbl_800A67C0:
lbz r0, 0x41d(r5)
add r7, r3, r4
cmplwi r0, 0
beq lbl_800A67D8
li r4, 2
b lbl_800A67F0
lbl_800A67D8:
lbz r0, 0x41c(r5)
cmplwi r0, 0
beq lbl_800A67EC
li r4, 1
b lbl_800A67F0
lbl_800A67EC:
li r4, 0
lbl_800A67F0:
lwz r6, 0x18(r5)
clrlwi. r0, r6, 0x1e
beq lbl_800A6804
li r3, 1
b lbl_800A6808
lbl_800A6804:
li r3, 0
lbl_800A6808:
rlwinm. r0, r6, 0x1e, 0x1e, 0x1f
beq lbl_800A6818
li r5, 1
b lbl_800A681C
lbl_800A6818:
li r5, 0
lbl_800A681C:
rlwinm. r0, r6, 0x1c, 0x1e, 0x1f
add r8, r3, r5
beq lbl_800A6830
li r3, 1
b lbl_800A6834
lbl_800A6830:
li r3, 0
lbl_800A6834:
rlwinm. r0, r6, 0x1a, 0x1e, 0x1f
add r8, r8, r3
beq lbl_800A6848
li r3, 1
b lbl_800A684C
lbl_800A6848:
li r3, 0
lbl_800A684C:
rlwinm. r0, r6, 0x18, 0x1e, 0x1f
add r8, r8, r3
beq lbl_800A6860
li r3, 1
b lbl_800A6864
lbl_800A6860:
li r3, 0
lbl_800A6864:
rlwinm. r0, r6, 0x16, 0x1e, 0x1f
add r8, r8, r3
beq lbl_800A6878
li r3, 1
b lbl_800A687C
lbl_800A6878:
li r3, 0
lbl_800A687C:
rlwinm. r0, r6, 0x14, 0x1e, 0x1f
add r8, r8, r3
beq lbl_800A6890
li r3, 1
b lbl_800A6894
lbl_800A6890:
li r3, 0
lbl_800A6894:
rlwinm. r0, r6, 0x12, 0x1e, 0x1f
add r8, r8, r3
beq lbl_800A68A8
li r6, 1
b lbl_800A68AC
lbl_800A68A8:
li r6, 0
lbl_800A68AC:
li r0, 0x10
lwz r3, gx@sda21(r13)
lis r5, 0xCC008000@ha
add r8, r8, r6
stb r0, 0xCC008000@l(r5)
slwi r0, r4, 2
li r4, 0x1008
stw r4, -0x8000(r5)
slwi r4, r8, 4
or r0, r7, r0
or r0, r4, r0
stw r0, -0x8000(r5)
li r0, 1
sth r0, 2(r3)
blr
.global GXSetVtxDesc
GXSetVtxDesc:
cmplwi r3, 0x19
bgt lbl_800A6BEC
lis r5, "@128"@ha
addi r5, r5, "@128"@l
slwi r0, r3, 2
lwzx r0, r5, r0
mtctr r0
bctr
lbl_800A6908:
lwz r3, gx@sda21(r13)
lwzu r0, 0x14(r3)
rlwinm r0, r0, 0, 0, 0x1e
or r0, r0, r4
stw r0, 0(r3)
b lbl_800A6BEC
lbl_800A6920:
lwz r3, gx@sda21(r13)
slwi r0, r4, 1
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1f, 0x1d
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6940:
lwz r3, gx@sda21(r13)
slwi r0, r4, 2
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1e, 0x1c
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6960:
lwz r3, gx@sda21(r13)
slwi r0, r4, 3
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1d, 0x1b
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6980:
lwz r3, gx@sda21(r13)
slwi r0, r4, 4
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1c, 0x1a
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A69A0:
lwz r3, gx@sda21(r13)
slwi r0, r4, 5
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1b, 0x19
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A69C0:
lwz r3, gx@sda21(r13)
slwi r0, r4, 6
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x1a, 0x18
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A69E0:
lwz r3, gx@sda21(r13)
slwi r0, r4, 7
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x19, 0x17
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6A00:
lwz r3, gx@sda21(r13)
slwi r0, r4, 8
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x18, 0x16
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6A20:
lwz r3, gx@sda21(r13)
slwi r0, r4, 9
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x17, 0x14
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6A40:
cmpwi r4, 0
beq lbl_800A6A6C
lwz r3, gx@sda21(r13)
li r5, 1
li r0, 0
stb r5, 0x41c(r3)
lwz r3, gx@sda21(r13)
stb r0, 0x41d(r3)
lwz r3, gx@sda21(r13)
stw r4, 0x418(r3)
b lbl_800A6BEC
lbl_800A6A6C:
lwz r3, gx@sda21(r13)
li r0, 0
stb r0, 0x41c(r3)
b lbl_800A6BEC
lbl_800A6A7C:
cmpwi r4, 0
beq lbl_800A6AA8
lwz r3, gx@sda21(r13)
li r5, 1
li r0, 0
stb r5, 0x41d(r3)
lwz r3, gx@sda21(r13)
stb r0, 0x41c(r3)
lwz r3, gx@sda21(r13)
stw r4, 0x418(r3)
b lbl_800A6BEC
lbl_800A6AA8:
lwz r3, gx@sda21(r13)
li r0, 0
stb r0, 0x41d(r3)
b lbl_800A6BEC
lbl_800A6AB8:
lwz r3, gx@sda21(r13)
slwi r0, r4, 0xd
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x13, 0x10
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6AD8:
lwz r3, gx@sda21(r13)
slwi r0, r4, 0xf
addi r4, r3, 0x14
lwz r3, 0x14(r3)
rlwinm r3, r3, 0, 0x11, 0xe
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6AF8:
lwz r3, gx@sda21(r13)
lwzu r0, 0x18(r3)
rlwinm r0, r0, 0, 0, 0x1d
or r0, r0, r4
stw r0, 0(r3)
b lbl_800A6BEC
lbl_800A6B10:
lwz r3, gx@sda21(r13)
slwi r0, r4, 2
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x1e, 0x1b
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6B30:
lwz r3, gx@sda21(r13)
slwi r0, r4, 4
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x1c, 0x19
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6B50:
lwz r3, gx@sda21(r13)
slwi r0, r4, 6
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x1a, 0x17
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6B70:
lwz r3, gx@sda21(r13)
slwi r0, r4, 8
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x18, 0x15
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6B90:
lwz r3, gx@sda21(r13)
slwi r0, r4, 0xa
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x16, 0x13
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6BB0:
lwz r3, gx@sda21(r13)
slwi r0, r4, 0xc
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x14, 0x11
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6BEC
lbl_800A6BD0:
lwz r3, gx@sda21(r13)
slwi r0, r4, 0xe
addi r4, r3, 0x18
lwz r3, 0x18(r3)
rlwinm r3, r3, 0, 0x12, 0xf
or r0, r3, r0
stw r0, 0(r4)
lbl_800A6BEC:
lwz r3, gx@sda21(r13)
lbz r0, 0x41c(r3)
cmplwi r0, 0
bne lbl_800A6C08
lbz r0, 0x41d(r3)
cmplwi r0, 0
beq lbl_800A6C28
lbl_800A6C08:
addi r4, r3, 0x14
lwz r0, 0x418(r3)
lwz r3, 0x14(r3)
slwi r0, r0, 0xb
rlwinm r3, r3, 0, 0x15, 0x12
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6C34
lbl_800A6C28:
lwzu r0, 0x14(r3)
rlwinm r0, r0, 0, 0x15, 0x12
stw r0, 0(r3)
lbl_800A6C34:
lwz r3, gx@sda21(r13)
lwz r0, 0x4f4(r3)
ori r0, r0, 8
stw r0, 0x4f4(r3)
blr
.global GXSetVtxDescv
GXSetVtxDescv:
lis r4, "@189"@ha
addi r4, r4, "@189"@l
b lbl_800A6F64
lbl_800A6C54:
lwz r5, 0(r3)
lwz r0, 4(r3)
cmplwi r5, 0x19
bgt lbl_800A6F60
slwi r5, r5, 2
lwzx r5, r4, r5
mtctr r5
bctr
lbl_800A6C74:
lwz r5, gx@sda21(r13)
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0, 0x1e
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6C90:
lwz r5, gx@sda21(r13)
slwi r0, r0, 1
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1f, 0x1d
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6CB0:
lwz r5, gx@sda21(r13)
slwi r0, r0, 2
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1e, 0x1c
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6CD0:
lwz r5, gx@sda21(r13)
slwi r0, r0, 3
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1d, 0x1b
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6CF0:
lwz r5, gx@sda21(r13)
slwi r0, r0, 4
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1c, 0x1a
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6D10:
lwz r5, gx@sda21(r13)
slwi r0, r0, 5
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1b, 0x19
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6D30:
lwz r5, gx@sda21(r13)
slwi r0, r0, 6
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x1a, 0x18
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6D50:
lwz r5, gx@sda21(r13)
slwi r0, r0, 7
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x19, 0x17
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6D70:
lwz r5, gx@sda21(r13)
slwi r0, r0, 8
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x18, 0x16
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6D90:
lwz r5, gx@sda21(r13)
slwi r0, r0, 9
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x17, 0x14
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6DB0:
cmpwi r0, 0
beq lbl_800A6DDC
lwz r5, gx@sda21(r13)
li r7, 1
li r6, 0
stb r7, 0x41c(r5)
lwz r5, gx@sda21(r13)
stb r6, 0x41d(r5)
lwz r5, gx@sda21(r13)
stw r0, 0x418(r5)
b lbl_800A6F60
lbl_800A6DDC:
lwz r5, gx@sda21(r13)
li r0, 0
stb r0, 0x41c(r5)
b lbl_800A6F60
lbl_800A6DEC:
cmpwi r0, 0
beq lbl_800A6E18
lwz r5, gx@sda21(r13)
li r7, 1
li r6, 0
stb r7, 0x41d(r5)
lwz r5, gx@sda21(r13)
stb r6, 0x41c(r5)
lwz r5, gx@sda21(r13)
stw r0, 0x418(r5)
b lbl_800A6F60
lbl_800A6E18:
lwz r5, gx@sda21(r13)
li r0, 0
stb r0, 0x41d(r5)
b lbl_800A6F60
lbl_800A6E28:
lwz r5, gx@sda21(r13)
slwi r0, r0, 0xd
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x13, 0x10
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6E48:
lwz r5, gx@sda21(r13)
slwi r0, r0, 0xf
addi r6, r5, 0x14
lwz r5, 0x14(r5)
rlwinm r5, r5, 0, 0x11, 0xe
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6E68:
lwz r5, gx@sda21(r13)
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0, 0x1d
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6E84:
lwz r5, gx@sda21(r13)
slwi r0, r0, 2
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x1e, 0x1b
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6EA4:
lwz r5, gx@sda21(r13)
slwi r0, r0, 4
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x1c, 0x19
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6EC4:
lwz r5, gx@sda21(r13)
slwi r0, r0, 6
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x1a, 0x17
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6EE4:
lwz r5, gx@sda21(r13)
slwi r0, r0, 8
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x18, 0x15
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6F04:
lwz r5, gx@sda21(r13)
slwi r0, r0, 0xa
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x16, 0x13
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6F24:
lwz r5, gx@sda21(r13)
slwi r0, r0, 0xc
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x14, 0x11
or r0, r5, r0
stw r0, 0(r6)
b lbl_800A6F60
lbl_800A6F44:
lwz r5, gx@sda21(r13)
slwi r0, r0, 0xe
addi r6, r5, 0x18
lwz r5, 0x18(r5)
rlwinm r5, r5, 0, 0x12, 0xf
or r0, r5, r0
stw r0, 0(r6)
lbl_800A6F60:
addi r3, r3, 8
lbl_800A6F64:
lwz r0, 0(r3)
cmpwi r0, 0xff
bne lbl_800A6C54
lwz r3, gx@sda21(r13)
lbz r0, 0x41c(r3)
cmplwi r0, 0
bne lbl_800A6F8C
lbz r0, 0x41d(r3)
cmplwi r0, 0
beq lbl_800A6FAC
lbl_800A6F8C:
addi r4, r3, 0x14
lwz r0, 0x418(r3)
lwz r3, 0x14(r3)
slwi r0, r0, 0xb
rlwinm r3, r3, 0, 0x15, 0x12
or r0, r3, r0
stw r0, 0(r4)
b lbl_800A6FB8
lbl_800A6FAC:
lwzu r0, 0x14(r3)
rlwinm r0, r0, 0, 0x15, 0x12
stw r0, 0(r3)
lbl_800A6FB8:
lwz r3, gx@sda21(r13)
lwz r0, 0x4f4(r3)
ori r0, r0, 8
stw r0, 0x4f4(r3)
blr
.global __GXSetVCD
__GXSetVCD:
mflr r0
li r6, 8
stw r0, 4(r1)
lis r5, 0xCC008000@ha
li r3, 0x50
stwu r1, -8(r1)
li r0, 0x60
stb r6, 0xCC008000@l(r5)
lwz r4, gx@sda21(r13)
stb r3, -0x8000(r5)
lwz r3, 0x14(r4)
stw r3, -0x8000(r5)
stb r6, -0x8000(r5)
stb r0, -0x8000(r5)
lwz r0, 0x18(r4)
stw r0, -0x8000(r5)
bl __GXXfVtxSpecs
lwz r0, 0xc(r1)
addi r1, r1, 8
mtlr r0
blr
.global __GXCalculateVLim
__GXCalculateVLim:
lwz r3, gx@sda21(r13)
lhz r0, 4(r3)
cmplwi r0, 0
beqlr
lwz r9, 0x14(r3)
addi r5, r13, tbl3$217@sda21
lwz r8, 0x1c(r3)
clrlwi r0, r9, 0x1f
lwz r4, 0x18(r3)
rlwinm r6, r9, 0x1f, 0x1f, 0x1f
add r0, r0, r6
rlwinm r6, r9, 0x1e, 0x1f, 0x1f
add r0, r0, r6
rlwinm r7, r9, 0x1d, 0x1f, 0x1f
rlwinm r6, r9, 0x17, 0x1e, 0x1f
lbzx r5, r5, r6
rlwinm r8, r8, 0x17, 0x1f, 0x1f
add r0, r0, r7
rlwinm r6, r9, 0x1c, 0x1f, 0x1f
add r0, r0, r6
rlwinm r6, r9, 0x1b, 0x1f, 0x1f
add r0, r0, r6
rlwinm r6, r9, 0x1a, 0x1f, 0x1f
add r0, r0, r6
rlwinm r6, r9, 0x19, 0x1f, 0x1f
add r0, r0, r6
rlwinm r6, r9, 0x18, 0x1f, 0x1f
add r0, r0, r6
cmpwi r8, 1
add r0, r0, r5
bne lbl_800A70A4
li r8, 3
b lbl_800A70A8
lbl_800A70A4:
li r8, 1
lbl_800A70A8:
rlwinm r6, r9, 0x15, 0x1e, 0x1f
addi r5, r13, tbl3$217@sda21
lbzx r6, r5, r6
rlwinm r5, r9, 0x13, 0x1e, 0x1f
addi r7, r13, tbl1$215@sda21
mullw r8, r6, r8
lbzx r6, r7, r5
add r0, r0, r8
rlwinm r5, r9, 0x11, 0x1e, 0x1f
lbzx r9, r7, r5
add r0, r0, r6
clrlwi r6, r4, 0x1e
addi r8, r13, tbl2$216@sda21
rlwinm r5, r4, 0x1e, 0x1e, 0x1f
lbzx r7, r8, r6
add r0, r0, r9
lbzx r6, r8, r5
add r0, r0, r7
rlwinm r5, r4, 0x1c, 0x1e, 0x1f
lbzx r7, r8, r5
add r0, r0, r6
rlwinm r5, r4, 0x1a, 0x1e, 0x1f
lbzx r6, r8, r5
add r0, r0, r7
rlwinm r5, r4, 0x18, 0x1e, 0x1f
lbzx r7, r8, r5
add r0, r0, r6
rlwinm r5, r4, 0x16, 0x1e, 0x1f
lbzx r6, r8, r5
rlwinm r5, r4, 0x14, 0x1e, 0x1f
add r0, r0, r7
lbzx r5, r8, r5
rlwinm r4, r4, 0x12, 0x1e, 0x1f
add r0, r0, r6
lbzx r4, r8, r4
add r0, r0, r5
add r0, r0, r4
sth r0, 6(r3)
blr
.global GXGetVtxDesc
GXGetVtxDesc:
cmplwi r3, 0x19
bgt lbl_800A72EC
lis r5, "@256"@ha
addi r5, r5, "@256"@l
slwi r0, r3, 2
lwzx r0, r5, r0
mtctr r0
bctr
lbl_800A7164:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
clrlwi r0, r0, 0x1f
b lbl_800A72F0
lbl_800A7174:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1f, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A7184:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1e, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A7194:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1d, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71A4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1c, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71B4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1b, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71C4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x1a, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71D4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x19, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71E4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x18, 0x1f, 0x1f
b lbl_800A72F0
lbl_800A71F4:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x17, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A7204:
lwz r3, gx@sda21(r13)
lbz r0, 0x41c(r3)
cmplwi r0, 0
beq lbl_800A7220
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x15, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A7220:
li r0, 0
b lbl_800A72F0
lbl_800A7228:
lwz r3, gx@sda21(r13)
lbz r0, 0x41d(r3)
cmplwi r0, 0
beq lbl_800A7244
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x15, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A7244:
li r0, 0
b lbl_800A72F0
lbl_800A724C:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x13, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A725C:
lwz r3, gx@sda21(r13)
lwz r0, 0x14(r3)
rlwinm r0, r0, 0x11, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A726C:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
clrlwi r0, r0, 0x1e
b lbl_800A72F0
lbl_800A727C:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x1e, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A728C:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x1c, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A729C:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x1a, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A72AC:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x18, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A72BC:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x16, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A72CC:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x14, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A72DC:
lwz r3, gx@sda21(r13)
lwz r0, 0x18(r3)
rlwinm r0, r0, 0x12, 0x1e, 0x1f
b lbl_800A72F0
lbl_800A72EC:
li r0, 0
lbl_800A72F0:
stw r0, 0(r4)
blr
.global GXGetVtxDescv
GXGetVtxDescv:
mflr r0
stw r0, 4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1c(r1)
li r31, 0
stw r30, 0x18(r1)
li r30, 0
stw r29, 0x14(r1)
addi r29, r3, 0
lbl_800A731C:
add r4, r29, r31
stw r30, 0(r4)
addi r3, r30, 0
addi r4, r4, 4
bl GXGetVtxDesc
addi r30, r30, 1
cmpwi r30, 0x1a
addi r31, r31, 8
blt lbl_800A731C
slwi r0, r30, 3
li r3, 0xff
stwx r3, r29, r0
lwz r0, 0x24(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
addi r1, r1, 0x20
mtlr r0
blr
.global GXClearVtxDesc
GXClearVtxDesc:
lwz r3, gx@sda21(r13)
li r4, 0
stw r4, 0x14(r3)
lwz r3, gx@sda21(r13)
lwzu r0, 0x14(r3)
rlwinm r0, r0, 0, 0x17, 0x14
ori r0, r0, 0x200
stw r0, 0(r3)
lwz r3, gx@sda21(r13)
stw r4, 0x18(r3)
lwz r3, gx@sda21(r13)
stb r4, 0x41c(r3)
lwz r3, gx@sda21(r13)
stb r4, 0x41d(r3)
lwz r3, gx@sda21(r13)
lwz r0, 0x4f4(r3)
ori r0, r0, 8
stw r0, 0x4f4(r3)
blr
.global GXSetVtxAttrFmt
GXSetVtxAttrFmt:
addi r0, r4, -9
lwz r8, gx@sda21(r13)
slwi r4, r3, 2
add r9, r8, r4
cmplwi r0, 0x10
addi r4, r9, 0x1c
addi r8, r9, 0x3c
addi r9, r9, 0x5c
bgt lbl_800A76DC
lis r10, "@302"@ha
addi r10, r10, "@302"@l
slwi r0, r0, 2
lwzx r0, r10, r0
mtctr r0
bctr
lbl_800A73F0:
lwz r0, 0(r4)
slwi r6, r6, 1
rlwinm r0, r0, 0, 0, 0x1e
or r0, r0, r5
stw r0, 0(r4)
rlwinm r0, r7, 4, 0x14, 0x1b
lwz r5, 0(r4)
rlwinm r5, r5, 0, 0x1f, 0x1b
or r5, r5, r6
stw r5, 0(r4)
lwz r5, 0(r4)
rlwinm r5, r5, 0, 0x1c, 0x16
or r0, r5, r0
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A742C:
lwz r7, 0(r4)
slwi r0, r6, 0xa
cmpwi r5, 2
rlwinm r6, r7, 0, 0x16, 0x12
or r0, r6, r0
stw r0, 0(r4)
bne lbl_800A746C
lwz r0, 0(r4)
rlwinm r0, r0, 0, 0x17, 0x15
ori r0, r0, 0x200
stw r0, 0(r4)
lwz r0, 0(r4)
clrlwi r0, r0, 1
oris r0, r0, 0x8000
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A746C:
lwz r6, 0(r4)
slwi r0, r5, 9
rlwinm r5, r6, 0, 0x17, 0x15
or r0, r5, r0
stw r0, 0(r4)
lwz r0, 0(r4)
clrlwi r0, r0, 1
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A7490:
lwz r7, 0(r4)
slwi r5, r5, 0xd
slwi r0, r6, 0xe
rlwinm r6, r7, 0, 0x13, 0x11
or r5, r6, r5
stw r5, 0(r4)
lwz r5, 0(r4)
rlwinm r5, r5, 0, 0x12, 0xe
or r0, r5, r0
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A74BC:
lwz r7, 0(r4)
slwi r5, r5, 0x11
slwi r0, r6, 0x12
rlwinm r6, r7, 0, 0xf, 0xd
or r5, r6, r5
stw r5, 0(r4)
lwz r5, 0(r4)
rlwinm r5, r5, 0, 0xe, 0xa
or r0, r5, r0
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A74E8:
lwz r8, 0(r4)
slwi r0, r5, 0x15
rlwinm r5, r8, 0, 0xb, 9
or r0, r5, r0
stw r0, 0(r4)
slwi r5, r6, 0x16
slwi r0, r7, 0x19
lwz r6, 0(r4)
rlwinm r6, r6, 0, 0xa, 6
or r5, r6, r5
stw r5, 0(r4)
lwz r5, 0(r4)
rlwinm r5, r5, 0, 7, 1
or r0, r5, r0
stw r0, 0(r4)
b lbl_800A76DC
lbl_800A7528:
lwz r0, 0(r8)
slwi r4, r6, 1
rlwinm r0, r0, 0, 0, 0x1e
or r0, r0, r5
stw r0, 0(r8)
rlwinm r0, r7, 4, 0x14, 0x1b
lwz r5, 0(r8)
rlwinm r5, r5, 0, 0x1f, 0x1b
or r4, r5, r4
stw r4, 0(r8)
lwz r4, 0(r8)
rlwinm r4, r4, 0, 0x1c, 0x16
or r0, r4, r0
stw r0, 0(r8)
b lbl_800A76DC
lbl_800A7564:
lwz r4, 0(r8)
slwi r0, r5, 9
rlwinm r4, r4, 0, 0x17, 0x15
or r0, r4, r0
stw r0, 0(r8)
slwi r4, r6, 0xa
rlwinm r0, r7, 0xd, 0xb, 0x12
lwz r5, 0(r8)
rlwinm r5, r5, 0, 0x16, 0x12
or r4, r5, r4
stw r4, 0(r8)
lwz r4, 0(r8)
rlwinm r4, r4, 0, 0x13, 0xd
or r0, r4, r0
stw r0, 0(r8)
b lbl_800A76DC
lbl_800A75A4:
lwz r4, 0(r8)
slwi r0, r5, 0x12
rlwinm r4, r4, 0, 0xe, 0xc
or r0, r4, r0
stw r0, 0(r8)
slwi r4, r6, 0x13
rlwinm r0, r7, 0x16, 2, 9
lwz r5, 0(r8)
rlwinm r5, r5, 0, 0xd, 9
or r4, r5, r4
stw r4, 0(r8)
lwz r4, 0(r8)
rlwinm r4, r4, 0, 0xa, 4
or r0, r4, r0
stw r0, 0(r8)
b lbl_800A76DC
lbl_800A75E4:
lwz r10, 0(r8)
slwi r0, r5, 0x1b
slwi r4, r6, 0x1c
rlwinm r5, r10, 0, 5, 3
or r0, r5, r0
stw r0, 0(r8)
clrlwi r0, r7, 0x18
lwz r5, 0(r8)
rlwinm r5, r5, 0, 4, 0
or r4, r5, r4
stw r4, 0(r8)
lwz r4, 0(r9)
rlwinm r4, r4, 0, 0, 0x1a
or r0, r4, r0
stw r0, 0(r9)
b lbl_800A76DC
lbl_800A7624:
lwz r4, 0(r9)
slwi r0, r5, 5
rlwinm r4, r4, 0, 0x1b, 0x19
or r0, r4, r0
stw r0, 0(r9)
slwi r4, r6, 6
rlwinm r0, r7, 9, 0xf, 0x16
lwz r5, 0(r9)
rlwinm r5, r5, 0, 0x1a, 0x16
or r4, r5, r4
stw r4, 0(r9)
lwz r4, 0(r9)
rlwinm r4, r4, 0, 0x17, 0x11
or r0, r4, r0
stw r0, 0(r9)
b lbl_800A76DC
lbl_800A7664:
lwz r4, 0(r9)
slwi r0, r5, 0xe
rlwinm r4, r4, 0, 0x12, 0x10
or r0, r4, r0
stw r0, 0(r9)
slwi r4, r6, 0xf
rlwinm r0, r7, 0x12, 6, 0xd
lwz r5, 0(r9)
rlwinm r5, r5, 0, 0x11, 0xd
or r4, r5, r4
stw r4, 0(r9)
lwz r4, 0(r9)
rlwinm r4, r4, 0, 0xe, 8
or r0, r4, r0
stw r0, 0(r9)
b lbl_800A76DC
lbl_800A76A4:
lwz r4, 0(r9)
slwi r0, r5, 0x17
rlwinm r4, r4, 0, 9, 7
or r0, r4, r0
stw r0, 0(r9)
slwi r0, r6, 0x18
lwz r4, 0(r9)
rlwinm r4, r4, 0, 8, 4
or r0, r4, r0
stw r0, 0(r9)
lwz r0, 0(r9)
clrlwi r0, r0, 5
rlwimi r0, r7, 0x1b, 0, 4
stw r0, 0(r9)
lbl_800A76DC:
lwz r5, gx@sda21(r13)
clrlwi r0, r3, 0x18
li r3, 1
lwz r4, 0x4f4(r5)
slw r0, r3, r0
clrlwi r0, r0, 0x18
ori r3, r4, 0x10
stw r3, 0x4f4(r5)
lwz r4, gx@sda21(r13)
lbz r3, 0x4f2(r4)
or r0, r3, r0
stb r0, 0x4f2(r4)
blr
.global GXSetVtxAttrFmtv
GXSetVtxAttrFmtv:
lwz r6, gx@sda21(r13)
slwi r0, r3, 2
lis r5, "@329"@ha
add r6, r6, r0
addi r8, r6, 0x1c
addi r9, r6, 0x3c
addi r10, r6, 0x5c
addi r5, r5, "@329"@l
b lbl_800A7A4C
lbl_800A7734:
lwz r6, 0(r4)
lbz r7, 0xc(r4)
addi r11, r6, -9
lwz r6, 8(r4)
cmplwi r11, 0x10
lwz r0, 4(r4)
bgt lbl_800A7A48
slwi r11, r11, 2
lwzx r11, r5, r11
mtctr r11
bctr
lbl_800A7760:
lwz r12, 0(r8)
slwi r11, r6, 1
slwi r6, r7, 4
rlwinm r7, r12, 0, 0, 0x1e
or r0, r7, r0
stw r0, 0(r8)
lwz r0, 0(r8)
rlwinm r0, r0, 0, 0x1f, 0x1b
or r0, r0, r11
stw r0, 0(r8)
lwz r0, 0(r8)
rlwinm r0, r0, 0, 0x1c, 0x16
or r0, r0, r6
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A779C:
lwz r7, 0(r8)
slwi r6, r6, 0xa
cmpwi r0, 2
rlwinm r7, r7, 0, 0x16, 0x12
or r6, r7, r6
stw r6, 0(r8)
bne lbl_800A77DC
lwz r0, 0(r8)
rlwinm r0, r0, 0, 0x17, 0x15
ori r0, r0, 0x200
stw r0, 0(r8)
lwz r0, 0(r8)
clrlwi r0, r0, 1
oris r0, r0, 0x8000
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A77DC:
lwz r6, 0(r8)
slwi r0, r0, 9
rlwinm r6, r6, 0, 0x17, 0x15
or r0, r6, r0
stw r0, 0(r8)
lwz r0, 0(r8)
clrlwi r0, r0, 1
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A7800:
lwz r11, 0(r8)
slwi r7, r0, 0xd
slwi r0, r6, 0xe
rlwinm r6, r11, 0, 0x13, 0x11
or r6, r6, r7
stw r6, 0(r8)
lwz r6, 0(r8)
rlwinm r6, r6, 0, 0x12, 0xe
or r0, r6, r0
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A782C:
lwz r11, 0(r8)
slwi r7, r0, 0x11
slwi r0, r6, 0x12
rlwinm r6, r11, 0, 0xf, 0xd
or r6, r6, r7
stw r6, 0(r8)
lwz r6, 0(r8)
rlwinm r6, r6, 0, 0xe, 0xa
or r0, r6, r0
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A7858:
lwz r11, 0(r8)
slwi r0, r0, 0x15
slwi r6, r6, 0x16
rlwinm r11, r11, 0, 0xb, 9
or r0, r11, r0
stw r0, 0(r8)
slwi r0, r7, 0x19
lwz r7, 0(r8)
rlwinm r7, r7, 0, 0xa, 6
or r6, r7, r6
stw r6, 0(r8)
lwz r6, 0(r8)
rlwinm r6, r6, 0, 7, 1
or r0, r6, r0
stw r0, 0(r8)
b lbl_800A7A48
lbl_800A7898:
lwz r12, 0(r9)
slwi r11, r6, 1
slwi r6, r7, 4
rlwinm r7, r12, 0, 0, 0x1e
or r0, r7, r0
stw r0, 0(r9)
lwz r0, 0(r9)
rlwinm r0, r0, 0, 0x1f, 0x1b
or r0, r0, r11
stw r0, 0(r9)
lwz r0, 0(r9)
rlwinm r0, r0, 0, 0x1c, 0x16
or r0, r0, r6
stw r0, 0(r9)
b lbl_800A7A48
lbl_800A78D4:
lwz r11, 0(r9)
slwi r0, r0, 9
slwi r6, r6, 0xa
rlwinm r11, r11, 0, 0x17, 0x15
or r0, r11, r0
stw r0, 0(r9)
slwi r0, r7, 0xd
lwz r7, 0(r9)
rlwinm r7, r7, 0, 0x16, 0x12
or r6, r7, r6
stw r6, 0(r9)
lwz r6, 0(r9)
rlwinm r6, r6, 0, 0x13, 0xd
or r0, r6, r0
stw r0, 0(r9)
b lbl_800A7A48
lbl_800A7914:
lwz r11, 0(r9)
slwi r0, r0, 0x12
slwi r6, r6, 0x13
rlwinm r11, r11, 0, 0xe, 0xc
or r0, r11, r0
stw r0, 0(r9)
slwi r0, r7, 0x16
lwz r7, 0(r9)
rlwinm r7, r7, 0, 0xd, 9
or r6, r7, r6
stw r6, 0(r9)
lwz r6, 0(r9)
rlwinm r6, r6, 0, 0xa, 4
or r0, r6, r0
stw r0, 0(r9)
b lbl_800A7A48
lbl_800A7954:
lwz r12, 0(r9)
slwi r11, r0, 0x1b
slwi r0, r6, 0x1c
rlwinm r6, r12, 0, 5, 3
or r6, r6, r11
stw r6, 0(r9)
lwz r6, 0(r9)
rlwinm r6, r6, 0, 4, 0
or r0, r6, r0
stw r0, 0(r9)
lwz r0, 0(r10)
rlwinm r0, r0, 0, 0, 0x1a
or r0, r0, r7
stw r0, 0(r10)
b lbl_800A7A48
lbl_800A7990:
lwz r11, 0(r10)
slwi r0, r0, 5
slwi r6, r6, 6
rlwinm r11, r11, 0, 0x1b, 0x19
or r0, r11, r0
stw r0, 0(r10)
slwi r0, r7, 9
lwz r7, 0(r10)
rlwinm r7, r7, 0, 0x1a, 0x16
or r6, r7, r6
stw r6, 0(r10)
lwz r6, 0(r10)
rlwinm r6, r6, 0, 0x17, 0x11
or r0, r6, r0
stw r0, 0(r10)
b lbl_800A7A48
lbl_800A79D0:
lwz r11, 0(r10)
slwi r0, r0, 0xe
slwi r6, r6, 0xf
rlwinm r11, r11, 0, 0x12, 0x10
or r0, r11, r0
stw r0, 0(r10)
slwi r0, r7, 0x12
lwz r7, 0(r10)
rlwinm r7, r7, 0, 0x11, 0xd
or r6, r7, r6
stw r6, 0(r10)
lwz r6, 0(r10)
rlwinm r6, r6, 0, 0xe, 8
or r0, r6, r0
stw r0, 0(r10)
b lbl_800A7A48
lbl_800A7A10:
lwz r12, 0(r10)
slwi r11, r0, 0x17
slwi r0, r6, 0x18
rlwinm r6, r12, 0, 9, 7
or r6, r6, r11
stw r6, 0(r10)
lwz r6, 0(r10)
rlwinm r6, r6, 0, 8, 4
or r0, r6, r0
stw r0, 0(r10)
lwz r0, 0(r10)
clrlwi r0, r0, 5
rlwimi r0, r7, 0x1b, 0, 4
stw r0, 0(r10)
lbl_800A7A48:
addi r4, r4, 0x10
lbl_800A7A4C:
lwz r0, 0(r4)
cmpwi r0, 0xff
bne lbl_800A7734
lwz r5, gx@sda21(r13)
clrlwi r0, r3, 0x18
li r3, 1
lwz r4, 0x4f4(r5)
slw r0, r3, r0
clrlwi r0, r0, 0x18
ori r3, r4, 0x10
stw r3, 0x4f4(r5)
lwz r4, gx@sda21(r13)
lbz r3, 0x4f2(r4)
or r0, r3, r0
stb r0, 0x4f2(r4)
blr
.global __GXSetVAT
__GXSetVAT:
lwz r10, gx@sda21(r13)
li r12, 0
li r11, 0
lis r7, 0xcc01
b lbl_800A7B0C
lbl_800A7AA0:
clrlwi r9, r12, 0x18
lbz r3, 0x4f2(r10)
li r0, 1
slw r0, r0, r9
and. r0, r3, r0
beq lbl_800A7B04
li r8, 8
stb r8, -0x8000(r7)
ori r3, r9, 0x70
addi r0, r11, 0x1c
stb r3, -0x8000(r7)
ori r5, r9, 0x80
addi r4, r11, 0x3c
lwzx r6, r10, r0
ori r3, r9, 0x90
addi r0, r11, 0x5c
stw r6, -0x8000(r7)
stb r8, -0x8000(r7)
stb r5, -0x8000(r7)
lwzx r4, r10, r4
stw r4, -0x8000(r7)
stb r8, -0x8000(r7)
stb r3, -0x8000(r7)
lwzx r0, r10, r0
stw r0, -0x8000(r7)
lbl_800A7B04:
addi r11, r11, 4
addi r12, r12, 1
lbl_800A7B0C:
clrlwi r0, r12, 0x18
cmplwi r0, 8
blt lbl_800A7AA0
lwz r3, gx@sda21(r13)
li r0, 0
stb r0, 0x4f2(r3)
blr
.global GXGetVtxAttrFmt
GXGetVtxAttrFmt:
addi r0, r4, -9
lwz r4, gx@sda21(r13)
slwi r3, r3, 2
add r4, r4, r3
cmplwi r0, 0x10
addi r3, r4, 0x1c
addi r8, r4, 0x3c
addi r9, r4, 0x5c
bgt lbl_800A7D58
lis r4, "@393"@ha
addi r4, r4, "@393"@l
slwi r0, r0, 2
lwzx r0, r4, r0
mtctr r0
bctr
lbl_800A7B64:
lwz r0, 0(r3)
clrlwi r0, r0, 0x1f
stw r0, 0(r5)
lwz r0, 0(r3)
rlwinm r0, r0, 0x1f, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r3)
rlwinm r0, r0, 0x1c, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7B8C:
lwz r0, 0(r3)
rlwinm r0, r0, 0x17, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r5)
cmpwi r0, 1
bne lbl_800A7BB8
lwz r0, 0(r3)
rlwinm. r0, r0, 1, 0x1f, 0x1f
beq lbl_800A7BB8
li r0, 2
stw r0, 0(r5)
lbl_800A7BB8:
lwz r3, 0(r3)
li r0, 0
rlwinm r3, r3, 0x16, 0x1d, 0x1f
stw r3, 0(r6)
stb r0, 0(r7)
blr
lbl_800A7BD0:
lwz r4, 0(r3)
li r0, 0
rlwinm r4, r4, 0x13, 0x1f, 0x1f
stw r4, 0(r5)
lwz r3, 0(r3)
rlwinm r3, r3, 0x12, 0x1d, 0x1f
stw r3, 0(r6)
stb r0, 0(r7)
blr
lbl_800A7BF4:
lwz r4, 0(r3)
li r0, 0
rlwinm r4, r4, 0xf, 0x1f, 0x1f
stw r4, 0(r5)
lwz r3, 0(r3)
rlwinm r3, r3, 0xe, 0x1d, 0x1f
stw r3, 0(r6)
stb r0, 0(r7)
blr
lbl_800A7C18:
lwz r0, 0(r3)
rlwinm r0, r0, 0xb, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r3)
rlwinm r0, r0, 0xa, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r3)
rlwinm r0, r0, 7, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7C40:
lwz r0, 0(r8)
clrlwi r0, r0, 0x1f
stw r0, 0(r5)
lwz r0, 0(r8)
rlwinm r0, r0, 0x1f, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r8)
rlwinm r0, r0, 0x1c, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7C68:
lwz r0, 0(r8)
rlwinm r0, r0, 0x17, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r8)
rlwinm r0, r0, 0x16, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r8)
rlwinm r0, r0, 0x13, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7C90:
lwz r0, 0(r8)
rlwinm r0, r0, 0xe, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r8)
rlwinm r0, r0, 0xd, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r8)
rlwinm r0, r0, 0xa, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7CB8:
lwz r0, 0(r8)
rlwinm r0, r0, 5, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r8)
rlwinm r0, r0, 4, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r9)
clrlwi r0, r0, 0x1b
stb r0, 0(r7)
blr
lbl_800A7CE0:
lwz r0, 0(r9)
rlwinm r0, r0, 0x1b, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r9)
rlwinm r0, r0, 0x1a, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r9)
rlwinm r0, r0, 0x17, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7D08:
lwz r0, 0(r9)
rlwinm r0, r0, 0x12, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r9)
rlwinm r0, r0, 0x11, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r9)
rlwinm r0, r0, 0xe, 0x1b, 0x1f
stb r0, 0(r7)
blr
lbl_800A7D30:
lwz r0, 0(r9)
rlwinm r0, r0, 9, 0x1f, 0x1f
stw r0, 0(r5)
lwz r0, 0(r9)
rlwinm r0, r0, 8, 0x1d, 0x1f
stw r0, 0(r6)
lwz r0, 0(r9)
srwi r0, r0, 0x1b
stb r0, 0(r7)
blr
lbl_800A7D58:
li r0, 1
stw r0, 0(r5)
li r0, 0
stw r0, 0(r6)
stb r0, 0(r7)
blr
.global GXGetVtxAttrFmtv
GXGetVtxAttrFmtv:
mflr r0
stw r0, 4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1c(r1)
li r31, 9
stw r30, 0x18(r1)
addi r30, r4, 0
stw r29, 0x14(r1)
addi r29, r3, 0
lbl_800A7D94:
stw r31, 0(r30)
addi r3, r29, 0
addi r4, r31, 0
addi r5, r30, 4
addi r6, r30, 8
addi r7, r30, 0xc
bl GXGetVtxAttrFmt
addi r31, r31, 1
cmpwi r31, 0x1a
addi r30, r30, 0x10
blt lbl_800A7D94
li r0, 0xff
stw r0, 0(r30)
lwz r0, 0x24(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
addi r1, r1, 0x20
mtlr r0
blr
.global GXSetArray
GXSetArray:
cmpwi r3, 0x19
bne lbl_800A7DF0
li r3, 0xa
lbl_800A7DF0:
li r0, 8
addi r6, r3, -9
lis r3, 0xCC008000@ha
stb r0, 0xCC008000@l(r3)
ori r0, r6, 0xa0
clrlwi r4, r4, 2
stb r0, -0x8000(r3)
addic. r0, r6, -12
stw r4, -0x8000(r3)
blt lbl_800A7E30
cmpwi r0, 4
bge lbl_800A7E30
lwz r3, gx@sda21(r13)
slwi r0, r0, 2
add r3, r3, r0
stw r4, 0x88(r3)
lbl_800A7E30:
li r0, 8
lis r3, 0xCC008000@ha
stb r0, 0xCC008000@l(r3)
ori r0, r6, 0xb0
clrlwi r4, r5, 0x18
stb r0, -0x8000(r3)
addic. r0, r6, -12
stw r4, -0x8000(r3)
bltlr
cmpwi r0, 4
bgelr
lwz r3, gx@sda21(r13)
slwi r0, r0, 2
add r3, r3, r0
stw r4, 0x98(r3)
blr
.global GXInvalidateVtxCache
GXInvalidateVtxCache:
li r0, 0x48
lis r3, 0xCC008000@ha
stb r0, 0xCC008000@l(r3)
blr
.global GXSetTexCoordGen2
GXSetTexCoordGen2:
mflr r0
cmplwi r5, 0x14
stw r0, 4(r1)
li r11, 0
li r12, 0
stwu r1, -8(r1)
li r10, 5
bgt lbl_800A7F34
lis r9, "@498"@ha
addi r9, r9, "@498"@l
slwi r0, r5, 2
lwzx r0, r9, r0
mtctr r0
bctr
lbl_800A7EB8:
li r10, 0
li r12, 1
b lbl_800A7F34
lbl_800A7EC4:
li r10, 1
li r12, 1
b lbl_800A7F34
lbl_800A7ED0:
li r10, 3
li r12, 1
b lbl_800A7F34
lbl_800A7EDC:
li r10, 4
li r12, 1
b lbl_800A7F34
lbl_800A7EE8:
li r10, 2
b lbl_800A7F34
lbl_800A7EF0:
li r10, 2
b lbl_800A7F34
lbl_800A7EF8:
li r10, 5
b lbl_800A7F34
lbl_800A7F00:
li r10, 6
b lbl_800A7F34
lbl_800A7F08:
li r10, 7
b lbl_800A7F34
lbl_800A7F10:
li r10, 8
b lbl_800A7F34
lbl_800A7F18:
li r10, 9
b lbl_800A7F34
lbl_800A7F20:
li r10, 0xa
b lbl_800A7F34
lbl_800A7F28:
li r10, 0xb
b lbl_800A7F34
lbl_800A7F30:
li r10, 0xc
lbl_800A7F34:
cmpwi r4, 1
beq lbl_800A7F5C
bge lbl_800A7F4C
cmpwi r4, 0
bge lbl_800A7F70
b lbl_800A7FEC
lbl_800A7F4C:
cmpwi r4, 0xa
beq lbl_800A7FC4
bge lbl_800A7FEC
b lbl_800A7F88
lbl_800A7F5C:
slwi r0, r12, 2
rlwinm r4, r0, 0, 0x1c, 0x13
slwi r0, r10, 7
or r11, r4, r0
b lbl_800A7FEC
lbl_800A7F70:
slwi r0, r12, 2
ori r0, r0, 2
rlwinm r4, r0, 0, 0x1c, 0x13
slwi r0, r10, 7
or r11, r4, r0
b lbl_800A7FEC
lbl_800A7F88:
slwi r0, r12, 2
rlwinm r0, r0, 0, 0x1c, 0x18
ori r0, r0, 0x10
rlwinm r9, r0, 0, 0x19, 0x13
slwi r0, r10, 7
or r9, r9, r0
addi r5, r5, -12
addi r0, r4, -2
rlwinm r9, r9, 0, 0x14, 0x10
slwi r4, r5, 0xc
or r4, r9, r4
rlwinm r4, r4, 0, 0x11, 0xd
slwi r0, r0, 0xf
or r11, r4, r0
b lbl_800A7FEC
lbl_800A7FC4:
cmpwi r5, 0x13
slwi r0, r12, 2
bne lbl_800A7FDC
rlwinm r0, r0, 0, 0x1c, 0x18
ori r0, r0, 0x20
b lbl_800A7FE4
lbl_800A7FDC:
rlwinm r0, r0, 0, 0x1c, 0x18
ori r0, r0, 0x30
lbl_800A7FE4:
rlwinm r0, r0, 0, 0x19, 0x13
ori r11, r0, 0x100
lbl_800A7FEC:
li r10, 0x10
lis r9, 0xCC008000@ha
stb r10, 0xCC008000@l(r9)
addi r0, r3, 0x1040
addi r4, r8, -64
stw r0, -0x8000(r9)
rlwinm r5, r4, 0, 0x18, 0x16
rlwinm r4, r7, 8, 0x10, 0x17
stw r11, -0x8000(r9)
addi r0, r3, 0x1050
cmplwi r3, 6
stb r10, -0x8000(r9)
or r4, r5, r4
stw r0, -0x8000(r9)
stw r4, -0x8000(r9)
bgt lbl_800A811C
lis r4, "@499"@ha
addi r4, r4, "@499"@l
slwi r0, r3, 2
lwzx r0, r4, r0
mtctr r0
bctr
lbl_800A8044:
lwz r4, gx@sda21(r13)
slwi r0, r6, 6
addi r5, r4, 0x80
lwz r4, 0x80(r4)
rlwinm r4, r4, 0, 0x1a, 0x13
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A8064:
lwz r4, gx@sda21(r13)
slwi r0, r6, 0xc
addi r5, r4, 0x80
lwz r4, 0x80(r4)
rlwinm r4, r4, 0, 0x14, 0xd
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A8084:
lwz r4, gx@sda21(r13)
slwi r0, r6, 0x12
addi r5, r4, 0x80
lwz r4, 0x80(r4)
rlwinm r4, r4, 0, 0xe, 7
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A80A4:
lwz r4, gx@sda21(r13)
slwi r0, r6, 0x18
addi r5, r4, 0x80
lwz r4, 0x80(r4)
rlwinm r4, r4, 0, 8, 1
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A80C4:
lwz r4, gx@sda21(r13)
lwzu r0, 0x84(r4)
rlwinm r0, r0, 0, 0, 0x19
or r0, r0, r6
stw r0, 0(r4)
b lbl_800A8138
lbl_800A80DC:
lwz r4, gx@sda21(r13)
slwi r0, r6, 6
addi r5, r4, 0x84
lwz r4, 0x84(r4)
rlwinm r4, r4, 0, 0x1a, 0x13
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A80FC:
lwz r4, gx@sda21(r13)
slwi r0, r6, 0xc
addi r5, r4, 0x84
lwz r4, 0x84(r4)
rlwinm r4, r4, 0, 0x14, 0xd
or r0, r4, r0
stw r0, 0(r5)
b lbl_800A8138
lbl_800A811C:
lwz r4, gx@sda21(r13)
slwi r0, r6, 0x12
addi r5, r4, 0x84
lwz r4, 0x84(r4)
rlwinm r4, r4, 0, 0xe, 7
or r0, r4, r0
stw r0, 0(r5)
lbl_800A8138:
addi r3, r3, 1
bl __GXSetMatrixIndex
lwz r0, 0xc(r1)
addi r1, r1, 8
mtlr r0
blr
.global GXSetNumTexGens
GXSetNumTexGens:
lwz r4, gx@sda21(r13)
clrlwi r7, r3, 0x18
li r3, 0x10
addi r6, r4, 0x204
lwz r5, 0x204(r4)
lis r4, 0xCC008000@ha
li r0, 0x103f
rlwinm r5, r5, 0, 0, 0x1b
or r5, r5, r7
stw r5, 0(r6)
stb r3, 0xCC008000@l(r4)
lwz r3, gx@sda21(r13)
stw r0, -0x8000(r4)
stw r7, -0x8000(r4)
lwz r0, 0x4f4(r3)
ori r0, r0, 4
stw r0, 0x4f4(r3)
blr
.section .data, "wa"
"@128":
.4byte lbl_800A6908
.4byte lbl_800A6920
.4byte lbl_800A6940
.4byte lbl_800A6960
.4byte lbl_800A6980
.4byte lbl_800A69A0
.4byte lbl_800A69C0
.4byte lbl_800A69E0
.4byte lbl_800A6A00
.4byte lbl_800A6A20
.4byte lbl_800A6A40
.4byte lbl_800A6AB8
.4byte lbl_800A6AD8
.4byte lbl_800A6AF8
.4byte lbl_800A6B10
.4byte lbl_800A6B30
.4byte lbl_800A6B50
.4byte lbl_800A6B70
.4byte lbl_800A6B90
.4byte lbl_800A6BB0
.4byte lbl_800A6BD0
.4byte lbl_800A6BEC
.4byte lbl_800A6BEC
.4byte lbl_800A6BEC
.4byte lbl_800A6BEC
.4byte lbl_800A6A7C
"@189":
.4byte lbl_800A6C74
.4byte lbl_800A6C90
.4byte lbl_800A6CB0
.4byte lbl_800A6CD0
.4byte lbl_800A6CF0
.4byte lbl_800A6D10
.4byte lbl_800A6D30
.4byte lbl_800A6D50
.4byte lbl_800A6D70
.4byte lbl_800A6D90
.4byte lbl_800A6DB0
.4byte lbl_800A6E28
.4byte lbl_800A6E48
.4byte lbl_800A6E68
.4byte lbl_800A6E84
.4byte lbl_800A6EA4
.4byte lbl_800A6EC4
.4byte lbl_800A6EE4
.4byte lbl_800A6F04
.4byte lbl_800A6F24
.4byte lbl_800A6F44
.4byte lbl_800A6F60
.4byte lbl_800A6F60
.4byte lbl_800A6F60
.4byte lbl_800A6F60
.4byte lbl_800A6DEC
"@256":
.4byte lbl_800A7164
.4byte lbl_800A7174
.4byte lbl_800A7184
.4byte lbl_800A7194
.4byte lbl_800A71A4
.4byte lbl_800A71B4
.4byte lbl_800A71C4
.4byte lbl_800A71D4
.4byte lbl_800A71E4
.4byte lbl_800A71F4
.4byte lbl_800A7204
.4byte lbl_800A724C
.4byte lbl_800A725C
.4byte lbl_800A726C
.4byte lbl_800A727C
.4byte lbl_800A728C
.4byte lbl_800A729C
.4byte lbl_800A72AC
.4byte lbl_800A72BC
.4byte lbl_800A72CC
.4byte lbl_800A72DC
.4byte lbl_800A72EC
.4byte lbl_800A72EC
.4byte lbl_800A72EC
.4byte lbl_800A72EC
.4byte lbl_800A7228
"@302":
.4byte lbl_800A73F0
.4byte lbl_800A742C
.4byte lbl_800A7490
.4byte lbl_800A74BC
.4byte lbl_800A74E8
.4byte lbl_800A7528
.4byte lbl_800A7564
.4byte lbl_800A75A4
.4byte lbl_800A75E4
.4byte lbl_800A7624
.4byte lbl_800A7664
.4byte lbl_800A76A4
.4byte lbl_800A76DC
.4byte lbl_800A76DC
.4byte lbl_800A76DC
.4byte lbl_800A76DC
.4byte lbl_800A742C
"@329":
.4byte lbl_800A7760
.4byte lbl_800A779C
.4byte lbl_800A7800
.4byte lbl_800A782C
.4byte lbl_800A7858
.4byte lbl_800A7898
.4byte lbl_800A78D4
.4byte lbl_800A7914
.4byte lbl_800A7954
.4byte lbl_800A7990
.4byte lbl_800A79D0
.4byte lbl_800A7A10
.4byte lbl_800A7A48
.4byte lbl_800A7A48
.4byte lbl_800A7A48
.4byte lbl_800A7A48
.4byte lbl_800A779C
"@393":
.4byte lbl_800A7B64
.4byte lbl_800A7B8C
.4byte lbl_800A7BD0
.4byte lbl_800A7BF4
.4byte lbl_800A7C18
.4byte lbl_800A7C40
.4byte lbl_800A7C68
.4byte lbl_800A7C90
.4byte lbl_800A7CB8
.4byte lbl_800A7CE0
.4byte lbl_800A7D08
.4byte lbl_800A7D30
.4byte lbl_800A7D58
.4byte lbl_800A7D58
.4byte lbl_800A7D58
.4byte lbl_800A7D58
.4byte lbl_800A7B8C
"@499":
.4byte lbl_800A8044
.4byte lbl_800A8064
.4byte lbl_800A8084
.4byte lbl_800A80A4
.4byte lbl_800A80C4
.4byte lbl_800A80DC
.4byte lbl_800A80FC
"@498":
.4byte lbl_800A7EB8
.4byte lbl_800A7EC4
.4byte lbl_800A7ED0
.4byte lbl_800A7EDC
.4byte lbl_800A7EF8
.4byte lbl_800A7F00
.4byte lbl_800A7F08
.4byte lbl_800A7F10
.4byte lbl_800A7F18
.4byte lbl_800A7F20
.4byte lbl_800A7F28
.4byte lbl_800A7F30
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7F34
.4byte lbl_800A7EE8
.4byte lbl_800A7EF0
.section .sdata, "wa"
tbl1$215:
.4byte 0x00040102
tbl2$216:
.4byte 0x00080102
tbl3$217:
.4byte 0x000C0102
.4byte 0