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

```asm
<simplexproj>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x40(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L123
  mov    -0x44(%rbp),%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  jmp    L47
L123:
  mov    -0x40(%rbp),%rax
L47:
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0x24(%rbp)
  movl   $0xffffffff,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x1c(%rbp)
  jmp    L195
L116:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L57
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%rax),%xmm0
  subsd  -0x10(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x50(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L92
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
L92:
  addl   $0x1,-0x24(%rbp)
L57:
  addl   $0x1,-0x1c(%rbp)
L195:
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  ja     L116
  cmpl   $0x0,-0x20(%rbp)
  js     L34
  addl   $0x1,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  sub    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x18(%rbp)
  jmp    L20
L97:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  ja     L86
  jmp    L20
L86:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  subq   $0x8,-0x18(%rbp)
  movsd  (%rax),%xmm0
  mov    -0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x10(%rbp),%xmm0
  addl   $0x1,-0x24(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L20:
  subl   $0x1,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jns    L97
L34:
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L72
L1:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L185
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L196
L185:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L196:
  addl   $0x1,-0x1c(%rbp)
L72:
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L1
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L34
  movl   $0x0,-0x1c(%rbp)
  jmp    L102
L161:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L204
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x10(%rbp),%xmm0
  jmp    L172
L204:
  pxor   %xmm0,%xmm0
L172:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L102:
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  ja     L161
  mov    -0x40(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L158
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L158:
  nop
  leave
  ret
```

assistant: ```c
void simplexproj(double *y, double *x, const unsigned int length, const double a) {
  double *aux = (x == y ? (double *)malloc(length * sizeof(double)) : x);
  double *aux0 = aux;
  int auxlength = 1;
  int auxlengthold = -1;
  double tau = (*aux = *y) - a;
  int i = 1;
  for (; i < length; i++)
    if (y[i] > tau) {
      if ((tau += ((aux[auxlength] = y[i]) - tau) / (auxlength - auxlengthold)) <= y[i] - a) {
        tau = y[i] - a;
        auxlengthold = auxlength - 1;
      }
      auxlength++;
    }
  if (auxlengthold >= 0) {
    auxlength -= ++auxlengthold;
    aux += auxlengthold;
    while (--auxlengthold >= 0)
      if (aux0[auxlengthold] > tau)
        tau += ((*(--aux) = aux0[auxlengthold]) - tau) / (++auxlength);
  }
  do {
    auxlengthold = auxlength - 1;
    for (i = auxlength = 0; i <= auxlengthold; i++)
      if (aux[i] > tau)
        aux[auxlength++] = aux[i];
      else
        tau += (tau - aux[i]) / (auxlengthold - i + auxlength);
  } while (auxlength <= auxlengthold);
  for (i = 0; i < length; i++)
    x[i] = (y[i] > tau ? y[i] - tau : 0.0);
  if (x == y)
    free(aux0);
}
```