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

```asm
<calculateSubgridErrorStokes2D_GLS_velocity_sd>:
  endbr64
  push   %r15
  mov    %r8,%rax
  push   %r14
  mov    %r9,%r14
  push   %r13
  mov    %edi,%r13d
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    0x48(%rsp),%rsi
  mov    0x58(%rsp),%rdi
  mov    0x60(%rsp),%r8
  mov    0x70(%rsp),%r9
  mov    0x78(%rsp),%r10
  mov    %ecx,-0x48(%rsp)
  mov    0x88(%rsp),%r11
  mov    0x40(%rsp),%rcx
  mov    0x90(%rsp),%rbx
  test   %r13d,%r13d
  jle    L59
  test   %ebp,%ebp
  jle    L59
  mov    %rax,-0x38(%rsp)
  movslq %ebp,%rax
  mov    %edx,%r12d
  movsd  D3(%rip),%xmm3
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rsp),%eax
  mov    %r14,-0x30(%rsp)
  mov    -0x38(%rsp),%r14
  mov    %rdx,-0x18(%rsp)
  mov    %ebp,%edx
  imul   %ebp,%eax
  movl   $0x0,-0x28(%rsp)
  lea    0x0(,%rdx,8),%r15
  imul   %r12d,%ebp
  cltq
  shl    $0x3,%rax
  mov    %ebp,-0x24(%rsp)
  mov    %rax,-0x20(%rsp)
  lea    -0x1(%r13),%eax
  lea    0x8(%r14,%rax,8),%r14
  movslq -0x48(%rsp),%rax
  mov    %r14,-0x10(%rsp)
  shl    $0x3,%rax
  mov    %rax,-0x48(%rsp)
  mov    %rdx,%rax
  neg    %rax
  shl    $0x3,%rax
  mov    %rax,-0x8(%rsp)
  lea    -0x1(%r12),%eax
  add    $0x1,%rax
  mov    %rax,-0x40(%rsp)
  nopl   0x0(%rax,%rax,1)
L20:
  mov    -0x38(%rsp),%rax
  mov    -0x28(%rsp),%r14d
  mov    -0x30(%rsp),%r13
  movsd  (%rax),%xmm2
  mov    -0x8(%rsp),%rax
  mulsd  %xmm2,%xmm2
  lea    (%rax,%r15,1),%rbp
L56:
  movsd  0x0(%r13),%xmm1
  movapd %xmm2,%xmm0
  mov    0x38(%rsp),%rax
  mulsd  %xmm3,%xmm1
  divsd  %xmm1,%xmm0
  movsd  (%rax,%rbp,1),%xmm1
  mov    0x68(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%rbp,1)
  mov    0x50(%rsp),%rax
  movsd  (%rax,%rbp,1),%xmm1
  mov    0x80(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%rbp,1)
  test   %r12d,%r12d
  jle    L19
  movslq %r14d,%rdx
  lea    0x0(,%rdx,8),%rax
  add    -0x40(%rsp),%rdx
  shl    $0x3,%rdx
  xchg   %ax,%ax
L21:
  movsd  (%rcx,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r9,%rax,1)
  movsd  (%rsi,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r10,%rax,1)
  movsd  (%rdi,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r11,%rax,1)
  movsd  (%r8,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L21
L19:
  add    $0x8,%rbp
  add    -0x48(%rsp),%r13
  add    %r12d,%r14d
  cmp    %rbp,%r15
  jne    L56
  mov    -0x20(%rsp),%r14
  addq   $0x8,-0x38(%rsp)
  add    %r14,-0x30(%rsp)
  mov    -0x38(%rsp),%rax
  mov    -0x24(%rsp),%r14d
  add    -0x18(%rsp),%r15
  add    %r14d,-0x28(%rsp)
  cmp    -0x10(%rsp),%rax
  jne    L20
L59:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D3
type: f64

tool: D3: 12

assistant: ```c
void calculateSubgridErrorStokes2D_GLS_velocity_sd(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 *subgridErrorU, double *dsubgridErrorU_dp, double *dsubgridErrorU_du, double *subgridErrorV, double *dsubgridErrorV_dp, double *dsubgridErrorV_dv) {
  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 * nSpace + k * nSpace];
      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];
      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];
      }
    }
  }
}
```