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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1b8(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x1b8(%rbp),%eax
  mov    %eax,%esi
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1b0(%rbp)
  jmp    L46
L20:
  lea    -0x1a0(%rbp),%rdx
  mov    -0x1b0(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x1b0(%rbp)
L46:
  mov    -0x1b8(%rbp),%eax
  cmp    %eax,-0x1b0(%rbp)
  jl     L20
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1b4(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x1ac(%rbp)
  mov    -0x1b8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1a8(%rbp)
  mov    -0x1ac(%rbp),%edx
  mov    -0x1a8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x1a4(%rbp)
  jmp    L66
L67:
  mov    -0x1a4(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%edx
  mov    -0x1b4(%rbp),%eax
  cmp    %eax,%edx
  jge    L33
  mov    -0x1a4(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x1ac(%rbp)
  jmp    L86
L33:
  mov    -0x1a4(%rbp),%eax
  cltq
  mov    -0x1a0(%rbp,%rax,4),%edx
  mov    -0x1b4(%rbp),%eax
  cmp    %eax,%edx
  jne    L79
  mov    -0x1a4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x1b4(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L54
L79:
  mov    -0x1a4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1a8(%rbp)
L86:
  mov    -0x1ac(%rbp),%edx
  mov    -0x1a8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x1a4(%rbp)
L66:
  mov    -0x1ac(%rbp),%eax
  cmp    -0x1a8(%rbp),%eax
  jle    L67
L54:
  mov    -0x1ac(%rbp),%eax
  cmp    -0x1a8(%rbp),%eax
  jle    L27
  mov    -0x1b4(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L27:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L50
  call   <__stack_chk_fail@plt>
L50:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D64
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D17
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D74
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D6
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D3
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D4
type_infered: string

tool: D64: Enter number of elements

tool: D17: %d

tool: D74: Enter %d integers


tool: D6: Enter value to find

tool: D3: %d found at location %d.


tool: D4: Not found! %d is not present in the list.


assistant: ```c
main() {
  int c, first, last, middle, n, search, array[100];
  printf("Enter number of elements\n");
  scanf("%d", &n);
  printf("Enter %d integers\n", n);
  for (c = 0; c < n; c++)
    scanf("%d", &array[c]);
  printf("Enter value to find\n");
  scanf("%d", &search);
  first = 0;
  last = n - 1;
  middle = (first + last) / 2;
  while (first <= last) {
    if (array[middle] < search)
      first = middle + 1;
    else if (array[middle] == search) {
      printf("%d found at location %d.\n", search, middle + 1);
      break;
    } else
      last = middle - 1;
    middle = (first + last) / 2;
  }
  if (first > last)
    printf("Not found! %d is not present in the list.\n", search);
  return 0;
}
```