user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D51(%rip),%rdi
  mov    %rsp,%rbp
  push   %r14
  lea    D40(%rip),%r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x30(%rbp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  movslq -0x30(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rax,%rsi
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L33
L25:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L25
L33:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L51
L30:
  xor    %eax,%eax
  lea    D19(%rip),%rdi
  mov    %rsp,%r13
  call   <printf@plt>
  cmpl   $0x0,-0x30(%rbp)
  jle    L43
  mov    %r13,%r12
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L127:
  mov    %r12,%rsi
  mov    %r14,%rdi
  add    $0x1,%ebx
  add    $0x4,%r12
  call   <scanf@plt>
  cmp    %ebx,-0x30(%rbp)
  jg     L127
L43:
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    -0x2c(%rbp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    -0x30(%rbp),%ebx
  sub    $0x1,%ebx
  js     L107
  mov    -0x2c(%rbp),%edx
  xor    %r12d,%r12d
  jmp    L16
  nopl   0x0(%rax)
L9:
  lea    0x1(%rsi),%r12d
  cmp    %r12d,%ebx
  jl     L107
L16:
  lea    (%rbx,%r12,1),%esi
  sar    %esi
  movslq %esi,%rax
  cmp    %edx,0x0(%r13,%rax,4)
  jl     L9
  je     L117
  lea    -0x1(%rsi),%ebx
  cmp    %r12d,%ebx
  jge    L16
L107:
  lea    D5(%rip),%rdi
  call   <puts@plt>
L18:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  lea    -0x20(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopl   (%rax)
L117:
  add    $0x1,%esi
  xor    %eax,%eax
  lea    D37(%rip),%rdi
  call   <printf@plt>
  cmp    %r12d,%ebx
  jge    L18
  jmp    L107
L51:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L30
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D51
type_infered: string
name: extract_symbolic_data
arguments: label: D40
type_infered: string
name: extract_symbolic_data
arguments: label: D19
type_infered: string
name: extract_symbolic_data
arguments: label: D24
type_infered: string
name: extract_symbolic_data
arguments: label: D5
type_infered: string
name: extract_symbolic_data
arguments: label: D37
type_infered: string

tool: D51: Enter the length of the array: 

tool: D40: %d

tool: D19: Enter %d elements of the array in ascending order: 


tool: D24: Enter number to find: 

tool: D5: Not found

tool: D37: Found at location %d.


assistant: ```c
int main() {
  int i, first, last, mid, length, number;
  printf("Enter the length of the array: ");
  scanf("%d", &length);
  int array[length];
  printf("Enter %d elements of the array in ascending order: \n", length);
  for (i = 0; i < length; i++)
    scanf("%d", &array[i]);
  printf("Enter number to find: ");
  scanf("%d", &number);
  first = 0;
  last = length - 1;
  while (first <= last) {
    mid = (first + last) / 2;
    if (array[mid] < number)
      first = mid + 1;
    else if (array[mid] == number) {
      printf("Found at location %d.\n", mid + 1);
      break;
    } else
      last = mid - 1;
  }
  if (first > last)
    printf("Not found\n");
}
```