user: Demonstrate the C code that generates the assembly output below:

```asm
<TetShapeAndDrv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x158,%rsp
  mov    %edi,0x24(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x48(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x148(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x20(%rsp)
  test   %edi,%edi
  jle    L23
  movsd  (%rsi),%xmm1
  movsd  D52(%rip),%xmm0
  lea    0xf0(%rsp),%rdi
  movsd  0x8(%rsi),%xmm3
  movsd  0x10(%rsi),%xmm2
  mov    %rdi,0x38(%rsp)
  mov    %rdx,%rsi
  subsd  %xmm1,%xmm0
  movsd  %xmm1,(%rdx)
  xor    %edx,%edx
  movsd  %xmm1,0xf0(%rsp)
  pxor   %xmm1,%xmm1
  movsd  %xmm3,0xf8(%rsp)
  movsd  %xmm2,0x100(%rsp)
  subsd  %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x108(%rsp)
L76:
  xor    %eax,%eax
L92:
  movapd %xmm1,%xmm0
  cmp    %edx,%eax
  je     L134
L71:
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L92
  add    $0x1,%rdx
  add    $0x18,%rcx
  movsd  (%rdi,%rdx,8),%xmm0
  movsd  %xmm0,(%rsi,%rdx,8)
  cmp    $0x3,%rdx
  jne    L76
  movsd  D6(%rip),%xmm0
  mov    0x48(%rsp),%rax
  cmpl   $0x1,0x24(%rsp)
  movsd  %xmm0,0x58(%rax)
  movsd  %xmm0,0x50(%rax)
  movsd  %xmm0,0x48(%rax)
  je     L75
  lea    0xb0(%rsp),%rax
  lea    D49(%rip),%rbp
  mov    $0x4,%r10d
  mov    %rax,0x40(%rsp)
  lea    0xd0(%rsp),%r14
  lea    0x30(%rbp),%r15
  lea    0x110(%rsp),%rax
  mov    %r14,0x58(%rsp)
  lea    0x70(%rsp),%rbx
  mov    %rax,0x18(%rsp)
  mov    %rbp,0x10(%rsp)
  nopl   0x0(%rax)
L49:
  mov    0x10(%rsp),%rbp
  mov    0x38(%rsp),%r13
  mov    %r10d,0x8(%rsp)
  mov    $0x2,%r12d
  movslq 0x0(%rbp),%rax
  mov    %r13,%rsi
  mov    %rbp,%rdi
  movsd  0xf0(%rsp,%rax,8),%xmm0
  movslq 0x4(%rbp),%rax
  movsd  %xmm0,0x70(%rsp)
  movsd  0xf0(%rsp,%rax,8),%xmm0
  xor    %eax,%eax
  movsd  %xmm0,0x78(%rsp)
  call   <R_edgeBlendTet@plt>
  pxor   %xmm3,%xmm3
  mov    %r13,%rsi
  mov    %rbp,%rdi
  cvtsi2sd %eax,%xmm3
  mov    0x40(%rsp),%rdx
  xor    %eax,%eax
  movsd  %xmm3,(%rsp)
  call   <R_edgeBlendTetDrv@plt>
  mov    0x4(%rbp),%esi
  mov    0x18(%rsp),%rcx
  xor    %eax,%eax
  mov    0x0(%rbp),%edi
  mov    $0x4,%edx
  call   <E_parDrv@plt>
  movslq 0x8(%rsp),%r10
  mov    0x48(%rsp),%rcx
  movsd  (%rsp),%xmm3
  lea    0x1(%r10),%r9d
  lea    (%r10,%r10,2),%rax
  movslq %r9d,%rbp
  lea    (%rcx,%rax,8),%r13
  nopl   0x0(%rax)
L165:
  mov    %r12d,%edi
  mov    %rbx,%rsi
  xor    %eax,%eax
  movsd  %xmm3,0x8(%rsp)
  call   <E_modeShape@plt>
  pxor   %xmm2,%xmm2
  mov    %r12d,%edi
  mov    %r14,%rdx
  cvtsi2sd %eax,%xmm2
  mov    %rbx,%rsi
  xor    %eax,%eax
  add    $0x1,%r12d
  add    $0x18,%r13
  movsd  %xmm2,(%rsp)
  call   <E_modeShapeDrv@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  mov    %ebp,%r10d
  movsd  0xd8(%rsp),%xmm4
  mov    0x28(%rsp),%rax
  movsd  0x110(%rsp),%xmm1
  movapd %xmm3,%xmm0
  movsd  0x118(%rsp),%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm5
  movsd  %xmm0,-0x8(%rax,%rbp,8)
  add    $0x1,%rbp
  movsd  0xd0(%rsp),%xmm0
  mulsd  %xmm0,%xmm1
  addsd  %xmm5,%xmm1
  movsd  0xb0(%rsp),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm1
  movsd  %xmm1,-0x18(%r13)
  movsd  0x120(%rsp),%xmm1
  movsd  0x128(%rsp),%xmm5
  mulsd  %xmm0,%xmm1
  mulsd  %xmm4,%xmm5
  addsd  %xmm5,%xmm1
  movsd  0xb8(%rsp),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm1
  movsd  %xmm1,-0x10(%r13)
  mulsd  0x130(%rsp),%xmm0
  mulsd  0x138(%rsp),%xmm4
  mulsd  0xc0(%rsp),%xmm2
  addsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%r13)
  cmp    %r12d,0x24(%rsp)
  jge    L165
  addq   $0x8,0x10(%rsp)
  mov    0x10(%rsp),%rax
  cmp    %r15,%rax
  jne    L49
  cmpl   $0x2,0x24(%rsp)
  mov    %r10d,0x20(%rsp)
  je     L23
  lea    D22(%rip),%rax
  lea    0x90(%rsp),%rbp
  mov    %rax,0x30(%rsp)
  lea    0x68(%rsp),%rax
  lea    0x80(%rsp),%r14
  mov    %rax,0x50(%rsp)
L111:
  mov    0x30(%rsp),%rbx
  mov    0x40(%rsp),%rdx
  mov    0x38(%rsp),%rsi
  movslq (%rbx),%rax
  mov    %rbx,%rdi
  movsd  0xf0(%rsp,%rax,8),%xmm0
  movslq 0x4(%rbx),%rax
  movsd  0xf0(%rsp,%rax,8),%xmm2
  movslq 0x8(%rbx),%rax
  movsd  %xmm0,0x90(%rsp)
  movsd  0xf0(%rsp,%rax,8),%xmm1
  mulsd  %xmm2,%xmm0
  xor    %eax,%eax
  movsd  %xmm2,0x98(%rsp)
  movsd  %xmm1,0xa0(%rsp)
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsp)
  call   <R_faceBlendTetDrv@plt>
  mov    0x8(%rbx),%edx
  mov    0x4(%rbx),%esi
  mov    $0x4,%ecx
  mov    (%rbx),%edi
  mov    0x50(%rsp),%r8
  xor    %eax,%eax
  mov    $0x3,%ebx
  call   <F_parDrv@plt>
  movq   $0x1,0x10(%rsp)
  nopl   0x0(%rax)
L60:
  movslq 0x20(%rsp),%rax
  mov    0x48(%rsp),%rcx
  xor    %r12d,%r12d
  lea    (%rax,%rax,2),%rdx
  lea    (%rcx,%rdx,8),%r13
  mov    0x28(%rsp),%rcx
  mov    %r13,%r15
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L66:
  mov    %r12d,%esi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <F_modeShapeTri@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm1
  mov    %ebx,%edi
  cvtsi2sd %eax,%xmm0
  mov    0x18(%rsp),%rax
  mov    %r12d,%esi
  mov    %r14,%rcx
  mov    %rbp,%rdx
  add    $0x18,%r15
  mulsd  %xmm0,%xmm1
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm1,(%rax,%r12,8)
  xor    %eax,%eax
  add    $0x1,%r12
  call   <F_modeShapeTriDrv@plt>
  mov    0x68(%rsp),%rax
  pxor   %xmm3,%xmm3
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  movsd  0x8(%rsp),%xmm0
  movsd  (%rsp),%xmm6
  movsd  0x80(%rsp),%xmm4
  cvtsi2sdl (%rax),%xmm3
  movsd  0x88(%rsp),%xmm5
  cvtsi2sdl 0x4(%rax),%xmm1
  cvtsi2sdl 0x8(%rax),%xmm2
  mulsd  %xmm4,%xmm3
  mulsd  %xmm5,%xmm1
  mulsd  %xmm4,%xmm2
  addsd  %xmm1,%xmm3
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0xc(%rax),%xmm1
  movsd  %xmm3,0xd0(%rsp)
  mulsd  %xmm6,%xmm3
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm2
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x10(%rax),%xmm1
  movsd  %xmm2,0xd8(%rsp)
  mulsd  %xmm6,%xmm2
  mulsd  %xmm4,%xmm1
  pxor   %xmm4,%xmm4
  cvtsi2sdl 0x14(%rax),%xmm4
  mulsd  %xmm5,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0xb0(%rsp),%xmm4
  mulsd  %xmm0,%xmm4
  movsd  %xmm1,0xe0(%rsp)
  mulsd  %xmm6,%xmm1
  addsd  %xmm4,%xmm3
  movsd  %xmm3,-0x18(%r15)
  movsd  0xb8(%rsp),%xmm3
  mulsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
  movsd  %xmm2,-0x10(%r15)
  mulsd  0xc0(%rsp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r15)
  cmp    %r12,0x10(%rsp)
  jne    L66
  mov    0x20(%rsp),%eax
  addq   $0x1,0x10(%rsp)
  lea    -0x2(%rax,%rbx,1),%eax
  mov    %eax,0x20(%rsp)
  mov    0x10(%rsp),%rax
  lea    0x2(%rax),%ebx
  cmp    0x24(%rsp),%ebx
  jle    L60
  addq   $0xc,0x30(%rsp)
  mov    0x30(%rsp),%rax
  lea    D30(%rip),%rcx
  cmp    %rcx,%rax
  jne    L111
  cmpl   $0x3,0x24(%rsp)
  jle    L23
  mov    0x58(%rsp),%r14
  mov    0x38(%rsp),%rbp
  mov    $0x4,%ebx
  nopw   0x0(%rax,%rax,1)
L13:
  movsd  0xf0(%rsp),%xmm0
  lea    -0x3(%rbx),%eax
  movsd  D52(%rip),%xmm2
  lea    -0x2(%rbx),%r15d
  movsd  0xf8(%rsp),%xmm1
  imul   %eax,%r15d
  movsd  0x100(%rsp),%xmm5
  subsd  %xmm0,%xmm2
  movapd %xmm0,%xmm4
  movslq 0x20(%rsp),%rax
  movsd  0x108(%rsp),%xmm7
  mulsd  %xmm1,%xmm4
  mov    0x48(%rsp),%rdi
  mulsd  %xmm5,%xmm0
  mov    %r15d,%ecx
  lea    (%rax,%rax,2),%rdx
  xor    %r15d,%r15d
  subsd  %xmm1,%xmm2
  mulsd  %xmm5,%xmm1
  sar    %ecx
  lea    (%rdi,%rdx,8),%r13
  mov    %ecx,0x50(%rsp)
  movslq %ecx,%rcx
  mov    %r13,%r12
  mov    %rcx,0x10(%rsp)
  mov    0x28(%rsp),%rcx
  subsd  %xmm5,%xmm2
  movapd %xmm4,%xmm3
  mulsd  %xmm5,%xmm3
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  mulsd  %xmm2,%xmm4
  mulsd  %xmm2,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm7
  subsd  %xmm3,%xmm4
  subsd  %xmm3,%xmm1
  subsd  %xmm3,%xmm0
  movsd  %xmm7,(%rsp)
  movsd  %xmm1,0x38(%rsp)
  movsd  %xmm0,0x40(%rsp)
  movsd  %xmm4,0x30(%rsp)
  nopl   (%rax)
L112:
  mov    %r15d,%esi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <R_modeShapeTet@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm1
  mov    %ebx,%edi
  cvtsi2sd %eax,%xmm0
  mov    0x18(%rsp),%rax
  mov    %r15d,%esi
  mov    %r14,%rcx
  mov    %rbp,%rdx
  add    $0x18,%r12
  mulsd  %xmm0,%xmm1
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm1,(%rax,%r15,8)
  xor    %eax,%eax
  add    $0x1,%r15
  call   <R_modeShapeTetDrv@plt>
  movsd  0x8(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm5
  movsd  0xd0(%rsp),%xmm2
  movsd  (%rsp),%xmm7
  mulsd  %xmm0,%xmm5
  mulsd  %xmm7,%xmm2
  movapd %xmm5,%xmm1
  addsd  %xmm2,%xmm1
  movsd  %xmm1,-0x18(%r12)
  movsd  0x40(%rsp),%xmm1
  movsd  0xd8(%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  mulsd  %xmm7,%xmm2
  mulsd  0x30(%rsp),%xmm0
  addsd  %xmm2,%xmm1
  movsd  %xmm1,-0x10(%r12)
  mulsd  0xe0(%rsp),%xmm7
  addsd  %xmm7,%xmm0
  movsd  %xmm0,-0x8(%r12)
  cmp    %r15,0x10(%rsp)
  jne    L112
  mov    0x50(%rsp),%ecx
  add    $0x1,%ebx
  add    %ecx,0x20(%rsp)
  cmp    %ebx,0x24(%rsp)
  jge    L13
L23:
  mov    0x148(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L74
  mov    0x20(%rsp),%eax
  add    $0x158,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L134:
  mov    D52(%rip),%rbx
  movq   %rbx,%xmm0
  jmp    L71
L75:
  movl   $0x4,0x20(%rsp)
  jmp    L23
L74:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D52
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D6
type_guessed: f32[2]

tool: D52: 1

tool: {"D6": [0.0,-1.875]}

assistant: ```c
int TetShapeAndDrv(int p, double par[3], double N[], double dN[][3]) {
  static int TetEMAP[6][2] = {{0, 1}, {1, 2}, {2, 0}, {0, 3}, {1, 3}, {2, 3}};
  static int TetFMAP[4][3] = {{0, 1, 2}, {0, 3, 1}, {1, 3, 2}, {0, 2, 3}};
  int NS, is, i, j, ip, nshp = 0, (*fpdrv)[2];
  double L[4], Le[2], Lf[3], mode, blend, bdrv[3], mdrv[3], epdrv[3][2], mfdrv[2];
  double tmp, rst, rsw, stw, rstw, rtw;
  if (p < 1)
    return nshp;
  L[0] = par[0];
  L[1] = par[1];
  L[2] = par[2];
  L[3] = 1.0e0 - par[0] - par[1] - par[2];
  for (i = 0; i < 4; i++) {
    N[i] = L[i];
    if (i == 3)
      dN[i][0] = dN[i][1] = dN[i][2] = -1.0e0;
    else {
      for (j = 0; j < 3; j++) {
        if (i == j)
          dN[i][j] = 1.0e0;
        else
          dN[i][j] = 0.0e0;
      }
    }
  }
  nshp = 4;
  if (p > 1) {
    for (i = 0; i < 6; i++) {
      Le[0] = L[TetEMAP[i][0]];
      Le[1] = L[TetEMAP[i][1]];
      blend = R_edgeBlendTet(TetEMAP[i], L);
      R_edgeBlendTetDrv(TetEMAP[i], L, bdrv);
      E_parDrv(TetEMAP[i][0], TetEMAP[i][1], 4, epdrv);
      for (ip = 2; ip <= p; ip++) {
        mode = E_modeShape(ip, Le);
        E_modeShapeDrv(ip, Le, mdrv);
        N[nshp] = blend * mode;
        dN[nshp][0] = bdrv[0] * mode + blend * (mdrv[0] * epdrv[0][0] + mdrv[1] * epdrv[0][1]);
        dN[nshp][1] = bdrv[1] * mode + blend * (mdrv[0] * epdrv[1][0] + mdrv[1] * epdrv[1][1]);
        dN[nshp][2] = bdrv[2] * mode + blend * (mdrv[0] * epdrv[2][0] + mdrv[1] * epdrv[2][1]);
        nshp++;
      }
    }
  }
  if (p > 2) {
    for (i = 0; i < 4; i++) {
      Lf[0] = L[TetFMAP[i][0]];
      Lf[1] = L[TetFMAP[i][1]];
      Lf[2] = L[TetFMAP[i][2]];
      blend = Lf[0] * Lf[1] * Lf[2];
      R_faceBlendTetDrv(TetFMAP[i], L, bdrv);
      F_parDrv(TetFMAP[i][0], TetFMAP[i][1], TetFMAP[i][2], 4, &fpdrv);
      for (ip = 3; ip <= p; ip++) {
        NS = ip - 2;
        for (is = 0; is < NS; is++) {
          mode = F_modeShapeTri(ip, is, Lf);
          N[nshp] = blend * mode;
          F_modeShapeTriDrv(ip, is, Lf, mfdrv);
          mdrv[0] = mfdrv[0] * (double)fpdrv[0][0] + mfdrv[1] * (double)fpdrv[0][1];
          mdrv[1] = mfdrv[0] * (double)fpdrv[1][0] + mfdrv[1] * (double)fpdrv[1][1];
          mdrv[2] = mfdrv[0] * (double)fpdrv[2][0] + mfdrv[1] * (double)fpdrv[2][1];
          dN[nshp][0] = bdrv[0] * mode + blend * mdrv[0];
          dN[nshp][1] = bdrv[1] * mode + blend * mdrv[1];
          dN[nshp][2] = bdrv[2] * mode + blend * mdrv[2];
          nshp++;
        }
      }
    }
  }
  if (p > 3) {
    for (ip = 4; ip <= p; ip++) {
      NS = (ip - 3) * (ip - 2) / 2;
      blend = L[0] * L[1] * L[2] * L[3];
      tmp = 1.0e0 - L[0] - L[1] - L[2];
      rsw = L[0] * L[1] * tmp;
      stw = L[1] * L[2] * tmp;
      rtw = L[0] * L[2] * tmp;
      rst = L[0] * L[1] * L[2];
      rstw = rst * L[3];
      for (is = 0; is < NS; is++) {
        mode = R_modeShapeTet(ip, is, L);
        N[nshp] = blend * mode;
        R_modeShapeTetDrv(ip, is, L, mdrv);
        dN[nshp][0] = mode * (stw - rst) + rstw * mdrv[0];
        dN[nshp][1] = mode * (rtw - rst) + rstw * mdrv[1];
        dN[nshp][2] = mode * (rsw - rst) + rstw * mdrv[2];
        nshp++;
      }
    }
  }
  return nshp;
}
```