user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<searchRange>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0x2,(%rax)
  mov    $0x8,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  jmp    L31
L33:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jle    L47
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L31
L47:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jge    L86
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L31
L86:
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L31:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L33
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jne    L40
  mov    -0x8(%rbp),%rax
  mov    -0x14(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L22
L40:
  mov    -0x8(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L113
L17:
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jge    L45
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L22
L45:
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L22:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L17
  mov    -0x8(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%rax
L113:
  leave
  ret
```

assistant: ```c
int *searchRange(int *nums, int numsSize, int target, int *returnSize) {
  int *ret;
  int start = 0;
  int end = numsSize - 1;
  int middle;
  returnSize[0] = 2;
  ret = (int *)malloc(sizeof(int) * 2);
  while (start < end) {
    middle = (start + end) / 2;
    if (nums[middle] < target) {
      start = middle + 1;
    } else if (nums[middle] > target) {
      end = middle - 1;
    } else {
      end = middle;
    }
  }
  if (nums[start] == target) {
    ret[0] = start;
  } else {
    ret[0] = -1;
    ret[1] = -1;
    return ret;
  }
  end = numsSize - 1;
  while (start < end) {
    middle = (start + end) / 2 + 1;
    if (nums[middle] > target) {
      end = middle - 1;
    } else {
      start = middle;
    }
  }
  ret[1] = start;
  return ret;
}
```