user: 这段汇编代码用C语言表示是什么样的?

```asm
<search>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L149
L59:
  mov    -0x8(%rbp),%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jne    L117
  mov    $0x1,%eax
  jmp    L2
L117:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L64
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L64
  addl   $0x1,-0xc(%rbp)
  subl   $0x1,-0x8(%rbp)
  jmp    L149
L64:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L53
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jl     L116
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jge    L116
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L149
L116:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L149
L53:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jle    L135
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jg     L135
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L149
L135:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
L149:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jle    L59
  mov    $0x0,%eax
L2:
  pop    %rbp
  ret
```

assistant: ```c
bool search(int *nums, int numsSize, int target) {
  int lo = 0;
  int hi = numsSize - 1;
  while (lo <= hi) {
    int mid = lo + (hi - lo) / 2;
    if (nums[mid] == target) {
      return true;
    }
    if (nums[lo] == nums[mid] && nums[mid] == nums[hi]) {
      lo++;
      hi--;
    } else if (nums[lo] <= nums[mid]) {
      if (nums[lo] <= target && target < nums[mid]) {
        hi = mid - 1;
      } else {
        lo = mid + 1;
      }
    } else {
      if (nums[mid] < target && target <= nums[hi]) {
        lo = mid + 1;
      } else {
        hi = mid - 1;
      }
    }
  }
  return false;
}
```