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

```asm
<MainMenu>:
  endbr64
  push   %r15
  lea    D38(%rip),%r15
  push   %r14
  lea    D4(%rip),%r14
  push   %r13
  lea    D99(%rip),%r13
  push   %r12
  lea    D85(%rip),%r12
  push   %rbp
  lea    D37(%rip),%rbp
  push   %rbx
  lea    D34(%rip),%rbx
  sub    $0x128,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rax
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax)
L67:
  mov    %r15,%rdi
  call   <puts@plt>
  mov    %r14,%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D3(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <LeddarGetKey@plt>
  mov    %eax,%edi
  call   <toupper@plt>
  sub    $0x1b,%eax
  cmp    $0x36,%eax
  ja     L67
  lea    D57(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x128,%rsp
  lea    D56(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <puts@plt>
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <ConfigureRecordingMenu@plt>
  jmp    L67
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <ReplayMenu@plt>
  jmp    L67
  nopl   0x0(%rax)
  mov    0x8(%rsp),%rsi
  mov    $0xff,%edx
  lea    D108(%rip),%rdi
  call   <ListSensors@plt>
  mov    0x8(%rsp),%rsi
  mov    $0xff,%edx
  lea    D23(%rip),%rdi
  call   <ListSensors@plt>
  jmp    L67
  nopl   0x0(%rax)
  mov    $0x1,%edi
  call   <ConnectMenu@plt>
  jmp    L67
  nopw   0x0(%rax,%rax,1)
  xor    %edi,%edi
  call   <ConnectMenu@plt>
  jmp    L67
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D38
type_guessed: string
name: retrieve_data
arguments: tag: D4
type_guessed: string
name: retrieve_data
arguments: tag: D99
type_guessed: string
name: retrieve_data
arguments: tag: D85
type_guessed: string
name: retrieve_data
arguments: tag: D37
type_guessed: string
name: retrieve_data
arguments: tag: D34
type_guessed: string
name: retrieve_data
arguments: tag: D3
type_guessed: string
name: retrieve_data
arguments: tag: D56
type_guessed: string
name: retrieve_data
arguments: tag: D108
type_guessed: string
name: retrieve_data
arguments: tag: D23
type_guessed: string

tool: D38: 

Main Menu

tool: D4:   1. Connect

tool: D99:   2. Connect to single USB sensor

tool: D85:   3. List Sensors

tool: D37:   4. Replay Record

tool: D34:   5. Configure Recording

tool: D3:   6. Quit

tool: D56: 
*** Goodbye! ***

tool: D108: USB

tool: D23: SERIAL

assistant: ```c
void MainMenu(void) {
  for (;;) {
    int lChoice;
    puts("\n\nMain Menu");
    puts("  1. Connect");
    puts("  2. Connect to single USB sensor");
    puts("  3. List Sensors");
    puts("  4. Replay Record");
    puts("  5. Configure Recording");
    puts("  6. Quit");
    lChoice = toupper(LeddarGetKey());
    switch (lChoice) {
    case '1':
      ConnectMenu(0);
      break;
    case '2':
      ConnectMenu(1);
      break;
    case '3': {
      char lAddresses[256];
      ListSensors("USB", lAddresses, 255);
      ListSensors("SERIAL", lAddresses, 255);
      break;
    }
    case '4':
      ReplayMenu();
      break;
    case '5':
      ConfigureRecordingMenu();
      break;
    case '6':
    case 'Q':
    case 27:
      puts("\n*** Goodbye! ***");
      return;
    }
  }
}
```