user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<rm_outliers>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  movsd  %xmm0,-0x48(%rbp)
  movsd  %xmm1,-0x50(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  D116(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L16
  movsd  -0x48(%rbp),%xmm0
  movsd  D116(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
L16:
  movsd  -0x50(%rbp),%xmm1
  movsd  D62(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <my_alloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L44
L79:
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movq   D44(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L119
  movsd  -0x10(%rbp),%xmm0
  movsd  D79(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D44(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L3
  movsd  -0x50(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L3
  movsd  -0x10(%rbp),%xmm0
  movsd  D79(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L119
L3:
  movsd  -0x50(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L119
  movsd  -0x48(%rbp),%xmm0
  movsd  D79(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D44(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L119
  movsd  -0x10(%rbp),%xmm1
  movsd  D79(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L119:
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movq   D44(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L109
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
  jmp    L98
L109:
  movsd  -0x48(%rbp),%xmm0
  cvttsd2si %xmm0,%edx
  movsd  -0x10(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    -0x50(%rbp),%rcx
  movq   %rcx,%xmm0
  mov    %eax,%esi
  lea    D129(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L98:
  addl   $0x1,-0x28(%rbp)
  addq   $0x8,-0x18(%rbp)
L44:
  mov    -0x28(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L79
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  je     L70
  mov    -0x40(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L70:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x38(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  mov    %edx,(%rax)
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D116
type: f64
name: disassemble_data
arguments: label: D62
type: f64
name: disassemble_data
arguments: label: D44
type: qword
name: disassemble_data
arguments: label: D79
type: f64
name: disassemble_data
arguments: label: D129
type: string
name: disassemble_data
arguments: label: D73
type: string

tool: D116: 2

tool: D62: 3

tool: D44: 9223372036854775807

tool: D79: 360

tool: D129: Outlier: %g (median=%g, 3RMS=%g)


tool: D73: %d outliers removed (from %d)



assistant: ```c
void rm_outliers(double **buf, int *N, double med, double std) {
  if (std > med / 2.)
    std = med / 2.;
  std *= 3.;
  int L = 0, i, oN = *N;
  double *ret = ((double *)my_alloc(oN, sizeof(double))), *rptr = ret, *iptr = *buf;
  for (i = 0; i < oN; ++i, ++iptr) {
    double d = *iptr;
    if (fabs(d - med) > std) {
      if (fabs(d - 360.) < std && med < std)
        d -= 360.;
      else if (d < std && fabs(med - 360.) < std)
        d += 360.;
    }
    if (fabs(d - med) < std) {
      *rptr++ = d;
      ++L;
    } else
      printf("Outlier: %g (median=%g, 3RMS=%g)\n", d, med, std);
  }
  if (L != *N)
    printf("%d outliers removed (from %d)\n\n", *N - L, *N);
  free(*buf);
  *buf = ret;
  *N = L;
}
```