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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <adainit@plt>
  lea    D18(%rip),%rdi
  call   <printf@plt>
  lea    D5(%rip),%rdi
  call   <printf@plt>
  lea    D22(%rip),%rdi
  call   <printf@plt>
  lea    D30(%rip),%rdi
  call   <printf@plt>
  lea    D12(%rip),%rdi
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    D53(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    0xf(%rsp),%rsi
  lea    D33(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D39(%rip),%rdi
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x10(%rsp),%eax
  cmp    $0x1,%eax
  je     L55
  cmp    $0x2,%eax
  je     L68
  cmp    $0x3,%eax
  je     L7
  lea    D35(%rip),%rdi
  call   <printf@plt>
L35:
  mov    $0x0,%eax
  call   <adafinal@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  mov    $0x0,%eax
  add    $0x20,%rsp
  pop    %rbx
  ret
L55:
  mov    0x14(%rsp),%edi
  call   <test_standard_multiplicity_structure@plt>
  jmp    L35
L68:
  mov    0x14(%rsp),%edi
  call   <test_dobldobl_multiplicity_structure@plt>
  jmp    L35
L7:
  mov    0x14(%rsp),%edi
  call   <test_quaddobl_multiplicity_structure@plt>
  jmp    L35
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D18
type_infered: string
name: retrieve_data
arguments: label: D5
type_infered: string
name: retrieve_data
arguments: label: D22
type_infered: string
name: retrieve_data
arguments: label: D30
type_infered: string
name: retrieve_data
arguments: label: D12
type_infered: string
name: retrieve_data
arguments: label: D53
type_infered: string
name: retrieve_data
arguments: label: D33
type_infered: string
name: retrieve_data
arguments: label: D39
type_infered: string
name: retrieve_data
arguments: label: D35
type_infered: string

tool: D18: 
MENU to compute the multiplicity structure : 


tool: D5:   1. test with standard double arithmetic;


tool: D22:   2. test with double double arithmetic;


tool: D30:   3. test with quad double arithmetic.


tool: D12: Type 0, 1, 2, or 3 to select : 

tool: D53: %d

tool: D33: %c

tool: D39: Give the maximum differentiation order : 

tool: D35: invalid selection, please try again


assistant: ```c
int main(int argc, char *argv[]) {
  int choice, order;
  char ch;
  adainit();
  printf("\nMENU to compute the multiplicity structure : \n");
  printf("  1. test with standard double arithmetic;\n");
  printf("  2. test with double double arithmetic;\n");
  printf("  3. test with quad double arithmetic.\n");
  printf("Type 0, 1, 2, or 3 to select : ");
  scanf("%d", &choice);
  scanf("%c", &ch);
  printf("Give the maximum differentiation order : ");
  scanf("%d", &order);
  if (choice == 1)
    test_standard_multiplicity_structure(order);
  else if (choice == 2)
    test_dobldobl_multiplicity_structure(order);
  else if (choice == 3)
    test_quaddobl_multiplicity_structure(order);
  else
    printf("invalid selection, please try again\n");
  adafinal();
  return 0;
}
```