user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <init@plt>
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x38(%rbp)
  jmp    L23
L83:
  lea    -0x30(%rbp),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x38(%rbp)
L23:
  cmpl   $0x9,-0x38(%rbp)
  jle    L83
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x38(%rbp)
  jmp    L48
L62:
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%edi
  call   <lsearch@plt>
  mov    %eax,-0x34(%rbp)
  cmpl   $0x100,-0x34(%rbp)
  je     L79
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L80
L79:
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    -0x34(%rbp),%edx
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L80:
  addl   $0x1,-0x38(%rbp)
L48:
  cmpl   $0x9,-0x38(%rbp)
  jle    L62
  mov    $0x0,%eax
  call   <sort@plt>
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x38(%rbp)
  jmp    L27
L21:
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,%edi
  call   <bsearch@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    -0x34(%rbp),%edx
  mov    %eax,%esi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x38(%rbp)
L27:
  cmpl   $0x9,-0x38(%rbp)
  jle    L21
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D65
data_type: string
name: extract_symbolic_data
arguments: data_tag: D16
data_type: string
name: extract_symbolic_data
arguments: data_tag: D39
data_type: string
name: extract_symbolic_data
arguments: data_tag: D24
data_type: string
name: extract_symbolic_data
arguments: data_tag: D62
data_type: string

tool: D65: 
Enter the 10 no.s to be searched 

tool: D16: %d

tool: D39: 
No. of comparisons for linear search

tool: D24: 
For %d comparisons are %d

tool: D62: 
No. of comparisons for binary search

assistant: ```c
int main() {
  int b[10], ans, i;
  init();
  printf("\nEnter the 10 no.s to be searched ");
  for (i = 0; i < 10; i++)
    scanf("%d", &b[i]);
  printf("\nNo. of comparisons for linear search\n");
  for (i = 0; i < 10; i++) {
    ans = lsearch(b[i]);
    if (ans != 256)
      printf("\nFor %d comparisons are %d", b[i], ans + 1);
    else
      printf("\nFor %d comparisons are %d", b[i], ans);
  }
  sort();
  printf("\nNo. of comparisons for binary search\n");
  for (i = 0; i < 10; i++) {
    ans = bsearch(b[i]);
    printf("\nFor %d comparisons are %d", b[i], ans);
  }
  return 0;
}
```