user: Demonstrate the C code that generates the assembly output below:

```asm
<ls_closest_approach>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%rbx
  mov    %rcx,%r12
  mov    %r8,%rbp
  mov    %r9,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  movsd  (%rdx),%xmm0
  ucomisd (%rcx),%xmm0
  jp     L158
  jne    L158
  movsd  0x8(%rdx),%xmm0
  ucomisd 0x8(%rcx),%xmm0
  jp     L158
  jne    L158
  movsd  0x10(%rdx),%xmm0
  ucomisd 0x10(%rcx),%xmm0
  jp     L158
  jne    L158
  movsd  (%r9),%xmm0
  ucomisd (%r8),%xmm0
  jp     L325
  mov    $0x1,%eax
  je     L349
  jmp    L325
L183:
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
L371:
  lea    0xa0(%rsp),%r15
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <projmatrix@plt>
  lea    0x80(%rsp),%r14
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <diff_3d@plt>
  lea    0x20(%rsp),%rdi
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    $0x0,%eax
  call   <mat_vmult_3d@plt>
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <diff_3d@plt>
  lea    0x40(%rsp),%rax
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rax,0x10(%rsp)
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mat_vmult_3d@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <diff_3d@plt>
  lea    0x60(%rsp),%rax
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rax,%r15
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mat_vmult_3d@plt>
  mov    0x10(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <diff_3d@plt>
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <norm2_2d@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L331
  movsd  0x50(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L26
L131:
  movsd  0x30(%rsp),%xmm1
  comisd %xmm1,%xmm0
  jbe    L70
  movsd  0x70(%rsp),%xmm2
  comisd %xmm1,%xmm2
  ja     L79
L70:
  comisd D59(%rip),%xmm0
  jb     L188
  comisd %xmm0,%xmm1
  jae    L297
L188:
  movsd  0x70(%rsp),%xmm0
  comisd D59(%rip),%xmm0
  jb     L180
  comisd %xmm0,%xmm1
  jae    L43
L180:
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  movsd  0x50(%rsp),%xmm2
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  0x70(%rsp),%xmm0
  subsd  %xmm2,%xmm0
  divsd  %xmm0,%xmm1
  movsd  D67(%rip),%xmm0
  movsd  %xmm1,(%rsp)
  subsd  %xmm1,%xmm0
  lea    0x80(%rsp),%rbx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  movsd  (%rsp),%xmm0
  mov    %r13,%rsi
  mov    0x8(%rsp),%r15
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <sum_3d@plt>
L85:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L271
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L331:
  lea    0x40(%rsp),%rsi
  lea    0x80(%rsp),%rdi
  mov    $0x0,%eax
  call   <inner_2d@plt>
  neg    %eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm4
  movsd  %xmm1,0x10(%rsp)
  movsd  0x50(%rsp),%xmm1
  movsd  0x70(%rsp),%xmm2
  movsd  0x30(%rsp),%xmm3
  comisd D59(%rip),%xmm4
  jb     L173
  movsd  D67(%rip),%xmm0
  comisd %xmm4,%xmm0
  jae    L298
L173:
  lea    0x80(%rsp),%r14
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <cart2_3d@plt>
  mov    %eax,%r15d
  mov    %r14,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <cart2_3d@plt>
  cmp    %eax,%r15d
  jg     L397
  pxor   %xmm6,%xmm6
  cvtsi2sd %r15d,%xmm6
  movq   %xmm6,%r14
L336:
  lea    0x80(%rsp),%r15
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cart2_3d@plt>
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm5
  movsd  %xmm5,0x10(%rsp)
  movq   %r14,%xmm6
  comisd %xmm5,%xmm6
  ja     L4
L167:
  lea    0x80(%rsp),%rbx
  mov    %r12,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <cart2_3d@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movq   %r14,%xmm7
  comisd %xmm0,%xmm7
  jbe    L85
  mov    %rbx,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %r12,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  jmp    L85
L298:
  subsd  %xmm4,%xmm0
  mulsd  %xmm0,%xmm1
  mulsd  %xmm4,%xmm2
  addsd  %xmm2,%xmm1
  divsd  %xmm3,%xmm1
  movapd %xmm1,%xmm3
  movsd  %xmm1,0x18(%rsp)
  comisd D59(%rip),%xmm1
  jb     L173
  movsd  D67(%rip),%xmm1
  comisd %xmm3,%xmm1
  jb     L173
  lea    0x80(%rsp),%r14
  mov    %rbp,%rsi
  mov    %r14,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  movsd  0x10(%rsp),%xmm0
  mov    %r13,%rsi
  mov    0x8(%rsp),%r15
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <sum_3d@plt>
  movsd  D67(%rip),%xmm0
  subsd  0x18(%rsp),%xmm0
  mov    %rbx,%rsi
  mov    %r14,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  movsd  0x18(%rsp),%xmm0
  mov    %r12,%rsi
  mov    (%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sum_3d@plt>
  jmp    L85
L397:
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm7
  movq   %xmm7,%r14
  lea    0x80(%rsp),%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  jmp    L336
L4:
  mov    %r15,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    0x10(%rsp),%r14
  jmp    L167
L26:
  pxor   %xmm1,%xmm1
  comisd 0x70(%rsp),%xmm1
  jbe    L131
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  movsd  0x50(%rsp),%xmm0
  comisd 0x70(%rsp),%xmm0
  cmovb  %r13,%rbp
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  jmp    L85
L79:
  mov    %r12,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  movsd  0x70(%rsp),%xmm0
  comisd 0x50(%rsp),%xmm0
  cmovb  %r13,%rbp
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  jmp    L85
L297:
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  movsd  0x50(%rsp),%xmm0
  divsd  0x30(%rsp),%xmm0
  movapd %xmm0,%xmm7
  movsd  D67(%rip),%xmm0
  movsd  %xmm7,0x8(%rsp)
  subsd  %xmm7,%xmm0
  lea    0x80(%rsp),%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    (%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sum_3d@plt>
  jmp    L85
L43:
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  movsd  0x70(%rsp),%xmm0
  divsd  0x30(%rsp),%xmm0
  movapd %xmm0,%xmm7
  movsd  D67(%rip),%xmm0
  movsd  %xmm7,0x8(%rsp)
  subsd  %xmm7,%xmm0
  lea    0x80(%rsp),%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    (%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <scale_3d@plt>
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sum_3d@plt>
  jmp    L85
L229:
  test   %al,%al
  je     L371
L325:
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <p_ls_closest_approach@plt>
  jmp    L85
L158:
  movsd  0x0(%rbp),%xmm0
  ucomisd 0x0(%r13),%xmm0
  jp     L371
  mov    $0x0,%eax
  jne    L371
L349:
  movsd  0x8(%rbp),%xmm0
  ucomisd 0x8(%r13),%xmm0
  jp     L229
  jne    L229
  movsd  0x10(%rbp),%xmm0
  ucomisd 0x10(%r13),%xmm0
  jp     L229
  jne    L229
  test   %al,%al
  je     L183
  mov    %rbx,%rsi
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  mov    %rbp,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <cp_3d@plt>
  jmp    L85
L271:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D59
type_guessed: byte[16]
name: parse_data
arguments: data_tag: D67
type_guessed: f64

tool: {"D59": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D67: 1

assistant: ```c
void ls_closest_approach(double p0[3], double p1[3], double a0[3], double b0[3], double c0[3], double d0[3]) {
  double q1[3], q2[3], b[3], c[3], d[3], scr[3];
  double mat[9];
  double alpha, beta, d2;
  {
    char ab0, cd0;
    ab0 = (a0[0] == b0[0] && a0[1] == b0[1] && a0[2] == b0[2]);
    cd0 = (c0[0] == d0[0] && c0[1] == d0[1] && c0[2] == d0[2]);
    if (ab0) {
      cp_3d(p0, a0);
      if (cd0) {
        cp_3d(p1, c0);
        return;
      } else {
        p_ls_closest_approach(p1, c0, d0, a0);
        return;
      }
    }
    if (cd0) {
      cp_3d(p1, c0);
      p_ls_closest_approach(p0, a0, b0, c0);
    }
  }
  projmatrix(mat, b0, a0);
  diff_3d(scr, b0, a0);
  mat_vmult_3d(b, mat, scr);
  diff_3d(scr, c0, a0);
  mat_vmult_3d(c, mat, scr);
  diff_3d(scr, d0, a0);
  mat_vmult_3d(d, mat, scr);
  diff_3d(scr, d, c);
  d2 = norm2_2d(scr);
  if (d2 == 0)
    goto parallel;
  alpha = -inner_2d(scr, c) / d2;
  beta = ((1.0 - alpha) * c[2] + alpha * d[2]) / b[2];
  if (alpha >= 0 && alpha <= 1 && beta >= 0 && beta <= 1) {
    scale_3d(scr, c0, (1.0 - alpha));
    scale_3d(p1, d0, alpha);
    sum_3d(p1, p1, scr);
    scale_3d(scr, a0, (1.0 - beta));
    scale_3d(p0, b0, beta);
    sum_3d(p0, p0, scr);
    return;
  }
  {
    char found_one = 0;
    double d2, c2;
    p_ls_closest_approach(scr, a0, b0, c0);
    d2 = cart2_3d(c0, scr);
    cp_3d(p0, scr);
    cp_3d(p1, c0);
    p_ls_closest_approach(scr, a0, b0, d0);
    c2 = cart2_3d(d0, scr);
    if (c2 < d2) {
      d2 = c2;
      cp_3d(p0, scr);
      cp_3d(p1, d0);
    }
    p_ls_closest_approach(scr, c0, d0, a0);
    c2 = cart2_3d(a0, scr);
    if (c2 < d2) {
      d2 = c2;
      cp_3d(p1, scr);
      cp_3d(p0, a0);
    }
    p_ls_closest_approach(scr, c0, d0, b0);
    c2 = cart2_3d(b0, scr);
    if (c2 < d2) {
      d2 = c2;
      cp_3d(p1, scr);
      cp_3d(p0, b0);
    }
  }
  return;
parallel:
  if (c[2] < 0 && d[2] < 0) {
    cp_3d(p0, a0);
    cp_3d(p1, (c[2] >= d[2]) ? c0 : d0);
    return;
  }
  if (c[2] > b[2] && d[2] > b[2]) {
    cp_3d(p0, b0);
    cp_3d(p1, (c[2] <= d[2]) ? c0 : d0);
    return;
  }
  if (c[2] >= 0 && c[2] <= b[2]) {
    cp_3d(p1, c0);
    alpha = c[2] / b[2];
    scale_3d(scr, a0, (1.0 - alpha));
    scale_3d(p0, b0, alpha);
    sum_3d(p0, p0, scr);
    return;
  }
  if (d[2] >= 0 && d[2] <= b[2]) {
    cp_3d(p1, d0);
    alpha = d[2] / b[2];
    scale_3d(scr, a0, (1.0 - alpha));
    scale_3d(p0, b0, alpha);
    sum_3d(p0, p0, scr);
    return;
  }
  cp_3d(p0, a0);
  alpha = (0 - c[2]) / (d[2] - c[2]);
  scale_3d(scr, c0, (1.0 - alpha));
  scale_3d(p1, d0, alpha);
  sum_3d(p1, p1, scr);
  return;
}
```