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

```asm
<fit_cornu_half>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x38(%rsp)
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movsd  %xmm0,0x28(%rsp)
  movsd  %xmm1,(%rsp)
  addsd  %xmm1,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L4
L50:
  movsd  0x28(%rsp),%xmm7
  movapd %xmm7,%xmm5
  movsd  (%rsp),%xmm6
  addsd  %xmm6,%xmm5
  movsd  %xmm5,0x30(%rsp)
  mulsd  D4(%rip),%xmm5
  movq   %xmm5,%rbx
  subsd  %xmm7,%xmm6
  movapd %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm6,%xmm1
  ja     L27
  sqrtsd %xmm0,%xmm0
L10:
  movq   %rbx,%xmm1
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm7
  mulsd  D35(%rip),%xmm7
  movsd  %xmm7,0x20(%rsp)
  addsd  %xmm1,%xmm1
  movsd  %xmm1,0x18(%rsp)
  mov    $0x15,%ebx
  lea    0x50(%rsp),%r12
  lea    0x48(%rsp),%rbp
  jmp    L52
L4:
  movsd  D41(%rip),%xmm0
  movsd  0x28(%rsp),%xmm7
  addsd  %xmm0,%xmm7
  movsd  %xmm7,0x28(%rsp)
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  jmp    L50
L27:
  call   <sqrt@plt>
  jmp    L10
L29:
  movsd  0x10(%rsp),%xmm7
  movsd  %xmm7,0x20(%rsp)
L26:
  sub    $0x1,%ebx
  je     L109
L52:
  movsd  0x20(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  mulsd  D46(%rip),%xmm0
  movapd %xmm0,%xmm3
  movsd  D12(%rip),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  0x30(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movapd %xmm3,%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm3,0x10(%rsp)
  addsd  %xmm3,%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movsd  %xmm2,(%rsp)
  movapd %xmm2,%xmm0
  call   <eval_cornu@plt>
  lea    0x60(%rsp),%rsi
  lea    0x58(%rsp),%rdi
  movsd  0x8(%rsp),%xmm0
  call   <eval_cornu@plt>
  movsd  0x58(%rsp),%xmm0
  subsd  0x48(%rsp),%xmm0
  movsd  0x60(%rsp),%xmm1
  subsd  0x50(%rsp),%xmm1
  call   <atan2@plt>
  movsd  (%rsp),%xmm4
  movapd %xmm4,%xmm1
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  subsd  0x28(%rsp),%xmm0
  call   <mod_2pi@plt>
  test   %rax,%rax
  js     L29
  movsd  0x10(%rsp),%xmm3
  movsd  %xmm3,0x18(%rsp)
  jmp    L26
L109:
  movsd  (%rsp),%xmm7
  movsd  %xmm7,(%r15)
  mov    0x38(%rsp),%rax
  movsd  0x8(%rsp),%xmm7
  movsd  %xmm7,(%rax)
  mov    %r13,%rax
  or     %r14,%rax
  jne    L97
L1:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L87
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L97:
  movsd  0x58(%rsp),%xmm0
  subsd  0x48(%rsp),%xmm0
  movsd  0x60(%rsp),%xmm1
  subsd  0x50(%rsp),%xmm1
  call   <hypot@plt>
  test   %r13,%r13
  je     L56
  movsd  (%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13)
  test   %r14,%r14
  je     L1
L56:
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r14)
  jmp    L1
L87:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D4
data_type: f64
name: unpack_data
arguments: data_label: D35
data_type: byte[8]
name: unpack_data
arguments: data_label: D41
data_type: byte[8]
name: unpack_data
arguments: data_label: D46
data_type: byte[8]
name: unpack_data
arguments: data_label: D12
data_type: byte[8]

tool: D4: 0.29112

tool: {"D35": [0xcd,0xcc,0xcc,0xcc,0xcc,0xcc,0xec,0x3f]}

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

tool: {"D46": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D12": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

assistant: ```c
void fit_cornu_half(double th0, double th1, double *pt0, double *pt1, double *pk0, double *pk1) {
  int i;
  const int max_iter = 21;
  double t0, t1, t_m;
  double tl, tr, t_est;
  double s0, c0, s1, c1;
  if (fabs(th0 + th1) < 1e-6) {
    th0 += 1e-6;
    th1 += 1e-6;
  }
  t_est = 0.29112 * (th1 + th0) / sqrt(th1 - th0);
  tl = t_est * .9;
  tr = t_est * 2;
  for (i = 0; i < max_iter; i++) {
    double dt;
    double chord_th;
    t_m = .5 * (tl + tr);
    dt = (th0 + th1) / (4 * t_m);
    t0 = t_m - dt;
    t1 = t_m + dt;
    eval_cornu(t0, &s0, &c0);
    eval_cornu(t1, &s1, &c1);
    chord_th = atan2(s1 - s0, c1 - c0);
    if (mod_2pi(chord_th - t0 * t0 - th0) < 0)
      tl = t_m;
    else
      tr = t_m;
  }
  *pt0 = t0;
  *pt1 = t1;
  if (pk0 || pk1) {
    double chordlen = hypot(s1 - s0, c1 - c0);
    if (pk0)
      *pk0 = t0 * chordlen;
    if (pk1)
      *pk1 = t1 * chordlen;
  }
}
```