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

```asm
<avestd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movss  %xmm0,-0x34(%rbp)
  mov    %rdx,-0x40(%rbp)
  mov    %rcx,-0x48(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  movq   $0x1,-0x10(%rbp)
  jmp    L94
L62:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  ucomiss -0x34(%rbp),%xmm0
  jp     L95
  ucomiss -0x34(%rbp),%xmm0
  je     L36
L95:
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L36:
  addq   $0x1,-0x10(%rbp)
L94:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jbe    L62
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm1
  mov    -0x8(%rbp),%rax
  test   %rax,%rax
  js     L42
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  jmp    L137
L42:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  addss  %xmm0,%xmm0
L137:
  divss  %xmm0,%xmm1
  mov    -0x40(%rbp),%rax
  movss  %xmm1,(%rax)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x1c(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movq   $0x1,-0x10(%rbp)
  jmp    L6
L115:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  ucomiss -0x34(%rbp),%xmm0
  jp     L25
  ucomiss -0x34(%rbp),%xmm0
  je     L117
L25:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x1c(%rbp),%xmm0
  addss  -0x14(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  -0x14(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
L117:
  addq   $0x1,-0x10(%rbp)
L6:
  mov    -0x10(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jbe    L115
  cmpq   $0x1,-0x8(%rbp)
  jbe    L59
  movss  -0x1c(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  %xmm0,%xmm1
  mov    -0x8(%rbp),%rax
  test   %rax,%rax
  js     L53
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  jmp    L127
L53:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  addss  %xmm0,%xmm0
L127:
  movaps %xmm1,%xmm2
  divss  %xmm0,%xmm2
  movss  -0x18(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  mov    -0x8(%rbp),%rax
  test   %rax,%rax
  js     L103
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  jmp    L144
L103:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  addss  %xmm0,%xmm0
L144:
  movss  D3(%rip),%xmm3
  movaps %xmm0,%xmm2
  subss  %xmm3,%xmm2
  divss  %xmm2,%xmm1
  movaps %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  jmp    L96
L59:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
L96:
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <sqrt@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  mov    -0x48(%rbp),%rax
  movss  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D3
datatype: byte[4]

tool: {"D3": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void avestd(float data[], unsigned long n, float missing, float *ave, float *std) {
  unsigned long j;
  float s, ep, var;
  unsigned long count = 0;
  for (*ave = 0.0F, j = 1; j <= n; j++)
    if (data[j] != missing) {
      *ave += data[j];
      count++;
    }
  *ave /= (float)count;
  var = ep = 0.0F;
  for (j = 1; j <= n; j++)
    if (data[j] != missing) {
      s = data[j] - (*ave);
      ep += s;
      var += s * s;
    }
  if (count > 1)
    var = (var - ep * ep / (float)count) / (count - 1.0F);
  else
    var = 0.0F;
  *std = (float)sqrt(var);
}
```