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

```asm
<ScatterUpdateFO>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L50
L31:
  cmpq   $0x0,-0x40(%rbp)
  je     L10
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  jmp    L80
L10:
  mov    -0x18(%rbp),%rax
  imul   -0x48(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
L80:
  mov    -0x18(%rbp),%rax
  imul   -0x28(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L45
  movq   $0x0,-0x20(%rbp)
  jmp    L41
L94:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x20(%rbp)
L41:
  mov    -0x20(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jl     L94
  jmp    L17
L45:
  movq   $0x0,-0x20(%rbp)
  jmp    L98
L21:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x20(%rbp)
L98:
  mov    -0x20(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jl     L21
L17:
  addq   $0x1,-0x18(%rbp)
L50:
  mov    -0x18(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jl     L31
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void ScatterUpdateFO(long dimi, long *structi, long dimj, long *structj, long destdim, double *oldupdate, double *newupdate) {
  long i, j;
  double *srccol, *destcol;
  for (j = 0; j < dimj; j++) {
    if (structj)
      destcol = &newupdate[structj[j] * destdim];
    else
      destcol = &newupdate[j * destdim];
    srccol = &oldupdate[j * dimi];
    if (structi)
      for (i = 0; i < dimi; i++) {
        destcol[structi[i]] += srccol[i];
        srccol[i] = 0.0;
      }
    else
      for (i = 0; i < dimi; i++) {
        destcol[i] += srccol[i];
        srccol[i] = 0.0;
      }
  }
}
```