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

```asm
<double_to_ieee_80>:
  endbr64
  push   %r13
  movapd %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  xor    %esi,%esi
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  comisd %xmm2,%xmm0
  jbe    L6
  xorpd  D35(%rip),%xmm2
  mov    $0xffffff80,%esi
  mov    $0xffffff80,%ebp
L6:
  ucomisd %xmm0,%xmm2
  jp     L13
  jne    L13
  xor    %edx,%edx
  xor    %ecx,%ecx
  xor    %eax,%eax
  xor    %ebp,%ebp
  xor    %r11d,%r11d
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  xor    %edi,%edi
L3:
  movzbl %al,%eax
  movzbl %bpl,%ebp
  movzbl %r10b,%r10d
  movzbl %r9b,%r9d
  shl    $0x8,%rax
  movzbl %r8b,%r8d
  movzbl %sil,%esi
  mov    %cl,0x8(%rbx)
  or     %rbp,%rax
  mov    %dl,0x9(%rbx)
  shl    $0x8,%rax
  or     %r11,%rax
  shl    $0x8,%rax
  or     %r10,%rax
  shl    $0x8,%rax
  or     %r9,%rax
  shl    $0x8,%rax
  or     %r8,%rax
  shl    $0x8,%rax
  or     %rdi,%rax
  shl    $0x8,%rax
  or     %rsi,%rax
  mov    %rax,(%rbx)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nop
L13:
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <log@plt>
  divsd  D15(%rip),%xmm0
  addsd  D57(%rip),%xmm0
  movsd  D4(%rip),%xmm1
  cvttsd2si %xmm0,%r13d
  pxor   %xmm0,%xmm0
  movswl %r13w,%eax
  cvtsi2sd %eax,%xmm0
  subsd  %xmm0,%xmm1
  movsd  D21(%rip),%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <myDoubleToUlong@plt>
  mov    %eax,%edi
  mov    %eax,%r12d
  call   <myUlongToDouble@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %rax,%xmm0
  subsd  %xmm0,%xmm2
  mulsd  D52(%rip),%xmm2
  movapd %xmm2,%xmm0
  call   <myDoubleToUlong@plt>
  mov    %r13d,%esi
  mov    %r12d,%r9d
  movzbl %r13b,%edi
  sar    $0x8,%si
  mov    %eax,%edx
  mov    %r12d,%eax
  shr    $0x10,%r9d
  shr    $0x18,%eax
  or     %ebp,%esi
  movzbl %r12b,%r11d
  movzbl %dh,%ecx
  mov    %eax,%r8d
  mov    %r12d,%eax
  movzbl %ah,%eax
  mov    %eax,%r10d
  mov    %edx,%eax
  shr    $0x18,%eax
  mov    %eax,%ebp
  mov    %edx,%eax
  shr    $0x10,%eax
  jmp    L3
```

tool_calls: name: retrieve_data
arguments: data_tag: D35
type_infered: f32[4]
name: retrieve_data
arguments: data_tag: D15
type_infered: byte[8]
name: retrieve_data
arguments: data_tag: D57
type_infered: f64
name: retrieve_data
arguments: data_tag: D4
type_infered: f32[2]
name: retrieve_data
arguments: data_tag: D21
type_infered: f64
name: retrieve_data
arguments: data_tag: D52
type_infered: f32[2]

tool: {"D35": [0.0,-0.0,0.0,0.0]}

tool: {"D15": [0xef,0x39,0xfa,0xfe,0x42,0x2e,0xe6,0x3f]}

tool: D57: 16383

tool: {"D4": [0.0,6.50091552734375]}

tool: D21: 2

tool: {"D52": [0.0,30.0]}

assistant: ```c
void double_to_ieee_80(double val, unsigned char *p) {
  unsigned char sign = 0;
  short exp = 0;
  unsigned int mant1 = 0;
  unsigned int mant0 = 0;
  if (val < 0.0) {
    sign = 1;
    val = -val;
  }
  if (val != 0.0) {
    exp = (short)(log(val) / log(2.0) + 16383.0);
    val *= pow(2.0, 31.0 + 16383.0 - (double)exp);
    mant1 = myDoubleToUlong(val);
    val -= myUlongToDouble(mant1);
    val *= pow(2.0, 32.0);
    mant0 = myDoubleToUlong(val);
  }
  *p++ = ((sign << 7) | (exp >> 8));
  *p++ = 0xFF & exp;
  *p++ = 0xFF & (mant1 >> 24);
  *p++ = 0xFF & (mant1 >> 16);
  *p++ = 0xFF & (mant1 >> 8);
  *p++ = 0xFF & (mant1);
  *p++ = 0xFF & (mant0 >> 24);
  *p++ = 0xFF & (mant0 >> 16);
  *p++ = 0xFF & (mant0 >> 8);
  *p++ = 0xFF & (mant0);
}
```