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

```asm
<calculateNumericalDiffusionResGradQuad>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  movsd  %xmm0,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L14
L49:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L2
L12:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L30
L17:
  mov    -0x2c(%rbp),%eax
  imul   -0x38(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x2c(%rbp),%eax
  imul   -0x38(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x24(%rbp)
L30:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L17
  movsd  -0x48(%rbp),%xmm1
  movsd  D7(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  mov    -0x2c(%rbp),%eax
  imul   -0x38(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D29(%rip),%xmm2
  andpd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  D14(%rip),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  imul   -0x38(%rbp),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  divsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x28(%rbp)
L2:
  mov    -0x28(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L12
  addl   $0x1,-0x2c(%rbp)
L14:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L49
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
type_guessed: f64
name: unpack_data
arguments: label: D29
type_guessed: qword
name: unpack_data
arguments: label: D14
type_guessed: byte[8]

tool: D7: 0.5

tool: D29: 9223372036854775807

tool: {"D14": [0x3a,0x8c,0x30,0xe2,0x8e,0x79,0x45,0x3e]}

assistant: ```c
void calculateNumericalDiffusionResGradQuad(int nElements_global, int nQuadraturePoints_element, int nSpace, double shockCapturingDiffusion, double *elementDiameter, double *strong_residual, double *grad_u, double *numDiff) {
  int eN, k, I;
  double h, num, den, n_grad_u;
  for (eN = 0; eN < nElements_global; eN++) {
    h = elementDiameter[eN];
    for (k = 0; k < nQuadraturePoints_element; k++) {
      n_grad_u = 0.0;
      for (I = 0; I < nSpace; I++) {
        n_grad_u += grad_u[eN * nQuadraturePoints_element * nSpace + k * nSpace + I] * grad_u[eN * nQuadraturePoints_element * nSpace + k * nSpace + I];
      }
      num = shockCapturingDiffusion * 0.5 * h * fabs(strong_residual[eN * nQuadraturePoints_element + k]);
      den = sqrt(n_grad_u) + 1.0e-8;
      numDiff[eN * nQuadraturePoints_element + k] = num / den;
    }
  }
}
```