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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L119:
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x14(%rbp),%eax
  cmp    $0x8,%eax
  je     L29
  mov    -0x14(%rbp),%eax
  cmp    $0x7,%eax
  ja     L119
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D54(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D54(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <insertbeg@plt>
  mov    $0x0,%eax
  call   <display@plt>
  jmp    L38
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <insertend@plt>
  mov    $0x0,%eax
  call   <display@plt>
  jmp    L38
  lea    D120(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <deleteele@plt>
  mov    $0x0,%eax
  call   <display@plt>
  jmp    L38
  mov    $0x0,%eax
  call   <count@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%esi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L38
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <search@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x1,-0xc(%rbp)
  jne    L106
  lea    D130(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L38
L106:
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L38
  mov    $0x0,%eax
  call   <reverse@plt>
  mov    $0x0,%eax
  call   <display@plt>
  jmp    L38
  mov    $0x0,%eax
  call   <display@plt>
  nop
L38:
  jmp    L119
L29:
  nop
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D47
data_type: string
name: extract_symbolic_data
arguments: label: D83
data_type: string
name: extract_symbolic_data
arguments: label: D77
data_type: string
name: extract_symbolic_data
arguments: label: D120
data_type: string
name: extract_symbolic_data
arguments: label: D76
data_type: string
name: extract_symbolic_data
arguments: label: D18
data_type: string
name: extract_symbolic_data
arguments: label: D130
data_type: string
name: extract_symbolic_data
arguments: label: D147
data_type: string

tool: D47: Enter choice: 1. Insertbeg 2. Insertend 3. Delete ele 4. Count 5. Search 6. Reverse 7. Display 8. Exit - 

tool: D83: %d

tool: D77: Enter element to be inserted

tool: D120: Enter element to be deleted

tool: D76: Count = %d

tool: D18: Enter element to be searched

tool: D130: Element found

tool: D147: Element not found

assistant: ```c
void main() {
  int ch, ele, z;
  while (1) {
    printf("Enter choice: 1. Insertbeg 2. Insertend 3. Delete ele 4. Count 5. Search 6. Reverse 7. Display 8. Exit - ");
    scanf("%d", &ch);
    if (ch == 8)
      break;
    switch (ch) {
    case 1:
      printf("Enter element to be inserted\n");
      scanf("%d", &ele);
      insertbeg(ele);
      display();
      break;
    case 2:
      printf("Enter element to be inserted\n");
      scanf("%d", &ele);
      insertend(ele);
      display();
      break;
    case 3:
      printf("Enter element to be deleted\n");
      scanf("%d", &ele);
      deleteele(ele);
      display();
      break;
    case 4:
      z = count();
      printf("Count = %d", z);
      break;
    case 5:
      printf("Enter element to be searched\n");
      scanf("%d", &ele);
      z = search(ele);
      if (z == 1)
        printf("Element found\n");
      else
        printf("Element not found\n");
      break;
    case 6:
      reverse();
      display();
      break;
    case 7:
      display();
      break;
    }
  }
}
```