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

```asm
<mainmenu>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D34(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D110(%rip),%rdi
  call   <printf@plt>
  lea    D54(%rip),%rdi
  call   <printf@plt>
  lea    D27(%rip),%rdi
  call   <printf@plt>
  lea    D87(%rip),%rdi
  call   <printf@plt>
  lea    D103(%rip),%rdi
  call   <printf@plt>
  lea    D112(%rip),%rdi
  call   <printf@plt>
  lea    D97(%rip),%rdi
  call   <printf@plt>
  lea    D68(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D80(%rip),%rdi
  call   <printf@plt>
  lea    0x7(%rsp),%rsi
  lea    D117(%rip),%rdi
  call   <scanf@plt>
  cmpb   $0x6,0x7(%rsp)
  ja     L41
  movzbl 0x7(%rsp),%eax
  lea    D47(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <file_menu@plt>
L41:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  ret
  mov    $0x0,%eax
  call   <mod_menu@plt>
  jmp    L41
  mov    $0x0,%eax
  call   <calc_menu@plt>
  jmp    L41
  mov    $0x0,%eax
  call   <sort_menu@plt>
  jmp    L41
  mov    $0x0,%eax
  call   <query_menu@plt>
  jmp    L41
  mov    $0x0,%eax
  call   <output_menu@plt>
  jmp    L41
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L41
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D34
type: string
name: read_data
arguments: data_label: D110
type: string
name: read_data
arguments: data_label: D54
type: string
name: read_data
arguments: data_label: D27
type: string
name: read_data
arguments: data_label: D87
type: string
name: read_data
arguments: data_label: D103
type: string
name: read_data
arguments: data_label: D112
type: string
name: read_data
arguments: data_label: D97
type: string
name: read_data
arguments: data_label: D68
type: string
name: read_data
arguments: data_label: D80
type: string
name: read_data
arguments: data_label: D117
type: string

tool: D34: * * * * * * * * * * * * * * * * * * *


tool: D110: *           Main Menu               *


tool: D54: * 1. File                           *


tool: D27: * 2. Modify                         *


tool: D87: * 3. Calculate                      *


tool: D103: * 4. Sort                           *


tool: D112: * 5. Query                          *


tool: D97: * 6. Output                         *


tool: D68: * 0. Exit                           *


tool: D80: Please enter your choice:

tool: D117: %d

assistant: ```c
int mainmenu() {
  char sel;
  printf("* * * * * * * * * * * * * * * * * * *\n");
  printf("*           Main Menu               *\n");
  printf("* 1. File                           *\n");
  printf("* 2. Modify                         *\n");
  printf("* 3. Calculate                      *\n");
  printf("* 4. Sort                           *\n");
  printf("* 5. Query                          *\n");
  printf("* 6. Output                         *\n");
  printf("* 0. Exit                           *\n");
  printf("* * * * * * * * * * * * * * * * * * *\n");
  printf("Please enter your choice:");
  scanf("%d", &sel);
  switch (sel) {
  case 1:
    file_menu();
    break;
  case 2:
    mod_menu();
    break;
  case 3:
    calc_menu();
    break;
  case 4:
    sort_menu();
    break;
  case 5:
    query_menu();
    break;
  case 6:
    output_menu();
    break;
  case 0:
    exit(0);
    break;
  }
}
```