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

```asm
<calculateSubgridError_ADR_tau_2_sd>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %esi,0x8c(%rsp)
  mov    %edx,%r15d
  mov    %rcx,%r14
  mov    0x100(%rsp),%rcx
  mov    %rcx,0x38(%rsp)
  mov    0x108(%rsp),%rcx
  mov    %rcx,0x68(%rsp)
  mov    0x110(%rsp),%r12
  mov    0x118(%rsp),%rcx
  mov    %rcx,0x70(%rsp)
  mov    0x120(%rsp),%rbp
  mov    0x128(%rsp),%rcx
  mov    %rcx,0x40(%rsp)
  mov    0x130(%rsp),%rcx
  mov    %rcx,0x48(%rsp)
  mov    0x138(%rsp),%rcx
  mov    %rcx,0x50(%rsp)
  mov    0x140(%rsp),%rcx
  mov    %rcx,0x58(%rsp)
  mov    0x148(%rsp),%rcx
  mov    %rcx,0x60(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0xb8(%rsp)
  xor    %edx,%edx
  movslq %r15d,%rdx
  mov    (%r14,%rdx,4),%edx
  mov    %edx,0x24(%rsp)
  test   %edi,%edi
  jle    L80
  mov    %r8,%rbx
  mov    %r9,0x78(%rsp)
  mov    %esi,%ecx
  imul   %r15d,%ecx
  mov    %ecx,0x90(%rsp)
  imul   %edx,%esi
  mov    %esi,0x94(%rsp)
  lea    -0x1(%rdi),%edx
  lea    0x8(%r9,%rdx,8),%rax
  mov    %rax,0x98(%rsp)
  movl   $0x0,0x88(%rsp)
  movl   $0x0,0x84(%rsp)
  movl   $0x0,0x80(%rsp)
  jmp    L220
L154:
  movapd %xmm2,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm2
  jmp    L13
L100:
  add    $0x4,%rdx
  add    $0x1,%eax
  cmp    %esi,%eax
  je     L114
L219:
  cmp    %ecx,(%rdx)
  jne    L100
  movslq %eax,%r9
  movsd  (%r12,%r9,8),%xmm1
  maxsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  jmp    L100
L114:
  add    $0x1,%rcx
  cmp    %r8,%rcx
  je     L54
L118:
  mov    (%r14,%rcx,4),%eax
  mov    0x4(%r14,%rcx,4),%esi
  cmp    %esi,%eax
  jge    L114
  movslq %eax,%rdx
  lea    (%rbx,%rdx,4),%rdx
  add    %edi,%eax
  add    %edi,%esi
  jmp    L219
L54:
  mov    0x40(%rsp),%rax
  mulsd  (%rax,%r13,1),%xmm0
  movapd %xmm2,%xmm1
  movsd  0x28(%rsp),%xmm5
  divsd  %xmm5,%xmm1
  movapd %xmm5,%xmm3
  mulsd  %xmm5,%xmm3
  movapd %xmm0,%xmm4
  divsd  %xmm3,%xmm4
  maxsd  %xmm4,%xmm1
  mov    0x58(%rsp),%rax
  movsd  %xmm1,(%rax,%r13,1)
  movapd %xmm2,%xmm1
  mulsd  D49(%rip),%xmm1
  mulsd  %xmm5,%xmm1
  addsd  D24(%rip),%xmm1
  movsd  %xmm1,0x10(%rsp)
  mulsd  D24(%rip),%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  addsd  %xmm2,%xmm2
  divsd  %xmm5,%xmm2
  mulsd  D39(%rip),%xmm0
  divsd  %xmm3,%xmm0
  mov    0x48(%rsp),%rax
  movsd  (%rax,%r13,1),%xmm4
  mov    0x38(%rsp),%rax
  movsd  (%rax,%r13,1),%xmm3
  movapd %xmm0,%xmm1
  mulsd  D46(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm4
  addsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm3
  addsd  %xmm3,%xmm0
  addsd  D24(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L131
  sqrtsd %xmm0,%xmm0
L184:
  movsd  D20(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    0x60(%rsp),%rax
  movsd  %xmm1,(%rax,%r13,1)
  movsd  0x10(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  mov    0x50(%rsp),%rax
  movsd  %xmm0,(%rax,%r13,1)
  add    %r15d,0x20(%rsp)
  mov    0x24(%rsp),%edi
  add    %edi,0xc(%rsp)
  add    $0x8,%r13
  cmp    0x30(%rsp),%r13
  je     L65
L64:
  pxor   %xmm2,%xmm2
  test   %r15d,%r15d
  jle    L42
  mov    0x20(%rsp),%eax
  mov    %eax,%edi
  lea    0xa0(%rsp),%r9
  cltq
  mov    0x68(%rsp),%rsi
  lea    (%rsi,%rax,8),%r11
  movslq 0xc(%rsp),%rax
  mov    0x70(%rsp),%rsi
  lea    (%rsi,%rax,8),%rsi
  mov    $0x0,%r8d
L222:
  movsd  (%r11,%r8,8),%xmm1
  mov    %r9,%r10
  movsd  %xmm1,(%r9)
  mov    (%r14,%r8,4),%eax
  mov    0x4(%r14,%r8,4),%ecx
  cmp    %ecx,%eax
  jge    L208
  cltq
L113:
  mov    %edi,%edx
  add    (%rbx,%rax,4),%edx
  movslq %edx,%rdx
  movsd  0x0(%rbp,%rdx,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  subsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L113
  movsd  %xmm1,(%r10)
L208:
  add    $0x1,%r8
  add    $0x8,%r9
  cmp    %r8d,%r15d
  jg     L222
  mov    $0x0,%eax
  pxor   %xmm2,%xmm2
L36:
  movsd  0xa0(%rsp,%rax,8),%xmm1
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm2
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L36
  pxor   %xmm7,%xmm7
  ucomisd %xmm2,%xmm7
  ja     L154
L42:
  sqrtsd %xmm2,%xmm2
  pxor   %xmm0,%xmm0
  test   %r15d,%r15d
  jle    L54
L13:
  mov    %r15d,%r8d
  mov    $0x0,%ecx
  pxor   %xmm0,%xmm0
  mov    0xc(%rsp),%edi
  jmp    L118
L131:
  call   <sqrt@plt>
  jmp    L184
L65:
  addq   $0x8,0x78(%rsp)
  mov    0x78(%rsp),%rax
  mov    0x8c(%rsp),%esi
  add    %esi,0x80(%rsp)
  mov    0x90(%rsp),%esi
  add    %esi,0x84(%rsp)
  mov    0x94(%rsp),%esi
  add    %esi,0x88(%rsp)
  cmp    0x98(%rsp),%rax
  je     L80
L220:
  mov    0x78(%rsp),%rax
  movsd  (%rax),%xmm7
  movsd  %xmm7,0x28(%rsp)
  mov    0x8c(%rsp),%eax
  test   %eax,%eax
  jle    L65
  movslq 0x80(%rsp),%rdx
  lea    0x0(,%rdx,8),%r13
  mov    %eax,%eax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,0x30(%rsp)
  mov    0x88(%rsp),%eax
  mov    %eax,0xc(%rsp)
  mov    0x84(%rsp),%eax
  mov    %eax,0x20(%rsp)
  jmp    L64
L80:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D49
type_guessed: f64
name: parse_data
arguments: tag: D24
type_guessed: byte[8]
name: parse_data
arguments: tag: D39
type_guessed: f64
name: parse_data
arguments: tag: D46
type_guessed: f64
name: parse_data
arguments: tag: D20
type_guessed: f64

tool: D49: 0.5

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

tool: D39: 4

tool: D46: 9

tool: D20: 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;
    }
  }
}
```