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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xd8(%rsp)
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  lea    D84(%rip),%r13
  lea    D7(%rip),%r12
  lea    D19(%rip),%rbp
  lea    D77(%rip),%rbx
  jmp    L23
  lea    D22(%rip),%rdi
  call   <puts@plt>
L77:
  cmpl   $0x0,0x8(%rsp)
  je     L18
L23:
  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    D36(%rip),%rdi
  call   <puts@plt>
  lea    D79(%rip),%rdi
  call   <puts@plt>
  lea    0x8(%rsp),%rsi
  lea    D81(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x4,0x8(%rsp)
  ja     L66
  mov    0x8(%rsp),%eax
  lea    D67(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    0xc(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  call   <accept@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L77
  lea    0x10(%rsp),%rdi
  mov    0xc(%rsp),%esi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L77
  lea    0x10(%rsp),%r14
  mov    0xc(%rsp),%esi
  mov    %r14,%rdi
  call   <qiksort@plt>
  mov    0xc(%rsp),%esi
  mov    %r14,%rdi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L77
  lea    0x10(%rsp),%r14
  mov    0xc(%rsp),%esi
  mov    %r14,%rdi
  call   <mrgsort@plt>
  mov    0xc(%rsp),%esi
  mov    %r14,%rdi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L77
L66:
  lea    D93(%rip),%rdi
  call   <puts@plt>
  jmp    L77
L18:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0xd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  mov    $0x0,%eax
  add    $0xe0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D84
type: string
name: extract_symbolic_data
arguments: label: D7
type: string
name: extract_symbolic_data
arguments: label: D19
type: string
name: extract_symbolic_data
arguments: label: D77
type: string
name: extract_symbolic_data
arguments: label: D22
type: string
name: extract_symbolic_data
arguments: label: D36
type: string
name: extract_symbolic_data
arguments: label: D79
type: string
name: extract_symbolic_data
arguments: label: D81
type: string
name: extract_symbolic_data
arguments: label: D93
type: string

tool: D84: What would you like to do?

tool: D7:  ( 0) Exit

tool: D19:  ( 1) Populate Array

tool: D77:  ( 2) Print

tool: D22: Bye!

tool: D36:  ( 3) Quick Sort

tool: D79:  ( 4) Merge Sort

tool: D81:  %u%*c

tool: D93: Incorrect Choice!

assistant: ```c
int main() {
  unsigned ch, n = 0;
  int a[50];
  do {
    puts("What would you like to do?");
    puts(" ( 0) Exit");
    puts(" ( 1) Populate Array");
    puts(" ( 2) Print");
    puts(" ( 3) Quick Sort");
    puts(" ( 4) Merge Sort");
    scanf(" %u%*c", &ch);
    switch (ch) {
    case 0:
      puts("Bye!");
      break;
    case 1:
      accept(a, &n);
      putchar('\n');
      break;
    case 2:
      display(a, n);
      putchar('\n');
      break;
    case 3:
      qiksort(a, n);
      display(a, n);
      putchar('\n');
      break;
    case 4:
      mrgsort(a, n);
      display(a, n);
      putchar('\n');
      break;
    default:
      puts("Incorrect Choice!");
      break;
    }
  } while (ch);
  putchar('\n');
  return 0;
}
```