user: What is the c source code of the assembly code below?

```asm
<obj_func_ar_ls>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %r9d,%ebp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x48,%rsp
  movslq 0x90(%rsp),%rax
  mov    %rdi,0x28(%rsp)
  mov    0x88(%rsp),%r14
  test   %eax,%eax
  jle    L103
  lea    0x0(,%rax,8),%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
L103:
  mov    %r12d,%eax
  lea    0x0(,%rbp,8),%edi
  movslq %ebp,%r12
  cltd
  idiv   %ebp
  mov    %eax,0x24(%rsp)
  call   <malloc@plt>
  cmpl   $0x1,0x80(%rsp)
  mov    %rax,%r9
  je     L83
  cmp    %ebx,0x24(%rsp)
  jle    L169
  mov    %ebp,%r8d
  mov    %ebp,%r13d
  mov    %r15,0x30(%rsp)
  shl    $0x3,%r12
  imul   %ebx,%r8d
  neg    %r13d
  pxor   %xmm3,%xmm3
  sub    %r9,%r14
  movslq %r13d,%r13
  shl    $0x3,%r13
  movslq %r8d,%r10
  shl    $0x3,%r10
  sub    %rax,%r10
  lea    -0x1(%rbx),%eax
  imul   %ebp,%eax
  add    %r15,%r10
  mov    %eax,(%rsp)
  mov    %r15,%rax
  mov    %r10,%r15
  mov    %ebx,%r10d
  sub    %r9,%rax
  mov    %rax,0x38(%rsp)
  nopl   0x0(%rax,%rax,1)
L77:
  mov    0x30(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    %r10d,0x20(%rsp)
  mov    %r9,0x10(%rsp)
  mov    %r8d,0x8(%rsp)
  movsd  %xmm3,0x18(%rsp)
  call   <ar_unbias@plt>
  test   %ebp,%ebp
  mov    0x8(%rsp),%r8d
  mov    0x10(%rsp),%r9
  movsd  0x18(%rsp),%xmm3
  mov    0x20(%rsp),%r10d
  jle    L148
  mov    0x38(%rsp),%rdi
  movslq (%rsp),%rax
  mov    %r9,%rsi
  lea    (%rdi,%rax,8),%r11
  xor    %edi,%edi
  nopl   0x0(%rax,%rax,1)
L196:
  movsd  (%r15,%rsi,1),%xmm2
  subsd  (%rsi),%xmm2
  movapd %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm3
  test   %ebx,%ebx
  jle    L138
  addsd  %xmm2,%xmm2
  lea    (%r14,%rsi,1),%rax
  xor    %edx,%edx
  lea    (%rsi,%r11,1),%rcx
L1:
  movsd  (%rcx),%xmm1
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  add    %r13,%rcx
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %r12,%rax
  cmp    %edx,%ebx
  jne    L1
L138:
  add    $0x1,%edi
  add    $0x8,%rsi
  cmp    %edi,%ebp
  jne    L196
L148:
  add    %ebp,(%rsp)
  add    $0x1,%r10d
  add    %ebp,%r8d
  add    %r12,%r15
  cmp    %r10d,0x24(%rsp)
  jne    L77
L75:
  mov    %r9,%rdi
  movsd  %xmm3,(%rsp)
  call   <free@plt>
  movsd  (%rsp),%xmm3
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  movapd %xmm3,%xmm0
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L83:
  lea    -0x1(%rbx),%eax
  mov    %eax,0x20(%rsp)
  cmp    %eax,0x24(%rsp)
  jle    L169
  mov    %eax,%r13d
  lea    0x0(,%r12,8),%rdi
  mov    %eax,(%rsp)
  lea    -0x1(%rbp),%eax
  imul   %ebp,%r13d
  mov    %rdi,0x18(%rsp)
  pxor   %xmm3,%xmm3
  mov    %eax,0x30(%rsp)
  mov    %r9,0x8(%rsp)
  movslq %r13d,%r12
  shl    $0x3,%r12
  sub    %r9,%r12
  add    %r15,%r12
L185:
  mov    0x8(%rsp),%r9
  mov    0x20(%rsp),%edx
  mov    %r13d,%r8d
  mov    %ebp,%ecx
  mov    0x28(%rsp),%rdi
  mov    %r15,%rsi
  movsd  %xmm3,0x10(%rsp)
  call   <ar_bias@plt>
  test   %ebp,%ebp
  movsd  0x10(%rsp),%xmm3
  jle    L146
  mov    0x30(%rsp),%r11d
  mov    0x8(%rsp),%r9
  mov    %r13d,%r10d
  xor    %r8d,%r8d
  nopl   (%rax)
L99:
  movsd  (%r12,%r9,1),%xmm1
  subsd  (%r9),%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm3
  test   %ebx,%ebx
  jle    L115
  addsd  %xmm1,%xmm1
  mov    %r8d,%ecx
  mov    %r10d,%edx
  xor    %eax,%eax
  jmp    L5
  nopl   0x0(%rax)
L199:
  movslq %edx,%rdi
  movslq %ecx,%rsi
  add    $0x1,%eax
  add    %ebp,%ecx
  movsd  (%r15,%rdi,8),%xmm2
  lea    (%r14,%rsi,8),%rsi
  sub    %ebp,%edx
  movsd  (%rsi),%xmm0
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsi)
  cmp    %eax,%ebx
  je     L115
L5:
  test   %eax,%eax
  jne    L199
  movsd  (%r14,%r8,8),%xmm0
  add    $0x1,%eax
  add    %ebp,%ecx
  sub    %ebp,%edx
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%r14,%r8,8)
  cmp    %eax,%ebx
  jne    L5
L115:
  lea    0x1(%r8),%rax
  add    $0x8,%r9
  add    $0x1,%r10d
  cmp    %r8,%r11
  je     L146
  mov    %rax,%r8
  jmp    L99
L146:
  addl   $0x1,(%rsp)
  add    %ebp,%r13d
  mov    (%rsp),%eax
  add    0x18(%rsp),%r12
  cmp    %eax,0x24(%rsp)
  jg     L185
  mov    0x8(%rsp),%r9
  jmp    L75
L169:
  pxor   %xmm3,%xmm3
  jmp    L75
```

