user: What would the C source look like for the assembly code provided here:

```asm
<simplexproj>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %edx,%ebp
  movsd  %xmm0,0x8(%rsp)
  mov    %rsi,%r9
  cmp    %rdi,%rsi
  je     L110
L250:
  movsd  (%rbx),%xmm0
  movsd  %xmm0,(%r9)
  subsd  0x8(%rsp),%xmm0
  cmp    $0x1,%ebp
  jbe    L123
  lea    0x8(%rbx),%rax
  lea    -0x2(%rbp),%edx
  lea    0x10(%rbx,%rdx,8),%rsi
  mov    $0xffffffff,%ecx
  mov    $0x1,%edx
  jmp    L130
L110:
  lea    0x0(,%rdx,8),%edi
  call   <malloc@plt>
  mov    %rax,%r9
  jmp    L250
L254:
  add    $0x1,%edx
L240:
  add    $0x8,%rax
  cmp    %rsi,%rax
  je     L41
L130:
  movsd  (%rax),%xmm1
  comisd %xmm0,%xmm1
  jbe    L240
  movslq %edx,%rdi
  movsd  %xmm1,(%r9,%rdi,8)
  movapd %xmm1,%xmm2
  subsd  %xmm0,%xmm2
  mov    %edx,%edi
  sub    %ecx,%edi
  pxor   %xmm3,%xmm3
  cvtsi2sd %edi,%xmm3
  divsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  subsd  0x8(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jb     L254
  lea    -0x1(%rdx),%ecx
  movapd %xmm1,%xmm0
  jmp    L254
L41:
  mov    %r9,%rsi
  test   %ecx,%ecx
  js     L16
  lea    0x1(%rcx),%eax
  sub    %eax,%edx
  movslq %eax,%rdi
  shl    $0x3,%rdi
  lea    (%r9,%rdi,1),%rsi
  sub    $0x8,%rdi
  lea    (%r9,%rdi,1),%rax
  lea    -0x8(%r9,%rdi,1),%rdi
  mov    %ecx,%ecx
  shl    $0x3,%rcx
  sub    %rcx,%rdi
  jmp    L159
L220:
  sub    $0x8,%rax
  cmp    %rdi,%rax
  je     L16
L159:
  movsd  (%rax),%xmm1
  comisd %xmm0,%xmm1
  jbe    L220
  movsd  %xmm1,-0x8(%rsi)
  add    $0x1,%edx
  subsd  %xmm0,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sd %edx,%xmm2
  divsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  lea    -0x8(%rsi),%rsi
  jmp    L220
L123:
  mov    %r9,%rsi
  mov    $0x1,%edx
  jmp    L16
L175:
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  mov    %r8d,%ecx
  sub    %eax,%ecx
  add    %edx,%ecx
  pxor   %xmm3,%xmm3
  cvtsi2sd %ecx,%xmm3
  divsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
L79:
  add    $0x1,%rax
  cmp    %rax,%rdi
  je     L59
L209:
  movsd  -0x8(%rsi,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jbe    L175
  movslq %edx,%rcx
  movsd  %xmm1,(%rsi,%rcx,8)
  lea    0x1(%rdx),%edx
  jmp    L79
L59:
  cmp    %r10d,%edx
  jg     L243
L16:
  mov    %edx,%r10d
  sub    $0x1,%r10d
  js     L243
  mov    %edx,%r8d
  lea    -0x1(%rdx),%edi
  add    $0x2,%rdi
  mov    $0x1,%eax
  mov    $0x0,%edx
  jmp    L209
L243:
  test   %ebp,%ebp
  je     L231
  mov    %ebp,%ebp
  mov    $0x0,%eax
  jmp    L85
L28:
  pxor   %xmm1,%xmm1
L13:
  movsd  %xmm1,(%r12,%rax,8)
  add    $0x1,%rax
  cmp    %rbp,%rax
  je     L231
L85:
  movsd  (%rbx,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jbe    L28
  subsd  %xmm0,%xmm1
  jmp    L13
L231:
  cmp    %rbx,%r12
  je     L190
L127:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L190:
  mov    %r9,%rdi
  call   <free@plt>
  jmp    L127
```

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