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

```asm
<menu>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x268,%rsp
  mov    %edi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  movl   $0x1,0x2c(%rsp)
  call   <afficherEnTete@plt>
  cmpl   $0x0,0x2c(%rsp)
  je     L60
  movb   $0x0,0x110(%rsp)
  lea    D154(%rip),%rdi
  call   <printf@plt>
  lea    D141(%rip),%rdi
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <printf@plt>
  lea    D43(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%ebx
  lea    D45(%rip),%r13
  lea    D341(%rip),%r12
  jmp    L76
L29:
  lea    D37(%rip),%rdi
  call   <printf@plt>
  lea    D130(%rip),%rdi
  call   <printf@plt>
  jmp    L76
L93:
  lea    D336(%rip),%rdi
  call   <printf@plt>
  lea    D194(%rip),%rdi
  call   <printf@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  lea    0x30(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  lea    D295(%rip),%r14
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D271(%rip),%rdi
  call   <printf@plt>
  lea    0xa0(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    %rax,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D165(%rip),%rdi
  call   <printf@plt>
  lea    0x180(%rsp),%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    0x110(%rsp),%r14
  sub    $0x8,%rsp
  push   $0x3
  mov    %r15,%r9
  mov    0x20(%rsp),%r8
  mov    0x18(%rsp),%rcx
  mov    $0x2,%edx
  lea    D335(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  mov    %ebp,%edi
  call   <lecteurResultat@plt>
  add    $0x10,%rsp
L127:
  add    $0x1,%ebx
  cmpl   $0x0,0x2c(%rsp)
  je     L60
  movb   $0x0,0x110(%rsp)
  lea    D154(%rip),%rdi
  call   <printf@plt>
  lea    D141(%rip),%rdi
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <printf@plt>
  lea    D43(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jg     L29
L76:
  lea    0x2c(%rsp),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0x0,%eax
  call   <afficherEnTete@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  je     L93
  cmp    $0x5,%eax
  ja     L127
  mov    %eax,%eax
  movslq (%r12,%rax,4),%rax
  add    %r12,%rax
  notrack jmp *%rax
  lea    D32(%rip),%rdi
  call   <printf@plt>
  lea    D194(%rip),%rdi
  call   <printf@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  lea    0x30(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  lea    D295(%rip),%r14
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D271(%rip),%rdi
  call   <printf@plt>
  lea    0xa0(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    %rax,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D138(%rip),%rdi
  call   <printf@plt>
  lea    0x180(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D52(%rip),%rdi
  call   <printf@plt>
  lea    0x1f0(%rsp),%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    0x110(%rsp),%r14
  push   $0x3
  push   %r15
  mov    0x28(%rsp),%r9
  mov    0x20(%rsp),%r8
  mov    0x18(%rsp),%rcx
  mov    $0x2,%edx
  lea    D72(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  mov    %ebp,%edi
  call   <lecteurResultat@plt>
  add    $0x10,%rsp
  jmp    L127
  lea    D242(%rip),%rdi
  call   <printf@plt>
  lea    D194(%rip),%rdi
  call   <printf@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  lea    0x30(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  lea    D295(%rip),%r14
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D271(%rip),%rdi
  call   <printf@plt>
  lea    0xa0(%rsp),%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    0x110(%rsp),%r14
  mov    $0x3,%r9d
  mov    %r15,%r8
  mov    0x8(%rsp),%rcx
  mov    $0x2,%edx
  lea    D267(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  mov    %ebp,%edi
  call   <lecteurResultat@plt>
  jmp    L127
  lea    0x110(%rsp),%r14
  mov    $0x3,%r8d
  mov    $0x34,%ecx
  mov    $0x2,%edx
  lea    D87(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  mov    %ebp,%edi
  call   <lecteurResultat@plt>
  jmp    L127
  lea    0x110(%rsp),%r14
  mov    $0x3,%r8d
  mov    $0x35,%ecx
  mov    $0x2,%edx
  lea    D87(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  mov    %ebp,%edi
  call   <lecteurResultat@plt>
  jmp    L127
  lea    0x110(%rsp),%r14
  mov    $0x3,%r8d
  mov    $0x30,%ecx
  mov    $0x2,%edx
  lea    D87(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <write@plt>
  lea    D190(%rip),%rdi
  call   <printf@plt>
  jmp    L127
L60:
  mov    0x258(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L110
  add    $0x268,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D154
type_infered: string
name: disassemble_data
arguments: data_tag: D141
type_infered: string
name: disassemble_data
arguments: data_tag: D57
type_infered: string
name: disassemble_data
arguments: data_tag: D43
type_infered: string
name: disassemble_data
arguments: data_tag: D45
type_infered: string
name: disassemble_data
arguments: data_tag: D37
type_infered: string
name: disassemble_data
arguments: data_tag: D130
type_infered: string
name: disassemble_data
arguments: data_tag: D336
type_infered: string
name: disassemble_data
arguments: data_tag: D194
type_infered: string
name: disassemble_data
arguments: data_tag: D148
type_infered: string
name: disassemble_data
arguments: data_tag: D295
type_infered: string
name: disassemble_data
arguments: data_tag: D271
type_infered: string
name: disassemble_data
arguments: data_tag: D165
type_infered: string
name: disassemble_data
arguments: data_tag: D335
type_infered: string
name: disassemble_data
arguments: data_tag: D32
type_infered: string
name: disassemble_data
arguments: data_tag: D138
type_infered: string
name: disassemble_data
arguments: data_tag: D52
type_infered: string
name: disassemble_data
arguments: data_tag: D72
type_infered: string
name: disassemble_data
arguments: data_tag: D242
type_infered: string
name: disassemble_data
arguments: data_tag: D267
type_infered: string
name: disassemble_data
arguments: data_tag: D87
type_infered: string
name: disassemble_data
arguments: data_tag: D190
type_infered: string

tool: D154: Menu (0 pour quitter) :


tool: D141:     -> 1 : Recherche du 1er train disponible


tool: D57:     -> 2 : Recherche des trains disponibles entre 2 horraires


tool: D43:     -> 3 : Recherche des trains disponibles pour un trajet


tool: D45: %d

tool: D37:     -> 4 : Trouver le meilleur tarif sur la derniere recherche


tool: D130:     -> 5 : Trouver la meilleure duree sur la derniere recherche


tool: D336: Recherche du 1er train disponible : 


tool: D194: -----------------------------------------------------


tool: D148: Ville de depart : 

tool: D295: %s

tool: D271: Ville de d'arrivee : 

tool: D165: Heure de depart (hh:mm) : 

tool: D335: %c1#%s#%s#%s%c

tool: D32: Recherche des trains disponibles entre 2 horraires :


tool: D138: Heure min (hh:mm) : 

tool: D52: Heure max (hh:mm) : 

tool: D72: %c2#%s#%s#%s#%s%c

tool: D242: Recherche des trains disponibles pour un trajet


tool: D267: %c3#%s#%s%c

tool: D87: %c%c#%c

tool: D190:          A BIENTOT

assistant: ```c
void menu(int sock) {
  char ville1[100];
  char ville2[100];
  char tram[100];
  char heure1[100];
  char heure2[100];
  char stx = 0x02;
  char etx = 0x03;
  int choix = 1;
  int cpt = 0;
  afficherEnTete();
  while (choix != 0) {
    tram[0] = '\0';
    printf("Menu (0 pour quitter) :\n");
    printf("    -> 1 : Recherche du 1er train disponible\n");
    printf("    -> 2 : Recherche des trains disponibles entre 2 horraires\n");
    printf("    -> 3 : Recherche des trains disponibles pour un trajet\n");
    if (cpt > 0) {
      printf("    -> 4 : Trouver le meilleur tarif sur la derniere recherche\n");
      printf("    -> 5 : Trouver la meilleure duree sur la derniere recherche\n");
    }
    scanf("%d", &choix);
    afficherEnTete();
    if (choix == 1) {
      printf("Recherche du 1er train disponible : \n");
      printf("-----------------------------------------------------\n");
      printf("Ville de depart : ");
      scanf("%s", ville1);
      printf("Ville de d'arrivee : ");
      scanf("%s", ville2);
      printf("Heure de depart (hh:mm) : ");
      scanf("%s", heure1);
      sprintf(tram, "%c1#%s#%s#%s%c", 0x02, ville1, ville2, heure1, 0x03);
      write(sock, tram, strlen(tram));
      lecteurResultat(sock);
    } else if (choix == 2) {
      printf("Recherche des trains disponibles entre 2 horraires :\n");
      printf("-----------------------------------------------------\n");
      printf("Ville de depart : ");
      scanf("%s", ville1);
      printf("Ville de d'arrivee : ");
      scanf("%s", ville2);
      printf("Heure min (hh:mm) : ");
      scanf("%s", heure1);
      printf("Heure max (hh:mm) : ");
      scanf("%s", heure2);
      sprintf(tram, "%c2#%s#%s#%s#%s%c", 0x02, ville1, ville2, heure1, heure2, 0x03);
      write(sock, tram, strlen(tram));
      lecteurResultat(sock);
    } else if (choix == 3) {
      printf("Recherche des trains disponibles pour un trajet\n");
      printf("-----------------------------------------------------\n");
      printf("Ville de depart : ");
      scanf("%s", ville1);
      printf("Ville de d'arrivee : ");
      scanf("%s", ville2);
      sprintf(tram, "%c3#%s#%s%c", 0x02, ville1, ville2, 0x03);
      write(sock, tram, strlen(tram));
      lecteurResultat(sock);
    } else if (choix == 4) {
      sprintf(tram, "%c%c#%c", 0x02, '4', 0x03);
      write(sock, tram, strlen(tram));
      lecteurResultat(sock);
    } else if (choix == 5) {
      sprintf(tram, "%c%c#%c", 0x02, '5', 0x03);
      write(sock, tram, strlen(tram));
      lecteurResultat(sock);
    } else if (choix == 0) {
      sprintf(tram, "%c%c#%c", 0x02, '0', 0x03);
      write(sock, tram, strlen(tram));
      printf("         A BIENTOT");
    }
    cpt++;
  }
}
```