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

```asm
<main>:
  endbr64
  push   %r15
  lea    D75(%rip),%r15
  push   %r14
  lea    D109(%rip),%r14
  push   %r13
  lea    D45(%rip),%r13
  push   %r12
  lea    D126(%rip),%r12
  push   %rbp
  lea    D16(%rip),%rbp
  push   %rbx
  lea    D30(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L89
  nopl   0x0(%rax,%rax,1)
L74:
  cmp    $0x1,%eax
  jne    L16
  lea    D117(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax)
L16:
  lea    D97(%rip),%rdi
  call   <printf@plt>
  lea    D100(%rip),%rdi
  call   <system@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L88
L89:
  mov    %r15,%rdi
  call   <system@plt>
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rsi
  lea    D73(%rip),%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  cmp    $0x2,%eax
  je     L49
  jg     L82
  test   %eax,%eax
  jne    L74
  lea    D21(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L16
  nopl   0x0(%rax,%rax,1)
L82:
  cmp    $0x3,%eax
  jne    L16
  lea    D37(%rip),%rdi
  call   <printf@plt>
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L49:
  lea    D52(%rip),%rdi
  call   <printf@plt>
  jmp    L16
  nopl   0x0(%rax)
L88:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D75
type_guessed: string
name: retrieve_data
arguments: data_label: D109
type_guessed: string
name: retrieve_data
arguments: data_label: D45
type_guessed: string
name: retrieve_data
arguments: data_label: D126
type_guessed: string
name: retrieve_data
arguments: data_label: D16
type_guessed: string
name: retrieve_data
arguments: data_label: D30
type_guessed: string
name: retrieve_data
arguments: data_label: D117
type_guessed: string
name: retrieve_data
arguments: data_label: D97
type_guessed: string
name: retrieve_data
arguments: data_label: D100
type_guessed: string
name: retrieve_data
arguments: data_label: D73
type_guessed: string
name: retrieve_data
arguments: data_label: D21
type_guessed: string
name: retrieve_data
arguments: data_label: D37
type_guessed: string
name: retrieve_data
arguments: data_label: D52
type_guessed: string

tool: D75: cls

tool: D109: 0-exit


tool: D45: 1-area


tool: D126: 2-gold price


tool: D16: 3-help


tool: D30: please choose one 

tool: D117: area


tool: D97: 


tool: D100: pause

tool: D73: %d

tool: D21: exiting....

tool: D37: help


tool: D52: gold price


assistant: ```c
int main() {
  int ans;
  do {
    system("cls");
    printf("0-exit\n");
    printf("1-area\n");
    printf("2-gold price\n");
    printf("3-help\n");
    printf("please choose one ");
    scanf("%d", &ans);
    switch (ans) {
    case 0:
      printf("exiting....");
      exit(0);
      break;
    case 1:
      printf("area\n");
      break;
    case 2:
      printf("gold price\n");
      break;
    case 3:
      printf("help\n");
      break;
    }
    printf("\n");
    system("pause");
  } while (ans != 0);
  return 0;
}
```