user: 这段汇编代码用C语言表示是什么样的?

```asm
<obj_func_ar_ls>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8d,-0x4c(%rbp)
  mov    %r9d,-0x50(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L116
L63:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x28(%rbp)
L116:
  mov    -0x28(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jl     L63
  mov    -0x40(%rbp),%eax
  cltd
  idivl  -0x50(%rbp)
  mov    %eax,-0x1c(%rbp)
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x1,0x10(%rbp)
  jne    L13
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x20(%rbp)
L13:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  cmpl   $0x1,0x10(%rbp)
  jne    L44
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L34
L71:
  mov    -0x2c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edi
  mov    -0x10(%rbp),%r8
  mov    -0x50(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x48(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %r8,%r9
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <ar_bias@plt>
  movl   $0x0,-0x28(%rbp)
  jmp    L2
L164:
  mov    -0x2c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L20
L110:
  cmpl   $0x0,-0x24(%rbp)
  jne    L153
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L106
L153:
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L106:
  addl   $0x1,-0x24(%rbp)
L20:
  mov    -0x24(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L110
  addl   $0x1,-0x28(%rbp)
L2:
  mov    -0x28(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L164
  addl   $0x1,-0x2c(%rbp)
L34:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L71
  jmp    L85
L44:
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L115
L57:
  mov    -0x2c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edi
  mov    -0x10(%rbp),%r8
  mov    -0x50(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x48(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %r8,%r9
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <ar_unbias@plt>
  movl   $0x0,-0x28(%rbp)
  jmp    L103
L78:
  mov    -0x2c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L1
L12:
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x24(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x24(%rbp)
L1:
  mov    -0x24(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L12
  addl   $0x1,-0x28(%rbp)
L103:
  mov    -0x28(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L78
  addl   $0x1,-0x2c(%rbp)
L115:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L57
L85:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

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