Convert the following C function to its corresponding MIPS assembly language and write a MIPS assembly program that will call the function with some initial value of n and store the result in a suitable memory location, labeled as result.
Make sure that you use the appropriate registers to follow the MIPS calling conventions.
unsigned int sum(unsigned int n)
{
if (n == 0) return 0;
else return n + sum(n-1);
}