user: 请将以下的汇编代码转换成C语言代码:

```asm
<calculateSubgridErrorGradient_tauRes>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0x28(%rsp)
  mov    %esi,-0x24(%rsp)
  mov    %rcx,-0x20(%rsp)
  test   %edi,%edi
  jle    L75
  mov    %esi,%eax
  test   %esi,%esi
  jle    L75
  mov    %edx,%r12d
  test   %edx,%edx
  jle    L75
  mov    %eax,%edi
  imul   %edx,%eax
  mov    %r9,%rsi
  add    $0x8,%rcx
  mov    %rcx,-0x10(%rsp)
  lea    -0x1(%rdi),%ecx
  movslq %edx,%r13
  mov    %edx,%r9d
  movl   $0x0,-0x30(%rsp)
  shl    $0x3,%r13
  and    $0xfffffffe,%r9d
  movq   D3(%rip),%xmm2
  mov    %eax,-0x2c(%rsp)
  mov    %edx,%eax
  shr    %eax
  movl   $0x0,-0x3c(%rsp)
  lea    -0x1(%rax),%r11d
  lea    -0x1(%rdx),%eax
  mov    %rcx,-0x18(%rsp)
  mov    %eax,-0x44(%rsp)
  shl    $0x3,%rax
  add    $0x1,%r11
  sub    %rsi,%rax
  movl   $0x0,-0x40(%rsp)
  shl    $0x4,%r11
  add    $0x8,%rax
  mov    %rax,-0x38(%rsp)
  nopw   0x0(%rax,%rax,1)
L82:
  movslq -0x30(%rsp),%rdx
  mov    -0x20(%rsp),%rbx
  movslq -0x3c(%rsp),%rax
  lea    (%rbx,%rdx,8),%r10
  mov    -0x10(%rsp),%rbx
  add    -0x18(%rsp),%rdx
  mov    %rax,%rdi
  shl    $0x3,%rax
  lea    (%r8,%rax,1),%rcx
  lea    (%rbx,%rdx,8),%r15
  add    %rsi,%rax
  nop
L84:
  lea    0x8(%rcx),%rbx
  mov    %r10,%rdx
  add    $0x8,%r10
  cmp    %rbx,%rax
  setne  %bpl
  cmpl   $0x1,-0x44(%rsp)
  seta   %bl
  test   %bl,%bpl
  lea    (%rax,%r13,1),%rbx
  je     L32
  cmp    %rbx,%rdx
  setae  %r14b
  cmp    %r10,%rax
  setae  %bpl
  or     %r14b,%bpl
  je     L32
  movsd  (%rdx),%xmm1
  xor    %ebp,%ebp
  xorpd  %xmm2,%xmm1
  unpcklpd %xmm1,%xmm1
  nopl   0x0(%rax)
L100:
  movupd (%rcx,%rbp,1),%xmm0
  mulpd  %xmm1,%xmm0
  movups %xmm0,(%rax,%rbp,1)
  add    $0x10,%rbp
  cmp    %r11,%rbp
  jne    L100
  cmp    %r12d,%r9d
  je     L42
  movsd  (%rdx),%xmm0
  lea    (%rdi,%r9,1),%eax
  cltq
  xorpd  %xmm2,%xmm0
  mulsd  (%r8,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
L42:
  add    %r13,%rcx
  mov    %rbx,%rax
  add    %r12d,%edi
  cmp    %r15,%r10
  jne    L84
  mov    -0x2c(%rsp),%ecx
  addl   $0x1,-0x40(%rsp)
  add    %ecx,-0x3c(%rsp)
  mov    -0x40(%rsp),%eax
  mov    -0x24(%rsp),%ecx
  add    %ecx,-0x30(%rsp)
  cmp    %eax,-0x28(%rsp)
  jne    L82
L75:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L32:
  mov    %rax,%rbp
  add    -0x38(%rsp),%rax
  sub    %rsi,%rbp
  nopl   0x0(%rax,%rax,1)
L15:
  movsd  (%rdx),%xmm0
  xorpd  %xmm2,%xmm0
  mulsd  (%r8,%rbp,1),%xmm0
  movsd  %xmm0,(%rsi,%rbp,1)
  add    $0x8,%rbp
  cmp    %rax,%rbp
  jne    L15
  jmp    L42
```

tool_calls: name: retrieve_data
arguments: tag: D3
type: byte[8]

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
void calculateSubgridErrorGradient_tauRes(int nElements_global, int nQuadraturePoints_element, int nSpace, double *tau_gradient, double *grad_pdeResidual, double *grad_subgridError) {
  int eN, k, j, I;
  for (eN = 0; eN < nElements_global; eN++)
    for (k = 0; k < nQuadraturePoints_element; k++) {
      for (I = 0; I < nSpace; I++) {
        grad_subgridError[eN * nQuadraturePoints_element * nSpace + k * nSpace + I] = -tau_gradient[eN * nQuadraturePoints_element + k] * grad_pdeResidual[eN * nQuadraturePoints_element * nSpace + k * nSpace + I];
      }
    }
}
```