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

```asm
<simplexproj>:
  endbr64
  push   %r12
  mov    %rsi,%r9
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  cmp    %rdi,%rsi
  je     L135
L193:
  movsd  (%rbx),%xmm1
  movsd  %xmm1,(%r9)
  subsd  %xmm0,%xmm1
  cmp    $0x1,%r12d
  jbe    L93
  lea    -0x2(%r12),%edx
  lea    0x8(%rbx),%rax
  mov    $0xffffffff,%ecx
  lea    0x10(%rbx,%rdx,8),%rsi
  mov    $0x1,%edx
L160:
  movsd  (%rax),%xmm2
  comisd %xmm1,%xmm2
  jbe    L20
  movslq %edx,%rdi
  pxor   %xmm4,%xmm4
  movapd %xmm2,%xmm3
  movsd  %xmm2,(%r9,%rdi,8)
  mov    %edx,%edi
  subsd  %xmm1,%xmm3
  subsd  %xmm0,%xmm2
  sub    %ecx,%edi
  cvtsi2sd %edi,%xmm4
  divsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm1
  comisd %xmm1,%xmm2
  jb     L146
  lea    -0x1(%rdx),%ecx
  movapd %xmm2,%xmm1
L146:
  add    $0x1,%edx
L20:
  add    $0x8,%rax
  cmp    %rax,%rsi
  jne    L160
  mov    %r9,%rsi
  cmp    $0xffffffff,%ecx
  je     L18
  lea    0x1(%rcx),%eax
  movslq %ecx,%rcx
  movslq %eax,%rdi
  sub    %eax,%edx
  shl    $0x3,%rcx
  shl    $0x3,%rdi
  lea    (%r9,%rdi,1),%rsi
  sub    $0x8,%rdi
  lea    (%r9,%rdi,1),%rax
  lea    -0x8(%r9,%rdi,1),%rdi
  sub    %rcx,%rdi
  nopl   0x0(%rax,%rax,1)
L75:
  movsd  (%rax),%xmm0
  comisd %xmm1,%xmm0
  jbe    L173
  add    $0x1,%edx
  pxor   %xmm2,%xmm2
  movsd  %xmm0,-0x8(%rsi)
  subsd  %xmm1,%xmm0
  cvtsi2sd %edx,%xmm2
  sub    $0x8,%rsi
  divsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
L173:
  sub    $0x8,%rax
  cmp    %rax,%rdi
  jne    L75
  nopl   0x0(%rax,%rax,1)
L18:
  mov    %edx,%r10d
  sub    $0x1,%r10d
  js     L15
  mov    %r10d,%edi
  mov    %edx,%r8d
  mov    $0x1,%eax
  xor    %edx,%edx
  add    $0x2,%rdi
  jmp    L38
  nopl   0x0(%rax)
L157:
  movslq %edx,%rcx
  add    $0x1,%rax
  add    $0x1,%edx
  movsd  %xmm0,(%rsi,%rcx,8)
  cmp    %rax,%rdi
  je     L175
L38:
  movsd  -0x8(%rsi,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  ja     L157
  mov    %r8d,%ecx
  pxor   %xmm3,%xmm3
  movapd %xmm1,%xmm2
  sub    %eax,%ecx
  subsd  %xmm0,%xmm2
  add    $0x1,%rax
  add    %edx,%ecx
  cvtsi2sd %ecx,%xmm3
  divsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  cmp    %rax,%rdi
  jne    L38
L175:
  cmp    %r10d,%edx
  jle    L18
  nopl   (%rax)
L15:
  test   %r12d,%r12d
  je     L63
  xor    %eax,%eax
  nop
L14:
  movsd  (%rbx,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L43
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L14
L63:
  cmp    %rbx,%rbp
  je     L6
L104:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L43:
  movq   $0x0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L14
  cmp    %rbx,%rbp
  jne    L104
L6:
  add    $0x10,%rsp
  mov    %r9,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1060 <free@plt>
L135:
  lea    0x0(,%r12,8),%edi
  movsd  %xmm0,0x8(%rsp)
  call   <malloc@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %rax,%r9
  jmp    L193
L93:
  mov    %r9,%rsi
  mov    $0x1,%edx
  jmp    L18
```

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);
}
```