Now initially it seemed that it should be O(Nlog(N)) , where N is the number of elements in the heap but, assuming worst case, it will take log(N) time to sift each elements until N/2 nodes have been popped (Since that would mean that the height of heap has been reduced by one) , and then it will take log(N)-1 time to sift each element until N/4 nodes have been popped
Therefore it becomes a series like
N/2*(log(N)) + N/4*(log(N)-1) + N/8*(log(N)-1) + ... N/(2^(log(N))*(log(N) - Height of Heap)
Where the last term is basically N/N * 0 - 0
I cant figure out the sum of this series, I tried integrating it in its standard form
integral of N*(log(N) - x)/2^(x+1)dx , limits 0 to log(N)
but wolfram gave me a complicated answer