user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L96:
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xf0(%rbp),%rax
  mov    %rax,%rsi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0xf0(%rbp),%eax
  cmp    $0x4,%eax
  jle    L96
  mov    -0xf0(%rbp),%eax
  cmp    $0x32,%eax
  jg     L96
  movl   $0x0,-0xec(%rbp)
  jmp    L101
L3:
  mov    -0xec(%rbp),%eax
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xd0(%rbp),%rdx
  mov    -0xec(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0xec(%rbp)
L101:
  mov    -0xf0(%rbp),%eax
  cmp    %eax,-0xec(%rbp)
  jl     L3
  movl   $0x0,-0xe8(%rbp)
  movl   $0x0,-0xe4(%rbp)
  movl   $0x0,-0xe0(%rbp)
  movl   $0x0,-0xdc(%rbp)
  mov    -0xd0(%rbp),%eax
  mov    %eax,-0xd8(%rbp)
  mov    -0xd0(%rbp),%eax
  mov    %eax,-0xd4(%rbp)
  movl   $0x0,-0xec(%rbp)
  jmp    L47
L110:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L146
  addl   $0x1,-0xe8(%rbp)
L146:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  jne    L61
  addl   $0x1,-0xe4(%rbp)
L61:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  test   %eax,%eax
  jle    L64
  addl   $0x1,-0xe0(%rbp)
L64:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  test   %eax,%eax
  jns    L42
  addl   $0x1,-0xdc(%rbp)
L42:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  cmp    %eax,-0xd8(%rbp)
  jge    L97
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  mov    %eax,-0xd8(%rbp)
L97:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  cmp    %eax,-0xd4(%rbp)
  jle    L60
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  mov    %eax,-0xd4(%rbp)
L60:
  addl   $0x1,-0xec(%rbp)
L47:
  mov    -0xf0(%rbp),%eax
  cmp    %eax,-0xec(%rbp)
  jl     L110
  movl   $0x0,-0xec(%rbp)
  jmp    L80
L72:
  mov    -0xec(%rbp),%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0xec(%rbp)
L80:
  mov    -0xf0(%rbp),%eax
  cmp    %eax,-0xec(%rbp)
  jl     L72
  mov    -0xe8(%rbp),%eax
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xe4(%rbp),%eax
  mov    %eax,%esi
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xe0(%rbp),%eax
  mov    %eax,%esi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xdc(%rbp),%eax
  mov    %eax,%esi
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xd8(%rbp),%eax
  mov    %eax,%esi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xd4(%rbp),%eax
  mov    %eax,%esi
  lea    D69(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D48
data_type: string
name: disassemble_data
arguments: data_tag: D7
data_type: string
name: disassemble_data
arguments: data_tag: D54
data_type: string
name: disassemble_data
arguments: data_tag: D36
data_type: string
name: disassemble_data
arguments: data_tag: D17
data_type: string
name: disassemble_data
arguments: data_tag: D86
data_type: string
name: disassemble_data
arguments: data_tag: D76
data_type: string
name: disassemble_data
arguments: data_tag: D107
data_type: string
name: disassemble_data
arguments: data_tag: D40
data_type: string
name: disassemble_data
arguments: data_tag: D69
data_type: string

tool: D48: numero de elementos del vector

tool: D7: %d

tool: D54: v[%d]=


tool: D36: 
%d


tool: D17: Los numeros Pares son: %d

tool: D86: Los numeros Impares son: %d

tool: D76: Los numeros Positivos son: %d

tool: D107: Los numeros Negativos son: %d

tool: D40: El numero Mayor es: %d

tool: D69: El numero Menor es: %d

assistant: ```c
void main() {
  int vec[50];
  int x, n, par, impar, pos, neg, mayor, menor;
  do {
    printf("numero de elementos del vector");
    scanf("%d", &n);
  } while (n < 5 || n > 50);
  for (x = 0; x < n; x++) {
    printf("v[%d]=\n", x);
    scanf("%d", &vec[x]);
  }
  par = 0;
  impar = 0;
  pos = 0;
  neg = 0;
  mayor = vec[0];
  menor = vec[0];
  for (x = 0; x < n; x++) {
    if (vec[x] % 2 == 0) {
      par++;
    }
    if (vec[x] % 2 == 1) {
      impar++;
    }
    if (vec[x] > 0) {
      pos++;
    }
    if (vec[x] < 0) {
      neg++;
    }
    if (vec[x] > mayor) {
      mayor = vec[x];
    }
    if (vec[x] < menor) {
      menor = vec[x];
    }
  }
  for (x = 0; x < n; x++) {
    printf("\n%d\n", vec[x]);
  }
  printf("Los numeros Pares son: %d", par);
  printf("Los numeros Impares son: %d", impar);
  printf("Los numeros Positivos son: %d", pos);
  printf("Los numeros Negativos son: %d", neg);
  printf("El numero Mayor es: %d", mayor);
  printf("El numero Menor es: %d", menor);
}
```