user: Converte this assembly snippet into its equivalent C code:

```asm
<clip3d>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xa8,%rsp
  movsd  %xmm0,-0x58(%rbp)
  movsd  %xmm1,-0x60(%rbp)
  movsd  %xmm2,-0x68(%rbp)
  movsd  %xmm3,-0x70(%rbp)
  movsd  %xmm4,-0x78(%rbp)
  movsd  %xmm5,-0x80(%rbp)
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %rcx,-0xa0(%rbp)
  mov    %r8,-0xa8(%rbp)
  mov    %r9,-0xb0(%rbp)
  movl   $0x0,-0x48(%rbp)
  movl   $0x0,-0x44(%rbp)
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x1,-0x4c(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x58(%rbp),%xmm0
  mov    -0x88(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x60(%rbp),%xmm0
  mov    -0x90(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x68(%rbp),%xmm0
  mov    -0x98(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x70(%rbp),%xmm0
  mov    -0xa0(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x78(%rbp),%xmm0
  mov    -0xa8(%rbp),%rax
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x80(%rbp),%xmm0
  mov    -0xb0(%rbp),%rax
  movss  %xmm0,(%rax)
  movsd  D275(%rip),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L319
  movl   $0xffffffff,-0x48(%rbp)
L319:
  movsd  -0x58(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L275
  movl   $0x1,-0x48(%rbp)
L275:
  movsd  D275(%rip),%xmm0
  comisd -0x70(%rbp),%xmm0
  jbe    L230
  movl   $0xffffffff,-0x44(%rbp)
L230:
  movsd  -0x70(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L209
  movl   $0x1,-0x44(%rbp)
L209:
  movsd  D275(%rip),%xmm0
  comisd -0x60(%rbp),%xmm0
  jbe    L499
  movl   $0xffffffff,-0x40(%rbp)
L499:
  movsd  -0x60(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L571
  movl   $0x1,-0x40(%rbp)
L571:
  movsd  D275(%rip),%xmm0
  comisd -0x78(%rbp),%xmm0
  jbe    L446
  movl   $0xffffffff,-0x3c(%rbp)
L446:
  movsd  -0x78(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L410
  movl   $0x1,-0x3c(%rbp)
L410:
  movsd  D275(%rip),%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L130
  movl   $0xffffffff,-0x38(%rbp)
L130:
  movsd  -0x68(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L568
  movl   $0x1,-0x38(%rbp)
L568:
  movsd  D275(%rip),%xmm0
  comisd -0x80(%rbp),%xmm0
  jbe    L85
  movl   $0xffffffff,-0x34(%rbp)
L85:
  movsd  -0x80(%rbp),%xmm0
  movsd  D310(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L103
  movl   $0x1,-0x34(%rbp)
L103:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  mov    %rax,%rbx
  mov    -0x44(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  add    %rax,%rbx
  mov    -0x40(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  add    %rax,%rbx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  add    %rax,%rbx
  mov    -0x38(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  add    %rax,%rbx
  mov    -0x34(%rbp),%eax
  mov    %eax,%edi
  call   <abs@plt>
  add    %rbx,%rax
  test   %rax,%rax
  jne    L265
  mov    $0x1,%eax
  jmp    L559
L265:
  mov    -0x48(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jne    L544
  cmpl   $0x0,-0x48(%rbp)
  je     L544
  mov    $0x0,%eax
  jmp    L559
L544:
  mov    -0x40(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jne    L195
  cmpl   $0x0,-0x40(%rbp)
  je     L195
  mov    $0x0,%eax
  jmp    L559
L195:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jne    L322
  cmpl   $0x0,-0x38(%rbp)
  je     L322
  mov    $0x0,%eax
  jmp    L559
L322:
  cmpl   $0x0,-0x48(%rbp)
  je     L156
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
  cmpl   $0x0,-0x48(%rbp)
  jle    L28
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
L28:
  mov    -0x88(%rbp),%rax
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x28(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  subsd  -0x70(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x78(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x78(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x80(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x80(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L381
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L381
  mov    -0x90(%rbp),%rax
  movss  -0x1c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x98(%rbp),%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L120
L381:
  movl   $0x0,-0x4c(%rbp)
  jmp    L450
L156:
  nop
L450:
  cmpl   $0x0,-0x40(%rbp)
  je     L132
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x2c(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  jle    L61
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x2c(%rbp)
L61:
  mov    -0x90(%rbp),%rax
  movss  -0x2c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  subsd  -0x78(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x70(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x70(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x80(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x80(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L150
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L150
  mov    -0x88(%rbp),%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x98(%rbp),%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L120
L150:
  movl   $0x0,-0x4c(%rbp)
  jmp    L15
L132:
  nop
L15:
  cmpl   $0x0,-0x38(%rbp)
  je     L356
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
  cmpl   $0x0,-0x38(%rbp)
  jle    L64
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
L64:
  mov    -0x98(%rbp),%rax
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x24(%rbp),%xmm0
  subsd  -0x80(%rbp),%xmm0
  movsd  -0x68(%rbp),%xmm1
  subsd  -0x80(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x20(%rbp),%xmm1
  movsd  -0x58(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x70(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  pxor   %xmm1,%xmm1
  cvtss2sd -0x20(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x78(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L400
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L400
  mov    -0x88(%rbp),%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x90(%rbp),%rax
  movss  -0x1c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L120
L400:
  movl   $0x0,-0x4c(%rbp)
  jmp    L120
L356:
  nop
L120:
  mov    -0x30(%rbp),%eax
  add    %eax,-0x4c(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  je     L32
  cmpl   $0x0,-0x4c(%rbp)
  je     L32
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  jle    L128
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
L128:
  mov    -0xa0(%rbp),%rax
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x28(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movsd  -0x70(%rbp),%xmm1
  subsd  -0x58(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x60(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x60(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x68(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x68(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L277
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L277
  mov    -0xa8(%rbp),%rax
  movss  -0x1c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0xb0(%rbp),%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L559
L32:
  nop
L277:
  cmpl   $0x0,-0x3c(%rbp)
  je     L55
  cmpl   $0x0,-0x4c(%rbp)
  je     L55
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x2c(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jle    L262
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x2c(%rbp)
L262:
  mov    -0xa8(%rbp),%rax
  movss  -0x2c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x2c(%rbp),%xmm0
  subsd  -0x60(%rbp),%xmm0
  movsd  -0x78(%rbp),%xmm1
  subsd  -0x60(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x58(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x58(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x68(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x68(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L67
  mov    -0x18(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L67
  mov    -0xb0(%rbp),%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0xa0(%rbp),%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L559
L55:
  nop
L67:
  cmpl   $0x0,-0x34(%rbp)
  je     L207
  cmpl   $0x0,-0x4c(%rbp)
  jne    L191
L207:
  mov    -0x30(%rbp),%eax
  jmp    L559
L191:
  movss  D193(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  jle    L297
  movss  D260(%rip),%xmm0
  movss  %xmm0,-0x24(%rbp)
L297:
  mov    -0xb0(%rbp),%rax
  movss  -0x24(%rbp),%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  cvtss2sd -0x24(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  movsd  -0x80(%rbp),%xmm1
  subsd  -0x68(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x58(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x58(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x60(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x60(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L241
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D135(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L241
  mov    -0xa0(%rbp),%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0xa8(%rbp),%rax
  movss  -0x1c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L559
L241:
  mov    -0x30(%rbp),%eax
L559:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D275
datatype: byte[8]
name: unpack_data
arguments: data_label: D310
datatype: f64
name: unpack_data
arguments: data_label: D193
datatype: byte[4]
name: unpack_data
arguments: data_label: D260
datatype: byte[4]
name: unpack_data
arguments: data_label: D135
datatype: f64

tool: {"D275": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D310: 1

tool: {"D193": [0x00,0x00,0x80,0xbf]}

tool: {"D260": [0x00,0x00,0x80,0x3f]}

tool: D135: 1.000001

assistant: ```c
int clip3d(double x1, double y1, double z1, double x2, double y2, double z2, float *x1p, float *y1p, float *z1p, float *x2p, float *y2p, float *z2p) {
  int istack, ix1 = 0, ix2 = 0, iy1 = 0, iy2 = 0, iz1 = 0, iz2 = 0, iflag = 0;
  float wh, wv, wo, xhat, yhat, zhat, del;
  istack = 1;
  *x1p = x1;
  *y1p = y1;
  *z1p = z1;
  *x2p = x2;
  *y2p = y2;
  *z2p = z2;
  if (x1 < -1.)
    ix1 = -1;
  if (x1 > 1.)
    ix1 = 1;
  if (x2 < -1.)
    ix2 = -1;
  if (x2 > 1.)
    ix2 = 1;
  if (y1 < -1.)
    iy1 = -1;
  if (y1 > 1.)
    iy1 = 1;
  if (y2 < -1.)
    iy2 = -1;
  if (y2 > 1.)
    iy2 = 1;
  if (z1 < -1.)
    iz1 = -1;
  if (z1 > 1.)
    iz1 = 1;
  if (z2 < -1.)
    iz2 = -1;
  if (z2 > 1.)
    iz2 = 1;
  if ((abs(ix1) + abs(ix2) + abs(iy1) + abs(iy2) + abs(iz1) + abs(iz2)) == 0)
    return (1);
  if ((ix1 == ix2) && (ix1 != 0))
    return (0);
  if ((iy1 == iy2) && (iy1 != 0))
    return (0);
  if ((iz1 == iz2) && (iz1 != 0))
    return (0);
  if (ix1 == 0)
    goto C2;
  wv = -1;
  if (ix1 > 0)
    wv = 1;
  *x1p = wv;
  del = (wv - x2) / (x1 - x2);
  yhat = (y1 - y2) * del + y2;
  zhat = (z1 - z2) * del + z2;
  if (fabs(zhat) <= 1.000001 && fabs(yhat) <= 1.000001) {
    *y1p = yhat;
    *z1p = zhat;
    iflag = 1;
    goto C3;
  }
  istack = 0;
C2:
  if (iy1 == 0)
    goto C22;
  wh = -1;
  if (iy1 > 0)
    wh = 1;
  *y1p = wh;
  del = (wh - y2) / (y1 - y2);
  xhat = (x1 - x2) * del + x2;
  zhat = (z1 - z2) * del + z2;
  if (fabs(zhat) <= 1.000001 && fabs(xhat) <= 1.000001) {
    *x1p = xhat;
    *z1p = zhat;
    iflag = 1;
    goto C3;
  }
  istack = 0;
C22:
  if (iz1 == 0)
    goto C3;
  wo = -1;
  if (iz1 > 0)
    wo = 1;
  *z1p = wo;
  del = (wo - z2) / (z1 - z2);
  xhat = del * (x1 - x2) + x2;
  yhat = del * (y1 - y2) + y2;
  if (fabs(xhat) <= 1.000001 && fabs(yhat) <= 1.000001) {
    *x1p = xhat;
    *y1p = yhat;
    iflag = 1;
  } else
    istack = 0;
C3:
  istack += iflag;
  if ((ix2 == 0) || (istack == 0))
    goto C44;
  wv = -1;
  if (ix2 > 0)
    wv = 1;
  *x2p = wv;
  del = (wv - x1) / (x2 - x1);
  yhat = (y2 - y1) * del + y1;
  zhat = (z2 - z1) * del + z1;
  if (fabs(yhat) <= 1.000001 && fabs(zhat) <= 1.000001) {
    *y2p = yhat;
    *z2p = zhat;
    return (1);
  }
C44:
  if (iy2 == 0 || istack == 0)
    goto C4;
  wh = -1;
  if (iy2 > 0)
    wh = 1;
  *y2p = wh;
  del = (wh - y1) / (y2 - y1);
  xhat = (x2 - x1) * del + x1;
  zhat = (z2 - z1) * del + z1;
  if (fabs(xhat) <= 1.000001 && fabs(zhat) <= 1.000001) {
    *z2p = zhat;
    *x2p = xhat;
    return (1);
  }
C4:
  if (iz2 == 0 || istack == 0)
    return (iflag);
  wo = -1;
  if (iz2 > 0)
    wo = 1;
  *z2p = wo;
  del = (wo - z1) / (z2 - z1);
  xhat = (x2 - x1) * del + x1;
  yhat = (y2 - y1) * del + y1;
  if (fabs(xhat) <= 1.000001 && fabs(yhat) <= 1.000001) {
    *x2p = xhat;
    *y2p = yhat;
    return (1);
  }
  return (iflag);
}
```