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

```asm
<GaussLegendreTet>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movslq %edi,%rbx
  mov    %ebx,%edi
  sub    $0x88,%rsp
  mov    %esi,0x3c(%rsp)
  lea    0x40(%rsp),%rsi
  mov    %edx,0x14(%rsp)
  lea    0x58(%rsp),%rdx
  mov    %rcx,0x20(%rsp)
  mov    %r8,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <GaussLegendre1D@plt>
  lea    0x60(%rsp),%rdx
  lea    0x48(%rsp),%rsi
  mov    %r15d,%edi
  call   <GaussLegendre1D@plt>
  lea    0x68(%rsp),%rdx
  lea    0x50(%rsp),%rsi
  mov    %r14d,%edi
  call   <GaussLegendre1D@plt>
  test   %ebx,%ebx
  jle    L32
  lea    0x0(,%rbx,8),%rax
  movl   $0x0,0x38(%rsp)
  lea    0x70(%rsp),%rbp
  mov    %rax,0x30(%rsp)
  lea    -0x1(%r15),%eax
  xor    %r15d,%r15d
  lea    0x8(,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  lea    -0x1(%r14),%eax
  lea    0x8(,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax)
L67:
  mov    0x3c(%rsp),%eax
  xor    %r14d,%r14d
  test   %eax,%eax
  jle    L47
  nop
L10:
  mov    0x14(%rsp),%edx
  test   %edx,%edx
  jle    L78
  movslq 0x38(%rsp),%rax
  mov    0x20(%rsp),%rcx
  xor    %r13d,%r13d
  mov    %rax,%rdi
  shl    $0x5,%rdi
  lea    (%rcx,%rdi,1),%r12
  mov    0x28(%rsp),%rcx
  lea    (%rcx,%rax,8),%rbx
  mov    %r12,%rax
  mov    %rbx,%r12
  mov    %rax,%rbx
  cs nopw 0x0(%rax,%rax,1)
L31:
  mov    0x40(%rsp),%rax
  lea    0x10(%rbx),%rdx
  lea    0x8(%rbx),%rsi
  mov    %rbx,%rdi
  mov    %rbp,%rcx
  add    $0x20,%rbx
  movsd  (%rax,%r15,1),%xmm0
  mov    0x50(%rsp),%rax
  movsd  (%rax,%r13,1),%xmm2
  mov    0x48(%rsp),%rax
  movsd  (%rax,%r14,1),%xmm1
  call   <brickToTet@plt>
  movsd  D14(%rip),%xmm0
  subsd  -0x20(%rbx),%xmm0
  subsd  -0x18(%rbx),%xmm0
  subsd  -0x10(%rbx),%xmm0
  mov    0x58(%rsp),%rax
  movsd  %xmm0,-0x8(%rbx)
  movsd  (%rax,%r15,1),%xmm0
  mov    0x60(%rsp),%rax
  mulsd  0x70(%rsp),%xmm0
  mulsd  (%rax,%r14,1),%xmm0
  mov    0x68(%rsp),%rax
  mulsd  (%rax,%r13,1),%xmm0
  mulsd  D0(%rip),%xmm0
  movsd  %xmm0,(%r12,%r13,1)
  add    $0x8,%r13
  cmp    %r13,0x8(%rsp)
  jne    L31
  mov    0x14(%rsp),%ecx
  add    %ecx,0x38(%rsp)
L78:
  add    $0x8,%r14
  cmp    %r14,0x18(%rsp)
  jne    L10
L47:
  add    $0x8,%r15
  cmp    %r15,0x30(%rsp)
  jne    L67
L74:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  mov    0x38(%rsp),%eax
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  movl   $0x0,0x38(%rsp)
  jmp    L74
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D14
datatype: f64
name: read_data
arguments: tag: D0
datatype: f64

tool: D14: 1

tool: D0: 6

assistant: ```c
int GaussLegendreTet(int n1, int n2, int n3, double GLrstw[][4], double *GLwt) {
  int i, j, k, index = 0;
  double *pt1, *pt2, *pt3, *wt1, *wt2, *wt3, dJ;
  const double six = 6.000000000000000;
  GaussLegendre1D(n1, &pt1, &wt1);
  GaussLegendre1D(n2, &pt2, &wt2);
  GaussLegendre1D(n3, &pt3, &wt3);
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n2; j++) {
      for (k = 0; k < n3; k++) {
        brickToTet(pt1[i], pt2[j], pt3[k], &GLrstw[index][0], &GLrstw[index][1], &GLrstw[index][2], &dJ);
        GLrstw[index][3] = 1.0e0 - GLrstw[index][0] - GLrstw[index][1] - GLrstw[index][2];
        GLwt[index++] = dJ * wt1[i] * wt2[j] * wt3[k] * six;
      }
    }
  }
  return index;
}
```