Three very common optimization possibilities (i.e. many non-trivial subroutines can be optimized in these ways) in Super Mario 64 are exemplified by the following pieces of code. I had to extract the pieces of code in a different way for this entry, so this time, their offsets are Nintendo 64 memory addresses, not file offsets.
You should read the entries on the MIPS instruction set first.
8027BE14:
SW $24, 28($29)
LW $25, 28($29)
80286790:
LUI $10, 0x8034
LUI $8, 0x8034
LH $8, -14516($8)
LH $10, -14574($10)
LUI $1, 0x8034
80288CE4:
ANDI $4, $4, 0xFFFF
ANDI $5, $5, 0xFFFF
ANDI $6, $6, 0xFFFF
ANDI $14, $5, 0x000F
OR $5, $14, $0
ANDI $15, $5, 0xFFFF