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

```asm
<main>:
  endbr64
  push   %r15
  lea    D39(%rip),%rsi
  lea    D15(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <InitialisationAvecService@plt>
  cmp    $0x1,%eax
  je     L83
  lea    D72(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
L83:
  lea    D77(%rip),%r12
  lea    0x4(%rsp),%rbp
  lea    D31(%rip),%rbx
  lea    D68(%rip),%r15
  lea    D21(%rip),%r14
  lea    D4(%rip),%r13
L34:
  mov    %r15,%rdi
  call   <printf@plt>
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L0:
  mov    %r12,%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <vider_buffer@plt>
L99:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L0
  xor    %eax,%eax
  call   <vider_buffer@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x2,%eax
  je     L56
  cmp    $0x3,%eax
  je     L49
  cmp    $0x1,%eax
  je     L4
  lea    D83(%rip),%rdi
  call   <printf@plt>
L68:
  movl   $0x63,0x4(%rsp)
  jmp    L34
  nop
L56:
  xor    %eax,%eax
  call   <menu_enregistrement@plt>
  jmp    L68
  nopl   0x0(%rax)
L4:
  xor    %eax,%eax
  call   <menu_reservation@plt>
  jmp    L68
  nopl   0x0(%rax)
L49:
  xor    %eax,%eax
  movl   $0x63,0x4(%rsp)
  call   <Terminaison@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D39
type_infered: string
name: disassemble_data
arguments: data_tag: D15
type_infered: string
name: disassemble_data
arguments: data_tag: D72
type_infered: string
name: disassemble_data
arguments: data_tag: D77
type_infered: string
name: disassemble_data
arguments: data_tag: D31
type_infered: string
name: disassemble_data
arguments: data_tag: D68
type_infered: string
name: disassemble_data
arguments: data_tag: D21
type_infered: string
name: disassemble_data
arguments: data_tag: D4
type_infered: string
name: disassemble_data
arguments: data_tag: D83
type_infered: string

tool: D39: 12321

tool: D15: 127.0.0.1

tool: D72: Erreur d'initialisation


tool: D77: 

 Entrez votre choix: 

tool: D31: %1d

tool: D68: 



		**** MENU ****

tool: D21: 
	------------------------------

tool: D4: 
	1. Reserver une chambre 
	2. S'enregistrer en tant qu'hotel
	3. Quitter


tool: D83: 
Selection invalide ... veuillez reesayer.


assistant: ```c
int main() {
  int choix;
  int fini = 1;
  if (InitialisationAvecService("127.0.0.1", "12321") != 1) {
    printf("Erreur d'initialisation\n");
    exit(0);
  }
  while (fini) {
    printf("\n\n\n\n\t\t**** MENU ****");
    printf("\n\t------------------------------");
    printf("\n\t1. Reserver une chambre \n\t2. S'enregistrer en tant qu'hotel\n\t3. Quitter\n");
    printf("\n\n Entrez votre choix: ");
    while (scanf("%1d", &choix) != 1) {
      printf("\n\n Entrez votre choix: ");
      vider_buffer();
    }
    vider_buffer();
    switch (choix) {
    case 1:
      menu_reservation();
      break;
    case 2:
      menu_enregistrement();
      break;
    case 3:
      fini = 0;
      break;
    default:
      printf("\nSelection invalide ... veuillez reesayer.\n");
    }
    choix = 99;
  }
  Terminaison();
  return 0;
}
```