Time and space complexity

what is the overall time and space complexity of this code.

Time complexity is O(32 x n) = O(n)…32 because it is the maxm length of binary representation and n is the number of elements in the array.
Space complexity is O(n)