user: Please show me the C implementation that matches the assembly code listed below:

```asm
<tri_tri_intersect_with_isectline>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x148,%rsp
  movsd  (%rdi),%xmm2
  mov    0x180(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0x188(%rsp),%rax
  mov    %rax,0x60(%rsp)
  mov    0x190(%rsp),%rax
  mov    %rax,0x68(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x80(%rsp)
  movq   $0x0,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x0,0x98(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movq   $0x0,0xf0(%rsp)
  movq   $0x0,0x100(%rsp)
  movq   $0x0,0x108(%rsp)
  movq   $0x0,0x110(%rsp)
  movq   $0x0,0x120(%rsp)
  movq   $0x0,0x128(%rsp)
  movq   $0x0,0x130(%rsp)
  movsd  (%rsi),%xmm0
  movsd  0x10(%rdi),%xmm7
  movsd  0x8(%rdi),%xmm8
  movsd  0x8(%rsi),%xmm6
  movsd  0x10(%rsi),%xmm5
  subsd  %xmm2,%xmm0
  movsd  (%rdx),%xmm9
  movsd  0x8(%rdx),%xmm10
  movsd  0x10(%rdx),%xmm4
  subsd  %xmm7,%xmm5
  subsd  %xmm8,%xmm6
  subsd  %xmm2,%xmm9
  subsd  %xmm8,%xmm10
  subsd  %xmm7,%xmm4
  movapd %xmm6,%xmm3
  movapd %xmm5,%xmm11
  movapd %xmm5,%xmm1
  mulsd  %xmm10,%xmm11
  movapd %xmm8,%xmm5
  mulsd  %xmm4,%xmm3
  mulsd  %xmm9,%xmm1
  mulsd  %xmm0,%xmm4
  mulsd  %xmm9,%xmm6
  mulsd  %xmm10,%xmm0
  subsd  %xmm11,%xmm3
  subsd  %xmm4,%xmm1
  movapd %xmm7,%xmm4
  movsd  %xmm3,0xa0(%rsp)
  mulsd  %xmm3,%xmm2
  subsd  %xmm6,%xmm0
  movsd  %xmm1,0xa8(%rsp)
  mulsd  %xmm1,%xmm5
  movsd  %xmm0,0xb0(%rsp)
  mulsd  %xmm0,%xmm4
  addsd  %xmm5,%xmm2
  movsd  0x8(%rcx),%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm4,%xmm2
  movsd  (%rcx),%xmm4
  mulsd  %xmm3,%xmm4
  addsd  %xmm5,%xmm4
  movsd  0x10(%rcx),%xmm5
  mulsd  %xmm0,%xmm5
  addsd  %xmm5,%xmm4
  movsd  0x8(%r8),%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  0x8(%r9),%xmm1
  movapd %xmm4,%xmm7
  movsd  (%r8),%xmm4
  subsd  %xmm2,%xmm7
  mulsd  %xmm3,%xmm4
  mulsd  (%r9),%xmm3
  movsd  %xmm7,0x20(%rsp)
  addsd  %xmm5,%xmm4
  movsd  0x10(%r8),%xmm5
  addsd  %xmm3,%xmm1
  mulsd  %xmm0,%xmm5
  mulsd  0x10(%r9),%xmm0
  addsd  %xmm5,%xmm4
  addsd  %xmm0,%xmm1
  movapd %xmm7,%xmm0
  subsd  %xmm2,%xmm4
  subsd  %xmm2,%xmm1
  movsd  %xmm4,(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <fabs@plt>
  test   %eax,%eax
  jg     L143
  movq   $0x0,0x20(%rsp)
L143:
  movsd  (%rsp),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L375
  movq   $0x0,(%rsp)
L375:
  movsd  0x8(%rsp),%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L168
  movq   $0x0,0x8(%rsp)
L168:
  movsd  0x20(%rsp),%xmm6
  movsd  (%rsp),%xmm7
  pxor   %xmm1,%xmm1
  mulsd  %xmm6,%xmm7
  mulsd  0x8(%rsp),%xmm6
  comisd %xmm1,%xmm7
  movsd  %xmm7,0x40(%rsp)
  movsd  %xmm6,0x48(%rsp)
  jbe    L47
  comisd %xmm1,%xmm6
  ja     L190
L47:
  movsd  0x8(%r14),%xmm7
  movsd  0x10(%r14),%xmm6
  movsd  0x8(%r15),%xmm2
  movsd  0x10(%r15),%xmm5
  movsd  (%r14),%xmm0
  movsd  (%r15),%xmm3
  movsd  (%rbx),%xmm8
  movsd  0x8(%rbx),%xmm9
  subsd  %xmm7,%xmm2
  subsd  %xmm6,%xmm5
  movsd  0x10(%rbx),%xmm4
  subsd  %xmm0,%xmm3
  subsd  %xmm0,%xmm8
  subsd  %xmm7,%xmm9
  subsd  %xmm6,%xmm4
  movapd %xmm2,%xmm1
  movapd %xmm5,%xmm10
  mulsd  %xmm9,%xmm10
  mulsd  %xmm4,%xmm1
  mulsd  %xmm8,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  %xmm9,%xmm3
  mulsd  %xmm8,%xmm2
  subsd  %xmm10,%xmm1
  subsd  %xmm4,%xmm5
  mulsd  %xmm1,%xmm0
  movapd %xmm3,%xmm4
  movapd %xmm7,%xmm3
  movsd  %xmm1,0x38(%rsp)
  subsd  %xmm2,%xmm4
  movapd %xmm6,%xmm2
  mulsd  %xmm5,%xmm3
  movapd %xmm5,%xmm7
  movsd  %xmm5,0x50(%rsp)
  mulsd  0x8(%r13),%xmm7
  mulsd  %xmm4,%xmm2
  movapd %xmm4,%xmm6
  movsd  %xmm4,0x58(%rsp)
  addsd  %xmm3,%xmm0
  movsd  0x8(%rbp),%xmm3
  mulsd  %xmm5,%xmm3
  addsd  %xmm2,%xmm0
  movsd  0x0(%rbp),%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm3,%xmm2
  movsd  0x10(%rbp),%xmm3
  mulsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm2
  movsd  0x8(%r12),%xmm3
  mulsd  %xmm5,%xmm3
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm4
  movsd  %xmm2,0x28(%rsp)
  movsd  (%r12),%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm3,%xmm2
  movsd  0x10(%r12),%xmm3
  mulsd  %xmm6,%xmm3
  mulsd  0x10(%r13),%xmm6
  addsd  %xmm3,%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,0x10(%rsp)
  movapd %xmm1,%xmm2
  mulsd  0x0(%r13),%xmm2
  addsd  %xmm7,%xmm2
  addsd  %xmm6,%xmm2
  subsd  %xmm0,%xmm2
  movapd %xmm4,%xmm0
  movsd  %xmm2,0x18(%rsp)
  call   <fabs@plt>
  movsd  0x38(%rsp),%xmm1
  test   %eax,%eax
  jle    L58
L162:
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm1,0x38(%rsp)
  call   <fabs@plt>
  movsd  0x38(%rsp),%xmm1
  test   %eax,%eax
  jle    L151
L126:
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm1,0x38(%rsp)
  call   <fabs@plt>
  movsd  0x38(%rsp),%xmm1
  test   %eax,%eax
  jle    L234
L266:
  movsd  0x28(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm6
  pxor   %xmm3,%xmm3
  mulsd  %xmm5,%xmm6
  mulsd  0x18(%rsp),%xmm5
  comisd %xmm3,%xmm6
  movapd %xmm5,%xmm7
  jbe    L165
  comisd %xmm3,%xmm5
  ja     L190
L165:
  movsd  %xmm7,0x78(%rsp)
  movsd  0x58(%rsp),%xmm7
  movapd %xmm1,%xmm3
  movsd  0xb0(%rsp),%xmm4
  movsd  0xa0(%rsp),%xmm0
  movsd  %xmm6,0x70(%rsp)
  movsd  0x50(%rsp),%xmm6
  mulsd  %xmm4,%xmm3
  movapd %xmm7,%xmm2
  movsd  0xa8(%rsp),%xmm5
  mulsd  %xmm0,%xmm2
  mulsd  %xmm6,%xmm0
  mulsd  %xmm5,%xmm7
  mulsd  %xmm4,%xmm6
  subsd  %xmm2,%xmm3
  movapd %xmm0,%xmm2
  movapd %xmm1,%xmm0
  mulsd  %xmm5,%xmm0
  movsd  %xmm3,0x38(%rsp)
  subsd  %xmm0,%xmm2
  movapd %xmm7,%xmm0
  subsd  %xmm6,%xmm0
  movsd  %xmm2,0x58(%rsp)
  call   <fabs@plt>
  movsd  0x38(%rsp),%xmm3
  mov    %eax,0x50(%rsp)
  movapd %xmm3,%xmm0
  call   <fabs@plt>
  movsd  0x58(%rsp),%xmm2
  mov    %eax,0x38(%rsp)
  movapd %xmm2,%xmm0
  call   <fabs@plt>
  mov    0x38(%rsp),%edx
  mov    0x50(%rsp),%ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  0x70(%rsp),%xmm6
  movsd  0x78(%rsp),%xmm7
  cmp    %edx,%ecx
  jl     L317
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  cvtsi2sd %ecx,%xmm0
L240:
  comisd %xmm0,%xmm1
  mov    $0x10,%edx
  ja     L20
  lea    0x0(,%rax,8),%rdx
L20:
  movsd  (%r14,%rdx,1),%xmm8
  movsd  (%r15,%rdx,1),%xmm9
  lea    0x80(%rsp),%rcx
  sub    $0x8,%rsp
  movsd  (%rbx,%rdx,1),%xmm10
  movsd  0x0(%rbp,%rdx,1),%xmm0
  mov    %rbp,%rdi
  mov    %r12,%rsi
  movsd  %xmm8,0x60(%rsp)
  movsd  0x0(%r13,%rdx,1),%xmm2
  movsd  (%r12,%rdx,1),%xmm1
  mov    %r13,%rdx
  movsd  %xmm9,0x58(%rsp)
  movsd  %xmm10,0x40(%rsp)
  lea    0xe8(%rsp),%rax
  push   %rax
  movsd  0x28(%rsp),%xmm5
  movsd  0x20(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm3
  lea    0xd0(%rsp),%r9
  lea    0x98(%rsp),%r8
  call   <compute_intervals_isectline@plt>
  mov    %eax,%r10d
  mov    0x40(%rsp),%rax
  test   %r10d,%r10d
  mov    %r10d,(%rax)
  pop    %rdi
  pop    %r8
  movsd  0x38(%rsp),%xmm10
  movsd  0x50(%rsp),%xmm9
  movsd  0x58(%rsp),%xmm8
  jne    L17
  mov    %r10d,0x10(%rsp)
  movapd %xmm9,%xmm1
  mov    %rbx,%rdx
  mov    %r15,%rsi
  lea    0x90(%rsp),%rcx
  sub    $0x8,%rsp
  movapd %xmm8,%xmm0
  mov    %r14,%rdi
  lea    0x128(%rsp),%rax
  movapd %xmm10,%xmm2
  push   %rax
  movsd  0x58(%rsp),%xmm7
  movsd  0x50(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  lea    0x110(%rsp),%r9
  lea    0xa8(%rsp),%r8
  call   <compute_intervals_isectline@plt>
  movsd  0x90(%rsp),%xmm0
  movsd  0x98(%rsp),%xmm1
  pop    %rax
  xor    %eax,%eax
  pop    %rdx
  comisd %xmm1,%xmm0
  mov    0x10(%rsp),%r10d
  jbe    L284
  movsd  %xmm1,0x80(%rsp)
  mov    $0x1,%eax
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x88(%rsp)
L284:
  movsd  0x90(%rsp),%xmm0
  movsd  0x98(%rsp),%xmm2
  comisd %xmm2,%xmm0
  ja     L363
L8:
  comisd %xmm1,%xmm0
  ja     L190
  movsd  0x98(%rsp),%xmm3
  movsd  0x80(%rsp),%xmm2
  comisd %xmm3,%xmm2
  ja     L190
  comisd %xmm0,%xmm2
  jbe    L332
  test   %eax,%eax
  jne    L223
  mov    0x60(%rsp),%rax
  comisd %xmm3,%xmm1
  movsd  0xc0(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0xc8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0xd0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jbe    L275
L351:
  test   %r10d,%r10d
  je     L111
L63:
  movsd  0x100(%rsp),%xmm0
  mov    0x68(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  0x108(%rsp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x110(%rsp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L225
  nopl   0x0(%rax,%rax,1)
L190:
  xor    %r10d,%r10d
L225:
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L303
  add    $0x148,%rsp
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L234:
  movq   $0x0,0x18(%rsp)
  jmp    L266
  xchg   %ax,%ax
L58:
  movq   $0x0,0x28(%rsp)
  jmp    L162
  xchg   %ax,%ax
L151:
  movq   $0x0,0x10(%rsp)
  jmp    L126
  xchg   %ax,%ax
L317:
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  cvtsi2sd %edx,%xmm0
  jmp    L240
  nopw   0x0(%rax,%rax,1)
L363:
  movsd  %xmm0,0x98(%rsp)
  mov    $0x1,%r10d
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x90(%rsp)
  jmp    L8
  nopl   0x0(%rax)
L17:
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    %r15,%r9
  mov    %r14,%r8
  lea    0xa0(%rsp),%rdi
  sub    $0x8,%rsp
  mov    %r12,%rdx
  push   %rbx
  call   <coplanar_tri_tri@plt>
  pop    %rcx
  pop    %rsi
  mov    %eax,%r10d
  jmp    L225
  nopl   0x0(%rax,%rax,1)
L332:
  test   %r10d,%r10d
  je     L83
  mov    0x60(%rsp),%rsi
  comisd %xmm1,%xmm3
  movsd  0x120(%rsp),%xmm0
  movsd  %xmm0,(%rsi)
  movsd  0x128(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  0x130(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsi)
  jbe    L63
L251:
  test   %eax,%eax
  je     L275
  mov    0x68(%rsp),%rsi
  mov    %eax,%r10d
  movsd  0xc0(%rsp),%xmm0
  movsd  %xmm0,(%rsi)
  movsd  0xc8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  0xd0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsi)
  jmp    L225
  nopl   0x0(%rax,%rax,1)
L83:
  mov    0x60(%rsp),%rdi
  comisd %xmm1,%xmm3
  movsd  0x100(%rsp),%xmm0
  movsd  %xmm0,(%rdi)
  movsd  0x108(%rsp),%xmm0
  movsd  %xmm0,0x8(%rdi)
  movsd  0x110(%rsp),%xmm0
  movsd  %xmm0,0x10(%rdi)
  ja     L251
L111:
  mov    0x68(%rsp),%rax
  mov    $0x1,%r10d
  movsd  0x120(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x128(%rsp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x130(%rsp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L225
  nopl   (%rax)
L223:
  mov    0x60(%rsp),%rsi
  comisd %xmm3,%xmm1
  movsd  0xe0(%rsp),%xmm0
  movsd  %xmm0,(%rsi)
  movsd  0xe8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  0xf0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsi)
  ja     L351
  mov    0x68(%rsp),%rdi
  mov    %eax,%r10d
  movsd  0xc0(%rsp),%xmm0
  movsd  %xmm0,(%rdi)
  movsd  0xc8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rdi)
  movsd  0xd0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rdi)
  jmp    L225
  xchg   %ax,%ax
L275:
  mov    0x68(%rsp),%rax
  mov    $0x1,%r10d
  movsd  0xe0(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0xe8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0xf0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L225
L303:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int tri_tri_intersect_with_isectline(double V0[3], double V1[3], double V2[3], double U0[3], double U1[3], double U2[3], int *coplanar, double isectpt1[3], double isectpt2[3]) {
  double E1[3], E2[3];
  double N1[3], N2[3], d1, d2;
  double du0, du1, du2, dv0, dv1, dv2;
  double D[3];
  double isect1[2] = {0, 0}, isect2[2] = {0, 0};
  double isectpointA1[3] = {0, 0, 0}, isectpointA2[3] = {0, 0, 0};
  double isectpointB1[3] = {0, 0, 0}, isectpointB2[3] = {0, 0, 0};
  double du0du1, du0du2, dv0dv1, dv0dv2;
  short index;
  double vp0, vp1, vp2;
  double up0, up1, up2;
  double b, c, max;
  int smallest1, smallest2;
  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) < 10e-6)
    du0 = 0.0;
  if (fabs(du1) < 10e-6)
    du1 = 0.0;
  if (fabs(du2) < 10e-6)
    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) < 10e-6)
    dv0 = 0.0;
  if (fabs(dv1) < 10e-6)
    dv1 = 0.0;
  if (fabs(dv2) < 10e-6)
    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];
  *coplanar = compute_intervals_isectline(V0, V1, V2, vp0, vp1, vp2, dv0, dv1, dv2, dv0dv1, dv0dv2, &isect1[0], &isect1[1], isectpointA1, isectpointA2);
  if (*coplanar)
    return coplanar_tri_tri(N1, V0, V1, V2, U0, U1, U2);
  compute_intervals_isectline(U0, U1, U2, up0, up1, up2, du0, du1, du2, du0du1, du0du2, &isect2[0], &isect2[1], isectpointB1, isectpointB2);
  if (isect1[0] > isect1[1]) {
    double c;
    c = isect1[0];
    isect1[0] = isect1[1];
    isect1[1] = c;
    smallest1 = 1;
  } else
    smallest1 = 0;
  ;
  if (isect2[0] > isect2[1]) {
    double c;
    c = isect2[0];
    isect2[0] = isect2[1];
    isect2[1] = c;
    smallest2 = 1;
  } else
    smallest2 = 0;
  ;
  if (isect1[1] < isect2[0] || isect2[1] < isect1[0])
    return 0;
  if (isect2[0] < isect1[0]) {
    if (smallest1 == 0) {
      isectpt1[0] = isectpointA1[0];
      isectpt1[1] = isectpointA1[1];
      isectpt1[2] = isectpointA1[2];
      ;
    } else {
      isectpt1[0] = isectpointA2[0];
      isectpt1[1] = isectpointA2[1];
      isectpt1[2] = isectpointA2[2];
      ;
    }
    if (isect2[1] < isect1[1]) {
      if (smallest2 == 0) {
        isectpt2[0] = isectpointB2[0];
        isectpt2[1] = isectpointB2[1];
        isectpt2[2] = isectpointB2[2];
        ;
      } else {
        isectpt2[0] = isectpointB1[0];
        isectpt2[1] = isectpointB1[1];
        isectpt2[2] = isectpointB1[2];
        ;
      }
    } else {
      if (smallest1 == 0) {
        isectpt2[0] = isectpointA2[0];
        isectpt2[1] = isectpointA2[1];
        isectpt2[2] = isectpointA2[2];
        ;
      } else {
        isectpt2[0] = isectpointA1[0];
        isectpt2[1] = isectpointA1[1];
        isectpt2[2] = isectpointA1[2];
        ;
      }
    }
  } else {
    if (smallest2 == 0) {
      isectpt1[0] = isectpointB1[0];
      isectpt1[1] = isectpointB1[1];
      isectpt1[2] = isectpointB1[2];
      ;
    } else {
      isectpt1[0] = isectpointB2[0];
      isectpt1[1] = isectpointB2[1];
      isectpt1[2] = isectpointB2[2];
      ;
    }
    if (isect2[1] > isect1[1]) {
      if (smallest1 == 0) {
        isectpt2[0] = isectpointA2[0];
        isectpt2[1] = isectpointA2[1];
        isectpt2[2] = isectpointA2[2];
        ;
      } else {
        isectpt2[0] = isectpointA1[0];
        isectpt2[1] = isectpointA1[1];
        isectpt2[2] = isectpointA1[2];
        ;
      }
    } else {
      if (smallest2 == 0) {
        isectpt2[0] = isectpointB2[0];
        isectpt2[1] = isectpointB2[1];
        isectpt2[2] = isectpointB2[2];
        ;
      } else {
        isectpt2[0] = isectpointB1[0];
        isectpt2[1] = isectpointB1[1];
        isectpt2[2] = isectpointB1[2];
        ;
      }
    }
  }
  return 1;
}
```