assistant: ```c
double obj_func_ar_ls(double *p, int np, double *cans, int nc, int n_coef, int dim2, int intercept, double *grad, int ng) {
  int i, j, k, order, n_cans;
  double error, r;
  double *ar;
  for (j = 0; j < ng; j++)
    grad[j] = 0.0;
  n_cans = (int)(nc / dim2);
  ar = (double *)malloc(dim2 * sizeof(double));
  order = n_coef;
  if (intercept == 1)
    order = n_coef - 1;
  error = 0.0;
  if (intercept == 1) {
    for (i = order; i < n_cans; i++) {
      ar_bias(p, cans, order, dim2, i * dim2, ar);
      for (j = 0; j < dim2; j++) {
        r = cans[i * dim2 + j] - ar[j];
        error += r * r;
        for (k = 0; k < n_coef; k++) {
          if (k == 0) {
            grad[k * dim2 + j] -= 2.0 * r;
          } else {
            grad[k * dim2 + j] -= 2.0 * r * cans[(i - k) * dim2 + j];
          }
        }
      }
    }
  } else {
    for (i = order; i < n_cans; i++) {
      ar_unbias(p, cans, order, dim2, i * dim2, ar);
      for (j = 0; j < dim2; j++) {
        r = cans[i * dim2 + j] - ar[j];
        error += r * r;
        for (k = 0; k < n_coef; k++) {
          grad[k * dim2 + j] -= 2.0 * r * cans[(i - k - 1) * dim2 + j];
        }
      }
    }
  }
  free(ar);
  return error;
}
```