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    $0x198,%rsp
  mov    %edi,0x5c(%rsp)
  mov    %rdx,0x70(%rsp)
  mov    %rcx,0x80(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x188(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x58(%rsp)
  test   %edi,%edi
  jle    L121
  movupd (%rsi),%xmm1
  movsd  0x10(%rsi),%xmm3
  mov    %rdx,%r8
  xor    %esi,%esi
  movsd  D75(%rip),%xmm0
  mov    D75(%rip),%rax
  mov    %rcx,%rdi
  movapd %xmm1,%xmm2
  movaps %xmm1,0x130(%rsp)
  subsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  movsd  %xmm2,(%rdx)
  xor    %edx,%edx
  mov    %rax,(%rcx)
  movsd  %xmm3,0x140(%rsp)
  subsd  %xmm1,%xmm0
  subsd  %xmm3,%xmm0
  movsd  %xmm0,0x148(%rsp)
L69:
  lea    (%rsi,%rsi,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,0x8(%rax)
  cmp    $0x2,%edx
  je     L134
  mov    $0x2,%esi
L147:
  lea    0x1(%rdx),%ecx
  movq   $0x0,0x10(%rax)
  mov    $0x2,%edx
  movslq %ecx,%rax
  movsd  0x130(%rsp,%rax,8),%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  lea    (%rax,%rax,2),%rax
  lea    (%rdi,%rax,8),%rax
  movq   $0x0,(%rax)
  cmp    $0x1,%ecx
  jne    L69
  mov    D75(%rip),%rcx
  mov    $0x1,%edx
  mov    %rcx,0x20(%rdi)
  jmp    L147
L134:
  mov    0x80(%rsp),%rax
  mov    D75(%rip),%rcx
  mov    $0x4,%r10d
  movsd  0x148(%rsp),%xmm0
  cmpl   $0x1,0x5c(%rsp)
  mov    %r10d,0x58(%rsp)
  mov    %rcx,0x40(%rax)
  mov    0x70(%rsp),%rcx
  movsd  %xmm0,0x18(%rcx)
  mov    D98(%rip),%rcx
  movapd D98(%rip),%xmm0
  mov    %rcx,0x58(%rax)
  movups %xmm0,0x48(%rax)
  je     L121
  lea    0x130(%rsp),%rax
  lea    D65(%rip),%rbp
  mov    %rax,0x78(%rsp)
  lea    0xf0(%rsp),%rax
  lea    0x30(%rbp),%r15
  mov    %rax,0x88(%rsp)
  lea    0x110(%rsp),%r14
  lea    0x150(%rsp),%rax
  mov    %rax,0x30(%rsp)
  lea    0xb0(%rsp),%rbx
  mov    %r14,0x98(%rsp)
  mov    %rbp,0x20(%rsp)
  nopw   0x0(%rax,%rax,1)
L17:
  mov    0x20(%rsp),%rbp
  mov    0x78(%rsp),%r13
  mov    %r10d,0x10(%rsp)
  mov    $0x2,%r12d
  movslq 0x0(%rbp),%rdx
  movslq 0x4(%rbp),%rax
  mov    %r13,%rsi
  mov    %rbp,%rdi
  movsd  0x130(%rsp,%rdx,8),%xmm0
  movhpd 0x130(%rsp,%rax,8),%xmm0
  xor    %eax,%eax
  movaps %xmm0,0xb0(%rsp)
  call   <R_edgeBlendTet@plt>
  pxor   %xmm3,%xmm3
  mov    %r13,%rsi
  mov    %rbp,%rdi
  cvtsi2sd %eax,%xmm3
  mov    0x88(%rsp),%rdx
  xor    %eax,%eax
  movsd  %xmm3,0x8(%rsp)
  call   <R_edgeBlendTetDrv@plt>
  mov    0x4(%rbp),%esi
  mov    0x30(%rsp),%rcx
  xor    %eax,%eax
  mov    0x0(%rbp),%edi
  mov    $0x4,%edx
  call   <E_parDrv@plt>
  movslq 0x10(%rsp),%r10
  mov    0x80(%rsp),%rcx
  movsd  0x8(%rsp),%xmm3
  lea    0x1(%r10),%r9d
  lea    (%r10,%r10,2),%rax
  movslq %r9d,%rbp
  lea    (%rcx,%rax,8),%r13
L74:
  mov    %r12d,%edi
  mov    %rbx,%rsi
  xor    %eax,%eax
  movsd  %xmm3,0x10(%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,0x8(%rsp)
  call   <E_modeShapeDrv@plt>
  movsd  0x10(%rsp),%xmm3
  mov    0x70(%rsp),%rax
  mov    %ebp,%r10d
  movsd  0x118(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  0x150(%rsp),%xmm1
  movapd %xmm3,%xmm0
  movsd  0x158(%rsp),%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm5
  movsd  %xmm0,-0x8(%rax,%rbp,8)
  add    $0x1,%rbp
  movsd  0x110(%rsp),%xmm0
  mulsd  %xmm0,%xmm1
  addsd  %xmm5,%xmm1
  movsd  0xf0(%rsp),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm1
  movsd  %xmm1,-0x18(%r13)
  movsd  0x160(%rsp),%xmm1
  movsd  0x168(%rsp),%xmm5
  mulsd  %xmm0,%xmm1
  mulsd  %xmm4,%xmm5
  addsd  %xmm5,%xmm1
  movsd  0xf8(%rsp),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm1
  addsd  %xmm5,%xmm1
  movsd  %xmm1,-0x10(%r13)
  mulsd  0x170(%rsp),%xmm0
  mulsd  0x178(%rsp),%xmm4
  mulsd  0x100(%rsp),%xmm2
  addsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%r13)
  cmp    %r12d,0x5c(%rsp)
  jge    L74
  addq   $0x8,0x20(%rsp)
  mov    0x20(%rsp),%rax
  cmp    %r15,%rax
  jne    L17
  cmpl   $0x2,0x5c(%rsp)
  mov    %r10d,0x58(%rsp)
  je     L121
  lea    D96(%rip),%rax
  lea    0xd0(%rsp),%rbp
  mov    %rax,0x60(%rsp)
  lea    0xa8(%rsp),%rax
  lea    0xc0(%rsp),%r14
  mov    %rax,0x90(%rsp)
L27:
  mov    0x60(%rsp),%rbx
  mov    0x88(%rsp),%rdx
  mov    0x78(%rsp),%rsi
  movslq (%rbx),%rax
  mov    %rbx,%rdi
  movsd  0x130(%rsp,%rax,8),%xmm0
  movslq 0x4(%rbx),%rax
  movsd  0x130(%rsp,%rax,8),%xmm2
  movapd %xmm0,%xmm1
  movslq 0x8(%rbx),%rax
  mulsd  %xmm2,%xmm0
  unpcklpd %xmm2,%xmm1
  movaps %xmm1,0xd0(%rsp)
  movsd  0x130(%rsp,%rax,8),%xmm1
  xor    %eax,%eax
  movsd  %xmm1,0xe0(%rsp)
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm6
  movsd  %xmm0,0x8(%rsp)
  unpcklpd %xmm6,%xmm6
  movaps %xmm6,0x40(%rsp)
  call   <R_faceBlendTetDrv@plt>
  mov    0x8(%rbx),%edx
  mov    0x4(%rbx),%esi
  mov    $0x4,%ecx
  mov    (%rbx),%edi
  mov    0x90(%rsp),%r8
  xor    %eax,%eax
  mov    $0x3,%ebx
  call   <F_parDrv@plt>
  movq   $0x1,0x30(%rsp)
  nopl   0x0(%rax,%rax,1)
L49:
  movslq 0x58(%rsp),%rax
  mov    0x80(%rsp),%rcx
  xor    %r15d,%r15d
  lea    (%rax,%rax,2),%rdx
  lea    (%rcx,%rdx,8),%r12
  mov    0x70(%rsp),%rcx
  mov    %r12,%r13
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x50(%rsp)
  nopl   0x0(%rax)
L141:
  mov    %r15d,%esi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <F_modeShapeTri@plt>
  pxor   %xmm3,%xmm3
  mov    %r15d,%esi
  mov    %r14,%rcx
  cvtsi2sd %eax,%xmm3
  movsd  0x8(%rsp),%xmm0
  mov    %rbp,%rdx
  mov    %ebx,%edi
  mov    0x50(%rsp),%rax
  add    $0x18,%r13
  mulsd  %xmm3,%xmm0
  movapd %xmm3,%xmm4
  movsd  %xmm3,0x10(%rsp)
  unpcklpd %xmm4,%xmm4
  movaps %xmm4,0x20(%rsp)
  movsd  %xmm0,(%rax,%r15,8)
  xor    %eax,%eax
  add    $0x1,%r15
  call   <F_modeShapeTriDrv@plt>
  mov    0xa8(%rsp),%rax
  movapd 0xc0(%rsp),%xmm5
  movapd 0x20(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  movq   (%rax),%xmm1
  movq   0x8(%rax),%xmm2
  unpckhpd %xmm5,%xmm5
  mulpd  0xf0(%rsp),%xmm4
  movdqa %xmm1,%xmm7
  punpckldq %xmm2,%xmm1
  punpckldq %xmm2,%xmm7
  cvtdq2pd %xmm1,%xmm1
  movapd 0xc0(%rsp),%xmm2
  pshufd $0xe,%xmm7,%xmm7
  unpcklpd %xmm2,%xmm2
  cvtdq2pd %xmm7,%xmm0
  mulpd  %xmm2,%xmm1
  movsd  0xc0(%rsp),%xmm2
  mulpd  %xmm5,%xmm0
  pxor   %xmm5,%xmm5
  cvtsi2sdl 0x14(%rax),%xmm5
  addpd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x10(%rax),%xmm1
  movaps %xmm0,0x110(%rsp)
  mulpd  0x40(%rsp),%xmm0
  mulsd  %xmm2,%xmm1
  movsd  0xc8(%rsp),%xmm2
  mulsd  %xmm5,%xmm2
  addpd  %xmm4,%xmm0
  addsd  %xmm2,%xmm1
  movsd  %xmm1,0x120(%rsp)
  mulsd  0x8(%rsp),%xmm1
  movups %xmm0,-0x18(%r13)
  mulsd  0x100(%rsp),%xmm3
  addsd  %xmm3,%xmm1
  movsd  %xmm1,-0x8(%r13)
  cmp    0x30(%rsp),%r15
  jne    L141
  mov    0x58(%rsp),%eax
  lea    -0x2(%rax,%rbx,1),%eax
  lea    0x3(%r15),%ebx
  mov    %eax,0x58(%rsp)
  lea    0x1(%r15),%rax
  mov    %rax,0x30(%rsp)
  cmp    %ebx,0x5c(%rsp)
  jge    L49
  addq   $0xc,0x60(%rsp)
  mov    0x60(%rsp),%rax
  lea    D50(%rip),%rcx
  cmp    %rax,%rcx
  jne    L27
  cmpl   $0x3,0x5c(%rsp)
  jle    L121
  mov    0x78(%rsp),%rbp
  mov    0x98(%rsp),%r14
  mov    $0x4,%ebx
  nopl   (%rax)
L130:
  movapd 0x130(%rsp),%xmm2
  lea    -0x3(%rbx),%eax
  lea    -0x2(%rbx),%r15d
  movsd  0x140(%rsp),%xmm0
  movsd  0x148(%rsp),%xmm1
  imul   %eax,%r15d
  movslq 0x58(%rsp),%rax
  movapd %xmm2,%xmm7
  movapd %xmm2,%xmm3
  mov    0x80(%rsp),%rdi
  unpckhpd %xmm7,%xmm7
  lea    (%rax,%rax,2),%rdx
  mulsd  %xmm7,%xmm3
  movapd %xmm7,%xmm5
  lea    (%rdi,%rdx,8),%r13
  mov    %r15d,%ecx
  sar    %ecx
  xor    %r15d,%r15d
  mov    %ecx,0x88(%rsp)
  movslq %ecx,%rcx
  mov    %rcx,0x40(%rsp)
  mov    0x70(%rsp),%rcx
  movapd %xmm3,%xmm4
  lea    (%rcx,%rax,8),%rax
  mulsd  %xmm0,%xmm4
  mov    %rax,0x50(%rsp)
  mulsd  %xmm4,%xmm1
  movapd %xmm4,%xmm7
  unpcklpd %xmm7,%xmm7
  movsd  %xmm1,0x8(%rsp)
  unpcklpd %xmm1,%xmm1
  movaps %xmm1,0x30(%rsp)
  movsd  D75(%rip),%xmm1
  subsd  %xmm2,%xmm1
  shufpd $0x1,%xmm2,%xmm2
  subsd  %xmm5,%xmm1
  subsd  %xmm0,%xmm1
  movapd 0x140(%rsp),%xmm0
  unpcklpd %xmm0,%xmm0
  mulpd  %xmm2,%xmm0
  movapd %xmm1,%xmm2
  mulsd  %xmm3,%xmm1
  unpcklpd %xmm2,%xmm2
  mulpd  %xmm2,%xmm0
  subsd  %xmm4,%xmm1
  movsd  %xmm1,0x78(%rsp)
  subpd  %xmm7,%xmm0
  movaps %xmm0,0x60(%rsp)
  nopl   0x0(%rax)
L102:
  mov    %r15d,%esi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <R_modeShapeTet@plt>
  pxor   %xmm0,%xmm0
  mov    %r15d,%esi
  mov    %r14,%rcx
  cvtsi2sd %eax,%xmm0
  mov    0x50(%rsp),%rax
  mov    %rbp,%rdx
  mov    %ebx,%edi
  add    $0x18,%r13
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x20(%rsp)
  unpcklpd %xmm1,%xmm1
  mulpd  0x60(%rsp),%xmm1
  movaps %xmm1,0x10(%rsp)
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax,%r15,8)
  xor    %eax,%eax
  add    $0x1,%r15
  call   <R_modeShapeTetDrv@plt>
  movapd 0x30(%rsp),%xmm7
  mulpd  0x110(%rsp),%xmm7
  movapd 0x10(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm0
  mulsd  0x78(%rsp),%xmm0
  addpd  %xmm7,%xmm1
  movups %xmm1,-0x18(%r13)
  movsd  0x8(%rsp),%xmm1
  mulsd  0x120(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r13)
  cmp    0x40(%rsp),%r15
  jne    L102
  mov    0x88(%rsp),%ecx
  add    $0x1,%ebx
  add    %ecx,0x58(%rsp)
  cmp    %ebx,0x5c(%rsp)
  jge    L130
L121:
  mov    0x188(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  mov    0x58(%rsp),%eax
  add    $0x198,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D75
datatype: f64
name: disassemble_data
arguments: data_label: D98
datatype: f32[4]

tool: D75: 1

tool: {"D98": [0.0,-1.875,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;
}
```