user: Translate the below assembly code into C programming language:

```asm
<update_sparse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  movq   $0x0,-0x28(%rbp)
  jmp    L1
L32:
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  je     L12
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x50(%rbp),%rax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L12
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm7
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm6
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm5
  mov    -0x50(%rbp),%rax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm4
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  sub    $0x8,%rsp
  lea    -0x8(%rsp),%rsp
  movsd  %xmm0,(%rsp)
  movq   %rax,%xmm0
  call   <sample_quad@plt>
  add    $0x10,%rsp
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm7
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm6
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm5
  mov    -0x50(%rbp),%rax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm4
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  sub    $0x8,%rsp
  lea    -0x8(%rsp),%rsp
  movsd  %xmm0,(%rsp)
  movq   %rax,%xmm0
  call   <sample_quad_rw@plt>
  add    $0x10,%rsp
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x50(%rbp),%rax
  imul   -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  imul   -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  -0x8(%rbp),%xmm0
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  imul   -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L12:
  addq   $0x1,-0x28(%rbp)
L1:
  mov    -0x28(%rbp),%rax
  cmp    0x10(%rbp),%rax
  jb     L32
  nop
  nop
  leave
  ret
```

assistant: ```c
void update_sparse(double *X, double *C, double *b, size_t n, size_t *I, size_t *J, size_t n_idx) {
  size_t i;
  size_t k, l;
  double xkl, xkl_new;
  for (i = 0; i < n_idx; i++) {
    k = I[i];
    l = J[i];
    if (k != l) {
      if ((C[n * k + l] + C[n * l + k]) > 0) {
        xkl = X[n * k + l];
        xkl_new = sample_quad(X[n * k + l], X[n * k + k], X[n * l + l], C[n * k + l], C[n * l + k], C[n * k + k], C[n * l + l], b[k], b[l]);
        X[n * k + l] = xkl_new;
        X[n * k + k] += (xkl - xkl_new);
        X[n * l + k] = xkl_new;
        X[n * l + l] += (xkl - xkl_new);
        xkl = X[n * k + l];
        xkl_new = sample_quad_rw(X[n * k + l], X[n * k + k], X[n * l + l], C[n * k + l], C[n * l + k], C[n * k + k], C[n * l + l], b[k], b[l]);
        X[n * k + l] = xkl_new;
        X[n * k + k] += (xkl - xkl_new);
        X[n * l + k] = xkl_new;
        X[n * l + l] += (xkl - xkl_new);
      }
    }
  }
}
```