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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xd4(%rbp)
L55:
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D80(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xd8(%rbp),%rax
  mov    %rax,%rsi
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xd8(%rbp),%eax
  cmp    $0x4,%eax
  ja     L24
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D73(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D73(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L68
  lea    -0xd4(%rbp),%rdx
  lea    -0xd0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <accept@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L68
  mov    -0xd4(%rbp),%edx
  lea    -0xd0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L68
  mov    -0xd4(%rbp),%edx
  lea    -0xd0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <qiksort@plt>
  mov    -0xd4(%rbp),%edx
  lea    -0xd0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L68
  mov    -0xd4(%rbp),%edx
  lea    -0xd0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mrgsort@plt>
  mov    -0xd4(%rbp),%edx
  lea    -0xd0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <display@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L68
L24:
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
L68:
  mov    -0xd8(%rbp),%eax
  test   %eax,%eax
  jne    L55
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D23
type: string
name: disassemble_data
arguments: tag: D6
type: string
name: disassemble_data
arguments: tag: D35
type: string
name: disassemble_data
arguments: tag: D15
type: string
name: disassemble_data
arguments: tag: D70
type: string
name: disassemble_data
arguments: tag: D80
type: string
name: disassemble_data
arguments: tag: D50
type: string
name: disassemble_data
arguments: tag: D105
type: string
name: disassemble_data
arguments: tag: D44
type: string

tool: D23: What would you like to do?

tool: D6:  ( 0) Exit

tool: D35:  ( 1) Populate Array

tool: D15:  ( 2) Print

tool: D70:  ( 3) Quick Sort

tool: D80:  ( 4) Merge Sort

tool: D50:  %u%*c

tool: D105: Bye!

tool: D44: 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;
}
```