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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0xc3000(%rsp),%r11
L70:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L70
  sub    $0x530,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x2,-0xc3520(%rbp)
  movl   $0x0,-0xc351c(%rbp)
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xc3524(%rbp),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0xc3518(%rbp)
  jmp    L32
L58:
  movl   $0x0,-0x10(%rbp)
  addl   $0x1,-0xc3518(%rbp)
L32:
  cmpl   $0x30d3f,-0xc3518(%rbp)
  jle    L58
  movl   $0x2,-0xc3510(%rbp)
  movl   $0x0,-0xc3518(%rbp)
  jmp    L3
L118:
  addl   $0x1,-0xc3520(%rbp)
  movl   $0x1,-0xc351c(%rbp)
  movl   $0x0,-0xc3514(%rbp)
  jmp    L98
L92:
  mov    -0xc3514(%rbp),%eax
  cltq
  mov    -0xc3510(%rbp,%rax,4),%ecx
  mov    -0xc3520(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  jne    L62
  movl   $0x0,-0xc351c(%rbp)
L62:
  addl   $0x1,-0xc3514(%rbp)
L98:
  mov    -0xc3514(%rbp),%eax
  cmp    -0xc3518(%rbp),%eax
  jle    L92
  cmpl   $0x1,-0xc351c(%rbp)
  jne    L3
  addl   $0x1,-0xc3518(%rbp)
  mov    -0xc3518(%rbp),%eax
  cltq
  mov    -0xc3520(%rbp),%edx
  mov    %edx,-0xc3510(%rbp,%rax,4)
L3:
  mov    -0xc3524(%rbp),%eax
  cmp    %eax,-0xc3520(%rbp)
  jle    L118
  mov    -0xc3524(%rbp),%eax
  mov    %eax,%esi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xc3514(%rbp)
  jmp    L65
L108:
  mov    -0xc3514(%rbp),%eax
  cltq
  mov    -0xc3510(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0xc3514(%rbp)
L65:
  mov    -0xc3514(%rbp),%eax
  cmp    -0xc3518(%rbp),%eax
  jle    L108
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L20
  call   <__stack_chk_fail@plt>
L20:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D25
type_guessed: string
name: retrieve_data
arguments: tag: D41
type_guessed: string
name: retrieve_data
arguments: tag: D26
type_guessed: string
name: retrieve_data
arguments: tag: D27
type_guessed: string
name: retrieve_data
arguments: tag: D6
type_guessed: string
name: retrieve_data
arguments: tag: D52
type_guessed: string

tool: D25: Este programa calcula todos los primos inferiores a un numero 

tool: D41: natural 
mayor que 1 dado por el usuario: 

tool: D26: Introduce un numero: 

tool: D27: %d

tool: D6: Los primos hasta %d son: 


tool: D52: %03d 

assistant: ```c
int main(void) {
  int numero;
  int listaprimos[200000];
  int primo = 2;
  int esprimo = 0;
  int i, j;
  printf("Este programa calcula todos los primos inferiores a un numero ");
  printf("natural \nmayor que 1 dado por el usuario: \n");
  printf("Introduce un numero: ");
  scanf("%d", &numero);
  for (i = 0; i < 200000; i++) {
    listaprimos[200000] = 0;
  }
  listaprimos[0] = 2;
  i = 0;
  while (primo <= numero) {
    primo++;
    esprimo = 1;
    for (j = 0; j <= i; j++) {
      if ((primo % listaprimos[j]) == 0)
        esprimo = 0;
    }
    if (esprimo == 1) {
      i++;
      listaprimos[i] = primo;
    }
  }
  printf("Los primos hasta %d son: \n", numero);
  for (j = 0; j <= i; j++)
    printf("%03d ", listaprimos[j]);
  getchar();
  getchar();
}
```