user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<tri_tri_intersect>:
  endbr64
  push   %r15
  mov    %rsi,%r11
  mov    %rcx,%rax
  mov    %rdi,%r10
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  movq   0x4(%rdi),%xmm2
  movq   0x4(%r11),%xmm3
  mov    %fs:0x28,%rdx
  mov    %rdx,0x48(%rsp)
  xor    %edx,%edx
  movq   0x4(%r13),%xmm1
  movss  (%rsi),%xmm0
  movaps %xmm2,%xmm4
  movaps %xmm3,%xmm5
  movss  (%rdi),%xmm7
  movaps %xmm2,%xmm6
  shufps $0xe5,%xmm4,%xmm4
  movaps %xmm4,%xmm15
  shufps $0xe5,%xmm5,%xmm5
  movd   %xmm5,%ebx
  movss  %xmm4,0x28(%rsp)
  movss  0x8(%r11),%xmm4
  movss  0x8(%rdi),%xmm5
  movd   %xmm0,%esi
  movlps %xmm1,0x8(%rsp)
  mov    0x0(%r13),%edi
  mov    0xc(%rsp),%ecx
  movd   %xmm3,%r14d
  unpcklps %xmm0,%xmm4
  movaps %xmm1,%xmm0
  subps  %xmm2,%xmm3
  movss  %xmm2,0x2c(%rsp)
  subps  %xmm2,%xmm0
  movd   %xmm1,%edx
  movd   %ecx,%xmm2
  movss  (%r8),%xmm11
  movd   %edi,%xmm1
  unpcklps %xmm7,%xmm5
  movss  %xmm7,0x20(%rsp)
  unpcklps %xmm1,%xmm2
  subps  %xmm5,%xmm4
  subps  %xmm5,%xmm2
  movaps %xmm0,%xmm5
  mulps  %xmm4,%xmm5
  shufps $0xe5,%xmm4,%xmm4
  mulss  %xmm4,%xmm0
  movaps %xmm2,%xmm1
  shufps $0xe5,%xmm2,%xmm2
  movss  0x4(%rax),%xmm4
  mulps  %xmm3,%xmm1
  mulss  %xmm3,%xmm2
  movss  %xmm4,0x1c(%rsp)
  subps  %xmm5,%xmm1
  subss  %xmm2,%xmm0
  mulss  %xmm1,%xmm7
  movaps %xmm1,%xmm5
  movaps %xmm1,%xmm14
  movlps %xmm1,0x38(%rsp)
  shufps $0xe5,%xmm5,%xmm5
  mulss  %xmm5,%xmm6
  movaps %xmm15,%xmm1
  movss  0x8(%rax),%xmm15
  mulss  %xmm5,%xmm4
  movaps %xmm5,%xmm13
  movss  %xmm0,0x40(%rsp)
  mulss  %xmm0,%xmm1
  movaps %xmm7,%xmm8
  movss  (%rax),%xmm7
  addss  %xmm6,%xmm8
  movss  0x4(%r8),%xmm6
  movaps %xmm7,%xmm2
  movss  %xmm7,0x18(%rsp)
  movaps %xmm11,%xmm7
  mulss  %xmm14,%xmm2
  movaps %xmm6,%xmm3
  mulss  %xmm14,%xmm7
  addss  %xmm1,%xmm8
  mulss  %xmm5,%xmm3
  addss  %xmm2,%xmm4
  movaps %xmm0,%xmm2
  mulss  %xmm15,%xmm2
  addss  %xmm7,%xmm3
  movaps %xmm0,%xmm7
  addss  %xmm2,%xmm4
  movss  0x8(%r8),%xmm2
  mulss  %xmm2,%xmm7
  subss  %xmm8,%xmm4
  addss  %xmm7,%xmm3
  subss  %xmm8,%xmm3
  movss  %xmm3,0x8(%rsp)
  movss  (%r9),%xmm5
  movss  0x4(%r9),%xmm7
  movsd  D3(%rip),%xmm12
  movss  0x8(%r9),%xmm10
  movaps %xmm5,%xmm9
  movaps %xmm7,%xmm3
  mulss  %xmm14,%xmm9
  movss  %xmm10,0x24(%rsp)
  mulss  %xmm13,%xmm3
  addss  %xmm9,%xmm3
  movaps %xmm10,%xmm9
  movss  D5(%rip),%xmm10
  mulss  %xmm0,%xmm9
  addss  %xmm9,%xmm3
  pxor   %xmm9,%xmm9
  subss  %xmm8,%xmm3
  movaps %xmm4,%xmm8
  andps  %xmm10,%xmm8
  cvtss2sd %xmm8,%xmm8
  comisd %xmm8,%xmm12
  movss  %xmm3,0x14(%rsp)
  jbe    L146
  movaps %xmm9,%xmm4
