2. (30 pts) Use MIPS assembly code to implement a loop for calculating the factorial of N. For instance, given input 6, it should return the output 720 (i.e., 6!). Use a procedure call to calculate the factorial of N. Therefore, you only need to pass the parameter N to the procedure, and then to print out the value returned by this procedure, which should be N!. You can assume that the result of the factorial can be represented by 32 bits (i.e. you do not need to support very large input values).
Note:
\begin{itemize}
\item Use \texttt{jal} instruction to call the procedure.
\item You may use the pseudo-instruction \texttt{mul} to do multiplication.
\item If the input data N is a negative number, you should not return any value, but print out \texttt{"N must be a non-negative number."}
\end{itemize}