user: Translate the below assembly code into C programming language:

```asm
<mainmenu>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D114(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x9(%rbp),%rax
  mov    %rax,%rsi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x9(%rbp),%eax
  movsbl %al,%eax
  cmp    $0x6,%eax
  ja     L72
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D67(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D67(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <file_menu@plt>
  jmp    L72
  mov    $0x0,%eax
  call   <mod_menu@plt>
  jmp    L72
  mov    $0x0,%eax
  call   <calc_menu@plt>
  jmp    L72
  mov    $0x0,%eax
  call   <sort_menu@plt>
  jmp    L72
  mov    $0x0,%eax
  call   <query_menu@plt>
  jmp    L72
  mov    $0x0,%eax
  call   <output_menu@plt>
  jmp    L72
  mov    $0x0,%edi
  call   <exit@plt>
  nop
L72:
  nop
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D49
datatype: string
name: disassemble_data
arguments: tag: D52
datatype: string
name: disassemble_data
arguments: tag: D3
datatype: string
name: disassemble_data
arguments: tag: D124
datatype: string
name: disassemble_data
arguments: tag: D25
datatype: string
name: disassemble_data
arguments: tag: D105
datatype: string
name: disassemble_data
arguments: tag: D31
datatype: string
name: disassemble_data
arguments: tag: D114
datatype: string
name: disassemble_data
arguments: tag: D37
datatype: string
name: disassemble_data
arguments: tag: D62
datatype: string
name: disassemble_data
arguments: tag: D40
datatype: string

tool: D49: * * * * * * * * * * * * * * * * * * *


tool: D52: *           Main Menu               *


tool: D3: * 1. File                           *


tool: D124: * 2. Modify                         *


tool: D25: * 3. Calculate                      *


tool: D105: * 4. Sort                           *


tool: D31: * 5. Query                          *


tool: D114: * 6. Output                         *


tool: D37: * 0. Exit                           *


tool: D62: Please enter your choice:

tool: D40: %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;
  }
}
```