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

```asm
<stats>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x40,%rsp
  mov    %rdi,-0x2028(%rbp)
  mov    %rsi,-0x2030(%rbp)
  mov    %rdx,-0x2038(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x2010(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x400,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x2018(%rbp)
  movl   $0x0,-0x2020(%rbp)
  movl   $0x0,-0x201c(%rbp)
  jmp    L12
L129:
  lea    -0x2010(%rbp),%rdx
  mov    -0x2020(%rbp),%eax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  je     L4
  addl   $0x1,-0x2020(%rbp)
L12:
  cmpl   $0x3ff,-0x2020(%rbp)
  jbe    L129
  jmp    L70
L4:
  nop
L70:
  cmpl   $0x0,-0x2020(%rbp)
  jne    L123
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <die@plt>
L123:
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2028(%rbp)
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2030(%rbp)
  lea    -0x2010(%rbp),%rax
  mov    %rax,-0x2038(%rbp)
  cmpl   $0x1,-0x2020(%rbp)
  jbe    L9
  jmp    L105
L125:
  mov    -0x2028(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x201c(%rbp),%eax
  movsd  -0x2010(%rbp,%rax,8),%xmm1
  comisd %xmm1,%xmm0
  jb     L99
  lea    -0x2010(%rbp),%rdx
  mov    -0x201c(%rbp),%eax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,-0x2028(%rbp)
L99:
  mov    -0x201c(%rbp),%eax
  movsd  -0x2010(%rbp,%rax,8),%xmm1
  movsd  -0x2018(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x2018(%rbp)
  mov    -0x2038(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x201c(%rbp),%eax
  movsd  -0x2010(%rbp,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jb     L107
  lea    -0x2010(%rbp),%rdx
  mov    -0x201c(%rbp),%eax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,-0x2038(%rbp)
L107:
  addl   $0x1,-0x201c(%rbp)
L105:
  mov    -0x201c(%rbp),%eax
  cmp    -0x2020(%rbp),%eax
  jb     L125
  movsd  -0x2018(%rbp),%xmm1
  mov    -0x2020(%rbp),%eax
  test   %rax,%rax
  js     L25
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L52
L25:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L52:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,-0x2018(%rbp)
  lea    -0x2018(%rbp),%rax
  mov    %rax,-0x2030(%rbp)
L9:
  mov    -0x2038(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x2030(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x2028(%rbp),%rax
  mov    (%rax),%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D8
type: string
name: disassemble_data
arguments: label: D2
type: string
name: disassemble_data
arguments: label: D4
type: string

tool: D8: %lf, 

tool: D2: Must input numeric values to evaluate.


tool: D4: Min = %lf, Mean = %lf, Max = %lf


assistant: ```c
void stats(double *min, double *average, double *max) {
  double num[1024] = {};
  double mean = 0;
  unsigned input_count = 0, j = 0;
  while (input_count < 1024) {
    if (scanf("%lf, ", &num[input_count]))
      ++input_count;
    else
      break;
  }
  if (input_count == 0)
    die("Must input numeric values to evaluate.\n");
  min = &num[0];
  average = &num[0];
  max = &num[0];
  if (input_count > 1) {
    for (j; j < input_count; ++j) {
      if (*min >= num[j])
        min = &num[j];
      mean += num[j];
      if (*max <= num[j])
        max = &num[j];
    }
    mean = mean / input_count;
    average = &mean;
  }
  printf("Min = %lf, Mean = %lf, Max = %lf\n", *min, *average, *max);
}
```