user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1b0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  lea    D76(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  lea    D83(%rip),%rdi
  call   <scanf@plt>
  lea    D87(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x8(%rsp)
  js     L87
  lea    0x10(%rsp),%rbp
  mov    $0x0,%ebx
  lea    D83(%rip),%r12
L32:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0x8(%rsp)
  jge    L32
L87:
  lea    D63(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x8(%rsp)
  js     L112
  mov    $0x0,%ebx
  lea    D77(%rip),%rbp
L129:
  mov    0x10(%rsp,%rbx,4),%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x8(%rsp)
  jge    L129
L112:
  lea    D30(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  lea    D83(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%ebx
  sub    $0x1,%ebx
  js     L31
  mov    0xc(%rsp),%esi
  mov    $0x0,%ebp
  jmp    L63
L14:
  je     L80
  lea    -0x1(%rdx),%ebx
L77:
  cmp    %ebp,%ebx
  jl     L31
L63:
  lea    (%rbx,%rbp,1),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  movslq %edx,%rax
  mov    0x10(%rsp,%rax,4),%eax
  cmp    %esi,%eax
  jge    L14
  lea    0x1(%rdx),%ebp
  jmp    L77
L80:
  add    $0x1,%edx
  lea    D85(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    %ebp,%ebx
  jl     L31
L25:
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  mov    $0x0,%eax
  add    $0x1b0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L31:
  mov    0xc(%rsp),%esi
  lea    D98(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L25
L73:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D76
data_type: string
name: read_data
arguments: data_label: D83
data_type: string
name: read_data
arguments: data_label: D87
data_type: string
name: read_data
arguments: data_label: D63
data_type: string
name: read_data
arguments: data_label: D77
data_type: string
name: read_data
arguments: data_label: D30
data_type: string
name: read_data
arguments: data_label: D85
data_type: string
name: read_data
arguments: data_label: D98
data_type: string

tool: D76: Please enter the number of elements 

tool: D83: %d

tool: D87: Please enter the array

tool: D63: The entered array is

tool: D77: %d 


tool: D30: Please enter the value to be searched

tool: D85: searched element found at location %d %d 


tool: D98: oops!!! %d searched element not found


assistant: ```c
int main() {
  int i, last, first, middle, n, search, array[100];
  printf("Please enter the number of elements \n");
  scanf("%d", &n);
  printf("Please enter the array\n");
  for (i = 0; i <= n; i++) {
    scanf("%d", &array[i]);
  }
  printf("The entered array is\n");
  for (i = 0; i <= n; i++) {
    printf("%d \n", array[i]);
  }
  printf("Please enter the value to be searched\n");
  scanf("%d", &search);
  first = 0;
  last = n - 1;
  while (first <= last) {
    middle = (last + first) / 2;
    if (array[middle] < search)
      first = middle + 1;
    else if (array[middle] == search) {
      printf("searched element found at location %d %d \n", search, middle + 1);
      break;
    } else {
      last = middle - 1;
      middle = (first + last) / 2;
    }
  }
  if (first > last) {
    printf("oops!!! %d searched element not found\n", search);
  }
}
```