user: What would the C source look like for the assembly code provided here?

```asm
<d2S3Ddiag>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3c8,%rsp
  mov    %rdi,0xd0(%rsp)
  mov    %rsi,0xb0(%rsp)
  mov    %rdx,%r14
  mov    %rcx,%r15
  mov    0x400(%rsp),%rcx
  mov    %fs:0x28,%rsi
  mov    %rsi,0x3b8(%rsp)
  xor    %esi,%esi
  cvttsd2si (%rcx),%ebx
  mov    %ebx,0xdc(%rsp)
  cvttsd2si 0x8(%rcx),%esi
  mov    %esi,0xc8(%rsp)
  cvttsd2si 0x10(%rcx),%r11d
  mov    %r11d,0xa4(%rsp)
  movsd  (%r9),%xmm0
  mulsd  0x8(%r9),%xmm0
  mulsd  0x10(%r9),%xmm0
  movapd %xmm0,%xmm7
  mulsd  0x8(%r8),%xmm7
  movsd  %xmm7,(%rsp)
  mulsd  0x10(%r8),%xmm0
  movsd  %xmm0,0x28(%rsp)
  lea    0x1(%rbx),%edi
  mov    %edi,0xcc(%rsp)
  lea    0x1(%rsi),%ecx
  imul   %edi,%ecx
  lea    0x1(%r11),%eax
  imul   %ecx,%eax
  test   %ebx,%ebx
  jle    L63
  movslq %edi,%rdx
  shl    $0x3,%rdx
  lea    0x8(%rdx),%rbx
  mov    %rbx,0xa8(%rsp)
  movslq %ecx,%rbx
  mov    %rbx,0xb8(%rsp)
  lea    0x0(,%rbx,8),%r13
  mov    %r13,%r12
  sub    %rdx,%r12
  cltq
  shl    $0x3,%rax
  mov    %rax,0x48(%rsp)
  movl   $0x0,0xd8(%rsp)
  mov    %r12,%rax
  mov    %r13,%r12
  mov    %rax,%r13
  jmp    L114
L132:
  lea    0x2e0(%rsp),%rax
  lea    0x2c0(%rsp),%rdi
  lea    0x2a0(%rsp),%rsi
  lea    0x1e0(%rsp),%rbx
  mov    %rbx,0x70(%rsp)
  lea    0x100(%rsp),%rbx
  mov    %rbx,0x50(%rsp)
  lea    0xe0(%rsp),%rbx
  mov    %rbx,0x58(%rsp)
  lea    0x380(%rsp),%rbx
  push   %rbx
  lea    0x3a8(%rsp),%rcx
  mov    %rcx,0x10(%rsp)
  push   %rcx
  lea    0x370(%rsp),%rdx
  mov    %rdx,0x20(%rsp)
  push   %rdx
  lea    0x358(%rsp),%rbp
  push   %rbp
  lea    0x320(%rsp),%r10
  mov    %r10,0x38(%rsp)
  push   %r10
  lea    0x348(%rsp),%r11
  mov    %r11,0x48(%rsp)
  push   %r11
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  movsd  D222(%rip),%xmm2
  mov    %rax,0x60(%rsp)
  mov    %rax,%r9
  mov    %rdi,0x68(%rsp)
  mov    %rdi,%r8
  movsd  (%r15),%xmm1
  movsd  (%r14),%xmm0
  mov    %rsi,0x70(%rsp)
  mov    %rsi,%rcx
  mov    0xa0(%rsp),%rdx
  mov    0x80(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x8(%r14),%xmm0
  lea    0x140(%rsp),%rax
  push   %rbp
  push   %rbx
  push   0x18(%rsp)
  push   0x28(%rsp)
  push   0x58(%rsp)
  push   0x40(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  movsd  D222(%rip),%xmm2
  mov    0x50(%rsp),%r9
  mov    0x60(%rsp),%r8
  movsd  0x8(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xa0(%rsp),%rdx
  mov    %rax,0x90(%rsp)
  mov    %rax,%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x10(%r14),%xmm0
  lea    0x120(%rsp),%r10
  push   0x10(%rsp)
  push   %rbp
  push   %rbx
  push   0x20(%rsp)
  push   0x50(%rsp)
  push   0x60(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  movsd  D222(%rip),%xmm2
  mov    0x48(%rsp),%r9
  mov    0x50(%rsp),%r8
  movsd  0x10(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xa0(%rsp),%rdx
  mov    %r10,0x98(%rsp)
  mov    %r10,%rsi
  mov    0x90(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x18(%r14),%xmm0
  push   0x8(%rsp)
  push   0x18(%rsp)
  push   %rbp
  push   %rbx
  push   0x40(%rsp)
  push   0x58(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  movsd  D222(%rip),%xmm2
  mov    0x68(%rsp),%r9
  mov    0x48(%rsp),%r8
  movsd  0x18(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xa0(%rsp),%rdx
  mov    0x88(%rsp),%rsi
  mov    0x98(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x20(%r14),%xmm0
  lea    0x200(%rsp),%rdx
  push   %rbp
  push   %rbx
  push   0x28(%rsp)
  push   0x50(%rsp)
  push   0x30(%rsp)
  push   0x30(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r9
  movq   %r9,%xmm2
  mov    0x50(%rsp),%r9
  mov    0x60(%rsp),%r8
  movsd  0x20(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    %rdx,0xb0(%rsp)
  mov    0x90(%rsp),%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x28(%r14),%xmm0
  lea    0x1c0(%rsp),%r11
  push   0x38(%rsp)
  push   %rbp
  push   %rbx
  push   0x30(%rsp)
  push   0x50(%rsp)
  push   0x38(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x38(%rsp),%r9
  mov    0x50(%rsp),%r8
  movsd  0x28(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    %r11,0xa0(%rsp)
  mov    %r11,%rsi
  mov    0x90(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x30(%r14),%xmm0
  lea    0x180(%rsp),%rax
  push   0x18(%rsp)
  push   0x40(%rsp)
  push   %rbp
  push   %rbx
  push   0x40(%rsp)
  push   0x58(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x40(%rsp),%r9
  mov    0x38(%rsp),%r8
  movsd  0x30(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    %rax,0xa8(%rsp)
  mov    %rax,%rsi
  mov    0xa0(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x38(%r14),%xmm0
  push   %rbx
  push   0x20(%rsp)
  push   0x48(%rsp)
  push   %rbp
  push   0x28(%rsp)
  push   0x48(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x60(%rsp),%r9
  mov    0x40(%rsp),%r8
  movsd  0x38(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x80(%rsp),%rsi
  mov    0xa8(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x40(%r14),%xmm0
  lea    0x220(%rsp),%rdx
  push   %rbx
  push   0x10(%rsp)
  push   0x30(%rsp)
  push   0x30(%rsp)
  push   %rbp
  push   0x38(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x60(%rsp),%r9
  mov    0x68(%rsp),%r8
  movsd  0x40(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    %rdx,0xb0(%rsp)
  mov    0x80(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x48(%r14),%xmm0
  push   0x18(%rsp)
  push   %rbx
  push   0x18(%rsp)
  push   0x38(%rsp)
  push   0x58(%rsp)
  push   %rbp
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x40(%rsp),%r9
  mov    0x60(%rsp),%r8
  movsd  0x48(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0xa8(%rsp),%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x50(%r14),%xmm0
  lea    0x160(%rsp),%rax
  push   0x20(%rsp)
  push   0x20(%rsp)
  push   %rbx
  push   0x20(%rsp)
  push   0x50(%rsp)
  push   0x60(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    %rbp,%r9
  mov    0x40(%rsp),%r8
  movsd  0x50(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    %rax,0x80(%rsp)
  mov    %rax,%rsi
  mov    0xa8(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x58(%r14),%xmm0
  push   0x8(%rsp)
  push   0x28(%rsp)
  push   0x28(%rsp)
  push   %rbx
  push   0x30(%rsp)
  push   0x58(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r9
  movq   %r9,%xmm2
  mov    0x68(%rsp),%r9
  mov    %rbp,%r8
  movsd  0x58(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x88(%rsp),%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x60(%r14),%xmm0
  lea    0x240(%rsp),%rdx
  push   0x8(%rsp)
  push   0x18(%rsp)
  push   0x40(%rsp)
  push   0x38(%rsp)
  push   %rbx
  push   %rbp
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x68(%rsp),%r9
  mov    0x48(%rsp),%r8
  movsd  0x60(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    %rdx,0xb0(%rsp)
  mov    0x88(%rsp),%rsi
  mov    0x98(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x68(%r14),%xmm0
  push   0x20(%rsp)
  push   0x10(%rsp)
  push   0x20(%rsp)
  push   0x48(%rsp)
  push   0x38(%rsp)
  push   %rbx
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    %rbp,%r9
  mov    0x68(%rsp),%r8
  movsd  0x68(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x80(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x70(%r14),%xmm0
  lea    0x1a0(%rsp),%r10
  push   0x30(%rsp)
  push   0x28(%rsp)
  push   0x18(%rsp)
  push   0x28(%rsp)
  push   0x58(%rsp)
  push   0x40(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r9
  movq   %r9,%xmm2
  mov    %rbx,%r9
  mov    %rbp,%r8
  movsd  0x70(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    %r10,0x88(%rsp)
  mov    %r10,%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x78(%r14),%xmm0
  push   0x10(%rsp)
  push   0x38(%rsp)
  push   0x30(%rsp)
  push   0x20(%rsp)
  push   %rbp
  push   0x60(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r9
  movq   %r9,%xmm2
  mov    0x48(%rsp),%r9
  mov    %rbx,%r8
  movsd  0x78(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x98(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x80(%r14),%xmm0
  lea    0x260(%rsp),%rdx
  push   0x10(%rsp)
  push   %rbp
  push   0x48(%rsp)
  push   0x48(%rsp)
  push   0x28(%rsp)
  push   %rbx
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x48(%rsp),%r9
  mov    0x50(%rsp),%r8
  movsd  0x80(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    %rdx,0xb0(%rsp)
  mov    0x98(%rsp),%rsi
  mov    0x90(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x88(%r14),%xmm0
  push   0x30(%rsp)
  push   0x18(%rsp)
  push   %rbp
  push   0x50(%rsp)
  push   0x40(%rsp)
  push   0x30(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    %rbx,%r9
  mov    0x48(%rsp),%r8
  movsd  0x88(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x88(%rsp),%rsi
  mov    0x98(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x90(%r14),%xmm0
  push   0x38(%rsp)
  push   0x38(%rsp)
  push   0x20(%rsp)
  push   %rbp
  push   0x38(%rsp)
  push   0x48(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r9
  movq   %r9,%xmm2
  mov    0x38(%rsp),%r9
  mov    %rbx,%r8
  movsd  0x90(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0xa0(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0x98(%r14),%xmm0
  push   %rbp
  push   0x40(%rsp)
  push   0x40(%rsp)
  push   0x28(%rsp)
  push   %rbx
  push   0x40(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%r8
  movq   %r8,%xmm2
  mov    0x50(%rsp),%r9
  mov    0x38(%rsp),%r8
  movsd  0x98(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0xb0(%rsp),%rdx
  mov    0x90(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0xa0(%r14),%xmm0
  lea    0x280(%rsp),%rsi
  push   0x18(%rsp)
  push   0x28(%rsp)
  push   0x40(%rsp)
  push   0x50(%rsp)
  push   %rbx
  push   0x30(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%rdx
  movq   %rdx,%xmm2
  mov    0x40(%rsp),%r9
  mov    %rbp,%r8
  movsd  0xa0(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    %rsi,0x90(%rsp)
  mov    %rsi,%rdx
  mov    0xa8(%rsp),%rsi
  mov    0x80(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0xa8(%r14),%xmm0
  push   0x38(%rsp)
  push   0x20(%rsp)
  push   0x30(%rsp)
  push   0x48(%rsp)
  push   %rbp
  push   %rbx
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%rax
  movq   %rax,%xmm2
  mov    0x38(%rsp),%r9
  mov    0x40(%rsp),%r8
  movsd  0xa8(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0x90(%rsp),%rdx
  mov    0xa0(%rsp),%rsi
  mov    0xa8(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0xb0(%r14),%xmm0
  push   0x30(%rsp)
  push   0x40(%rsp)
  push   0x28(%rsp)
  push   0x38(%rsp)
  push   0x30(%rsp)
  push   %rbp
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%rax
  movq   %rax,%xmm2
  mov    %rbx,%r9
  mov    0x38(%rsp),%r8
  movsd  0xb0(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0x90(%rsp),%rdx
  mov    0x88(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
  movsd  0xb8(%r14),%xmm0
  push   0x20(%rsp)
  push   0x38(%rsp)
  push   0x48(%rsp)
  push   0x30(%rsp)
  push   0x28(%rsp)
  push   0x38(%rsp)
  movsd  0x58(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mov    D250(%rip),%rax
  movq   %rax,%xmm2
  mov    %rbp,%r9
  mov    %rbx,%r8
  movsd  0xb8(%r15),%xmm1
  mov    0x70(%rsp),%rcx
  mov    0x90(%rsp),%rdx
  mov    0x80(%rsp),%rsi
  mov    0x88(%rsp),%rdi
  call   <d2SdiagTetra@plt>
  add    $0x30,%rsp
L116:
  mov    0xa8(%rsp),%rax
  mov    0x88(%rsp),%rcx
  add    %rcx,%rax
  mov    $0x0,%edx
  lea    0x2c0(%rsp),%rbp
  lea    0x2e0(%rsp),%rbx
  lea    0x320(%rsp),%r11
  lea    0x300(%rsp),%r10
  lea    0x380(%rsp),%r9
  lea    0x3a0(%rsp),%r8
  lea    0x360(%rsp),%rdi
  lea    0x340(%rsp),%rsi
L101:
  movsd  (%rcx),%xmm0
  addsd  (%rdx,%rbp,1),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  0x8(%rcx),%xmm0
  addsd  (%rdx,%rbx,1),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  (%rax),%xmm0
  addsd  (%rdx,%r11,1),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x8(%rax),%xmm0
  addsd  (%rdx,%r10,1),%xmm0
  movsd  %xmm0,-0x8(%rax)
  movsd  -0x8(%rax,%r12,1),%xmm0
  addsd  (%rdx,%r9,1),%xmm0
  movsd  %xmm0,-0x8(%rax,%r12,1)
  movsd  (%rax,%r12,1),%xmm0
  addsd  (%rdx,%r8,1),%xmm0
  movsd  %xmm0,(%rax,%r12,1)
  movsd  (%rax,%r13,1),%xmm0
  addsd  (%rdx,%rdi,1),%xmm0
  movsd  %xmm0,(%rax,%r13,1)
  movsd  -0x8(%rax,%r13,1),%xmm0
  addsd  (%rdx,%rsi,1),%xmm0
  movsd  %xmm0,-0x8(%rax,%r13,1)
  add    0x48(%rsp),%rcx
  add    0x48(%rsp),%rax
  add    $0x8,%rdx
  cmp    $0x18,%rdx
  jne    L101
  addl   $0x1,0xa0(%rsp)
  mov    0xa0(%rsp),%eax
  add    %r12,0x88(%rsp)
  mov    0xb8(%rsp),%rdi
  add    %rdi,0x90(%rsp)
  cmp    %eax,0xa4(%rsp)
  je     L79
L43:
  mov    0xb0(%rsp),%rax
  mov    0x90(%rsp),%rbx
  lea    (%rax,%rbx,8),%rdi
  mov    0x98(%rsp),%rax
  mov    %rax,%rdx
  add    %r12,%rax
  mov    %rax,0x98(%rsp)
  lea    0x0(%r13,%rdx,1),%rsi
  mov    %rax,%rcx
  mov    $0x0,%eax
  mov    0x48(%rsp),%r8
L147:
  movsd  (%rdi),%xmm2
  movsd  %xmm2,0xe0(%rsp,%rax,1)
  movsd  0x8(%rdi),%xmm3
  movsd  %xmm3,0x100(%rsp,%rax,1)
  movsd  (%rdx),%xmm1
  movsd  %xmm1,0x140(%rsp,%rax,1)
  movsd  -0x8(%rdx),%xmm8
  movsd  %xmm8,0x120(%rsp,%rax,1)
  movsd  -0x8(%rcx),%xmm5
  movsd  %xmm5,0x1a0(%rsp,%rax,1)
  movsd  (%rcx),%xmm6
  movsd  %xmm6,0x1c0(%rsp,%rax,1)
  movsd  (%rsi),%xmm0
  movsd  %xmm0,0x180(%rsp,%rax,1)
  movsd  -0x8(%rsi),%xmm7
  movsd  %xmm7,0x160(%rsp,%rax,1)
  movapd %xmm2,%xmm9
  addsd  %xmm3,%xmm9
  movapd %xmm1,%xmm4
  addsd  %xmm9,%xmm4
  addsd  %xmm8,%xmm4
  mulsd  D177(%rip),%xmm4
  movsd  %xmm4,0x1e0(%rsp,%rax,1)
  addsd  %xmm1,%xmm3
  addsd  %xmm6,%xmm3
  addsd  %xmm0,%xmm3
  mulsd  D177(%rip),%xmm3
  movsd  %xmm3,0x200(%rsp,%rax,1)
  addsd  %xmm0,%xmm9
  addsd  %xmm7,%xmm9
  mulsd  D177(%rip),%xmm9
  movsd  %xmm9,0x220(%rsp,%rax,1)
  addsd  %xmm8,%xmm2
  addsd  %xmm7,%xmm2
  addsd  %xmm5,%xmm2
  mulsd  D177(%rip),%xmm2
  movsd  %xmm2,0x240(%rsp,%rax,1)
  addsd  %xmm8,%xmm1
  addsd  %xmm5,%xmm1
  addsd  %xmm6,%xmm1
  mulsd  D177(%rip),%xmm1
  movsd  %xmm1,0x260(%rsp,%rax,1)
  addsd  %xmm7,%xmm0
  addsd  %xmm6,%xmm0
  addsd  %xmm5,%xmm0
  mulsd  D177(%rip),%xmm0
  movsd  %xmm0,0x280(%rsp,%rax,1)
  addsd  %xmm0,%xmm4
  mulsd  D203(%rip),%xmm4
  movsd  %xmm4,0x2a0(%rsp,%rax,1)
  movq   $0x0,0x2c0(%rsp,%rax,1)
  movq   $0x0,0x2e0(%rsp,%rax,1)
  movq   $0x0,0x300(%rsp,%rax,1)
  movq   $0x0,0x320(%rsp,%rax,1)
  movq   $0x0,0x340(%rsp,%rax,1)
  movq   $0x0,0x360(%rsp,%rax,1)
  movq   $0x0,0x380(%rsp,%rax,1)
  movq   $0x0,0x3a0(%rsp,%rax,1)
  add    %r8,%rdi
  add    %r8,%rdx
  add    %r8,%rcx
  add    %r8,%rsi
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L147
  movsd  (%rsp),%xmm5
  pxor   %xmm6,%xmm6
  comisd %xmm6,%xmm5
  ja     L132
  movsd  0x28(%rsp),%xmm7
  comisd %xmm6,%xmm7
  ja     L132
  jmp    L116
L79:
  addl   $0x1,0xc0(%rsp)
  mov    0xc0(%rsp),%eax
  mov    0xcc(%rsp),%edi
  add    %edi,0xc4(%rsp)
  cmp    %eax,0xc8(%rsp)
  je     L96
L69:
  cmpl   $0x0,0xa4(%rsp)
  jle    L79
  movslq 0xc4(%rsp),%rax
  mov    %rax,0x90(%rsp)
  shl    $0x3,%rax
  mov    0xd0(%rsp),%rbx
  add    %rax,%rbx
  mov    %rbx,0x88(%rsp)
  add    0xa8(%rsp),%rax
  add    0xb0(%rsp),%rax
  mov    %rax,0x98(%rsp)
  movl   $0x0,0xa0(%rsp)
  jmp    L43
L96:
  addl   $0x1,0xd8(%rsp)
  mov    0xd8(%rsp),%eax
  cmp    %eax,0xdc(%rsp)
  je     L63
L114:
  cmpl   $0x0,0xc8(%rsp)
  jle    L96
  mov    0xd8(%rsp),%eax
  mov    %eax,0xc4(%rsp)
  movl   $0x0,0xc0(%rsp)
  jmp    L69
L63:
  mov    0x3b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L140
  add    $0x3c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L140:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D222
type_infered: f32[2]
name: unpack_data
arguments: label: D250
type_infered: f64
name: unpack_data
arguments: label: D177
type_infered: f64
name: unpack_data
arguments: label: D203
type_infered: f64

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

tool: D250: 1

tool: D177: 0.25

tool: D203: 0.5

assistant: ```c
void d2S3Ddiag(double *prod, const double *yc, const double *ARef, const double *VRef, const double *alpha, const double *h, const double *m, int n) {
  const int m1 = m[0], m2 = m[1], m3 = m[2];
  double yA[3], yB[3], yC[3], yD[3], yE[3], yF[3], yG[3], yH[3], yABDC[3], yBDHF[3], yABFE[3], yCAEG[3], yDCGH[3], yEFHG[3], yM[3];
  double rA[3], rB[3], rC[3], rD[3], rE[3], rF[3], rG[3], rH[3];
  int id, i1, i2, i3, r, comp, idn;
  const double hd = h[0] * h[1] * h[2];
  const double alphaLength = alpha[0] * hd;
  const double alphaArea = alpha[1] * hd;
  const double alphaVolume = alpha[2] * hd;
  const int nn = (m1 + 1) * (m2 + 1) * (m3 + 1);
  const int inc_x = 1;
  const int inc_y = m1 + 1;
  const int inc_z = (m1 + 1) * (m2 + 1);
  const double *rptr;
  double *wptr;
#pragma omp parallel for default(shared) private(rptr, wptr, id, i1, i2, i3, r, comp, idn, yA, yB, yC, yD, yE, yF, yG, yH, yABDC, yBDHF, yABFE, yCAEG, yDCGH, yEFHG, yM, rA, rB, rC, rD, rE, rF, rG, rH)
  for (i1 = 0; i1 < m1; i1++) {
    for (i2 = 0; i2 < m2; i2++) {
      for (i3 = 0; i3 < m3; i3++) {
        idn = i1 + i2 * inc_y + i3 * inc_z;
        comp = 0;
        for (r = 0; r < 3; r++) {
          rptr = yc + idn + comp;
          yA[r] = *rptr;
          rptr += inc_x;
          yB[r] = *rptr;
          rptr += inc_y;
          yD[r] = *rptr;
          rptr -= inc_x;
          yC[r] = *rptr;
          rptr += inc_z;
          yG[r] = *rptr;
          rptr += inc_x;
          yH[r] = *rptr;
          rptr -= inc_y;
          yF[r] = *rptr;
          rptr -= inc_x;
          yE[r] = *rptr;
          yABDC[r] = 0.25 * (yA[r] + yB[r] + yD[r] + yC[r]);
          yBDHF[r] = 0.25 * (yB[r] + yD[r] + yH[r] + yF[r]);
          yABFE[r] = 0.25 * (yA[r] + yB[r] + yF[r] + yE[r]);
          yCAEG[r] = 0.25 * (yC[r] + yA[r] + yE[r] + yG[r]);
          yDCGH[r] = 0.25 * (yD[r] + yC[r] + yG[r] + yH[r]);
          yEFHG[r] = 0.25 * (yE[r] + yF[r] + yH[r] + yG[r]);
          yM[r] = 0.5 * (yABDC[r] + yEFHG[r]);
          comp += nn;
          rA[r] = 0.0;
          rB[r] = 0.0;
          rC[r] = 0.0;
          rD[r] = 0.0;
          rE[r] = 0.0;
          rF[r] = 0.0;
          rG[r] = 0.0;
          rH[r] = 0.0;
        }
        if ((alphaArea > 0) || (alphaVolume > 0)) {
          d2SdiagTetra(yA, yB, yABDC, yM, ARef[0], VRef[0], rA, rB, rD, rC, rE, rF, rH, rG, -1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yB, yD, yABDC, yM, ARef[1], VRef[1], rB, rD, rC, rA, rF, rH, rG, rE, -1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yD, yC, yABDC, yM, ARef[2], VRef[2], rD, rC, rA, rB, rH, rG, rE, rF, -1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yC, yA, yABDC, yM, ARef[3], VRef[3], rC, rA, rB, rD, rG, rE, rF, rH, -1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yB, yD, yBDHF, yM, ARef[4], VRef[4], rB, rD, rH, rF, rA, rC, rG, rE, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yD, yH, yBDHF, yM, ARef[5], VRef[5], rD, rH, rF, rB, rC, rG, rE, rA, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yH, yF, yBDHF, yM, ARef[6], VRef[6], rH, rF, rB, rD, rG, rE, rA, rC, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yF, yB, yBDHF, yM, ARef[7], VRef[7], rF, rB, rD, rH, rE, rA, rC, rG, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yA, yB, yABFE, yM, ARef[8], VRef[8], rA, rB, rF, rE, rC, rD, rH, rG, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yB, yF, yABFE, yM, ARef[9], VRef[9], rB, rF, rE, rA, rD, rH, rG, rC, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yF, yE, yABFE, yM, ARef[10], VRef[10], rF, rE, rA, rB, rH, rG, rC, rD, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yE, yA, yABFE, yM, ARef[11], VRef[11], rE, rA, rB, rF, rG, rC, rD, rH, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yC, yA, yCAEG, yM, ARef[12], VRef[12], rC, rA, rE, rG, rD, rB, rF, rH, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yA, yE, yCAEG, yM, ARef[13], VRef[13], rA, rE, rG, rC, rB, rF, rH, rD, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yE, yG, yCAEG, yM, ARef[14], VRef[14], rE, rG, rC, rA, rF, rH, rD, rB, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yG, yC, yCAEG, yM, ARef[15], VRef[15], rG, rC, rA, rE, rH, rD, rB, rF, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yD, yC, yDCGH, yM, ARef[16], VRef[16], rD, rC, rG, rH, rB, rA, rE, rF, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yC, yG, yDCGH, yM, ARef[17], VRef[17], rC, rG, rH, rD, rA, rE, rF, rB, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yG, yH, yDCGH, yM, ARef[18], VRef[18], rG, rH, rD, rC, rE, rF, rB, rA, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yH, yD, yDCGH, yM, ARef[19], VRef[19], rH, rD, rC, rG, rF, rB, rA, rE, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yE, yF, yEFHG, yM, ARef[20], VRef[20], rE, rF, rH, rG, rA, rB, rD, rC, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yF, yH, yEFHG, yM, ARef[21], VRef[21], rF, rH, rG, rE, rB, rD, rC, rA, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yH, yG, yEFHG, yM, ARef[22], VRef[22], rH, rG, rE, rF, rD, rC, rA, rB, 1.0, alphaArea, alphaVolume);
          d2SdiagTetra(yG, yE, yEFHG, yM, ARef[23], VRef[23], rG, rE, rF, rH, rC, rA, rB, rD, 1.0, alphaArea, alphaVolume);
        }
        comp = 0;
        for (r = 0; r < 3; r++) {
          wptr = prod + idn + comp;
#pragma omp atomic
          *wptr += rA[r];
          wptr += inc_x;
#pragma omp atomic
          *wptr += rB[r];
          wptr += inc_y;
#pragma omp atomic
          *wptr += rD[r];
          wptr -= inc_x;
#pragma omp atomic
          *wptr += rC[r];
          wptr += inc_z;
#pragma omp atomic
          *wptr += rG[r];
          wptr += inc_x;
#pragma omp atomic
          *wptr += rH[r];
          wptr -= inc_y;
#pragma omp atomic
          *wptr += rF[r];
          wptr -= inc_x;
#pragma omp atomic
          *wptr += rE[r];
          comp += nn;
        }
      }
    }
  }
}
```