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

```asm
<main>:
  endbr64
  push   %r13
  lea    D63(%rip),%rdi
  push   %r12
  lea    D1(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  lea    D34(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  js     L128
  lea    0x10(%rsp),%rbp
  xor    %ebx,%ebx
  nop
L72:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebx
  add    $0x4,%rbp
  call   <scanf@plt>
  cmp    %ebx,0x8(%rsp)
  jge    L72
L128:
  lea    D61(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  js     L9
  xor    %ebx,%ebx
  lea    0x10(%rsp),%r13
  lea    D32(%rip),%rbp
  nopw   0x0(%rax,%rax,1)
L8:
  mov    0x0(%r13,%rbx,4),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,0x8(%rsp)
  jge    L8
L9:
  lea    D70(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%ebx
  mov    0xc(%rsp),%esi
  sub    $0x1,%ebx
  js     L124
  xor    %ebp,%ebp
  jmp    L2
  nopl   0x0(%rax,%rax,1)
L106:
  lea    0x1(%rdx),%ebp
  cmp    %ebx,%ebp
  jg     L124
L2:
  lea    0x0(%rbp,%rbx,1),%edx
  sar    %edx
  movslq %edx,%rax
  cmp    %esi,0x10(%rsp,%rax,4)
  jl     L106
  je     L12
  lea    -0x1(%rdx),%ebx
  cmp    %ebx,%ebp
  jle    L2
L124:
  lea    D53(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L92:
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L129
  add    $0x1b8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L12:
  add    $0x1,%edx
  xor    %eax,%eax
  lea    D37(%rip),%rdi
  call   <printf@plt>
  cmp    %ebx,%ebp
  jle    L92
  mov    0xc(%rsp),%esi
  jmp    L124
L129:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D63
data_type: string
name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D34
data_type: string
name: parse_data
arguments: data_label: D61
data_type: string
name: parse_data
arguments: data_label: D32
data_type: string
name: parse_data
arguments: data_label: D70
data_type: string
name: parse_data
arguments: data_label: D53
data_type: string
name: parse_data
arguments: data_label: D37
data_type: string

tool: D63: Please enter the number of elements 

tool: D1: %d

tool: D34: Please enter the array

tool: D61: The entered array is

tool: D32: %d 


tool: D70: Please enter the value to be searched

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


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


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);
  }
}
```