user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  mov    $0x0,%r14d
  movl   $0x0,0xc(%rsp)
  lea    D12(%rip),%r15
  jmp    L52
L8:
  mov    0xc(%rsp),%edi
  test   %edi,%edi
  je     L53
  lea    0x20(%rsp),%rdx
  lea    0x40(%rsp),%rsi
  call   <jugar@plt>
  mov    %eax,%r14d
L52:
  lea    D64(%rip),%r13
L57:
  cmpl   $0x3,0x1c(%rsp)
  je     L60
  cmp    $0x1,%r14d
  je     L60
  mov    %r15,%rdi
  call   <printf@plt>
  lea    D65(%rip),%rdi
  call   <printf@plt>
  lea    D66(%rip),%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <printf@plt>
  lea    0x1c(%rsp),%rsi
  lea    D73(%rip),%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%edx
  cmp    $0x2,%edx
  jbe    L36
  lea    D28(%rip),%r12
  lea    0x1c(%rsp),%rbp
  lea    D73(%rip),%rbx
L106:
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%edx
  cmp    $0x2,%edx
  ja     L106
L36:
  cmp    $0x1,%eax
  je     L8
  cmp    $0x2,%eax
  jne    L57
  lea    0x20(%rsp),%rsi
  lea    0x40(%rsp),%rdi
  call   <configurar@plt>
  mov    %eax,0xc(%rsp)
  jmp    L52
L53:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  jmp    L52
L60:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  mov    $0x0,%eax
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D12
data_type: string
name: extract_symbolic_data
arguments: tag: D64
data_type: string
name: extract_symbolic_data
arguments: tag: D65
data_type: string
name: extract_symbolic_data
arguments: tag: D66
data_type: string
name: extract_symbolic_data
arguments: tag: D73
data_type: string
name: extract_symbolic_data
arguments: tag: D28
data_type: string
name: extract_symbolic_data
arguments: tag: D30
data_type: string

tool: D12: 
Introdueix un d'aquests nombres per a realitzar l'accio corresponent:


tool: D64: 
	3.Sortir del joc
	

tool: D65: 
	1.Jugar una partida

tool: D66: 
	2.Configuracio del Taulell

tool: D73: %d

tool: D28: Introdueix un nombre valid: 

tool: D30: 
 Per a jugar primer has de configurar el taulell!!


assistant: ```c
int main() {
  char taulell[11][11];
  int mida = 0, op, fi = 0;
  int freq[5];
  while (op != 3 && fi != 1) {
    printf("\nIntrodueix un d'aquests nombres per a realitzar l'accio corresponent:\n");
    printf("\n\t1.Jugar una partida");
    printf("\n\t2.Configuracio del Taulell");
    printf("\n\t3.Sortir del joc\n\t");
    scanf("%d", &op);
    while (op < 1 || op > 3) {
      printf("Introdueix un nombre valid: ");
      scanf("%d", &op);
    }
    switch (op) {
    case 1:
      if (mida != 0) {
        fi = jugar(mida, taulell, freq);
      } else {
        printf("\n Per a jugar primer has de configurar el taulell!!\n");
      }
      break;
    case 2:
      mida = configurar(taulell, freq);
      break;
    default:
      break;
    }
  }
  return 0;
}
```