L146:
  movss  0x8(%rsp),%xmm8
  andps  %xmm10,%xmm8
  cvtss2sd %xmm8,%xmm8
  comisd %xmm8,%xmm12
  jbe    L297
  movss  %xmm9,0x8(%rsp)
L297:
  movss  0x14(%rsp),%xmm8
  andps  %xmm10,%xmm8
  cvtss2sd %xmm8,%xmm8
  comisd %xmm8,%xmm12
  jbe    L259
  movss  %xmm9,0x14(%rsp)
L259:
  movss  0x8(%rsp),%xmm8
  movss  0x14(%rsp),%xmm1
  mulss  %xmm4,%xmm8
  mulss  %xmm4,%xmm1
  comiss %xmm9,%xmm8
  movd   %xmm8,%r15d
  movd   %xmm1,%ebp
  jbe    L61
  xor    %r12d,%r12d
  comiss %xmm9,%xmm1
  ja     L327
L61:
  movaps %xmm11,%xmm1
  movss  0x18(%rsp),%xmm3
  subss  %xmm15,%xmm2
  movss  0x1c(%rsp),%xmm11
  movss  0x24(%rsp),%xmm8
  subss  %xmm11,%xmm6
  subss  %xmm3,%xmm1
  subss  %xmm3,%xmm5
  subss  %xmm11,%xmm7
  movaps %xmm2,%xmm3
  subss  %xmm15,%xmm8
  movaps %xmm6,%xmm11
  mulss  %xmm7,%xmm3
  mulss  %xmm8,%xmm11
  mulss  %xmm5,%xmm2
  mulss  %xmm1,%xmm8
  mulss  %xmm5,%xmm6
  movd   %esi,%xmm5
  mulss  %xmm1,%xmm7
  movss  0x18(%rsp),%xmm1
  subss  %xmm3,%xmm11
  movd   %edi,%xmm3
  subss  %xmm8,%xmm2
  movss  0x20(%rsp),%xmm8
  mulss  %xmm11,%xmm1
  subss  %xmm6,%xmm7
  movss  0x1c(%rsp),%xmm6
  mulss  %xmm11,%xmm8
  mulss  %xmm11,%xmm5
  mulss  %xmm2,%xmm6
  mulss  %xmm7,%xmm15
  mulss  %xmm11,%xmm3
  addss  %xmm1,%xmm6
  movss  0x2c(%rsp),%xmm1
  mulss  %xmm2,%xmm1
  addss  %xmm15,%xmm6
  movd   %ecx,%xmm15
  mulss  %xmm7,%xmm15
  addss  %xmm1,%xmm8
  movss  0x28(%rsp),%xmm1
  mulss  %xmm7,%xmm1
  addss  %xmm1,%xmm8
  movd   %r14d,%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm6,%xmm8
  addss  %xmm5,%xmm1
  movd   %ebx,%xmm5
  mulss  %xmm7,%xmm5
  addss  %xmm1,%xmm5
  movd   %edx,%xmm1
  mulss  %xmm2,%xmm1
  subss  %xmm6,%xmm5
  addss  %xmm3,%xmm1
  addss  %xmm15,%xmm1
  subss  %xmm6,%xmm1
  movaps %xmm8,%xmm6
  andps  %xmm10,%xmm6
  cvtss2sd %xmm6,%xmm6
  comisd %xmm6,%xmm12
  jbe    L234
  movaps %xmm9,%xmm8
