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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    D2(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  lea    D30(%rip),%rdi
  call   <scanf@plt>
  lea    D108(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L164
  lea    0x10(%rsp),%rbx
  mov    %rbx,%r12
  mov    $0x0,%ebp
  lea    D30(%rip),%r13
L144:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  add    $0x1,%ebp
  mov    0x8(%rsp),%edi
  add    $0x4,%r12
  cmp    %ebp,%edi
  jg     L144
  test   %edi,%edi
  jle    L164
  sub    $0x1,%edi
  lea    0x4(%rbx),%r8
  jmp    L161
L11:
  add    $0x4,%rax
  cmp    %rsi,%rax
  je     L129
L1:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L11
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
  jmp    L11
L178:
  sub    $0x1,%edi
  cmp    $0xffffffff,%edi
  jne    L161
L164:
  lea    D11(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x8(%rsp)
  jle    L88
  mov    $0x0,%ebx
  lea    D95(%rip),%rbp
L85:
  mov    0x10(%rsp,%rbx,4),%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %ebx,0x8(%rsp)
  jg     L85
L88:
  lea    D53(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  lea    D30(%rip),%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%esi
  mov    0xc(%rsp),%ecx
  mov    $0x1,%edx
  jmp    L77
L43:
  lea    0x1(%rbx),%edi
  cmovl  %edi,%edx
L63:
  cmp    %esi,%edx
  jg     L156
  cmp    %ecx,%eax
  je     L156
L77:
  lea    (%rdx,%rsi,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  movslq %ebx,%rax
  mov    0x10(%rsp,%rax,4),%eax
  cmp    %ecx,%eax
  jle    L43
  lea    -0x1(%rbx),%esi
  jmp    L63
L156:
  cmp    %ecx,%eax
  je     L26
  lea    D5(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L31:
  mov    $0x0,%eax
  call   <getch@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L107
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L26:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  lea    0x1(%rbx),%esi
  lea    D55(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L31
L129:
  sub    $0x1,%edi
L161:
  test   %edi,%edi
  jle    L178
  lea    -0x1(%rdi),%eax
  lea    (%r8,%rax,4),%rsi
  mov    %rbx,%rax
  jmp    L1
L107:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D2
data_type: string
name: parse_data
arguments: tag: D30
data_type: string
name: parse_data
arguments: tag: D108
data_type: string
name: parse_data
arguments: tag: D11
data_type: string
name: parse_data
arguments: tag: D95
data_type: string
name: parse_data
arguments: tag: D53
data_type: string
name: parse_data
arguments: tag: D5
data_type: string
name: parse_data
arguments: tag: D41
data_type: string
name: parse_data
arguments: tag: D55
data_type: string

tool: D2: Enter the value of num 

tool: D30: %d

tool: D108: Enter the elements one by one 

tool: D11: Sorted array is...

tool: D95: %d


tool: D53: Enter the element to be searched 

tool: D5: SEARCH FAILED! 
 Number not found.

tool: D41: SEARCH SUCCESSFUL 

tool: D55: Number Located at position:%d 

assistant: ```c
void main() {
  int array[10];
  int i, j, num, temp, keynum;
  int low, mid, high;
  printf("Enter the value of num \n");
  scanf("%d", &num);
  printf("Enter the elements one by one \n");
  for (i = 0; i < num; i++) {
    scanf("%d", &array[i]);
  }
  for (i = 0; i < num; i++) {
    for (j = 0; j < (num - i - 1); j++) {
      if (array[j] > array[j + 1]) {
        temp = array[j];
        array[j] = array[j + 1];
        array[j + 1] = temp;
      }
    }
  }
  printf("Sorted array is...\n");
  for (i = 0; i < num; i++) {
    printf("%d\n", array[i]);
  }
  printf("Enter the element to be searched \n");
  scanf("%d", &keynum);
  low = 1;
  high = num;
  do {
    mid = (low + high) / 2;
    if (keynum < array[mid])
      high = mid - 1;
    else if (keynum > array[mid])
      low = mid + 1;
  } while (keynum != array[mid] && low <= high);
  if (keynum == array[mid]) {
    printf("SEARCH SUCCESSFUL \n");
    printf("Number Located at position:%d ", mid + 1);
  } else {
    printf("SEARCH FAILED! \n Number not found.");
  }
  getch();
}
```