You are given a rotated sorted array `nums` that may contain duplicate values. The array was originally sorted in ascending order, then rotated at an unknown pivot. For example, `[0,1,2,4,4,5,6,7]` might become `[4,5,6,7,0,1,2,4]`. Write a function `search_rotated(nums, target)` that returns `True` if `target` is present in `nums`, and `False` otherwise. Your solution must run in O(log n) average time complexity, even in the presence of duplicates (worst-case O(n) when many duplicates cause ambiguity).
Constraints
0 <= nums.length <= 10^5
-10^9 <= nums[i], target <= 10^9
Array is a rotation of a sorted (non-decreasing) array, with possible duplicates.