Algorithm analysis of nested loop
If you're interested in knowing the big-oh (O) then : 
logn (for first for statement) * (n-logn) times 

Therefore, n*logn - log^2(n) 

For big oh complexity, the complexity for above mentioned nested loops would be: 

n*logn (since big-oh is only interested in larger values)

And as David motioned, that link has detailed explaination.