user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  xor    %edi,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  xor    %eax,%eax
  call   <elegirCantDigitos@plt>
  lea    0x0(,%rax,4),%edi
  mov    %eax,%r12d
  call   <malloc@plt>
  mov    $0x4,%esi
  mov    %r12d,%edi
  mov    %rax,%rbx
  mov    %rax,0x8(%rsp)
  call   <calloc@plt>
  test   %rbx,%rbx
  je     L91
  mov    %rax,%r14
  test   %rax,%rax
  je     L91
  mov    %rbx,%rdi
  mov    %r12d,%esi
  call   <generaAleatorio@plt>
  mov    $0xa,%edi
  call   <elegirNivel@plt>
  mov    %eax,0x4(%rsp)
  test   %eax,%eax
  jle    L4
  lea    -0x1(%r12),%eax
  mov    $0x1,%r15d
  lea    D24(%rip),%rbx
  lea    0x4(%r14,%rax,4),%rbp
  nopl   0x0(%rax,%rax,1)
L126:
  mov    %r14,%rdi
  mov    %r12d,%esi
  call   <leerNumero@plt>
  xor    %eax,%eax
  lea    D8(%rip),%rdi
  call   <printf@plt>
  test   %r12d,%r12d
  jle    L113
  mov    %r14,%r13
  nopl   0x0(%rax)
L57:
  mov    0x0(%r13),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %rbp,%r13
  jne    L57
L113:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x8(%rsp),%rdi
  mov    %r12d,%edx
  mov    %r14,%rsi
  call   <coincideNumero@plt>
  test   %rax,%rax
  jne    L60
  cmp    %r15d,0x4(%rsp)
  je     L110
  lea    D9(%rip),%rdi
  add    $0x1,%r15d
  call   <puts@plt>
  cmp    %r15d,0x4(%rsp)
  jge    L126
L4:
  xor    %eax,%eax
  lea    D27(%rip),%rdi
  call   <printf@plt>
  test   %r12d,%r12d
  jle    L59
  mov    0x8(%rsp),%r13
  lea    -0x1(%r12),%eax
  lea    D24(%rip),%rbx
  lea    0x4(%r13,%rax,4),%rbp
  nopl   0x0(%rax)
L52:
  mov    0x0(%r13),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %r13,%rbp
  jne    L52
L59:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x1,%eax
  jmp    L54
L91:
  xor    %eax,%eax
L54:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L110:
  lea    D64(%rip),%rdi
  call   <puts@plt>
  jmp    L4
L60:
  lea    D13(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L54
```

tool_calls: name: parse_data
arguments: label: D24
data_type: string
name: parse_data
arguments: label: D8
data_type: string
name: parse_data
arguments: label: D9
data_type: string
name: parse_data
arguments: label: D27
data_type: string
name: parse_data
arguments: label: D64
data_type: string
name: parse_data
arguments: label: D13
data_type: string

tool: D24: %d

tool: D8: Numero ingresado = 

tool: D9: 
~~~ Intenta de nuevo ~~~


tool: D27: El numero era: 

tool: D64: 
~~~ Perdiste ~~~


tool: D13: 
~~~ GANASTE! ~~~


assistant: ```c
int main(void) {
  srand(time(0));
  int *incognita;
  int *numero;
  int digits, nivel, i, j;
  digits = elegirCantDigitos();
  incognita = malloc(digits * sizeof(int));
  numero = calloc(digits, sizeof(int));
  if (incognita == NULL || numero == NULL) {
    return 0;
  }
  generaAleatorio(incognita, digits);
  nivel = elegirNivel(10);
  for (i = 1; i <= nivel; i++) {
    leerNumero(numero, digits);
    printf("Numero ingresado = ");
    for (j = 0; j < digits; j++) {
      printf("%d", numero[j]);
    }
    printf("\n");
    if (coincideNumero(incognita, numero, digits)) {
      printf("\n~~~ GANASTE! ~~~\n\n");
      return 1;
    } else if (i == nivel)
      printf("\n~~~ Perdiste ~~~\n\n");
    else
      printf("\n~~~ Intenta de nuevo ~~~\n\n");
  }
  printf("El numero era: ");
  for (i = 0; i < digits; i++) {
    printf("%d", incognita[i]);
  }
  printf("\n");
  return 1;
}
```