user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D118(%rip),%rdi
  call   <printf@plt>
  lea    D70(%rip),%rdi
  call   <printf@plt>
  lea    D23(%rip),%rdi
  call   <printf@plt>
  lea    D31(%rip),%rdi
  call   <printf@plt>
  lea    D139(%rip),%rdi
  call   <printf@plt>
  lea    D96(%rip),%rdi
  call   <printf@plt>
  lea    D21(%rip),%rdi
  call   <printf@plt>
  lea    D121(%rip),%rdi
  call   <printf@plt>
  lea    D137(%rip),%rdi
  call   <printf@plt>
  lea    D91(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D20(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x9,%eax
  jg     L64
  lea    D72(%rip),%rbx
  lea    D44(%rip),%r13
  lea    0x4(%rsp),%r12
  lea    D20(%rip),%rbp
  jmp    L73
  mov    $0x0,%eax
  call   <insert_first@plt>
L77:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x9,%eax
  jg     L64
L73:
  cmp    $0x9,%eax
  ja     L77
  mov    %eax,%eax
  movslq (%rbx,%rax,4),%rax
  add    %rbx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <insert_last@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <delete_first@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <delete_last@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <insert_info@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <insert_pos@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <display@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <sort@plt>
  jmp    L77
  mov    $0x0,%eax
  call   <insert_node@plt>
  jmp    L77
L64:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L115
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L115:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D118
type_guessed: string
name: read_data
arguments: tag: D70
type_guessed: string
name: read_data
arguments: tag: D23
type_guessed: string
name: read_data
arguments: tag: D31
type_guessed: string
name: read_data
arguments: tag: D139
type_guessed: string
name: read_data
arguments: tag: D96
type_guessed: string
name: read_data
arguments: tag: D21
type_guessed: string
name: read_data
arguments: tag: D121
type_guessed: string
name: read_data
arguments: tag: D137
type_guessed: string
name: read_data
arguments: tag: D91
type_guessed: string
name: read_data
arguments: tag: D20
type_guessed: string
name: read_data
arguments: tag: D44
type_guessed: string

tool: D118: MAIN MENU 


tool: D70: 1.INSERT AT BEGINING 


tool: D23: 2.INSERT AT LAST 


tool: D31: 3.DELETE AT BEGINING 


tool: D139: 4.DELETE AT LAST 


tool: D96: 5.SEARCH INFO


tool: D21: 6.SEARCH POSITION 


tool: D121: 7.DISPLAY 


tool: D137: 8.SORT 


tool: D91: ENTER YOUR CHOICE 


tool: D20: %d

tool: D44: 
 ENTER YOUR CHOICE 


assistant: ```c
int main() {
  char ch;
  int choice;
  printf("MAIN MENU \n");
  printf("1.INSERT AT BEGINING \n");
  printf("2.INSERT AT LAST \n");
  printf("3.DELETE AT BEGINING \n");
  printf("4.DELETE AT LAST \n");
  printf("5.SEARCH INFO\n");
  printf("6.SEARCH POSITION \n");
  printf("7.DISPLAY \n");
  printf("8.SORT \n");
  printf("ENTER YOUR CHOICE \n");
  scanf("%d", &choice);
  while (choice < 10) {
    switch (choice) {
    case 1:
      insert_first();
      break;
    case 2:
      insert_last();
      break;
    case 3:
      delete_first();
      break;
    case 4:
      delete_last();
      break;
    case 5:
      insert_info();
      break;
    case 6:
      insert_pos();
      break;
    case 7:
      display();
      break;
    case 8:
      sort();
      break;
    case 9:
      insert_node();
      break;
    }
    printf("\n ENTER YOUR CHOICE \n");
    scanf("%d", &choice);
  }
  return 0;
}
```