user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<calculateSubgridError_ADR_tau_2_sd>:
  endbr64
  push   %r15
  mov    %edx,%r11d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    0x110(%rsp),%rax
  mov    %esi,0xa0(%rsp)
  mov    0x120(%rsp),%r15
  mov    0x130(%rsp),%r12
  mov    %rax,0x20(%rsp)
  mov    0x118(%rsp),%rax
  mov    %rax,0x40(%rsp)
  mov    0x128(%rsp),%rax
  mov    %rax,0x48(%rsp)
  mov    0x138(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0x140(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0x148(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    0x150(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    0x158(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  movslq %edx,%rax
  mov    (%rcx,%rax,4),%ebx
  mov    %ebx,0x58(%rsp)
  test   %edi,%edi
  jle    L24
  test   %esi,%esi
  jle    L24
  mov    %esi,%eax
  imul   %r11d,%esi
  mov    %r9,0x50(%rsp)
  mov    %r8,%rbp
  imul   %eax,%ebx
  movl   $0x0,0x5c(%rsp)
  movsd  D13(%rip),%xmm9
  mov    %rcx,%r13
  movl   $0x0,0x60(%rsp)
  pxor   %xmm2,%xmm2
  mov    %r11d,%r14d
  movsd  D2(%rip),%xmm4
  mov    %esi,0x74(%rsp)
  mov    %eax,%esi
  lea    -0x1(%rdi),%eax
  movsd  D114(%rip),%xmm8
  lea    0x8(%r9,%rax,8),%rax
  mov    %ebx,0x70(%rsp)
  movsd  D105(%rip),%xmm7
  mov    %r15,%r8
  mov    %rax,0x68(%rsp)
  movslq %esi,%rax
  movsd  D46(%rip),%xmm6
  movl   $0x0,0x64(%rsp)
  mov    %rax,0x78(%rsp)
L117:
  mov    0x50(%rsp),%rax
  mov    0x5c(%rsp),%r9d
  mov    0x60(%rsp),%ebx
  movsd  (%rax),%xmm3
  movslq 0x64(%rsp),%rax
  movapd %xmm3,%xmm5
  lea    0x0(,%rax,8),%r15
  add    0x78(%rsp),%rax
  mulsd  %xmm3,%xmm5
  shl    $0x3,%rax
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L14:
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm0
  test   %r14d,%r14d
  jle    L137
  mov    0x40(%rsp),%rdi
  movslq %ebx,%rax
  lea    0xb0(%rsp),%r10
  lea    (%rdi,%rax,8),%r11
  mov    0x48(%rsp),%rdi
  movslq %r9d,%rax
  lea    (%rdi,%rax,8),%rsi
  xor    %edi,%edi
L60:
  movsd  (%r11,%rdi,8),%xmm1
  movslq 0x0(%r13,%rdi,4),%rax
  mov    0x4(%r13,%rdi,4),%ecx
  movsd  %xmm1,(%r10,%rdi,8)
  cmp    %ecx,%eax
  jge    L164
  xchg   %ax,%ax
L67:
  mov    0x0(%rbp,%rax,4),%edx
  add    %ebx,%edx
  movslq %edx,%rdx
  movsd  (%r12,%rdx,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  subsd  %xmm0,%xmm1
  cmp    %eax,%ecx
  jg     L67
  movsd  %xmm1,(%r10,%rdi,8)
L164:
  add    $0x1,%rdi
  cmp    %edi,%r14d
  jg     L60
  movsd  0xb0(%rsp),%xmm10
  mulsd  %xmm10,%xmm10
  addsd  %xmm2,%xmm10
  cmp    $0x1,%r14d
  je     L76
  movsd  0xb8(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm10
  cmp    $0x3,%r14d
  jne    L76
  movsd  0xc0(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm10
L76:
  ucomisd %xmm10,%xmm2
  ja     L56
  sqrtsd %xmm10,%xmm10
L197:
  xor    %ecx,%ecx
  movapd %xmm2,%xmm0
L66:
  mov    0x0(%r13,%rcx,4),%eax
  mov    0x4(%r13,%rcx,4),%esi
  cmp    %esi,%eax
  jge    L104
  movslq %eax,%rdx
  add    %r9d,%esi
  add    %r9d,%eax
  lea    0x0(%rbp,%rdx,4),%rdx
  nopl   (%rax)
L112:
  cmp    %ecx,(%rdx)
  jne    L82
  movslq %eax,%rdi
  movsd  (%r8,%rdi,8),%xmm1
  maxsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
L82:
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %esi,%eax
  jne    L112
L104:
  add    $0x1,%rcx
  cmp    %ecx,%r14d
  jg     L66
L137:
  mov    0x28(%rsp),%rax
  movapd %xmm10,%xmm11
  divsd  %xmm3,%xmm11
  mulsd  (%rax,%r15,1),%xmm0
  mov    0x38(%rsp),%rax
  movapd %xmm0,%xmm1
  divsd  %xmm5,%xmm1
  maxsd  %xmm1,%xmm11
  movapd %xmm10,%xmm1
  addsd  %xmm10,%xmm10
  mulsd  %xmm9,%xmm1
  movsd  %xmm11,(%rax,%r15,1)
  divsd  %xmm3,%xmm10
  mov    0x30(%rsp),%rax
  movsd  (%rax,%r15,1),%xmm13
  mov    0x20(%rsp),%rax
  mulsd  %xmm3,%xmm1
  mulsd  %xmm13,%xmm13
  movsd  (%rax,%r15,1),%xmm12
  mulsd  %xmm12,%xmm12
  addsd  %xmm4,%xmm1
  movapd %xmm1,%xmm11
  mulsd  %xmm4,%xmm11
  addsd  %xmm0,%xmm11
  mulsd  %xmm8,%xmm0
  divsd  %xmm5,%xmm0
  mulsd  %xmm10,%xmm10
  movapd %xmm0,%xmm14
  mulsd  %xmm7,%xmm14
  mulsd  %xmm14,%xmm0
  addsd  %xmm10,%xmm0
  addsd  %xmm13,%xmm0
  addsd  %xmm12,%xmm0
  addsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm2
  ja     L140
  sqrtsd %xmm0,%xmm0
  movapd %xmm6,%xmm10
  mov    0x18(%rsp),%rax
  add    %r14d,%ebx
  divsd  %xmm11,%xmm1
  add    0x58(%rsp),%r9d
  divsd  %xmm0,%xmm10
  movsd  %xmm10,(%rax,%r15,1)
  mov    0x10(%rsp),%rax
  movsd  %xmm1,(%rax,%r15,1)
  add    $0x8,%r15
  cmp    %r15,0x8(%rsp)
  jne    L14
L184:
  mov    0xa0(%rsp),%ebx
  addq   $0x8,0x50(%rsp)
  add    %ebx,0x64(%rsp)
  mov    0x70(%rsp),%edi
  mov    0x74(%rsp),%ebx
  add    %edi,0x5c(%rsp)
  add    %ebx,0x60(%rsp)
  mov    0x50(%rsp),%rax
  cmp    %rax,0x68(%rsp)
  jne    L117
L24:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  movapd %xmm10,%xmm0
  mov    %r8,0x98(%rsp)
  mov    %r9d,0x90(%rsp)
  movsd  %xmm5,0x88(%rsp)
  movsd  %xmm3,0x80(%rsp)
  call   <sqrt@plt>
  mov    D46(%rip),%rax
  pxor   %xmm2,%xmm2
  mov    0x98(%rsp),%r8
  mov    0x90(%rsp),%r9d
  movapd %xmm0,%xmm10
  movsd  0x88(%rsp),%xmm5
  movsd  0x80(%rsp),%xmm3
  movq   %rax,%xmm6
  mov    D105(%rip),%rax
  movq   %rax,%xmm7
  mov    D114(%rip),%rax
  movq   %rax,%xmm8
  mov    D2(%rip),%rax
  movq   %rax,%xmm4
  mov    D13(%rip),%rax
  movq   %rax,%xmm9
  jmp    L197
L54:
  call   <__stack_chk_fail@plt>
  nopw   0x0(%rax,%rax,1)
L140:
  mov    %r8,0xa8(%rsp)
  add    %r14d,%ebx
  mov    %r9d,0xa4(%rsp)
  movsd  %xmm5,0x98(%rsp)
  movsd  %xmm11,0x90(%rsp)
  movsd  %xmm1,0x88(%rsp)
  movsd  %xmm3,0x80(%rsp)
  call   <sqrt@plt>
  mov    D46(%rip),%rax
  pxor   %xmm2,%xmm2
  movsd  0x88(%rsp),%xmm1
  movapd %xmm0,%xmm10
  movsd  0x90(%rsp),%xmm11
  mov    0xa4(%rsp),%r9d
  movq   %rax,%xmm0
  movq   %rax,%xmm6
  mov    0x18(%rsp),%rax
  add    0x58(%rsp),%r9d
  divsd  %xmm10,%xmm0
  movsd  0x80(%rsp),%xmm3
  movsd  0x98(%rsp),%xmm5
  mov    0xa8(%rsp),%r8
  divsd  %xmm11,%xmm1
  movsd  %xmm0,(%rax,%r15,1)
  mov    0x10(%rsp),%rax
  movsd  %xmm1,(%rax,%r15,1)
  mov    D13(%rip),%rax
  add    $0x8,%r15
  cmp    0x8(%rsp),%r15
  movq   %rax,%xmm9
  mov    D2(%rip),%rax
  movq   %rax,%xmm4
  mov    D114(%rip),%rax
  movq   %rax,%xmm8
  mov    D105(%rip),%rax
  movq   %rax,%xmm7
  jne    L14
  jmp    L184
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D13
datatype: f64
name: extract_symbolic_data
arguments: data_label: D2
datatype: byte[8]
name: extract_symbolic_data
arguments: data_label: D114
datatype: f64
name: extract_symbolic_data
arguments: data_label: D105
datatype: f64
name: extract_symbolic_data
arguments: data_label: D46
datatype: f64

tool: D13: 0.5

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

tool: D114: 4

tool: D105: 9

tool: D46: 1

assistant: ```c
void calculateSubgridError_ADR_tau_2_sd(int nElements_global, int nQuadraturePoints_element, int nSpace, int *rowptr, int *colind, double *elementDiameter, double *dmt, double *df, double *a, double *da, double *grad_phi, double *dphi, double *dr, double *pe, double *cfl, double *tau) {
  int eN, k, I, m, nnz = rowptr[nSpace];
  double h, Vlin, Alin, A_II, num, den, cfl1, cfl2, vlin[3];
  for (eN = 0; eN < nElements_global; eN++) {
    h = elementDiameter[eN];
    for (k = 0; k < nQuadraturePoints_element; k++) {
      Vlin = 0.0;
      Alin = 0.0;
      for (I = 0; I < nSpace; I++) {
        vlin[I] = df[eN * nQuadraturePoints_element * nSpace + k * nSpace + I];
        for (m = rowptr[I]; m < rowptr[I + 1]; m++) {
          vlin[I] -= da[eN * nQuadraturePoints_element * nnz + k * nnz + m] * grad_phi[eN * nQuadraturePoints_element * nSpace + k * nSpace + colind[m]];
        }
      }
      for (I = 0; I < nSpace; I++)
        Vlin += vlin[I] * vlin[I];
      Vlin = sqrt(Vlin);
      for (I = 0; I < nSpace; I++) {
        for (m = rowptr[I]; m < rowptr[I + 1]; m++) {
          if (I == colind[m]) {
            A_II = a[eN * nQuadraturePoints_element * nnz + k * nnz + m];
            Alin = (A_II > Alin) ? A_II : Alin;
          }
        }
      }
      Alin *= dphi[eN * nQuadraturePoints_element + k];
      cfl1 = Vlin / h;
      cfl2 = Alin / (h * h);
      if (cfl1 > cfl2)
        cfl[eN * nQuadraturePoints_element + k] = cfl1;
      else
        cfl[eN * nQuadraturePoints_element + k] = cfl2;
      num = 0.5 * Vlin * h + 1.0e-8;
      den = Alin + num * 1.0e-8;
      tau[eN * nQuadraturePoints_element + k] = 1.0 / sqrt((2.0 * Vlin / h) * (2.0 * Vlin / h) + 9.0 * (4.0 * Alin / (h * h)) * (4.0 * Alin / (h * h)) + dr[eN * nQuadraturePoints_element + k] * dr[eN * nQuadraturePoints_element + k] + dmt[eN * nQuadraturePoints_element + k] * dmt[eN * nQuadraturePoints_element + k] + 1.0e-8);
      pe[eN * nQuadraturePoints_element + k] = num / den;
    }
  }
}
```