A "leaf function" is one that doesn't call any other function. If you drew a tree illustrating function calls in the program, it would be a leaf node in the tree. If the leaf function does not change any saved registers, it does not need to save anything to the Stack.
First save the "unsaved" registers if we will still care
	about them after procedure returns
        
         ($t0, ..., $t9, $a0, ..., $a3).
        
Where do they get saved?   the Stack (we'll talk about this in a minute)
 Place parameters in a place where the procedure can access them.
Place parameters in a place where the procedure can access them.
	$a0, ..., $a3)
         Transfer control to the procedure.
Transfer control to the procedure.
	jal ProcedureAddress) does 2 things:
            $ra. (Happens automatically.)
                 Acquire the storage resources needed for the procedure.
Acquire the storage resources needed for the procedure.
	$s0, ...,
                $s7.
         Perform the desired task.
Perform the desired task.
 Place the result values in a place where the calling program can access
them  (
Place the result values in a place where the calling program can access
them  ($v0, $v1).
 Release the storage resources needed for the procedure.
Release the storage resources needed for the procedure.
	$s0, ...,
                $s7.
         Return control to the point of origin.
Return control to the point of origin.
	$ra   (jr $ra).jr
            instruction jumps to an address stored in a register.
         Calling program must retrieve values from
	Calling program must retrieve values from
	$v0, $v1.
# CODE STRUCTURE caller: ... # put arguments in $a0 - $a3 jal leafFunc # after call, do stuff using value(s) in $v0, $v1 ... # return to "super-caller" or op. sys.
leafFunc: # body of subfunction (assume arguments are in $a0 - $a3) # put return value(s) in $v0, $v1 jr $ra