I think your problem is with return types. I'm not much good at C, but I believe "main" returns "int", period.
In your asm code, you end with "mov eax, [tot]". Considering "tot" is a qword (a.k.a. "double"), what's that supposed to do? Furthermore, you "fstp" st0 into "[tot]". I believe you want to leave your return value on the FPU stack - change it to "fst"... if you think you need to do that at all (I think "tot" could vanish entirely).
But I think your "main problem" (pun!), is that C needs to be advised that "_sum" will be returning a "double", so C should look on the FPU stack, not eax, for its return value...
double _sum(double *, int);
(before "main")
The fact that "dump_math" shows the correct value in st0 indicates that you're doing it right, so far, and that the problem is with the C code, I think. One or another of the changes I made (note to self: ';' does not make a comment in C!) seems to be printing the correct answer, and I think the key is the "prototype" of the function, so C knows it's returning "double", not "int"...
Best,
Frank