user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %r13
  lea    D70(%rip),%r13
  push   %r12
  lea    D29(%rip),%r12
  push   %rbp
  lea    D66(%rip),%rbp
  push   %rbx
  lea    D20(%rip),%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L17:
  cmpl   $0x5,0x4(%rsp)
  je     L28
L75:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D1(%rip),%rdi
  call   <printf@plt>
  lea    D72(%rip),%rdi
  call   <printf@plt>
  lea    D61(%rip),%rdi
  call   <printf@plt>
  lea    D11(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D39(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x5,0x4(%rsp)
  ja     L3
  mov    0x4(%rsp),%eax
  lea    D73(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <mips@plt>
  cmpl   $0x5,0x4(%rsp)
  jne    L75
  nopw   0x0(%rax,%rax,1)
L28:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
  xor    %eax,%eax
  call   <executionTime@plt>
  jmp    L17
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <calcCPI@plt>
  jmp    L17
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <insertParams@plt>
  jmp    L17
L3:
  lea    D36(%rip),%rdi
  call   <printf@plt>
  jmp    L17
L77:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D70
datatype: string
name: parse_data
arguments: label: D29
datatype: string
name: parse_data
arguments: label: D66
datatype: string
name: parse_data
arguments: label: D20
datatype: string
name: parse_data
arguments: label: D1
datatype: string
name: parse_data
arguments: label: D72
datatype: string
name: parse_data
arguments: label: D61
datatype: string
name: parse_data
arguments: label: D11
datatype: string
name: parse_data
arguments: label: D39
datatype: string
name: parse_data
arguments: label: D36
datatype: string

tool: D70: 
Menu of Options

tool: D29: 
---------------

tool: D66: 
1) Enter parameters

tool: D20: 
2) Calculate average CPI of a sequence of instructions

tool: D1: 
3) Calculate total execution time of a sequence of instructions

tool: D72: 
4) Calculate MIPS of a sequence of instructions

tool: D61: 
5) Quit



tool: D11: Enter selection: 

tool: D39: %d

tool: D36: 
Please enter a valid input (1-5)

assistant: ```c
int main() {
  int choice;
  while (choice != 5) {
    printf("\nMenu of Options");
    printf("\n---------------");
    printf("\n1) Enter parameters");
    printf("\n2) Calculate average CPI of a sequence of instructions");
    printf("\n3) Calculate total execution time of a sequence of instructions");
    printf("\n4) Calculate MIPS of a sequence of instructions");
    printf("\n5) Quit\n\n");
    printf("Enter selection: ");
    scanf("%d", &choice);
    switch (choice) {
    case 1:
      insertParams();
      break;
    case 2:
      calcCPI();
      break;
    case 3:
      executionTime();
      break;
    case 4:
      mips();
      break;
    case 5:
      break;
    default:
      printf("\nPlease enter a valid input (1-5)");
    }
  }
  return 0;
}
```