Translate the following C program to MIPS assembly.
?
int fib(int n)
{
if (n == 0) {
return 0;
} else if (n == 1) { return 1;
} else {
return fib(n - 1) + fib(n - 2);
} }
void main() {
int result = fib(8);
}
?
?Objective:
-define a recursive procedure and call it.
-Implement a MIPS assembly language program that defines "main", and "fib" procedures
-The function "fib" is recursive.
-The final "result" is stored in $s2