lw $1,1($0) add $2,$1,$1 add $3,$2,$2 lw $4,1($0) add $4,$4,$1 beq $3,$4,1 j 4 sw $4,5($0) end