user: What would the C source look like for the assembly code provided here:

```asm
<search>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jg     L89
  mov    $0xffffffff,%eax
  jmp    L218
L89:
  movl   $0x0,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L5
L167:
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %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    L149
  mov    -0x4(%rbp),%eax
  jmp    L218
L149:
  mov    -0xc(%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
  jge    L200
  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    L216
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L5
L216:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L5
L200:
  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
  jge    L132
  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    L205
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L5
L205:
  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     L37
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L5
L37:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L5
L132:
  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    L155
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L5
L155:
  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     L14
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L5
L14:
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
L5:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L167
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x20(%rbp)
  jne    L73
  mov    -0xc(%rbp),%eax
  jmp    L218
L73:
  mov    $0xffffffff,%eax
L218:
  pop    %rbp
  ret
```

assistant: ```c
int search(int *nums, int numsSize, int target) {
  if (numsSize <= 0)
    return (-1);
  int left = 0, right = numsSize - 1;
  while (left < right) {
    int mid = (left + right) / 2;
    if (nums[mid] == target)
      return (mid);
    if (nums[left] < nums[right]) {
      if (nums[mid] > target)
        right = mid - 1;
      else
        left = mid + 1;
      continue;
    }
    if (nums[mid] < nums[right]) {
      if (target < nums[mid])
        right = mid - 1;
      else if (target <= nums[right])
        left = mid + 1;
      else
        right = mid - 1;
      continue;
    }
    if (target > nums[mid])
      left = mid + 1;
    else if (target >= nums[left])
      right = mid - 1;
    else
      left = mid + 1;
  }
  return (nums[left] == target ? left : -1);
}
```