Simple C implement
Code

# Code
```c []
/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* minBitwiseArray(int* nums, int numsSize, int* returnSize) {
    
    int* ans = malloc(sizeof(int) * numsSize);

    for(int i = 0; i < numsSize;i++)
    {
        //printf("Num : %d\n", nums[i]);
        if( ((nums[i]+1) & nums[i]) == 0)
        {
            ans[i] = nums[i]>>1;
        }
        else
        {
            int tmp = nums[i];
            int count = (tmp  + 1) ^ tmp;

            ans[i] = -1;
            for(int j = 0; j < count;j++)
            {
                if( ( tmp | (tmp - 1)) == nums[i] )
                {
                    ans[i] = tmp-1;
                }
                tmp--;
            }   
        }
    }

    *returnSize = numsSize;
    return ans;
}
```
['C']