user: Converte this assembly snippet into its equivalent C code:

```asm
<sor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  movsd  %xmm0,-0x58(%rbp)
  movsd  %xmm1,-0x60(%rbp)
  movsd  %xmm2,-0x68(%rbp)
  movsd  %xmm3,-0x70(%rbp)
  mov    %edi,-0x74(%rbp)
  mov    %esi,-0x78(%rbp)
  mov    %edx,-0x7c(%rbp)
  mov    %rcx,-0x88(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9,-0x98(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D13(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D13(%rip),%xmm0
  divsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D13(%rip),%xmm0
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x58(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x60(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x68(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x70(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D13(%rip),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x1,-0x4c(%rbp)
  jmp    L126
L94:
  movl   $0x1,-0x48(%rbp)
  jmp    L110
L58:
  movl   $0x1,-0x44(%rbp)
  jmp    L88
L105:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <isfluid@plt>
  test   %rax,%rax
  je     L47
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <emptyneighbor@plt>
  test   %eax,%eax
  jne    L47
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm2,%xmm0
  movapd %xmm0,%xmm2
  divsd  -0x20(%rbp),%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm3,%xmm0
  divsd  -0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm3,%xmm0
  divsd  -0x10(%rbp),%xmm0
  addsd  %xmm2,%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  -0x30(%rbp),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x38(%rbp),%xmm1
  movsd  D13(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L47:
  addl   $0x1,-0x44(%rbp)
L88:
  mov    -0x44(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jle    L105
  addl   $0x1,-0x48(%rbp)
L110:
  mov    -0x48(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jle    L58
  addl   $0x1,-0x4c(%rbp)
L126:
  mov    -0x4c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jle    L94
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x1,-0x4c(%rbp)
  jmp    L120
L82:
  movl   $0x1,-0x48(%rbp)
  jmp    L20
L148:
  movl   $0x1,-0x44(%rbp)
  jmp    L130
L35:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <isfluid@plt>
  test   %rax,%rax
  je     L48
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <emptyneighbor@plt>
  test   %eax,%eax
  jne    L48
  mov    -0x4c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm2
  divsd  -0x20(%rbp),%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0x10(%rbp),%xmm0
  addsd  %xmm2,%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
L48:
  addl   $0x1,-0x44(%rbp)
L130:
  mov    -0x44(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jle    L35
  addl   $0x1,-0x48(%rbp)
L20:
  mov    -0x48(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jle    L148
  addl   $0x1,-0x4c(%rbp)
L120:
  mov    -0x4c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jle    L82
  movsd  -0x40(%rbp),%xmm0
  divsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x98(%rbp),%rax
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x7c(%rbp),%esi
  mov    -0x78(%rbp),%ecx
  mov    -0x74(%rbp),%edx
  mov    -0x88(%rbp),%rax
  mov    %esi,%r8d
  mov    0x10(%rbp),%rsi
  mov    %rax,%rdi
  call   <boundaryvalues_pressure@plt>
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D13
data_type: f64

tool: D13: 1

assistant: ```c
void sor(double omg, double dx, double dy, double dz, int imax, int jmax, int kmax, double ***P, double ***RS, double *res, int ***Flag) {
  int i, j, k;
  double rloc;
  double coeff = omg / (2.0 * (1.0 / (dx * dx) + 1.0 / (dy * dy) + 1.0 / (dz * dz)));
  double FluidCells = 0.0;
  double tmp = 0;
  double dx2 = dx * dx;
  double dy2 = dy * dy;
  double dz2 = dz * dz;
  double omg2 = 1 - omg;
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (isfluid(Flag[i][j][k]) && !emptyneighbor(Flag[i][j][k])) {
          P[i][j][k] = omg2 * P[i][j][k] + coeff * ((P[i + 1][j][k] + P[i - 1][j][k]) / dx2 + (P[i][j + 1][k] + P[i][j - 1][k]) / dy2 + (P[i][j][k + 1] + P[i][j][k - 1]) / dz2 - RS[i][j][k]);
          FluidCells++;
        }
      }
    }
  }
  rloc = 0;
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      for (k = 1; k <= kmax; k++) {
        if (isfluid(Flag[i][j][k]) && !emptyneighbor(Flag[i][j][k])) {
          tmp = (P[i + 1][j][k] - 2.0 * P[i][j][k] + P[i - 1][j][k]) / (dx2) + (P[i][j + 1][k] - 2.0 * P[i][j][k] + P[i][j - 1][k]) / (dy2) + (P[i][j][k + 1] - 2.0 * P[i][j][k] + P[i][j][k - 1]) / (dz2)-RS[i][j][k];
          rloc += tmp * tmp;
        }
      }
    }
  }
  rloc = rloc / FluidCells;
  rloc = sqrt(rloc);
  *res = rloc;
  boundaryvalues_pressure(P, Flag, imax, jmax, kmax);
}
```