Ah, now this is a nice inner loop.
Code:
.L2:
        movsd   %xmm1, %xmm0
        decl    %eax
        mulsd   %xmm1, %xmm0
        addsd   %xmm2, %xmm0
        sqrtsd  %xmm0, %xmm0
        divsd   %xmm0, %xmm1
        jne     .L2
g++ -S -o asm.s -O3 -ffast-math -mfpmath=sse asm.cpp

Note that xmm2 simply holds the constant 1.0, whereas xmm1 is the home register of x.