L234:
  movaps %xmm5,%xmm6
  andps  %xmm10,%xmm6
  cvtss2sd %xmm6,%xmm6
  comisd %xmm6,%xmm12
  jbe    L296
  movaps %xmm9,%xmm5
L296:
  movaps %xmm1,%xmm6
  andps  %xmm10,%xmm6
  cvtss2sd %xmm6,%xmm6
  comisd %xmm6,%xmm12
  jbe    L94
  movaps %xmm9,%xmm1
L94:
  movaps %xmm8,%xmm15
  movaps %xmm8,%xmm12
  mulss  %xmm5,%xmm15
  mulss  %xmm1,%xmm12
  comiss %xmm9,%xmm15
  jbe    L191
  xor    %r12d,%r12d
  comiss %xmm9,%xmm12
  ja     L327
L191:
  movaps %xmm7,%xmm6
  movaps %xmm0,%xmm3
  xor    %ecx,%ecx
  mulss  %xmm2,%xmm3
  mulss  %xmm11,%xmm0
  mulss  %xmm13,%xmm6
  mulss  %xmm14,%xmm7
  mulss  %xmm14,%xmm2
  mulss  %xmm13,%xmm11
  subss  %xmm3,%xmm6
  subss  %xmm7,%xmm0
  andps  %xmm10,%xmm6
  subss  %xmm11,%xmm2
  andps  %xmm10,%xmm0
  comiss %xmm6,%xmm0
  andps  %xmm10,%xmm2
  jbe    L363
  movaps %xmm0,%xmm6
  mov    $0x4,%ecx
L363:
  ucomiss %xmm6,%xmm2
  mov    $0x8,%edi
  cmova  %rdi,%rcx
  comiss %xmm9,%xmm15
  movss  (%r10,%rcx,1),%xmm10
  movss  (%r11,%rcx,1),%xmm7
  movss  0x0(%r13,%rcx,1),%xmm6
  movss  (%rax,%rcx,1),%xmm11
  movss  (%r8,%rcx,1),%xmm2
  movss  (%r9,%rcx,1),%xmm0
  jbe    L339
  subss  %xmm6,%xmm7
  subss  %xmm6,%xmm10
  mulss  %xmm1,%xmm7
  movaps %xmm10,%xmm12
  movaps %xmm1,%xmm10
  mulss  %xmm1,%xmm12
  subss  %xmm5,%xmm1
  subss  %xmm8,%xmm10
  divss  %xmm1,%xmm7
  divss  %xmm10,%xmm12
  movaps %xmm7,%xmm5
  addss  %xmm6,%xmm5
  movaps %xmm5,%xmm1
  addss  %xmm6,%xmm12
L107:
  movd   %r15d,%xmm7
  comiss %xmm9,%xmm7
  jbe    L228
L210:
  movaps %xmm11,%xmm5
  movss  0x14(%rsp),%xmm7
  subss  %xmm0,%xmm2
  subss  %xmm0,%xmm5
  movaps %xmm7,%xmm3
  subss  %xmm4,%xmm3
  mulss  %xmm7,%xmm2
  mulss  %xmm7,%xmm5
  divss  %xmm3,%xmm5
  movaps %xmm7,%xmm3
  subss  0x8(%rsp),%xmm3
  divss  %xmm3,%xmm2
  addss  %xmm0,%xmm5
  addss  %xmm2,%xmm0
L9:
  comiss %xmm1,%xmm12
  jbe    L238
  movaps %xmm12,%xmm2
  movaps %xmm1,%xmm12
  movaps %xmm2,%xmm1
L238:
  comiss %xmm0,%xmm5
  jbe    L357
  movaps %xmm5,%xmm2
  movaps %xmm0,%xmm5
  movaps %xmm2,%xmm0
L357:
  xor    %r12d,%r12d
  comiss %xmm1,%xmm5
  ja     L327
  xor    %r12d,%r12d
  comiss %xmm0,%xmm12
  setbe  %r12b
L327:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  add    $0x58,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L339:
  comiss %xmm9,%xmm12
  jbe    L359
