csMinorGirl 0 Newbie Poster

So I wrote C for newtons version of critical point calculator and then needed to turn it into mips for my lab.. I really could use some help on getting the stack ptr in the correct sport.. The debugger.. also is confusing me.. Any help please?

.data
msg1: .asciiz "Please enter the degree of Polynomial:"
msg2: .asciiz "Please enter left bound."
msg3: .asciiz "Please enter right bound."
msg4: .asciiz " Please enter coefficient until N-1 is complete."
msg5: .asciiz ","
offset: .float .0001 #where the bounds are going to be stored
.text

Main:
li $v0,4
la $a0, msg1
syscall
li $v0, 5
syscall
move $a0,$v0
li $v0,1
syscall #checks print degree
move $s1,$a0 #-------------------------------$s1 holds degree for entire project

li $v0,4
la $a0, msg2
syscall
li $v0, 5
syscall
move $a0,$v0
li $v0,1
syscall #checks print left bound
move $s0,$a0 #--------------------------------$s0 holds left bound


li $v0,4
la $a0, msg3
syscall
li $v0, 5
syscall
move $a0,$v0
li $v0,1
syscall #checks print right bound
move $s2,$a0 #---------------------------------$s2 holds right bound

#Allocate memory in the stack
li $s3, 4 # size of integer 4 bytes
add $s1, $s1, 1 # add one more spot for constant
mul $s3, $s3, $s1 # compute the size of the array of coefficients
addi $s3, $s3, 12 # create 2 more additional places in memory and PC + 4
sub $sp, $sp, $s3 # make room on stack for coefficients
sw $ra, 0($sp)
sw $s4, 4($sp)

Fillcoef:
# This for loop will be called from main and fill and array of coefficients
add $t0, $t0, $zero
slt $t2,$t0,$s1
beq $t2,$zero,start
li $v0,4
la $a0, msg4
syscall
li $v0,6
syscall
swc1 $f0, 8($sp) #store the coefficient
addi $sp, $sp, 4 #increment stack pointer
addi $t0,$t0,1 #increment counter
b Fillcoef

start:
# This will compute the slope and out the coordinates of the minimum
addi $t0, $zero, -1
sw $t0, 12($sp)
lwc1 $f0, 12($sp) # This is dydx or derivative
cvt.s.w $f0, $f0 # This is dydx or derivative
add $t0, $zero, $s0 # add left bound
sw $t0, 12($sp)
lwc1 $f1, 12($sp)
cvt.s.w $f1,$f1 # x0 will start at the left bound limit
add $t0, $zero, $zero
sw $t0, 12($sp)
lwc1 $f29, 12($sp) # This is dydx or derivative
cvt.s.w $f29, $f29 # variable to pass as parameter for doEquation
add $t0, $zero, $zero
sw $t0, 12($sp)
lwc1 $f31, 12($sp) # This is dydx or derivative
cvt.s.w $f31, $f31 # a zero value to check for negative slope

computeSlope:
c.lt.s $f0, $f31 # Check to see if slope is negative
bc1f end # continue loop if slope is negative
mov.s $f29, $f1
jal doEquation # find temporary y value
# make sure doEquation places y into $f3
mov.s $f10, $f3 #f10 will hold our temporary Y variable
l.s $f30,offset #loads .0001 in to float register from label
sub.s $f4, $f1,$f30 # xOne X0 - .0001
add.s $f5, $f1, $f30 # xTwo x0 + .0001
mov.s $f29, $f4 # place xOne
jal doEquation # find yOne using xOne as x0
mov.s $f6, $f3 # move return value to $f6
mov.s $f29, $f5 # place xTwo
jal doEquation # find yTwo using xTwo as x0
mov.s $f7, $f3 # move return value to $f7
# calculate derivative yTwo-Yone/x2-x1
sub.s $f6, $f7, $f6
sub.s $f4, $f5, $f4
div.s $f0, $f6, $f4 #derivative has changed
# solve for x where x = x0 - y value/dydx
div.s $f4, $f10, $f0
sub.s $f4, $f1, $f4
# make x0 = x
mov.s $f1, $f4
b computeSlope

doEquation:
# Return value is stored in $f3 and $f29 is value of x0
li $t1, 1
addi $t0, $zero, 0
sw $t0, 12($sp)
lwc1 $f3, 12($sp) # This is dydx or derivative
cvt.s.w $f3, $f3 #create a return value register
add $t0, $t0, $zero # an iterator for loop
addi $t0, $zero, 1
sw $t0, 12($sp)
lwc1 $f4, 12($sp) # This is dydx or derivative
cvt.s.w $f4, $f4
sub $sp, $sp, $s1
loop: blt $t0, $s1, findY
jr $ra
findY:

l.s $f5, -16($sp)<<<<<<<<<<---- stuck here plzzz help
mul.s $f5, $f4, $f5
add.s $f3, $f3, $f5
mul.s $f4, $f4, $f29
addi $sp, $sp, 4
b loop

end:
#print out the coordinates
jal doEquation #find last y-coordinate
mov.s $f3, $f4
#Print out "the coordinates are ($f1, $f4)"
li $v0,2
mov.s $f0,$f1
syscall
li $v0,4
la $a0, msg5
syscall
li $v0,2
mov.s $f0,$f4
syscall

li $s3, 4 # size of integer 4 bytes
add $s1, $s1, 1 # add one more spot for constant coefficient
mul $s3, $s3, $s1 # compute the size of the array of coefficients
addi $s3, $s3, 12 # create 2 more additional places in memory
add $sp, $sp, $s3 #clear off coeficients
lw $ra, 0($sp) #restore $ra
lw $s4, 4($sp)
jr $ra