user: 请从给定的汇编指令推导出C源代码:

```asm
<calculateSubgridErrorStokes3D_GLS_velocity>:
  endbr64
  push   %r15
  mov    %edi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x40(%rsp),%r15
  mov    0x48(%rsp),%r14
  mov    0x58(%rsp),%r13
  mov    0x70(%rsp),%rdi
  mov    0x90(%rsp),%r10
  mov    %edx,-0x58(%rsp)
  mov    %ecx,%edx
  mov    0xa0(%rsp),%r11
  mov    %esi,-0x30(%rsp)
  imul   %ecx,%edx
  mov    %r8,%rsi
  mov    0xa8(%rsp),%rbx
  mov    %r9,-0x10(%rsp)
  mov    0x78(%rsp),%r8
  mov    0x88(%rsp),%r9
  mov    0xb8(%rsp),%rbp
  mov    0xc0(%rsp),%r12
  test   %eax,%eax
  jle    L9
  mov    -0x30(%rsp),%ecx
  mov    %rsi,-0x38(%rsp)
  sub    $0x1,%eax
  mov    -0x58(%rsp),%esi
  movl   $0x0,-0x24(%rsp)
  movl   $0x0,-0x28(%rsp)
  movsd  D4(%rip),%xmm3
  imul   %ecx,%esi
  movl   $0x0,-0x2c(%rsp)
  mov    %esi,-0x20(%rsp)
  mov    %ecx,%esi
  imul   %edx,%esi
  mov    %esi,-0x1c(%rsp)
  mov    -0x38(%rsp),%rsi
  lea    0x8(%rsi,%rax,8),%rsi
  movslq %edx,%rax
  mov    %rsi,-0x18(%rsp)
  lea    0x0(,%rax,8),%rsi
  lea    -0x1(%rcx),%eax
  mov    %rsi,-0x48(%rsp)
  lea    0x1(%rax),%rsi
  mov    -0x58(%rsp),%eax
  mov    %rsi,-0x8(%rsp)
  mov    0x60(%rsp),%rsi
  sub    $0x1,%eax
  add    $0x1,%rax
  mov    %rax,-0x40(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L26:
  mov    -0x38(%rsp),%rax
  mov    -0x30(%rsp),%edx
  movsd  (%rax),%xmm2
  test   %edx,%edx
  jle    L20
  mov    -0x10(%rsp),%rcx
  movslq -0x28(%rsp),%rax
  mulsd  %xmm2,%xmm2
  lea    (%rcx,%rax,8),%rax
  mov    %rax,-0x60(%rsp)
  movslq -0x24(%rsp),%rax
  lea    0x0(,%rax,8),%rcx
  add    -0x8(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rsp)
  mov    -0x2c(%rsp),%eax
  mov    %eax,-0x54(%rsp)
  nop
L46:
  mov    -0x60(%rsp),%rax
  movapd %xmm2,%xmm0
  movsd  (%rax),%xmm1
  mov    0x38(%rsp),%rax
  mulsd  %xmm3,%xmm1
  divsd  %xmm1,%xmm0
  movsd  (%rax,%rcx,1),%xmm1
  mov    0x80(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%rcx,1)
  mov    0x50(%rsp),%rax
  movsd  (%rax,%rcx,1),%xmm1
  mov    0x98(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%rcx,1)
  mov    0x68(%rsp),%rax
  movsd  (%rax,%rcx,1),%xmm1
  mov    0xb0(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%rcx,1)
  mov    -0x58(%rsp),%eax
  test   %eax,%eax
  jle    L21
  movslq -0x54(%rsp),%rdx
  lea    0x0(,%rdx,8),%rax
  add    -0x40(%rsp),%rdx
  shl    $0x3,%rdx
  nopl   0x0(%rax,%rax,1)
L34:
  movsd  (%r15,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r9,%rax,1)
  movsd  (%r14,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r10,%rax,1)
  movsd  0x0(%r13,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r11,%rax,1)
  movsd  (%rsi,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%rax,1)
  movsd  (%rdi,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%rax,1)
  movsd  (%r8,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r12,%rax,1)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L34
L21:
  mov    -0x48(%rsp),%rdx
  add    $0x8,%rcx
  add    %rdx,-0x60(%rsp)
  mov    -0x58(%rsp),%edx
  add    %edx,-0x54(%rsp)
  cmp    %rcx,-0x50(%rsp)
  jne    L46
L20:
  mov    -0x20(%rsp),%edx
  addq   $0x8,-0x38(%rsp)
  add    %edx,-0x2c(%rsp)
  mov    -0x38(%rsp),%rax
  mov    -0x1c(%rsp),%edx
  add    %edx,-0x28(%rsp)
  mov    -0x30(%rsp),%edx
  add    %edx,-0x24(%rsp)
  cmp    -0x18(%rsp),%rax
  jne    L26
L9:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D4
type: f64

tool: D4: 12

assistant: ```c
void calculateSubgridErrorStokes3D_GLS_velocity(int nElements_global, int nQuadraturePoints_element, int nDOF_trial_element, int nSpace, double *elementDiameter, double *a, double *pdeResidualU, double *dpdeResidualU_dp, double *dpdeResidualU_du, double *pdeResidualV, double *dpdeResidualV_dp, double *dpdeResidualV_dv, double *pdeResidualW, double *dpdeResidualW_dp, double *dpdeResidualW_dw, double *subgridErrorU, double *dsubgridErrorU_dp, double *dsubgridErrorU_du, double *subgridErrorV, double *dsubgridErrorV_dp, double *dsubgridErrorV_dv, double *subgridErrorW, double *dsubgridErrorW_dp, double *dsubgridErrorW_dw) {
  int eN, k, nSpace2 = nSpace * nSpace, j;
  double h, viscosity, tau1;
  for (eN = 0; eN < nElements_global; eN++) {
    h = elementDiameter[eN];
    for (k = 0; k < nQuadraturePoints_element; k++) {
      viscosity = a[eN * nQuadraturePoints_element * nSpace2 + k * nSpace2];
      tau1 = h * h / (12.0 * viscosity);
      subgridErrorU[eN * nQuadraturePoints_element + k] = tau1 * pdeResidualU[eN * nQuadraturePoints_element + k];
      subgridErrorV[eN * nQuadraturePoints_element + k] = tau1 * pdeResidualV[eN * nQuadraturePoints_element + k];
      subgridErrorW[eN * nQuadraturePoints_element + k] = tau1 * pdeResidualW[eN * nQuadraturePoints_element + k];
      for (j = 0; j < nDOF_trial_element; j++) {
        dsubgridErrorU_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualU_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
        dsubgridErrorU_du[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualU_du[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
        dsubgridErrorV_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualV_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
        dsubgridErrorV_dv[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualV_dv[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
        dsubgridErrorW_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualW_dp[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
        dsubgridErrorW_dw[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j] = tau1 * dpdeResidualW_dw[eN * nQuadraturePoints_element * nDOF_trial_element + k * nDOF_trial_element + j];
      }
    }
  }
}
```