L152:
  subss  %xmm7,%xmm6
  movaps %xmm10,%xmm12
  movaps %xmm5,%xmm10
  subss  %xmm7,%xmm12
  subss  %xmm8,%xmm10
  mulss  %xmm5,%xmm6
  mulss  %xmm5,%xmm12
  subss  %xmm1,%xmm5
  divss  %xmm5,%xmm6
  divss  %xmm10,%xmm12
  movaps %xmm6,%xmm1
  addss  %xmm7,%xmm1
  addss  %xmm7,%xmm12
  movd   %r15d,%xmm7
  comiss %xmm9,%xmm7
  ja     L210
L228:
  movd   %ebp,%xmm7
  comiss %xmm9,%xmm7
  jbe    L335
L232:
  movaps %xmm11,%xmm5
  subss  %xmm2,%xmm0
  movss  0x8(%rsp),%xmm7
  subss  %xmm2,%xmm5
  movaps %xmm7,%xmm6
  mulss  %xmm7,%xmm0
  subss  %xmm4,%xmm6
  mulss  %xmm7,%xmm5
  subss  0x14(%rsp),%xmm7
  divss  %xmm7,%xmm0
  divss  %xmm6,%xmm5
  addss  %xmm2,%xmm0
  addss  %xmm2,%xmm5
  jmp    L9
  nopl   0x0(%rax,%rax,1)
L359:
  movaps %xmm5,%xmm12
  mulss  %xmm1,%xmm12
  comiss %xmm9,%xmm12
  jbe    L282
L196:
  subss  %xmm10,%xmm7
  movaps %xmm7,%xmm12
  movaps %xmm8,%xmm7
  subss  %xmm5,%xmm7
  mulss  %xmm8,%xmm12
  movaps %xmm6,%xmm5
  subss  %xmm10,%xmm5
  mulss  %xmm8,%xmm5
  subss  %xmm1,%xmm8
  divss  %xmm7,%xmm12
  divss  %xmm8,%xmm5
  addss  %xmm10,%xmm12
  movaps %xmm5,%xmm1
  addss  %xmm10,%xmm1
  jmp    L107
  nopw   0x0(%rax,%rax,1)
L335:
  movss  0x8(%rsp),%xmm5
  mulss  0x14(%rsp),%xmm5
  comiss %xmm9,%xmm5
  jbe    L301
L371:
  movaps %xmm2,%xmm5
  subss  %xmm11,%xmm0
  movaps %xmm4,%xmm2
  subss  %xmm11,%xmm5
  subss  0x8(%rsp),%xmm2
  mulss  %xmm4,%xmm0
  mulss  %xmm4,%xmm5
  subss  0x14(%rsp),%xmm4
  divss  %xmm4,%xmm0
  divss  %xmm2,%xmm5
  addss  %xmm11,%xmm0
  addss  %xmm11,%xmm5
  jmp    L9
  nopl   0x0(%rax)
L282:
  ucomiss %xmm9,%xmm8
  jp     L196
  jne    L196
  ucomiss %xmm9,%xmm5
  jp     L152
  jne    L152
  ucomiss %xmm9,%xmm1
  jp     L316
  je     L133
L316:
  subss  %xmm6,%xmm7
  subss  %xmm6,%xmm10
  movaps %xmm1,%xmm12
  subss  %xmm8,%xmm12
  mulss  %xmm1,%xmm7
  mulss  %xmm1,%xmm10
  subss  %xmm5,%xmm1
  divss  %xmm1,%xmm7
  divss  %xmm12,%xmm10
  addss  %xmm6,%xmm7
  movaps %xmm7,%xmm1
  movaps %xmm10,%xmm12
  addss  %xmm6,%xmm12
  jmp    L107
  nopl   0x0(%rax)
L301:
  ucomiss %xmm9,%xmm4
  jp     L371
  jne    L371
  movss  0x8(%rsp),%xmm7
  ucomiss %xmm9,%xmm7
  jp     L232
  jne    L232
  movss  0x14(%rsp),%xmm5
  ucomiss %xmm9,%xmm5
  jp     L351
  je     L133
