user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ComputeFirstMoment4D>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9d,-0x6c(%rbp)
  movl   $0x0,-0x34(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L268
L90:
  movl   $0x0,-0x30(%rbp)
  jmp    L285
L179:
  movl   $0x0,-0x2c(%rbp)
  jmp    L291
L296:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x20(%rbp)
  jmp    L264
L132:
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x1c(%rbp)
  jmp    L52
L298:
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x18(%rbp)
  jmp    L164
L211:
  mov    -0x30(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L113
  negl   -0x14(%rbp)
L113:
  cmpl   $0x0,-0x10(%rbp)
  jns    L16
  negl   -0x10(%rbp)
L16:
  cmpl   $0x0,-0xc(%rbp)
  jns    L44
  negl   -0xc(%rbp)
L44:
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L168
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L168:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L188
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
L188:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  jl     L140
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
L140:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  -0x4(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  addl   $0x1,-0x34(%rbp)
  addl   $0x1,-0x18(%rbp)
L164:
  mov    -0x18(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L211
  addl   $0x1,-0x1c(%rbp)
L52:
  mov    -0x1c(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L298
  addl   $0x1,-0x20(%rbp)
L264:
  mov    -0x20(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L132
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x34(%rbp),%xmm1
  movss  -0x4(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x30(%rbp),%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L291:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L296
  addl   $0x1,-0x30(%rbp)
L285:
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L179
  addl   $0x1,-0x28(%rbp)
L268:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L90
  movl   $0x0,-0x24(%rbp)
  jmp    L198
L100:
  movl   $0x0,-0x28(%rbp)
  jmp    L126
L91:
  movl   $0x0,-0x30(%rbp)
  jmp    L4
L270:
  movl   $0x0,-0x2c(%rbp)
  jmp    L315
L62:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x20(%rbp)
  jmp    L105
L354:
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x1c(%rbp)
  jmp    L246
L203:
  mov    -0x6c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x18(%rbp)
  jmp    L233
L104:
  mov    -0x30(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L138
  negl   -0x14(%rbp)
L138:
  cmpl   $0x0,-0x10(%rbp)
  jns    L68
  negl   -0x10(%rbp)
L68:
  cmpl   $0x0,-0xc(%rbp)
  jns    L346
  negl   -0xc(%rbp)
L346:
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L356
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
L356:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jl     L25
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
L25:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xc(%rbp)
  jl     L124
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  add    %eax,%eax
  sub    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
L124:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  -0x8(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x8(%rbp)
  addl   $0x1,-0x34(%rbp)
  addl   $0x1,-0x18(%rbp)
L233:
  mov    -0x18(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L104
  addl   $0x1,-0x1c(%rbp)
L246:
  mov    -0x1c(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L203
  addl   $0x1,-0x20(%rbp)
L105:
  mov    -0x20(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jle    L354
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x34(%rbp),%xmm1
  movss  -0x8(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x8(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0x24(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  imul   -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x30(%rbp),%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movss  -0x8(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L315:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jl     L62
  addl   $0x1,-0x30(%rbp)
L4:
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L270
  addl   $0x1,-0x28(%rbp)
L126:
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L91
  addl   $0x1,-0x24(%rbp)
L198:
  mov    -0x68(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x24(%rbp)
  jl     L100
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void ComputeFirstMoment4D(float *ima, float *atlas, float *means, float *Ameans, const int *dims, int f) {
  int indice = 0;
  int i, j, k, t;
  int ii, jj, kk;
  int ni, nj, nk;
  float mean = 0.0;
  float Amean = 0.0;
  for (k = 0; k < dims[2]; k++) {
    for (i = 0; i < dims[1]; i++) {
      for (j = 0; j < dims[0]; j++) {
        Amean = 0;
        indice = 0;
        for (ii = -f; ii <= f; ii++) {
          for (jj = -f; jj <= f; jj++) {
            for (kk = -f; kk <= f; kk++) {
              ni = i + ii;
              nj = j + jj;
              nk = k + kk;
              if (ni < 0)
                ni = -ni;
              if (nj < 0)
                nj = -nj;
              if (nk < 0)
                nk = -nk;
              if (ni >= dims[1])
                ni = 2 * dims[1] - ni - 1;
              if (nj >= dims[0])
                nj = 2 * dims[0] - nj - 1;
              if (nk >= dims[2])
                nk = 2 * dims[2] - nk - 1;
              Amean = Amean + atlas[nk * (dims[0] * dims[1]) + (ni * dims[0]) + nj];
              indice = indice + 1;
            }
          }
        }
        Amean = Amean / indice;
        Ameans[k * (dims[0] * dims[1]) + (i * dims[0]) + j] = Amean;
      }
    }
  }
  for (t = 0; t < dims[3]; t++) {
    for (k = 0; k < dims[2]; k++) {
      for (i = 0; i < dims[1]; i++) {
        for (j = 0; j < dims[0]; j++) {
          mean = 0;
          indice = 0;
          for (ii = -f; ii <= f; ii++) {
            for (jj = -f; jj <= f; jj++) {
              for (kk = -f; kk <= f; kk++) {
                ni = i + ii;
                nj = j + jj;
                nk = k + kk;
                if (ni < 0)
                  ni = -ni;
                if (nj < 0)
                  nj = -nj;
                if (nk < 0)
                  nk = -nk;
                if (ni >= dims[1])
                  ni = 2 * dims[1] - ni - 1;
                if (nj >= dims[0])
                  nj = 2 * dims[0] - nj - 1;
                if (nk >= dims[2])
                  nk = 2 * dims[2] - nk - 1;
                mean = mean + ima[t * (dims[0] * dims[1] * dims[2]) + (nk * (dims[0] * dims[1]) + (ni * dims[0]) + nj)];
                indice = indice + 1;
              }
            }
          }
          mean = mean / indice;
          means[t * (dims[0] * dims[1] * dims[2]) + (k * (dims[0] * dims[1]) + (i * dims[0]) + j)] = mean;
        }
      }
    }
  }
}
```