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

```asm
<obj_func_ar_ls>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %rdx,%r14
  mov    %ecx,%eax
  mov    %r8d,%ebx
  mov    %r9d,%r12d
  mov    0x88(%rsp),%r13
  mov    0x90(%rsp),%ecx
  test   %ecx,%ecx
  jle    L70
  mov    %r13,%rdx
  lea    -0x1(%rcx),%ecx
  lea    0x8(%r13,%rcx,8),%rsi
L173:
  movq   $0x0,(%rdx)
  add    $0x8,%rdx
  cmp    %rsi,%rdx
  jne    L173
L70:
  cltd
  idiv   %r12d
  mov    %eax,0x24(%rsp)
  movslq %r12d,%rbp
  lea    0x0(,%r12,8),%edi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  cmpl   $0x1,0x80(%rsp)
  je     L61
  cmp    %ebx,0x24(%rsp)
  jle    L138
  mov    %r12d,%eax
  imul   %ebx,%eax
  mov    %eax,0x1c(%rsp)
  shl    $0x3,%rbp
  cltq
  lea    (%r14,%rax,8),%r15
  mov    0x10(%rsp),%rdi
  sub    %rdi,%r15
  lea    -0x1(%rbx),%eax
  imul   %r12d,%eax
  mov    %eax,0x20(%rsp)
  mov    %r12d,%eax
  neg    %eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    %ebx,0x18(%rsp)
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  mov    %r14,%rax
  sub    %rdi,%rax
  mov    %rax,0x38(%rsp)
  sub    %rdi,%r13
  mov    %r14,0x30(%rsp)
  mov    %rsi,%r14
L47:
  mov    0x10(%rsp),%r9
  mov    0x1c(%rsp),%r8d
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    0x30(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <ar_unbias@plt>
  test   %r12d,%r12d
  jle    L68
  movslq 0x20(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%r8
  mov    0x10(%rsp),%rsi
  mov    $0x0,%edi
L182:
  movsd  (%r15,%rsi,1),%xmm2
  subsd  (%rsi),%xmm2
  movapd %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  test   %ebx,%ebx
  jle    L130
  addsd  %xmm2,%xmm2
  lea    0x0(%r13,%rsi,1),%rax
  lea    (%rsi,%r8,1),%rcx
  mov    $0x0,%edx
L94:
  movapd %xmm2,%xmm1
  mulsd  (%rcx),%xmm1
  movsd  (%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rbp,%rax
  add    %r14,%rcx
  cmp    %edx,%ebx
  jne    L94
L130:
  add    $0x1,%edi
  add    $0x8,%rsi
  cmp    %edi,%r12d
  jne    L182
L68:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  add    %r12d,0x1c(%rsp)
  add    %rbp,%r15
  add    %r12d,0x20(%rsp)
  cmp    %eax,0x24(%rsp)
  jne    L47
L16:
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  lea    -0x1(%rbx),%edi
  mov    %edi,0x20(%rsp)
  cmp    %edi,0x24(%rsp)
  jle    L83
  mov    %edi,%eax
  imul   %r12d,%eax
  mov    %eax,0x1c(%rsp)
  lea    0x0(,%rbp,8),%rsi
  mov    %rsi,0x30(%rsp)
  cltq
  lea    (%r14,%rax,8),%rbp
  sub    0x10(%rsp),%rbp
  mov    %edi,0x18(%rsp)
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  mov    %r12d,%r15d
  jmp    L132
L54:
  movsd  0x0(%r13,%r8,8),%xmm1
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x0(%r13,%r8,8)
L65:
  add    $0x1,%eax
  add    %r12d,%ecx
  sub    %r12d,%edx
  cmp    %eax,%ebx
  je     L134
L164:
  test   %eax,%eax
  je     L54
  movslq %ecx,%rsi
  lea    0x0(%r13,%rsi,8),%rdi
  movslq %edx,%rsi
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  mulsd  (%r14,%rsi,8),%xmm2
  movsd  (%rdi),%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdi)
  jmp    L65
L134:
  add    $0x1,%r8
  add    $0x8,%r9
  add    $0x1,%r10d
  cmp    %r15,%r8
  je     L219
L111:
  movsd  0x0(%rbp,%r9,1),%xmm0
  subsd  (%r9),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  0x8(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  test   %ebx,%ebx
  jle    L134
  mov    %r8d,%ecx
  mov    %r10d,%edx
  mov    $0x0,%eax
  jmp    L164
L219:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  add    %r12d,0x1c(%rsp)
  add    0x30(%rsp),%rbp
  cmp    %eax,0x24(%rsp)
  jle    L16
L132:
  mov    0x10(%rsp),%r9
  mov    0x1c(%rsp),%r8d
  mov    %r12d,%ecx
  mov    0x20(%rsp),%edx
  mov    %r14,%rsi
  mov    0x28(%rsp),%rdi
  call   <ar_bias@plt>
  test   %r12d,%r12d
  jle    L219
  mov    0x1c(%rsp),%r10d
  mov    0x10(%rsp),%r9
  mov    $0x0,%r8d
  jmp    L111
L83:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  jmp    L16
L138:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L16
```

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