user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r13
  lea    D86(%rip),%rdi
  push   %r12
  push   %rbp
  lea    D85(%rip),%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D11(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  jle    L132
  lea    0x10(%rsp),%rbx
  xor    %r12d,%r12d
  mov    %rbx,%r13
  nopl   (%rax)
L73:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  add    $0x1,%r12d
  add    $0x4,%r13
  call   <scanf@plt>
  mov    0x8(%rsp),%eax
  cmp    %r12d,%eax
  jg     L73
  test   %eax,%eax
  jle    L132
  sub    $0x1,%eax
  lea    0x4(%rbx),%r8
  test   %eax,%eax
  je     L132
  nopl   0x0(%rax,%rax,1)
L149:
  sub    $0x1,%eax
  mov    %rax,%rdi
  lea    (%r8,%rax,4),%rsi
  mov    %rbx,%rax
  nopl   (%rax)
L120:
  mov    (%rax),%edx
  mov    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L8
  mov    %ecx,(%rax)
  mov    %edx,0x4(%rax)
L8:
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L120
  mov    %edi,%eax
  test   %eax,%eax
  jne    L149
L132:
  lea    D38(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L80
  xor    %r12d,%r12d
  lea    0x10(%rsp),%rbx
  lea    D24(%rip),%r13
L97:
  mov    (%rbx,%r12,4),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12d,0x8(%rsp)
  jg     L97
L80:
  lea    D6(%rip),%rdi
  call   <puts@plt>
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    $0x1,%ecx
  jmp    L124
  nopl   0x0(%rax)
L9:
  lea    -0x1(%rbx),%edx
L2:
  cmp    %edx,%ecx
  jg     L26
L124:
  lea    (%rcx,%rdx,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  movslq %ebx,%rax
  cmp    %esi,0x10(%rsp,%rax,4)
  jg     L9
  jge    L144
  lea    0x1(%rbx),%ecx
  cmp    %edx,%ecx
  jle    L124
L26:
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L130:
  xor    %eax,%eax
  call   <getch@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L144:
  jne    L2
  lea    D36(%rip),%rdi
  call   <puts@plt>
  lea    0x1(%rbx),%esi
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L130
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D86
datatype: string
name: unpack_data
arguments: data_label: D85
datatype: string
name: unpack_data
arguments: data_label: D11
datatype: string
name: unpack_data
arguments: data_label: D38
datatype: string
name: unpack_data
arguments: data_label: D24
datatype: string
name: unpack_data
arguments: data_label: D6
datatype: string
name: unpack_data
arguments: data_label: D70
datatype: string
name: unpack_data
arguments: data_label: D36
datatype: string
name: unpack_data
arguments: data_label: D29
datatype: string

tool: D86: Enter the value of num 

tool: D85: %d

tool: D11: Enter the elements one by one 

tool: D38: Sorted array is...

tool: D24: %d


tool: D6: Enter the element to be searched 

tool: D70: SEARCH FAILED! 
 Number not found.

tool: D36: SEARCH SUCCESSFUL 

tool: D29: 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();
}
```