user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ch_evals3>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  mov    %rcx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x40(%rsp)
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x8(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
L168:
  mov    %rbp,%rbx
L249:
  movsd  (%r14,%rbx,8),%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  comisd 0x8(%rsp),%xmm0
  ja     L18
L21:
  add    $0x1,%rbx
  cmp    $0x3,%ebx
  jne    L249
  add    $0x1,%rbp
  add    $0x18,%r14
  cmp    $0x3,%rbp
  jne    L168
  movsd  0x8(%rsp),%xmm5
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm5
  jp     L217
  lea    0x40(%rsp),%rdi
  jne    L217
L138:
  movsd  0x40(%rsp),%xmm2
  xor    %eax,%eax
  movsd  0x60(%rsp),%xmm0
  mov    $0x3,%esi
  movsd  0x80(%rsp),%xmm4
  movsd  0x48(%rsp),%xmm5
  mulsd  0x58(%rsp),%xmm5
  movapd %xmm2,%xmm3
  movapd %xmm2,%xmm1
  mulsd  %xmm0,%xmm3
  addsd  %xmm0,%xmm1
  mulsd  %xmm4,%xmm2
  mulsd  %xmm4,%xmm0
  addsd  %xmm4,%xmm1
  subsd  %xmm5,%xmm3
  movsd  0x50(%rsp),%xmm5
  mulsd  0x70(%rsp),%xmm5
  movsd  %xmm1,0x20(%rsp)
  subsd  %xmm5,%xmm2
  addsd  %xmm3,%xmm2
  movsd  0x68(%rsp),%xmm3
  mulsd  0x78(%rsp),%xmm3
  subsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  movsd  %xmm2,0x10(%rsp)
  call   <determinant@plt>
  pxor   %xmm5,%xmm5
  movsd  0x20(%rsp),%xmm1
  ucomisd %xmm5,%xmm0
  jp     L186
  jne    L186
  movapd %xmm1,%xmm0
  movsd  0x10(%rsp),%xmm2
  comisd %xmm5,%xmm1
  mov    $0x1,%eax
  mulsd  %xmm1,%xmm0
  mov    $0xffffffff,%ebx
  mulsd  D126(%rip),%xmm2
  cmovbe %eax,%ebx
  subsd  %xmm2,%xmm0
  call   <sqrt@plt>
  pxor   %xmm2,%xmm2
  movsd  0x20(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  imul   %ebx,%eax
  cvtsi2sd %eax,%xmm2
  subsd  %xmm1,%xmm2
  mulsd  D182(%rip),%xmm2
  pxor   %xmm1,%xmm1
  divsd  %xmm2,%xmm0
L163:
  movsd  0x8(%rsp),%xmm4
  mov    $0x1,%edx
  mulsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm2
  mulsd  %xmm4,%xmm0
  movapd %xmm1,%xmm3
  minsd  %xmm2,%xmm3
  minsd  %xmm0,%xmm3
  movsd  %xmm3,0x0(%r13)
  movapd %xmm1,%xmm3
  maxsd  %xmm2,%xmm3
  maxsd  %xmm0,%xmm3
  movsd  %xmm3,(%r15)
  movsd  0x0(%r13),%xmm4
  ucomisd %xmm1,%xmm4
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L102
  ucomisd %xmm1,%xmm3
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L270
L102:
  ucomisd %xmm2,%xmm3
  mov    $0x1,%edx
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L201
  ucomisd %xmm2,%xmm4
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L87
L201:
  mov    0x18(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L203
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L18:
  movsd  (%r14,%rbx,8),%xmm0
  call   <fabs@plt>
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L21
  xchg   %ax,%ax
L186:
  movsd  0x10(%rsp),%xmm7
  movsd  D108(%rip),%xmm3
  movapd %xmm1,%xmm4
  mulsd  %xmm1,%xmm1
  xorpd  D153(%rip),%xmm4
  mulsd  %xmm7,%xmm3
  mulsd  D98(%rip),%xmm0
  subsd  %xmm3,%xmm1
  movapd %xmm4,%xmm3
  addsd  %xmm4,%xmm3
  movapd %xmm1,%xmm2
  movsd  D47(%rip),%xmm1
  mulsd  %xmm4,%xmm3
  divsd  %xmm1,%xmm2
  mulsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm3
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm3
  subsd  %xmm0,%xmm3
  divsd  D43(%rip),%xmm3
  movapd %xmm3,%xmm5
  mulsd  %xmm3,%xmm5
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  comisd %xmm1,%xmm5
  ja     L273
  comisd %xmm5,%xmm1
  jb     L228
L17:
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm3
  jp     L196
  mov    D146(%rip),%rbx
  jne    L196
L82:
  movapd %xmm2,%xmm0
  movsd  %xmm4,0x20(%rsp)
  call   <sqrt@plt>
  pxor   %xmm5,%xmm5
  movq   %rbx,%xmm0
  divsd  D108(%rip),%xmm0
  neg    %eax
  add    %eax,%eax
  cvtsi2sd %eax,%xmm5
  movsd  %xmm5,0x10(%rsp)
  call   <cos@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm4
  mulsd  %xmm0,%xmm1
  movapd %xmm4,%xmm6
  divsd  D108(%rip),%xmm6
  movq   %rbx,%xmm0
  movsd  %xmm6,0x20(%rsp)
  addsd  D78(%rip),%xmm0
  divsd  D108(%rip),%xmm0
  subsd  %xmm6,%xmm1
  movsd  %xmm1,0x30(%rsp)
  call   <cos@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  movq   %rbx,%xmm0
  addsd  D53(%rip),%xmm0
  divsd  D108(%rip),%xmm0
  subsd  0x20(%rsp),%xmm2
  movsd  %xmm2,0x28(%rsp)
  call   <cos@plt>
  mulsd  0x10(%rsp),%xmm0
  movsd  0x28(%rsp),%xmm2
  subsd  0x20(%rsp),%xmm0
  movsd  0x30(%rsp),%xmm1
  jmp    L163
  nop
L217:
  lea    0x40(%rsp),%rdi
  lea    0x88(%rsp),%rdx
  mov    %rdi,%rax
L206:
  movsd  0x8(%rsp),%xmm6
  movsd  (%r12),%xmm0
  add    $0x18,%rax
  add    $0x18,%r12
  divsd  %xmm6,%xmm0
  movsd  %xmm0,-0x18(%rax)
  movsd  -0x10(%r12),%xmm0
  divsd  %xmm6,%xmm0
  movsd  %xmm0,-0x10(%rax)
  movsd  -0x8(%r12),%xmm0
  divsd  %xmm6,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rdx
  jne    L206
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L270:
  movapd %xmm1,%xmm0
  jmp    L201
  nopl   0x0(%rax)
L87:
  movapd %xmm2,%xmm0
  jmp    L201
  nopl   0x0(%rax)
L273:
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x38(%rsp)
  subsd  %xmm5,%xmm0
  movsd  %xmm2,0x30(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movsd  %xmm1,0x20(%rsp)
  call   <fabs@plt>
  movsd  0x20(%rsp),%xmm1
  mov    %eax,%ebp
  movapd %xmm1,%xmm0
  call   <fabs@plt>
  movsd  0x10(%rsp),%xmm5
  mov    %eax,%ebx
  movapd %xmm5,%xmm0
  call   <fabs@plt>
  pxor   %xmm6,%xmm6
  pxor   %xmm0,%xmm0
  movsd  0x10(%rsp),%xmm5
  add    %eax,%ebx
  cvtsi2sd %ebp,%xmm0
  movsd  0x20(%rsp),%xmm1
  movsd  0x38(%rsp),%xmm3
  cvtsi2sd %ebx,%xmm6
  movsd  0x30(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm4
  mulsd  D104(%rip),%xmm6
  cmpnltsd %xmm6,%xmm0
  andpd  %xmm0,%xmm1
  andnpd %xmm5,%xmm0
  orpd   %xmm0,%xmm1
  comisd %xmm5,%xmm1
  jae    L17
L228:
  subsd  %xmm1,%xmm5
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movapd %xmm5,%xmm0
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm3
  mov    %eax,%ebx
  movapd %xmm3,%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  movsd  D169(%rip),%xmm1
  add    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  call   <pow@plt>
  movsd  0x10(%rsp),%xmm3
  pxor   %xmm7,%xmm7
  movsd  D116(%rip),%xmm1
  movsd  0x20(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm2
  comisd %xmm3,%xmm7
  ja     L99
  movsd  D6(%rip),%xmm1
L99:
  divsd  %xmm0,%xmm2
  divsd  D108(%rip),%xmm4
  addsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm1
  subsd  %xmm4,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm2
  jmp    L163
L196:
  movapd %xmm1,%xmm0
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  %xmm3,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm3
  mov    %eax,%ebx
  movapd %xmm3,%xmm0
  call   <fabs@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm4
  cmp    %eax,%ebx
  movsd  0x28(%rsp),%xmm2
  jl     L89
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
L181:
  divsd  %xmm0,%xmm3
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movapd %xmm3,%xmm0
  call   <acos@plt>
  movsd  0x20(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm4
  movq   %xmm0,%rbx
  jmp    L82
L89:
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  %xmm3,0x10(%rsp)
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  movsd  0x28(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm4
  cvtsi2sd %eax,%xmm0
  movsd  0x10(%rsp),%xmm3
  jmp    L181
L203:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D126
datatype: f32[2]
name: unpack_data
arguments: data_tag: D182
datatype: f32[2]
name: unpack_data
arguments: data_tag: D108
datatype: f64
name: unpack_data
arguments: data_tag: D153
datatype: f32[4]
name: unpack_data
arguments: data_tag: D98
datatype: f32[2]
name: unpack_data
arguments: data_tag: D47
datatype: f32[2]
name: unpack_data
arguments: data_tag: D43
datatype: f32[2]
name: unpack_data
arguments: data_tag: D146
datatype: f64
name: unpack_data
arguments: data_tag: D78
datatype: f64
name: unpack_data
arguments: data_tag: D53
datatype: byte[8]
name: unpack_data
arguments: data_tag: D104
datatype: byte[8]
name: unpack_data
arguments: data_tag: D169
datatype: byte[8]
name: unpack_data
arguments: data_tag: D116
datatype: f64
name: unpack_data
arguments: data_tag: D6
datatype: f32[2]

tool: {"D126": [0.0,2.25]}

tool: {"D182": [0.0,-1.75]}

tool: D108: 3

tool: {"D153": [0.0,-0.0,0.0,0.0]}

tool: {"D98": [0.0,2.921875]}

tool: {"D47": [0.0,2.53125]}

tool: {"D43": [0.0,3.171875]}

tool: D146: 1.570796326794896

tool: D78: 6.283185307179586

tool: {"D53": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x29,0x40]}

tool: {"D104": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: {"D169": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: D116: 1

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

assistant: ```c
void ch_evals3(double H[3][3], double *eval1, double *eval2, double *eval3) {
  double mat[3][3] = {{0.0}};
  double a1, a2, a3;
  double q, r;
  double q3, r2;
  double theta;
  double root1, root2, root3;
  double tol = 1.0e-6;
  double xmax;
  int i, j;
  double determinant();
  xmax = 0.0;
  for (i = 0; i < 3; i++) {
    for (j = i; j < 3; j++) {
      if (fabs(H[i][j]) > xmax) {
        xmax = fabs(H[i][j]);
      }
    }
  }
  if (xmax != 0) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        mat[i][j] = H[i][j] / xmax;
      }
    }
  }
  a1 = -(mat[0][0] + mat[1][1] + mat[2][2]);
  a2 = (mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0]) + (mat[0][0] * mat[2][2] - mat[0][2] * mat[2][0]) + (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]);
  a3 = -determinant(mat, 3);
  if (a3 == 0) {
    root1 = 0;
    q = -.5 * (a1 + ((a1) < 0 ? -1 : 1) * sqrt(a1 * a1 - 4 * a2));
    root2 = q;
    root3 = a2 / q;
  } else {
    q = (a1 * a1 - 3 * a2) / 9;
    r = (2 * a1 * a1 * a1 - 9 * a1 * a2 + 27 * a3) / 54;
    q3 = q * q * q;
    r2 = r * r;
    if ((q3 < r2) && fabs(q3 - r2) < tol * (fabs(q3) + fabs(r2))) {
      q3 = r2;
    }
    if (q3 >= r2) {
      if (r == 0) {
        theta = 1.570796326794896;
      } else {
        q3 = sqrt(q3);
        if (q3 < fabs(r)) {
          q3 = fabs(r);
        }
        theta = acos(r / q3);
      }
      q = -2 * sqrt(q);
      root1 = q * cos(theta / 3) - a1 / 3;
      root2 = q * cos((theta + 6.283185307179586) / 3) - a1 / 3;
      root3 = q * cos((theta + 2 * 6.283185307179586) / 3) - a1 / 3;
    } else {
      theta = sqrt(r2 - q3) + fabs(r);
      theta = pow(theta, 1.0 / 3.0);
      root1 = root2 = root3 = -((r) < 0 ? -1 : 1) * (theta + q / theta) - a1 / 3;
    }
  }
  root1 *= xmax;
  root2 *= xmax;
  root3 *= xmax;
  *eval1 = ((root1) < (root2) ? (root1) : (root2));
  *eval1 = ((*eval1) < (root3) ? (*eval1) : (root3));
  *eval3 = ((root1) > (root2) ? (root1) : (root2));
  *eval3 = ((*eval3) > (root3) ? (*eval3) : (root3));
  if (root1 != *eval1 && root1 != *eval3) {
    *eval2 = root1;
  } else if (root2 != *eval1 && root2 != *eval3) {
    *eval2 = root2;
  } else {
    *eval2 = root3;
  }
}
```