L351:
  subss  %xmm0,%xmm11
  movss  0x14(%rsp),%xmm6
  subss  %xmm0,%xmm2
  movaps %xmm6,%xmm5
  movaps %xmm6,%xmm3
  subss  0x8(%rsp),%xmm3
  mulss  %xmm6,%xmm11
  subss  %xmm4,%xmm5
  mulss  %xmm6,%xmm2
  divss  %xmm5,%xmm11
  divss  %xmm3,%xmm2
  movaps %xmm11,%xmm5
  addss  %xmm0,%xmm5
  addss  %xmm2,%xmm0
  jmp    L9
L133:
  lea    0x38(%rsp),%rdi
  sub    $0x8,%rsp
  mov    %r11,%rdx
  mov    %r13,%rcx
  push   %r9
  mov    %r10,%rsi
  mov    %r8,%r9
  mov    %rax,%r8
  xor    %eax,%eax
  call   <coplanar_tri_tri@plt>
  mov    %eax,%r12d
  pop    %rax
  pop    %rdx
  jmp    L327
L44:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D3
data_type: f64
name: unpack_data
arguments: data_label: D5
data_type: dword

tool: D3: 0.005

tool: D5: 2147483647

assistant: ```c
int tri_tri_intersect(const float V0[3], const float V1[3], const float V2[3], const float U0[3], const float U1[3], const float U2[3]) {
  float E1[3], E2[3];
  float N1[3], N2[3], d1, d2;
  float du0, du1, du2, dv0, dv1, dv2;
  float D[3];
  float isect1[2], isect2[2];
  float du0du1, du0du2, dv0dv1, dv0dv2;
  short index;
  float vp0, vp1, vp2;
  float up0, up1, up2;
  float b, c, max;
  E1[0] = V1[0] - V0[0];
  E1[1] = V1[1] - V0[1];
  E1[2] = V1[2] - V0[2];
  ;
  E2[0] = V2[0] - V0[0];
  E2[1] = V2[1] - V0[1];
  E2[2] = V2[2] - V0[2];
  ;
  N1[0] = E1[1] * E2[2] - E1[2] * E2[1];
  N1[1] = E1[2] * E2[0] - E1[0] * E2[2];
  N1[2] = E1[0] * E2[1] - E1[1] * E2[0];
  ;
  d1 = -(N1[0] * V0[0] + N1[1] * V0[1] + N1[2] * V0[2]);
  du0 = (N1[0] * U0[0] + N1[1] * U0[1] + N1[2] * U0[2]) + d1;
  du1 = (N1[0] * U1[0] + N1[1] * U1[1] + N1[2] * U1[2]) + d1;
  du2 = (N1[0] * U2[0] + N1[1] * U2[1] + N1[2] * U2[2]) + d1;
  if (fabs(du0) < 0.005)
    du0 = 0.0;
  if (fabs(du1) < 0.005)
    du1 = 0.0;
  if (fabs(du2) < 0.005)
    du2 = 0.0;
  du0du1 = du0 * du1;
  du0du2 = du0 * du2;
  if (du0du1 > 0.0f && du0du2 > 0.0f)
    return 0;
  E1[0] = U1[0] - U0[0];
  E1[1] = U1[1] - U0[1];
  E1[2] = U1[2] - U0[2];
  ;
  E2[0] = U2[0] - U0[0];
  E2[1] = U2[1] - U0[1];
  E2[2] = U2[2] - U0[2];
  ;
  N2[0] = E1[1] * E2[2] - E1[2] * E2[1];
  N2[1] = E1[2] * E2[0] - E1[0] * E2[2];
  N2[2] = E1[0] * E2[1] - E1[1] * E2[0];
  ;
  d2 = -(N2[0] * U0[0] + N2[1] * U0[1] + N2[2] * U0[2]);
  dv0 = (N2[0] * V0[0] + N2[1] * V0[1] + N2[2] * V0[2]) + d2;
  dv1 = (N2[0] * V1[0] + N2[1] * V1[1] + N2[2] * V1[2]) + d2;
  dv2 = (N2[0] * V2[0] + N2[1] * V2[1] + N2[2] * V2[2]) + d2;
  if (fabs(dv0) < 0.005)
    dv0 = 0.0;
  if (fabs(dv1) < 0.005)
    dv1 = 0.0;
  if (fabs(dv2) < 0.005)
    dv2 = 0.0;
  dv0dv1 = dv0 * dv1;
  dv0dv2 = dv0 * dv2;
  if (dv0dv1 > 0.0f && dv0dv2 > 0.0f)
    return 0;
  D[0] = N1[1] * N2[2] - N1[2] * N2[1];
  D[1] = N1[2] * N2[0] - N1[0] * N2[2];
  D[2] = N1[0] * N2[1] - N1[1] * N2[0];
  ;
  max = fabs(D[0]);
  index = 0;
  b = fabs(D[1]);
  c = fabs(D[2]);
  if (b > max)
    max = b, index = 1;
  if (c > max)
    max = c, index = 2;
  vp0 = V0[index];
  vp1 = V1[index];
  vp2 = V2[index];
  up0 = U0[index];
  up1 = U1[index];
  up2 = U2[index];
  if (dv0dv1 > 0.0f) {
    isect1[0] = vp2 + (vp0 - vp2) * dv2 / (dv2 - dv0);
    isect1[1] = vp2 + (vp1 - vp2) * dv2 / (dv2 - dv1);
    ;
  } else if (dv0dv2 > 0.0f) {
    isect1[0] = vp1 + (vp0 - vp1) * dv1 / (dv1 - dv0);
    isect1[1] = vp1 + (vp2 - vp1) * dv1 / (dv1 - dv2);
    ;
  } else if (dv1 * dv2 > 0.0f || dv0 != 0.0f) {
    isect1[0] = vp0 + (vp1 - vp0) * dv0 / (dv0 - dv1);
    isect1[1] = vp0 + (vp2 - vp0) * dv0 / (dv0 - dv2);
    ;
  } else if (dv1 != 0.0f) {
    isect1[0] = vp1 + (vp0 - vp1) * dv1 / (dv1 - dv0);
    isect1[1] = vp1 + (vp2 - vp1) * dv1 / (dv1 - dv2);
    ;
  } else if (dv2 != 0.0f) {
    isect1[0] = vp2 + (vp0 - vp2) * dv2 / (dv2 - dv0);
    isect1[1] = vp2 + (vp1 - vp2) * dv2 / (dv2 - dv1);
    ;
  } else {
    return coplanar_tri_tri(N1, V0, V1, V2, U0, U1, U2);
  };
  if (du0du1 > 0.0f) {
    isect2[0] = up2 + (up0 - up2) * du2 / (du2 - du0);
    isect2[1] = up2 + (up1 - up2) * du2 / (du2 - du1);
    ;
  } else if (du0du2 > 0.0f) {
    isect2[0] = up1 + (up0 - up1) * du1 / (du1 - du0);
    isect2[1] = up1 + (up2 - up1) * du1 / (du1 - du2);
    ;
  } else if (du1 * du2 > 0.0f || du0 != 0.0f) {
    isect2[0] = up0 + (up1 - up0) * du0 / (du0 - du1);
    isect2[1] = up0 + (up2 - up0) * du0 / (du0 - du2);
    ;
  } else if (du1 != 0.0f) {
    isect2[0] = up1 + (up0 - up1) * du1 / (du1 - du0);
    isect2[1] = up1 + (up2 - up1) * du1 / (du1 - du2);
    ;
  } else if (du2 != 0.0f) {
    isect2[0] = up2 + (up0 - up2) * du2 / (du2 - du0);
    isect2[1] = up2 + (up1 - up2) * du2 / (du2 - du1);
    ;
  } else {
    return coplanar_tri_tri(N1, V0, V1, V2, U0, U1, U2);
  };
  if (isect1[0] > isect1[1]) {
    float c;
    c = isect1[0];
    isect1[0] = isect1[1];
    isect1[1] = c;
  };
  if (isect2[0] > isect2[1]) {
    float c;
    c = isect2[0];
    isect2[0] = isect2[1];
    isect2[1] = c;
  };
  if (isect1[1] < isect2[0] || isect2[1] < isect1[0])
    return 0;
  return 1;
}
```